From 83439a2bfa95120cbc4a3bf9b620e6e65f0f80e1 Mon Sep 17 00:00:00 2001 From: build-pipeline <build-token> Date: Mon, 22 Jan 2024 16:30:04 +0000 Subject: [PATCH] publish: Merge branch 'unsubscribe-nl' into 'dev' generated from commit abf99d0ef94a66391cba7bfdaf8eb808bfdbec3b --- .../ecolyo.48e22fe54b797e13649d.js | 2 +- .../ecolyo.b5b57265a7650f49bb4f.js | 2 +- .../ecolyo.5304880c279a328fb5fb.js | 2 +- .../ecolyo.8ead148de64ba3b0f926.js | 2 +- .../ecolyo.fae6e32cbf034c2bc9c0.js | 30 +- .../ecolyo.549e52f150fb1855a51a.js | 2 +- .../ecolyo.0aa5f5c57c463f74cbec.js | 2 +- .../ecolyo.e5c126b21505089b1bec.js | 2 +- .../ecolyo.d291da09c33bf88b3d41.js | 2 +- ...6116.js => ecolyo.ff0a90bb06df93b4038c.js} | 189 +- index.html | 2 +- manifest.webapp | 5 + offline.html | 27 +- public/ecolyo.e5c9e64081aae31cdba7.js | 181589 +++++++++++++++ public/index.html | 1 + services/monthlyReportNotification/ecolyo.js | 119 +- unsubscribe.html | 64 + ...6417.js => ecolyo.282ad4ac6d5dbc59b8e8.js} | 20 +- 18 files changed, 181816 insertions(+), 246 deletions(-) rename 9/ecolyo.f6b880eae075742f8a5c.js => 10/ecolyo.48e22fe54b797e13649d.js (97%) rename 10/ecolyo.b461f3d126d47b5c165e.js => 11/ecolyo.b5b57265a7650f49bb4f.js (99%) rename 2/ecolyo.eefa20ad999cf240ed4a.js => 3/ecolyo.5304880c279a328fb5fb.js (99%) rename 3/ecolyo.113101a9ef7c66f97a74.js => 4/ecolyo.8ead148de64ba3b0f926.js (99%) rename 4/ecolyo.74a86c2a95b6cd7dd36c.js => 5/ecolyo.fae6e32cbf034c2bc9c0.js (99%) rename 5/ecolyo.54fb5d94c100f0714ed3.js => 6/ecolyo.549e52f150fb1855a51a.js (99%) rename 6/ecolyo.0233a16ac23f1183ad65.js => 7/ecolyo.0aa5f5c57c463f74cbec.js (99%) rename 7/ecolyo.b1a690c1842b74fe5b01.js => 8/ecolyo.e5c126b21505089b1bec.js (99%) rename 8/ecolyo.743dbeb185ac5d800525.js => 9/ecolyo.d291da09c33bf88b3d41.js (97%) rename app/{ecolyo.5f575df2443369bd6116.js => ecolyo.ff0a90bb06df93b4038c.js} (99%) create mode 100644 public/ecolyo.e5c9e64081aae31cdba7.js create mode 100644 public/index.html create mode 100644 unsubscribe.html rename vendors/{ecolyo.50523ef7f4b4a6406417.js => ecolyo.282ad4ac6d5dbc59b8e8.js} (99%) diff --git a/9/ecolyo.f6b880eae075742f8a5c.js b/10/ecolyo.48e22fe54b797e13649d.js similarity index 97% rename from 9/ecolyo.f6b880eae075742f8a5c.js rename to 10/ecolyo.48e22fe54b797e13649d.js index dcde7302b..cbcf041fd 100644 --- a/9/ecolyo.f6b880eae075742f8a5c.js +++ b/10/ecolyo.48e22fe54b797e13649d.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{ /***/ "khfY": /***/ (function(module, exports, __webpack_require__) { diff --git a/10/ecolyo.b461f3d126d47b5c165e.js b/11/ecolyo.b5b57265a7650f49bb4f.js similarity index 99% rename from 10/ecolyo.b461f3d126d47b5c165e.js rename to 11/ecolyo.b5b57265a7650f49bb4f.js index 847d7b5a2..cf22ac1ce 100644 --- a/10/ecolyo.b461f3d126d47b5c165e.js +++ b/11/ecolyo.b5b57265a7650f49bb4f.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{ /***/ "rlLj": /***/ (function(module, exports, __webpack_require__) { diff --git a/2/ecolyo.eefa20ad999cf240ed4a.js b/3/ecolyo.5304880c279a328fb5fb.js similarity index 99% rename from 2/ecolyo.eefa20ad999cf240ed4a.js rename to 3/ecolyo.5304880c279a328fb5fb.js index 0bce377fd..b377ac1f1 100644 --- a/2/ecolyo.eefa20ad999cf240ed4a.js +++ b/3/ecolyo.5304880c279a328fb5fb.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{ /***/ "+AvX": /***/ (function(module, exports, __webpack_require__) { diff --git a/3/ecolyo.113101a9ef7c66f97a74.js b/4/ecolyo.8ead148de64ba3b0f926.js similarity index 99% rename from 3/ecolyo.113101a9ef7c66f97a74.js rename to 4/ecolyo.8ead148de64ba3b0f926.js index 00434a4ba..315ff7fa6 100644 --- a/3/ecolyo.113101a9ef7c66f97a74.js +++ b/4/ecolyo.8ead148de64ba3b0f926.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{ /***/ "//i3": /***/ (function(module, exports, __webpack_require__) { diff --git a/4/ecolyo.74a86c2a95b6cd7dd36c.js b/5/ecolyo.fae6e32cbf034c2bc9c0.js similarity index 99% rename from 4/ecolyo.74a86c2a95b6cd7dd36c.js rename to 5/ecolyo.fae6e32cbf034c2bc9c0.js index f71cb874e..9d512143d 100644 --- a/4/ecolyo.74a86c2a95b6cd7dd36c.js +++ b/5/ecolyo.fae6e32cbf034c2bc9c0.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{ /***/ "/jgc": /***/ (function(module, exports, __webpack_require__) { @@ -9,13 +9,6 @@ exports.push([module.i, "/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE -/***/ }), - -/***/ 0: -/***/ (function(module, exports) { - -/* (ignored) */ - /***/ }), /***/ "0DQp": @@ -265,6 +258,13 @@ if(false) {} /***/ }), +/***/ 2: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + /***/ "3IgR": /***/ (function(module, exports, __webpack_require__) { @@ -391,13 +391,6 @@ if(false) {} /***/ }), -/***/ 4: -/***/ (function(module, exports) { - -/* (ignored) */ - -/***/ }), - /***/ 5: /***/ (function(module, exports) { @@ -619,6 +612,13 @@ exports.default = _default; /***/ }), +/***/ 7: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + /***/ "7m82": /***/ (function(module, exports, __webpack_require__) { diff --git a/5/ecolyo.54fb5d94c100f0714ed3.js b/6/ecolyo.549e52f150fb1855a51a.js similarity index 99% rename from 5/ecolyo.54fb5d94c100f0714ed3.js rename to 6/ecolyo.549e52f150fb1855a51a.js index 712814c51..446a214fb 100644 --- a/5/ecolyo.54fb5d94c100f0714ed3.js +++ b/6/ecolyo.549e52f150fb1855a51a.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[5],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{ /***/ "2R85": /***/ (function(module, exports, __webpack_require__) { diff --git a/6/ecolyo.0233a16ac23f1183ad65.js b/7/ecolyo.0aa5f5c57c463f74cbec.js similarity index 99% rename from 6/ecolyo.0233a16ac23f1183ad65.js rename to 7/ecolyo.0aa5f5c57c463f74cbec.js index 3311cb21d..a68cb5d9f 100644 --- a/6/ecolyo.0233a16ac23f1183ad65.js +++ b/7/ecolyo.0aa5f5c57c463f74cbec.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{ /***/ "3BFW": /***/ (function(module, exports, __webpack_require__) { diff --git a/7/ecolyo.b1a690c1842b74fe5b01.js b/8/ecolyo.e5c126b21505089b1bec.js similarity index 99% rename from 7/ecolyo.b1a690c1842b74fe5b01.js rename to 8/ecolyo.e5c126b21505089b1bec.js index a9104024d..3f967ea0f 100644 --- a/7/ecolyo.b1a690c1842b74fe5b01.js +++ b/8/ecolyo.e5c126b21505089b1bec.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{ /***/ "6Spd": /***/ (function(module, exports, __webpack_require__) { diff --git a/8/ecolyo.743dbeb185ac5d800525.js b/9/ecolyo.d291da09c33bf88b3d41.js similarity index 97% rename from 8/ecolyo.743dbeb185ac5d800525.js rename to 9/ecolyo.d291da09c33bf88b3d41.js index 3de517e23..5294bad9e 100644 --- a/8/ecolyo.743dbeb185ac5d800525.js +++ b/9/ecolyo.d291da09c33bf88b3d41.js @@ -1,4 +1,4 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{ /***/ "7qbG": /***/ (function(module, exports, __webpack_require__) { diff --git a/app/ecolyo.5f575df2443369bd6116.js b/app/ecolyo.ff0a90bb06df93b4038c.js similarity index 99% rename from app/ecolyo.5f575df2443369bd6116.js rename to app/ecolyo.ff0a90bb06df93b4038c.js index 29ca04d1a..f3f5e1c0d 100644 --- a/app/ecolyo.5f575df2443369bd6116.js +++ b/app/ecolyo.ff0a90bb06df93b4038c.js @@ -57,14 +57,14 @@ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ 1: 0 +/******/ 2: 0 /******/ }; /******/ /******/ var deferredModules = []; /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { -/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "/ecolyo." + {"2":"eefa20ad999cf240ed4a","3":"113101a9ef7c66f97a74","4":"74a86c2a95b6cd7dd36c","5":"54fb5d94c100f0714ed3","6":"0233a16ac23f1183ad65","7":"b1a690c1842b74fe5b01","8":"743dbeb185ac5d800525","9":"f6b880eae075742f8a5c","10":"b461f3d126d47b5c165e"}[chunkId] + ".js" +/******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "/ecolyo." + {"3":"5304880c279a328fb5fb","4":"8ead148de64ba3b0f926","5":"fae6e32cbf034c2bc9c0","6":"549e52f150fb1855a51a","7":"0aa5f5c57c463f74cbec","8":"e5c126b21505089b1bec","9":"d291da09c33bf88b3d41","10":"48e22fe54b797e13649d","11":"b5b57265a7650f49bb4f"}[chunkId] + ".js" /******/ } /******/ /******/ // The require function @@ -217,7 +217,7 @@ /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([2,0]); +/******/ deferredModules.push([4,0]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) @@ -469,6 +469,13 @@ var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WE /***/ }), +/***/ 0: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + /***/ "00x6": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -2184,15 +2191,6 @@ var symbol = new _node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPO var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1___default.a.add(symbol); /* harmony default export */ __webpack_exports__["default"] = (symbol); -/***/ }), - -/***/ 2: -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__("jI5P"); -module.exports = __webpack_require__("8pXw"); - - /***/ }), /***/ "2+qo": @@ -2886,13 +2884,6 @@ var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WE /***/ }), -/***/ 3: -/***/ (function(module, exports) { - -/* (ignored) */ - -/***/ }), - /***/ "33gc": /***/ (function(module, exports, __webpack_require__) { @@ -3664,6 +3655,15 @@ var symbol = new _node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPO var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1___default.a.add(symbol); /* harmony default export */ __webpack_exports__["default"] = (symbol); +/***/ }), + +/***/ 4: +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("jI5P"); +module.exports = __webpack_require__("8pXw"); + + /***/ }), /***/ "4679": @@ -4398,7 +4398,7 @@ exports.ENEDIS_MONTH_DOCTYPE = ENEDIS_MONTH_DOCTYPE; /***/ "5z4W": /***/ (function(module, exports) { -module.exports = {"name":"Ecolyo","slug":"ecolyo","icon":"icon.svg","categories":["energy"],"version":"2.7.2","licence":"AGPL-3.0","editor":"Métropole de Lyon","default_locale":"fr","locales":{"fr":{"short_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer.","long_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer afin de vous accompagner dans la gestion quotidienne de ces consommations et ce, de façon ludique en vous lançant des défis personnalisés.","permissions":{"ecolyo":{"description":"Requises pour le fonctionnement des différentes parties de l’application (Analyse, liste d’astuces personnalisée, …)."},"enedis":{"description":"Requises pour l’affichage et l’analyse de vos consommations électriques dans Ecolyo. Issues du connecteur Enedis."},"grdf":{"description":"Requises pour l’affichage et l’analyse de vos consommations de gaz dans Ecolyo. Issues du connecteur GRDF."},"egl":{"description":"Requises pour l’affichage et l’analyse de vos consommations d’eau dans Ecolyo. Issues du connecteur Eau du Grand Lyon."},"konnectors":{"description":"Requis pour vérifier la présence des connecteurs Enedis, GRDF et Eau du Grand Lyon ainsi que pour pouvoir les configurer à partir de l’application Ecolyo."},"accounts":{"description":"Requis pour stocker des informations propres aux comptes énergie et eau (Enedis, GRDF, Eau du Grand Lyon). Sont stockés votre numéro de PDL pour Enedis, votre numéro de PCE pour GRDF, vos logins et mots de passe pour Eau du Grand Lyon."},"triggers":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"jobs":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"terms":{"description":"Nécessaire pour la gestion des consentements de l'application"},"apps":{"description":"Requis par Cozy pour afficher les icônes des applications installées dans la barre Cozy."},"settings":{"description":"Requis pour afficher les paramètres Cozy dans la barre Cozy."},"ecolyo-dju":{"description":"Requis pour la récupération des DJU (Degrés Jours Unifiés), informations météorologiques permettant d’ajuster le modèle de comparaison des consommations énergétiques."},"dacc-dev":{"description":"Requis pour la récupération et l’envoi de statistiques d’utilisation anonymisées dans un environnement de test."},"dacc":{"description":"Requis pour envoyer des statistiques d'utilisation anonymisées."},"backoffice-prod":{"description":"Requis pour la récupération des données de la newsletter."},"backoffice-rec":{"description":"Requis pour la récupération des données de la newsletter dans un environment de test."},"backoffice-custom-popup":{"description":"Requis pour la récupération des alertes personnalisées."},"backoffice-custom-popup-rec":{"description":"Requis pour la récupération des alertes personnalisées dans un environment de test."},"backoffice-partners-info":{"description":"Requis pour la récupération du status des services partenaires"},"backoffice-partners-info-rec":{"description":"Requis pour la récupération du status des services partenaires dans un environment de test."},"backoffice-prices":{"description":"Requis pour la récupération du prix des fluides."},"backoffice-prices-rec":{"description":"Requis pour la récupération du prix des fluides dans un environnement de test."}}},"en":{"short_description":"Ecolyo a free service developed by Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home.","long_description":"Ecolyo a free service developed by the Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home. To help you in reducing your daily consumption it gives you best energy consumption practices, consumption analysis and challenges to take up. At least one Smartmeter is needed among Linky (for electricity), Gazpar (for gas) or Téléo (for water).","permissions":{"ecolyo":{"description":"Required for the operation of the different parts of the application (Analysis, customized eco-gesture lists, etc...)."},"enedis":{"description":"Required for the display and analysis of your electricity consumption in Ecolyo. Retrieved by the Enedis connector."},"grdf":{"description":"Required for the display and analysis of your gas consumption in Ecolyo. Retrieved by the GRDF connector."},"egl":{"description":"Required for the display and analysis of your water consumption in Ecolyo. Retrieved by the Eau du Grand Lyon connector."},"konnectors":{"description":"Required to verify the presence of the Enedis, GRDF and Eau du Grand Lyon connectors as well as to be able to configure them from the Ecolyo application."},"accounts":{"description":"Required to store information specific to energy and water accounts (Enedis, GRDF, Eau du Grand Lyon). Your PDL number for Enedis, your PCE number for GRDF, your logins and passwords for Eau du Grand Lyon are stored."},"triggers":{"description":"Required for the correct functioning of the energy and water connectors."},"jobs":{"description":"Required for the correct functioning of the energy and water connectors."},"terms":{"description":"Required for the correct managment of CGU."},"apps":{"description":"Required to display the icons of installed applications in the Cozy bar."},"settings":{"description":"Required for the application's consents managment"},"ecolyo-dju":{"description":"Required to gather udd data (Unified Degree Days), a meteorological data allowing the app to adjust our energical consumption model. "},"dacc-dev":{"description":"Required for gathering and sending anonymous usage statistics for test environment."},"dacc":{"description":"Required for sending cozy anonymized stats."},"agent":{"description":"Required for retrieving informations from our partners."},"backoffice-prod":{"description":"Required for retrieving newsletter informations from backoffice prod."},"backoffice-rec":{"description":"Required for retrieving newsletter informations from backoffice rec."},"backoffice-custom-popup":{"description":"Required for retrieving custom alerts."},"backoffice-custom-popup-rec":{"description":"Required for retrieving custom alerts in test environment."},"backoffice-partners-info":{"description":"Required for getting the status of partners' services"},"backoffice-partners-info-rec":{"description":"Required for getting the status of partners' services in test environment."},"backoffice-prices":{"description":"Required for getting fluid prices form backoffice prod"},"backoffice-prices-rec":{"description":"Required for getting fluid prices form backoffice rec."}}}},"langs":["fr"],"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"routes":{"/":{"folder":"/","index":"index.html","public":false}},"services":{"enedisHalfHourMonthlyAnalysis":{"type":"node","file":"services/enedisHalfHourMonthlyAnalysis/ecolyo.js","trigger":"@cron 0 0 8 3 * *"},"monthlyReportNotification":{"type":"node","file":"services/monthlyReportNotification/ecolyo.js","trigger":"@cron 0 0 10 3 * *"},"consumptionAlert":{"type":"node","file":"services/consumptionAlert/ecolyo.js","trigger":"@daily after 11am"},"aggregatorUsageEvents":{"type":"node","file":"services/aggregatorUsageEvents/ecolyo.js","trigger":"@daily before 7am"},"fluidsPrices":{"type":"node","file":"services/fluidsPrices/ecolyo.js","trigger":"@daily before 7am"}},"permissions":{"ecolyo":{"type":"com.grandlyon.ecolyo.*"},"enedis":{"type":"com.grandlyon.enedis.*"},"grdf":{"type":"com.grandlyon.grdf.*"},"egl":{"type":"com.grandlyon.egl.*"},"agent":{"type":"org.ecolyo.agent.*"},"konnectors":{"type":"io.cozy.konnectors"},"accounts":{"type":"io.cozy.accounts"},"triggers":{"type":"io.cozy.triggers"},"jobs":{"type":"io.cozy.jobs"},"terms":{"type":"io.cozy.terms"},"apps":{"type":"io.cozy.apps","verbs":["GET"]},"settings":{"type":"io.cozy.settings","verbs":["GET"]},"ecolyo-dju":{"type":"org.ecolyo.dju_v2","verbs":["GET"]},"dacc":{"type":"cc.cozycloud.dacc_v2","verbs":["ALL"]},"dacc-dev":{"type":"cc.cozycloud.dacc.dev_v2","verbs":["ALL"]},"backoffice-prod":{"type":"org.ecolyo.agent","verbs":["ALL"]},"backoffice-rec":{"type":"org.ecolyo.agent.rec","verbs":["ALL"]},"backoffice-custom-popup":{"type":"org.ecolyo.agent.custom.popup","verbs":["ALL"]},"backoffice-custom-popup-rec":{"type":"org.ecolyo.agent.custom.popup.rec","verbs":["ALL"]},"backoffice-partners-info":{"type":"org.ecolyo.agent.partners.info","verbs":["ALL"]},"backoffice-partners-info-rec":{"type":"org.ecolyo.agent.partners.info.rec","verbs":["ALL"]},"backoffice-prices":{"type":"org.ecolyo.agent.prices","verbs":["ALL"]},"backoffice-prices-rec":{"type":"org.ecolyo.agent.prices.rec","verbs":["ALL"]}}} +module.exports = {"name":"Ecolyo","slug":"ecolyo","icon":"icon.svg","categories":["energy"],"version":"2.7.2","licence":"AGPL-3.0","editor":"Métropole de Lyon","default_locale":"fr","locales":{"fr":{"short_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer.","long_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer afin de vous accompagner dans la gestion quotidienne de ces consommations et ce, de façon ludique en vous lançant des défis personnalisés.","permissions":{"ecolyo":{"description":"Requises pour le fonctionnement des différentes parties de l’application (Analyse, liste d’astuces personnalisée, …)."},"enedis":{"description":"Requises pour l’affichage et l’analyse de vos consommations électriques dans Ecolyo. Issues du connecteur Enedis."},"grdf":{"description":"Requises pour l’affichage et l’analyse de vos consommations de gaz dans Ecolyo. Issues du connecteur GRDF."},"egl":{"description":"Requises pour l’affichage et l’analyse de vos consommations d’eau dans Ecolyo. Issues du connecteur Eau du Grand Lyon."},"konnectors":{"description":"Requis pour vérifier la présence des connecteurs Enedis, GRDF et Eau du Grand Lyon ainsi que pour pouvoir les configurer à partir de l’application Ecolyo."},"accounts":{"description":"Requis pour stocker des informations propres aux comptes énergie et eau (Enedis, GRDF, Eau du Grand Lyon). Sont stockés votre numéro de PDL pour Enedis, votre numéro de PCE pour GRDF, vos logins et mots de passe pour Eau du Grand Lyon."},"triggers":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"jobs":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"terms":{"description":"Nécessaire pour la gestion des consentements de l'application"},"apps":{"description":"Requis par Cozy pour afficher les icônes des applications installées dans la barre Cozy."},"settings":{"description":"Requis pour afficher les paramètres Cozy dans la barre Cozy."},"ecolyo-dju":{"description":"Requis pour la récupération des DJU (Degrés Jours Unifiés), informations météorologiques permettant d’ajuster le modèle de comparaison des consommations énergétiques."},"dacc-dev":{"description":"Requis pour la récupération et l’envoi de statistiques d’utilisation anonymisées dans un environnement de test."},"dacc":{"description":"Requis pour envoyer des statistiques d'utilisation anonymisées."},"backoffice-prod":{"description":"Requis pour la récupération des données de la newsletter."},"backoffice-rec":{"description":"Requis pour la récupération des données de la newsletter dans un environment de test."},"backoffice-custom-popup":{"description":"Requis pour la récupération des alertes personnalisées."},"backoffice-custom-popup-rec":{"description":"Requis pour la récupération des alertes personnalisées dans un environment de test."},"backoffice-partners-info":{"description":"Requis pour la récupération du status des services partenaires"},"backoffice-partners-info-rec":{"description":"Requis pour la récupération du status des services partenaires dans un environment de test."},"backoffice-prices":{"description":"Requis pour la récupération du prix des fluides."},"backoffice-prices-rec":{"description":"Requis pour la récupération du prix des fluides dans un environnement de test."}}},"en":{"short_description":"Ecolyo a free service developed by Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home.","long_description":"Ecolyo a free service developed by the Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home. To help you in reducing your daily consumption it gives you best energy consumption practices, consumption analysis and challenges to take up. At least one Smartmeter is needed among Linky (for electricity), Gazpar (for gas) or Téléo (for water).","permissions":{"ecolyo":{"description":"Required for the operation of the different parts of the application (Analysis, customized eco-gesture lists, etc...)."},"enedis":{"description":"Required for the display and analysis of your electricity consumption in Ecolyo. Retrieved by the Enedis connector."},"grdf":{"description":"Required for the display and analysis of your gas consumption in Ecolyo. Retrieved by the GRDF connector."},"egl":{"description":"Required for the display and analysis of your water consumption in Ecolyo. Retrieved by the Eau du Grand Lyon connector."},"konnectors":{"description":"Required to verify the presence of the Enedis, GRDF and Eau du Grand Lyon connectors as well as to be able to configure them from the Ecolyo application."},"accounts":{"description":"Required to store information specific to energy and water accounts (Enedis, GRDF, Eau du Grand Lyon). Your PDL number for Enedis, your PCE number for GRDF, your logins and passwords for Eau du Grand Lyon are stored."},"triggers":{"description":"Required for the correct functioning of the energy and water connectors."},"jobs":{"description":"Required for the correct functioning of the energy and water connectors."},"terms":{"description":"Required for the correct managment of CGU."},"apps":{"description":"Required to display the icons of installed applications in the Cozy bar."},"settings":{"description":"Required for the application's consents managment"},"ecolyo-dju":{"description":"Required to gather udd data (Unified Degree Days), a meteorological data allowing the app to adjust our energical consumption model. "},"dacc-dev":{"description":"Required for gathering and sending anonymous usage statistics for test environment."},"dacc":{"description":"Required for sending cozy anonymized stats."},"agent":{"description":"Required for retrieving informations from our partners."},"backoffice-prod":{"description":"Required for retrieving newsletter informations from backoffice prod."},"backoffice-rec":{"description":"Required for retrieving newsletter informations from backoffice rec."},"backoffice-custom-popup":{"description":"Required for retrieving custom alerts."},"backoffice-custom-popup-rec":{"description":"Required for retrieving custom alerts in test environment."},"backoffice-partners-info":{"description":"Required for getting the status of partners' services"},"backoffice-partners-info-rec":{"description":"Required for getting the status of partners' services in test environment."},"backoffice-prices":{"description":"Required for getting fluid prices form backoffice prod"},"backoffice-prices-rec":{"description":"Required for getting fluid prices form backoffice rec."}}}},"langs":["fr"],"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"routes":{"/public":{"folder":"/public","index":"index.html","public":true},"/":{"folder":"/","index":"index.html","public":false}},"services":{"enedisHalfHourMonthlyAnalysis":{"type":"node","file":"services/enedisHalfHourMonthlyAnalysis/ecolyo.js","trigger":"@cron 0 0 8 3 * *"},"monthlyReportNotification":{"type":"node","file":"services/monthlyReportNotification/ecolyo.js","trigger":"@cron 0 0 10 3 * *"},"consumptionAlert":{"type":"node","file":"services/consumptionAlert/ecolyo.js","trigger":"@daily after 11am"},"aggregatorUsageEvents":{"type":"node","file":"services/aggregatorUsageEvents/ecolyo.js","trigger":"@daily before 7am"},"fluidsPrices":{"type":"node","file":"services/fluidsPrices/ecolyo.js","trigger":"@daily before 7am"}},"permissions":{"ecolyo":{"type":"com.grandlyon.ecolyo.*"},"enedis":{"type":"com.grandlyon.enedis.*"},"grdf":{"type":"com.grandlyon.grdf.*"},"egl":{"type":"com.grandlyon.egl.*"},"agent":{"type":"org.ecolyo.agent.*"},"konnectors":{"type":"io.cozy.konnectors"},"accounts":{"type":"io.cozy.accounts"},"triggers":{"type":"io.cozy.triggers"},"jobs":{"type":"io.cozy.jobs"},"terms":{"type":"io.cozy.terms"},"apps":{"type":"io.cozy.apps","verbs":["GET"]},"settings":{"type":"io.cozy.settings","verbs":["GET"]},"ecolyo-dju":{"type":"org.ecolyo.dju_v2","verbs":["GET"]},"dacc":{"type":"cc.cozycloud.dacc_v2","verbs":["ALL"]},"dacc-dev":{"type":"cc.cozycloud.dacc.dev_v2","verbs":["ALL"]},"backoffice-prod":{"type":"org.ecolyo.agent","verbs":["ALL"]},"backoffice-rec":{"type":"org.ecolyo.agent.rec","verbs":["ALL"]},"backoffice-custom-popup":{"type":"org.ecolyo.agent.custom.popup","verbs":["ALL"]},"backoffice-custom-popup-rec":{"type":"org.ecolyo.agent.custom.popup.rec","verbs":["ALL"]},"backoffice-partners-info":{"type":"org.ecolyo.agent.partners.info","verbs":["ALL"]},"backoffice-partners-info-rec":{"type":"org.ecolyo.agent.partners.info.rec","verbs":["ALL"]},"backoffice-prices":{"type":"org.ecolyo.agent.prices","verbs":["ALL"]},"backoffice-prices-rec":{"type":"org.ecolyo.agent.prices.rec","verbs":["ALL"]}}} /***/ }), @@ -6466,32 +6466,6 @@ if (false) {} /***/ }), -/***/ "8seL": -/***/ (function(module, exports, __webpack_require__) { - - -var content = __webpack_require__("Nx9u"); - -if(typeof content === 'string') content = [[module.i, content, '']]; - -var transform; -var insertInto; - - - -var options = {"hmr":true} - -options.transform = transform -options.insertInto = undefined; - -var update = __webpack_require__("HkU0")(content, options); - -if(content.locals) module.exports = content.locals; - -if(false) {} - -/***/ }), - /***/ "8t02": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -11090,7 +11064,7 @@ exports.ECOGESTURE_DOCTYPE = ECOGESTURE_DOCTYPE; /***/ "Hsuv": /***/ (function(module) { -module.exports = JSON.parse("{\"common\":{\"title_app\":\"Ecolyo\",\"title_consumption\":\"Conso\",\"title_challenge\":\"Défis\",\"title_quiz\":\"Quiz\",\"title_exploration\":\"Exploration\",\"title_action\":\"Action\",\"title_duel\":\"Duel final\",\"title_ecogesture\":\"Astuce\",\"title_ecogestures\":\"Astuces\",\"title_ecogestures_choice\":\"Sélection des astuces\",\"title_options\":\"Options\",\"title_analysis\":\"Analyse\",\"title_profiletype\":\"Ajuster mon profil\",\"title_legal_notice\":\"Mentions légales\",\"title_gcu\":\"Conditions générales d’utilisation\",\"title_accessibility\":\"Accessibilité : non conforme\",\"title_sge_connect\":\"Connexion à l'électricité\",\"accessibility\":{\"loading\":\"Chargement\"}},\"navigation\":{\"consumption\":\"Conso\",\"challenges\":\"Défis\",\"ecogestures\":\"Astuces\",\"options\":\"Options\",\"analysis\":\"Analyse\"},\"FLUID\":{\"ELECTRICITY\":{\"NAME\":\"Électricité\",\"LABEL\":\"Électricité\",\"LABEL_PREPOSITION\":\"d'électricité\",\"UNIT\":\"kWh\",\"ADD\":\"Ajouter l'électricité\",\"MEGAUNIT\":\"MWh\",\"provider\":\"Enedis\"},\"WATER\":{\"NAME\":\"Eau\",\"LABEL\":\"Eau\",\"LABEL_PREPOSITION\":\"d'eau\",\"ADD\":\"Ajouter l'eau\",\"UNIT\":\"L\",\"MEGAUNIT\":\"m³\",\"provider\":\"Eau Publique du Grand Lyon\"},\"GAS\":{\"NAME\":\"Gaz\",\"LABEL\":\"Gaz\",\"LABEL_PREPOSITION\":\"de gaz\",\"ADD\":\"Ajouter le gaz\",\"UNIT\":\"kWh\",\"MEGAUNIT\":\"MWh\",\"provider\":\"GRDF\"},\"MULTIFLUID\":{\"NAME\":\"Multi fluide\",\"LABEL\":\"Multi\",\"UNIT\":\"€\"}},\"action\":{\"duration\":\"Durée : %{smartCount} jours\",\"result\":\"Résultat\",\"finished\":\"Défi terminé !\",\"details\":\"Détail de l'astuce\",\"apply\":\"J'applique cette action\",\"other\":\"Je choisis une autre action\",\"resultText1\":\"Cela n'a pas été trop difficile ?\",\"resultText2\":\"Jetez un coup d'œil dans la page conso dans 1 à 3 jours, le temps que vos données arrivent, pour voir l'impact de votre action.\",\"resultText3\":\"Pas de baisse de significative ? Pas de panique, en maintenant cette pratique dans le temps, les économies d'énergies et d'eau seront davantage visibles.\",\"resultText4\":\"Dans tous les cas, bravo, vous remportez...\",\"ok\":\"Ok\"},\"action_modal\":{\"accept\":\"Je relève le défi\",\"refuse\":\"Je me défile\",\"accessibility\":{\"window_title\":\"Fenêtre de confirmation\",\"button_accept\":\"Accepter\",\"button_refuse\":\"Refuser\"}},\"analysis\":{\"viewTitle\":\"Analyse\",\"warning_title\":\"Analyse incomplète\",\"warning_text\":\"Ecolyo n'a pas encore reçu toutes les données %{fluidList} pour ce mois\",\"comparison\":\"Comparatif\",\"analysis_date\":\"Conso totale\",\"challenge\":\"Défis terminés en\",\"user_consumption\":\"Votre conso\",\"average_home\":\"Conso moyenne d'un profil similaire\",\"average_home_description\":\"Le comparatif ici présenté est calculé sur la base d'un profil similaire au vôtre. Il s'agit d'un calcul et non d'une comparaison avec les autres utilisateurs de l'application. Sont pris en compte l'ensemble des informations entrées dans votre profil : mode de chauffage, âge du logement et éventuels travaux de rénovation, etc. Ce modèle a été créé avec l'Agence Locale de l'Energie sur la base de chiffres issues du Schéma Directeur des Energies de la Métropole de Lyon et de Chiffres-clé publiés par l'ADEME (l'Agence de l'Environnement et de la Maîtrise de l'Energie).\",\"approximative_description\":\"Pour comparer votre consommation avec un foyer similaire ou avec une conso idéale, veuillez détailler votre profil\",\"no_data\":\"Pas de données\",\"accessibility\":{\"button_go_to_profil\":\"Détailler mon profil\"},\"max_day\":\"Jour où vous avez le plus consommé\",\"compare\":{\"title\":\"Comparateur\",\"month_tab\":\"Comparer au mois dernier\",\"year_tab\":\"Comparer à l'année dernière\"}},\"analysis_error_modal\":{\"title\":\"Aucune analyse\",\"message\":\"Pour profiter d’une analyse de vos consommations, connectez au moins un de vos compteurs.\",\"go_to_conso\":\"Je connecte mes compteurs\",\"understood\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_understood\":\"J'ai compris\",\"button_goto_konnector\":\"Aller aux connecteurs\"}},\"analysis_pie\":{\"total\":\"Conso totale\",\"month\":\"Au mois \",\"estimation\":\"Comment sont estimés<br>les prix ?\"},\"special_elec\":{\"title\":\"Spécial Électricité\",\"average\":\"Conso moyenne\",\"weektype\":\"un jour de \",\"week\":\"semaine\",\"weekend\":\"week-end\",\"min\":\"Conso minimum\",\"percentage\":\"Part dans la facture\",\"price\":\"Soit\",\"maxPower\":\"Puissance maximum atteinte\",\"showModal\":\"Plus d'infos\"},\"elec_info_modal\":{\"accessibility\":{\"window_title\":\"electricity-info-modal\",\"button_close\":\"close-modal\"},\"title1\":\"Qu’est-ce que la consommation minimum ?\",\"title2\":\"Qu’est-ce que la puissance maximum ?\",\"text1\":\"Elle correspond à votre plus petite consommation du mois sur un créneau d'une demi-heure.\",\"text2\":\"Nous extrapolons cette consommation sur 1 mois afin vous donner un aperçu de la consommation de vos consommations électriques en veille (box, télé, chargeurs, ...) ou encore de celle, incompressible, de vos appareils de froid (frigo, congélateur).\",\"text3\":\"C’est la puissance maximum délivrée par tous les appareils fonctionnant au même moment dans votre logement.\",\"text4\":\"Vous avez choisi une puissance maximum dans votre offre d’électricité (3, 6 ou 9 kVA...) que vous ne devez pas dépasser pour ne pas faire sauter votre compteur. \",\"text5\":\"Cette puissance varie d'un mois à l'autre, regardez cette valeur sur l'ensemble de l'année pour vérifier si votre puissance souscrite correspond bien à votre usage.\"},\"auth\":{\"enedissgegrandlyon\":{\"title\":\"Ecolyo doit se connecter à l’électricité\",\"bill\":\"Munissez-vous d’une <span>facture d’électricité</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'électricité\",\"accessibility\":{\"connect\":\"Se connecter\"},\"identityTitle\":\"Nom inscrit sur la facture\",\"firstName\":\"Prénom\",\"lastName\":\"Nom\",\"pdlTitle\":\"Numéro de votre compteur électrique (PDL)\",\"pdlLabel\":\"N° (14 chiffres)\",\"pdlHint\":\"Où trouver le n° de PDL ?\",\"pdlModal\":{\"txt1\":\"Où trouver le n° de PDL ou PRM ?\",\"txt2\":\"Le numéro de PDL ou PRM se compose de 14 chiffres.\",\"txt3\":\"Votre numéro de PDL ou PRM se trouve sur votre facture d’électricité.\",\"txt4\":\"Si vous avez un compteur Linky, appuyez sur le bouton “+” et faites défiler l’affichage jusqu’à obtenir l’affichage suivant :\"},\"addressTitle\":\"Adresse du titulaire\",\"address\":\"Numéro et voie\",\"zipCode\":\"Code postal\",\"city\":\"Ville\",\"headConsent\":\"En acceptant de partager vos données, celles-ci seront directement transférées à Ecolyo à l’intérieur de votre cloud personnel, sans que la Métropole n’y accède ni ne les visualise.\",\"textConsent\":\"Afin de vous offrir des fonctionnalités de visualisation et d'analyse, Ecolyo a besoin des données suivantes : \",\"consentLi1\":\"L'historique et le relevé de vos consommations quotidiennes en kWh\",\"consentLi2\":\"L'historique et le relevé de vos consommations au pas de temps 30 minutes\",\"consentLi3\":\"Les puissances maximales atteintes quotidiennement\",\"consentLi4\":\"Les données contractuelles (début de contrat et puissance souscrite)\",\"consentCheck1\":\"Je consens à partager les données personnelles ci-dessus pour une durée d'<span>un an</span>\",\"consentCheck2\":\"J’atteste être le titulaire du point de livraison (PDL) renseigné à l’étape précédente\",\"modalHint\":{\"accessibility\":\"Titre de la modale\",\"title\":\"Où trouver le n° de PDL ?\",\"button\":\"J'ai compris\",\"button-accessibility\":\"Bouton valider\"}},\"grdfgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture de gaz</span> pour valider la connexion\",\"connect\":\"Je me connecte au gaz\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"label\":\"Je donne mon accord via mon compte GRDF\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter au gaz\"},\"with_account\":{\"title\":\"Votre compte GRDF a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur de gaz et Ecolyo !\"},\"step1\":{\"info1\":\"Un <span>compte chez GRDF</span> est nécessaire pour vous connecter au gaz <span>quelque soit votre fournisseur de gaz</span>.\",\"info2\":\"<p>GRDF est le gestionnaire de réseau. C'est lui qui est responsable de votre compteur Gazpar et de la collecte des données de consommation.</p>\",\"info3\":\"Possédez-vous un <span>compte GRDF</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"step3\":{\"info1\":\"La visualisation de vos données sur Ecolyo demande l'activation du <span>partage de toutes les données.</span>\",\"info2\":\"Pour une expérience optimale, <span>une période de consentement de 1 an</span> est recommandée à partir d’aujourd’hui.\",\"info3\":\"<p>Veillez également à indiquer une date antérieure pour l'historique (1er calendrier) afin de pouvoir récupérer jusqu'à 3 ans d'historique.</p>\"},\"button_go_to_partner_site\":\"Aller sur GRDF\"},\"eglgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture d'eau</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'eau\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"login\":\"Identifiant (7 chiffres)\",\"password\":\"Mot de passe\",\"label\":\"Je connecte Ecolyo à mon compte Eau Publique du Grand Lyon\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter à l'eau\"},\"with_account\":{\"title\":\"Votre compte Eau Publique du Grand Lyon a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur d'eau et Ecolyo !\"},\"step1\":{\"info1\":\"La connexion se fait via <span>votre compte Eau Publique du Grand Lyon</span>.\",\"info2\":\"Possédez-vous un <span>compte Eau Publique du Grand Lyon</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"button_go_to_partner_site\":\"Aller sur EPGL\"},\"connect_oauth\":{\"loading\":\"Chargement...\"},\"accessibility\":{\"button_reveal_password\":\"Afficher le mot de passe\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"window_title\":\"Fenêtre d'information sur la création de compte.\",\"button_close\":\"Fermer la fenêtre.\"},\"button_previous\":\"Précédent\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"button_has_account\":\"J'ai déjà un compte\",\"button_validate\":\"J'ai compris\",\"button_showOfflineData\":\"Voir mes anciennes données\",\"warningOfflineData\":\"Attention, vous visualisez d’anciennes données. Pour actualiser vos données, connectez votre compteur\"},\"challenge\":{\"card\":{\"ongoing\":{\"quiz\":\"Quiz\",\"exploration\":\"Explorations\",\"action\":\"Actions\",\"duel\":\"Duel Final\",\"result\":\"Résultat\",\"duelDone\":\"du duel final\"},\"locked\":{\"desc\":\"À débloquer en terminant le défi précédent\"}},\"card_done\":{\"saving\":\"Économie de\",\"depense\":\"Dépense de\",\"win\":\"Gagné\",\"lost\":\"Perdu\",\"final_defi\":\"sur le duel final\",\"final_defi_view\":\"Revoir le duel final\",\"reset_defi\":\"Relancer le défi\"},\"card_last\":{\"title\":\"Tous les défis sont terminés\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"button\":\"Suggérer une idée de défi\"},\"card_unlocked\":{\"button_launch\":\"Lancer le défi\"},\"accessibility\":{\"button_launch\":\"Lancer le défi\",\"button_goto_konnector\":\"Aller aux connecteurs\",\"button_slider_previous\":\"Précédent\",\"button_slider_next\":\"Suivant\"}},\"challenge_no_fluid_modal\":{\"title\":\"Oups !\",\"content\":\"Connectez au moins 1 fluide pour pouvoir jouer\",\"button_validate\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Valider\"}},\"consumption\":{\"display_last_data\":\"Voir mes dernières consos\",\"accessibility\":{\"button_previous_period\":\"Afficher la période précédente\",\"button_next_period\":\"Afficher la période suivante\",\"button_previous_value\":\"Sélectionner la valeur précédente\",\"button_next_value\":\"Sélectionner la valeur suivante\",\"checkbox_compare\":\"Afficher ou cacher la comparaison\"},\"partner_issue_modal\":{\"title\":\"Attention !\",\"error_connect_gaz\":\"La connexion à vos données de <span class='gaz'>gaz</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='gaz'>GRDF</span> ou dans notre service)\",\"error_connect_elec\":\"La connexion à vos données d'<span class='elec'>électricité</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='elec'>Enedis</span> ou dans notre service)\",\"error_connect_water\":\"La connexion à vos données d'<span class='water'>eau</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='water'>Eau Publique du Grand Lyon</span> ou dans notre service)\",\"additional_text\":\"La visualisation et/ou la connexion à vos données de consommation peut s'en trouver affectée.<br /><br /><i>Merci pour votre patience en attendant un retour à la normale :)</i>\",\"ok\":\"Ok\"},\"compared\":\"Comparé\"},\"consumption_details\":{\"detail\":\"Détail par fluide\",\"connect\":\"Connecter d'autres fluides\",\"mini_cards_label\":\"AUTRES ENERGIES\"},\"consumption_visualizer\":{\"missing_data\":\"Données manquantes\",\"no_data\":\"Pas de données\",\"why_no_data\":\"Pourquoi n'ai-je pas de données ?\",\"last_valid_data\":\"Dernières données valides : %{date}\",\"last_available_data\":\"Dernières données disponibles : %{date}\",\"last_valid_data_multi\":\"Dernières données complètes : %{date}\",\"data_to_come\":\"À venir\",\"aie\":\"Aïe !\",\"data_empty\":\"Vide\",\"estimated\":\"estimés\",\"dataModal\":{\"list_title\":\"3 raisons possibles :\",\"item1\":\"le lien entre Ecolyo et le fournisseur de données est rompu : une mise à jour de ce lien (en bas de la page) peut résoudre ce problème.\",\"item2\":\"un problème technique chez votre gestionnaire : se connecter directement chez ce gestionnaire pour vérifier que cette donnée apparaît.\",\"item3\":\"pour le gaz : vous n'avez pas autorisé Ecolyo à accéder aux données de consommation de cette période.\",\"item4\":\"vous n'aviez tout simplement pas de compteur communicant à l'époque !\"},\"modal\":{\"window_title\":\"info estimation des prix\",\"title\":\"Comment sont estimés les prix ?\",\"close\":\"Fermer la fenêtre\",\"part1\":\"Le prix de votre électricité ou de votre gaz dépend de l'offre choisie auprès de votre fournisseur. N’ayant pas accès à cette information, Ecolyo affiche un prix moyen par fluide. \",\"part2\":\"Tarifs moyens retenus :\",\"list1\":\" : 1 kWh = %{elecPrice} €TTC (il correspond au tarif réglementé d’EDF au %{elecPriceStartDate} pour une puissance souscrite de 3 ou 6 kVA et hors offre heure pleine/heure creuse)\",\"list2\":\" : 1 kWh = %{gasPrice} €TTC (tarif réglementé de vente au %{gasPriceStartDate} pour un consommateur soutirant moins de 6 MWh par an)\",\"list3\":\" : 1 litre d’eau = %{waterPrice} € TTC (prix constaté au %{waterPriceStartDate} pour un abonnement et une consommation de 120 m3/an sur la Métropole de Lyon)\",\"part3\":\"Le coût de votre abonnement n'est pas pris en compte dans Ecolyo.\"},\"release_notes_modal\":{\"title\":\"Du nouveau sur Ecolyo !\",\"message\":\"Les mises à jour suivantes ont été effectuées sur votre application :\",\"go_back\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre de notifications\",\"button_go_back\":\"J'ai compris\"}}},\"ecogestures\":{\"loading\":\"Chargement des astuces\"},\"duel\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"average_info\":\"%{average} euros étant votre moyenne actuelle, relevez-vous le défi ?\",\"button_start\":\"Allons-y !\",\"goal1\":\"Faites moins que votre moyenne actuelle sur %{durationInDays} jours\",\"goal2\":\"pour gagner le badge %{title}\",\"goal_done\":\"Duel remporté\",\"goal_failed\":\"Duel perdu\",\"caption_average\":\"Votre moyenne à titre indicatif\",\"caption_consumption\":\"Votre consommation\",\"caption_incoming\":\"Données à venir\",\"accessibility\":{\"button_go_back\":\"Retour\",\"button_start_duel\":\"Lancer le duel\",\"button_start_quiz\":\"Lancer le quiz\"}},\"duel_result_modal\":{\"success\":{\"title\":\"Félicitations\",\"message1\":\"Vous avez économisé %{value} €\",\"message2\":\"et gagné le badge %{title} !\",\"button_validate\":\"Youpi\"},\"lost\":{\"title\":\"Presque\",\"message1\":\"Vous avez dépassé de %{value} €\",\"message2\":\"et manqué le badge %{title}\",\"button_validate\":\"Zut alors\"},\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_validate\":\"Valider\"}},\"last_duel_modal\":{\"title\":\"Félicitations !\",\"subtitle\":\"Vous avez terminé tous les défis !\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"message2\":\"Vous pouvez donner votre avis sur ce que vous aimeriez en cliquant sur la bulle d'aide.\"},\"duel_empty_value_modal\":{\"title\":\"Oups !\",\"message\":\"Impossible de lancer le duel. Il nous manque en effet certaines de vos données de consommation pour vous proposer un duel à votre hauteur.\",\"button\":\"Je retourne au menu des défis\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Retourner au menu des défis\"}},\"ecogesture\":{\"title_tab_0\":\"Objectifs\",\"title_tab_1\":\"Je fais déjà\",\"title_tab_2\":\"Toutes\",\"MENU_TITLE\":\"Filtrer\",\"ALL\":\"Tous les usages\",\"HEATING\":\"Chauffage\",\"AIR_CONDITIONING\":\"Climatisation\",\"ECS\":\"Eau chaude\",\"COLD_WATER\":\"Eau froide\",\"ELECTRICITY_SPECIFIC\":\"Électricité courante\",\"COOKING\":\"Cuisson\",\"selection\":\"Sélectionner les astuces les plus adaptées à votre consommation\",\"selection_2\":\"vues sur\",\"button_selection\":\"Continuer ma sélection\",\"no_ecogesture\":\"Aucune astuce ne correspond à votre filtrage\",\"no_ecogesture_filter\":{\"text1\":\"Nous n'avons pas trouvé d'astuces adaptées à votre profil dans cette catégorie.\",\"text2\":\"En effet, de par votre profil et vos modes de chauffage, d'eau ou d'eau chaude sanitaire, nous n'avons pas identifié d’astuces vous permettant de diminuer vos factures à titre individuel. Toutefois, vous pouvez toujours agir pour préserver les ressources en appliquant et diffusant autour de vous les autres bonnes pratiques présentées dans la partie \\\"Toutes les astuces\\\".\"},\"adjust_profil\":{\"description\":\"Pour une sélection d’astuces adaptée à votre consommation, vous pouvez ajuster votre profil.\",\"button_go_to_profil\":\"Ajuster mon profil\"},\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_selection\":\"Aller à la page de sélection\"},\"doing\":\"Je fais déjà\",\"objective\":\"Objectif\",\"emptyList\":{\"obj1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes.\",\"obj1_done\":\"Aucune astuce n’a été sélectionnée comme objectif actuellement.\",\"obj2\":\"Vous pouvez sélectionner ceux à mettre en objectifs et ceux que vous appliquez déjà.\",\"obj2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous souhaitez garder en objectif dans cette section.\",\"doing1\":\"Aucune astuce n’a été sélectionnée dans la catégorie appliquée actuellement.\",\"doing1_done\":\"Aucune astuce n’est indiquée comme déjà appliquée actuellement.\",\"doing2\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"doing2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"btn1\":\"Voir toutes les astuces\",\"btn2\":\"Sélectionner\"},\"initModal\":{\"title\":\"Sélectionner mes astuces\",\"text1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes \",\"text2\":\"Vous pouvez sélectionner celles à mettre en objectifs et celles que vous appliquez déjà.\",\"text3\":\"Afin de pré-sélectionner les astuces correspondant à votre consommation, merci de répondre à quelques rapides questions.\",\"btn1\":\"Plus tard\",\"btn2\":\"C'est parti !\"},\"reinit\":\"Réinitialiser ma sélection\",\"reinitModal\":{\"title_part1\":\"Cette action\",\"title_part2\":\"supprimera votre liste d’astuces\",\"title_part3\":\"sélectionnées dans\",\"title_part4\":\"“Objectifs”\",\"title_part5\":\"et\",\"title_part6\":\"“Je fais déjà”\",\"text1\":\"Vous pourrez ensuite faire une nouvelle sélection adaptée à votre consommation.\",\"text2\":\"Souhaitez-vous réinitialiser votre sélection d’astuces ?\",\"btn1\":\"Non\",\"btn2\":\"Réinitialiser\"}},\"ecogesture_modal\":{\"title_ecogesture\":\"Astuce\",\"title_action\":\"Action\",\"efficiency\":\"Efficacité\",\"show_less\":\"Voir moins\",\"show_more\":\"Voir plus\",\"select_action\":\"Je choisis cette action\",\"accessibility\":{\"window_title_ecogesture\":\"Fenêtre astuce\",\"window_title_action\":\"Fenêtre action\",\"button_close\":\"Fermer la fenêtre\",\"button_select_action\":\"Sélectionner cette action\",\"button_see_more_detail\":\"Afficher plus de détails\"}},\"ecogesture_info_modal\":{\"header\":\"Comment sont choisis les astuces adaptées à mon profil ?\",\"text\":\"Les astuces adaptés à votre profil sont aujourd’hui choisies en fonction des compteurs individuels que vous possédez (communicants ou non). Ceux présentés ici vous permettent d'agir sur vos consommations individuelles. Des modes de tri plus personnalisables seront proposés à l'avenir.\",\"button_close\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'information\",\"button_close\":\"Fermer la fenêtre\"}},\"ecogesture_form\":{\"heating_type\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"}},\"ecogesture_profile\":{\"equipments\":{\"question\":\"Quels équipements possédez-vous ?\",\"hint\":\"Plusieurs réponses possibles\",\"air_conditioning\":\"Climatisation\",\"computer\":\"Ordinateur\",\"microwave\":\"Micro-ondes\",\"oven\":\"Four\",\"washing_machine\":\"Lave-linge\",\"dishwasher\":\"Lave-vaisselle\",\"cooking_plates\":\"Plaques électriques\",\"garden\":\"Jardin\",\"dryer\":\"Sèche-linge\",\"refregirator\":\"Réfrigérateur\",\"fan\":\"Ventilateur\",\"water_heater\":\"Chauffe-eau\",\"curtain\":\"Rideaux\",\"internet_box\":\"Box internet\",\"ventilation\":\"VMC\",\"freezer\":\"Congélateur\",\"boiler\":\"Chaudière\",\"hydraulic_heating\":\"Chauffage hydraulique\",\"accessible_label\":\"Sélection d'équipement\"}},\"ecogesture_selection\":{\"header\":\"Sélection des astuces\",\"title\":\"Vous avez parcouru un groupe de %{smartCount} astuces\",\"text\":\"Voulez-vous continuer sur votre lancée ou remettre cette sélection à plus tard ?\",\"title_final\":\"Félicitations !\",\"text_final_1\":\"Vous avez terminé la sélection des astuces adaptées à votre consommation.\",\"text_final_2\":\"Vous pouvez les retrouver dans les sections “Objectifs” et “Je fais déjà” selon que vous les pratiquiez déjà ou non.\",\"button_go_to_ecogesture\":\"Plus tard\",\"button_ok\":\"J'ai compris\",\"button_continue\":\"Poursuivre\",\"button_objective\":\"Objectif\",\"button_doing\":\"Je fais déjà\",\"button_skip\":\"Pas intéressé\",\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_go_to_ecogesture\":\"Retourner aux astuces\",\"button_continue\":\"Poursuivre\",\"button_ok\":\"Fermer la sélection\"},\"selectionModal\":{\"title\":\"Des astuces correspondant à votre profil ont été trouvées !\",\"text\":\"À vous de choisir celles que vous souhaitez mettre en objectif et celles que vous faites déjà.\",\"button_close\":\"C'est parti !\"}},\"exploration\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"button_already_done\":\"C’est déjà fait !\",\"button_come_back\":\"Je reviens quand cela sera fait\",\"button_start\":\"C'est parti !\",\"watch_consumption\":\"Je fonce\",\"congratulation\":\"Bravo !\",\"earn\":\"Vous remportez\",\"button_confirm\":\"Ok\",\"interval\":{\"explanation\":\"Vous pouvez vérifier cette informations sur l'écran Conso.\"},\"accessibility\":{\"button_already_done\":\"Marquer l'exploration comme déjà réalisée\",\"button_confirm\":\"Valider\",\"button_come_back\":\"Fermer l'exploration\",\"button_go_back\":\"Retour\",\"button_start\":\"Lancer l'exploration\"}},\"error_page\":{\"main\":\"Erreur\",\"back\":\"Retour\",\"no_ecogesture\":\"Oups ! Nous n'avons pas trouvé l'astuce demandée.\"},\"help\":{\"title_help\":\"une question ? un problème ? une suggestion ?\",\"read_help\":\"Nous écrire via le Service d'Assistance Utilisateur\"},\"feedback\":{\"title\":\"Vous allez contacter le Service Assistance Utilisateur du Grand Lyon.\",\"text1\":\"Vous pourrez nous remonter un problème, chercher de l'aide pour vous connecter plus facilement, ou encore nous partager une bonne idée d'évolution.\",\"text2\":\"N'hésitez pas à nous écrire ! L'équipe Ecolyo vous répondra avec plaisir :)\",\"later\":\"Plus tard\",\"lets_go\":\"J'y vais\",\"accessibility\":{\"window_title\":\"Fenêtre de partage de retours\",\"button_close\":\"Fermer la fenêtre de partage de retours\"}},\"dataShare\":{\"title1\":\"Bienvenue !\",\"title1Update\":\"Ecolyo évolue !\",\"title2Update\":\"Pour continuer à utiliser Ecolyo, merci d’accepter les modalités de traitement des données ci-dessous.\",\"part1\":\"Nous avons besoin de l’adresse email utilisée lors de la création de votre Cozy Métropole de Lyon, ci-après nommé cloud personnel.\",\"part2\":\"Cette donnée de compte est conservée dans Ecolyo le temps de l’utilisation de ce service.\",\"part3\":\"La Métropole de Lyon utilisera cet email afin de vous tenir informé·e :\",\"item1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter.\",\"item2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"item3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part4\":\"Vos données privées de consommation d’énergie et d’eau sont récupérées, sauvegardées et stockées dans votre cloud personnel à votre initiative sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part5\":\"Il en est de même pour les données privées de composition du logement et du foyer, fournies par vos soins. Elles restent également sans visibilité de la Métropole de Lyon sur leur contenu.\\nLes données d’identification entrées lors de la connexion aux données de consommations d’électricité sont quant à elles conservées dans un espace sécurisé de la Métropole de Lyon et sont utilisées uniquement à des fins de contrôle du consentement par des organismes extérieurs.\",\"part6\":\"Dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées et pseudonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation, d’évaluer globalement l’usage de l’application via des mesures d’audience ainsi que d’évaluer à terme l’impact global en termes de baisse des consommations énergétiques de notre service.\",\"part7\":\"Au sein de votre cloud personnel, vous pouvez à tout moment exercer vos droits d’accès, de rectification, de portabilité, de limitation et d’opposition en consultant notamment la page Options.\",\"part8\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part9\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 \",\"part10\":\"ou en ligne, au moyen du formulaire disponible à l'adresse suivante : \",\"link1\":\"<a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/</a>\",\"validDataConsent\":\"Je consens au traitement de mes données tel que décrit ci-dessus.\",\"validCGU\":\"Je valide les \",\"validCGU_button\":\"Conditions Générales d’Utilisation\",\"validLegal\":\" du service et ai pris connaissance des \",\"validLegal_button\":\"Mentions Légales\",\"validLegal2\":\"de celui-ci.\",\"button_accept\":\"C'est parti !\",\"accessibility\":{\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"minorUpdate\":{\"title\":\"Ecolyo évolue !\",\"button\":\"J'ai compris\"},\"gcu\":{\"title\":\"Conditions générales d’utilisation du service\",\"version\":\"Version du 12.12.2022\",\"content\":{\"title1\":\"Ecolyo, késako ?\",\"part1_1\":\"Ecolyo est un service proposé par la Métropole de Lyon vous permettant de suivre au même endroit vos consommations d’électricité, de gaz et d’eau, en kWh, en litres, en euros et à différentes échelles de temps. Ce service vous permet également de participer à des défis individuels et vous offre une analyse de vos consommations. Des astuces vous sont aussi proposées afin de vous permettre de réduire vos consommations.\",\"part1_2\":\"C’est un service gratuit qui prend la forme d’un site web dit « responsive », c’est-à-dire qu’il peut être consulté sur ordinateur ou sur mobile. Sur mobile, c’est une application que l’on a souhaitée ergonomique, réactive et esthétique pour votre plaisir de navigation et d’utilisation au quotidien.\",\"part1_3\":\"Tous les termes « techniques » sont définis en bas de page.\",\"title2\":\"Quelles fonctionnalités le service propose-t-il ?\",\"part2_1\":\"La fonctionnalité principale d’Ecolyo est la visualisation, au même endroit, de vos consommations d’électricité, de gaz et d’eau et ce, à différents pas de temps (de la demi-heure – uniquement pour l’électricité, à plusieurs années, en passant par les pas de temps journaliers et mensuels). La visualisation des consommations se fait en kWh pour l’énergie et en L pour l’eau ainsi qu’en euros (euros résultant d’un prix moyenné).\",\"part2_2\":\"Au-delà de la visualisation de vos consommations et parce que nous souhaitons vous aider à diminuer ces consommations vous retrouverez plusieurs autres pages : \",\"part2_2_list1\":\"Défis : Des quiz, et actions à mettre en place vous seront proposés pour vous pousser à réduire vos consommations.\",\"part2_2_list2\":\"Astuces : Une liste d’astuces pour maîtriser ses consommations d’énergie et d’eau à trier par usage, et avec une possibilité de les adapter plus précisément à votre profil.\",\"part2_2_list3\":\"Analyse : Une analyse de vos consommations réelles en comparaison à celle d’un foyer étant proche d’une vôtre.\",\"part2_3\":\"Pour la page Analyse ainsi que pour la partie personnalisation des astuces, des éléments supplémentaires sur votre profil vous seront demandés. L’ensemble de ces informations récoltées à l’aide du formulaire peuvent être modifiées par la suite.\",\"part2_4\":\"Dernière page : la page Options dans laquelle vous pourrez vous abonner à un service d’alerte sur vos consommations d’eau, de quoi ajuster votre profil ou encore vous désabonner de la lettre mensuelle.\",\"title3\":\"Comment ai-je accès à mes données d’électricité, de gaz et d’eau ?\",\"part3_1\":\"Pour visualiser vos consommations réelles et profiter pleinement du potentiel de notre service, il vous faut au minimum un des trois compteurs communicants suivants : Linky (pour l’électricité), Gazpar (pour le gaz), Téléo (pour l’eau).\",\"part3_2\":\"Ces compteurs sont opérés par les gestionnaires de réseaux. Pour Linky, c’est Enedis, le gestionnaire de réseau de distribution d’électricité. Pour Gazpar, GRDF est responsable de cette gestion. Et pour Téléo, c’est Eau Publique du Grand Lyon.\",\"part3_3\":\"Ces acteurs sont responsables de la relève de vos données. Ces données servent notamment à votre fournisseur d’électricité, de gaz ou d’eau pour permettre la facturation de vos consommations d’énergie. Des fournisseurs d’électricité ou de gaz il y en a des dizaines. Les gestionnaires de réseaux (… et de votre compteur) ne sont qu’au nombre de trois. Nous avons donc décidé de travailler avec eux, au plus près de la donnée brute issue de vos compteurs.\",\"part3_4\":\"Il vous faudra donc avoir un compte chez GRDF et Eau Publique du Grand Lyon pour accéder à vos données. Si vous n’en avez pas, il suffira de vous en créer un. Ceci ne sera à faire qu’une fois, au début.\",\"title4\":\"Ecolyo se trouve dans un cloud personnel Métropole de Lyon, qu’est-ce que cela signifie ?\",\"part4_1\":\"Comme vous avez dû le remarquer, lors de votre première connexion à Ecolyo vous avez dû vous créer un compte Cozy Métropole de Lyon. Ce cloud personnel est un espace sécurisé porté par l’ambition de vous apporter visibilité, transparence et maîtrise sur l’usage de vos données personnelles, et dont les fonctionnalités vous permettant de récupérer, synchroniser, stocker et partager vos données avec les destinataires de votre choix. Le service Ecolyo se déploie à l’intérieur de cet espace protégé. Dans ce cloud personnel, vous pourrez accéder également à d’autres services. Toutes les données traitées par Ecolyo, mais aussi les autres services que vous seriez amenés à utiliser dans ce cloud personnel restent dans ce Cloud Personnel Grand Lyon et n’en sortent pas, sauf si vous décidez vous-même de partager vos données avec des tiers.\",\"part4_2\":\"Pour en savoir plus sur ce cloud et son utilisation, ainsi que la durée de conservation de vos données, vous pouvez lire les conditions générales d’utilisation du service <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">ici</a>.\",\"title5\":\"Et donc concrètement pour Ecolyo, quelles données sont collectées et qui y a accès ?\",\"part5_1\":\"Pour qu’Ecolyo ait accès à vos données de consommations, vous devrez activer vos différents connecteurs. À ce moment-là, pour la connexion aux données de gaz et d’eau à travers un parcours qui vous conduira de manière intuitive sur le site de chacun des gestionnaires de réseaux concerné, vous pourrez donner votre consentement à partager ces données avec le Service Ecolyo, et ce pour une durée limitée dans le temps. Pour l’électricité, le don du consentement et la connexion aux données se fait directement dans notre service. Quid de la durée de ce consentement ? Pour les données électriques, elle est par défaut d'un an. Pour les données gaz, cela sera à vous de la définir (nous vous recommandons 1 an pour une expérience optimale). Les données utilisées pour vérifier la bonne connexion de vos données d’électricité sont stockées du côté de la Métropole de Lyon sur des serveurs sécurisés.\",\"part5_2\":\"Vos connecteurs, une fois configurés, permettent le transfert de vos données de consommations au service Ecolyo. Le transfert de ces données de consommation se fait sans que personne n’accède à leur contenu, pas même la Métropole de Lyon. En effet, ces données sont stockées et traitées directement dans votre cloud personnel qui en assure la protection. Tous les calculs, analyses et traitements sur ces données sont faites DANS votre espace personnel sans visibilité sur le contenu des données par la Métropole de Lyon.\",\"part5_3\":\"Vous pouvez bien sûr mettre fin à la récupération/ au transfert de vos données de consommation sur votre espace cloud personnel à tout moment et à plusieurs niveaux : \",\"part5_3_list1\":\"Vous pouvez supprimer le transfert quotidien de vos données en supprimant tout simplement le connecteur dans la page Consos (en bas).\",\"part5_3_list2\":\"Pour supprimer l’ensemble de vos données ainsi que votre cloud personnel Métropole de Lyon, vous devez demander la suppression de votre cloud. Pour faire cela, rendez-vous dans les paramètres de votre cloud personnel via la barre blanche en haut d’Ecolyo et appuyez sur le bouton « Supprimer mon compte » dans la partie paramètres.\",\"part5_4\":\"Des données sur le profil de votre foyer peuvent être également remplies au sein de l’application. Ces données s’enrichiront au fur et à mesure de votre utilisation du service avec d’autres informations : défis réalisés, étoiles gagnées, etc. L’ensemble de ces données restent à l’intérieur de votre cloud personnel, sans que personne n’y ait accès.\",\"part5_5\":\"Enfin, afin de permettre une mise à jour quotidienne de vos données de consommations, vos identifiants Eau Publique du Grand Lyon, un jeton d’identification GRDF ainsi que vos numéros de compteurs sont stockés.\",\"title6\":\"Personne n’a donc accès à mes données, pas même la Métropole de Lyon, vraiment ?\",\"part6_1\":\"Conformément aux indications du paragraphe précédent, la Métropole de Lyon n’accède ni à vos données de consommations ni aux données utilisées via certaines fonctionnalités du service comme le formulaire (celui-là même qui permet l’analyse de vos consommations personnalisée ainsi qu’une sélection d’éco-gestes personnalisés). Toutes ces informations sont bien gardées au chaud dans votre cloud personnel Métropole de Lyon\",\"part6_2\":\"Seul vous pouvez accepter de partager vos données, documents ou fichiers privés avec la Métropole de Lyon, ses partenaires ou d’autres utilisateurs ou acteurs (publics ou privés) après recueil de votre consentement éclairé et par une action expresse de votre part.\",\"part6_3\":\"La Métropole de Lyon n'a cependant accès qu’à l’adresse email utilisée lors la création de votre cloud personnel Métropole de Lyon. Elle utilise cet email afin de vous tenir informé·e :\",\"part6_3_list1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter. \",\"part6_3_list2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"part6_3_list3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part6_4\":\"Elle stocke également les informations transmises lors de la connexion à l’électricité (nom, adresse postale). Ces informations doivent être stockées car la Métropole de Lyon est régulièrement contrôlée par Enedis et doit prouver détenir le consentement des personnes pour lesquelles elle va chercher la donnée.\",\"part6_5\":\"Par ailleurs, et dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques anonymisées nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation ainsi que d’évaluer l’impact global en termes de baisse des consommations énergétiques de notre service. Parmi ces statistiques, des mesures d’audience de la fréquentation des différentes pages du service sont réalisées. Vous pouvez, via la page Options, à tout instant, décider de vous opposer à la récupération de ces données d’utilisation.\",\"title8\":\"Encore des questions ?\",\"part8_1\":\"N’hésitez pas à consulter la FAQ ou à nous contacter via le formulaire de contact présente sur l’ensemble des pages.\",\"part8_2\":\"Dernière option, contactez-nous directement à <a href=\\\"mailto:ecolyo@grandlyon.com\\\">ecolyo(at)grandlyon.com</a>.\",\"title9\":\"LEXIQUE\",\"part9_1_title\":\"Cloud personnel Métropole de Lyon : \",\"part9_1_content\":\"Cloud personnel : appelé aussi le « domicile numérique », le cloud personnel est souvent réduit à un simple espace de stockage de documents mais il est bien plus que ça. C'est un espace individuel et sécurisé où vous pouvez accéder à des services sans exposer aucune donnée à l’extérieur. Vous seul pouvez y accéder, personne d'autre.\",\"part9_2_title\":\"Connecteur : \",\"part9_2_content\":\"Un connecteur est un service, installé dans votre cloud personnel également, qui a pour but uniquement d’aller récupérer les données auprès de différents partenaires/sources de données. Dans le cadre d’Ecolyo, trois connecteurs sont pré-installés dans votre cloud personnel : celui d’Enedis, celui de GRDF et celui d’Eau Publique du Grand Lyon.\",\"part9_3_title\":\"Compteur communicant : \",\"part9_3_content\":\"Un compteur communicant est un compteur qui mesure de manière précise et détaillée vos consommations et peut transmettre ces données au gestionnaire de réseau via une technologie radio (c'est le cas pour Gazpar et Téléo par exemple) ou via les réseaux électriques (via Courant Porteur en ligne, c'est le cas pour Linky par exemple).\",\"part9_4_title\":\"Fournisseur : \",\"part9_4_content\":\"Votre fournisseur d’électricité, de gaz ou d’eau est l’entreprise qui vous facture votre électricité, gaz ou eau. Côté électricité il en existe <a href=\\\"https://www.enedis.fr/liste-des-fournisseurs-delectricite\\\">aujourd’hui plus de 50</a>, chacun proposant des tarifs différents.\",\"part9_5_title\":\"Gestionnaire de réseau de distribution : \",\"part9_5_content\":\"Appelé aussi parfois distributeur, il est en charge de la livraison de votre électricité, gaz ou eau jusqu’à votre domicile. Il est aussi en charge du compteur qui relève vos consommations. Il transmet vos données de consommations à votre fournisseur afin qu’il effectue la facturation de vos consommations d’énergie. Il peut également les transmettre à tout acteur avec qui vous avez décidé de partager ces données.\"}},\"gcu_modal\":{\"button_accept\":\"J'accepte\",\"accessibility\":{\"window_title\":\"Conditions générales d’utilisation\",\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"matomo\":{\"matomo_title\":\"Suivi statistiques d'usage Matomo\"},\"header\":{\"accessibility\":{\"button_back\":\"Retour à la page précédente\",\"button_open_feedbacks\":\"Ouvrir le partage de retours\"}},\"konnector_form\":{\"label_updated_at\":\"Dernière mise-à-jour le\",\"button_update\":\"Mettre à jour\",\"loading\":\"Chargement...\",\"wait_end_issue\":\"Attendre la fin de la maintenance avant de mettre à jour.\",\"button_disconnect\":\"Déconnecter\",\"issue\":\"Le problème semble venir de \",\"resolve\":\"Une mise à jour peut résoudre ce problème.\",\"login_failed\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"not_installed\":\"Le connecteur n'est pas installé. Veuillez l'installer en cliquant sur le bouton ci-dessous.\",\"button_install\":\"Installer\",\"error_account_creation\":\"Une erreur est survenue, veuillez essayer de nouveau.\",\"error_no_login_password\":\"Identifiant et mot de passe requis\",\"error_login_failed\":\"Identifiants invalides\",\"error_update\":\"Un problème est survenu lors du rapatriement de vos données.\",\"error_update_oauth\":\"Votre autorisation pour afficher vos données %{fluid} a expiré.\",\"error_consent_form_gas\":\"Vos données ne peuvent être récupérées car vous n'avez pas coché l'autorisation d'accès aux données informatives lors de votre partage de consentement.\",\"button_oauth_reload\":\"Redonner mon consentement\",\"OK\":\"Ok\",\"konnector_delta\":{\"ELECTRICITY\":\"La donnée de consommation électrique arrive normalement à J+1. Un retard d'un ou deux jours est parfois constaté.\",\"GAS\":\"La donnée de consommation de gaz arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\",\"WATER\":\"La donnée de consommation d'eau arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\"},\"accessibility\":{\"button_install\":\"Installer le connecteur\",\"button_update\":\"Mettre à jour votre connexion\",\"button_disconnect\":\"Déconnecter votre connecteur\"}},\"konnector_options\":{\"label_connect_to_electricity\":\"Se connecter à l'électricité\",\"label_connect_to_water\":\"Se connecter à l'eau\",\"label_connect_to_gas\":\"Se connecter au gaz\",\"label_offline_electricity\":\"Électricité déconnectée\",\"label_offline_water\":\"Eau déconnectée\",\"label_offline_gas\":\"Gaz déconnecté\",\"partner_issue\":\"En maintenance\",\"outdated\":\"Données manquantes depuis %{isOutdatedData} jours\",\"accessibility\":{\"label_ko_status\":\"Connecteur en erreur\",\"button_toggle_detail_electricity\":\"Afficher ou masquer le détail de la connexion à l'électricité\",\"button_toggle_detail_water\":\"Afficher ou masquer le détail de la connexion à l'eau\",\"button_toggle_detail_gas\":\"Afficher ou masquer le détail de la connexion au gaz\"}},\"konnector_modal\":{\"loading_data\":\"Veuillez patienter, vos données sont en cours de chargement.\",\"loading_data_update\":\"Veuillez patienter, vos données sont en cours de mise à jour.\",\"logging_txt\":\"Nous vérifions vos informations d'identité\",\"success_txt\":\"Félicitations !\",\"success_data_electricity\":\"Vos données de consommation d'électricité sont maintenant connectées à Ecolyo.\",\"success_data_water\":\"Vos données de consommation d'eau sont maintenant connectées à Ecolyo.\",\"success_data_gas\":\"Vos données de consommation de gaz sont maintenant connectées à Ecolyo.\",\"success_data_additional_electricity\":\"Les données de consommations mettent entre un et deux jours pour arriver.\",\"success_data_additional_water\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_data_additional_gas\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_update_txt\":\"Connexion réussie !\",\"success_data_update_electricity\":\"Ecolyo est bien connecté à votre compteur d'électricité.\",\"success_data_update_water\":\"Ecolyo est bien connecté à votre compteur d'eau.\",\"success_data_update_gas\":\"Ecolyo est bien connecté à votre compteur de gaz.\",\"success_data_additional_update_electricity\":\"Sachez que la donnée de consommation d'électricité arrive entre J+1 et J+2.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_water\":\"Sachez que la donnée de consommation d'eau arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_gas\":\"Sachez que la donnée de consommation de gaz arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"error_txt\":\"Aïe !\",\"mismatch\":{\"title\":\"Vos données n'ont pas pu être récupérées.\",\"text1\":\"Vos nom et numéro de compteur ne correspondent plus. Merci de reconfigurer votre connecteur.\",\"text2\":\"Reconfigurer mon connecteur ?\",\"text3\":\"La reconfiguration de votre connecteur passe par sa suppression et sa nouvelle installation. Vos données seront conservées.\"},\"error_data_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité ne seront pas chargées.\",\"error_data_water\":\"Un problème est survenu. Vos données de consommation d’eau ne seront pas chargées.\",\"error_credentials_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter. L'identifiant est un numéro à 7 chiffres (différent de votre numéro de contrat).\",\"error_credentials_electricity\":\"Il semblerait que les nom(s) et adresse ne concordent pas avec le numéro de votre compteur.\",\"error_credentials_electricity_2\":\"Nous ne pouvons vous donner accès aux données de consommation.\",\"error_credentials_update_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter.\",\"error_credentials_update_electricity\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_credentials_update_gas\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_data_gas\":\"Un problème est survenu. Vos données de consommation de gaz ne seront pas chargées.\",\"error_consent_form_gas_title\":\"Nous n'avons pas pu connecter vos données de consommation de gaz à Ecolyo.\",\"error_consent_form_gas_content\":\"En effet, le partage de vos données de consommation de gaz \\\"informatives\\\" doit être accepté.\",\"error_consent_form_gas_content_2\":\"Merci de cocher \\\"OUI\\\" au partage de vos données de consommation de gaz, et à \\\"Autoriser l'accès à mes données informatives\\\".\",\"error_data_update_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité n’ont pas été mises à jour.\",\"error_data_update_water\":\"Un problème est survenu. Vos données de consommation d’eau n’ont pas été mises à jour.\",\"error_data_update_gas\":\"Un problème est survenu. Vos données de consommation de gaz n’ont pas été mises à jour.\",\"error_data_2\":\"Merci de réessayer plus tard.\",\"button_validate\":\"Ok\",\"button_understood\":\"J'ai compris\",\"button_try_again\":\"Réessayer\",\"button_check_info\":\"Vérifier les infos\",\"button_go\":\"J'y vais\",\"button_later\":\"Plus tard\",\"show_common_error\":\"Voir les erreurs récurrentes\",\"show_common_error_list\":\"<span>Le problème peut provenir des cas suivants :</span><ul><li>Vous avez un co-titulaire sur votre contrat. Veillez à bien entrer le nom du <span class=\\\"gold\\\">titulaire du contrat</span> et non le co-titulaire.</li><li> Votre nom comporte un tiret ? Tentez sans le tiret.</li><li>Entrez bien le nom de votre commune de résidence en entier (tirets et accents inclus)</li><li>Avez-vous bien entré le <span class=\\\"gold\\\">numéro de votre compteur</span> (PDL) ? Tout autre numéro (de contrat, de client) ne fonctionne pas.</li></ul><p>Si vous rencontrez toujours des difficultés, contactez notre service d'aide </p><div class=\\\"center\\\">Avez-vous pensez à vérifier ces informations ?</div>\",\"accessibility\":{\"window_title\":\"Fenêtre d'attente de connexion\",\"button_close\":\"Fermer la fenêtre\"}},\"consent_outdated\":{\"title\":{\"0\":\"Votre autorisation pour afficher vos données d’électricité a expiré\",\"2\":\"Votre autorisation pour afficher vos données de gaz a expiré\"},\"text1\":{\"0\":\"Veuillez re-donner votre consentement pour la transmission et la reconnexion de vos données ENEDIS à Ecolyo.\",\"2\":\"Veuillez re-donner votre accord pour que GRDF nous transmette vos données de consommation.\"},\"text2\":{\"0\":\"Souhaitez-vous renouveler votre accord dès maintenant pour un an ?\",\"2\":\"Voulez-vous donner votre accord sur votre compte GRDF maintenant ?\"},\"later\":\"Plus tard\",\"go\":\"J'y vais\",\"no\":\"Non\",\"yes\":\"Oui\"},\"delete_grdf_modal\":{\"text1\":\"La suppression de la connexion avec GRDF s’accompagne de la suppression de votre consentement à partager vos données gaz avec Ecolyo.\",\"text2\":\"Si vous souhaitez vous reconnecter, il vous faudra re-donner votre accord pour que GRDF nous transmette vos données de consommation.\",\"text3\":\"Voulez-vous supprimer votre connexion et votre consentement à GRDF ?\",\"cancel\":\"Plus tard\",\"go\":\"Oui\"},\"legal\":{\"read_legal\":\"Lire les mentions légales\",\"title_legal\":\"Mentions légales & CGU\",\"version\":\"Version du 12.12.2022\",\"site\":\"Site du service Ecolyo : <a href=\\\"https://ecolyo.com/\\\"> https://ecolyo.com/</a>\",\"adress\":\"Métropole de Lyon - 20, rue du Lac – CS 33569 - 69505 Lyon cedex 03\",\"phone\":\"Tél : (33) 4 78 63 40 40\",\"mail\":\"<a href=\\\"mailto:ecolyo@grandlyon.com\\\"> ecolyo(at)grandlyon.com</a>\",\"p1b\":\"Directrice de publication : \",\"p1\":\"Blandine MELAY, Responsable du Service Transition Énergétique\",\"p2b\":\"Animation éditoriale, gestion et mise à jour : \",\"p2\":\"Marion BERTHOLON, Chargée de services numériques pour la transition énergétique\",\"p3b\":\"Photographies : \",\"p3\":\"sauf mention contraire, les photos sont la propriété de la Métropole de Lyon\",\"p4b\":\"Conception et Charte graphique : \",\"p4\":\"Florent Dufier\",\"p5b\":\"Réalisation technique : \",\"p5\":\"Métropole de Lyon, Sopra Steria\",\"p6b\":\"Maintenance technique : \",\"p6\":\"Délégation Développement économique, emploi & savoirs - Innovation numérique & systèmes d’information - Usages et services numériques - Développement des services numériques\",\"title1\":\"Crédits\",\"part1\":\"Ce site est le résultat de développements spécifiques réalisés dans les langages Go, TypeScript, HTML et Sass. Les développements s’appuient sur plusieurs bibliothèques et frameworks libres : axios, cozy-bar, cozy-client, cozy-harvest-lib, cozy-scripts, cozy-ui, d3, detect-browser, global, lodash, luxon, moment, moment-timezone, node-sass, object-hash, react, react-dom, react-redux, react-router-dom, react-swipeable-views, redux-devtools-extension, sass-loader. Les tests de l’application s’appuient sur les bibliothèques et frameworks libres suivants: jest-junit, react-test-renderer, redux-mock-store. La pile technique intègre également les applications Cozy stack, Yarn, Docker, ACH. Les déploiements sont réalisés sur le registre hébergé chez Cozy. L’équipe de réalisation utilise au quotidien les applications GitLab, IceScrum, RocketChat, SonarQube.\",\"title2\":\"Traitement des données personnelles et droit d’accès, de modification et de suppression\",\"part2\":\"Conformément à la réglementation en vigueur en matière de protection des données personnelles, le service Ecolyo a fait l’objet d’une inscription au registre des traitements de la Métropole de Lyon. Ecolyo fait partie de l’écosystème de services orientés « self data » déployés par la Métropole de Lyon avec l’ambition d’offrir aux usagers métropolitains les outils et les services leur permettant d’exercer directement leur droit à la portabilité, dans un cadre apte à garantir aussi bien la transparence et le contrôle sur l’usage de leurs données personnelles que l’exploitation directe du contenu de ces données selon leurs libres choix. Le self data est en effet selon la Fondation Internet Nouvelle Génération (FING) « la production, l’exploitation et le partage de données personnelles par les individus, sous leur contrôle et à leurs propres fins ». Au sein de cet environnement self data, la gestion des données s’appuie sur l’organisation suivante des rôles et responsabilités associées : \",\"part2-1\":\"Les partenaires du service GRDF et Eau Publique du Grand Lyon sont responsables exclusivement des seuls traitements de Données Personnelles relatifs à la collecte des données de consommation de gaz et d’eau de l’utilisateur et à leur transmission sur la plateforme de cloud personnel, après consentement de l’utilisateur.\",\"part2-2\":\"Enedis est responsable de la collecte des données de consommation d’électricité et de leur mise à disposition à la Métropole de Lyon qui, elle en gère la transmission sur la plateforme du cloud personnel de l’utilisateur, après avoir récupéré le consentement de l’utilisateur.\",\"part2-3\":\"La Métropole de Lyon est responsable de traitement sur le périmètre du service Ecolyo qu’elle propose à l’usager, ainsi que des traitements nécessaires à la fourniture de la plateforme de cloud personnel qu’elle met à disposition de l’usager pour accéder au service Ecolyo. En sa qualité de responsable de ces traitements, elle collecte et traite : \",\"part2-3-1\":\"Les données de compte de l’usager renseignées par l’usager au sein de son espace de cloud personnel Grand Lyon à des fins de gestion du compte et de communication avec l’usager ;\",\"part2-3-2\":\"Les données de compte de l’utilisateur lui permettant de connecter ses données d’électricité à Ecolyo ;\",\"part2-3-3\":\"Les données privées de consommation d’énergie et d’eau dont la récupération, la sauvegarde, le stockage, la synchronisation et le partage sur la plateforme de cloud personnel sont initiés par l’usager sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-4\":\"Les données privées sur la composition du logement et du foyer de l’utilisateur, fournies par l’utilisateur lui-même au sein du service, sont traitées par le service sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-5\":\"Des métriques d’usage du service anonymisées et remontées périodiquement afin d’améliorer la qualité du service et d’évaluer son impact (Plus d’informations sur la manière dont votre anonymat est bien préservé dans ce processus <a href=\\\"https://ecolyo.com/cloud_statistiques.html\\\">ici</a>).\",\"part2-4\":\"La Métropole réalise également des mesures d’audience à l’aide de la solution Matomo. Afin de vous fournir un meilleur service et d’améliorer votre expérience d'utilisateur, nous utilisons des solutions de mesure d’audience qui utilisent la technologie des « cookies », des fichiers texte qui sont enregistrés sur votre ordinateur et qui permettent de générer des informations envoyées aux serveurs de mesure d’audience. Sur ces serveurs, l’adresse IP est anonymisée. Les données recueillies ont uniquement pour finalité de permettre d'analyser la fréquentation de nos pages afin d'en améliorer le contenu. Il s'agit de statistiques agrégées permettant de connaître le nombre de visites et de visiteurs différents, les pages les plus populaires, les chemins préférés, les niveaux d'activité par jour de la semaine et par heure de la journée, les principales erreurs etc. Vous avez cependant le droit de vous opposer à l’utilisation de ces cookies, et donc au traitement de vos données personnelles de navigation, en vous rendant dans la page Options de notre service.\",\"part2-5\":\"L’usager est seul décisionnaire des finalités d’utilisation qu’il souhaite définir pour le traitement de ses données personnelles de consommation, à la suite de leur transmission par les partenaires du service Ecolyo sur son cloud personnel. Ainsi, dans le cadre de l’utilisation d’Ecolyo, l’usager ne recevra les données des partenaires du service : Enedis, GRDF et Eau Publique du Grand Lyon seulement qu’à sa demande expresse après la saisie de ses identifiants.\",\"part2-6\":\"L’utilisateur est donc le seul à accéder :\",\"part2-6-1\":\"À ses données de consommation d’électricité horaires, journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-2\":\"À ses données de consommation de gaz journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-3\":\"À ses données de consommation eau journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-7\":\"Les engagements et responsabilités de la Métropole de Lyon concernant la protection des données et la confidentialité des données Ecolyo sont précisés dans les Mentions légales et les conditions d’utilisation du cloud personnel Grand Lyon qui accueille aujourd’hui le service Ecolyo et sans lequel le service ne peut pas fonctionner. Pour plus d’informations sur les engagements et responsabilités de la Métropole de Lyon concernant la protection et la confidentialité dans le cloud personnel, nous vous invitons à vous référer <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">aux mentions légales et CGU du cloud personnel métropolitain.</a> \",\"part2-8\":\"Conformément à la loi 78-17 du 6 janvier 1978 modifiée relative à l’information, aux fichiers et aux libertés, vous disposez d’un droit d’accès, de rectification et d’opposition au traitement de vos données à caractère personnel. Votre cloud personnel vous permet d’exercer ces droits directement dans cet espace sur vos données de compte. S’agissant des données de consommations d’électricité et de gaz, l’utilisateur peut supprimer son consentement à partager ses données en supprimant son connecteur dans la page Consos.\",\"part2-9\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part2-10\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 ou en ligne, au moyen du formulaire disponible à l'adresse suivante : <a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/.</a>\",\"part2-11\":\"L’exercice de ces droits sur vos données personnelles auprès de la Métropole de Lyon concerne exclusivement les données traitées dans le cadre du service « Ecolyo ».\",\"title3\":\"Dispositions légales\",\"part3-1\":\"Les divers éléments du site web (la forme, la mise en page, le fonds, la structure …) sont protégés par le droit des dessins et modèles, le droit d’auteur, le droit des marques ainsi que le droit à l’image et ils ne peuvent être copiés ou imités en tout ou partie sauf autorisation expresse de la Métropole de Lyon.\",\"part3-2\":\"Toute personne ne respectant pas les dispositions légales applicables se rend coupable du délit de contrefaçon et est passible des sanctions pénales prévues par la loi.\",\"title4\":\"Droits d’auteurs\",\"part4-1\":\"Les photographies, textes, logos, pictogrammes, ainsi que toutes œuvres intégrées dans le site sont la propriété de la \\\"Métropole de Lyon\\\" ou de tiers ayant autorisé la \\\"Métropole de Lyon\\\" à les utiliser.\",\"part4-2\":\"Les reproductions, les transmissions, les modifications, les réutilisations, sur un support papier ou informatique, dudit site et des œuvres qui y sont reproduites ne sont autorisées que pour un usage personnel et privé conforme aux dispositions de l’article L 122-5 du Code de la Propriété Intellectuelle. Ces reproductions devront ainsi notamment indiquer clairement la source et l’auteur du site et/ou de ces œuvres multimédias. En aucun cas ces reproductions ne sauraient porter préjudice aux droits des tiers. Les reproductions, les transmissions, les modifications, les réutilisations à des fins publicitaires, commerciales ou d’information, de tout ou partie du site, sont totalement interdites.\",\"title5\":\"Logo de la Métropole de Lyon et d’Ecolyo\",\"part5\":\"Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent pas être modifiés – proportions, couleurs, éléments, constituants – et ne peuvent pas être sujet à aucune transformation, animation ou tout autre processus. Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent être utilisés et associés qu’aux seules informations vérifiables. Ils ne peuvent être notamment utilisés que pour illustrer des relations avec la Métropole de Lyon ou des actions de sponsorings dûment établies. Quel que soit le cas d’espèce, la Métropole de Lyon se réserve le droit d’approuver ou de désapprouver toute utilisation des logos de la Métropole de Lyon et d’Ecolyo, pour assurer son utilisation correcte, conformément à l’éthique, la morale et aux intérêts de la Métropole de Lyon. Les conditions susmentionnées s’appliquent dans le cadre de pages web, elles ne font pas référence à l’utilisation des logos dans tout autre document. La Métropole de Lyon se réserve le droit de modifier les conditions d’utilisation des logos de la Métropole de Lyon et d’Ecolyo à tout moment et sans préavis.\",\"title6\":\"Droit des bases de données\",\"part6\":\"Les bases de données sont protégées par la loi du 1er juillet 1998 et le régime français du droit d’auteur.\",\"title7\":\"Établissements de liens vers le site Ecolyo\",\"part7-1\":\"La Métropole de Lyon autorise la mise en place d’un lien hypertexte vers son service Ecolyo pour tous les sites internet, à l’exclusion de ceux diffusant des informations à caractère polémique, pornographique, xénophobe ou pouvant, dans une plus large mesure porter atteinte à la sensibilité du plus grand nombre.\",\"part7-2\":\"Le lien doit aboutir à la page d’accueil du service (<a href=\\\"https://ecolyo.com\\\">https://ecolyo.com</a>), cette page devant apparaître dans une nouvelle fenêtre. Les pages du service Ecolyo ne doivent en aucun cas être intégrées à l’intérieur des pages d’un autre site (iframe).\",\"part7-3\":\"Dans tous les cas d’espèce, La Métropole de Lyon se réserve le droit de demander la suppression d’un lien si elle estime que le site cible ne respecte pas les règles ainsi définies.\",\"title8\":\"Liens vers des sites tiers depuis le site Ecolyo\",\"part8\":\"Les liens hypertextes mis en œuvre au sein du site en direction d’autres sites et/ou de pages personnelles et d’une manière générale vers toutes ressources existantes sur internet ne sauraient engager la responsabilité de la Métropole de Lyon quant aux liens qu’ils contiennent ou aux changements ou mises à jour qui leur sont apportés.\",\"title9\":\"Mise en garde générale\",\"part9-1\":\"Nos services mettent tout en œuvre pour offrir aux visiteurs de ce site web des informations fiables et vérifiées. Cependant, malgré tous les soins apportés, le site peut comporter des inexactitudes, des défauts de mise à jour ou des erreurs.\",\"part9-2\":\"Nous remercions les utilisateurs du site de nous faire part d’éventuelles omissions, erreurs ou corrections par mail sur la boite aux lettres du webmestre ou directement via le formulaire proposé dans le service.\",\"accessibility\":{\"button_close\":\"Fermer la fenêtre\"}},\"oauth\":{\"window\":{\"title\":\"OAuth\"}},\"onboarding\":{\"welcomeModal\":{\"title\":\"Vous êtes à mi-chemin !\",\"part1\":\"Votre cloud personnel a bien été créé.\",\"part2\":\"Il vous faut maintenant donner votre accord pour connecter vos compteurs au service.\",\"button_valid\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre de bienvenue\",\"button_valid\":\"Valider\"}}},\"performance_indicator\":{\"bilan\":{\"text1\":\"Par rapport à \",\"text2\":\"soit une différence de : \"},\"error_no_compare\":\"comparaison impossible\",\"error_no_compare_reason\":\"(manque de données)\",\"error_no_compare_no_data\":\"Vos consommations pour cette période sont incomplètes à cause d’un problème technique concernant :\",\"fpi\":{\"no_data\":\"Données non disponibles\",\"no_comparison\":\"Pas de comparaison possible\"}},\"profile\":{\"report\":{\"title_alert\":\"Alerte Consommation Excessive d'Eau\",\"title_bilan\":\"Notification par mail\",\"switch_label_bilan\":\"Je reçois la lettre mensuelle contenant un bilan et des conseils sur ma consommation.\",\"switch_label_alert\":\"Être prévenu d’un dépassement anormal de ma consommation d’eau\",\"input_label_alert\":\"Si ma consommation d’eau quotidienne dépasse :\",\"input_label_subtext_alert\":\"Votre consommation quotidienne maximum sur les 6 derniers mois : \",\"activate\":\"Activer\",\"deactivate\":\"Désactiver\"},\"accessibility\":{\"button_toggle_mail_report\":\"Recevoir mon bilan mensuel par mail\",\"button_toggle_consumption_alert\":\"Recevoir des alertes sur mes consommations journalières\",\"input_water_alert_report\":\"Indiquer une limite de consommation d'eau journalière\"}},\"profile_type\":{\"title_profile\":\"Mes données\",\"read_profile\":\"Ajuster mon profil\",\"button_update_profile\":\"J'ajuste mon profil\",\"your_profile\":\"Mon profil\",\"multi_choices\":\"Plusieurs réponses possibles\",\"housing_type\":{\"title\":\"Logement\",\"question\":\"De quel type de logement disposez-vous ?\",\"individual_house\":\"Maison individuelle\",\"apartment\":\"Appartement\"},\"construction_year\":{\"title\":\"Construction\",\"question\":\"Quelle est son année de construction ?\",\"text_before_1948\":\"Construit avant 1948\",\"text_between_1948_and_1974\":\"Construit entre 1948 et 1974\",\"text_between_1975_and_1989\":\"Construit entre 1975 et 1989\",\"text_between_1990_and_1998\":\"Construit entre 1990 et 1998\",\"text_after_1998\":\"Construit après 1998\",\"text_unknown\":\"Construit après 1998\",\"before_1948\":\"Avant 1948\",\"between_1948_and_1974\":\"Entre 1948 et 1974\",\"between_1975_and_1989\":\"Entre 1975 et 1989\",\"between_1990_and_1998\":\"Entre 1990 et 1998\",\"after_1998\":\"Après 1998\",\"unknown\":\"Je ne sais pas\"},\"occupantsNumber\":{\"single\":\" occupant\",\"multi\":\" occupants\"},\"area\":{\"title\":\"Surface\",\"question\":\"Quelle est sa surface en m² ?\",\"name\":\" m²\"},\"occupants_number\":{\"title\":\"Nombre d'occupants\",\"question\":\"Combien il y a-t-il d'occupants ?\"},\"outside_facing_walls\":{\"1\":\"1 façade\",\"2\":\"2 façades\",\"3\":\"3 façades\",\"4\":\"4 façades\",\"title\":\"Murs extérieurs\",\"question\":\"Combien de façades donnent sur l'extérieur ?\",\"text\":{\"single\":\" façade donne sur l'extérieur\",\"multi\":\" façades donnent sur l'extérieur\"}},\"floor\":{\"title\":\"Étage\",\"question\":\"À quel étage est votre appartement ?\",\"ground_floor\":\"Au rez-de-chaussée\",\"intermediate_floor\":\"Étage intermédiaire\",\"last_floor\":\"Dernier étage\",\"not_applicable\":\"Sans objet\"},\"heating\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"individual_insulation_work\":{\"title\":\"Travaux de rénovation\",\"question\":\"Quels travaux de rénovation avez-vous réalisés ces 10 dernières années ?\",\"none\":\"Aucun\",\"roof_insulation\":\"Isolation toiture\",\"window_replacement\":\"Remplacement fenêtres\",\"wall_insulation\":\"Isolation des murs\",\"window_replacement_and_wall_insulation\":\"Remplacement fenêtres et isolation des murs\",\"window_replacement_and_roof_insulation\":\"Remplacement fenêtres et isolation toiture\",\"roof_and_wall_insulation\":\"Isolation toiture et murs\",\"window_replacement_and_roof_and_wall_insulation\":\"Remplacement fenêtre et isolation des murs et isolation toiture\",\"built_after_1998\":\"construit après 1998\"},\"facilities_installation\":{\"title\":\"Équipement\"},\"ventilation\":{\"title\":\"Ventilation double flux\",\"question\":\"Êtes-vous équipé d'une ventilation double flux ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une ventilation double flux\"},\"heater_replacement\":{\"title\":\"Pompe à chaleur ou poêle à bois\",\"question\":\"Au cours de ces 10 dernières années, avez-vous remplacé votre chaudière ou vous êtes-vous équipé d'une pompe à chaleur ou d'un poêle à bois ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une pompe à chaleur ou poêle à bois\"},\"cold_water\":{\"title\":\"Eau\",\"question\":\"Votre eau est-elle comprise dans vos charges collectives ?\",\"individual\":\"Non\",\"collective\":\"Oui\",\"individual_text\":\"Individuelle\",\"collective_text\":\"Collective\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"},\"hot_water_equipment\":{\"title\":\"Eau chaude\",\"question\":\"Utilisez-vous l’un de ces équipements pour produire votre eau chaude ?\",\"solar\":\"Chauffe-eau solaire\",\"thermodynamic\":\"Chauffe-eau thermodynamique\",\"other\":\"Aucun des deux\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Autre (Fioul, Bois)\",\"title\":\"Source eau chaude\",\"question\":\"Avec quelle source d’énergie votre eau chaude est-elle produite ?\",\"no_fluid_text\":\"Produite ni par de l'électricité, ni par du gaz\",\"0_text\":\"Produite grâce à de l'électricité\",\"2_text\":\"Produite grâce au gaz\",\"3_text\":\"Produite à partir d'un autre moyen que l'électricité ou le gaz\"},\"cooking_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"title\":\"Source cuisson\",\"question\":\"Quel mode de cuisson principal utilisez-vous ?\"},\"update_date\":{\"title\":\"Date de prise d'effet\",\"question\":\"A partir de quelle date souhaitez-vous que ce nouveau profil soit pris en compte dans l'analyse de vos données ?\"},\"fluidType\":{\"0\":\"Électricité\",\"1\":\"Eau\",\"2\":\"Gaz\"},\"form\":{\"button_previous\":\"Précédent\",\"button_next\":\"Suivant\",\"button_end\":\"Terminer\",\"button_loading\":\"Chargement...\"},\"finished\":{\"title\":\"Terminé !\",\"label1\":\"Grâce à ces informations, vous pourrez comparer votre consommation avec celle d'un foyer vous ressemblant davantage !\",\"label2\":\"Nous pourrons aussi vous proposer des astuces pour maîtriser vos consommations adaptées à votre profil.\",\"button_validate\":\"OK\"},\"accessibility\":{\"button_end\":\"Terminer la mise à jour du profil\",\"button_next\":\"Aller à la section suivante\",\"button_previous\":\"Retour à la section précédente\",\"button_update_profile\":\"Ouvrir la page de mise à jour du profil\",\"button_toggle_detail_profile\":\"Afficher ou masquer le détail du profil\",\"button_toggle_export\":\"Afficher ou masquer l'export des données'\",\"button_toggle_average_home\":\"Afficher ou masquer les informations sur le comparatif'\",\"button_validate\":\"Valider\"}},\"export\":{\"title_export\":\"Télécharger mes données\",\"text1\":\"Vous allez télécharger l'historique mensuel de vos fluides sélectionnés\",\"fluid_select\":\"Pour quel(s) fluide(s) souhaitez vous exporter vos données ?\",\"no_data\":\"Vous n'avez aucune donnée de fluide...\",\"button_download\":\"Télécharger\",\"month\":\"Mois\",\"year\":\"Année\",\"consumption\":\"Consommation\",\"maxpower\":\"Puissance max (kVA)\",\"button_close\":\"Fermer la fenêtre\",\"modal_start\":{\"accessibility_title\":\"Commencer le téléchargement\",\"text1\":\"Vous allez télécharger des données personnelles, Ecolyo n’est plus responsable de celles-ci une fois téléchargées\",\"text2\":\"Les données seront téléchargées sous forme de document excel (.xls)\",\"text3\":\"Lancer le téléchargement ?\",\"button_cancel\":\"Annuler\"},\"modal_loading\":{\"accessibility_title\":\"Téléchargement en cours\",\"text1\":\"Données en cours de téléchargement\",\"text2\":\"Veuillez ne pas quitter l’application pendant la récupération et le téléchargement de vos données\",\"button_cancel\":\"Annuler le téléchargement\"},\"modal_done\":{\"accessibility_title\":\"Téléchargement terminé\",\"text1\":\"Vos données ont bien été téléchargées !\",\"text2\":\"Vous pouvez maintenant retrouver l’historique de vos données sur votre appareil\",\"error1\":\"Aïe !\",\"error2\":\"Il semblerait qu’une erreur se soit produite lors du téléchargement de vos données.\",\"button_close\":\"Fermer\",\"button_close_error\":\"Revenir plus tard\"}},\"quiz\":{\"explanation\":\"Répondez correctement aux 5 questions et remportez 5 des 15 étoiles nécessaires pour débloquer le duel final\",\"score_final\":\"SCORE FINAL\",\"correct\":\"Bravo !\",\"wrong\":\"Raté !\",\"rightAnswer\":\"Bonne réponse :\",\"earn\":\"Vous remportez\",\"button_go_back\":\"Retour\",\"button_end_quiz\":\"Youpi !\",\"button_try_again\":\"Réessayer\",\"button_validate\":\"Valider\",\"next\":\"Suivant\",\"consumption_question\":\"Question sur votre consommation\",\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_end_quiz\":\"Terminer le quiz\",\"button_go_back\":\"Retour\",\"button_go_next\":\"Suivant\",\"button_try_again\":\"Relancer le quiz\",\"button_validate\":\"Valider\"}},\"splashscreen\":{\"error_loading\":\"Une erreur est survenue\",\"button_reload\":\"Réessayer\",\"accessibility\":{\"button_reload\":\"Recharger la page\"},\"migration_error\":\"Mise à jour de l'application\",\"consent_error\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"profile_error\":\"Chargement de votre profil utilisateur\",\"profileType_error\":\"Chargement de votre profil de consommation.\",\"challenges_error\":\"Actualisation de votre progression dans les défis\",\"analysis_error\":\"Chargement de votre analyse mensuelle\",\"index_error\":\"Chargement des index\",\"prices_error\":\"Mise à jour des prix\",\"consos_error\":\"Connexion à vos données de consommation\",\"partners_error\":\"Récupération de l'état des services partenaires\",\"unknown_error\":\"Veuillez vérifier votre connexion internet\",\"network_error\":\"Erreur de réseau\",\"step\":{\"0\":\"Mise à jour de l'application\",\"1\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"2\":\"Chargement de votre profil\",\"3\":\"Actualisation de votre progression dans les défis\",\"4\":\"Mise à jour des prix\",\"5\":\"Connexion à vos données de consommation\"}},\"timestep\":{\"today\":\"Aujourd'hui\",\"year\":{\"period\":\"5 ans\",\"comparelabel\":\"Comparer à l'année précédente\"},\"month\":{\"period\":\"Année\",\"comparelabel\":\"Comparer à l'année précédente\",\"current\":\"année actuelle\",\"last\":\"année précédente\"},\"day\":{\"period\":\"Mois\",\"comparelabel\":\"Comparer au mois précédent\",\"current\":\"mois actuel\",\"last\":\"mois précédent\"},\"week\":{\"period\":\"Semaine\",\"comparelabel\":\"Comparer à la semaine précédente\",\"current\":\"semaine actuelle\",\"last\":\"semaine précédente\"},\"half_an_hour\":{\"period\":\"Jour\",\"comparelabel\":\"Comparer à la journée précédente\",\"gather_data_title\":\"La récupération de vos données demi-horaires prend environ 24h.\",\"current\":\"jour actuel\",\"last\":\"jour précédent\",\"gather_data_subtitle\":\"Votre connexion a bien été prise en compte mais un délai de 24h est en général nécessaire à l’obtention de vos données.\\nÀ demain !\",\"analysis_waiting_data\":\"Pour bénéficier d'une analyse approfondie de votre consommation électrique, il nous faut récupérer vos données de consommation horaires. La récupération de ces données prend environ 24h. A bientôt !\"},\"accessibility\":{\"button_zoom_in\":\"Sélectionner le pas de temps précédent\",\"button_zoom_out\":\"Sélectionner le pas de temps suivant\"}},\"unsubscribe\":{\"title\":\"Êtes-vous sûr de ne plus vouloir recevoir notre email mensuel ?\",\"content\":\"Dans ce cas, vous ne recevrez plus la notification de votre bilan ainsi que les conseils associés au mois en cours.\",\"button_text\":\"Oui, je me désabonne\",\"button_accessibility\":\"Bouton de désinscription\"},\"welcome_modal\":{\"title\":\"Félicitations\",\"perso\":\"Votre espace personnel a bien été créé.\",\"connect\":\"Vous pouvez maintenant connecter vos compteurs d’énergie à Ecolyo en toute sécurité.\",\"button_valid\":\"Ok\",\"accessibility\":{\"title\":\"Fenêtre de félicitations\",\"button_valid\":\"Valider\"}}}"); +module.exports = JSON.parse("{\"common\":{\"title_app\":\"Ecolyo\",\"title_consumption\":\"Conso\",\"title_challenge\":\"Défis\",\"title_quiz\":\"Quiz\",\"title_exploration\":\"Exploration\",\"title_action\":\"Action\",\"title_duel\":\"Duel final\",\"title_ecogesture\":\"Astuce\",\"title_ecogestures\":\"Astuces\",\"title_ecogestures_choice\":\"Sélection des astuces\",\"title_options\":\"Options\",\"title_analysis\":\"Analyse\",\"title_profiletype\":\"Ajuster mon profil\",\"title_legal_notice\":\"Mentions légales\",\"title_gcu\":\"Conditions générales d’utilisation\",\"title_accessibility\":\"Accessibilité : non conforme\",\"title_sge_connect\":\"Connexion à l'électricité\",\"accessibility\":{\"loading\":\"Chargement\"}},\"navigation\":{\"consumption\":\"Conso\",\"challenges\":\"Défis\",\"ecogestures\":\"Astuces\",\"options\":\"Options\",\"analysis\":\"Analyse\"},\"FLUID\":{\"ELECTRICITY\":{\"NAME\":\"Électricité\",\"LABEL\":\"Électricité\",\"LABEL_PREPOSITION\":\"d'électricité\",\"UNIT\":\"kWh\",\"ADD\":\"Ajouter l'électricité\",\"MEGAUNIT\":\"MWh\",\"provider\":\"Enedis\"},\"WATER\":{\"NAME\":\"Eau\",\"LABEL\":\"Eau\",\"LABEL_PREPOSITION\":\"d'eau\",\"ADD\":\"Ajouter l'eau\",\"UNIT\":\"L\",\"MEGAUNIT\":\"m³\",\"provider\":\"Eau Publique du Grand Lyon\"},\"GAS\":{\"NAME\":\"Gaz\",\"LABEL\":\"Gaz\",\"LABEL_PREPOSITION\":\"de gaz\",\"ADD\":\"Ajouter le gaz\",\"UNIT\":\"kWh\",\"MEGAUNIT\":\"MWh\",\"provider\":\"GRDF\"},\"MULTIFLUID\":{\"NAME\":\"Multi fluide\",\"LABEL\":\"Multi\",\"UNIT\":\"€\"}},\"action\":{\"duration\":\"Durée : %{smartCount} jours\",\"result\":\"Résultat\",\"finished\":\"Défi terminé !\",\"details\":\"Détail de l'astuce\",\"apply\":\"J'applique cette action\",\"other\":\"Je choisis une autre action\",\"resultText1\":\"Cela n'a pas été trop difficile ?\",\"resultText2\":\"Jetez un coup d'œil dans la page conso dans 1 à 3 jours, le temps que vos données arrivent, pour voir l'impact de votre action.\",\"resultText3\":\"Pas de baisse de significative ? Pas de panique, en maintenant cette pratique dans le temps, les économies d'énergies et d'eau seront davantage visibles.\",\"resultText4\":\"Dans tous les cas, bravo, vous remportez...\",\"ok\":\"Ok\"},\"action_modal\":{\"accept\":\"Je relève le défi\",\"refuse\":\"Je me défile\",\"accessibility\":{\"window_title\":\"Fenêtre de confirmation\",\"button_accept\":\"Accepter\",\"button_refuse\":\"Refuser\"}},\"analysis\":{\"viewTitle\":\"Analyse\",\"warning_title\":\"Analyse incomplète\",\"warning_text\":\"Ecolyo n'a pas encore reçu toutes les données %{fluidList} pour ce mois\",\"comparison\":\"Comparatif\",\"analysis_date\":\"Conso totale\",\"challenge\":\"Défis terminés en\",\"user_consumption\":\"Votre conso\",\"average_home\":\"Conso moyenne d'un profil similaire\",\"average_home_description\":\"Le comparatif ici présenté est calculé sur la base d'un profil similaire au vôtre. Il s'agit d'un calcul et non d'une comparaison avec les autres utilisateurs de l'application. Sont pris en compte l'ensemble des informations entrées dans votre profil : mode de chauffage, âge du logement et éventuels travaux de rénovation, etc. Ce modèle a été créé avec l'Agence Locale de l'Energie sur la base de chiffres issues du Schéma Directeur des Energies de la Métropole de Lyon et de Chiffres-clé publiés par l'ADEME (l'Agence de l'Environnement et de la Maîtrise de l'Energie).\",\"approximative_description\":\"Pour comparer votre consommation avec un foyer similaire ou avec une conso idéale, veuillez détailler votre profil\",\"no_data\":\"Pas de données\",\"accessibility\":{\"button_go_to_profil\":\"Détailler mon profil\"},\"max_day\":\"Jour où vous avez le plus consommé\",\"compare\":{\"title\":\"Comparateur\",\"month_tab\":\"Comparer au mois dernier\",\"year_tab\":\"Comparer à l'année dernière\"}},\"analysis_error_modal\":{\"title\":\"Aucune analyse\",\"message\":\"Pour profiter d’une analyse de vos consommations, connectez au moins un de vos compteurs.\",\"go_to_conso\":\"Je connecte mes compteurs\",\"understood\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_understood\":\"J'ai compris\",\"button_goto_konnector\":\"Aller aux connecteurs\"}},\"analysis_pie\":{\"total\":\"Conso totale\",\"month\":\"Au mois \",\"estimation\":\"Comment sont estimés<br>les prix ?\"},\"special_elec\":{\"title\":\"Spécial Électricité\",\"average\":\"Conso moyenne\",\"weektype\":\"un jour de \",\"week\":\"semaine\",\"weekend\":\"week-end\",\"min\":\"Conso minimum\",\"percentage\":\"Part dans la facture\",\"price\":\"Soit\",\"maxPower\":\"Puissance maximum atteinte\",\"showModal\":\"Plus d'infos\"},\"elec_info_modal\":{\"accessibility\":{\"window_title\":\"electricity-info-modal\",\"button_close\":\"close-modal\"},\"title1\":\"Qu’est-ce que la consommation minimum ?\",\"title2\":\"Qu’est-ce que la puissance maximum ?\",\"text1\":\"Elle correspond à votre plus petite consommation du mois sur un créneau d'une demi-heure.\",\"text2\":\"Nous extrapolons cette consommation sur 1 mois afin vous donner un aperçu de la consommation de vos consommations électriques en veille (box, télé, chargeurs, ...) ou encore de celle, incompressible, de vos appareils de froid (frigo, congélateur).\",\"text3\":\"C’est la puissance maximum délivrée par tous les appareils fonctionnant au même moment dans votre logement.\",\"text4\":\"Vous avez choisi une puissance maximum dans votre offre d’électricité (3, 6 ou 9 kVA...) que vous ne devez pas dépasser pour ne pas faire sauter votre compteur. \",\"text5\":\"Cette puissance varie d'un mois à l'autre, regardez cette valeur sur l'ensemble de l'année pour vérifier si votre puissance souscrite correspond bien à votre usage.\"},\"auth\":{\"enedissgegrandlyon\":{\"title\":\"Ecolyo doit se connecter à l’électricité\",\"bill\":\"Munissez-vous d’une <span>facture d’électricité</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'électricité\",\"accessibility\":{\"connect\":\"Se connecter\"},\"identityTitle\":\"Nom inscrit sur la facture\",\"firstName\":\"Prénom\",\"lastName\":\"Nom\",\"pdlTitle\":\"Numéro de votre compteur électrique (PDL)\",\"pdlLabel\":\"N° (14 chiffres)\",\"pdlHint\":\"Où trouver le n° de PDL ?\",\"pdlModal\":{\"txt1\":\"Où trouver le n° de PDL ou PRM ?\",\"txt2\":\"Le numéro de PDL ou PRM se compose de 14 chiffres.\",\"txt3\":\"Votre numéro de PDL ou PRM se trouve sur votre facture d’électricité.\",\"txt4\":\"Si vous avez un compteur Linky, appuyez sur le bouton “+” et faites défiler l’affichage jusqu’à obtenir l’affichage suivant :\"},\"addressTitle\":\"Adresse du titulaire\",\"address\":\"Numéro et voie\",\"zipCode\":\"Code postal\",\"city\":\"Ville\",\"headConsent\":\"En acceptant de partager vos données, celles-ci seront directement transférées à Ecolyo à l’intérieur de votre cloud personnel, sans que la Métropole n’y accède ni ne les visualise.\",\"textConsent\":\"Afin de vous offrir des fonctionnalités de visualisation et d'analyse, Ecolyo a besoin des données suivantes : \",\"consentLi1\":\"L'historique et le relevé de vos consommations quotidiennes en kWh\",\"consentLi2\":\"L'historique et le relevé de vos consommations au pas de temps 30 minutes\",\"consentLi3\":\"Les puissances maximales atteintes quotidiennement\",\"consentLi4\":\"Les données contractuelles (début de contrat et puissance souscrite)\",\"consentCheck1\":\"Je consens à partager les données personnelles ci-dessus pour une durée d'<span>un an</span>\",\"consentCheck2\":\"J’atteste être le titulaire du point de livraison (PDL) renseigné à l’étape précédente\",\"modalHint\":{\"accessibility\":\"Titre de la modale\",\"title\":\"Où trouver le n° de PDL ?\",\"button\":\"J'ai compris\",\"button-accessibility\":\"Bouton valider\"}},\"grdfgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture de gaz</span> pour valider la connexion\",\"connect\":\"Je me connecte au gaz\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"label\":\"Je donne mon accord via mon compte GRDF\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter au gaz\"},\"with_account\":{\"title\":\"Votre compte GRDF a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur de gaz et Ecolyo !\"},\"step1\":{\"info1\":\"Un <span>compte chez GRDF</span> est nécessaire pour vous connecter au gaz <span>quelque soit votre fournisseur de gaz</span>.\",\"info2\":\"<p>GRDF est le gestionnaire de réseau. C'est lui qui est responsable de votre compteur Gazpar et de la collecte des données de consommation.</p>\",\"info3\":\"Possédez-vous un <span>compte GRDF</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"step3\":{\"info1\":\"La visualisation de vos données sur Ecolyo demande l'activation du <span>partage de toutes les données.</span>\",\"info2\":\"Pour une expérience optimale, <span>une période de consentement de 1 an</span> est recommandée à partir d’aujourd’hui.\",\"info3\":\"<p>Veillez également à indiquer une date antérieure pour l'historique (1er calendrier) afin de pouvoir récupérer jusqu'à 3 ans d'historique.</p>\"},\"button_go_to_partner_site\":\"Aller sur GRDF\"},\"eglgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture d'eau</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'eau\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"login\":\"Identifiant (7 chiffres)\",\"password\":\"Mot de passe\",\"label\":\"Je connecte Ecolyo à mon compte Eau Publique du Grand Lyon\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter à l'eau\"},\"with_account\":{\"title\":\"Votre compte Eau Publique du Grand Lyon a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur d'eau et Ecolyo !\"},\"step1\":{\"info1\":\"La connexion se fait via <span>votre compte Eau Publique du Grand Lyon</span>.\",\"info2\":\"Possédez-vous un <span>compte Eau Publique du Grand Lyon</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"button_go_to_partner_site\":\"Aller sur EPGL\"},\"connect_oauth\":{\"loading\":\"Chargement...\"},\"accessibility\":{\"button_reveal_password\":\"Afficher le mot de passe\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"window_title\":\"Fenêtre d'information sur la création de compte.\",\"button_close\":\"Fermer la fenêtre.\"},\"button_previous\":\"Précédent\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"button_has_account\":\"J'ai déjà un compte\",\"button_validate\":\"J'ai compris\",\"button_showOfflineData\":\"Voir mes anciennes données\",\"warningOfflineData\":\"Attention, vous visualisez d’anciennes données. Pour actualiser vos données, connectez votre compteur\"},\"challenge\":{\"card\":{\"ongoing\":{\"quiz\":\"Quiz\",\"exploration\":\"Explorations\",\"action\":\"Actions\",\"duel\":\"Duel Final\",\"result\":\"Résultat\",\"duelDone\":\"du duel final\"},\"locked\":{\"desc\":\"À débloquer en terminant le défi précédent\"}},\"card_done\":{\"saving\":\"Économie de\",\"depense\":\"Dépense de\",\"win\":\"Gagné\",\"lost\":\"Perdu\",\"final_defi\":\"sur le duel final\",\"final_defi_view\":\"Revoir le duel final\",\"reset_defi\":\"Relancer le défi\"},\"card_last\":{\"title\":\"Tous les défis sont terminés\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"button\":\"Suggérer une idée de défi\"},\"card_unlocked\":{\"button_launch\":\"Lancer le défi\"},\"accessibility\":{\"button_launch\":\"Lancer le défi\",\"button_goto_konnector\":\"Aller aux connecteurs\",\"button_slider_previous\":\"Précédent\",\"button_slider_next\":\"Suivant\"}},\"challenge_no_fluid_modal\":{\"title\":\"Oups !\",\"content\":\"Connectez au moins 1 fluide pour pouvoir jouer\",\"button_validate\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Valider\"}},\"consumption\":{\"display_last_data\":\"Voir mes dernières consos\",\"accessibility\":{\"button_previous_period\":\"Afficher la période précédente\",\"button_next_period\":\"Afficher la période suivante\",\"button_previous_value\":\"Sélectionner la valeur précédente\",\"button_next_value\":\"Sélectionner la valeur suivante\",\"checkbox_compare\":\"Afficher ou cacher la comparaison\"},\"partner_issue_modal\":{\"title\":\"Attention !\",\"error_connect_gaz\":\"La connexion à vos données de <span class='gaz'>gaz</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='gaz'>GRDF</span> ou dans notre service)\",\"error_connect_elec\":\"La connexion à vos données d'<span class='elec'>électricité</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='elec'>Enedis</span> ou dans notre service)\",\"error_connect_water\":\"La connexion à vos données d'<span class='water'>eau</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='water'>Eau Publique du Grand Lyon</span> ou dans notre service)\",\"additional_text\":\"La visualisation et/ou la connexion à vos données de consommation peut s'en trouver affectée.<br /><br /><i>Merci pour votre patience en attendant un retour à la normale :)</i>\",\"ok\":\"Ok\"},\"compared\":\"Comparé\"},\"consumption_details\":{\"detail\":\"Détail par fluide\",\"connect\":\"Connecter d'autres fluides\",\"mini_cards_label\":\"AUTRES ENERGIES\"},\"consumption_visualizer\":{\"missing_data\":\"Données manquantes\",\"no_data\":\"Pas de données\",\"why_no_data\":\"Pourquoi n'ai-je pas de données ?\",\"last_valid_data\":\"Dernières données valides : %{date}\",\"last_available_data\":\"Dernières données disponibles : %{date}\",\"last_valid_data_multi\":\"Dernières données complètes : %{date}\",\"data_to_come\":\"À venir\",\"aie\":\"Aïe !\",\"data_empty\":\"Vide\",\"estimated\":\"estimés\",\"dataModal\":{\"list_title\":\"3 raisons possibles :\",\"item1\":\"le lien entre Ecolyo et le fournisseur de données est rompu : une mise à jour de ce lien (en bas de la page) peut résoudre ce problème.\",\"item2\":\"un problème technique chez votre gestionnaire : se connecter directement chez ce gestionnaire pour vérifier que cette donnée apparaît.\",\"item3\":\"pour le gaz : vous n'avez pas autorisé Ecolyo à accéder aux données de consommation de cette période.\",\"item4\":\"vous n'aviez tout simplement pas de compteur communicant à l'époque !\"},\"modal\":{\"window_title\":\"info estimation des prix\",\"title\":\"Comment sont estimés les prix ?\",\"close\":\"Fermer la fenêtre\",\"part1\":\"Le prix de votre électricité ou de votre gaz dépend de l'offre choisie auprès de votre fournisseur. N’ayant pas accès à cette information, Ecolyo affiche un prix moyen par fluide. \",\"part2\":\"Tarifs moyens retenus :\",\"list1\":\" : 1 kWh = %{elecPrice} €TTC (il correspond au tarif réglementé d’EDF au %{elecPriceStartDate} pour une puissance souscrite de 3 ou 6 kVA et hors offre heure pleine/heure creuse)\",\"list2\":\" : 1 kWh = %{gasPrice} €TTC (tarif réglementé de vente au %{gasPriceStartDate} pour un consommateur soutirant moins de 6 MWh par an)\",\"list3\":\" : 1 litre d’eau = %{waterPrice} € TTC (prix constaté au %{waterPriceStartDate} pour un abonnement et une consommation de 120 m3/an sur la Métropole de Lyon)\",\"part3\":\"Le coût de votre abonnement n'est pas pris en compte dans Ecolyo.\"},\"release_notes_modal\":{\"title\":\"Du nouveau sur Ecolyo !\",\"message\":\"Les mises à jour suivantes ont été effectuées sur votre application :\",\"go_back\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre de notifications\",\"button_go_back\":\"J'ai compris\"}}},\"ecogestures\":{\"loading\":\"Chargement des astuces\"},\"duel\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"average_info\":\"%{average} euros étant votre moyenne actuelle, relevez-vous le défi ?\",\"button_start\":\"Allons-y !\",\"goal1\":\"Faites moins que votre moyenne actuelle sur %{durationInDays} jours\",\"goal2\":\"pour gagner le badge %{title}\",\"goal_done\":\"Duel remporté\",\"goal_failed\":\"Duel perdu\",\"caption_average\":\"Votre moyenne à titre indicatif\",\"caption_consumption\":\"Votre consommation\",\"caption_incoming\":\"Données à venir\",\"accessibility\":{\"button_go_back\":\"Retour\",\"button_start_duel\":\"Lancer le duel\",\"button_start_quiz\":\"Lancer le quiz\"}},\"duel_result_modal\":{\"success\":{\"title\":\"Félicitations\",\"message1\":\"Vous avez économisé %{value} €\",\"message2\":\"et gagné le badge %{title} !\",\"button_validate\":\"Youpi\"},\"lost\":{\"title\":\"Presque\",\"message1\":\"Vous avez dépassé de %{value} €\",\"message2\":\"et manqué le badge %{title}\",\"button_validate\":\"Zut alors\"},\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_validate\":\"Valider\"}},\"last_duel_modal\":{\"title\":\"Félicitations !\",\"subtitle\":\"Vous avez terminé tous les défis !\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"message2\":\"Vous pouvez donner votre avis sur ce que vous aimeriez en cliquant sur la bulle d'aide.\"},\"duel_empty_value_modal\":{\"title\":\"Oups !\",\"message\":\"Impossible de lancer le duel. Il nous manque en effet certaines de vos données de consommation pour vous proposer un duel à votre hauteur.\",\"button\":\"Je retourne au menu des défis\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Retourner au menu des défis\"}},\"ecogesture\":{\"title_tab_0\":\"Objectifs\",\"title_tab_1\":\"Je fais déjà\",\"title_tab_2\":\"Toutes\",\"MENU_TITLE\":\"Filtrer\",\"ALL\":\"Tous les usages\",\"HEATING\":\"Chauffage\",\"AIR_CONDITIONING\":\"Climatisation\",\"ECS\":\"Eau chaude\",\"COLD_WATER\":\"Eau froide\",\"ELECTRICITY_SPECIFIC\":\"Électricité courante\",\"COOKING\":\"Cuisson\",\"selection\":\"Sélectionner les astuces les plus adaptées à votre consommation\",\"selection_2\":\"vues sur\",\"button_selection\":\"Continuer ma sélection\",\"no_ecogesture\":\"Aucune astuce ne correspond à votre filtrage\",\"no_ecogesture_filter\":{\"text1\":\"Nous n'avons pas trouvé d'astuces adaptées à votre profil dans cette catégorie.\",\"text2\":\"En effet, de par votre profil et vos modes de chauffage, d'eau ou d'eau chaude sanitaire, nous n'avons pas identifié d’astuces vous permettant de diminuer vos factures à titre individuel. Toutefois, vous pouvez toujours agir pour préserver les ressources en appliquant et diffusant autour de vous les autres bonnes pratiques présentées dans la partie \\\"Toutes les astuces\\\".\"},\"adjust_profil\":{\"description\":\"Pour une sélection d’astuces adaptée à votre consommation, vous pouvez ajuster votre profil.\",\"button_go_to_profil\":\"Ajuster mon profil\"},\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_selection\":\"Aller à la page de sélection\"},\"doing\":\"Je fais déjà\",\"objective\":\"Objectif\",\"emptyList\":{\"obj1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes.\",\"obj1_done\":\"Aucune astuce n’a été sélectionnée comme objectif actuellement.\",\"obj2\":\"Vous pouvez sélectionner ceux à mettre en objectifs et ceux que vous appliquez déjà.\",\"obj2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous souhaitez garder en objectif dans cette section.\",\"doing1\":\"Aucune astuce n’a été sélectionnée dans la catégorie appliquée actuellement.\",\"doing1_done\":\"Aucune astuce n’est indiquée comme déjà appliquée actuellement.\",\"doing2\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"doing2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"btn1\":\"Voir toutes les astuces\",\"btn2\":\"Sélectionner\"},\"initModal\":{\"title\":\"Sélectionner mes astuces\",\"text1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes \",\"text2\":\"Vous pouvez sélectionner celles à mettre en objectifs et celles que vous appliquez déjà.\",\"text3\":\"Afin de pré-sélectionner les astuces correspondant à votre consommation, merci de répondre à quelques rapides questions.\",\"btn1\":\"Plus tard\",\"btn2\":\"C'est parti !\"},\"reinit\":\"Réinitialiser ma sélection\",\"reinitModal\":{\"title_part1\":\"Cette action\",\"title_part2\":\"supprimera votre liste d’astuces\",\"title_part3\":\"sélectionnées dans\",\"title_part4\":\"“Objectifs”\",\"title_part5\":\"et\",\"title_part6\":\"“Je fais déjà”\",\"text1\":\"Vous pourrez ensuite faire une nouvelle sélection adaptée à votre consommation.\",\"text2\":\"Souhaitez-vous réinitialiser votre sélection d’astuces ?\",\"btn1\":\"Non\",\"btn2\":\"Réinitialiser\"}},\"ecogesture_modal\":{\"title_ecogesture\":\"Astuce\",\"title_action\":\"Action\",\"efficiency\":\"Efficacité\",\"show_less\":\"Voir moins\",\"show_more\":\"Voir plus\",\"select_action\":\"Je choisis cette action\",\"accessibility\":{\"window_title_ecogesture\":\"Fenêtre astuce\",\"window_title_action\":\"Fenêtre action\",\"button_close\":\"Fermer la fenêtre\",\"button_select_action\":\"Sélectionner cette action\",\"button_see_more_detail\":\"Afficher plus de détails\"}},\"ecogesture_info_modal\":{\"header\":\"Comment sont choisis les astuces adaptées à mon profil ?\",\"text\":\"Les astuces adaptés à votre profil sont aujourd’hui choisies en fonction des compteurs individuels que vous possédez (communicants ou non). Ceux présentés ici vous permettent d'agir sur vos consommations individuelles. Des modes de tri plus personnalisables seront proposés à l'avenir.\",\"button_close\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'information\",\"button_close\":\"Fermer la fenêtre\"}},\"ecogesture_form\":{\"heating_type\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"}},\"ecogesture_profile\":{\"equipments\":{\"question\":\"Quels équipements possédez-vous ?\",\"hint\":\"Plusieurs réponses possibles\",\"air_conditioning\":\"Climatisation\",\"computer\":\"Ordinateur\",\"microwave\":\"Micro-ondes\",\"oven\":\"Four\",\"washing_machine\":\"Lave-linge\",\"dishwasher\":\"Lave-vaisselle\",\"cooking_plates\":\"Plaques électriques\",\"garden\":\"Jardin\",\"dryer\":\"Sèche-linge\",\"refregirator\":\"Réfrigérateur\",\"fan\":\"Ventilateur\",\"water_heater\":\"Chauffe-eau\",\"curtain\":\"Rideaux\",\"internet_box\":\"Box internet\",\"ventilation\":\"VMC\",\"freezer\":\"Congélateur\",\"boiler\":\"Chaudière\",\"hydraulic_heating\":\"Chauffage hydraulique\",\"accessible_label\":\"Sélection d'équipement\"}},\"ecogesture_selection\":{\"header\":\"Sélection des astuces\",\"title\":\"Vous avez parcouru un groupe de %{smartCount} astuces\",\"text\":\"Voulez-vous continuer sur votre lancée ou remettre cette sélection à plus tard ?\",\"title_final\":\"Félicitations !\",\"text_final_1\":\"Vous avez terminé la sélection des astuces adaptées à votre consommation.\",\"text_final_2\":\"Vous pouvez les retrouver dans les sections “Objectifs” et “Je fais déjà” selon que vous les pratiquiez déjà ou non.\",\"button_go_to_ecogesture\":\"Plus tard\",\"button_ok\":\"J'ai compris\",\"button_continue\":\"Poursuivre\",\"button_objective\":\"Objectif\",\"button_doing\":\"Je fais déjà\",\"button_skip\":\"Pas intéressé\",\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_go_to_ecogesture\":\"Retourner aux astuces\",\"button_continue\":\"Poursuivre\",\"button_ok\":\"Fermer la sélection\"},\"selectionModal\":{\"title\":\"Des astuces correspondant à votre profil ont été trouvées !\",\"text\":\"À vous de choisir celles que vous souhaitez mettre en objectif et celles que vous faites déjà.\",\"button_close\":\"C'est parti !\"}},\"exploration\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"button_already_done\":\"C’est déjà fait !\",\"button_come_back\":\"Je reviens quand cela sera fait\",\"button_start\":\"C'est parti !\",\"watch_consumption\":\"Je fonce\",\"congratulation\":\"Bravo !\",\"earn\":\"Vous remportez\",\"button_confirm\":\"Ok\",\"interval\":{\"explanation\":\"Vous pouvez vérifier cette informations sur l'écran Conso.\"},\"accessibility\":{\"button_already_done\":\"Marquer l'exploration comme déjà réalisée\",\"button_confirm\":\"Valider\",\"button_come_back\":\"Fermer l'exploration\",\"button_go_back\":\"Retour\",\"button_start\":\"Lancer l'exploration\"}},\"error_page\":{\"main\":\"Erreur\",\"back\":\"Retour\",\"no_ecogesture\":\"Oups ! Nous n'avons pas trouvé l'astuce demandée.\"},\"help\":{\"title_help\":\"une question ? un problème ? une suggestion ?\",\"read_help\":\"Nous écrire via le Service d'Assistance Utilisateur\"},\"feedback\":{\"title\":\"Vous allez contacter le Service Assistance Utilisateur du Grand Lyon.\",\"text1\":\"Vous pourrez nous remonter un problème, chercher de l'aide pour vous connecter plus facilement, ou encore nous partager une bonne idée d'évolution.\",\"text2\":\"N'hésitez pas à nous écrire ! L'équipe Ecolyo vous répondra avec plaisir :)\",\"later\":\"Plus tard\",\"lets_go\":\"J'y vais\",\"accessibility\":{\"window_title\":\"Fenêtre de partage de retours\",\"button_close\":\"Fermer la fenêtre de partage de retours\"}},\"dataShare\":{\"title1\":\"Bienvenue !\",\"title1Update\":\"Ecolyo évolue !\",\"title2Update\":\"Pour continuer à utiliser Ecolyo, merci d’accepter les modalités de traitement des données ci-dessous.\",\"part1\":\"Nous avons besoin de l’adresse email utilisée lors de la création de votre Cozy Métropole de Lyon, ci-après nommé cloud personnel.\",\"part2\":\"Cette donnée de compte est conservée dans Ecolyo le temps de l’utilisation de ce service.\",\"part3\":\"La Métropole de Lyon utilisera cet email afin de vous tenir informé·e :\",\"item1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter.\",\"item2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"item3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part4\":\"Vos données privées de consommation d’énergie et d’eau sont récupérées, sauvegardées et stockées dans votre cloud personnel à votre initiative sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part5\":\"Il en est de même pour les données privées de composition du logement et du foyer, fournies par vos soins. Elles restent également sans visibilité de la Métropole de Lyon sur leur contenu.\\nLes données d’identification entrées lors de la connexion aux données de consommations d’électricité sont quant à elles conservées dans un espace sécurisé de la Métropole de Lyon et sont utilisées uniquement à des fins de contrôle du consentement par des organismes extérieurs.\",\"part6\":\"Dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées et pseudonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation, d’évaluer globalement l’usage de l’application via des mesures d’audience ainsi que d’évaluer à terme l’impact global en termes de baisse des consommations énergétiques de notre service.\",\"part7\":\"Au sein de votre cloud personnel, vous pouvez à tout moment exercer vos droits d’accès, de rectification, de portabilité, de limitation et d’opposition en consultant notamment la page Options.\",\"part8\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part9\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 \",\"part10\":\"ou en ligne, au moyen du formulaire disponible à l'adresse suivante : \",\"link1\":\"<a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/</a>\",\"validDataConsent\":\"Je consens au traitement de mes données tel que décrit ci-dessus.\",\"validCGU\":\"Je valide les \",\"validCGU_button\":\"Conditions Générales d’Utilisation\",\"validLegal\":\" du service et ai pris connaissance des \",\"validLegal_button\":\"Mentions Légales\",\"validLegal2\":\"de celui-ci.\",\"button_accept\":\"C'est parti !\",\"accessibility\":{\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"minorUpdate\":{\"title\":\"Ecolyo évolue !\",\"button\":\"J'ai compris\"},\"gcu\":{\"title\":\"Conditions générales d’utilisation du service\",\"version\":\"Version du 12.12.2022\",\"content\":{\"title1\":\"Ecolyo, késako ?\",\"part1_1\":\"Ecolyo est un service proposé par la Métropole de Lyon vous permettant de suivre au même endroit vos consommations d’électricité, de gaz et d’eau, en kWh, en litres, en euros et à différentes échelles de temps. Ce service vous permet également de participer à des défis individuels et vous offre une analyse de vos consommations. Des astuces vous sont aussi proposées afin de vous permettre de réduire vos consommations.\",\"part1_2\":\"C’est un service gratuit qui prend la forme d’un site web dit « responsive », c’est-à-dire qu’il peut être consulté sur ordinateur ou sur mobile. Sur mobile, c’est une application que l’on a souhaitée ergonomique, réactive et esthétique pour votre plaisir de navigation et d’utilisation au quotidien.\",\"part1_3\":\"Tous les termes « techniques » sont définis en bas de page.\",\"title2\":\"Quelles fonctionnalités le service propose-t-il ?\",\"part2_1\":\"La fonctionnalité principale d’Ecolyo est la visualisation, au même endroit, de vos consommations d’électricité, de gaz et d’eau et ce, à différents pas de temps (de la demi-heure – uniquement pour l’électricité, à plusieurs années, en passant par les pas de temps journaliers et mensuels). La visualisation des consommations se fait en kWh pour l’énergie et en L pour l’eau ainsi qu’en euros (euros résultant d’un prix moyenné).\",\"part2_2\":\"Au-delà de la visualisation de vos consommations et parce que nous souhaitons vous aider à diminuer ces consommations vous retrouverez plusieurs autres pages : \",\"part2_2_list1\":\"Défis : Des quiz, et actions à mettre en place vous seront proposés pour vous pousser à réduire vos consommations.\",\"part2_2_list2\":\"Astuces : Une liste d’astuces pour maîtriser ses consommations d’énergie et d’eau à trier par usage, et avec une possibilité de les adapter plus précisément à votre profil.\",\"part2_2_list3\":\"Analyse : Une analyse de vos consommations réelles en comparaison à celle d’un foyer étant proche d’une vôtre.\",\"part2_3\":\"Pour la page Analyse ainsi que pour la partie personnalisation des astuces, des éléments supplémentaires sur votre profil vous seront demandés. L’ensemble de ces informations récoltées à l’aide du formulaire peuvent être modifiées par la suite.\",\"part2_4\":\"Dernière page : la page Options dans laquelle vous pourrez vous abonner à un service d’alerte sur vos consommations d’eau, de quoi ajuster votre profil ou encore vous désabonner de la lettre mensuelle.\",\"title3\":\"Comment ai-je accès à mes données d’électricité, de gaz et d’eau ?\",\"part3_1\":\"Pour visualiser vos consommations réelles et profiter pleinement du potentiel de notre service, il vous faut au minimum un des trois compteurs communicants suivants : Linky (pour l’électricité), Gazpar (pour le gaz), Téléo (pour l’eau).\",\"part3_2\":\"Ces compteurs sont opérés par les gestionnaires de réseaux. Pour Linky, c’est Enedis, le gestionnaire de réseau de distribution d’électricité. Pour Gazpar, GRDF est responsable de cette gestion. Et pour Téléo, c’est Eau Publique du Grand Lyon.\",\"part3_3\":\"Ces acteurs sont responsables de la relève de vos données. Ces données servent notamment à votre fournisseur d’électricité, de gaz ou d’eau pour permettre la facturation de vos consommations d’énergie. Des fournisseurs d’électricité ou de gaz il y en a des dizaines. Les gestionnaires de réseaux (… et de votre compteur) ne sont qu’au nombre de trois. Nous avons donc décidé de travailler avec eux, au plus près de la donnée brute issue de vos compteurs.\",\"part3_4\":\"Il vous faudra donc avoir un compte chez GRDF et Eau Publique du Grand Lyon pour accéder à vos données. Si vous n’en avez pas, il suffira de vous en créer un. Ceci ne sera à faire qu’une fois, au début.\",\"title4\":\"Ecolyo se trouve dans un cloud personnel Métropole de Lyon, qu’est-ce que cela signifie ?\",\"part4_1\":\"Comme vous avez dû le remarquer, lors de votre première connexion à Ecolyo vous avez dû vous créer un compte Cozy Métropole de Lyon. Ce cloud personnel est un espace sécurisé porté par l’ambition de vous apporter visibilité, transparence et maîtrise sur l’usage de vos données personnelles, et dont les fonctionnalités vous permettant de récupérer, synchroniser, stocker et partager vos données avec les destinataires de votre choix. Le service Ecolyo se déploie à l’intérieur de cet espace protégé. Dans ce cloud personnel, vous pourrez accéder également à d’autres services. Toutes les données traitées par Ecolyo, mais aussi les autres services que vous seriez amenés à utiliser dans ce cloud personnel restent dans ce Cloud Personnel Grand Lyon et n’en sortent pas, sauf si vous décidez vous-même de partager vos données avec des tiers.\",\"part4_2\":\"Pour en savoir plus sur ce cloud et son utilisation, ainsi que la durée de conservation de vos données, vous pouvez lire les conditions générales d’utilisation du service <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">ici</a>.\",\"title5\":\"Et donc concrètement pour Ecolyo, quelles données sont collectées et qui y a accès ?\",\"part5_1\":\"Pour qu’Ecolyo ait accès à vos données de consommations, vous devrez activer vos différents connecteurs. À ce moment-là, pour la connexion aux données de gaz et d’eau à travers un parcours qui vous conduira de manière intuitive sur le site de chacun des gestionnaires de réseaux concerné, vous pourrez donner votre consentement à partager ces données avec le Service Ecolyo, et ce pour une durée limitée dans le temps. Pour l’électricité, le don du consentement et la connexion aux données se fait directement dans notre service. Quid de la durée de ce consentement ? Pour les données électriques, elle est par défaut d'un an. Pour les données gaz, cela sera à vous de la définir (nous vous recommandons 1 an pour une expérience optimale). Les données utilisées pour vérifier la bonne connexion de vos données d’électricité sont stockées du côté de la Métropole de Lyon sur des serveurs sécurisés.\",\"part5_2\":\"Vos connecteurs, une fois configurés, permettent le transfert de vos données de consommations au service Ecolyo. Le transfert de ces données de consommation se fait sans que personne n’accède à leur contenu, pas même la Métropole de Lyon. En effet, ces données sont stockées et traitées directement dans votre cloud personnel qui en assure la protection. Tous les calculs, analyses et traitements sur ces données sont faites DANS votre espace personnel sans visibilité sur le contenu des données par la Métropole de Lyon.\",\"part5_3\":\"Vous pouvez bien sûr mettre fin à la récupération/ au transfert de vos données de consommation sur votre espace cloud personnel à tout moment et à plusieurs niveaux : \",\"part5_3_list1\":\"Vous pouvez supprimer le transfert quotidien de vos données en supprimant tout simplement le connecteur dans la page Consos (en bas).\",\"part5_3_list2\":\"Pour supprimer l’ensemble de vos données ainsi que votre cloud personnel Métropole de Lyon, vous devez demander la suppression de votre cloud. Pour faire cela, rendez-vous dans les paramètres de votre cloud personnel via la barre blanche en haut d’Ecolyo et appuyez sur le bouton « Supprimer mon compte » dans la partie paramètres.\",\"part5_4\":\"Des données sur le profil de votre foyer peuvent être également remplies au sein de l’application. Ces données s’enrichiront au fur et à mesure de votre utilisation du service avec d’autres informations : défis réalisés, étoiles gagnées, etc. L’ensemble de ces données restent à l’intérieur de votre cloud personnel, sans que personne n’y ait accès.\",\"part5_5\":\"Enfin, afin de permettre une mise à jour quotidienne de vos données de consommations, vos identifiants Eau Publique du Grand Lyon, un jeton d’identification GRDF ainsi que vos numéros de compteurs sont stockés.\",\"title6\":\"Personne n’a donc accès à mes données, pas même la Métropole de Lyon, vraiment ?\",\"part6_1\":\"Conformément aux indications du paragraphe précédent, la Métropole de Lyon n’accède ni à vos données de consommations ni aux données utilisées via certaines fonctionnalités du service comme le formulaire (celui-là même qui permet l’analyse de vos consommations personnalisée ainsi qu’une sélection d’éco-gestes personnalisés). Toutes ces informations sont bien gardées au chaud dans votre cloud personnel Métropole de Lyon\",\"part6_2\":\"Seul vous pouvez accepter de partager vos données, documents ou fichiers privés avec la Métropole de Lyon, ses partenaires ou d’autres utilisateurs ou acteurs (publics ou privés) après recueil de votre consentement éclairé et par une action expresse de votre part.\",\"part6_3\":\"La Métropole de Lyon n'a cependant accès qu’à l’adresse email utilisée lors la création de votre cloud personnel Métropole de Lyon. Elle utilise cet email afin de vous tenir informé·e :\",\"part6_3_list1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter. \",\"part6_3_list2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"part6_3_list3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part6_4\":\"Elle stocke également les informations transmises lors de la connexion à l’électricité (nom, adresse postale). Ces informations doivent être stockées car la Métropole de Lyon est régulièrement contrôlée par Enedis et doit prouver détenir le consentement des personnes pour lesquelles elle va chercher la donnée.\",\"part6_5\":\"Par ailleurs, et dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques anonymisées nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation ainsi que d’évaluer l’impact global en termes de baisse des consommations énergétiques de notre service. Parmi ces statistiques, des mesures d’audience de la fréquentation des différentes pages du service sont réalisées. Vous pouvez, via la page Options, à tout instant, décider de vous opposer à la récupération de ces données d’utilisation.\",\"title8\":\"Encore des questions ?\",\"part8_1\":\"N’hésitez pas à consulter la FAQ ou à nous contacter via le formulaire de contact présente sur l’ensemble des pages.\",\"part8_2\":\"Dernière option, contactez-nous directement à <a href=\\\"mailto:ecolyo@grandlyon.com\\\">ecolyo(at)grandlyon.com</a>.\",\"title9\":\"LEXIQUE\",\"part9_1_title\":\"Cloud personnel Métropole de Lyon : \",\"part9_1_content\":\"Cloud personnel : appelé aussi le « domicile numérique », le cloud personnel est souvent réduit à un simple espace de stockage de documents mais il est bien plus que ça. C'est un espace individuel et sécurisé où vous pouvez accéder à des services sans exposer aucune donnée à l’extérieur. Vous seul pouvez y accéder, personne d'autre.\",\"part9_2_title\":\"Connecteur : \",\"part9_2_content\":\"Un connecteur est un service, installé dans votre cloud personnel également, qui a pour but uniquement d’aller récupérer les données auprès de différents partenaires/sources de données. Dans le cadre d’Ecolyo, trois connecteurs sont pré-installés dans votre cloud personnel : celui d’Enedis, celui de GRDF et celui d’Eau Publique du Grand Lyon.\",\"part9_3_title\":\"Compteur communicant : \",\"part9_3_content\":\"Un compteur communicant est un compteur qui mesure de manière précise et détaillée vos consommations et peut transmettre ces données au gestionnaire de réseau via une technologie radio (c'est le cas pour Gazpar et Téléo par exemple) ou via les réseaux électriques (via Courant Porteur en ligne, c'est le cas pour Linky par exemple).\",\"part9_4_title\":\"Fournisseur : \",\"part9_4_content\":\"Votre fournisseur d’électricité, de gaz ou d’eau est l’entreprise qui vous facture votre électricité, gaz ou eau. Côté électricité il en existe <a href=\\\"https://www.enedis.fr/liste-des-fournisseurs-delectricite\\\">aujourd’hui plus de 50</a>, chacun proposant des tarifs différents.\",\"part9_5_title\":\"Gestionnaire de réseau de distribution : \",\"part9_5_content\":\"Appelé aussi parfois distributeur, il est en charge de la livraison de votre électricité, gaz ou eau jusqu’à votre domicile. Il est aussi en charge du compteur qui relève vos consommations. Il transmet vos données de consommations à votre fournisseur afin qu’il effectue la facturation de vos consommations d’énergie. Il peut également les transmettre à tout acteur avec qui vous avez décidé de partager ces données.\"}},\"gcu_modal\":{\"button_accept\":\"J'accepte\",\"accessibility\":{\"window_title\":\"Conditions générales d’utilisation\",\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"matomo\":{\"matomo_title\":\"Suivi statistiques d'usage Matomo\"},\"header\":{\"accessibility\":{\"button_back\":\"Retour à la page précédente\",\"button_open_feedbacks\":\"Ouvrir le partage de retours\"}},\"konnector_form\":{\"label_updated_at\":\"Dernière mise-à-jour le\",\"button_update\":\"Mettre à jour\",\"loading\":\"Chargement...\",\"wait_end_issue\":\"Attendre la fin de la maintenance avant de mettre à jour.\",\"button_disconnect\":\"Déconnecter\",\"issue\":\"Le problème semble venir de \",\"resolve\":\"Une mise à jour peut résoudre ce problème.\",\"login_failed\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"not_installed\":\"Le connecteur n'est pas installé. Veuillez l'installer en cliquant sur le bouton ci-dessous.\",\"button_install\":\"Installer\",\"error_account_creation\":\"Une erreur est survenue, veuillez essayer de nouveau.\",\"error_no_login_password\":\"Identifiant et mot de passe requis\",\"error_login_failed\":\"Identifiants invalides\",\"error_update\":\"Un problème est survenu lors du rapatriement de vos données.\",\"error_update_oauth\":\"Votre autorisation pour afficher vos données %{fluid} a expiré.\",\"error_consent_form_gas\":\"Vos données ne peuvent être récupérées car vous n'avez pas coché l'autorisation d'accès aux données informatives lors de votre partage de consentement.\",\"button_oauth_reload\":\"Redonner mon consentement\",\"OK\":\"Ok\",\"konnector_delta\":{\"ELECTRICITY\":\"La donnée de consommation électrique arrive normalement à J+1. Un retard d'un ou deux jours est parfois constaté.\",\"GAS\":\"La donnée de consommation de gaz arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\",\"WATER\":\"La donnée de consommation d'eau arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\"},\"accessibility\":{\"button_install\":\"Installer le connecteur\",\"button_update\":\"Mettre à jour votre connexion\",\"button_disconnect\":\"Déconnecter votre connecteur\"}},\"konnector_options\":{\"label_connect_to_electricity\":\"Se connecter à l'électricité\",\"label_connect_to_water\":\"Se connecter à l'eau\",\"label_connect_to_gas\":\"Se connecter au gaz\",\"label_offline_electricity\":\"Électricité déconnectée\",\"label_offline_water\":\"Eau déconnectée\",\"label_offline_gas\":\"Gaz déconnecté\",\"partner_issue\":\"En maintenance\",\"outdated\":\"Données manquantes depuis %{isOutdatedData} jours\",\"accessibility\":{\"label_ko_status\":\"Connecteur en erreur\",\"button_toggle_detail_electricity\":\"Afficher ou masquer le détail de la connexion à l'électricité\",\"button_toggle_detail_water\":\"Afficher ou masquer le détail de la connexion à l'eau\",\"button_toggle_detail_gas\":\"Afficher ou masquer le détail de la connexion au gaz\"}},\"konnector_modal\":{\"loading_data\":\"Veuillez patienter, vos données sont en cours de chargement.\",\"loading_data_update\":\"Veuillez patienter, vos données sont en cours de mise à jour.\",\"logging_txt\":\"Nous vérifions vos informations d'identité\",\"success_txt\":\"Félicitations !\",\"success_data_electricity\":\"Vos données de consommation d'électricité sont maintenant connectées à Ecolyo.\",\"success_data_water\":\"Vos données de consommation d'eau sont maintenant connectées à Ecolyo.\",\"success_data_gas\":\"Vos données de consommation de gaz sont maintenant connectées à Ecolyo.\",\"success_data_additional_electricity\":\"Les données de consommations mettent entre un et deux jours pour arriver.\",\"success_data_additional_water\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_data_additional_gas\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_update_txt\":\"Connexion réussie !\",\"success_data_update_electricity\":\"Ecolyo est bien connecté à votre compteur d'électricité.\",\"success_data_update_water\":\"Ecolyo est bien connecté à votre compteur d'eau.\",\"success_data_update_gas\":\"Ecolyo est bien connecté à votre compteur de gaz.\",\"success_data_additional_update_electricity\":\"Sachez que la donnée de consommation d'électricité arrive entre J+1 et J+2.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_water\":\"Sachez que la donnée de consommation d'eau arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_gas\":\"Sachez que la donnée de consommation de gaz arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"error_txt\":\"Aïe !\",\"mismatch\":{\"title\":\"Vos données n'ont pas pu être récupérées.\",\"text1\":\"Vos nom et numéro de compteur ne correspondent plus. Merci de reconfigurer votre connecteur.\",\"text2\":\"Reconfigurer mon connecteur ?\",\"text3\":\"La reconfiguration de votre connecteur passe par sa suppression et sa nouvelle installation. Vos données seront conservées.\"},\"error_data_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité ne seront pas chargées.\",\"error_data_water\":\"Un problème est survenu. Vos données de consommation d’eau ne seront pas chargées.\",\"error_credentials_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter. L'identifiant est un numéro à 7 chiffres (différent de votre numéro de contrat).\",\"error_credentials_electricity\":\"Il semblerait que les nom(s) et adresse ne concordent pas avec le numéro de votre compteur.\",\"error_credentials_electricity_2\":\"Nous ne pouvons vous donner accès aux données de consommation.\",\"error_credentials_update_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter.\",\"error_credentials_update_electricity\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_credentials_update_gas\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_data_gas\":\"Un problème est survenu. Vos données de consommation de gaz ne seront pas chargées.\",\"error_consent_form_gas_title\":\"Nous n'avons pas pu connecter vos données de consommation de gaz à Ecolyo.\",\"error_consent_form_gas_content\":\"En effet, le partage de vos données de consommation de gaz \\\"informatives\\\" doit être accepté.\",\"error_consent_form_gas_content_2\":\"Merci de cocher \\\"OUI\\\" au partage de vos données de consommation de gaz, et à \\\"Autoriser l'accès à mes données informatives\\\".\",\"error_data_update_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité n’ont pas été mises à jour.\",\"error_data_update_water\":\"Un problème est survenu. Vos données de consommation d’eau n’ont pas été mises à jour.\",\"error_data_update_gas\":\"Un problème est survenu. Vos données de consommation de gaz n’ont pas été mises à jour.\",\"error_data_2\":\"Merci de réessayer plus tard.\",\"button_validate\":\"Ok\",\"button_understood\":\"J'ai compris\",\"button_try_again\":\"Réessayer\",\"button_check_info\":\"Vérifier les infos\",\"button_go\":\"J'y vais\",\"button_later\":\"Plus tard\",\"show_common_error\":\"Voir les erreurs récurrentes\",\"show_common_error_list\":\"<span>Le problème peut provenir des cas suivants :</span><ul><li>Vous avez un co-titulaire sur votre contrat. Veillez à bien entrer le nom du <span class=\\\"gold\\\">titulaire du contrat</span> et non le co-titulaire.</li><li> Votre nom comporte un tiret ? Tentez sans le tiret.</li><li>Entrez bien le nom de votre commune de résidence en entier (tirets et accents inclus)</li><li>Avez-vous bien entré le <span class=\\\"gold\\\">numéro de votre compteur</span> (PDL) ? Tout autre numéro (de contrat, de client) ne fonctionne pas.</li></ul><p>Si vous rencontrez toujours des difficultés, contactez notre service d'aide </p><div class=\\\"center\\\">Avez-vous pensez à vérifier ces informations ?</div>\",\"accessibility\":{\"window_title\":\"Fenêtre d'attente de connexion\",\"button_close\":\"Fermer la fenêtre\"}},\"consent_outdated\":{\"title\":{\"0\":\"Votre autorisation pour afficher vos données d’électricité a expiré\",\"2\":\"Votre autorisation pour afficher vos données de gaz a expiré\"},\"text1\":{\"0\":\"Veuillez re-donner votre consentement pour la transmission et la reconnexion de vos données ENEDIS à Ecolyo.\",\"2\":\"Veuillez re-donner votre accord pour que GRDF nous transmette vos données de consommation.\"},\"text2\":{\"0\":\"Souhaitez-vous renouveler votre accord dès maintenant pour un an ?\",\"2\":\"Voulez-vous donner votre accord sur votre compte GRDF maintenant ?\"},\"later\":\"Plus tard\",\"go\":\"J'y vais\",\"no\":\"Non\",\"yes\":\"Oui\"},\"delete_grdf_modal\":{\"text1\":\"La suppression de la connexion avec GRDF s’accompagne de la suppression de votre consentement à partager vos données gaz avec Ecolyo.\",\"text2\":\"Si vous souhaitez vous reconnecter, il vous faudra re-donner votre accord pour que GRDF nous transmette vos données de consommation.\",\"text3\":\"Voulez-vous supprimer votre connexion et votre consentement à GRDF ?\",\"cancel\":\"Plus tard\",\"go\":\"Oui\"},\"legal\":{\"read_legal\":\"Lire les mentions légales\",\"title_legal\":\"Mentions légales & CGU\",\"version\":\"Version du 12.12.2022\",\"site\":\"Site du service Ecolyo : <a href=\\\"https://ecolyo.com/\\\"> https://ecolyo.com/</a>\",\"adress\":\"Métropole de Lyon - 20, rue du Lac – CS 33569 - 69505 Lyon cedex 03\",\"phone\":\"Tél : (33) 4 78 63 40 40\",\"mail\":\"<a href=\\\"mailto:ecolyo@grandlyon.com\\\"> ecolyo(at)grandlyon.com</a>\",\"p1b\":\"Directrice de publication : \",\"p1\":\"Blandine MELAY, Responsable du Service Transition Énergétique\",\"p2b\":\"Animation éditoriale, gestion et mise à jour : \",\"p2\":\"Marion BERTHOLON, Chargée de services numériques pour la transition énergétique\",\"p3b\":\"Photographies : \",\"p3\":\"sauf mention contraire, les photos sont la propriété de la Métropole de Lyon\",\"p4b\":\"Conception et Charte graphique : \",\"p4\":\"Florent Dufier\",\"p5b\":\"Réalisation technique : \",\"p5\":\"Métropole de Lyon, Sopra Steria\",\"p6b\":\"Maintenance technique : \",\"p6\":\"Délégation Développement économique, emploi & savoirs - Innovation numérique & systèmes d’information - Usages et services numériques - Développement des services numériques\",\"title1\":\"Crédits\",\"part1\":\"Ce site est le résultat de développements spécifiques réalisés dans les langages Go, TypeScript, HTML et Sass. Les développements s’appuient sur plusieurs bibliothèques et frameworks libres : axios, cozy-bar, cozy-client, cozy-harvest-lib, cozy-scripts, cozy-ui, d3, detect-browser, global, lodash, luxon, moment, moment-timezone, node-sass, object-hash, react, react-dom, react-redux, react-router-dom, react-swipeable-views, redux-devtools-extension, sass-loader. Les tests de l’application s’appuient sur les bibliothèques et frameworks libres suivants: jest-junit, react-test-renderer, redux-mock-store. La pile technique intègre également les applications Cozy stack, Yarn, Docker, ACH. Les déploiements sont réalisés sur le registre hébergé chez Cozy. L’équipe de réalisation utilise au quotidien les applications GitLab, IceScrum, RocketChat, SonarQube.\",\"title2\":\"Traitement des données personnelles et droit d’accès, de modification et de suppression\",\"part2\":\"Conformément à la réglementation en vigueur en matière de protection des données personnelles, le service Ecolyo a fait l’objet d’une inscription au registre des traitements de la Métropole de Lyon. Ecolyo fait partie de l’écosystème de services orientés « self data » déployés par la Métropole de Lyon avec l’ambition d’offrir aux usagers métropolitains les outils et les services leur permettant d’exercer directement leur droit à la portabilité, dans un cadre apte à garantir aussi bien la transparence et le contrôle sur l’usage de leurs données personnelles que l’exploitation directe du contenu de ces données selon leurs libres choix. Le self data est en effet selon la Fondation Internet Nouvelle Génération (FING) « la production, l’exploitation et le partage de données personnelles par les individus, sous leur contrôle et à leurs propres fins ». Au sein de cet environnement self data, la gestion des données s’appuie sur l’organisation suivante des rôles et responsabilités associées : \",\"part2-1\":\"Les partenaires du service GRDF et Eau Publique du Grand Lyon sont responsables exclusivement des seuls traitements de Données Personnelles relatifs à la collecte des données de consommation de gaz et d’eau de l’utilisateur et à leur transmission sur la plateforme de cloud personnel, après consentement de l’utilisateur.\",\"part2-2\":\"Enedis est responsable de la collecte des données de consommation d’électricité et de leur mise à disposition à la Métropole de Lyon qui, elle en gère la transmission sur la plateforme du cloud personnel de l’utilisateur, après avoir récupéré le consentement de l’utilisateur.\",\"part2-3\":\"La Métropole de Lyon est responsable de traitement sur le périmètre du service Ecolyo qu’elle propose à l’usager, ainsi que des traitements nécessaires à la fourniture de la plateforme de cloud personnel qu’elle met à disposition de l’usager pour accéder au service Ecolyo. En sa qualité de responsable de ces traitements, elle collecte et traite : \",\"part2-3-1\":\"Les données de compte de l’usager renseignées par l’usager au sein de son espace de cloud personnel Grand Lyon à des fins de gestion du compte et de communication avec l’usager ;\",\"part2-3-2\":\"Les données de compte de l’utilisateur lui permettant de connecter ses données d’électricité à Ecolyo ;\",\"part2-3-3\":\"Les données privées de consommation d’énergie et d’eau dont la récupération, la sauvegarde, le stockage, la synchronisation et le partage sur la plateforme de cloud personnel sont initiés par l’usager sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-4\":\"Les données privées sur la composition du logement et du foyer de l’utilisateur, fournies par l’utilisateur lui-même au sein du service, sont traitées par le service sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-5\":\"Des métriques d’usage du service anonymisées et remontées périodiquement afin d’améliorer la qualité du service et d’évaluer son impact (Plus d’informations sur la manière dont votre anonymat est bien préservé dans ce processus <a href=\\\"https://ecolyo.com/cloud_statistiques.html\\\">ici</a>).\",\"part2-4\":\"La Métropole réalise également des mesures d’audience à l’aide de la solution Matomo. Afin de vous fournir un meilleur service et d’améliorer votre expérience d'utilisateur, nous utilisons des solutions de mesure d’audience qui utilisent la technologie des « cookies », des fichiers texte qui sont enregistrés sur votre ordinateur et qui permettent de générer des informations envoyées aux serveurs de mesure d’audience. Sur ces serveurs, l’adresse IP est anonymisée. Les données recueillies ont uniquement pour finalité de permettre d'analyser la fréquentation de nos pages afin d'en améliorer le contenu. Il s'agit de statistiques agrégées permettant de connaître le nombre de visites et de visiteurs différents, les pages les plus populaires, les chemins préférés, les niveaux d'activité par jour de la semaine et par heure de la journée, les principales erreurs etc. Vous avez cependant le droit de vous opposer à l’utilisation de ces cookies, et donc au traitement de vos données personnelles de navigation, en vous rendant dans la page Options de notre service.\",\"part2-5\":\"L’usager est seul décisionnaire des finalités d’utilisation qu’il souhaite définir pour le traitement de ses données personnelles de consommation, à la suite de leur transmission par les partenaires du service Ecolyo sur son cloud personnel. Ainsi, dans le cadre de l’utilisation d’Ecolyo, l’usager ne recevra les données des partenaires du service : Enedis, GRDF et Eau Publique du Grand Lyon seulement qu’à sa demande expresse après la saisie de ses identifiants.\",\"part2-6\":\"L’utilisateur est donc le seul à accéder :\",\"part2-6-1\":\"À ses données de consommation d’électricité horaires, journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-2\":\"À ses données de consommation de gaz journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-3\":\"À ses données de consommation eau journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-7\":\"Les engagements et responsabilités de la Métropole de Lyon concernant la protection des données et la confidentialité des données Ecolyo sont précisés dans les Mentions légales et les conditions d’utilisation du cloud personnel Grand Lyon qui accueille aujourd’hui le service Ecolyo et sans lequel le service ne peut pas fonctionner. Pour plus d’informations sur les engagements et responsabilités de la Métropole de Lyon concernant la protection et la confidentialité dans le cloud personnel, nous vous invitons à vous référer <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">aux mentions légales et CGU du cloud personnel métropolitain.</a> \",\"part2-8\":\"Conformément à la loi 78-17 du 6 janvier 1978 modifiée relative à l’information, aux fichiers et aux libertés, vous disposez d’un droit d’accès, de rectification et d’opposition au traitement de vos données à caractère personnel. Votre cloud personnel vous permet d’exercer ces droits directement dans cet espace sur vos données de compte. S’agissant des données de consommations d’électricité et de gaz, l’utilisateur peut supprimer son consentement à partager ses données en supprimant son connecteur dans la page Consos.\",\"part2-9\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part2-10\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 ou en ligne, au moyen du formulaire disponible à l'adresse suivante : <a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/.</a>\",\"part2-11\":\"L’exercice de ces droits sur vos données personnelles auprès de la Métropole de Lyon concerne exclusivement les données traitées dans le cadre du service « Ecolyo ».\",\"title3\":\"Dispositions légales\",\"part3-1\":\"Les divers éléments du site web (la forme, la mise en page, le fonds, la structure …) sont protégés par le droit des dessins et modèles, le droit d’auteur, le droit des marques ainsi que le droit à l’image et ils ne peuvent être copiés ou imités en tout ou partie sauf autorisation expresse de la Métropole de Lyon.\",\"part3-2\":\"Toute personne ne respectant pas les dispositions légales applicables se rend coupable du délit de contrefaçon et est passible des sanctions pénales prévues par la loi.\",\"title4\":\"Droits d’auteurs\",\"part4-1\":\"Les photographies, textes, logos, pictogrammes, ainsi que toutes œuvres intégrées dans le site sont la propriété de la \\\"Métropole de Lyon\\\" ou de tiers ayant autorisé la \\\"Métropole de Lyon\\\" à les utiliser.\",\"part4-2\":\"Les reproductions, les transmissions, les modifications, les réutilisations, sur un support papier ou informatique, dudit site et des œuvres qui y sont reproduites ne sont autorisées que pour un usage personnel et privé conforme aux dispositions de l’article L 122-5 du Code de la Propriété Intellectuelle. Ces reproductions devront ainsi notamment indiquer clairement la source et l’auteur du site et/ou de ces œuvres multimédias. En aucun cas ces reproductions ne sauraient porter préjudice aux droits des tiers. Les reproductions, les transmissions, les modifications, les réutilisations à des fins publicitaires, commerciales ou d’information, de tout ou partie du site, sont totalement interdites.\",\"title5\":\"Logo de la Métropole de Lyon et d’Ecolyo\",\"part5\":\"Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent pas être modifiés – proportions, couleurs, éléments, constituants – et ne peuvent pas être sujet à aucune transformation, animation ou tout autre processus. Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent être utilisés et associés qu’aux seules informations vérifiables. Ils ne peuvent être notamment utilisés que pour illustrer des relations avec la Métropole de Lyon ou des actions de sponsorings dûment établies. Quel que soit le cas d’espèce, la Métropole de Lyon se réserve le droit d’approuver ou de désapprouver toute utilisation des logos de la Métropole de Lyon et d’Ecolyo, pour assurer son utilisation correcte, conformément à l’éthique, la morale et aux intérêts de la Métropole de Lyon. Les conditions susmentionnées s’appliquent dans le cadre de pages web, elles ne font pas référence à l’utilisation des logos dans tout autre document. La Métropole de Lyon se réserve le droit de modifier les conditions d’utilisation des logos de la Métropole de Lyon et d’Ecolyo à tout moment et sans préavis.\",\"title6\":\"Droit des bases de données\",\"part6\":\"Les bases de données sont protégées par la loi du 1er juillet 1998 et le régime français du droit d’auteur.\",\"title7\":\"Établissements de liens vers le site Ecolyo\",\"part7-1\":\"La Métropole de Lyon autorise la mise en place d’un lien hypertexte vers son service Ecolyo pour tous les sites internet, à l’exclusion de ceux diffusant des informations à caractère polémique, pornographique, xénophobe ou pouvant, dans une plus large mesure porter atteinte à la sensibilité du plus grand nombre.\",\"part7-2\":\"Le lien doit aboutir à la page d’accueil du service (<a href=\\\"https://ecolyo.com\\\">https://ecolyo.com</a>), cette page devant apparaître dans une nouvelle fenêtre. Les pages du service Ecolyo ne doivent en aucun cas être intégrées à l’intérieur des pages d’un autre site (iframe).\",\"part7-3\":\"Dans tous les cas d’espèce, La Métropole de Lyon se réserve le droit de demander la suppression d’un lien si elle estime que le site cible ne respecte pas les règles ainsi définies.\",\"title8\":\"Liens vers des sites tiers depuis le site Ecolyo\",\"part8\":\"Les liens hypertextes mis en œuvre au sein du site en direction d’autres sites et/ou de pages personnelles et d’une manière générale vers toutes ressources existantes sur internet ne sauraient engager la responsabilité de la Métropole de Lyon quant aux liens qu’ils contiennent ou aux changements ou mises à jour qui leur sont apportés.\",\"title9\":\"Mise en garde générale\",\"part9-1\":\"Nos services mettent tout en œuvre pour offrir aux visiteurs de ce site web des informations fiables et vérifiées. Cependant, malgré tous les soins apportés, le site peut comporter des inexactitudes, des défauts de mise à jour ou des erreurs.\",\"part9-2\":\"Nous remercions les utilisateurs du site de nous faire part d’éventuelles omissions, erreurs ou corrections par mail sur la boite aux lettres du webmestre ou directement via le formulaire proposé dans le service.\",\"accessibility\":{\"button_close\":\"Fermer la fenêtre\"}},\"oauth\":{\"window\":{\"title\":\"OAuth\"}},\"onboarding\":{\"welcomeModal\":{\"title\":\"Vous êtes à mi-chemin !\",\"part1\":\"Votre cloud personnel a bien été créé.\",\"part2\":\"Il vous faut maintenant donner votre accord pour connecter vos compteurs au service.\",\"button_valid\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre de bienvenue\",\"button_valid\":\"Valider\"}}},\"performance_indicator\":{\"bilan\":{\"text1\":\"Par rapport à \",\"text2\":\"soit une différence de : \"},\"error_no_compare\":\"comparaison impossible\",\"error_no_compare_reason\":\"(manque de données)\",\"error_no_compare_no_data\":\"Vos consommations pour cette période sont incomplètes à cause d’un problème technique concernant :\",\"fpi\":{\"no_data\":\"Données non disponibles\",\"no_comparison\":\"Pas de comparaison possible\"}},\"profile\":{\"report\":{\"title_alert\":\"Alerte Consommation Excessive d'Eau\",\"title_bilan\":\"Notification par mail\",\"switch_label_bilan\":\"Je reçois la lettre mensuelle contenant un bilan et des conseils sur ma consommation.\",\"switch_label_alert\":\"Être prévenu d’un dépassement anormal de ma consommation d’eau\",\"input_label_alert\":\"Si ma consommation d’eau quotidienne dépasse :\",\"input_label_subtext_alert\":\"Votre consommation quotidienne maximum sur les 6 derniers mois : \",\"activate\":\"Activer\",\"deactivate\":\"Désactiver\"},\"accessibility\":{\"button_toggle_mail_report\":\"Recevoir mon bilan mensuel par mail\",\"button_toggle_consumption_alert\":\"Recevoir des alertes sur mes consommations journalières\",\"input_water_alert_report\":\"Indiquer une limite de consommation d'eau journalière\"}},\"profile_type\":{\"title_profile\":\"Mes données\",\"read_profile\":\"Ajuster mon profil\",\"button_update_profile\":\"J'ajuste mon profil\",\"your_profile\":\"Mon profil\",\"multi_choices\":\"Plusieurs réponses possibles\",\"housing_type\":{\"title\":\"Logement\",\"question\":\"De quel type de logement disposez-vous ?\",\"individual_house\":\"Maison individuelle\",\"apartment\":\"Appartement\"},\"construction_year\":{\"title\":\"Construction\",\"question\":\"Quelle est son année de construction ?\",\"text_before_1948\":\"Construit avant 1948\",\"text_between_1948_and_1974\":\"Construit entre 1948 et 1974\",\"text_between_1975_and_1989\":\"Construit entre 1975 et 1989\",\"text_between_1990_and_1998\":\"Construit entre 1990 et 1998\",\"text_after_1998\":\"Construit après 1998\",\"text_unknown\":\"Construit après 1998\",\"before_1948\":\"Avant 1948\",\"between_1948_and_1974\":\"Entre 1948 et 1974\",\"between_1975_and_1989\":\"Entre 1975 et 1989\",\"between_1990_and_1998\":\"Entre 1990 et 1998\",\"after_1998\":\"Après 1998\",\"unknown\":\"Je ne sais pas\"},\"occupantsNumber\":{\"single\":\" occupant\",\"multi\":\" occupants\"},\"area\":{\"title\":\"Surface\",\"question\":\"Quelle est sa surface en m² ?\",\"name\":\" m²\"},\"occupants_number\":{\"title\":\"Nombre d'occupants\",\"question\":\"Combien il y a-t-il d'occupants ?\"},\"outside_facing_walls\":{\"1\":\"1 façade\",\"2\":\"2 façades\",\"3\":\"3 façades\",\"4\":\"4 façades\",\"title\":\"Murs extérieurs\",\"question\":\"Combien de façades donnent sur l'extérieur ?\",\"text\":{\"single\":\" façade donne sur l'extérieur\",\"multi\":\" façades donnent sur l'extérieur\"}},\"floor\":{\"title\":\"Étage\",\"question\":\"À quel étage est votre appartement ?\",\"ground_floor\":\"Au rez-de-chaussée\",\"intermediate_floor\":\"Étage intermédiaire\",\"last_floor\":\"Dernier étage\",\"not_applicable\":\"Sans objet\"},\"heating\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"individual_insulation_work\":{\"title\":\"Travaux de rénovation\",\"question\":\"Quels travaux de rénovation avez-vous réalisés ces 10 dernières années ?\",\"none\":\"Aucun\",\"roof_insulation\":\"Isolation toiture\",\"window_replacement\":\"Remplacement fenêtres\",\"wall_insulation\":\"Isolation des murs\",\"window_replacement_and_wall_insulation\":\"Remplacement fenêtres et isolation des murs\",\"window_replacement_and_roof_insulation\":\"Remplacement fenêtres et isolation toiture\",\"roof_and_wall_insulation\":\"Isolation toiture et murs\",\"window_replacement_and_roof_and_wall_insulation\":\"Remplacement fenêtre et isolation des murs et isolation toiture\",\"built_after_1998\":\"construit après 1998\"},\"facilities_installation\":{\"title\":\"Équipement\"},\"ventilation\":{\"title\":\"Ventilation double flux\",\"question\":\"Êtes-vous équipé d'une ventilation double flux ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une ventilation double flux\"},\"heater_replacement\":{\"title\":\"Pompe à chaleur ou poêle à bois\",\"question\":\"Au cours de ces 10 dernières années, avez-vous remplacé votre chaudière ou vous êtes-vous équipé d'une pompe à chaleur ou d'un poêle à bois ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une pompe à chaleur ou poêle à bois\"},\"cold_water\":{\"title\":\"Eau\",\"question\":\"Votre eau est-elle comprise dans vos charges collectives ?\",\"individual\":\"Non\",\"collective\":\"Oui\",\"individual_text\":\"Individuelle\",\"collective_text\":\"Collective\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"},\"hot_water_equipment\":{\"title\":\"Eau chaude\",\"question\":\"Utilisez-vous l’un de ces équipements pour produire votre eau chaude ?\",\"solar\":\"Chauffe-eau solaire\",\"thermodynamic\":\"Chauffe-eau thermodynamique\",\"other\":\"Aucun des deux\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Autre (Fioul, Bois)\",\"title\":\"Source eau chaude\",\"question\":\"Avec quelle source d’énergie votre eau chaude est-elle produite ?\",\"no_fluid_text\":\"Produite ni par de l'électricité, ni par du gaz\",\"0_text\":\"Produite grâce à de l'électricité\",\"2_text\":\"Produite grâce au gaz\",\"3_text\":\"Produite à partir d'un autre moyen que l'électricité ou le gaz\"},\"cooking_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"title\":\"Source cuisson\",\"question\":\"Quel mode de cuisson principal utilisez-vous ?\"},\"update_date\":{\"title\":\"Date de prise d'effet\",\"question\":\"A partir de quelle date souhaitez-vous que ce nouveau profil soit pris en compte dans l'analyse de vos données ?\"},\"fluidType\":{\"0\":\"Électricité\",\"1\":\"Eau\",\"2\":\"Gaz\"},\"form\":{\"button_previous\":\"Précédent\",\"button_next\":\"Suivant\",\"button_end\":\"Terminer\",\"button_loading\":\"Chargement...\"},\"finished\":{\"title\":\"Terminé !\",\"label1\":\"Grâce à ces informations, vous pourrez comparer votre consommation avec celle d'un foyer vous ressemblant davantage !\",\"label2\":\"Nous pourrons aussi vous proposer des astuces pour maîtriser vos consommations adaptées à votre profil.\",\"button_validate\":\"OK\"},\"accessibility\":{\"button_end\":\"Terminer la mise à jour du profil\",\"button_next\":\"Aller à la section suivante\",\"button_previous\":\"Retour à la section précédente\",\"button_update_profile\":\"Ouvrir la page de mise à jour du profil\",\"button_toggle_detail_profile\":\"Afficher ou masquer le détail du profil\",\"button_toggle_export\":\"Afficher ou masquer l'export des données'\",\"button_toggle_average_home\":\"Afficher ou masquer les informations sur le comparatif'\",\"button_validate\":\"Valider\"}},\"export\":{\"title_export\":\"Télécharger mes données\",\"text1\":\"Vous allez télécharger l'historique mensuel de vos fluides sélectionnés\",\"fluid_select\":\"Pour quel(s) fluide(s) souhaitez vous exporter vos données ?\",\"no_data\":\"Vous n'avez aucune donnée de fluide...\",\"button_download\":\"Télécharger\",\"month\":\"Mois\",\"year\":\"Année\",\"consumption\":\"Consommation\",\"maxpower\":\"Puissance max (kVA)\",\"button_close\":\"Fermer la fenêtre\",\"modal_start\":{\"accessibility_title\":\"Commencer le téléchargement\",\"text1\":\"Vous allez télécharger des données personnelles, Ecolyo n’est plus responsable de celles-ci une fois téléchargées\",\"text2\":\"Les données seront téléchargées sous forme de document excel (.xls)\",\"text3\":\"Lancer le téléchargement ?\",\"button_cancel\":\"Annuler\"},\"modal_loading\":{\"accessibility_title\":\"Téléchargement en cours\",\"text1\":\"Données en cours de téléchargement\",\"text2\":\"Veuillez ne pas quitter l’application pendant la récupération et le téléchargement de vos données\",\"button_cancel\":\"Annuler le téléchargement\"},\"modal_done\":{\"accessibility_title\":\"Téléchargement terminé\",\"text1\":\"Vos données ont bien été téléchargées !\",\"text2\":\"Vous pouvez maintenant retrouver l’historique de vos données sur votre appareil\",\"error1\":\"Aïe !\",\"error2\":\"Il semblerait qu’une erreur se soit produite lors du téléchargement de vos données.\",\"button_close\":\"Fermer\",\"button_close_error\":\"Revenir plus tard\"}},\"quiz\":{\"explanation\":\"Répondez correctement aux 5 questions et remportez 5 des 15 étoiles nécessaires pour débloquer le duel final\",\"score_final\":\"SCORE FINAL\",\"correct\":\"Bravo !\",\"wrong\":\"Raté !\",\"rightAnswer\":\"Bonne réponse :\",\"earn\":\"Vous remportez\",\"button_go_back\":\"Retour\",\"button_end_quiz\":\"Youpi !\",\"button_try_again\":\"Réessayer\",\"button_validate\":\"Valider\",\"next\":\"Suivant\",\"consumption_question\":\"Question sur votre consommation\",\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_end_quiz\":\"Terminer le quiz\",\"button_go_back\":\"Retour\",\"button_go_next\":\"Suivant\",\"button_try_again\":\"Relancer le quiz\",\"button_validate\":\"Valider\"}},\"splashscreen\":{\"error_loading\":\"Une erreur est survenue\",\"button_reload\":\"Réessayer\",\"accessibility\":{\"button_reload\":\"Recharger la page\"},\"migration_error\":\"Mise à jour de l'application\",\"consent_error\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"profile_error\":\"Chargement de votre profil utilisateur\",\"profileType_error\":\"Chargement de votre profil de consommation.\",\"challenges_error\":\"Actualisation de votre progression dans les défis\",\"analysis_error\":\"Chargement de votre analyse mensuelle\",\"index_error\":\"Chargement des index\",\"prices_error\":\"Mise à jour des prix\",\"consos_error\":\"Connexion à vos données de consommation\",\"partners_error\":\"Récupération de l'état des services partenaires\",\"unknown_error\":\"Veuillez vérifier votre connexion internet\",\"network_error\":\"Erreur de réseau\",\"step\":{\"0\":\"Mise à jour de l'application\",\"1\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"2\":\"Chargement de votre profil\",\"3\":\"Actualisation de votre progression dans les défis\",\"4\":\"Mise à jour des prix\",\"5\":\"Connexion à vos données de consommation\"}},\"timestep\":{\"today\":\"Aujourd'hui\",\"year\":{\"period\":\"5 ans\",\"comparelabel\":\"Comparer à l'année précédente\"},\"month\":{\"period\":\"Année\",\"comparelabel\":\"Comparer à l'année précédente\",\"current\":\"année actuelle\",\"last\":\"année précédente\"},\"day\":{\"period\":\"Mois\",\"comparelabel\":\"Comparer au mois précédent\",\"current\":\"mois actuel\",\"last\":\"mois précédent\"},\"week\":{\"period\":\"Semaine\",\"comparelabel\":\"Comparer à la semaine précédente\",\"current\":\"semaine actuelle\",\"last\":\"semaine précédente\"},\"half_an_hour\":{\"period\":\"Jour\",\"comparelabel\":\"Comparer à la journée précédente\",\"gather_data_title\":\"La récupération de vos données demi-horaires prend environ 24h.\",\"current\":\"jour actuel\",\"last\":\"jour précédent\",\"gather_data_subtitle\":\"Votre connexion a bien été prise en compte mais un délai de 24h est en général nécessaire à l’obtention de vos données.\\nÀ demain !\",\"analysis_waiting_data\":\"Pour bénéficier d'une analyse approfondie de votre consommation électrique, il nous faut récupérer vos données de consommation horaires. La récupération de ces données prend environ 24h. A bientôt !\"},\"accessibility\":{\"button_zoom_in\":\"Sélectionner le pas de temps précédent\",\"button_zoom_out\":\"Sélectionner le pas de temps suivant\"}},\"unsubscribe\":{\"error\":\"Une erreur est survenue lors de votre désinscription, merci de ré-essayer plus tard.\",\"unsubscribed\":\"Vous êtes désormais désabonné\",\"subscribed\":\"Vous allez recevoir les prochaines newsletters\",\"content\":\"Vous ne recevrez plus la notification de votre bilan ainsi que les conseils associés au mois en cours.\",\"button_subscribe\":\"Je souhaite me ré-abonner à la newsletter\",\"button_home\":\"Me connecter\"},\"welcome_modal\":{\"title\":\"Félicitations\",\"perso\":\"Votre espace personnel a bien été créé.\",\"connect\":\"Vous pouvez maintenant connecter vos compteurs d’énergie à Ecolyo en toute sécurité.\",\"button_valid\":\"Ok\",\"accessibility\":{\"title\":\"Fenêtre de félicitations\",\"button_valid\":\"Valider\"}}}"); /***/ }), @@ -14303,17 +14277,6 @@ var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WE "use strict"; -/***/ }), - -/***/ "Nx9u": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("DjJv")(false); -// Module -exports.push([module.i, "/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n.unsubscribe-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n max-width: 450px;\n margin: auto;\n padding: 2rem;\n text-align: center;\n}\n.unsubscribe-container .head {\n color: #e3b82a;\n}\n.unsubscribe-container .question {\n color: #ffffff;\n}", ""]); - - - /***/ }), /***/ "OSxX": @@ -18765,98 +18728,6 @@ if(false) {} /***/ }), -/***/ "XxCo": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("jm00"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); -var _core = __webpack_require__("rMFn"); -var _CHALLENGE = _interopRequireDefault(__webpack_require__("bWtM")); -var _StyledIcon = _interopRequireDefault(__webpack_require__("VP3k")); -var _Content = _interopRequireDefault(__webpack_require__("Yd9R")); -var _CozyBar = _interopRequireDefault(__webpack_require__("6pCu")); -var _Header = _interopRequireDefault(__webpack_require__("0soq")); -var _I18n = __webpack_require__("nUfk"); -var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); -var _reactRouterDom = __webpack_require__("Iyno"); -var _hooks = __webpack_require__("6FOS"); -var _profile = __webpack_require__("quVB"); -__webpack_require__("8seL"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -var UnSubscribeView = function UnSubscribeView() { - var _useI18n = (0, _I18n.useI18n)(), - t = _useI18n.t; - var navigate = (0, _reactRouterDom.useNavigate)(); - var dispatch = (0, _hooks.useAppDispatch)(); - var _useState = (0, _react.useState)(0), - _useState2 = (0, _slicedToArray2.default)(_useState, 2), - headerHeight = _useState2[0], - setHeaderHeight = _useState2[1]; - var unSubscribe = /*#__PURE__*/function () { - var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - dispatch((0, _profile.updateProfile)({ - sendAnalysisNotification: false - })); - navigate('/consumption'); - case 2: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - return function unSubscribe() { - return _ref.apply(this, arguments); - }; - }(); - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_CozyBar.default, { - titleKey: "common.title_analysis" - }), /*#__PURE__*/_react.default.createElement(_Header.default, { - setHeaderHeight: setHeaderHeight, - desktopTitleKey: "common.title_analysis" - }), /*#__PURE__*/_react.default.createElement(_Content.default, { - heightOffset: headerHeight - }, /*#__PURE__*/_react.default.createElement("div", { - className: "unsubscribe-container" - }, /*#__PURE__*/_react.default.createElement(_StyledIcon.default, { - className: "profile-icon", - icon: _CHALLENGE.default, - size: 250 - }), /*#__PURE__*/_react.default.createElement("div", { - className: "text-20-bold head" - }, t('unsubscribe.title')), /*#__PURE__*/_react.default.createElement("div", { - className: "text-16-normal question" - }, t('unsubscribe.content')), /*#__PURE__*/_react.default.createElement(_core.Button, { - "aria-label": t('unsubscribe.button_accessibility'), - onClick: function onClick() { - return unSubscribe(); - }, - variant: "contained", - classes: { - root: 'btnPrimary', - label: 'text-18-bold' - } - }, t('unsubscribe.button_text'))))); -}; -var _default = UnSubscribeView; -exports.default = _default; - -/***/ }), - /***/ "Y+ut": /***/ (function(module, exports, __webpack_require__) { @@ -19630,7 +19501,6 @@ var _EcogestureFormView = _interopRequireDefault(__webpack_require__("uaya")); var _EcogestureSelectionView = _interopRequireDefault(__webpack_require__("9Dbo")); var _ExplorationView = _interopRequireDefault(__webpack_require__("3CcZ")); var _Loader = _interopRequireDefault(__webpack_require__("6oIw")); -var _UnSubscribeView = _interopRequireDefault(__webpack_require__("XxCo")); var _QuizView = _interopRequireDefault(__webpack_require__("yaTP")); var _TermsView = _interopRequireDefault(__webpack_require__("qCy9")); var _enums = __webpack_require__("j0hM"); @@ -19639,25 +19509,25 @@ var _reactRouterDom = __webpack_require__("Iyno"); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var ConsumptionView = /*#__PURE__*/(0, _react.lazy)(function () { - return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(6), __webpack_require__.e(4)]).then(__webpack_require__.t.bind(null, "pMGC", 7)); + return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(7), __webpack_require__.e(5)]).then(__webpack_require__.t.bind(null, "pMGC", 7)); }); var EcogestureTabsView = /*#__PURE__*/(0, _react.lazy)(function () { - return __webpack_require__.e(/* import() */ 2).then(__webpack_require__.t.bind(null, "duvQ", 7)); + return __webpack_require__.e(/* import() */ 3).then(__webpack_require__.t.bind(null, "duvQ", 7)); }); var SingleEcogestureView = /*#__PURE__*/(0, _react.lazy)(function () { - return __webpack_require__.e(/* import() */ 7).then(__webpack_require__.t.bind(null, "Xpq3", 7)); + return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.t.bind(null, "Xpq3", 7)); }); var OptionsView = /*#__PURE__*/(0, _react.lazy)(function () { - return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(10), __webpack_require__.e(5)]).then(__webpack_require__.t.bind(null, "tqkp", 7)); + return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(11), __webpack_require__.e(6)]).then(__webpack_require__.t.bind(null, "tqkp", 7)); }); var LegalNoticeView = /*#__PURE__*/(0, _react.lazy)(function () { - return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.t.bind(null, "khfY", 7)); + return __webpack_require__.e(/* import() */ 10).then(__webpack_require__.t.bind(null, "khfY", 7)); }); var GCUView = /*#__PURE__*/(0, _react.lazy)(function () { - return __webpack_require__.e(/* import() */ 8).then(__webpack_require__.t.bind(null, "7qbG", 7)); + return __webpack_require__.e(/* import() */ 9).then(__webpack_require__.t.bind(null, "7qbG", 7)); }); var AnalysisView = /*#__PURE__*/(0, _react.lazy)(function () { - return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(6), __webpack_require__.e(10), __webpack_require__.e(3)]).then(__webpack_require__.t.bind(null, "iP2k", 7)); + return Promise.all(/* import() */[__webpack_require__.e(0), __webpack_require__.e(7), __webpack_require__.e(11), __webpack_require__.e(4)]).then(__webpack_require__.t.bind(null, "iP2k", 7)); }); var ProfileTypeView = /*#__PURE__*/(0, _react.lazy)(function () { return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(null, "biw3", 7)); @@ -19745,9 +19615,6 @@ var AppRoutes = function AppRoutes(_ref) { }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, { path: "/profiletype", element: /*#__PURE__*/_react.default.createElement(ProfileTypeView, null) - }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, { - path: "/unsubscribe", - element: /*#__PURE__*/_react.default.createElement(_UnSubscribeView.default, null) }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, { path: "*", element: /*#__PURE__*/_react.default.createElement(_reactRouterDom.Navigate, { diff --git a/index.html b/index.html index da01887d8..179e0ddf8 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.50523ef7f4b4a6406417.js"></script><script src="app/ecolyo.5f575df2443369bd6116.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.282ad4ac6d5dbc59b8e8.js"></script><script src="app/ecolyo.ff0a90bb06df93b4038c.js"></script></div></body></html> \ No newline at end of file diff --git a/manifest.webapp b/manifest.webapp index 1d0bc9644..c27d875de 100644 --- a/manifest.webapp +++ b/manifest.webapp @@ -166,6 +166,11 @@ "url": "https://www.grandlyon.com/" }, "routes": { + "/public": { + "folder": "/public", + "index": "index.html", + "public": true + }, "/": { "folder": "/", "index": "index.html", diff --git a/offline.html b/offline.html index f310b42c3..eff28e28a 100644 --- a/offline.html +++ b/offline.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> @@ -52,30 +52,7 @@ <nav></nav> <div class="container"> <section> - <svg - width="80" - height="80" - viewBox="0 0 16 16" - fill="none" - xmlns="http://www.w3.org/2000/svg" - > - <path - d="M8.01323 15.059C14.8544 12.3888 14.3227 8.59276 13.9682 2.93081C11.7705 2.8343 9.82099 2.15873 8.01323 1.03278C6.20546 2.15873 4.25592 2.8343 2.05825 2.93081C1.70378 8.59276 1.17209 12.3888 8.01323 15.059Z" - fill="#1B1C22" - /> - <path - d="M8.01325 0L7.54979 0.288665C5.85495 1.34429 4.05006 1.96586 2.01981 2.05502L1.23259 2.08959L1.18335 2.87604C1.16873 3.10958 1.15353 3.34193 1.13842 3.57294C0.97583 6.05878 0.823332 8.39029 1.50758 10.3994C2.29645 12.7158 4.12651 14.483 7.69452 15.8756L8.01325 16V15.059C1.44034 12.4935 1.67345 8.88869 2.01622 3.58822C2.03021 3.37192 2.04438 3.1528 2.05827 2.93081C4.25595 2.8343 6.20549 2.15873 8.01325 1.03277V0Z" - fill="#FFC600" - /> - <path - d="M8.01323 0L8.4767 0.288665C10.1715 1.34429 11.9764 1.96586 14.0067 2.05502L14.7939 2.08959L14.8431 2.87604C14.8578 3.10958 14.873 3.34193 14.8881 3.57294C15.0507 6.05878 15.2032 8.39029 14.5189 10.3994C13.73 12.7158 11.9 14.483 8.33197 15.8756L8.01323 16V15.059C14.5862 12.4935 14.353 8.88869 14.0103 3.58822C13.9963 3.37192 13.9821 3.1528 13.9682 2.93081C11.7705 2.8343 9.821 2.15873 8.01323 1.03277V0Z" - fill="#DB8300" - /> - <path - d="M5.85148 5.51416H6.16248C6.28668 5.51416 6.4058 5.56292 6.49363 5.64973C6.58146 5.73653 6.6308 5.85427 6.6308 5.97703V10.6758H5.38316V5.97703C5.38316 5.85427 5.4325 5.73653 5.52033 5.64973C5.60815 5.56292 5.72727 5.51416 5.85148 5.51416ZM8.01233 7.80214H8.32333C8.44754 7.80214 8.56666 7.85091 8.65448 7.93771C8.74231 8.02452 8.79165 8.14225 8.79165 8.26502V10.6758H7.54401V8.26502C7.54401 8.14225 7.59335 8.02452 7.68118 7.93771C7.76901 7.85091 7.88813 7.80214 8.01233 7.80214ZM10.302 6.91708H10.613C10.7372 6.91708 10.8563 6.96584 10.9441 7.05265C11.032 7.13945 11.0813 7.25719 11.0813 7.37995V10.6758H9.83366V7.37995C9.83366 7.25719 9.883 7.13945 9.97083 7.05265C10.0587 6.96584 10.1778 6.91708 10.302 6.91708Z" - fill="#FFC600" - /> - </svg> + <img src="./icon.svg" alt="logo Ecolyo" height="80px" width="80px" /> <p class="text-16-white">Hors ligne</p> <p class="text-16-white"> Vérifiez votre connexion pour lancer Ecolyo. diff --git a/public/ecolyo.e5c9e64081aae31cdba7.js b/public/ecolyo.e5c9e64081aae31cdba7.js new file mode 100644 index 000000000..ec274098f --- /dev/null +++ b/public/ecolyo.e5c9e64081aae31cdba7.js @@ -0,0 +1,181589 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "+2Xp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WINDOW", function() { return WINDOW; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +const WINDOW = _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"] ; + + +//# sourceMappingURL=types.js.map + + +/***/ }), + +/***/ "+2mR": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("IU9S"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex, camelcase */ + + + + + + +/** + * Utility component that locks focus inside the component. + */ + +function Unstable_TrapFocus(props) { + var children = props.children, + _props$disableAutoFoc = props.disableAutoFocus, + disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc, + _props$disableEnforce = props.disableEnforceFocus, + disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce, + _props$disableRestore = props.disableRestoreFocus, + disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore, + getDoc = props.getDoc, + isEnabled = props.isEnabled, + open = props.open; + var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](); + var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null); + var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null); + var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](); + var rootRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null); // can be removed once we drop support for non ref forwarding class components + + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (instance) { + // #StrictMode ready + rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"](instance); + }, []); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__["default"])(children.ref, handleOwnRef); + var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](); + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + prevOpenRef.current = open; + }, [open]); + + if (!prevOpenRef.current && open && typeof window !== 'undefined') { + // WARNING: Potentially unsafe in concurrent mode. + // The way the read on `nodeToRestore` is setup could make this actually safe. + // Say we render `open={false}` -> `open={true}` but never commit. + // We have now written a state that wasn't committed. But no committed effect + // will read this wrong value. We only read from `nodeToRestore` in effects + // that were committed on `open={true}` + // WARNING: Prevents the instance from being garbage collected. Should only + // hold a weak ref. + nodeToRestore.current = getDoc().activeElement; + } + + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (!open) { + return; + } + + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__["default"])(rootRef.current); // We might render an empty child. + + if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) { + if (!rootRef.current.hasAttribute('tabIndex')) { + if (false) {} + + rootRef.current.setAttribute('tabIndex', -1); + } + + rootRef.current.focus(); + } + + var contain = function contain() { + var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17. + // Contain can be called between the component being unmounted and its cleanup function being run. + + if (rootElement === null) { + return; + } + + if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) { + ignoreNextEnforceFocus.current = false; + return; + } + + if (rootRef.current && !rootRef.current.contains(doc.activeElement)) { + rootRef.current.focus(); + } + }; + + var loopFocus = function loopFocus(event) { + // 9 = Tab + if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) { + return; + } // Make sure the next tab starts from the right place. + + + if (doc.activeElement === rootRef.current) { + // We need to ignore the next contain as + // it will try to move the focus back to the rootRef element. + ignoreNextEnforceFocus.current = true; + + if (event.shiftKey) { + sentinelEnd.current.focus(); + } else { + sentinelStart.current.focus(); + } + } + }; + + doc.addEventListener('focus', contain, true); + doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area + // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561. + // + // The whatwg spec defines how the browser should behave but does not explicitly mention any events: + // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule. + + var interval = setInterval(function () { + contain(); + }, 50); + return function () { + clearInterval(interval); + doc.removeEventListener('focus', contain, true); + doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus() + + if (!disableRestoreFocus) { + // In IE 11 it is possible for document.activeElement to be null resulting + // in nodeToRestore.current being null. + // Not all elements in IE 11 have a focus method. + // Once IE 11 support is dropped the focus() call can be unconditional. + if (nodeToRestore.current && nodeToRestore.current.focus) { + nodeToRestore.current.focus(); + } + + nodeToRestore.current = null; + } + }; + }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { + tabIndex: 0, + ref: sentinelStart, + "data-test": "sentinelStart" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](children, { + ref: handleRef + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { + tabIndex: 0, + ref: sentinelEnd, + "data-test": "sentinelEnd" + })); +} + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Unstable_TrapFocus); + +/***/ }), + +/***/ "+5Qr": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + function futureSeconds (text) { + return text.replace(/sekuntia?/, 'sekunnin') + } + + function futureMinutes (text) { + return text.replace(/minuuttia?/, 'minuutin') + } + + function futureHours (text) { + return text.replace(/tuntia?/, 'tunnin') + } + + function futureDays (text) { + return text.replace(/päivää?/, 'päivän') + } + + function futureMonths (text) { + return text.replace(/(kuukausi|kuukautta)/, 'kuukauden') + } + + function futureYears (text) { + return text.replace(/(vuosi|vuotta)/, 'vuoden') + } + + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'alle sekunti', + other: 'alle {{count}} sekuntia', + futureTense: futureSeconds + }, + + xSeconds: { + one: 'sekunti', + other: '{{count}} sekuntia', + futureTense: futureSeconds + }, + + halfAMinute: { + one: 'puoli minuuttia', + other: 'puoli minuuttia', + futureTense: function (text) { + return 'puolen minuutin' + } + }, + + lessThanXMinutes: { + one: 'alle minuutti', + other: 'alle {{count}} minuuttia', + futureTense: futureMinutes + }, + + xMinutes: { + one: 'minuutti', + other: '{{count}} minuuttia', + futureTense: futureMinutes + }, + + aboutXHours: { + one: 'noin tunti', + other: 'noin {{count}} tuntia', + futureTense: futureHours + }, + + xHours: { + one: 'tunti', + other: '{{count}} tuntia', + futureTense: futureHours + }, + + xDays: { + one: 'päivä', + other: '{{count}} päivää', + futureTense: futureDays + }, + + aboutXMonths: { + one: 'noin kuukausi', + other: 'noin {{count}} kuukautta', + futureTense: futureMonths + }, + + xMonths: { + one: 'kuukausi', + other: '{{count}} kuukautta', + futureTense: futureMonths + }, + + aboutXYears: { + one: 'noin vuosi', + other: 'noin {{count}} vuotta', + futureTense: futureYears + }, + + xYears: { + one: 'vuosi', + other: '{{count}} vuotta', + futureTense: futureYears + }, + + overXYears: { + one: 'yli vuosi', + other: 'yli {{count}} vuotta', + futureTense: futureYears + }, + + almostXYears: { + one: 'lähes vuosi', + other: 'lähes {{count}} vuotta', + futureTense: futureYears + } + } + + function localize (token, count, options) { + options = options || {} + + var distance = distanceInWordsLocale[token] + var result = count === 1 ? distance.one : distance.other.replace('{{count}}', count) + + if (options.addSuffix) { + if (options.comparison > 0) { + return distance.futureTense(result) + ' kuluttua' + } else { + return result + ' sitten' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "+6w6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("49+2"); + + + + + + + + + + // Force a side effect so we don't have any override priority issue. +// eslint-disable-next-line no-unused-expressions + +_Button__WEBPACK_IMPORTED_MODULE_9__["default"].styles; +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + borderRadius: theme.shape.borderRadius + }, + + /* Styles applied to the root element if `variant="contained"`. */ + contained: { + boxShadow: theme.shadows[2] + }, + + /* Styles applied to the root element if `disableElevation={true}`. */ + disableElevation: { + boxShadow: 'none' + }, + + /* Pseudo-class applied to child elements if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `fullWidth={true}`. */ + fullWidth: { + width: '100%' + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + flexDirection: 'column' + }, + + /* Styles applied to the children. */ + grouped: { + minWidth: 40 + }, + + /* Styles applied to the children if `orientation="horizontal"`. */ + groupedHorizontal: { + '&:not(:first-child)': { + borderTopLeftRadius: 0, + borderBottomLeftRadius: 0 + }, + '&:not(:last-child)': { + borderTopRightRadius: 0, + borderBottomRightRadius: 0 + } + }, + + /* Styles applied to the children if `orientation="vertical"`. */ + groupedVertical: { + '&:not(:first-child)': { + borderTopRightRadius: 0, + borderTopLeftRadius: 0 + }, + '&:not(:last-child)': { + borderBottomRightRadius: 0, + borderBottomLeftRadius: 0 + } + }, + + /* Styles applied to the children if `variant="text"`. */ + groupedText: {}, + + /* Styles applied to the children if `variant="text"` and `orientation="horizontal"`. */ + groupedTextHorizontal: { + '&:not(:last-child)': { + borderRight: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)') + } + }, + + /* Styles applied to the children if `variant="text"` and `orientation="vertical"`. */ + groupedTextVertical: { + '&:not(:last-child)': { + borderBottom: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)') + } + }, + + /* Styles applied to the children if `variant="text"` and `color="primary"`. */ + groupedTextPrimary: { + '&:not(:last-child)': { + borderColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, 0.5) + } + }, + + /* Styles applied to the children if `variant="text"` and `color="secondary"`. */ + groupedTextSecondary: { + '&:not(:last-child)': { + borderColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, 0.5) + } + }, + + /* Styles applied to the children if `variant="outlined"`. */ + groupedOutlined: {}, + + /* Styles applied to the children if `variant="outlined"` and `orientation="horizontal"`. */ + groupedOutlinedHorizontal: { + '&:not(:first-child)': { + marginLeft: -1 + }, + '&:not(:last-child)': { + borderRightColor: 'transparent' + } + }, + + /* Styles applied to the children if `variant="outlined"` and `orientation="vertical"`. */ + groupedOutlinedVertical: { + '&:not(:first-child)': { + marginTop: -1 + }, + '&:not(:last-child)': { + borderBottomColor: 'transparent' + } + }, + + /* Styles applied to the children if `variant="outlined"` and `color="primary"`. */ + groupedOutlinedPrimary: { + '&:hover': { + borderColor: theme.palette.primary.main + } + }, + + /* Styles applied to the children if `variant="outlined"` and `color="secondary"`. */ + groupedOutlinedSecondary: { + '&:hover': { + borderColor: theme.palette.secondary.main + } + }, + + /* Styles applied to the children if `variant="contained"`. */ + groupedContained: { + boxShadow: 'none' + }, + + /* Styles applied to the children if `variant="contained"` and `orientation="horizontal"`. */ + groupedContainedHorizontal: { + '&:not(:last-child)': { + borderRight: "1px solid ".concat(theme.palette.grey[400]), + '&$disabled': { + borderRight: "1px solid ".concat(theme.palette.action.disabled) + } + } + }, + + /* Styles applied to the children if `variant="contained"` and `orientation="vertical"`. */ + groupedContainedVertical: { + '&:not(:last-child)': { + borderBottom: "1px solid ".concat(theme.palette.grey[400]), + '&$disabled': { + borderBottom: "1px solid ".concat(theme.palette.action.disabled) + } + } + }, + + /* Styles applied to the children if `variant="contained"` and `color="primary"`. */ + groupedContainedPrimary: { + '&:not(:last-child)': { + borderColor: theme.palette.primary.dark + } + }, + + /* Styles applied to the children if `variant="contained"` and `color="secondary"`. */ + groupedContainedSecondary: { + '&:not(:last-child)': { + borderColor: theme.palette.secondary.dark + } + } + }; +}; +var ButtonGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ButtonGroup(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableElevati = props.disableElevation, + disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati, + _props$disableFocusRi = props.disableFocusRipple, + disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, + _props$disableRipple = props.disableRipple, + disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'outlined' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "color", "component", "disabled", "disableElevation", "disableFocusRipple", "disableRipple", "fullWidth", "orientation", "size", "variant"]); + + var buttonClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.grouped, classes["grouped".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(orientation))], classes["grouped".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(variant))], classes["grouped".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(variant)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(orientation))], classes["grouped".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(variant)).concat(color !== 'default' ? Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(color) : '')], disabled && classes.disabled); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + role: "group", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical), + ref: ref + }, other), react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return null; + } + + if (false) {} + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(buttonClassName, child.props.className), + color: child.props.color || color, + disabled: child.props.disabled || disabled, + disableElevation: child.props.disableElevation || disableElevation, + disableFocusRipple: disableFocusRipple, + disableRipple: disableRipple, + fullWidth: fullWidth, + size: child.props.size || size, + variant: child.props.variant || variant + }); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiButtonGroup' +})(ButtonGroup)); + +/***/ }), + +/***/ "+71A": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return ErrorBoundary; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNKNOWN_COMPONENT", function() { return UNKNOWN_COMPONENT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAtLeastReact17", function() { return isAtLeastReact17; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withErrorBoundary", function() { return withErrorBoundary; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); + + + + + +const _jsxFileName = "/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/errorboundary.tsx"; +function isAtLeastReact17(version) { + const major = version.match(/^([^.]+)/); + return major !== null && parseInt(major[0]) >= 17; +} + +const UNKNOWN_COMPONENT = 'unknown'; + +const INITIAL_STATE = { + componentStack: null, + error: null, + eventId: null, +}; + +/** + * A ErrorBoundary component that logs errors to Sentry. Requires React >= 16. + * NOTE: If you are a Sentry user, and you are seeing this stack frame, it means the + * Sentry React SDK ErrorBoundary caught an error invoking your application code. This + * is expected behavior and NOT indicative of a bug with the Sentry React SDK. + */ +class ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_3__["Component"] {constructor(...args) { super(...args); ErrorBoundary.prototype.__init.call(this);ErrorBoundary.prototype.__init2.call(this); } + __init() {this.state = INITIAL_STATE;} + + componentDidCatch(error, { componentStack }) { + const { beforeCapture, onError, showDialog, dialogOptions } = this.props; + + Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["withScope"])(scope => { + // If on React version >= 17, create stack trace from componentStack param and links + // to to the original error using `error.cause` otherwise relies on error param for stacktrace. + // Linking errors requires the `LinkedErrors` integration be enabled. + // See: https://reactjs.org/blog/2020/08/10/react-v17-rc.html#native-component-stacks + // + // Although `componentDidCatch` is typed to accept an `Error` object, it can also be invoked + // with non-error objects. This is why we need to check if the error is an error-like object. + // See: https://github.com/getsentry/sentry-javascript/issues/6167 + if (isAtLeastReact17(react__WEBPACK_IMPORTED_MODULE_3__["version"]) && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isError"])(error)) { + const errorBoundaryError = new Error(error.message); + errorBoundaryError.name = `React ErrorBoundary ${errorBoundaryError.name}`; + errorBoundaryError.stack = componentStack; + + // Using the `LinkedErrors` integration to link the errors together. + error.cause = errorBoundaryError; + } + + if (beforeCapture) { + beforeCapture(scope, error, componentStack); + } + const eventId = Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureException"])(error, { contexts: { react: { componentStack } } }); + if (onError) { + onError(error, componentStack, eventId); + } + if (showDialog) { + Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["showReportDialog"])({ ...dialogOptions, eventId }); + } + + // componentDidCatch is used over getDerivedStateFromError + // so that componentStack is accessible through state. + this.setState({ error, componentStack, eventId }); + }); + } + + componentDidMount() { + const { onMount } = this.props; + if (onMount) { + onMount(); + } + } + + componentWillUnmount() { + const { error, componentStack, eventId } = this.state; + const { onUnmount } = this.props; + if (onUnmount) { + onUnmount(error, componentStack, eventId); + } + } + + __init2() {this.resetErrorBoundary = () => { + const { onReset } = this.props; + const { error, componentStack, eventId } = this.state; + if (onReset) { + onReset(error, componentStack, eventId); + } + this.setState(INITIAL_STATE); + };} + + render() { + const { fallback, children } = this.props; + const { error, componentStack, eventId } = this.state; + + if (error) { + let element = undefined; + if (typeof fallback === 'function') { + element = fallback({ error, componentStack, resetError: this.resetErrorBoundary, eventId }); + } else { + element = fallback; + } + + if (react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](element)) { + return element; + } + + if (fallback) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('fallback did not produce a valid ReactElement'); + } + + // Fail gracefully if no fallback provided or is not valid + return null; + } + + if (typeof children === 'function') { + return (children )(); + } + return children; + } +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function withErrorBoundary( + WrappedComponent, + errorBoundaryOptions, +) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const componentDisplayName = WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT; + + const Wrapped = (props) => ( + react__WEBPACK_IMPORTED_MODULE_3__["createElement"](ErrorBoundary, { ...errorBoundaryOptions, __self: this, __source: {fileName: _jsxFileName, lineNumber: 173}} + , react__WEBPACK_IMPORTED_MODULE_3__["createElement"](WrappedComponent, { ...props, __self: this, __source: {fileName: _jsxFileName, lineNumber: 174}} ) + ) + ); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + Wrapped.displayName = `errorBoundary(${componentDisplayName})`; + + // Copy over static methods from Wrapped component to Profiler HOC + // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Wrapped, WrappedComponent); + return Wrapped; +} + + +//# sourceMappingURL=errorboundary.js.map + + +/***/ }), + +/***/ "+ABJ": +/***/ (function(module, exports, __webpack_require__) { + +var getTag = __webpack_require__("FqJm"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; + + +/***/ }), + +/***/ "+Bmy": +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__("+ERu"), + toKey = __webpack_require__("Iv0v"); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + + +/***/ }), + +/***/ "+ERu": +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__("8u9v"), + isKey = __webpack_require__("sMdj"), + stringToPath = __webpack_require__("YhHV"), + toString = __webpack_require__("GCWF"); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; + + +/***/ }), + +/***/ "+Glb": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("xomR")('asyncIterator'); + + +/***/ }), + +/***/ "+IMj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* eslint-disable no-var, prefer-template */ +var uppercasePattern = /[A-Z]/g +var msPattern = /^ms-/ +var cache = {} + +function toHyphenLower(match) { + return '-' + match.toLowerCase() +} + +function hyphenateStyleName(name) { + if (cache.hasOwnProperty(name)) { + return cache[name] + } + + var hName = name.replace(uppercasePattern, toHyphenLower) + return (cache[name] = msPattern.test(hName) ? '-' + hName : hName) +} + +/* harmony default export */ __webpack_exports__["default"] = (hyphenateStyleName); + + +/***/ }), + +/***/ "+IPG": +/***/ (function(module, exports, __webpack_require__) { + +var coreJsData = __webpack_require__("GRrc"); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; + + +/***/ }), + +/***/ "+IUY": +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__("MrcW"); +var ITERATOR = __webpack_require__("Yhpl")('iterator'); +var Iterators = __webpack_require__("Ikrg"); +module.exports = __webpack_require__("WSXa").getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), + +/***/ "+IXE": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), + +/***/ "+J27": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("HHUO"); +module.exports = __webpack_require__("WSXa").Object.getOwnPropertyDescriptors; + + +/***/ }), + +/***/ "+KM7": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqual = __webpack_require__("kSPP"); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; + + +/***/ }), + +/***/ "+Kpw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Postgres", function() { return Postgres; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +/** Tracing integration for node-postgres package */ +class Postgres { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Postgres';} + + /** + * @inheritDoc + */ + __init() {this.name = Postgres.id;} + + constructor(options = {}) {;Postgres.prototype.__init.call(this); + this._usePgNative = !!options.usePgNative; + } + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + const pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"])('pg'); + + if (!pkg) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Postgres Integration was unable to require `pg` package.'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Postgres Integration is skipped because of instrumenter configuration.'); + return; + } + + if (this._usePgNative && !Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client])) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error("Postgres Integration was unable to access 'pg-native' bindings."); + return; + } + + const { Client } = this._usePgNative ? pkg.native : pkg; + + /** + * function (query, callback) => void + * function (query, params, callback) => void + * function (query) => Promise + * function (query, params) => Promise + * function (pg.Cursor) => pg.Cursor + */ + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(Client.prototype, 'query', function (orig) { + return function ( config, values, callback) { + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _4 => _4.getSpan, 'call', _5 => _5()]); + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({ + description: typeof config === 'string' ? config : (config ).text, + op: 'db', + })]); + + if (typeof callback === 'function') { + return orig.call(this, config, values, function (err, result) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + callback(err, result); + }); + } + + if (typeof values === 'function') { + return orig.call(this, config, function (err, result) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _10 => _10.finish, 'call', _11 => _11()]); + values(err, result); + }); + } + + const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config); + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(rv)) { + return rv.then((res) => { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]); + return res; + }); + } + + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _14 => _14.finish, 'call', _15 => _15()]); + return rv; + }; + }); + } +}Postgres.__initStatic(); + + +//# sourceMappingURL=postgres.js.map + + +/***/ }), + +/***/ "+LkS": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'malpli ol sekundo', + other: 'malpli ol {{count}} sekundoj' + }, + + xSeconds: { + one: '1 sekundo', + other: '{{count}} sekundoj' + }, + + halfAMinute: 'duonminuto', + + lessThanXMinutes: { + one: 'malpli ol minuto', + other: 'malpli ol {{count}} minutoj' + }, + + xMinutes: { + one: '1 minuto', + other: '{{count}} minutoj' + }, + + aboutXHours: { + one: 'proksimume 1 horo', + other: 'proksimume {{count}} horoj' + }, + + xHours: { + one: '1 horo', + other: '{{count}} horoj' + }, + + xDays: { + one: '1 tago', + other: '{{count}} tagoj' + }, + + aboutXMonths: { + one: 'proksimume 1 monato', + other: 'proksimume {{count}} monatoj' + }, + + xMonths: { + one: '1 monato', + other: '{{count}} monatoj' + }, + + aboutXYears: { + one: 'proksimume 1 jaro', + other: 'proksimume {{count}} jaroj' + }, + + xYears: { + one: '1 jaro', + other: '{{count}} jaroj' + }, + + overXYears: { + one: 'pli ol 1 jaro', + other: 'pli ol {{count}} jaroj' + }, + + almostXYears: { + one: 'preskaŭ 1 jaro', + other: 'preskaŭ {{count}} jaroj' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'post ' + result + } else { + return 'antaŭ ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "+MTM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Im6z"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NFPV"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("/iOI"); + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + boxSizing: 'border-box', + flexShrink: 0 + }, + + /* Styles applied to the `div` element that wraps the children. */ + tile: { + position: 'relative', + display: 'block', + // In case it's not rendered with a div. + height: '100%', + overflow: 'hidden' + }, + + /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ + imgFullHeight: { + height: '100%', + transform: 'translateX(-50%)', + position: 'relative', + left: '50%' + }, + + /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ + imgFullWidth: { + width: '100%', + position: 'relative', + transform: 'translateY(-50%)', + top: '50%' + } +}; + +var fit = function fit(imgEl, classes) { + if (!imgEl || !imgEl.complete) { + return; + } + + if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) { + var _imgEl$classList, _imgEl$classList2; + + (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + + (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + } else { + var _imgEl$classList3, _imgEl$classList4; + + (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + + (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + } +}; + +function ensureImageCover(imgEl, classes) { + if (!imgEl) { + return; + } + + if (imgEl.complete) { + fit(imgEl, classes); + } else { + imgEl.addEventListener('load', function () { + fit(imgEl, classes); + }); + } +} + +var warnedOnce = false; +/** + * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming. + * + * You should use `import { ImageListItem } from '@material-ui/core'` + * or `import ImageListItem from '@material-ui/core/ImageListItem'`. + */ + +var GridListTile = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function GridListTile(props, ref) { + if (false) {} // cols rows default values are for docs only + + + var children = props.children, + classes = props.classes, + className = props.className, + _props$cols = props.cols, + cols = _props$cols === void 0 ? 1 : _props$cols, + _props$component = props.component, + Component = _props$component === void 0 ? 'li' : _props$component, + _props$rows = props.rows, + rows = _props$rows === void 0 ? 1 : _props$rows, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "cols", "component", "rows"]); + + var imgRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + ensureImageCover(imgRef.current, classes); + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__["default"])(function () { + fit(imgRef.current, classes); + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [classes]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.tile + }, react__WEBPACK_IMPORTED_MODULE_3__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child)) { + return null; + } + + if (child.type === 'img' || Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Image'])) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](child, { + ref: imgRef + }); + } + + return child; + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiGridListTile' +})(GridListTile)); + +/***/ }), + +/***/ "+RmU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.timeBeforeSuccessful = exports.requireDoubleUnsubscriptions = exports.raiseErrorAfterAttempts = exports.onDoubleSubscriptions = exports.maxWaitBetweenRetries = exports.eventNames = exports.baseWaitAfterFirstFailure = exports.allowDoubleSubscriptions = void 0; + +var _logger = _interopRequireDefault(__webpack_require__("o2qs")); + +var ms = 1; +var sec = 1000; +var min = sec * 60; +/** + * When trying to reconnect, do not increase the waiting time + * indefinitely. This is the time one may wait between two + * attempts. + * + * @type {integer} time to wait in millisecond + * @private + */ + +var maxWaitBetweenRetries = 5 * min; +/** + * When reconnecting after an error or an unsuccessful attempt, waits + * an amount of time before a new retry. This time will double + * at each attempt until one is successful or the navigator send an + * 'online' event. + * + * @type {integer} time to wait in millisecond + * @private + */ + +exports.maxWaitBetweenRetries = maxWaitBetweenRetries; +var baseWaitAfterFirstFailure = 128 * ms; +/** + * If a connection is open for this amount of time with no error + * it is marked as successful and the exponential backoff is reseted + * + * @type {integer} time to wait in millisecond + * @private + */ + +exports.baseWaitAfterFirstFailure = baseWaitAfterFirstFailure; +var timeBeforeSuccessful = 1.2 * sec; +/** + * Raise an error after a fixed number of attempt + * + * @type {boolean} + * @private + */ + +exports.timeBeforeSuccessful = timeBeforeSuccessful; +var raiseErrorAfterAttempts = 8; +/** + * If one subscribe multiple times to the exact same event with the exact + * same handler, should we call the handler multiple times for each event? + * eventWhat to do if someone ask multiple times for the same subscription? + * + * If you modify this value, please double check that the tests are ok and + * start a real validation procedure. This is given without any garantee. + * + * @type {boolean} + * @private + */ + +exports.raiseErrorAfterAttempts = raiseErrorAfterAttempts; +var allowDoubleSubscriptions = true; +/** + * If one subscribe multiple times to the exact same event with the exact + * same handler, should we unsubscribe all the corresponding handlers on + * the first call to unsubscribe or should we ask for multiple calls + * to unsubscribe? + * + * If you modify this value, please double check that the tests are ok and + * start a real validation procedure. This is given without any garantee. + * + * @type {boolean} + * @private + */ + +exports.allowDoubleSubscriptions = allowDoubleSubscriptions; +var requireDoubleUnsubscriptions = true; +/** + * If one subscribe multiple times to the exact same event with the exact + * same handler, this function is called. You are welcome to add any + * log or warning you wish, or even to throw an exception. + * This function get a subscription object in parameter. This object has + * the form { eventName, type, id, handler } where id is optional. + * + * @type {Function} + * @private + */ + +exports.requireDoubleUnsubscriptions = requireDoubleUnsubscriptions; + +var onDoubleSubscriptions = function onDoubleSubscriptions(subscription) { + _logger.default.warn('Double subscription for ', subscription); + + if (allowDoubleSubscriptions) { + _logger.default.info('The handler may be called twice for the same event!'); + + _logger.default.info('Remember to call one `unsubscribe` for each `subscribe`'); + } else { + _logger.default.info('The handler will only be called once'); + + if (requireDoubleUnsubscriptions) { + _logger.default.info('Remember to call one `unsubscribe` for each `subscribe`'); + } else { + _logger.default.info('`unsubscribe` will remove all similar subscriptions'); + } + } +}; +/** + * @typedef {'CREATED'|UPDATED'|DELETED'|'NOTIFIED'|'error'} EventName + */ + +/** + * Possible values for the `event` property in Realtime + * + * @type {EventName} + */ + + +exports.onDoubleSubscriptions = onDoubleSubscriptions; +var eventNames = ['CREATED', 'UPDATED', 'DELETED', 'NOTIFIED', 'error']; +exports.eventNames = eventNames; + +/***/ }), + +/***/ "+TZB": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.2.5.3 get RegExp.prototype.flags +var anObject = __webpack_require__("eckd"); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), + +/***/ "+W4M": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aŭg', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januaro', 'februaro', 'marto', 'aprilo', 'majo', 'junio', 'julio', 'aŭgusto', 'septembro', 'oktobro', 'novembro', 'decembro'] + var weekdays2char = ['di', 'lu', 'ma', 'me', 'ĵa', 've', 'sa'] + var weekdays3char = ['dim', 'lun', 'mar', 'mer', 'ĵaŭ', 'ven', 'sab'] + var weekdaysFull = ['dimanĉo', 'lundo', 'mardo', 'merkredo', 'ĵaŭdo', 'vendredo', 'sabato'] + var meridiemUppercase = ['A.T.M.', 'P.T.M.'] + var meridiemLowercase = ['a.t.m.', 'p.t.m.'] + var meridiemFull = ['antaŭtagmeze', 'posttagmeze'] + + var formatters = { + // Month: jan, feb, ..., deс + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: januaro, februaro, ..., decembro + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: di, lu, ..., sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: dim, lun, ..., sab + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: dimanĉo, lundo, ..., sabato + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // A.T.M., P.T.M. + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // a.t.m., p.t.m. + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // antaŭtagmeze, posttagmeze + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return formatters[formatterToken](date) + '-a' + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "+Yo8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.CONTACTS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _get2 = _interopRequireDefault(__webpack_require__("RNXH")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var normalizeMyselfResp = function normalizeMyselfResp(resp) { + return _objectSpread(_objectSpread(_objectSpread({}, (0, _DocumentCollection2.normalizeDoc)(resp.data, CONTACTS_DOCTYPE)), resp.data.attributes), {}, { + _rev: resp.data.meta.rev + }); +}; + +var ContactsCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(ContactsCollection, _DocumentCollection); + + var _super = _createSuper(ContactsCollection); + + function ContactsCollection() { + (0, _classCallCheck2.default)(this, ContactsCollection); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(ContactsCollection, [{ + key: "find", + value: function () { + var _find = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(selector, options) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(selector !== undefined && Object.values(selector).length === 1 && selector['me'] == true)) { + _context.next = 4; + break; + } + + return _context.abrupt("return", this.findMyself()); + + case 4: + return _context.abrupt("return", (0, _get2.default)((0, _getPrototypeOf2.default)(ContactsCollection.prototype), "find", this).call(this, selector, options)); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function find(_x, _x2) { + return _find.apply(this, arguments); + } + + return find; + }() + }, { + key: "findMyself", + value: function () { + var _findMyself = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var resp, col; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this.stackClient.fetchJSON('POST', '/contacts/myself'); + + case 2: + resp = _context2.sent; + col = { + data: [normalizeMyselfResp(resp)], + next: false, + meta: null, + bookmark: false + }; + return _context2.abrupt("return", col); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function findMyself() { + return _findMyself.apply(this, arguments); + } + + return findMyself; + }() + }]); + return ContactsCollection; +}(_DocumentCollection2.default); + +var CONTACTS_DOCTYPE = 'io.cozy.contacts'; +exports.CONTACTS_DOCTYPE = CONTACTS_DOCTYPE; +var _default = ContactsCollection; +exports.default = _default; + +/***/ }), + +/***/ "+aIf": +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__("mOXy"), + baseKeysIn = __webpack_require__("2mG2"), + isArrayLike = __webpack_require__("yTJ1"); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; + + +/***/ }), + +/***/ "+buf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+2mR"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "+c4x": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in English, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + var months3char = ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Sze', 'Okt', 'Nov', 'Dec'] + var monthsFull = ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'] + var weekdays2char = ['Va', 'Hé', 'Ke', 'Sze', 'Cs', 'Pé', 'Szo'] + var weekdays3char = ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'] + var weekdaysFull = ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'] + var meridiemUppercase = ['DE', 'DU'] + var meridiemLowercase = ['de', 'du'] + var meridiemFull = ['délelőtt', 'délután'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var rem100 = number % 100 + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + 'st' + case 2: + return number + 'nd' + case 3: + return number + 'rd' + } + } + return number + 'th' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "+e9u": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Accordion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Vq80"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Accordion__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "+gnj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("vmLq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "+hsk": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_interopRequireDefault", function() { return _interopRequireDefault; }); +/** + * Wraps modules which aren't the result of transpiling an ESM module in an object under the key `default` + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param requireResult The result of calling `require` on a module + * @returns `requireResult` or `requireResult` wrapped in an object, keyed as `default` + */ +function _interopRequireDefault(requireResult) { + return requireResult.__esModule ? requireResult : { default: requireResult }; +} + +// Sucrase version +// function _interopRequireDefault(obj) { +// return obj && obj.__esModule ? obj : { default: obj }; +// } + + +//# sourceMappingURL=_interopRequireDefault.js.map + + +/***/ }), + +/***/ "+lzR": +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__("LRPZ"); + +$export($export.P, 'Array', { fill: __webpack_require__("Axkr") }); + +__webpack_require__("pebw")('fill'); + + +/***/ }), + +/***/ "+qzK": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: '不到 1 秒', + other: '不到 {{count}} 秒' + }, + + xSeconds: { + one: '1 秒', + other: '{{count}} 秒' + }, + + halfAMinute: '半分钟', + + lessThanXMinutes: { + one: '不到 1 分钟', + other: '不到 {{count}} 分钟' + }, + + xMinutes: { + one: '1 分钟', + other: '{{count}} 分钟' + }, + + xHours: { + one: '1 小时', + other: '{{count}} 小时' + }, + + aboutXHours: { + one: '大约 1 小时', + other: '大约 {{count}} 小时' + }, + + xDays: { + one: '1 天', + other: '{{count}} 天' + }, + + aboutXMonths: { + one: '大约 1 个月', + other: '大约 {{count}} 个月' + }, + + xMonths: { + one: '1 个月', + other: '{{count}} 个月' + }, + + aboutXYears: { + one: '大约 1 年', + other: '大约 {{count}} 年' + }, + + xYears: { + one: '1 年', + other: '{{count}} 年' + }, + + overXYears: { + one: '超过 1 年', + other: '超过 {{count}} 年' + }, + + almostXYears: { + one: '将近 1 年', + other: '将近 {{count}} 年' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return result + '内' + } else { + return result + '前' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "+s1f": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "RealtimePlugin", { + enumerable: true, + get: function get() { + return _RealtimePlugin.default; + } +}); +exports.default = void 0; +Object.defineProperty(exports, "useRealtime", { + enumerable: true, + get: function get() { + return _useRealtime.default; + } +}); + +var _CozyRealtime = _interopRequireDefault(__webpack_require__("PdKc")); + +var _useRealtime = _interopRequireDefault(__webpack_require__("4fbw")); + +var _RealtimePlugin = _interopRequireDefault(__webpack_require__("2D1v")); + +var _default = _CozyRealtime.default; +exports.default = _default; + +/***/ }), + +/***/ "+s9e": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("LPvn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dCuL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("umgW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return _components_Context__WEBPACK_IMPORTED_MODULE_2__["ReactReduxContext"]; }); + +/* harmony import */ var _connect_connect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("aloy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _connect_connect__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("0xh1"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useDispatch", function() { return _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__["useDispatch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDispatchHook", function() { return _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_4__["createDispatchHook"]; }); + +/* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("hhFU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useSelector", function() { return _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__["useSelector"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSelectorHook", function() { return _hooks_useSelector__WEBPACK_IMPORTED_MODULE_5__["createSelectorHook"]; }); + +/* harmony import */ var _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("pWWv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__["useStore"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return _hooks_useStore__WEBPACK_IMPORTED_MODULE_6__["createStoreHook"]; }); + +/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("iAzp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shallowEqual", function() { return _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + + + + + + + + + + + +/***/ }), + +/***/ "+vQC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_asyncOptionalChain", function() { return _asyncOptionalChain; }); +/** + * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, + * descriptors, and functions, for situations in which at least one part of the expression is async. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See + * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 + * + * @param ops Array result of expression conversion + * @returns The value of the expression + */ +// eslint-disable-next-line @sentry-internal/sdk/no-async-await +async function _asyncOptionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i] ; + const fn = ops[i + 1] ; + i += 2; + // by checking for loose equality to `null`, we catch both `null` and `undefined` + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it + return; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = await fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = await fn((...args) => (value ).call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; +} + +// Sucrase version: +// async function _asyncOptionalChain(ops) { +// let lastAccessLHS = undefined; +// let value = ops[0]; +// let i = 1; +// while (i < ops.length) { +// const op = ops[i]; +// const fn = ops[i + 1]; +// i += 2; +// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { +// return undefined; +// } +// if (op === 'access' || op === 'optionalAccess') { +// lastAccessLHS = value; +// value = await fn(value); +// } else if (op === 'call' || op === 'optionalCall') { +// value = await fn((...args) => value.call(lastAccessLHS, ...args)); +// lastAccessLHS = undefined; +// } +// } +// return value; +// } + + +//# sourceMappingURL=_asyncOptionalChain.js.map + + +/***/ }), + +/***/ "/ENz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("csMb"); +/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6Wbw"); + + + + +function makeStyles(stylesOrCreator) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__["makeStyles"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__["default"] + }, options)); +} + +/* harmony default export */ __webpack_exports__["default"] = (makeStyles); + +/***/ }), + +/***/ "/G4y": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return removeClass; }); +function replaceClassName(origClass, classToRemove) { + return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); +} +/** + * Removes a CSS class from a given element. + * + * @param element the element + * @param className the CSS class name + */ + + +function removeClass(element, className) { + if (element.classList) { + element.classList.remove(className); + } else if (typeof element.className === 'string') { + element.className = replaceClassName(element.className, className); + } else { + element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className)); + } +} + +/***/ }), + +/***/ "/HvP": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Week Helpers + * @summary Return the start of a week for the given date. + * + * @description + * Return the start of a week for the given date. + * The result will be in the local timezone. + * + * @param {Date|String|Number} date - the original date + * @param {Object} [options] - the object with options + * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the start of a week + * + * @example + * // The start of a week for 2 September 2014 11:55:00: + * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sun Aug 31 2014 00:00:00 + * + * @example + * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: + * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1}) + * //=> Mon Sep 01 2014 00:00:00 + */ +function startOfWeek (dirtyDate, dirtyOptions) { + var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0 + + var date = parse(dirtyDate) + var day = date.getDay() + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn + + date.setDate(date.getDate() - diff) + date.setHours(0, 0, 0, 0) + return date +} + +module.exports = startOfWeek + + +/***/ }), + +/***/ "/K1E": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "checkApp", { + enumerable: true, + get: function get() { + return _apps.checkApp; + } +}); +Object.defineProperty(exports, "getDeviceName", { + enumerable: true, + get: function get() { + return _device.getDeviceName; + } +}); +Object.defineProperty(exports, "getFlagshipMetadata", { + enumerable: true, + get: function get() { + return _flagship.getFlagshipMetadata; + } +}); +Object.defineProperty(exports, "getPlatform", { + enumerable: true, + get: function get() { + return _platform.getPlatform; + } +}); +Object.defineProperty(exports, "hasDevicePlugin", { + enumerable: true, + get: function get() { + return _plugins.hasDevicePlugin; + } +}); +Object.defineProperty(exports, "hasInAppBrowserPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasInAppBrowserPlugin; + } +}); +Object.defineProperty(exports, "hasNetworkInformationPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasNetworkInformationPlugin; + } +}); +Object.defineProperty(exports, "hasSafariPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasSafariPlugin; + } +}); +Object.defineProperty(exports, "isAndroid", { + enumerable: true, + get: function get() { + return _platform.isAndroid; + } +}); +Object.defineProperty(exports, "isAndroidApp", { + enumerable: true, + get: function get() { + return _platform.isAndroidApp; + } +}); +Object.defineProperty(exports, "isCordova", { + enumerable: true, + get: function get() { + return _cordova.isCordova; + } +}); +Object.defineProperty(exports, "isFlagshipApp", { + enumerable: true, + get: function get() { + return _flagship.isFlagshipApp; + } +}); +Object.defineProperty(exports, "isIOS", { + enumerable: true, + get: function get() { + return _platform.isIOS; + } +}); +Object.defineProperty(exports, "isIOSApp", { + enumerable: true, + get: function get() { + return _platform.isIOSApp; + } +}); +Object.defineProperty(exports, "isMobile", { + enumerable: true, + get: function get() { + return _platform.isMobile; + } +}); +Object.defineProperty(exports, "isMobileApp", { + enumerable: true, + get: function get() { + return _platform.isMobileApp; + } +}); +Object.defineProperty(exports, "isWebApp", { + enumerable: true, + get: function get() { + return _platform.isWebApp; + } +}); +Object.defineProperty(exports, "nativeLinkOpen", { + enumerable: true, + get: function get() { + return _link.nativeLinkOpen; + } +}); +Object.defineProperty(exports, "openDeeplinkOrRedirect", { + enumerable: true, + get: function get() { + return _deeplink.openDeeplinkOrRedirect; + } +}); +Object.defineProperty(exports, "startApp", { + enumerable: true, + get: function get() { + return _apps.startApp; + } +}); + +var _platform = __webpack_require__("AzAX"); + +var _device = __webpack_require__("m6Tf"); + +var _apps = __webpack_require__("yL+W"); + +var _plugins = __webpack_require__("QJIl"); + +var _cordova = __webpack_require__("dlno"); + +var _link = __webpack_require__("tDKi"); + +var _deeplink = __webpack_require__("AIES"); + +var _flagship = __webpack_require__("lNPj"); + +/***/ }), + +/***/ "/Mg5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3EJA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "/Mwq": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("/Nuf"); +module.exports = __webpack_require__("WSXa").Object.values; + + +/***/ }), + +/***/ "/Nuf": +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__("LRPZ"); +var $values = __webpack_require__("M2yu")(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), + +/***/ "/O3k": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Module +exports.push([module.i, ".styles__c-actionmenu___22Fp1{z-index:40;border:.063rem solid var(--dividerColor);border-radius:.25rem;box-shadow:0 .063rem .188rem 0 rgba(50,54,63,.19),0 .375rem 1.125rem 0 rgba(50,54,63,.19);background-color:var(--paperBackgroundColor)}.styles__c-actionmenu___22Fp1 hr{margin:.313rem 0;border:0;border-top:.063rem solid var(--dividerColor)}.styles__c-actionmenu___22Fp1 [role=button],.styles__c-actionmenu___22Fp1 a,.styles__c-actionmenu___22Fp1 button{display:block;padding:.5rem 2rem .5rem 2.5rem;color:var(--charcoalGrey);text-decoration:none;white-space:nowrap;cursor:pointer}.styles__c-actionmenu___22Fp1 [role=button]:hover,.styles__c-actionmenu___22Fp1 a:hover,.styles__c-actionmenu___22Fp1 button:hover{text-decoration:none}.styles__c-actionmenu___22Fp1{color:var(--primaryTextColor);--iconColor:var(--actionMenuIconColor);padding-bottom:env(safe-area-inset-bottom)}.styles__c-actionmenu___22Fp1 hr{margin-top:0}@media (max-width:48rem){.styles__c-actionmenu___22Fp1{border:0;border-radius:0}}.styles__c-actionmenu--inline___1SXZa{width:16rem}.styles__c-actionmenu-header___2rcGc{box-sizing:border-box;border-bottom:.063rem solid var(--dividerColor);padding:1rem;min-height:4rem;margin-top:-.5rem}.styles__c-actionmenu-item___gODqd{padding:.75rem 0;cursor:pointer}.styles__c-actionmenu-item___gODqd:hover{background-color:var(--actionColorHover)}.styles__c-actionmenu-radio___Km9uj{height:1rem;width:1rem;margin-top:.125rem;margin-bottom:0}.styles__CozyTheme--inverted___3iEVq{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3OxOO,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-btn--alert-error___12LBy,.styles__c-btn--alert-info___1BO12,.styles__c-btn--alert-success___3Z6sE{border:0;height:auto;padding:.5rem 1rem;background-color:var(--white);font-weight:700;font-size:.875rem;text-decoration:none}.styles__c-btn--alert-error___12LBy{color:#f52d2d!important;background-color:var(--white)!important;border-color:var(--white)!important}.styles__c-btn--alert-error___12LBy:visited{color:#f52d2d!important}.styles__c-btn--alert-error___12LBy:active,.styles__c-btn--alert-error___12LBy:focus,.styles__c-btn--alert-error___12LBy:hover{color:var(--monza)!important;background-color:#fdcbcb!important;border-color:#fdcbcb!important}.styles__c-btn--alert-info___1BO12{color:var(--white)!important;border-color:var(--coolGrey)!important}.styles__c-btn--alert-info___1BO12,.styles__c-btn--alert-info___1BO12[aria-disabled=true]:hover,.styles__c-btn--alert-info___1BO12[disabled]:hover{background-color:var(--coolGrey)!important}.styles__c-btn--alert-info___1BO12:visited{color:var(--white)!important}.styles__c-btn--alert-info___1BO12:active,.styles__c-btn--alert-info___1BO12:focus,.styles__c-btn--alert-info___1BO12:hover{background-color:var(--charcoalGrey)!important;border-color:var(--charcoalGrey)!important}.styles__c-btn--alert-success___3Z6sE{color:#35ce68!important;background-color:var(--white)!important;border-color:var(--white)!important}.styles__c-btn--alert-success___3Z6sE:visited{color:#35ce68!important}.styles__c-btn--alert-success___3Z6sE:active,.styles__c-btn--alert-success___3Z6sE:focus,.styles__c-btn--alert-success___3Z6sE:hover{color:#08b442!important;background-color:#def7e7!important;border-color:#def7e7!important}.styles__c-alert___f9mWB{position:fixed;z-index:80;right:0;bottom:calc(3rem + env(safe-area-inset-bottom));left:0;opacity:1;transition:transform .2s ease-out,opacity .2s ease-out;cursor:default;pointer-events:none}@media (prefers-reduced-motion:reduce){.styles__c-alert___f9mWB{transition:none}}@media (min-width:40rem){.styles__c-alert___f9mWB{z-index:80;top:1rem;bottom:auto;text-align:center}}.has-modal .styles__c-alert___f9mWB{z-index:80;bottom:0}.styles__c-alert-wrapper___3fLCt{display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:center;box-sizing:border-box;width:100%;box-shadow:0 .375rem 1.125rem 0 rgba(50,54,63,.23);padding:.813rem 1rem;pointer-events:auto}.styles__c-alert-wrapper___3fLCt p{margin:0;line-height:1.5}.styles__c-alert-wrapper___3fLCt p+button{margin-left:1.5rem}@media (min-width:40rem){.styles__c-alert-wrapper___3fLCt{width:auto;max-width:40rem;padding:1rem 1.5rem;border-radius:.625rem;text-align:left}}.styles__c-alert--hidden___22Mz1{transform:translateY(5rem);opacity:0;transition-timing-function:ease-out}@media (min-width:40rem){.styles__c-alert--hidden___22Mz1{transform:translateY(-5rem)}}.styles__c-alert-title___2O1D_{font-weight:700}.styles__c-alert--error___oA-NC{color:var(--alertErrorColor);background-color:var(--alertErrorBackgroundColor)}.styles__c-alert--success___1Cs5b{color:var(--alertSuccessColor);background-color:var(--alertSuccessBackgroundColor)}.styles__c-alert--info___3mqAh{color:var(--alertInfoColor);background-color:var(--alertInfoBackgroundColor)}.styles__c-loading-placeholder___3L6Gz{animation-delay:.1s;animation-duration:2s;animation-iteration-count:infinite;animation-name:styles__placeHolderShimmer___3Rei_;animation-timing-function:linear;background-position:-20rem 0;background-image:linear-gradient(90deg,silver 0,#fcfcfc 50%,silver);background-size:20rem 10rem;background-repeat:no-repeat;background-color:silver;border-radius:.15rem;max-width:100%;position:relative;margin:.1rem 0}.styles__c-app-icon___2_O40,.styles__c-app-icon___2_O40 svg{height:100%;width:100%;flex-grow:0;flex-shrink:0;object-fit:contain}.styles__c-app-icon-default___3CEmt{color:var(--silver)}@-webkit-keyframes styles__placeHolderShimmer___3Rei_{0%{background-position:-20rem 0}80%{background-position:20rem 0}80.1%{background-position:-20rem 0}to{background-position:-20rem 0}}@keyframes styles__placeHolderShimmer___3Rei_{0%{background-position:-20rem 0}80%{background-position:20rem 0}80.1%{background-position:-20rem 0}to{background-position:-20rem 0}}.Sections__Sections__section___2onYy{margin-bottom:4rem}.AppsSection__AppsSection___3WHhE{margin-bottom:1rem}.AppsSection__AppsSection__list___2Uy0E{display:flex;flex-wrap:wrap;justify-content:flex-start}.DropdownFilter__Dropdown__icon___19QZN{padding:0 .5rem}@media (max-width:48rem){.DropdownFilter__Dropdown___afcWb .DropdownFilter__Select__control___3-04c{padding:.5rem .5rem .5rem .2rem;border-radius:0;height:2.75rem}.DropdownFilter__Dropdown___afcWb .DropdownFilter__Select__menu___XLfYX{top:2rem}.DropdownFilter__Dropdown___afcWb>div{max-width:none}}.styles__AppTile-icon___1f0c0{object-fit:contain;max-width:100%;width:auto}.styles__AppTile-icon--default___1tjiF{height:100%;padding:0 .5em}.styles__AppTile-icon-maintenance___2VOvO{position:absolute;border:2px solid var(--primaryContrastTextColor);border-radius:50%;background:var(--primaryContrastTextColor);bottom:80px;left:80px}@media (max-width:48rem){.styles__AppTile-icon-maintenance___2VOvO{bottom:6px;left:40px}}.styles__AppTile-container-maintenance___u1a1M{filter:grayscale(1);opacity:.64}.styles__c-apptitle___eqV9l{display:inline-flex;align-items:center;margin:0}.styles__c-avatar___PpDI-{background-color:var(--paleGrey);color:var(--silver);position:relative;z-index:$low-index}.styles__c-avatar___PpDI- svg{width:50%;height:50%}.styles__c-avatar-image___3yJnb{width:100%}.styles__c-avatar___PpDI-{--circleSize:2.5rem;width:var(--circleSize);height:var(--circleSize);min-width:var(--circleSize);min-height:var(--circleSize);font-size:calc(var(--circleSize)/2.28);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;background-color:var(--dodgerBlue);color:var(--white)}.styles__c-avatar--xsmall___3H2Io{width:1rem;height:1rem;min-width:1rem;min-height:1rem;font-size:.4386rem}.styles__c-avatar--small___1Y_Pv{width:2rem;height:2rem;min-width:2rem;min-height:2rem;font-size:.87719rem}.styles__c-avatar--large___1Z_HZ{width:3rem;height:3rem;min-width:3rem;min-height:3rem;font-size:1.31579rem}.styles__c-avatar--xlarge___3Qe0b{width:4rem;height:4rem;min-width:4rem;min-height:4rem;font-size:1.75439rem}.styles__c-avatar-initials___310qC{font-weight:700;line-height:1}.styles__c-avatar--text___2dvna{color:#fff}.styles__c-avatar--disabled___xoLOy.styles__c-avatar--image___jDBci{background-color:#fff!important}.styles__c-avatar--disabled___xoLOy:not(.styles__c-avatar--image___jDBci){background-color:var(--silver)!important}.styles__c-avatar--disabled___xoLOy .styles__c-avatar-image___3yJnb{filter:grayscale(1);opacity:.3}.styles__c-avatar--ghost___3898R{background-color:initial!important;border:1px dashed var(--borderGhostColor);color:var(--secondaryTextColor)}.styles__c-avatar--ghost___3898R .styles__c-avatar-image___3yJnb{filter:grayscale(1);opacity:.3}.styles__c-banner-wrapper___3KlaG{display:flex;align-items:center;min-height:3.5rem;padding:0 1rem}@media (max-width:48rem){.styles__c-banner-wrapper___3KlaG{padding:0}}.styles__c-banner-icon___1f_LM{width:2rem;height:2rem;margin-left:1rem}.styles__c-banner-icon___1f_LM>svg{width:2rem;height:2rem}.styles__c-banner-icon___1f_LM div{width:2rem;height:2rem;min-width:2rem;min-height:2rem}.styles__c-banner-text___1sTVC{padding:.75rem 1rem}.styles__c-banner-buttons___3sLgG button{margin:0;min-width:3rem}.styles__BarButton___3z5Er{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem}:root{--barIconColor:var(--coolGrey);--barIconColorDisabled:var(--silver)}.styles__BarButtonIcon___1pSOT{color:var(--barIconColor)}.styles__BarButton--disabled___5e3Ll .styles__BarButtonIcon___1pSOT{color:var(--barIconColorDisabled)}.styles__BarTitle___I5r2e{margin:0;height:3rem;display:flex;align-items:center;font-size:1.125rem}.styles__with-transition___1dzf9{transition:transform .1s ease-out}@media (prefers-reduced-motion:reduce){.styles__with-transition___1dzf9{transition:none}}.styles__BottomDrawer-content___2xiuD{z-index:60;position:fixed;bottom:0;left:0;right:0;width:100%;margin:0;max-height:100vh;overflow-y:auto}.styles__Breadcrumb___lSOZg{display:flex;align-items:center;color:var(--primaryTextColor)}.styles__Breadcrumb__previousButton___Jcvx7.styles__Breadcrumb__previousButton___Jcvx7{margin-left:-.75rem;margin-right:.25rem}.styles__Breadcrumb__items___2ozfJ{flex-grow:1}.styles__Breadcrumb__previousItems___IzmVu{display:flex}.styles__BreadcrumbSeparator___I81AU{display:inline-block;margin-left:.125rem;margin-right:.125rem}.styles__c-btn--regular___2HUly,.styles__c-btn___-2Vnj{position:relative;box-sizing:border-box;display:inline-flex;margin:0 .25rem;border-radius:var(--buttonBorderRadius);min-height:2.5rem;min-width:7rem;padding:.188rem 1rem;vertical-align:top;text-align:center;font-size:.875rem;font-weight:700;line-height:1;text-transform:var(--buttonTextTransform);text-decoration:none;cursor:pointer;align-items:center;background-color:var(--regularButtonPrimaryColor);color:var(--regularButtonConstrastColor);border:.063rem solid var(--regularButtonSecondaryColor)}.styles__c-btn--regular___2HUly svg,.styles__c-btn___-2Vnj svg{fill:currentColor}.styles__c-btn--regular___2HUly svg+span,.styles__c-btn___-2Vnj svg+span{margin-left:.375rem}.styles__c-btn--regular___2HUly input,.styles__c-btn___-2Vnj input{cursor:pointer}.styles__c-btn--regular___2HUly>span,.styles__c-btn___-2Vnj>span{display:flex;align-items:center;justify-content:center;width:100%}.styles__c-btn--regular___2HUly[aria-disabled=true],.styles__c-btn--regular___2HUly[disabled],.styles__c-btn___-2Vnj[aria-disabled=true],.styles__c-btn___-2Vnj[disabled]{opacity:.5;cursor:not-allowed}.styles__c-btn--regular___2HUly[aria-disabled=true] input,.styles__c-btn--regular___2HUly[disabled] input,.styles__c-btn___-2Vnj[aria-disabled=true] input,.styles__c-btn___-2Vnj[disabled] input{cursor:not-allowed}.styles__c-btn--regular___2HUly[aria-busy=true],.styles__c-btn___-2Vnj[aria-busy=true]{opacity:.5;pointer-events:none}.styles__c-btn--regular___2HUly:visited,.styles__c-btn___-2Vnj:visited{color:var(--regularButtonConstrastColor)}.styles__c-btn--regular___2HUly:active,.styles__c-btn--regular___2HUly:focus,.styles__c-btn--regular___2HUly:hover,.styles__c-btn___-2Vnj:active,.styles__c-btn___-2Vnj:focus,.styles__c-btn___-2Vnj:hover{border-color:var(--regularButtonActiveColor);background-color:var(--regularButtonActiveColor)}.styles__c-btn--regular___2HUly[aria-disabled=true]:hover,.styles__c-btn--regular___2HUly[disabled]:hover,.styles__c-btn___-2Vnj[aria-disabled=true]:hover,.styles__c-btn___-2Vnj[disabled]:hover{border-color:var(--regularButtonSecondaryColor);background-color:var(--regularButtonPrimaryColor)}.styles__c-btn--ghost___1HC3L{background-color:var(--zircon);color:var(--primaryColor);border-color:#c2dcff;border-style:dashed}.styles__c-btn--ghost___1HC3L:visited{color:var(--primaryColor)}.styles__c-btn--ghost___1HC3L:active,.styles__c-btn--ghost___1HC3L:focus,.styles__c-btn--ghost___1HC3L:hover{border-color:#c2dcff;background-color:#c2dcff}.styles__c-btn--ghost___1HC3L[aria-disabled=true]:hover,.styles__c-btn--ghost___1HC3L[disabled]:hover{border-color:#c2dcff;background-color:var(--zircon)}.styles__c-btn--highlight___2jRfu{background-color:#35ce68;color:var(--white);border-color:#35ce68}.styles__c-btn--highlight___2jRfu:visited{color:var(--white)}.styles__c-btn--highlight___2jRfu:active,.styles__c-btn--highlight___2jRfu:focus,.styles__c-btn--highlight___2jRfu:hover{border-color:#08b442;background-color:#08b442}.styles__c-btn--highlight___2jRfu[aria-disabled=true]:hover,.styles__c-btn--highlight___2jRfu[disabled]:hover{border-color:#35ce68;background-color:#35ce68}.styles__c-btn--action___36KFm,.styles__c-btn--alpha___2ECZi,.styles__c-btn--close___3f0AP{background-color:initial;color:var(--white);border-color:var(--white)}.styles__c-btn--action___36KFm:visited,.styles__c-btn--alpha___2ECZi:visited,.styles__c-btn--close___3f0AP:visited{color:var(--white)}.styles__c-btn--action___36KFm:active,.styles__c-btn--action___36KFm:focus,.styles__c-btn--action___36KFm:hover,.styles__c-btn--alpha___2ECZi:active,.styles__c-btn--alpha___2ECZi:focus,.styles__c-btn--alpha___2ECZi:hover,.styles__c-btn--close___3f0AP:active,.styles__c-btn--close___3f0AP:focus,.styles__c-btn--close___3f0AP:hover{border-color:var(--scienceBlue);background-color:var(--scienceBlue)}.styles__c-btn--action___36KFm[aria-disabled=true]:hover,.styles__c-btn--action___36KFm[disabled]:hover,.styles__c-btn--alpha___2ECZi[aria-disabled=true]:hover,.styles__c-btn--alpha___2ECZi[disabled]:hover,.styles__c-btn--close___3f0AP[aria-disabled=true]:hover,.styles__c-btn--close___3f0AP[disabled]:hover{border-color:var(--white);background-color:initial}.styles__c-btn--danger___17T_C{background-color:#f52d2d;color:var(--white);border-color:#f52d2d}.styles__c-btn--danger___17T_C:visited{color:var(--white)}.styles__c-btn--danger___17T_C:active,.styles__c-btn--danger___17T_C:focus,.styles__c-btn--danger___17T_C:hover{border-color:var(--monza);background-color:var(--monza)}.styles__c-btn--danger___17T_C[aria-disabled=true]:hover,.styles__c-btn--danger___17T_C[disabled]:hover{border-color:#f52d2d;background-color:#f52d2d}.styles__c-btn--secondary___3Br_N{background-color:var(--secondaryButtonPrimaryColor);border-color:var(--secondaryButtonSecondaryColor)}.styles__c-btn--secondary___3Br_N,.styles__c-btn--secondary___3Br_N:visited{color:var(--secondaryButtonContrastColor)}.styles__c-btn--secondary___3Br_N:active,.styles__c-btn--secondary___3Br_N:focus,.styles__c-btn--secondary___3Br_N:hover{border-color:var(--secondaryButtonActiveColor);background-color:var(--secondaryButtonActiveColor)}.styles__c-btn--secondary___3Br_N[aria-disabled=true]:hover,.styles__c-btn--secondary___3Br_N[disabled]:hover{border-color:var(--secondaryButtonSecondaryColor);background-color:var(--secondaryButtonPrimaryColor)}.styles__c-btn--danger-outline___1mO1B{background-color:var(--white);color:#f52d2d;border-color:#fdcbcb}.styles__c-btn--danger-outline___1mO1B:visited{color:#f52d2d}.styles__c-btn--danger-outline___1mO1B:active,.styles__c-btn--danger-outline___1mO1B:focus,.styles__c-btn--danger-outline___1mO1B:hover{border-color:#fdcbcb;background-color:#fdcbcb}.styles__c-btn--danger-outline___1mO1B[aria-disabled=true]:hover,.styles__c-btn--danger-outline___1mO1B[disabled]:hover{border-color:#fdcbcb;background-color:var(--white)}.styles__c-btn--text___2Vp-2{background-color:initial;color:var(--primaryColor);border-color:transparent}.styles__c-btn--text___2Vp-2:visited{color:var(--primaryColor)}.styles__c-btn--text___2Vp-2:active,.styles__c-btn--text___2Vp-2:focus,.styles__c-btn--text___2Vp-2:hover,.styles__c-btn--text___2Vp-2[aria-disabled=true]:hover,.styles__c-btn--text___2Vp-2[disabled]:hover{border-color:transparent;background-color:initial}.styles__c-btn--text___2Vp-2:focus,.styles__c-btn--text___2Vp-2:hover{color:var(--primaryColorDark)}.styles__c-btn--action___36KFm{border-color:transparent;padding:.5rem;opacity:.5}.styles__c-btn--action___36KFm:active,.styles__c-btn--action___36KFm:focus,.styles__c-btn--action___36KFm:hover{background-color:initial;border-color:transparent}.styles__c-btn--close___3f0AP{border-color:transparent;padding:.5rem}.styles__c-btn--close___3f0AP:active,.styles__c-btn--close___3f0AP:focus,.styles__c-btn--close___3f0AP:hover{background-color:initial;border-color:transparent}.styles__c-btn--left___23VNa>span{justify-content:flex-start}.styles__c-btn--center___16_Xh>span{justify-content:center}.styles__c-btn--right___wklLq>span{justify-content:flex-end}.styles__c-btn___-2Vnj.styles__c-btn--tiny___1pFv6{min-height:1.5rem;min-width:5rem;padding:.125rem 1rem;font-size:.75rem;line-height:1.3}.styles__c-btn___-2Vnj.styles__c-btn--small___3ArkI{min-height:2rem;min-width:6rem;padding:.188rem .5rem;font-size:.813rem;line-height:1.4}.styles__c-btn___-2Vnj.styles__c-btn--large___2gatN{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5}.styles__c-btn___-2Vnj.styles__c-btn--full___2VmR1{width:100%;margin-left:0;margin-right:0}.styles__c-btn___-2Vnj.styles__c-btn--narrow___27FHD,.styles__c-btn___-2Vnj.styles__c-btn--round___1Lkyl{min-width:auto}.styles__c-btn___-2Vnj.styles__c-btn--round___1Lkyl{border-radius:100%;min-height:auto;padding:.25rem}.styles__c-btn___-2Vnj.styles__c-btn--round___1Lkyl svg{width:.625rem;height:.625rem}@media (pointer:coarse){.styles__c-btn___-2Vnj.styles__c-btn--round___1Lkyl:after{content:\"\";position:absolute;top:-.875rem;right:-.875rem;bottom:-.875rem;left:-.875rem}}.styles__c-btn--subtle___OknKf{color:var(--regularButtonSecondaryColor);min-height:auto;min-width:auto;border:0;margin:1rem 0;padding:0;vertical-align:initial;background:transparent;cursor:pointer;font-size:.875rem;font-weight:700;text-transform:uppercase}.styles__c-btn--subtle___OknKf:active,.styles__c-btn--subtle___OknKf:focus,.styles__c-btn--subtle___OknKf:hover{color:var(--regularButtonActiveColor)}.styles__c-btn--subtle___OknKf>span{display:flex;align-items:center;justify-content:center;width:100%}.styles__c-btn--subtle___OknKf[aria-disabled=true],.styles__c-btn--subtle___OknKf[disabled]{opacity:.5;cursor:not-allowed}.styles__c-btn--subtle___OknKf[aria-disabled=true]:hover,.styles__c-btn--subtle___OknKf[disabled]:hover{background:transparent}.styles__c-btn--subtle___OknKf[aria-busy=true]{opacity:.5;cursor:not-allowed;pointer-events:none}.styles__c-btn--subtle___OknKf[aria-busy=true]:hover{background:transparent}.styles__c-btn--subtle___OknKf:active,.styles__c-btn--subtle___OknKf:focus,.styles__c-btn--subtle___OknKf:hover,.styles__c-btn--subtle___OknKf:visited{color:var(--primaryColorDark);background:transparent}*+.styles__c-btn--subtle___OknKf{margin-left:.063rem}.styles__c-btn--subtle___OknKf.styles__c-btn--tiny___1pFv6{min-height:0;min-width:0;padding:0;font-size:.563rem}.styles__c-btn--subtle___OknKf.styles__c-btn--small___3ArkI{min-height:0;min-width:0;padding:0;font-size:.75rem}.styles__c-btn--subtle___OknKf.styles__c-btn--large___2gatN{min-height:0;min-width:0;padding:0;font-size:1rem}.styles__c-btn--subtle___OknKf.styles__c-btn--danger___17T_C{color:#f52d2d}.styles__c-btn--subtle___OknKf.styles__c-btn--danger___17T_C:active,.styles__c-btn--subtle___OknKf.styles__c-btn--danger___17T_C:focus,.styles__c-btn--subtle___OknKf.styles__c-btn--danger___17T_C:hover{color:var(--monza)}.styles__c-btn--subtle___OknKf.styles__c-btn--highlight___2jRfu{color:#35ce68}.styles__c-btn--subtle___OknKf.styles__c-btn--highlight___2jRfu:active,.styles__c-btn--subtle___OknKf.styles__c-btn--highlight___2jRfu:focus,.styles__c-btn--subtle___OknKf.styles__c-btn--highlight___2jRfu:hover{color:#08b442}.styles__c-btn--subtle___OknKf.styles__c-btn--regular___2HUly{color:var(--regularButtonSecondaryColor)}.styles__c-btn--subtle___OknKf.styles__c-btn--regular___2HUly:active,.styles__c-btn--subtle___OknKf.styles__c-btn--regular___2HUly:focus,.styles__c-btn--subtle___OknKf.styles__c-btn--regular___2HUly:hover{color:var(--regularButtonActiveColor)}.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N{color:var(--slateGrey)}.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:active,.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:focus,.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:hover{color:var(--charcoalGrey)}.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:active svg,.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:focus svg,.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N:hover svg{color:var(--slateGrey)}.styles__c-btn--subtle___OknKf.styles__c-btn--secondary___3Br_N svg{color:var(--coolGrey)}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2 [data-action=label],.u-hide{display:none!important;visibility:hidden!important}.styles__c-actionbtn-label___3nDeu,.u-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.styles__c-actionbtn___162t6{position:relative;box-sizing:border-box;display:inline-flex;margin:0 .25rem;border-radius:var(--buttonBorderRadius);min-height:2.5rem;min-width:7rem;padding:.188rem 1rem;vertical-align:top;text-align:center;font-size:.875rem;font-weight:700;line-height:1;text-transform:var(--buttonTextTransform);text-decoration:none;cursor:pointer;align-items:center;background-color:var(--regularButtonPrimaryColor);color:var(--regularButtonConstrastColor);border:.063rem solid var(--regularButtonSecondaryColor)}.styles__c-actionbtn___162t6 svg{fill:currentColor}.styles__c-actionbtn___162t6 svg+span{margin-left:.375rem}.styles__c-actionbtn___162t6 input{cursor:pointer}.styles__c-actionbtn___162t6>span{display:flex;align-items:center;justify-content:center;width:100%}.styles__c-actionbtn___162t6[aria-disabled=true],.styles__c-actionbtn___162t6[disabled]{opacity:.5;cursor:not-allowed}.styles__c-actionbtn___162t6[aria-disabled=true] input,.styles__c-actionbtn___162t6[disabled] input{cursor:not-allowed}.styles__c-actionbtn___162t6[aria-busy=true]{opacity:.5;pointer-events:none}.styles__c-actionbtn___162t6:visited{color:var(--regularButtonConstrastColor)}.styles__c-actionbtn___162t6:active,.styles__c-actionbtn___162t6:focus,.styles__c-actionbtn___162t6:hover{border-color:var(--regularButtonActiveColor);background-color:var(--regularButtonActiveColor)}.styles__c-actionbtn___162t6[aria-disabled=true]:hover,.styles__c-actionbtn___162t6[disabled]:hover{border-color:var(--regularButtonSecondaryColor);background-color:var(--regularButtonPrimaryColor)}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2{min-width:auto}.styles__c-actionbtn___162t6{border-color:var(--silver);text-transform:none;max-width:12.5rem;min-height:2rem;width:100%;padding-right:.5rem;text-align:left;line-height:1.3;outline:0}.styles__c-actionbtn___162t6>span{justify-content:flex-start;flex-wrap:nowrap}.styles__c-actionbtn___162t6 [data-action=icon]{border-left:.063rem solid var(--dividerColor)}.styles__c-actionbtn___162t6:not([disabled]):focus [data-action=icon],.styles__c-actionbtn___162t6:not([disabled]):hover [data-action=icon]{border-color:currentColor}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2{position:relative;border:0;background-color:initial;padding:0;margin:0;min-height:2rem;width:2.5rem}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2>span{justify-content:center}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2 [data-action=icon]{border-left:none;margin-left:0;padding:0}.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2:focus,.styles__c-actionbtn___162t6.styles__c-actionbtn--compact___37yb2:hover{background-color:var(--paleGrey);border:0}.styles__c-actionbtn--normal___1HGLQ{background-color:var(--paleGrey);color:var(--charcoalGrey);border-color:var(--silver)}.styles__c-actionbtn--normal___1HGLQ [data-action=icon]{border-color:var(--silver)}.styles__c-actionbtn--normal___1HGLQ:focus,.styles__c-actionbtn--normal___1HGLQ:hover{background-color:var(--silver);border-color:var(--silver)}.styles__c-actionbtn--normal___1HGLQ[aria-disabled=true]:hover,.styles__c-actionbtn--normal___1HGLQ[disabled]:hover{background-color:var(--paleGrey)}.styles__c-actionbtn--error___2pt97{background-color:var(--chablis);color:#f52d2d;border-color:#fdcbcb}.styles__c-actionbtn--error___2pt97 [data-action=icon]{border-color:#fdcbcb}.styles__c-actionbtn--error___2pt97:focus,.styles__c-actionbtn--error___2pt97:hover{background-color:#fdcbcb;border-color:#fdcbcb}.styles__c-actionbtn--error___2pt97[aria-disabled=true]:hover,.styles__c-actionbtn--error___2pt97[disabled]:hover{background-color:var(--chablis)}.styles__c-actionbtn--new___1_BNn{background-color:var(--zircon);color:var(--dodgerBlue);border:.063rem dashed #c2dcff}.styles__c-actionbtn--new___1_BNn [data-action=icon]{border-color:#c2dcff}.styles__c-actionbtn--new___1_BNn:focus,.styles__c-actionbtn--new___1_BNn:hover{background-color:#c2dcff;border-color:#c2dcff}.styles__c-actionbtn--new___1_BNn[aria-disabled=true]:hover,.styles__c-actionbtn--new___1_BNn[disabled]:hover{background-color:var(--zircon)}.styles__c-actionbtn--new___1_BNn:focus:not([disabled]),.styles__c-actionbtn--new___1_BNn:hover:not([disabled]){border-style:solid}.styles__c-actionbtn-label___3nDeu{padding-right:.5rem}.styles__c-actionbtn-icon___2Od_-{display:block;margin-left:auto;padding-left:.5rem}.styles__c-actionbtn-icon___2Od_- svg{display:block}.styles__CozyTheme--inverted___2PHI1{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___1UIGZ,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-card___YgP7B{border:.063rem solid var(--dividerColor);border-radius:.5rem;padding:1rem;text-decoration:none;display:block}.styles__c-card--inset___2pofc{margin:1rem 2rem}@media (max-width:48rem){.styles__c-card--inset___2pofc{margin:.5rem}}.styles__CozyTheme--inverted___1ISSo{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___2VNeI,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-chip___2aPqg{box-sizing:border-box;line-height:1;display:inline-flex;align-items:center;margin-right:.25rem;margin-bottom:.25rem;border:0}.styles__c-chip--round___JCd2e{width:2.5rem;text-align:center;justify-content:center}.styles__c-chip--tinySize___3XeOG{height:1.5rem;padding:0 .375rem;border-radius:.75rem;font-size:.75rem}.styles__c-chip--smallSize___3i9gj{height:2rem;padding:0 .5625rem;border-radius:1rem;font-size:.875rem}.styles__c-chip--normalSize___3U8N4{height:2.5rem;padding:0 .75rem;border-radius:1.25rem}.styles__c-chip--outlinedVariant___BP7oS{border:1px solid}.styles__c-chip--dashedVariant___2LWN4{border:1px dashed}.styles__c-chip--normalTheme___kVm5M{border-color:var(--silver);background-color:var(--paleGrey);color:inherit}.styles__c-chip--primaryTheme___1ZNhX{border-color:var(--primaryColorLightest);background-color:var(--primaryBackgroundLight);color:var(--primaryColor)}.styles__c-chip--errorTheme___2hVXe{border-color:var(--errorColorLight);background-color:var(--errorColorLightest);color:var(--errorColor)}.styles__c-chip--hoverableNormalTheme___271-M{color:var(--charcoalGrey)}.styles__c-chip--hoverableNormalTheme___271-M:focus,.styles__c-chip--hoverableNormalTheme___271-M:hover{background-color:var(--silver)}.styles__c-chip--hoverablePrimaryTheme___12PPV:focus,.styles__c-chip--hoverablePrimaryTheme___12PPV:hover{background-color:var(--primaryBackgroundLight)}.styles__c-chip--normalPrimaryTheme___24yFt{background-color:var(--primaryColor);color:var(--white)}.styles__c-chip--hoverableErrorTheme___wospw:focus,.styles__c-chip--hoverableErrorTheme___wospw:hover{background-color:var(--errorColorLight)}.styles__c-chip--outlinedNormalTheme___itU6s{background-color:initial}.styles__c-chip--clickable___20ff-{cursor:pointer}.styles__c-chip-separator___i_2Yq{width:.063rem;border-left:.063rem solid var(--dividerColor);display:inline-block;height:40%;margin-left:.5rem;margin-right:.5rem}.styles__c-chip-button___-WdLl{cursor:pointer;color:var(--slateGrey)}.styles__c-chip-button--disabled___168tG{color:var(--coolGrey)}.styles__c-circle___1DuMR{--circleSize:2.5rem;width:var(--circleSize);height:var(--circleSize);min-width:var(--circleSize);min-height:var(--circleSize);font-size:calc(var(--circleSize)/2.28);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;background-color:var(--dodgerBlue);color:var(--white)}.styles__c-circle-text___1jFgD{font-weight:700;line-height:1}.styles__CompositeRow___3KCwt{min-height:3rem;padding:1rem}.styles__CompositeRow__dense___3EPKf{padding-top:0;padding-bottom:0}.styles__CompositeRow__body___3nEEv>*+*{margin-top:2px}.styles__SelectControl___2OxoO[aria-disabled=true],.styles__SelectControl___2OxoO[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__SelectControl___2OxoO[aria-disabled=true]:focus,.styles__SelectControl___2OxoO[aria-disabled=true]:hover,.styles__SelectControl___2OxoO[disabled]:focus,.styles__SelectControl___2OxoO[disabled]:hover{border:.063rem solid var(--dividerColor)}.styles__SelectControl___2OxoO{display:inline-block;width:100%;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.styles__SelectControl___2OxoO::placeholder{color:var(--coolGrey);font-size:1rem}.styles__SelectControl___2OxoO:hover{border:.063rem solid var(--coolGrey)}.styles__SelectControl___2OxoO:focus{border:.063rem solid var(--dodgerBlue);outline:0}.styles__SelectControl___2OxoO.styles__is-error___2s-d5,.styles__SelectControl___2OxoO:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.styles__SelectControl___2OxoO{padding-right:2.375rem;appearance:none;background:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHBhdGggZD0iTTMuOTY4IDYuMTc1YTEuNTcxIDEuNTcxIDAgMDAtMi4yMjIgMi4yMjJsOS40MjkgOS40MjhhMS41NzEgMS41NzEgMCAwMDIuMjIyIDBsOS40MjgtOS40MjhhMS41NzEgMS41NzEgMCAwMC0yLjIyMi0yLjIyMmwtOC4zMTcgOC4zMTctOC4zMTgtOC4zMTd6IiBmaWxsPSIjOTU5OTlkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=\") right 1rem center no-repeat;background-size:.875rem;text-align:left}.styles__SelectControl___2OxoO::-ms-expand{display:none}.styles__contact___169nD{color:var(--secondaryTextColor)}@media (max-width:48rem){.styles__contact___169nD{height:auto}}.styles__contact--clickable___1GLTM{cursor:pointer}.styles__contact-cozyurl___3kBp5,.styles__contact-phone___1sA_m{flex:0 0 12rem}.styles__contact-email___3n3q2{flex-basis:30%}.styles__contact-myself___1aOdx{color:var(--secondaryTextColor);padding-left:.5rem}.styles__contact-identity___mL3IJ{flex-basis:30%}@media (max-width:48rem){.styles__contact-identity___mL3IJ{flex:1 1 auto}}.styles__contact-firstname___2GPEr{margin-left:1rem}.styles__contact-avatar___3lZPs{flex-shrink:0}.styles__icon___gvQ89{margin:1rem 1.5rem 0 .5rem}.styles__ContactsListModal__addContactContainer___2W-dE{display:flex;justify-content:center;margin:0 .5rem 1rem}@media (max-width:48rem){.styles__ContactsListModal__addContactContainer___2W-dE>*{flex:1}}.styles__DialogCloseButton___cxKPO{position:absolute;top:1.15rem;right:1.15rem;z-index:1;transform:translateY(var(--flagship-top-height))}@media (max-width:48rem){.styles__DialogCloseButton___cxKPO{top:.25rem;right:.25rem}}.styles__DialogBackButton___1c7yH{position:absolute;top:1.15rem;left:1.15rem;z-index:1}@media (max-width:48rem){.styles__DialogBackButton___1c7yH{top:.25rem;left:.25rem}}.palette__CozyTheme--inverted___UL0fq{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.palette__CozyTheme--normal___3UmMb,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__DateMonthPicker__YearControls___1DGlB{box-shadow:0 4px 12px 0 rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.08)}.styles__DateMonthPicker__MonthButton___3I_Mm.styles__DateMonthPicker__MonthButton--selected___40hCm,.styles__DateMonthPicker__MonthButton___3I_Mm:hover,.styles__DateMonthPicker__YearButton___3zNDK:hover{background:var(--defaultBackgroundColor);color:var(--primaryTextColor)}.styles__DateMonthPicker__MonthButton___3I_Mm:active,.styles__DateMonthPicker__MonthButton___3I_Mm:hover:active,.styles__DateMonthPicker__YearButton___3zNDK:active,.styles__DateMonthPicker__YearButton___3zNDK:hover:active{background-color:var(--actionColorFocus);font-weight:700;outline:0}.styles__DateMonthPicker__MonthButton___3I_Mm,.styles__DateMonthPicker__YearButton___3zNDK{background:none;min-height:3rem;min-width:3rem;display:inline-block;border-width:0;color:var(--secondaryTextColor);cursor:pointer}.styles__DateMonthPicker__MonthButton___3I_Mm:focus,.styles__DateMonthPicker__YearButton___3zNDK:focus{outline:0}.styles__DateMonthPicker__YearControls___1DGlB{justify-content:center;display:flex;align-items:center;border-radius:8px;border:1px solid var(--borderMainColor);overflow:hidden;margin-bottom:1rem;font-weight:700}.styles__DateMonthPicker__YearButton___3zNDK{flex-grow:0;cursor:pointer}.styles__DateMonthPicker__Year___387bP{flex-grow:1;display:inline-flex;justify-content:center}.styles__DateMonthPicker__MonthGrid___TCFg4{display:grid;grid-template-columns:repeat(4,auto);grid-template-rows:repeat(3,1fr);overflow:hidden;grid-gap:1rem}.styles__DateMonthPicker__MonthButton___3I_Mm{border-radius:3rem}.styles__DateMonthPicker__MonthButton___3I_Mm.styles__DateMonthPicker__MonthButton--selected___40hCm{font-weight:700}.styles__c-empty___3w5oV{display:flex;flex-direction:column;justify-content:center;flex:1 0 auto;align-self:center;padding:1rem 0;text-align:center;max-width:100%}.styles__c-empty-img___2GC4d{display:block;margin:0 auto 1rem;height:8rem}@media (max-width:63.938rem){.styles__c-empty-img___2GC4d{margin-bottom:.5rem;height:6rem}}.styles__c-empty-img--medium___1d2Zd{height:10rem}@media (max-width:63.938rem){.styles__c-empty-img--medium___1d2Zd{height:8rem}}.styles__c-empty-img--large___3s3vC{height:12rem}@media (max-width:63.938rem){.styles__c-empty-img--large___3s3vC{height:10rem}}.styles__c-empty-title___2HduE{margin:0 auto;max-width:63rem;line-height:1.3}@media (max-width:63.938rem){.styles__c-empty-title___2HduE{margin:0 1.5rem}}.styles__c-empty-text___3HnvR{margin:.313rem auto 0;max-width:63rem;color:var(--secondaryTextColor);line-height:1.5}@media (max-width:63.938rem){.styles__c-empty-text___3HnvR{margin:.313rem 1.5rem 0}}.styles__c-label___o4ozG{text-transform:uppercase;color:var(--secondaryTextColor);font-size:.813rem;font-weight:700;line-height:1rem}.styles__c-label___o4ozG.styles__is-error___2Dwem{color:var(--pomegranate)}.styles__c-label--block___2ZV_7{display:block;padding:.5rem 0}.styles__o-field___3n5HM{position:relative;display:flex;flex-direction:column;margin:.5rem 0 1rem}.styles__o-field--inline___7JWZ8{display:flex;align-items:flex-start;flex-direction:row;margin:.5rem 0 .5rem 1.5rem}@media (max-width:48rem){.styles__o-field--inline___7JWZ8{flex-direction:column;margin-left:0}}.styles__o-field--inline___7JWZ8{margin:0}.styles__o-field--inline___7JWZ8 label{flex-basis:8rem;flex-shrink:0;flex-grow:0;padding:1rem 0}@media (max-width:48rem){.styles__o-field--inline___7JWZ8 label{flex-basis:auto}}.styles__o-field--inline___7JWZ8>*{flex-grow:1}.styles__o-field-input___vCqdV{position:relative;max-width:32rem}.styles__o-field-input-action___2k7a8,.styles__o-side___tXbXL{position:absolute;top:.5rem;right:0;cursor:pointer;text-transform:uppercase}.styles__o-side-fullwidth___7WcCI{max-width:100%}.styles__o-field-input-action___2k7a8{top:-1.5rem;text-transform:uppercase}.Figure__Figure-currency___195-B{color:var(--secondaryTextColor)}.Figure__Figure-content--positive___1qyd8,.Figure__Figure-content--positive___1qyd8 .Figure__Figure-currency___195-B{color:var(--successColor)}.Figure__Figure-content--negative___3ACbA,.Figure__Figure-content--negative___3ACbA .Figure__Figure-currency___195-B{color:var(--errorColor)}.Figure__Figure-content--warning___1Pn6n,.Figure__Figure-content--warning___1Pn6n .Figure__Figure-currency___195-B{color:var(--warningColor)}.Figure__Figure-total___MZ7Xt{font-weight:900}.Figure__Figure__currency--withSpacing___2eXTy{margin-left:.2em}.Figure__Figure--big___1b5ml{font-size:2rem;line-height:2.625rem}@media (max-width:48rem){.Figure__Figure--big___1b5ml{font-size:1.5rem;line-height:1.75rem}}.Figure__Figure--clickable___3i82u{cursor:pointer}.Figure__Figure_blur___1p0la{filter:blur(8px)}.Figure__Figure--inline___2L5SE{display:inline}.FigureBlock__FigureBlock___YyBoL{color:var(--primaryTextColor)}.FigureBlock__FigureBlock-figure___97C8E{font-size:2rem;line-height:2.625rem}@media (max-width:48rem){.FigureBlock__FigureBlock___YyBoL{font-size:.7em}}.styles__c-file-input___YNZSh{cursor:pointer}.styles__c-file-path___XvgNN{display:block;color:var(--secondaryTextColor);font-size:.75rem;text-decoration:none;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.styles__filePickerBreadcrumb-previousPath___3LKJH{color:var(--actionColorActive);cursor:pointer}.styles__filePickerBreadcrumb-icon___3aFyd{color:var(--actionColorActive);margin:0 .25rem}@supports (display:contents){.styles__filePickerBreadcrumb-wrapper___3pu1w{display:contents}}@supports not (display:contents){.styles__filePickerBreadcrumb-wrapper___3pu1w{display:flex;flex:1 1 auto;align-items:center;width:100%}}.styles__c-filename-wrapper___3tVpA{display:flex}.styles__c-filename-wrapper___3tVpA :last-child{flex-shrink:0}.styles__c-filename-name___1jDMz{display:inline;width:auto}.styles__Hero___14z7_{margin-left:auto;margin-right:auto}.styles__Hero-title___256Uz{text-align:center;margin:3rem 0}.styles__Hero-subtitle___1E_WG{margin-bottom:0}@media (max-width:48rem){.styles__Hero-subtitle___1E_WG{margin-top:.5rem}}.styles__Hero___14z7_ p{line-height:1.25}.styles__Hero-sections___ETV6e{display:flex;justify-content:space-around}@media (max-width:48rem){.styles__Hero-sections___ETV6e{flex-direction:column;align-items:center}}.styles__Hero-section___1BcNz{max-width:18.75rem;text-align:center;flex-grow:1;flex-basis:100%}@media (max-width:48rem){.styles__Hero-section___1BcNz{max-width:auto;margin-bottom:2rem}}.styles__Hero-section___1BcNz+.styles__Hero-section___1BcNz{margin-left:2rem}@media (max-width:48rem){.styles__Hero-section___1BcNz+.styles__Hero-section___1BcNz{margin-left:0}}.styles__Hero-cta___2KhwU{text-align:center;max-width:32rem;margin-left:auto;margin-right:auto;margin-top:2rem}.styles__HistoryRowCircleWrapper___3r8Uo{width:2.6rem;height:2.6rem;justify-content:center;display:flex;align-self:start}.styles__HistoryRowCircle___4FWWa{border:1px solid var(--dividerColor);background-color:var(--paperBackgroundColor)}.styles__HistoryRowRevisionLoader___a5y5b{display:flex;justify-content:center}.styles__HistoryRowCaption___2fe_H{margin-bottom:2rem;padding-left:2rem;padding-right:2rem}.styles__HistoryRowMedia___2jgYN{position:relative;padding:1rem}.styles__HistoryRowMedia___2jgYN:before{content:\"\";border-left:1px dashed var(--dividerColor2);position:absolute;margin-left:20px;top:2.125rem;bottom:-1rem}.styles__HistoryRowMedia___2jgYN:last-child:before{border:0}.styles__HistoryRowMediaImg___1J9OI{align-self:flex-start;z-index:1}.styles__icon--spin___ybfC1{animation:styles__spin___2Vvw3 1s linear infinite}@media (prefers-reduced-motion:reduce){.styles__icon--spin___ybfC1{animation:none}}@-webkit-keyframes styles__spin___2Vvw3{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes styles__spin___2Vvw3{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.styles__icon___23x3R{fill:var(--iconColor);transform:translateZ(0)}.styles__icon--preserveColor___3gBz6{fill:inherit}.styles__IconStack-wrapper___10dhG{position:relative;display:inline-block}.styles__IconStack-foregroundIcon___ZvY-t{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.styles__CozyTheme--inverted___1T27N{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3TP8j,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__Infos___2ZZVs{position:relative;border-radius:8px;padding:1rem 1.5rem}@media (max-width:48rem){.styles__Infos___2ZZVs{padding:.75rem 1rem}}.styles__Infos___2ZZVs.styles__Infos--primary___3i4ll{background-color:var(--primaryColorLightBackground)}.styles__Infos___2ZZVs.styles__Infos--secondary___1AW6F{background-color:var(--neutralBackground)}.styles__Infos___2ZZVs.styles__Infos--danger___3wKYc{background-color:var(--errorBackground)}.styles__Infos-description___7P1NP{max-width:32rem}.styles__Info-close___1RVQP{position:absolute;top:0;right:0;padding:.75rem}.styles__CozyTheme--inverted___2v05w{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___12Bhv,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__InfosCarrousel___3rCyB{position:relative}.styles__InfosCarrousel-navigation___3s_hu{position:absolute;display:flex;align-items:center;height:2.5rem;bottom:1rem;right:1rem;box-sizing:border-box}@media (max-width:48rem){.styles__InfosCarrousel-navigation___3s_hu{height:2.5rem;bottom:.75rem;right:.75rem}}.styles__InfosCarrousel-separator___AvH5m{border-left:1px solid var(--dividerColor);height:1rem;margin:0 .5rem}.styles__CozyTheme--inverted___wvkG5{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___I_6Ur,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-inline-card___1sri1{display:inline-block;border:.063rem solid var(--silver);box-shadow:0 0 .625rem rgba(0,0,0,.1);padding:.375rem}.styles__c-input-text___3TAv1[aria-disabled=true],.styles__c-input-text___3TAv1[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__c-input-text___3TAv1[aria-disabled=true]:focus,.styles__c-input-text___3TAv1[aria-disabled=true]:hover,.styles__c-input-text___3TAv1[disabled]:focus,.styles__c-input-text___3TAv1[disabled]:hover{border:.063rem solid var(--dividerColor)}.styles__c-input-text___3TAv1{display:inline-block;width:100%;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.styles__c-input-text___3TAv1::placeholder{color:var(--coolGrey);font-size:1rem}.styles__c-input-text___3TAv1:hover{border:.063rem solid var(--coolGrey)}.styles__c-input-text___3TAv1:focus{border:.063rem solid var(--dodgerBlue);outline:0}.styles__c-input-text___3TAv1.styles__is-error___3lsCJ,.styles__c-input-text___3TAv1:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.styles__c-input-text--tiny___MzMoD{border-radius:.125rem;padding:.25rem .5rem .375rem}.styles__c-input-text--medium___28jPV{border-radius:.125rem;padding:.5rem 1rem .625rem}.styles__c-input-text--large___28EaR{border-radius:.188rem;padding:.813rem 1rem}.styles__c-input-text--fullwidth___33o_f{max-width:100%}.styles__c-inputgroup___12OVJ input[aria-disabled=true],.styles__c-inputgroup___12OVJ input[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__c-inputgroup___12OVJ input[aria-disabled=true]:focus,.styles__c-inputgroup___12OVJ input[aria-disabled=true]:hover,.styles__c-inputgroup___12OVJ input[disabled]:focus,.styles__c-inputgroup___12OVJ input[disabled]:hover{border:.063rem solid var(--dividerColor)}.styles__c-inputgroup___12OVJ input{display:inline-block;width:100%;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.styles__c-inputgroup___12OVJ input::placeholder{color:var(--coolGrey);font-size:1rem}.styles__c-inputgroup___12OVJ input:hover{border:.063rem solid var(--coolGrey)}.styles__c-inputgroup___12OVJ input:focus{border:.063rem solid var(--dodgerBlue);outline:0}.styles__c-inputgroup___12OVJ input.styles__is-error___2dj3S,.styles__c-inputgroup___12OVJ input:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.styles__c-inputgroup___12OVJ{display:inline-flex;flex-direction:row;box-sizing:border-box;align-items:stretch;width:100%;max-width:32rem;border:.063rem solid var(--dividerColor);border-radius:.125rem}.styles__c-inputgroup___12OVJ:hover{border:.063rem solid var(--coolGrey)}.styles__c-inputgroup--focus___Tk5-Z,.styles__c-inputgroup--focus___Tk5-Z:hover{border-color:var(--dodgerBlue)}.styles__c-inputgroup--error___1JNbu{border-color:var(--pomegranate)}.styles__c-inputgroup--fullwidth___3nuay{max-width:none}.styles__c-inputgroup-main___1LP4B{flex:1 1 auto}.styles__c-inputgroup___12OVJ input{border:0;padding-right:.5rem}.styles__c-inputgroup___12OVJ input:focus,.styles__c-inputgroup___12OVJ input:hover{position:relative;z-index:1;border:0;outline:0}.styles__c-inputgroup-side___60v0v{display:flex;flex-direction:column;justify-content:center;flex:0 1 auto;max-width:8.75rem}.styles__c-inputgroup-unit___bFj9a{padding-left:1rem;padding-right:1rem;font-weight:700}.styles__intentHeader___m5Qjh{display:flex;align-items:center;height:2rem;padding:.5rem 1rem;background-color:var(--paleGrey);margin:0;flex-basis:auto;flex-shrink:0}.styles__intentHeader-title___1r4ex{display:flex;align-items:center;font-size:1.25rem;color:var(--charcoalGrey)}.styles__intentHeader-title___1r4ex span{font-weight:400}.styles__intentHeader-icon___3s30C{height:1.125rem;margin-right:.5rem}iframe{width:100%;height:100%;border:0}.styles__intentContainer___gZbMl,.styles__intentPlaceHolder___EWSR1{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.styles__intentContainer___gZbMl[aria-busy=true] iframe{height:0;width:0}.styles__intentContainer__error___yQ7K8{color:red;font-size:1.5em}.styles__intentModal___1aYIb{height:90vh}@media (max-width:48rem){.styles__intentModal___1aYIb{height:100%;width:100%}}.styles__intentModal___1aYIb>div{height:100%;max-width:unset!important}.styles__intentModal___1aYIb .styles__intentModal__cross___1Hfuz{top:.25rem;right:.5rem}.styles__intentWrapper___1ZMvW{display:flex;flex-flow:column nowrap;align-items:stretch;position:relative;border-radius:.5rem;max-height:100%;max-width:100%;background-color:var(--white);color:var(--charcoalGrey)}.styles__intentWrapper___1ZMvW .styles__intentHeader___3TDUp{display:flex;align-items:center;padding:.25rem 1rem;margin:0}.styles__intentWrapper___1ZMvW .styles__intentContent___1ilx7 [class^=c-header-icon--ghost]{margin:0}.styles__CollectionField__addBtn___Z0FO-{margin-left:0;margin-right:0}.styles__CollectionField__addBtnIcon___1hA5b{margin-right:.5rem}.styles__CollectionField__row___Z7bbf{display:flex;align-items:center}.styles__CollectionField__row___Z7bbf>*+*{margin-left:1rem}.styles__gridItem-container___387sO{text-align:center;box-sizing:border-box;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.styles__iconGrid___7nBAB{display:grid;grid-template-columns:repeat(2,16px);grid-template-rows:repeat(2,16px);grid-gap:1px}.styles__PasswordInput___3Oa3V{display:inline-flex;flex-direction:column;width:100%;max-width:32rem}.styles__PasswordInput--withStrength___1Msxm{border-bottom-left-radius:0;border-bottom-right-radius:0}.styles__PasswordInput__strength___1hpSg{background-color:var(--paleGrey);border-radius:.188rem;border-top-left-radius:0;border-top-right-radius:0;border:.063rem solid var(--silver);border-top:0;box-sizing:border-box;height:.25rem}.styles__PasswordInput__strength--weak___dzrGl{color:var(--pomegranate)}.styles__PasswordInput__strength--weak___dzrGl::-webkit-progress-value{background-color:var(--errorColor)}.styles__PasswordInput__strength--weak___dzrGl::-moz-progress-bar{background-color:var(--errorColor)}.styles__PasswordInput__strength--moderate___1ME_z{color:var(--texasRose)}.styles__PasswordInput__strength--moderate___1ME_z::-webkit-progress-value{background-color:var(--warningColor)}.styles__PasswordInput__strength--moderate___1ME_z::-moz-progress-bar{background-color:var(--warningColor)}.styles__PasswordInput__strength--strong___3yuP0{color:var(--emerald)}.styles__PasswordInput__strength--strong___3yuP0::-webkit-progress-value{background-color:var(--successColor)}.styles__PasswordInput__strength--strong___3yuP0::-moz-progress-bar{background-color:var(--successColor)}.styles__PasswordInput__visibilityButton___2B6RJ{height:100%;width:3rem;background-color:initial;border:0}.styles__o-layout-2panes___1CDQw,.styles__o-layout___3TSz9{box-sizing:border-box;display:flex;max-width:100%;width:100%;height:100%}.styles__o-layout-2panes___1CDQw main,.styles__o-layout___3TSz9 main{display:flex;flex-direction:column;flex:0 0 auto}.styles__o-layout-2panes___1CDQw main,.styles__o-layout-2panes___1CDQw main>[role=contentinfo],.styles__o-layout-2panes___1CDQw main>[role=main],.styles__o-layout___3TSz9 main,.styles__o-layout___3TSz9 main>[role=contentinfo],.styles__o-layout___3TSz9 main>[role=main]{position:relative;display:flex;flex-direction:column;flex:1 1 auto;box-sizing:border-box;height:100%;overflow-x:hidden;overflow-y:auto}@media (max-width:63.938rem){.styles__o-layout-2panes___1CDQw,.styles__o-layout___3TSz9{display:block}.styles__o-layout-2panes___1CDQw main,.styles__o-layout___3TSz9 main{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}.styles__o-layout-2panes___1CDQw main,.styles__o-layout-2panes___1CDQw main>[role=contentinfo],.styles__o-layout-2panes___1CDQw main>[role=main],.styles__o-layout___3TSz9 main,.styles__o-layout___3TSz9 main>[role=contentinfo],.styles__o-layout___3TSz9 main>[role=main]{display:block;overflow:visible}.styles__o-layout-2panes___1CDQw:after,.styles__o-layout-2panes___1CDQw:before,.styles__o-layout___3TSz9:after,.styles__o-layout___3TSz9:before{content:\"\";display:block}.styles__o-layout-2panes___1CDQw:after,.styles__o-layout-2panes___1CDQw:before,.styles__o-layout___3TSz9:after,.styles__o-layout___3TSz9:before{height:3rem}}.styles__o-layout-2panes___1CDQw{flex:0 0 100%;align-items:stretch}.styles__o-layout-2panes___1CDQw>aside{display:flex;flex-direction:column;flex:0 0 auto}.styles__o-layout-2panes___1CDQw main,.styles__o-layout-2panes___1CDQw main>[role=contentinfo],.styles__o-layout-2panes___1CDQw main>[role=main]{height:auto}@media (max-width:63.938rem){.styles__o-layout-2panes___1CDQw>aside{position:fixed;bottom:0;left:0;display:block;z-index:20;width:100%}}.styles__media___cSJMp{display:flex;align-items:center}.styles__media--top___K9w0I{align-items:flex-start}.styles__media--bottom___21YWJ{align-items:flex-end}.styles__bd___1Uv-F{flex:1 1 auto;overflow:hidden}.styles__img___3SHpG{line-height:0;flex:0 0 auto}.styles__c-menu__inner___2g_mC{z-index:40;border:.063rem solid var(--dividerColor);border-radius:.25rem;box-shadow:0 .063rem .188rem 0 rgba(50,54,63,.19),0 .375rem 1.125rem 0 rgba(50,54,63,.19);background-color:var(--paperBackgroundColor)}.styles__c-menu__inner___2g_mC hr{margin:.313rem 0;border:0;border-top:.063rem solid var(--dividerColor)}.styles__c-menu__inner___2g_mC [role=button],.styles__c-menu__inner___2g_mC a,.styles__c-menu__inner___2g_mC button{display:block;padding:.5rem 2rem .5rem 2.5rem;color:var(--charcoalGrey);text-decoration:none;white-space:nowrap;cursor:pointer}.styles__c-menu__inner___2g_mC [role=button]:hover,.styles__c-menu__inner___2g_mC a:hover,.styles__c-menu__inner___2g_mC button:hover{text-decoration:none}.styles__c-menu___2YTiU{position:relative;display:inline-block}.styles__c-menu__inner___2g_mC{display:none;position:absolute;margin:.063rem 0 0;padding:.5rem 0;min-width:13.75rem;overflow:hidden;border:0;color:var(--primaryTextColor)}.styles__c-menu--left___3wamY .styles__c-menu__inner___2g_mC{left:0}.styles__c-menu--right___3wxbb .styles__c-menu__inner___2g_mC{right:0}.styles__c-menu__inner--opened___sJHKG{display:block}.styles__c-menu__btn___18qF8{font-size:1rem;border:0;cursor:pointer}.styles__c-menu__btn___18qF8:not([disabled]):not([aria-disabled=true]):active,.styles__c-menu__btn___18qF8:not([disabled]):not([aria-disabled=true]):focus,.styles__c-menu__btn___18qF8:not([disabled]):not([aria-disabled=true]):hover{background-color:initial}.styles__c-menu__item___1sXjs{cursor:pointer;padding:.5rem;line-height:1.15;color:var(--primaryTextColor)}.styles__c-menu__item-icon___kzdkW{margin-top:.125em;margin-right:.75rem;margin-left:.25rem}.styles__c-menu__item-icon___kzdkW svg{width:1em;height:1em}.styles__c-menu__item___1sXjs:focus,.styles__c-menu__item___1sXjs:hover{background-color:var(--actionColorHover);outline:none}.styles__c-menu__item--disabled___OHDks{opacity:.5}.styles__CozyTheme--inverted___e9x-M{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3KdKA,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-modal___33aV9{display:flex;flex-flow:column nowrap;align-items:stretch}.styles__c-modal-content___2av1P{background:linear-gradient(#fff 30%,hsla(0,0%,100%,0)),linear-gradient(hsla(0,0%,100%,0),#fff 70%) 0 100%,linear-gradient(rgba(214,216,218,.25),rgba(214,216,218,.25) 25%,hsla(0,0%,100%,0) 26%,hsla(0,0%,100%,0)),linear-gradient(hsla(0,0%,100%,0),hsla(0,0%,100%,0) 74%,rgba(214,216,218,.25) 75%,rgba(214,216,218,.25)) 0 100%;background-repeat:no-repeat;background-color:var(--white);background-size:100% 2rem,100% 2rem,100% .5rem,100% .5rem;background-attachment:local,local,scroll,scroll;background-clip:padding-box;overflow:auto;-webkit-overflow-scrolling:touch}.styles__c-modal-footer___2Z4Tc,.styles__c-modal-header--branded___1wwof,.styles__c-modal-header___hTCm5{flex:0 0 auto}.styles__c-modal-container___31zmi{position:relative;z-index:70}.styles__c-modal-wrapper___8PyE9{position:fixed;top:0;left:0;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;width:100vw;height:100%;overflow-y:auto;padding:3rem}@media (max-width:48rem){.styles__c-modal-wrapper___8PyE9{justify-content:center;padding:1.5rem}}@media (max-width:30rem){.styles__c-modal-wrapper___8PyE9{padding:.5rem}}.styles__c-modal___33aV9{position:relative;border-radius:.5rem;max-height:100%;max-width:100%;background-color:var(--white);color:var(--charcoalGrey)}.styles__c-modal--xsmall___1lu1t{width:24rem}@media (max-width:25rem){.styles__c-modal--xsmall___1lu1t{width:100%}}.styles__c-modal--small___XUfOM{width:34rem}@media (max-width:35rem){.styles__c-modal--small___XUfOM{width:100%}}.styles__c-modal--medium___1dS6h{width:36rem}@media (max-width:39rem){.styles__c-modal--medium___1dS6h{width:100%}}.styles__c-modal--large___3arEs{width:40rem}@media (max-width:46rem){.styles__c-modal--large___3arEs{width:100%}}.styles__c-modal--xlarge___1XePQ{width:50rem}@media (max-width:56rem){.styles__c-modal--xlarge___1XePQ{width:100%}}.styles__c-modal--xxlarge___3Xp1K{width:60rem}@media (max-width:66rem){.styles__c-modal--xxlarge___3Xp1K{width:100%}}@media (max-width:48rem){.styles__c-modal-wrapper___8PyE9.styles__c-modal-wrapper--fullscreen___3ygpX{padding:0}}@media (max-width:48rem){.styles__c-modal___33aV9.styles__c-modal--fullscreen___8xZVw{height:100%;width:100%;border-radius:0;box-sizing:border-box}}.styles__c-modal-header--branded___1wwof,.styles__c-modal-header___hTCm5{margin:0 0 1rem;padding:1.687rem 3rem 0 2rem;overflow:visible;min-height:2.5rem}.styles__c-modal-header--branded___1wwof h2,.styles__c-modal-header___hTCm5 h2{margin:0;font-weight:700}@media (max-width:30rem){.styles__c-modal-header--branded___1wwof,.styles__c-modal-header___hTCm5{margin-bottom:.5rem;padding:1.187rem 2rem 0 1.5rem}.styles__c-modal-header--branded___1wwof h2,.styles__c-modal-header___hTCm5 h2{font-size:1.25rem}}.styles__c-modal-header--branded___1wwof{padding:1rem 3rem}.styles__c-modal-header--branded___1wwof img{display:block;max-height:3.5rem;margin:0 auto}.styles__c-modal-illu-header--ghost___3E9lu,.styles__c-modal-illu-header___3oi9k{display:flex;align-items:center;justify-content:center;margin:0 0 1rem;max-width:100%}.styles__c-modal-illu-header--ghost___3E9lu>*,.styles__c-modal-illu-header___3oi9k>*{max-width:inherit}.styles__c-modal-illu-header--ghost___3E9lu{position:absolute;left:0;right:0;top:1rem;margin:.5rem 0;opacity:0;max-height:2rem;transition:opacity .15s ease-in,top .15s ease-in 50ms}.styles__c-modal-illu-header--ghost___3E9lu>*{max-height:inherit}.styles__c-modal-illu-header--ghost___3E9lu.styles__is-active___1fLce{top:0;opacity:1;transition:opacity .15s ease-in 50ms,top .15s ease-in}.styles__c-modal--small-spacing___1foWa .styles__c-modal-header___hTCm5{padding:1.187rem 3rem 0 1.5rem}@media (max-width:30rem){.styles__c-modal--small-spacing___1foWa .styles__c-modal-header___hTCm5{padding:.687rem 2rem 0 1rem}}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-header___hTCm5{padding:2.687rem 3rem 0}@media (max-width:48rem){.styles__c-modal--large-spacing___n2gNs .styles__c-modal-header___hTCm5{padding:1.687rem 2rem 0}}.styles__c-modal-app___1e4sV{display:flex;align-items:center;font-size:1.25rem;color:var(--charcoalGrey)}.styles__c-app-editor___JFuCk{font-weight:400}.styles__c-modal-app-icon___3MjON{height:1.125rem;margin-right:.5rem}.styles__c-modal-content-fixed___3wKzQ{border-bottom:.063rem solid var(--dividerColor);flex:0 0 auto;padding:0 2rem}.styles__c-modal--small-spacing___1foWa .styles__c-modal-content-fixed___3wKzQ{padding:0 1.5rem}@media (max-width:30rem){.styles__c-modal--small-spacing___1foWa .styles__c-modal-content-fixed___3wKzQ{padding:0 1rem}}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content-fixed___3wKzQ{padding:0 3rem}@media (max-width:30rem){.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content-fixed___3wKzQ{padding:0 2rem}}.styles__c-modal-content___2av1P{padding:0 2rem}.styles__c-modal-content___2av1P:last-child{padding-bottom:2rem;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}@media (max-width:30rem){.styles__c-modal-content___2av1P{padding:0 1.5rem}.styles__c-modal-content___2av1P:last-child{padding-bottom:1.5rem}}.styles__c-modal--small-spacing___1foWa .styles__c-modal-content___2av1P{padding:0 1.5rem}.styles__c-modal--small-spacing___1foWa .styles__c-modal-content___2av1P:last-child{padding-bottom:1.5rem}@media (max-width:30rem){.styles__c-modal--small-spacing___1foWa .styles__c-modal-content___2av1P{padding:0 1rem}.styles__c-modal--small-spacing___1foWa .styles__c-modal-content___2av1P:last-child{padding-bottom:1rem}}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content___2av1P{padding:0 3rem}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content___2av1P:last-child{padding-bottom:3rem}@media (max-width:48rem){.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content___2av1P{padding:0 2rem}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-content___2av1P:last-child{padding-bottom:2rem}}.styles__c-modal-footer___2Z4Tc{padding:1rem 1.25rem 1.25rem}.styles__c-modal-footer--button___1sIa4 button{margin-bottom:.25rem}@media (max-width:48rem){.styles__c-modal-footer--button___1sIa4 button{min-width:calc(50% - .5rem)}}.styles__c-modal-section___2QNq3{border-top:.063rem solid var(--dividerColor)}.styles__c-modal-close___1v2bp{box-sizing:border-box;position:absolute;top:1.5rem;right:1.5rem;margin:0;padding:.5rem;background-color:initial;border:0;cursor:pointer;display:block;width:2.5rem;height:2.5rem;z-index:1}@media (max-width:30rem){.styles__c-modal-close___1v2bp{top:.813rem;right:1rem}}.styles__c-modal--small-spacing___1foWa .styles__c-modal-close___1v2bp{top:1rem;right:1rem}@media (max-width:30rem){.styles__c-modal--small-spacing___1foWa .styles__c-modal-close___1v2bp{top:.313rem;right:.5rem}}.styles__c-modal--closable___29CLQ .styles__c-modal-header___hTCm5{padding-right:4.5rem}.styles__c-modal--large-spacing___n2gNs .styles__c-modal-close___1v2bp{top:2.5rem;right:2.5rem}@media (max-width:48rem){.styles__c-modal--large-spacing___n2gNs .styles__c-modal-close___1v2bp{top:1.313rem;right:1.5rem}}.styles__c-modal-close--notitle___1rqne{top:.375rem;right:.375rem}.styles__c-modal--overflowHidden___3H87t{overflow:hidden}.styles__c-modal-back-button___aIF_M{top:.375rem;left:.375rem;color:var(--coolGrey)}@media (max-width:48rem){.styles__c-modal-back-button___aIF_M{top:0;left:0}}.styles__c-modal-close--notitle___1rqne+.styles__c-modal-content___2av1P{margin-top:3rem}.styles__divider___-oC9I{align-items:center;display:flex}.styles__divider___-oC9I:after,.styles__divider___-oC9I:before{content:\"\";height:1px;background-color:var(--dividerColor)}.styles__divider___-oC9I:before{display:none;margin-right:.5rem}.styles__divider___-oC9I:after{flex:1;margin-left:.5rem}.styles__center___2jZEg:before{display:block;flex:1}.styles__NarrowContent___Zq8oI{max-width:32rem}.styles__CozyTheme--inverted____lEpp{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___1G-Us,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-nav___33dZy{margin:1.5rem 0;padding:0;list-style:none}@media (max-width:63.938rem){.styles__c-nav___33dZy{display:flex;justify-content:space-around;margin:.313rem 0 .25rem;padding-right:0}}.styles__c-nav-item___3XOLK{position:relative;z-index:0;height:3rem;box-sizing:border-box;cursor:pointer}.styles__c-nav-item___3XOLK:hover:before{content:\"\";position:absolute;z-index:-1;border-radius:0 .188rem .188rem 0;top:0;left:0;right:1rem;bottom:0;background:rgba(0,0,0,.1)}@media (hover:none){.styles__c-nav-item___3XOLK:hover:before{content:none}}@media (max-width:63.938rem){.styles__c-nav-item___3XOLK{margin:0 .75rem;height:auto;display:block;flex:0 0 2.5rem;padding-right:0}.styles__c-nav-item___3XOLK:hover:before{content:none}}.styles__c-nav-icon___hrJUe{display:inline-block;margin-right:.688rem;color:var(--coolGrey);fill:currentColor}.styles__c-nav-icon___hrJUe svg{display:block}.styles__is-active___2D0jN .styles__c-nav-icon___hrJUe{color:var(--primaryColor)}:hover>.styles__c-nav-icon___hrJUe{color:var(--navTextColor)}@media (max-width:63.938rem){.styles__c-nav-icon___hrJUe{display:block;margin-right:0}.styles__c-nav-icon___hrJUe svg{margin:0 auto 3px;width:1.5rem;height:1.5rem}}@media (max-width:63.938rem){.styles__c-nav-text___1J3yU{display:block;text-align:center;white-space:nowrap}}.styles__c-nav-link___3mK6W{display:flex;box-shadow:border-box;padding-left:1.5rem;padding-right:1rem;line-height:1.5;text-decoration:none;color:var(--navTextColor);height:100%;align-items:center;flex:1;background-repeat:no-repeat;background-position:1.5rem}.styles__c-nav-link___3mK6W:visited{color:var(--navTextColor)}.styles__c-nav-link___3mK6W:hover:not(.styles__is-active___2D0jN){color:var(--navTextHoverColor)}.styles__c-nav-link___3mK6W.styles__is-active___2D0jN{box-shadow:inset .25rem 0 0 0 var(--primaryColor);font-weight:700;color:var(--navTextActiveColor)}.styles__c-nav-link___3mK6W.styles__is-active___2D0jN .styles__c-nav-icon___hrJUe{color:var(--primaryColor)}@media (max-width:63.938rem){.styles__c-nav-link___3mK6W{display:block;height:auto;padding:0;text-align:center;font-size:.625rem;line-height:.75rem;background-position:top;background-size:1.5rem}.styles__c-nav-link___3mK6W.styles__is-active___2D0jN,.styles__c-nav-link___3mK6W:hover{box-shadow:none;font-weight:400}}@media not all and (pointer:fine){.styles__c-nav-link___3mK6W:hover:not(.styles__is-active___2D0jN){color:var(--navTextColor)}}.styles__c-nav-item-secondary___k14rf{height:auto}.styles__c-nav-item-secondary___k14rf+.styles__c-nav-item-secondary___k14rf{margin-top:.125rem}@media (max-width:63.938rem){.styles__c-nav-item-secondary___k14rf{display:none}}.styles__c-nav-item-secondary___k14rf:hover:before{content:\"\";position:absolute;z-index:-1;border-radius:.188rem 0 0 .188rem;top:0;right:0;left:3rem;bottom:0;background:rgba(0,0,0,.1)}@media (hover:none){.styles__c-nav-item-secondary___k14rf:hover:before{content:none}}.styles__c-nav-item-secondary___k14rf .styles__c-nav-link___3mK6W{padding:.5rem 1rem;margin-left:3rem;border-radius:4px 0 0 4px;box-shadow:none;font-size:.875rem;color:var(--navTextColor);text-decoration:none;height:auto}.styles__c-nav-item-secondary___k14rf .styles__c-nav-link___3mK6W:hover:not(.styles__is-active___2D0jN){color:var(--navTextHoverColor)}.styles__c-nav-item-secondary___k14rf .styles__c-nav-link___3mK6W.styles__is-active___2D0jN{color:#fff;border-right:1px solid var(--navTextColor);background-color:var(--navTextColor)}.styles__DesktopSectionWrapper___1rIWP{list-style-type:none}.styles__Modal__back___qxUn_{cursor:pointer;margin-right:.5rem;margin-left:-.25rem;font-size:1.5rem;line-height:0;margin-bottom:-1rem;position:relative;top:-.5rem}.styles__OrderedList___17A_o{list-style:none;counter-reset:cozy-ui-ordered-list;padding-left:0;line-height:1.5}.styles__ListItem___2Lu4a{counter-increment:cozy-ui-ordered-list;position:relative;padding-left:1.5rem}.styles__ListItem___2Lu4a:before{content:counter(cozy-ui-ordered-list) \". \";font-weight:700;position:absolute;left:0;top:0}.styles__c-overlay___31iWd{z-index:50;position:fixed;top:0;left:0;height:100%;width:100%;background:var(--overlay);visibility:visible;transition:opacity .3s,visibility 0s ease-out}.styles__PageFooter___2IFCx{flex-grow:0}.styles__PageContent___DbPFL{flex-grow:1}.styles__PageLayout___1ptQY{display:flex;flex-direction:column}.styles__Panel-group___1txSp{display:flex;flex-direction:row;justify-content:flex-start;align-items:stretch;box-sizing:border-box}.styles__Panel-main___2BRfq{flex:1 0 65%;overflow:auto}.styles__Panel-side___327EK{flex:0 0 35%;background:var(--paleGrey);overflow:auto}.styles__Panel-main___2BRfq,.styles__Panel-side___327EK{padding:1.5rem}@media (max-width:30rem){.styles__Panel-main___2BRfq,.styles__Panel-side___327EK{padding:.5rem}}@media (max-width:48rem){.styles__Panel-group___1txSp{display:block;overflow:auto}.styles__Panel-main___2BRfq,.styles__Panel-side___327EK{flex-basis:auto}}.styles__Token--number___2EzoN{color:#297ef2}.styles__Token--special___3_rSu{color:#b449e7}.styles__PercentageBar___12TWu{background-color:var(--defaultBackgroundColor);border:1px solid var(--borderMainColor);height:1.5rem;border-radius:4px}.styles__PercentageBar___12TWu .styles__PercentageBar__line___1DAnN{height:100%;border-radius:4px}.PercentageLine__PercentageLine___3koWP{transition:transform .3s ease;transform-origin:0 0;height:5px}.styles__c-btn-client___jTKz7{position:relative;box-sizing:border-box;display:inline-flex;margin:0 .25rem;border-radius:var(--buttonBorderRadius);min-height:2.5rem;min-width:7rem;padding:.188rem 1rem;vertical-align:top;text-align:center;font-size:.875rem;line-height:1;text-transform:var(--buttonTextTransform);text-decoration:none;cursor:pointer;background-color:var(--regularButtonPrimaryColor);color:var(--regularButtonConstrastColor);border:.063rem solid var(--regularButtonSecondaryColor)}.styles__c-btn-client___jTKz7 svg{fill:currentColor}.styles__c-btn-client___jTKz7 svg+span{margin-left:.375rem}.styles__c-btn-client___jTKz7 input{cursor:pointer}.styles__c-btn-client___jTKz7>span{display:flex;align-items:center;justify-content:center;width:100%}.styles__c-btn-client___jTKz7[aria-disabled=true],.styles__c-btn-client___jTKz7[disabled]{opacity:.5;cursor:not-allowed}.styles__c-btn-client___jTKz7[aria-disabled=true] input,.styles__c-btn-client___jTKz7[disabled] input{cursor:not-allowed}.styles__c-btn-client___jTKz7[aria-busy=true]{opacity:.5;pointer-events:none}.styles__c-btn-client___jTKz7:visited{color:var(--regularButtonConstrastColor)}.styles__c-btn-client___jTKz7:active,.styles__c-btn-client___jTKz7:focus,.styles__c-btn-client___jTKz7:hover{border-color:var(--regularButtonActiveColor);background-color:var(--regularButtonActiveColor)}.styles__c-btn-client___jTKz7[aria-disabled=true]:hover,.styles__c-btn-client___jTKz7[disabled]:hover{border-color:var(--regularButtonSecondaryColor);background-color:var(--regularButtonPrimaryColor)}.styles__c-btn-client___jTKz7{background-color:var(--secondaryButtonPrimaryColor);border-color:var(--secondaryButtonSecondaryColor)}.styles__c-btn-client___jTKz7,.styles__c-btn-client___jTKz7:visited{color:var(--secondaryButtonContrastColor)}.styles__c-btn-client___jTKz7:active,.styles__c-btn-client___jTKz7:focus,.styles__c-btn-client___jTKz7:hover{border-color:var(--secondaryButtonActiveColor);background-color:var(--secondaryButtonActiveColor)}.styles__c-btn-client___jTKz7[aria-disabled=true]:hover,.styles__c-btn-client___jTKz7[disabled]:hover{border-color:var(--secondaryButtonSecondaryColor);background-color:var(--secondaryButtonPrimaryColor)}.styles__c-btn-client___jTKz7{display:flex;justify-content:center;align-items:center;height:auto;min-height:3.5rem;margin:0;padding-left:1rem;padding-right:1rem;background-color:initial;text-align:left;font-size:.813rem;font-weight:700;line-height:1.3;color:var(--slateGrey)}.styles__c-btn-client___jTKz7:visited{color:var(--slateGrey)}.styles__c-btn-client___jTKz7 span{flex:0 1 auto}.styles__c-btn-client___jTKz7 figure{flex:0 0 2rem;margin:0 .75rem 0 0}.styles__c-input-radio___XJQt1{display:flex;align-items:center;min-width:1rem;min-height:1rem}.styles__c-input-radio___XJQt1 span{position:relative;display:inline-block;padding-left:1.5rem;cursor:pointer;line-height:1.5}.styles__c-input-radio___XJQt1 span:after,.styles__c-input-radio___XJQt1 span:before{content:\"\";position:absolute;left:0;top:50%;box-sizing:border-box;width:1rem;height:1rem;border-radius:.125rem}.styles__c-input-radio___XJQt1 span:before{transition:box-shadow .35s cubic-bezier(0,.89,.44,1);background-color:var(--white);box-shadow:inset 0 0 0 .125rem var(--silver);transform:translateY(-50%)}.styles__c-input-radio___XJQt1 span:hover:before{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}.styles__c-input-radio___XJQt1 span:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMgMTAuMDE5bDQuNTIzIDQuNTIzIDkuNTQxLTkuNTQxIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==\");background-size:contain;transition-duration:.2s;transition-property:opacity,transform}.styles__c-input-radio___XJQt1[aria-checked=mixed] span:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTMuNDk3IDEwaDEzLjAwNiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIiLz48L3N2Zz4=\");background-size:contain}.styles__c-input-radio___XJQt1[aria-disabled=true] span{opacity:.5;cursor:not-allowed}.styles__c-input-radio___XJQt1[aria-disabled=true] :hover:before{box-shadow:inset 0 0 0 .125rem var(--silver)}.styles__c-input-radio___XJQt1[aria-disabled=true] :before{background-color:var(--paleGrey)}.styles__c-input-radio___XJQt1 input{border:0;clip:rect(0 0 0 0);clip-path:polygon(0 0,0 0,0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.styles__c-input-radio___XJQt1 input:focus+span:before{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}.styles__c-input-radio___XJQt1 input:checked+span:before{box-shadow:inset 0 0 0 1rem var(--dodgerBlue)}.styles__c-input-radio___XJQt1 input:checked+span:after{opacity:1;transform:translateY(-50%) scale(1)}.styles__c-input-radio___XJQt1 input:not(:checked)+span:after{opacity:0;transform:translateY(-50%) scale(0)}.styles__c-input-radio___XJQt1.styles__is-error___2-12P span{color:var(--pomegranate)}.styles__c-input-radio___XJQt1.styles__is-error___2-12P span:before{box-shadow:inset 0 0 0 .125rem var(--pomegranate);background-color:var(--yourPink)}.styles__c-input-radio--noGutter___3WtC2 span{padding-left:0}.styles__c-input-radio___XJQt1 span:after,.styles__c-input-radio___XJQt1 span:before{border-radius:50%}.styles__c-input-radio___XJQt1 span:after{content:\"\";background:var(--white);border:.313rem solid var(--dodgerBlue);box-sizing:border-box;width:1rem;height:1rem}.styles__select--disabled___1W3en{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__select--disabled___1W3en:focus,.styles__select--disabled___1W3en:hover{border:.063rem solid var(--dividerColor)}.styles__select--fullwidth___2l_xM{max-width:100%;padding-right:2.375rem}.styles__select--disabled___1W3en:focus,.styles__select--disabled___1W3en:hover{border-width:0}.styles__CozyTheme--inverted___1qeqU{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3RDVP,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__select-control__input___1xDlj{width:0;height:0;overflow:hidden}.styles__select--autowidth___16AEp{max-width:32rem}.styles__select--fullwidth___2l_xM{padding-right:0}.styles__select-option___ov_IT{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:.5rem;border-left:.25rem solid transparent;color:var(--charcoalGrey);transition:all .2s ease-out;white-space:normal}.styles__select-option___ov_IT:hover:not(.styles__select-option--disabled___1du57){background-color:var(--paleGrey);cursor:pointer}.styles__select-option___ov_IT:hover:not(.styles__select-option--disabled___1du57) .styles__select-option__actions___2WOjb{opacity:1}.styles__select-option--focused___1Vpjv:not(.styles__select-option--disabled___1du57){background-color:var(--paleGrey)}.styles__select-option--selected___R3_ES{background-color:var(--paleGrey);border-left-color:var(--primaryColor)}.styles__select-option--disabled___1du57{color:var(--silver);cursor:not-allowed}.styles__select-option__checkbox___15WVE{margin-right:.5rem;vertical-align:top}.styles__select-option__label___1Xi5R{flex-grow:1;display:flex;justify-content:space-between;align-items:center;width:100%;overflow:hidden}.styles__select-option__checkmark___ChXXs{width:2rem}.styles__select-option__actions___2WOjb{opacity:0;white-space:nowrap;transition:opacity .2s ease-out}@media (max-width:63.938rem){.styles__select-option__actions___2WOjb{opacity:1}}.styles__select__overlay___3H8Jy:before{content:\"\\A0\";width:200vw;height:200vh;top:-50vh;left:-50vh;display:block;position:fixed}.styles__MenuList___1H_pH{display:flex;flex-direction:column}.styles__FixedGroup___2izTc,.styles__Group___J6s7k{overflow-y:auto;padding-top:.25rem!important;padding-bottom:.25rem!important}.styles__FixedGroup___2izTc{flex-shrink:0;border-top:1px solid silver}.styles__CozyTheme--inverted___29EFn{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___GUFJ5,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__SelectionBar___3UOqy{position:fixed;z-index:30;top:0;left:0;box-sizing:border-box;display:flex;justify-content:center;align-items:center;width:100%;height:3.25rem;color:var(--white);background-color:var(--slateGrey);font-weight:700}.styles__SelectionBar___3UOqy .styles__SelectionBar-separator___2OV1_{margin:0 1rem 0 2rem;width:.25rem;height:.25rem;border-radius:50%;background-color:var(--black)}.styles__SelectionBar___3UOqy .styles__SelectionBar-action___3B1aR{margin:0 .25rem;color:var(--white)}.styles__SelectionBar___3UOqy .styles__SelectionBar-action___3B1aR:hover{color:var(--white)}.styles__SelectionBar___3UOqy .styles__SelectionBar-action--withLabel___3TJq3{margin:0 .5rem}.styles__SelectionBar___3UOqy .styles__SelectionBar-action--close___1OgGC{position:absolute;top:50%;right:0;transform:translateY(-50%);margin:0 .5rem}@media (max-width:63.938rem){.styles__SelectionBar___3UOqy{top:auto;bottom:0;justify-content:flex-start;box-sizing:initial;width:calc(100% - 2rem);height:3rem;padding-left:1rem;padding-right:1rem;padding-bottom:env(safe-area-inset-bottom)}.styles__SelectionBar___3UOqy .styles__SelectionBar-separator___2OV1_{margin:0 0 0 1rem}.styles__SelectionBar___3UOqy .styles__SelectionBar-action--close___1OgGC{top:auto;transform:none;margin:0 .5rem}}:root{--sidebarHeight:3rem}.styles__o-sidebar___1295j{width:13.75rem;border-right:.063rem solid var(--dividerColor);background-color:var(--paleGrey)}@media (max-width:63.938rem){.styles__o-sidebar___1295j{justify-content:space-between;border:0;border-top:.063rem solid var(--dividerColor);height:var(--sidebarHeight);width:100%;padding-bottom:env(safe-area-inset-bottom)}}.styles__CozyTheme--inverted___1VV-g{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3khZB,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__c-spinner___1snK7{display:inline-block;margin:0 .5rem}.styles__c-spinner___1snK7:before{content:\"\"}.styles__c-spinner___1snK7 p{margin-top:.938rem;line-height:1.5}.styles__c-spinner--middle___RwyII{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);text-align:center}.styles__c-spinner--middle___RwyII:before{display:block;margin:0 auto}.styles__c-spinner--nomargin___13JyW{margin:0}.styles__SquareAppIcon-wrapper___2SEuM{box-sizing:border-box;background-color:var(--paperBackgroundColor);border-radius:.75rem;height:4rem;width:4rem;transition:transform .3s,border-radius .3s}@media (max-width:48rem){.styles__SquareAppIcon-wrapper___2SEuM{height:3rem;width:3rem}}.styles__SquareAppIcon-icon-container___39MRl{display:flex;align-items:center;justify-content:center;padding:.625rem;border-radius:.75rem;width:100%}@media (max-width:48rem){.styles__SquareAppIcon-icon-container___39MRl{padding:.5rem}}.styles__SquareAppIcon-icon-container___39MRl img,.styles__SquareAppIcon-icon-container___39MRl svg{width:100%}.styles__SquareAppIcon-wrapper-fx___3rcF6{background-color:hsla(0,0%,100%,.32);border:1px dashed var(--white);background-color:hsla(0,0%,100%,.48)}.styles__SquareAppIcon-wrapper-ghost___1ZALZ .styles__SquareAppIcon-icon-container___39MRl{mix-blend-mode:screen}.styles__SquareAppIcon-wrapper-ghost___1ZALZ .styles__SquareAppIcon-icon-container___39MRl img,.styles__SquareAppIcon-wrapper-ghost___1ZALZ .styles__SquareAppIcon-icon-container___39MRl svg{filter:saturate(0)}.styles__SquareAppIcon-wrapper-maintenance___2ne2n .styles__SquareAppIcon-icon-container___39MRl{mix-blend-mode:luminosity}.styles__SquareAppIcon-wrapper-maintenance___2ne2n .styles__SquareAppIcon-icon-container___39MRl img,.styles__SquareAppIcon-wrapper-maintenance___2ne2n .styles__SquareAppIcon-icon-container___39MRl svg{opacity:.5}.styles__SquareAppIcon-wrapper-loading___3A1_X{border-radius:50%;transform:scale(.875)}@media (max-width:48rem){.styles__SquareAppIcon-wrapper-loading___3A1_X{transform:scale(.8334)}}.styles__SquareAppIcon-spinner___o0LO1 svg{position:absolute;height:100%;width:100%}.styles__Stack--m___1tSpV>*+*{margin-top:1rem}.styles__Stack--xs___2R5lW>*+*{margin-top:.5rem}.styles__Stack--s___22WMg>*+*{margin-top:.75rem}.styles__Stack--l___3oxCJ>*+*{margin-top:1.5rem}.styles__Stack--xl___3qy-m>*+*{margin-top:2rem}.styles__Stack--xxl___2KAsb>*+*{margin-top:3rem}.styles__Table___x3ZsI{position:relative;display:flex;flex-direction:column;flex:1 1 100%;height:100%;text-align:left;color:var(--secondaryTextColor)}.styles__TableHead___1rqhM{flex:0 0 2rem}@media (max-width:48rem){.styles__TableHead___1rqhM{display:none}}.styles__TableBody___1EfpK{flex:1 1 auto;display:flex;flex-direction:column;overflow:auto}@media (max-width:48rem){.styles__TableBody___1EfpK{max-height:100%}}.styles__TableHead___1rqhM .styles__TableRow___1D62H,.styles__TableRow___1D62H{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;flex:0 0 auto;height:3rem;width:100%;border-top:.063rem solid var(--dividerColor)}.styles__TableHead___1rqhM .styles__TableRow___1D62H:hover,.styles__TableRow___1D62H:hover{background-color:var(--actionColorHover)}@media (hover:none){.styles__TableHead___1rqhM .styles__TableRow___1D62H:hover,.styles__TableRow___1D62H:hover{background-color:initial}}.styles__TableHead___1rqhM .styles__TableRow___1D62H:last-child,.styles__TableRow___1D62H:last-child{border-bottom:.063rem solid var(--dividerColor)}@media (max-width:63.938rem){.styles__TableHead___1rqhM .styles__TableRow___1D62H,.styles__TableRow___1D62H{max-width:100vw}}.styles__TableHead___1rqhM .styles__TableRow___1D62H{border:0}.styles__TableHead___1rqhM .styles__TableRow___1D62H:hover{background-color:initial}.styles__TableHead___1rqhM .styles__TableRow___1D62H:last-child{border-bottom:0}.styles__TableCell___yJCq7,.styles__TableHeader___FWkmV{box-sizing:border-box;padding:.875rem 1rem;font-size:.875rem;line-height:1.3}.styles__TableHeader___FWkmV{padding:.5rem 1rem;font-size:.75rem;font-weight:700;text-transform:uppercase}.styles__c-textarea___D7EEH[aria-disabled=true],.styles__c-textarea___D7EEH[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__c-textarea___D7EEH[aria-disabled=true]:focus,.styles__c-textarea___D7EEH[aria-disabled=true]:hover,.styles__c-textarea___D7EEH[disabled]:focus,.styles__c-textarea___D7EEH[disabled]:hover{border:.063rem solid var(--dividerColor)}.styles__c-textarea___D7EEH{display:inline-block;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.styles__c-textarea___D7EEH::placeholder{color:var(--coolGrey);font-size:1rem}.styles__c-textarea___D7EEH:hover{border:.063rem solid var(--coolGrey)}.styles__c-textarea___D7EEH:focus{border:.063rem solid var(--dodgerBlue);outline:0}.styles__c-textarea___D7EEH.styles__is-error___1kGLj,.styles__c-textarea___D7EEH:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.styles__c-textarea--tiny___3fmPW{border-radius:.125rem;padding:.25rem .5rem .375rem}.styles__c-textarea--medium___T8f3b{border-radius:.125rem;padding:.5rem 1rem .625rem}.styles__c-textarea--fullwidth___Ih_mg{max-width:100%}.styles__c-textarea___D7EEH{display:block;width:100%;min-height:7.5rem;resize:vertical}.styles__c-textarea--tiny___3fmPW{min-height:3rem}.styles__c-textarea--medium___T8f3b{min-height:5rem}.styles__Tile___2SqRi{box-sizing:border-box;position:relative;display:flex;flex-direction:column;flex:0 0 8.75rem;width:8.75rem;height:8.75rem;align-items:center;background:var(--paperBackgroundColor);border-radius:4px;border:1px solid var(--dividerColor);padding:.375rem;margin-bottom:1rem;margin-right:.75rem;overflow:hidden;transition:all .15s ease}.styles__Tile___2SqRi.styles__Tile-secondary___2zYdn{background:var(--defaultBackgroundColor);border-color:var(--defaultBackgroundColor)}.styles__Tile___2SqRi:active,.styles__Tile___2SqRi:focus,.styles__Tile___2SqRi:hover{box-shadow:0 4px 12px 0 rgba(0,0,0,.08);cursor:pointer;transform:scale(1.1)}@media (max-width:48rem){.styles__Tile___2SqRi{flex-basis:100%;flex-direction:row;height:3.75rem;justify-content:flex-start;margin-right:.5rem;margin-bottom:.5rem;padding-left:.5rem}.styles__Tile___2SqRi:active,.styles__Tile___2SqRi:focus,.styles__Tile___2SqRi:hover{transform:scale(1.01)}}.styles__Tile-icon-wrapper___24AzZ{margin-top:.25rem;margin-bottom:.25rem;width:3rem;height:3rem}.styles__Tile-desc___3lPj6{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;margin-top:.5rem;text-align:center;max-width:100%}.styles__Tile-developer___2GOfB,.styles__Tile-status___33VkE,.styles__Tile-title___3gbq-{display:block;margin:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.styles__Tile-title___3gbq-{color:var(--black)}.styles__Tile-title___3gbq-.styles__Tile-title-multiline___17HPx{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}.styles__Tile-developer___2GOfB{height:1rem}.styles__Tile-status___33VkE{margin-top:.5rem;height:1rem}.styles__Tile-status___33VkE.styles__Tile-status-accent___an9au{color:var(--primaryColor)}@media (max-width:48rem){.styles__Tile-icon-wrapper___24AzZ{margin-top:0;margin-bottom:0;width:3rem;height:2.5rem}.styles__Tile-desc___3lPj6{margin-top:0;margin-left:.5rem;text-align:left;flex-grow:1}.styles__Tile-title___3gbq-{height:1rem;font-weight:400;font-size:.75rem!important}.styles__Tile-developer___2GOfB,.styles__Tile-status___33VkE,.styles__Tile-title___3gbq-{width:100%}.styles__Tile-developer___2GOfB{display:none}.styles__Tile-status___33VkE{margin-top:.125rem}}.styles__CozyTheme--inverted___2Ei4w{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___1uhrc,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__toggle___3zVsE{display:inline-block;width:2.5rem;height:1.5rem}.styles__checkbox___3ko96{display:none}.styles__label___3jY1f{position:relative;display:inline-block;width:100%;height:100%;border-radius:1rem;background:var(--silver);transition:all .2s ease-out;cursor:pointer}.styles__label___3jY1f:before{position:absolute;top:0;bottom:0;left:.125rem;display:inline-block;width:1.25rem;height:1.25rem;margin:auto;border-radius:50%;content:\"\";background:var(--white);transition:all .2s ease-out}.styles__checkbox___3ko96:checked+.styles__label___3jY1f{background:var(--emerald)}.styles__checkbox___3ko96:checked+.styles__label___3jY1f:before{left:1.125rem}.styles__UnorderedList___2uFFY{padding-left:0;list-style:none}.styles__ListItem___3cRoI{position:relative;line-height:1.5;padding-left:1.5rem}.styles__ListItem___3cRoI:before{content:\"\";position:absolute;top:.75rem;left:0;width:.5rem;height:.5rem;background-color:var(--slateGrey);border-radius:50%;transform:translateY(-50%)}.styles__CozyTheme--inverted___Y2IXl{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___x9CNZ,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__upload-queue___1VtNK{border:.0625rem solid var(--dividerColor);border-radius:.25rem;background-color:var(--paperBackgroundColor);display:flex;flex-direction:column;max-width:90%;width:30rem}.styles__upload-queue__threshold-bar___tTYal{min-width:10rem;margin-right:1rem}.styles__upload-queue__progress-caption___1-vXY{line-height:.75rem;height:1rem}.styles__upload-queue__upload-progress___1q-uS{align-items:center;display:flex;margin-top:.125rem}.styles__upload-queue--popover___2z1a4{z-index:40;border:.063rem solid var(--dividerColor);border-radius:.25rem;box-shadow:0 .063rem .188rem 0 rgba(50,54,63,.19),0 .375rem 1.125rem 0 rgba(50,54,63,.19);background-color:var(--paperBackgroundColor);position:fixed;bottom:.5rem;right:1.5rem;height:13.125rem;transform:translateY(18.75rem);transition:.5s;opacity:0;visibility:hidden}.styles__upload-queue--popover___2z1a4.styles__upload-queue--visible___DjVRs{opacity:1;visibility:visible;transform:translate(0)}.styles__upload-queue-header___c9Vf2{display:flex;flex-direction:column;justify-content:center;height:2rem;background-color:var(--defaultBackgroundColor);font-weight:700;margin:0;padding:.5rem 1rem}.styles__upload-queue-header___c9Vf2 .styles__upload-queue-header-inner___26wpB{display:flex;justify-content:space-between;align-items:center}progress.styles__upload-queue-progress___1CmN-{-webkit-appearance:none;-moz-appearance:none;border:none;display:block;width:100%;height:.125rem;margin:0}.styles__upload-queue-content___3MPHo{overflow:auto}.styles__upload-queue--collapsed___3cchD{height:2.5rem}.styles__upload-queue--collapsed___3cchD .styles__upload-queue-content___3MPHo{visibility:none}.styles__upload-queue-list___OVvJm{flex:1 1 auto;display:flex;flex-direction:column}.styles__upload-queue-item--error___2sSeV{background-color:var(--errorBackground)}.styles__upload-queue-item--done___2PSJI{background-color:var(--defaultBackgroundColor)}.styles__item-file___1kfDn{user-select:none;overflow:hidden}.styles__item-status___3FNcY{flex:0 0 15%;text-align:right;white-space:nowrap;padding-left:1rem}@media (max-width:63.938rem){.styles__upload-queue___1VtNK{border-radius:0;border:0;background-color:var(--paperBackgroundColor);box-shadow:none;width:100%;max-width:100%;height:auto;transform:none}.styles__upload-queue-header___c9Vf2{background:0;text-transform:uppercase;padding:.5rem}.styles__upload-queue-content___3MPHo{display:none}.styles__upload-queue--popover___2z1a4{top:3rem;bottom:auto;right:0;left:0;z-index:3;max-height:0}.styles__upload-queue--popover___2z1a4:before{position:fixed;top:2.9375rem;z-index:20;width:100%;height:.0625rem;content:\"\";background:var(--paperBackgroundColor)}.styles__upload-queue--popover___2z1a4.styles__upload-queue--visible___DjVRs{max-height:30%}.styles__upload-queue--popover___2z1a4 .styles__upload-queue-content___3MPHo{display:none}}.styles__CozyTheme--inverted___27uwa{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___3cif3,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__viewer-audioviewer___1OQPB,.styles__viewer-canceled___pOA_O,.styles__viewer-imageviewer___26k0p,.styles__viewer-noviewer___auG-6,.styles__viewer-pdfviewer___1gTP9,.styles__viewer-textviewer___3u5Zw,.styles__viewer-videoviewer___NhFoe{position:relative;display:flex;width:60%;max-height:calc(100% - 4rem);justify-content:center;align-items:center;flex-direction:column;margin-top:4rem}.styles__viewer-audioviewer___1OQPB h2,.styles__viewer-canceled___pOA_O h2,.styles__viewer-imageviewer___26k0p h2,.styles__viewer-noviewer___auG-6 h2,.styles__viewer-pdfviewer___1gTP9 h2,.styles__viewer-textviewer___3u5Zw h2,.styles__viewer-videoviewer___NhFoe h2{max-width:90%}@media (max-width:63.938rem){.styles__viewer-audioviewer___1OQPB,.styles__viewer-canceled___pOA_O,.styles__viewer-imageviewer___26k0p,.styles__viewer-noviewer___auG-6,.styles__viewer-pdfviewer___1gTP9,.styles__viewer-textviewer___3u5Zw,.styles__viewer-videoviewer___NhFoe{margin-left:0;width:100%;max-height:calc(100% - 6.5rem);margin-top:-.5rem}}.styles__viewer-videoviewer___NhFoe video{width:100%;max-width:31.25rem;height:auto}.styles__viewer-textviewer___3u5Zw .styles__viewer-textviewer-content___PB-c3{white-space:pre-line;width:100%;max-height:70%;overflow:auto}.styles__viewer-textviewer___3u5Zw a{color:var(--azure)}@media (max-width:63.938rem){.styles__viewer-textviewer___3u5Zw{width:90%;margin-left:5%}}.styles__viewer-filename___3jZCt{max-width:90%;text-overflow:ellipsis;overflow:hidden}.styles__viewer-pdfviewer-pdf___16ID9{overflow:auto;width:100%}.styles__viewer-pdfviewer-page___2RPuw>*{margin:auto}.styles__viewer-pdfviewer-toolbar___3NXOk{position:absolute;bottom:2rem;background:var(--charcoalGrey);color:var(--white);border-radius:.5rem}.styles__viewer-imageviewer___26k0p{flex:1 1 100%;width:auto;max-width:100%}.styles__viewer-imageviewer___26k0p img{display:block;max-width:100%;max-height:100%;box-shadow:0 .375rem 1.5rem 0 rgba(0,0,0,.5)}.styles__viewer-pdfMobile___25FPg{width:100%;height:calc(100% - 6.5rem - var(--flagship-top-height));margin-top:calc(var(--flagship-top-height, 0rem) + -.5rem)}.styles__viewer-pdfMobile--image___3gpFL{width:100%}.styles__ActionMenuDesktop-ActionMenu___1iicy a{padding:0}.styles__ActionMenuDesktop-ActionMenu___1iicy .styles__ActionMenuDesktop-ActionMenu-link-disabled___3QHjm>div{cursor:default}.styles__ActionMenuDesktop-ActionMenu___1iicy .styles__ActionMenuDesktop-ActionMenu-link-disabled___3QHjm>div:hover{background-color:initial}.styles__ActionMenuDesktop-ActionMenu___1iicy .styles__ActionMenuDesktop-ActionMenu-link-disabled___3QHjm>div>div svg{fill:var(--disabledTextColor)}.styles__ActionMenuDesktop-ActionMenu___1iicy .styles__ActionMenuDesktop-ActionMenu-link-disabled___3QHjm>div>div p{color:var(--disabledTextColor)}.styles__CozyTheme--inverted___1II8o{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___382qj,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__viewer-wrapper___2GIXH{position:absolute;left:0;right:0;top:0;bottom:0;z-index:50;overflow:hidden;background:var(--charcoalGrey);color:var(--white)}.styles__flagship-app___KFqbm .styles__viewer-wrapper___2GIXH{padding-top:var(--flagship-top-height);padding-bottom:var(--flagship-bottom-height)}@media (max-width:63.938rem){.styles__viewer-wrapper___2GIXH{color:var(--charcoalGrey);background:var(--white)}}.styles__CozyTheme--inverted___18ATZ{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}.styles__CozyTheme--normal___2u2nl,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.styles__viewer-nav___1MSd7{position:absolute;top:4rem;bottom:0;z-index:72;width:20%;cursor:pointer;background-color:initial;transition:opacity .4s ease-out;opacity:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.styles__viewer-nav--visible___h_KJD:hover{opacity:1;transition:none}.styles__viewer-nav--previous___WOwzv{left:0}.styles__viewer-nav--previous___WOwzv .styles__viewer-nav-arrow___3_d1_{align-self:flex-start;margin-left:2.5rem;transform:rotate(180deg)}.styles__viewer-nav--next___1ah-4{right:0}.styles__viewer-nav--next___1ah-4 .styles__viewer-nav-arrow___3_d1_{align-self:flex-end;margin-right:2.5rem}@media (max-width:63.938rem){.styles__viewer-nav___1MSd7{display:none}}.styles__viewer-nav-arrow___3_d1_{opacity:.7}.styles__viewer-controls___1BYEX{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%}.styles__viewer-controls___1BYEX.styles__--expanded___2NoA- .styles__viewer-nav___1MSd7{margin-top:0;width:40%}@media (max-width:63.938rem){.styles__viewer-controls--display-content-top___3I1xq{justify-content:flex-start;padding-top:3.5rem}}.styles__viewer-toolbar___2zPR7{position:absolute;top:0;z-index:72;display:flex;flex-shrink:0;width:calc(100% - 2rem);padding:0 1rem;height:4rem;transition:opacity .4s ease-out;background:linear-gradient(180deg,var(--charcoalGrey),rgba(50,54,63,0));justify-content:flex-start;align-items:center}.styles__viewer-toolbar--hidden___3r3Sj{opacity:0}@media (max-width:63.938rem){.styles__viewer-toolbar___2zPR7{height:3rem;width:100%;padding:var(--flagship-top-height) 1rem 0 0;background:var(--paperBackgroundColor);border-bottom:1px solid var(--dividerColor)}}.styles__viewer-footer___2ieQS{position:fixed;bottom:0;z-index:71;width:100%;height:3.5rem;padding-bottom:var(--flagship-bottom-height,env(safe-area-inset-bottom));background:var(--paperBackgroundColor)}html{--zIndex-below:-1;--zIndex-app:0;--zIndex-low:1;--zIndex-alertMobile:10;--zIndex-nav:20;--zIndex-bar:21;--zIndex-selection:30;--zIndex-popover:40;--zIndex-overlay:50;--zIndex-fileActionMenu:60;--zIndex-drawer:60;--zIndex-modal:70;--zindex-alert:80;--primaryFont:Lato,sans-serif}body,body button,body input,body optgroup,body select,body textarea{font-family:var(--primaryFont)}:root{--safe-area-inset-top:env(safe-area-inset-top);--safe-area-inset-right:env(safe-area-inset-right);--safe-area-inset-bottom:env(safe-area-inset-bottom);--safe-area-inset-left:env(safe-area-inset-left)}html{font-size:100%}body{font:100%/1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}body,html{height:100%}body{display:flex;flex-direction:column;align-items:stretch;width:100vw;margin:0}@media (max-width:63.938rem){body,html{display:block;height:auto}}[role=application]{display:flex;height:inherit;flex:1 1 100%;overflow-x:hidden;overflow-y:auto}@media (max-width:63.938rem){[role=application]{overflow:visible}}body,html{background-color:var(--white);color:var(--black)}[data-input=checkbox],[data-input=radio]{display:flex}[data-input=checkbox] input[type=checkbox],[data-input=checkbox] input[type=radio],[data-input=radio] input[type=checkbox],[data-input=radio] input[type=radio]{display:none!important;visibility:hidden!important}[data-input=checkbox] label,[data-input=radio] label{position:relative;display:inline-block;width:1rem;height:1rem;padding-left:1.4rem;cursor:pointer}[data-input=checkbox] label:after,[data-input=checkbox] label:before,[data-input=radio] label:after,[data-input=radio] label:before{content:\"\";position:absolute;left:0;top:0;box-sizing:border-box;width:1rem;height:1rem}[data-input=checkbox] label:before,[data-input=radio] label:before{transition:box-shadow .35s cubic-bezier(0,.89,.44,1)}[data-input=checkbox] label:after,[data-input=radio] label:after{transition-duration:.2s;transition-property:opacity,transform}.styles__wizard-select___2-yNW[aria-disabled=true],.styles__wizard-select___2-yNW[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.styles__wizard-select___2-yNW[aria-disabled=true]:focus,.styles__wizard-select___2-yNW[aria-disabled=true]:hover,.styles__wizard-select___2-yNW[disabled]:focus,.styles__wizard-select___2-yNW[disabled]:hover{border:.063rem solid var(--dividerColor)}.styles__wizard-select___2-yNW{display:inline-block;width:100%;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.styles__wizard-select___2-yNW::placeholder{color:var(--coolGrey);font-size:1rem}.styles__wizard-select___2-yNW:hover{border:.063rem solid var(--coolGrey)}.styles__wizard-select___2-yNW:focus{border:.063rem solid var(--dodgerBlue);outline:0}.styles__wizard-select___2-yNW.styles__is-error___1X2dc,.styles__wizard-select___2-yNW:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.styles__wizard-select--medium___kyH-1{border-radius:.125rem;padding:.5rem 1rem .625rem}.styles__wizard-select--medium___kyH-1,.styles__wizard-select___2-yNW{padding-right:2.375rem}.styles__wizard-select___2-yNW{appearance:none;background:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHBhdGggZD0iTTMuOTY4IDYuMTc1YTEuNTcxIDEuNTcxIDAgMDAtMi4yMjIgMi4yMjJsOS40MjkgOS40MjhhMS41NzEgMS41NzEgMCAwMDIuMjIyIDBsOS40MjgtOS40MjhhMS41NzEgMS41NzEgMCAwMC0yLjIyMi0yLjIyMmwtOC4zMTcgOC4zMTctOC4zMTgtOC4zMTd6IiBmaWxsPSIjOTU5OTlkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=\") right 1rem center no-repeat;background-size:.875rem;text-align:left}.styles__wizard-select___2-yNW::-ms-expand{display:none}[data-input=radio] label:before{border-radius:50%;border:.125rem solid var(--coolGrey);box-shadow:inset 0 0 0 1rem transparent}[data-input=radio] input[type=radio]:checked+label:before{box-shadow:inset 0 0 0 .188rem var(--paleGrey),inset 0 0 0 1rem var(--dodgerBlue)}[data-input=checkbox] label:after,[data-input=checkbox] label:before{border-radius:.125rem}[data-input=checkbox] label:before{background-color:var(--white);box-shadow:inset 0 0 0 .125rem var(--silver)}[data-input=checkbox] label:before:hover{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}[data-input=checkbox] label:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTMgMTAuMDE5bDQuNTIzIDQuNTIzIDkuNTQxLTkuNTQxIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==\");background-size:contain}[data-input=checkbox][aria-checked=mixed] label:after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTMuNDk3IDEwaDEzLjAwNiIgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIiLz48L3N2Zz4=\");background-size:contain}[data-input=checkbox] input[type=checkbox]:checked+label:before{box-shadow:inset 0 0 0 1rem var(--dodgerBlue)}[data-input=checkbox] input[type=checkbox]:checked+label:after{opacity:1;transform:scale(1)}[data-input=checkbox] input[type=checkbox]:not(:checked)+label:after{opacity:0;transform:scale(0)}.styles__wizard-wrapper___38V4s{display:flex;flex-flow:column nowrap;align-items:stretch}.styles__wizard-main___ObvId{background:linear-gradient(#fff 30%,hsla(0,0%,100%,0)),linear-gradient(hsla(0,0%,100%,0),#fff 70%) 0 100%,linear-gradient(rgba(214,216,218,.25),rgba(214,216,218,.25) 25%,hsla(0,0%,100%,0) 26%,hsla(0,0%,100%,0)),linear-gradient(hsla(0,0%,100%,0),hsla(0,0%,100%,0) 74%,rgba(214,216,218,.25) 75%,rgba(214,216,218,.25)) 0 100%;background-repeat:no-repeat;background-color:var(--white);background-size:100% 2rem,100% 2rem,100% .5rem,100% .5rem;background-attachment:local,local,scroll,scroll;background-clip:padding-box;overflow:auto;-webkit-overflow-scrolling:touch}.styles__wizard-footer___-ZrgM,.styles__wizard-header___2_r05{flex:0 0 auto}.styles__wizard___m6AMR{position:fixed;top:0;left:0;box-sizing:border-box;height:100%;display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--white);color:var(--charcoalGrey);text-align:center}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard___m6AMR{flex-direction:column;justify-content:flex-start}}.styles__wizard-wrapper___38V4s{justify-content:center;width:100%;height:100%;max-width:34rem;text-align:left}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-wrapper___38V4s{justify-content:flex-start}}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-wrapper--center___EWQI3{justify-content:center}}.styles__wizard-errors___1ufSE{order:1;margin:1rem 0 0;font-size:.875rem;line-height:1.7;font-style:italic}.styles__wizard-errors___1ufSE p{margin:0}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-errors___1ufSE{margin-top:.5rem}}.styles__wizard-header___2_r05{display:flex;flex-direction:column;box-sizing:border-box;max-width:34rem;margin:1rem 0 .5rem;padding:0 1rem;position:relative}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-header___2_r05{margin:1rem 0 0}}.styles__wizard-main___ObvId{display:flex;flex-direction:column;flex:0 1 auto;box-sizing:border-box;width:100%;padding:0 1rem}.styles__wizard-main___ObvId>*{flex-shrink:0}.styles__wizard-footer___-ZrgM{display:flex;order:2;flex-wrap:wrap;box-sizing:border-box;max-width:34rem;margin:2rem 0 1.5rem;padding:0 1rem env(safe-area-inset-bottom)}.styles__wizard-footer___-ZrgM>a:link,.styles__wizard-footer___-ZrgM>button{flex:1 1 100%;margin:0 0 .5rem;line-height:1.5}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-footer___-ZrgM{margin:1.5rem 0 .5rem}}.styles__wizard--welcome___2Os7m .styles__wizard-footer___-ZrgM{justify-content:space-between}@media (min-width:30.063rem){.styles__wizard--welcome___2Os7m .styles__wizard-footer___-ZrgM>a:link,.styles__wizard--welcome___2Os7m .styles__wizard-footer___-ZrgM>button{flex:0 1 calc(50% - 0.25rem)}}.styles__wizard-logo___3Dtx1{position:relative;margin:0 auto;width:7.5rem}.styles__wizard-logo-img___2K1rs{width:100%;vertical-align:center}.styles__wizard-logo-badge___1mcMb{display:flex;align-items:center;justify-content:center;position:absolute;bottom:-.375rem;right:-.375rem;width:2rem;height:2rem;border:.125rem solid var(--white);background-color:var(--primaryColor);border-radius:50%}.styles__wizard-desc___z9QXl{margin:2rem 0 0;line-height:1.5}.styles__wizard-desc___z9QXl a{color:var(--primaryColor);text-decoration:none}.styles__wizard-desc___z9QXl a:focus,.styles__wizard-desc___z9QXl a:hover{color:var(--primaryColorDark)}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-desc___z9QXl{margin:1.5rem 0 0}}.styles__wizard-header-fixed___39FT4{position:fixed;top:.5rem;left:1rem;display:inline-flex;align-items:center}.styles__wizard-previous___2StGt.styles__wizard-previous___2StGt{position:absolute;top:50%;left:0;transform:translateY(-50%);margin:0;padding:.625rem 1rem;color:var(--coolGrey)}.styles__wizard-brand____A68K{margin-left:2rem}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-brand____A68K{display:none}}.styles__wizard-next___38lPl{padding-right:3rem;padding-left:3rem}.styles__wizard-next___38lPl svg{position:absolute;right:1rem}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-input___1ltuD{border-radius:.125rem;padding:.5rem 1rem .625rem}}.styles__wizard-title___11Dzr{margin:0;text-align:center;font-size:2rem;line-height:1.25}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-title___11Dzr{font-size:1.125rem;line-height:1.78}}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard--welcome___2Os7m .styles__wizard-title___11Dzr{font-size:1.5rem;line-height:1.17}}.styles__wizard-dualfield___254s1{display:flex;flex-direction:row;align-items:stretch;border:.063rem solid var(--dividerColor);border-radius:.125rem}.styles__wizard-dualfield--focus___2Om-l{border-color:var(--primaryColor)}.styles__wizard-dualfield--error___2NR9g{border-color:var(--errorColor)}.styles__wizard-dualfield-wrapper___VN8PM{flex:1 1 auto}.styles__wizard-dualfield-input___2z596{border:0;padding-right:.5rem}.styles__wizard-dualfield-input___2z596:focus,.styles__wizard-dualfield-input___2z596:hover{position:relative;z-index:1;border:0;outline:0}@media (max-height:23.438rem),(max-width:30rem){.styles__wizard-dualfield-input___2z596{border-radius:.125rem;padding:.5rem .25rem .625rem 1rem}}.styles__wizard-protocol___4g-o1{display:flex;align-items:center;background-color:var(--paleGrey);border-right:.063rem solid var(--dividerColor);padding:0 1rem}.styles__wizard-protocol___4g-o1 svg{fill:currentColor;margin-right:.5rem}.styles__wizard-select___2-yNW{flex:0 0 auto;margin:.125rem;width:9.25rem;border:0;padding:.625rem 2.375rem .625rem .5rem}.styles__wizard-select___2-yNW:focus,.styles__wizard-select___2-yNW:hover{position:relative;z-index:1;background-color:var(--paleGrey);border:0;outline:0}.styles__wizard-select--medium___kyH-1{padding:.313rem 2.375rem .438rem .5rem}.styles__wizard-select--narrow___FTwrG{width:2.5rem}.styles__wizard-notice___2g62X{order:2;margin:2rem 0 0;line-height:1.5}.styles__wizard-notice___2g62X+.styles__wizard-notice___2g62X{margin-top:1rem}.styles__wizard-notice___2g62X p{margin:0}.styles__wizard-notice___2g62X a{color:var(--dodgerBlue);text-decoration:none;font-weight:700}.styles__wizard-notice___2g62X a:focus,.styles__wizard-notice___2g62X a:hover{color:var(--scienceBlue)}@media (min-width:30.063rem){.styles__wizard-notice___2g62X{margin:2rem 0 0}}.styles__wizard-notice--lost___3uoDz{font-size:1rem}.u-bg-black{background-color:var(--black)!important}.u-bg-charcoalGrey{background-color:var(--charcoalGrey)!important}.u-bg-coolGrey{background-color:var(--coolGrey)!important}.u-bg-silver{background-color:var(--silver)!important}.u-bg-slateGrey{background-color:var(--slateGrey)!important}.u-bg-lightishPurple{background-color:#b449e7!important}.u-bg-dodgerBlue{background-color:#297ef2!important}.u-bg-overlay{background-color:var(--overlay)!important}.u-bg-paleGrey{background-color:var(--paleGrey)!important}.u-bg-monza{background-color:#dd0505!important}.u-bg-pomegranate{background-color:#f52d2d!important}.u-bg-primaryBackgroundLight{background-color:var(--primaryBackgroundLight)!important}.u-bg-primaryColor{background-color:var(--primaryColor)!important}.u-bg-primaryColorLight{background-color:var(--primaryColorLight)!important}.u-bg-primaryContrastTextColor{background-color:var(--primaryContrastTextColor)!important}.u-bg-error{background-color:var(--errorColor)!important}.u-bg-errorBackground{background-color:var(--errorBackground)!important}.u-bg-success{background-color:var(--successColor)!important}.u-bg-warning{background-color:var(--warningColor)!important}.u-bg-info{background-color:var(--infoColor)!important}.u-bg-weirdGreen{background-color:#40de8e!important}.u-bg-white{background-color:var(--white)!important}.u-bdrs-0{border-radius:0}.u-bdrs-1{border-radius:.125rem}.u-bdrs-2{border-radius:.188rem}.u-bdrs-3{border-radius:.25rem}.u-bdrs-4{border-radius:.5rem}.u-bdrs-circle{border-radius:100%}.u-bdw-0{border-width:0}.u-bdw-1{border-width:.125rem}@media (max-width:30rem){.u-bdrs-0-t{border-radius:0}.u-bdrs-1-t{border-radius:.125rem}.u-bdrs-2-t{border-radius:.188rem}.u-bdrs-3-t{border-radius:.25rem}.u-bdrs-4-t{border-radius:.5rem}.u-bdrs-circle-t{border-radius:100%}.u-bdw-0-t{border-width:0}.u-bdw-1-t{border-width:.125rem}}@media (max-width:48rem){.u-bdrs-0-s{border-radius:0}.u-bdrs-1-s{border-radius:.125rem}.u-bdrs-2-s{border-radius:.188rem}.u-bdrs-3-s{border-radius:.25rem}.u-bdrs-4-s{border-radius:.5rem}.u-bdrs-circle-s{border-radius:100%}.u-bdw-0-s{border-width:0}.u-bdw-1-s{border-width:.125rem}}@media (max-width:63.938rem){.u-bdrs-0-m{border-radius:0}.u-bdrs-1-m{border-radius:.125rem}.u-bdrs-2-m{border-radius:.188rem}.u-bdrs-3-m{border-radius:.25rem}.u-bdrs-4-m{border-radius:.5rem}.u-bdrs-circle-m{border-radius:100%}.u-bdw-0-m{border-width:0}.u-bdw-1-m{border-width:.125rem}}.u-bxz{box-sizing:border-box}:root{--invertedBackgroundColor:#297ef2;--invertedContrastTextColor:#fff}.utils__CozyTheme--inverted___N09-n{--primaryTextColor:#fff;--secondaryTextColor:hsla(0,0%,100%,0.64);--disabledTextColor:hsla(0,0%,100%,0.4);--hintTextColor:hsla(0,0%,100%,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:hsla(0,0%,100%,0.08);--actionColorSelected:hsla(0,0%,100%,0.16);--actionColorDisabled:hsla(0,0%,100%,0.32);--actionColorDisabledBackground:hsla(0,0%,100%,0.12);--actionColorFocus:hsla(0,0%,100%,0.24);--actionColorGhost:hsla(0,0%,100%,0.08);--actionColorHoverGhost:hsla(0,0%,100%,0.16);--dividerColor:hsla(0,0%,100%,0.16);--borderMainColor:hsla(0,0%,100%,0.24);--borderDisabledColor:hsla(0,0%,100%,0.12);--borderGhostColor:hsla(0,0%,100%,0.48);--borderGhostDisabledColor:hsla(0,0%,100%,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:hsla(0,0%,100%,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:hsla(0,0%,100%,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:hsla(0,0%,100%,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:hsla(0,0%,100%,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:hsla(0,0%,100%,0.16)}html{--grey0:#fff;--grey50:#f9fafb;--grey100:#f4f5f6;--grey200:#eceff1;--grey300:#dde0e3;--grey400:#bfc3c7;--grey500:#9da2a6;--grey600:#7c8086;--grey700:#5d6169;--grey800:#3e424a;--grey900:#1d212a;--greyA100:#d3d6d8;--greyA200:#a7abaf;--greyA400:#2c3039;--greyA700:#5d6169;--white:#fff;--paleGrey:#f5f6f7;--silver:#d6d8da;--coolGrey:#95999d;--slateGrey:#5d6165;--charcoalGrey:#32363f;--black:#000;--overlay:rgba(50,54,63,0.5);--zircon:#f5faff;--dodgerBlue:#297ef2;--scienceBlue:#0b61d6;--weirdGreen:#40de8e;--emerald:#35ce68;--malachite:#08b442;--mango:#ff962f;--chablis:#fff2f2;--yourPink:#fdcbcb;--fuchsia:#fc4c83;--pomegranate:#f52d2d;--monza:#dd0505}.utils__CozyTheme--normal___XUAya,html{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:0.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.utils__u-card___2kFj6{border:.063rem solid var(--dividerColor);border-radius:.5rem;padding:1rem;text-decoration:none;display:block}.u-c-default{cursor:default}.u-c-help{cursor:help}.u-c-pointer{cursor:pointer}.u-c-wait{cursor:wait}.u-c-not-allowed{cursor:not-allowed}.utils__u-debug___2LMGS{background:rgba(0,0,0,.075);border:1px solid red}.utils__u-debug___2LMGS .utils__u-debug___2LMGS{border-color:#00f}.utils__u-debug___2LMGS .utils__u-debug___2LMGS .utils__u-debug___2LMGS{border-color:green}.u-miw-1{min-width:1rem!important}.u-maw-1{max-width:1rem!important}.u-mih-1{min-height:1rem!important}.u-mah-1{max-height:1rem!important}.u-miw-2{min-width:2rem!important}.u-maw-2{max-width:2rem!important}.u-mih-2{min-height:2rem!important}.u-mah-2{max-height:2rem!important}.u-miw-3{min-width:4rem!important}.u-maw-3{max-width:4rem!important}.u-mih-3{min-height:4rem!important}.u-mah-3{max-height:4rem!important}.u-miw-4{min-width:8rem!important}.u-maw-4{max-width:8rem!important}.u-mih-4{min-height:8rem!important}.u-mah-4{max-height:8rem!important}.u-miw-5{min-width:16rem!important}.u-maw-5{max-width:16rem!important}.u-mih-5{min-height:16rem!important}.u-mah-5{max-height:16rem!important}.u-miw-6{min-width:32rem!important}.u-maw-6{max-width:32rem!important}.u-mih-6{min-height:32rem!important}.u-mah-6{max-height:32rem!important}.u-miw-7{min-width:48rem!important}.u-maw-7{max-width:48rem!important}.u-mih-7{min-height:48rem!important}.u-mah-7{max-height:48rem!important}.u-miw-8{min-width:64rem!important}.u-maw-8{max-width:64rem!important}.u-mih-8{min-height:64rem!important}.u-mah-8{max-height:64rem!important}.u-miw-9{min-width:96rem!important}.u-maw-9{max-width:96rem!important}.u-mih-9{min-height:96rem!important}.u-mah-9{max-height:96rem!important}.u-miw-100{min-width:100%!important}.u-maw-100{max-width:100%!important}.u-mih-100{min-height:100%!important}.u-mah-100{max-height:100%!important}.u-maw-none{max-width:none!important}.u-mah-none{max-height:none!important}.u-miw-auto{min-width:auto!important}.u-mih-auto{min-height:auto!important}.u-miw-half{min-width:.5rem!important}.u-maw-half{max-width:.5rem!important}.u-mih-half{min-height:.5rem!important}.u-mah-half{max-height:.5rem!important}.u-miw-1-half{min-width:1.5rem!important}.u-maw-1-half{max-width:1.5rem!important}.u-mih-1-half{min-height:1.5rem!important}.u-mah-1-half{max-height:1.5rem!important}.u-miw-2-half{min-width:2.5rem!important}.u-maw-2-half{max-width:2.5rem!important}.u-mih-2-half{min-height:2.5rem!important}.u-mah-2-half{max-height:2.5rem!important}@media (max-width:30rem){.u-miw-1-t{min-width:1rem!important}}@media (max-width:30rem){.u-maw-1-t{max-width:1rem!important}}@media (max-width:30rem){.u-mih-1-t{min-height:1rem!important}}@media (max-width:30rem){.u-mah-1-t{max-height:1rem!important}}@media (max-width:30rem){.u-miw-2-t{min-width:2rem!important}}@media (max-width:30rem){.u-maw-2-t{max-width:2rem!important}}@media (max-width:30rem){.u-mih-2-t{min-height:2rem!important}}@media (max-width:30rem){.u-mah-2-t{max-height:2rem!important}}@media (max-width:30rem){.u-miw-3-t{min-width:4rem!important}}@media (max-width:30rem){.u-maw-3-t{max-width:4rem!important}}@media (max-width:30rem){.u-mih-3-t{min-height:4rem!important}}@media (max-width:30rem){.u-mah-3-t{max-height:4rem!important}}@media (max-width:30rem){.u-miw-4-t{min-width:8rem!important}}@media (max-width:30rem){.u-maw-4-t{max-width:8rem!important}}@media (max-width:30rem){.u-mih-4-t{min-height:8rem!important}}@media (max-width:30rem){.u-mah-4-t{max-height:8rem!important}}@media (max-width:30rem){.u-miw-5-t{min-width:16rem!important}}@media (max-width:30rem){.u-maw-5-t{max-width:16rem!important}}@media (max-width:30rem){.u-mih-5-t{min-height:16rem!important}}@media (max-width:30rem){.u-mah-5-t{max-height:16rem!important}}@media (max-width:30rem){.u-miw-6-t{min-width:32rem!important}}@media (max-width:30rem){.u-maw-6-t{max-width:32rem!important}}@media (max-width:30rem){.u-mih-6-t{min-height:32rem!important}}@media (max-width:30rem){.u-mah-6-t{max-height:32rem!important}}@media (max-width:30rem){.u-miw-7-t{min-width:48rem!important}}@media (max-width:30rem){.u-maw-7-t{max-width:48rem!important}}@media (max-width:30rem){.u-mih-7-t{min-height:48rem!important}}@media (max-width:30rem){.u-mah-7-t{max-height:48rem!important}}@media (max-width:30rem){.u-miw-8-t{min-width:64rem!important}}@media (max-width:30rem){.u-maw-8-t{max-width:64rem!important}}@media (max-width:30rem){.u-mih-8-t{min-height:64rem!important}}@media (max-width:30rem){.u-mah-8-t{max-height:64rem!important}}@media (max-width:30rem){.u-miw-9-t{min-width:96rem!important}}@media (max-width:30rem){.u-maw-9-t{max-width:96rem!important}}@media (max-width:30rem){.u-mih-9-t{min-height:96rem!important}}@media (max-width:30rem){.u-mah-9-t{max-height:96rem!important}}@media (max-width:30rem){.u-miw-100-t{min-width:100%!important}}@media (max-width:30rem){.u-maw-100-t{max-width:100%!important}}@media (max-width:30rem){.u-mih-100-t{min-height:100%!important}}@media (max-width:30rem){.u-mah-100-t{max-height:100%!important}}@media (max-width:30rem){.u-maw-none-t{max-width:none!important}}@media (max-width:30rem){.u-mah-none-t{max-height:none!important}}@media (max-width:30rem){.u-miw-auto-t{min-width:auto!important}}@media (max-width:30rem){.u-mih-auto-t{min-height:auto!important}}@media (max-width:30rem){.u-miw-half-t{min-width:.5rem!important}}@media (max-width:30rem){.u-maw-half-t{max-width:.5rem!important}}@media (max-width:30rem){.u-mih-half-t{min-height:.5rem!important}}@media (max-width:30rem){.u-mah-half-t{max-height:.5rem!important}}@media (max-width:30rem){.u-miw-1-half-t{min-width:1.5rem!important}}@media (max-width:30rem){.u-maw-1-half-t{max-width:1.5rem!important}}@media (max-width:30rem){.u-mih-1-half-t{min-height:1.5rem!important}}@media (max-width:30rem){.u-mah-1-half-t{max-height:1.5rem!important}}@media (max-width:30rem){.u-miw-2-half-t{min-width:2.5rem!important}}@media (max-width:30rem){.u-maw-2-half-t{max-width:2.5rem!important}}@media (max-width:30rem){.u-mih-2-half-t{min-height:2.5rem!important}}@media (max-width:30rem){.u-mah-2-half-t{max-height:2.5rem!important}}@media (max-width:48rem){.u-miw-1-s{min-width:1rem!important}}@media (max-width:48rem){.u-maw-1-s{max-width:1rem!important}}@media (max-width:48rem){.u-mih-1-s{min-height:1rem!important}}@media (max-width:48rem){.u-mah-1-s{max-height:1rem!important}}@media (max-width:48rem){.u-miw-2-s{min-width:2rem!important}}@media (max-width:48rem){.u-maw-2-s{max-width:2rem!important}}@media (max-width:48rem){.u-mih-2-s{min-height:2rem!important}}@media (max-width:48rem){.u-mah-2-s{max-height:2rem!important}}@media (max-width:48rem){.u-miw-3-s{min-width:4rem!important}}@media (max-width:48rem){.u-maw-3-s{max-width:4rem!important}}@media (max-width:48rem){.u-mih-3-s{min-height:4rem!important}}@media (max-width:48rem){.u-mah-3-s{max-height:4rem!important}}@media (max-width:48rem){.u-miw-4-s{min-width:8rem!important}}@media (max-width:48rem){.u-maw-4-s{max-width:8rem!important}}@media (max-width:48rem){.u-mih-4-s{min-height:8rem!important}}@media (max-width:48rem){.u-mah-4-s{max-height:8rem!important}}@media (max-width:48rem){.u-miw-5-s{min-width:16rem!important}}@media (max-width:48rem){.u-maw-5-s{max-width:16rem!important}}@media (max-width:48rem){.u-mih-5-s{min-height:16rem!important}}@media (max-width:48rem){.u-mah-5-s{max-height:16rem!important}}@media (max-width:48rem){.u-miw-6-s{min-width:32rem!important}}@media (max-width:48rem){.u-maw-6-s{max-width:32rem!important}}@media (max-width:48rem){.u-mih-6-s{min-height:32rem!important}}@media (max-width:48rem){.u-mah-6-s{max-height:32rem!important}}@media (max-width:48rem){.u-miw-7-s{min-width:48rem!important}}@media (max-width:48rem){.u-maw-7-s{max-width:48rem!important}}@media (max-width:48rem){.u-mih-7-s{min-height:48rem!important}}@media (max-width:48rem){.u-mah-7-s{max-height:48rem!important}}@media (max-width:48rem){.u-miw-8-s{min-width:64rem!important}}@media (max-width:48rem){.u-maw-8-s{max-width:64rem!important}}@media (max-width:48rem){.u-mih-8-s{min-height:64rem!important}}@media (max-width:48rem){.u-mah-8-s{max-height:64rem!important}}@media (max-width:48rem){.u-miw-9-s{min-width:96rem!important}}@media (max-width:48rem){.u-maw-9-s{max-width:96rem!important}}@media (max-width:48rem){.u-mih-9-s{min-height:96rem!important}}@media (max-width:48rem){.u-mah-9-s{max-height:96rem!important}}@media (max-width:48rem){.u-miw-100-s{min-width:100%!important}}@media (max-width:48rem){.u-maw-100-s{max-width:100%!important}}@media (max-width:48rem){.u-mih-100-s{min-height:100%!important}}@media (max-width:48rem){.u-mah-100-s{max-height:100%!important}}@media (max-width:48rem){.u-maw-none-s{max-width:none!important}}@media (max-width:48rem){.u-mah-none-s{max-height:none!important}}@media (max-width:48rem){.u-miw-auto-s{min-width:auto!important}}@media (max-width:48rem){.u-mih-auto-s{min-height:auto!important}}@media (max-width:48rem){.u-miw-half-s{min-width:.5rem!important}}@media (max-width:48rem){.u-maw-half-s{max-width:.5rem!important}}@media (max-width:48rem){.u-mih-half-s{min-height:.5rem!important}}@media (max-width:48rem){.u-mah-half-s{max-height:.5rem!important}}@media (max-width:48rem){.u-miw-1-half-s{min-width:1.5rem!important}}@media (max-width:48rem){.u-maw-1-half-s{max-width:1.5rem!important}}@media (max-width:48rem){.u-mih-1-half-s{min-height:1.5rem!important}}@media (max-width:48rem){.u-mah-1-half-s{max-height:1.5rem!important}}@media (max-width:48rem){.u-miw-2-half-s{min-width:2.5rem!important}}@media (max-width:48rem){.u-maw-2-half-s{max-width:2.5rem!important}}@media (max-width:48rem){.u-mih-2-half-s{min-height:2.5rem!important}}@media (max-width:48rem){.u-mah-2-half-s{max-height:2.5rem!important}}@media (max-width:63.938rem){.u-miw-1-m{min-width:1rem!important}}@media (max-width:63.938rem){.u-maw-1-m{max-width:1rem!important}}@media (max-width:63.938rem){.u-mih-1-m{min-height:1rem!important}}@media (max-width:63.938rem){.u-mah-1-m{max-height:1rem!important}}@media (max-width:63.938rem){.u-miw-2-m{min-width:2rem!important}}@media (max-width:63.938rem){.u-maw-2-m{max-width:2rem!important}}@media (max-width:63.938rem){.u-mih-2-m{min-height:2rem!important}}@media (max-width:63.938rem){.u-mah-2-m{max-height:2rem!important}}@media (max-width:63.938rem){.u-miw-3-m{min-width:4rem!important}}@media (max-width:63.938rem){.u-maw-3-m{max-width:4rem!important}}@media (max-width:63.938rem){.u-mih-3-m{min-height:4rem!important}}@media (max-width:63.938rem){.u-mah-3-m{max-height:4rem!important}}@media (max-width:63.938rem){.u-miw-4-m{min-width:8rem!important}}@media (max-width:63.938rem){.u-maw-4-m{max-width:8rem!important}}@media (max-width:63.938rem){.u-mih-4-m{min-height:8rem!important}}@media (max-width:63.938rem){.u-mah-4-m{max-height:8rem!important}}@media (max-width:63.938rem){.u-miw-5-m{min-width:16rem!important}}@media (max-width:63.938rem){.u-maw-5-m{max-width:16rem!important}}@media (max-width:63.938rem){.u-mih-5-m{min-height:16rem!important}}@media (max-width:63.938rem){.u-mah-5-m{max-height:16rem!important}}@media (max-width:63.938rem){.u-miw-6-m{min-width:32rem!important}}@media (max-width:63.938rem){.u-maw-6-m{max-width:32rem!important}}@media (max-width:63.938rem){.u-mih-6-m{min-height:32rem!important}}@media (max-width:63.938rem){.u-mah-6-m{max-height:32rem!important}}@media (max-width:63.938rem){.u-miw-7-m{min-width:48rem!important}}@media (max-width:63.938rem){.u-maw-7-m{max-width:48rem!important}}@media (max-width:63.938rem){.u-mih-7-m{min-height:48rem!important}}@media (max-width:63.938rem){.u-mah-7-m{max-height:48rem!important}}@media (max-width:63.938rem){.u-miw-8-m{min-width:64rem!important}}@media (max-width:63.938rem){.u-maw-8-m{max-width:64rem!important}}@media (max-width:63.938rem){.u-mih-8-m{min-height:64rem!important}}@media (max-width:63.938rem){.u-mah-8-m{max-height:64rem!important}}@media (max-width:63.938rem){.u-miw-9-m{min-width:96rem!important}}@media (max-width:63.938rem){.u-maw-9-m{max-width:96rem!important}}@media (max-width:63.938rem){.u-mih-9-m{min-height:96rem!important}}@media (max-width:63.938rem){.u-mah-9-m{max-height:96rem!important}}@media (max-width:63.938rem){.u-miw-100-m{min-width:100%!important}}@media (max-width:63.938rem){.u-maw-100-m{max-width:100%!important}}@media (max-width:63.938rem){.u-mih-100-m{min-height:100%!important}}@media (max-width:63.938rem){.u-mah-100-m{max-height:100%!important}}@media (max-width:63.938rem){.u-maw-none-m{max-width:none!important}}@media (max-width:63.938rem){.u-mah-none-m{max-height:none!important}}@media (max-width:63.938rem){.u-miw-auto-m{min-width:auto!important}}@media (max-width:63.938rem){.u-mih-auto-m{min-height:auto!important}}@media (max-width:63.938rem){.u-miw-half-m{min-width:.5rem!important}}@media (max-width:63.938rem){.u-maw-half-m{max-width:.5rem!important}}@media (max-width:63.938rem){.u-mih-half-m{min-height:.5rem!important}}@media (max-width:63.938rem){.u-mah-half-m{max-height:.5rem!important}}@media (max-width:63.938rem){.u-miw-1-half-m{min-width:1.5rem!important}}@media (max-width:63.938rem){.u-maw-1-half-m{max-width:1.5rem!important}}@media (max-width:63.938rem){.u-mih-1-half-m{min-height:1.5rem!important}}@media (max-width:63.938rem){.u-mah-1-half-m{max-height:1.5rem!important}}@media (max-width:63.938rem){.u-miw-2-half-m{min-width:2.5rem!important}}@media (max-width:63.938rem){.u-maw-2-half-m{max-width:2.5rem!important}}@media (max-width:63.938rem){.u-mih-2-half-m{min-height:2.5rem!important}}@media (max-width:63.938rem){.u-mah-2-half-m{max-height:2.5rem!important}}.u-w-1{width:1rem!important}.u-h-1{height:1rem!important}.u-w-2{width:2rem!important}.u-h-2{height:2rem!important}.u-w-3{width:4rem!important}.u-h-3{height:4rem!important}.u-w-4{width:8rem!important}.u-h-4{height:8rem!important}.u-w-5{width:16rem!important}.u-h-5{height:16rem!important}.u-w-6{width:32rem!important}.u-h-6{height:32rem!important}.u-w-7{width:48rem!important}.u-h-7{height:48rem!important}.u-w-8{width:64rem!important}.u-h-8{height:64rem!important}.u-w-9{width:96rem!important}.u-h-9{height:96rem!important}.u-w-100{width:100%!important}.u-h-100{height:100%!important}.u-w-auto{width:auto!important}.u-h-auto{height:auto!important}.u-w-half{width:.5rem!important}.u-h-half{height:.5rem!important}.u-w-1-half{width:1.5rem!important}.u-h-1-half{height:1.5rem!important}.u-w-2-half{width:2.5rem!important}.u-h-2-half{height:2.5rem!important}@media (max-width:30rem){.u-w-1-t{width:1rem!important}}@media (max-width:30rem){.u-h-1-t{height:1rem!important}}@media (max-width:30rem){.u-w-2-t{width:2rem!important}}@media (max-width:30rem){.u-h-2-t{height:2rem!important}}@media (max-width:30rem){.u-w-3-t{width:4rem!important}}@media (max-width:30rem){.u-h-3-t{height:4rem!important}}@media (max-width:30rem){.u-w-4-t{width:8rem!important}}@media (max-width:30rem){.u-h-4-t{height:8rem!important}}@media (max-width:30rem){.u-w-5-t{width:16rem!important}}@media (max-width:30rem){.u-h-5-t{height:16rem!important}}@media (max-width:30rem){.u-w-6-t{width:32rem!important}}@media (max-width:30rem){.u-h-6-t{height:32rem!important}}@media (max-width:30rem){.u-w-7-t{width:48rem!important}}@media (max-width:30rem){.u-h-7-t{height:48rem!important}}@media (max-width:30rem){.u-w-8-t{width:64rem!important}}@media (max-width:30rem){.u-h-8-t{height:64rem!important}}@media (max-width:30rem){.u-w-9-t{width:96rem!important}}@media (max-width:30rem){.u-h-9-t{height:96rem!important}}@media (max-width:30rem){.u-w-100-t{width:100%!important}}@media (max-width:30rem){.u-h-100-t{height:100%!important}}@media (max-width:30rem){.u-w-auto-t{width:auto!important}}@media (max-width:30rem){.u-h-auto-t{height:auto!important}}@media (max-width:30rem){.u-w-half-t{width:.5rem!important}}@media (max-width:30rem){.u-h-half-t{height:.5rem!important}}@media (max-width:30rem){.u-w-1-half-t{width:1.5rem!important}}@media (max-width:30rem){.u-h-1-half-t{height:1.5rem!important}}@media (max-width:30rem){.u-w-2-half-t{width:2.5rem!important}}@media (max-width:30rem){.u-h-2-half-t{height:2.5rem!important}}@media (max-width:48rem){.u-w-1-s{width:1rem!important}}@media (max-width:48rem){.u-h-1-s{height:1rem!important}}@media (max-width:48rem){.u-w-2-s{width:2rem!important}}@media (max-width:48rem){.u-h-2-s{height:2rem!important}}@media (max-width:48rem){.u-w-3-s{width:4rem!important}}@media (max-width:48rem){.u-h-3-s{height:4rem!important}}@media (max-width:48rem){.u-w-4-s{width:8rem!important}}@media (max-width:48rem){.u-h-4-s{height:8rem!important}}@media (max-width:48rem){.u-w-5-s{width:16rem!important}}@media (max-width:48rem){.u-h-5-s{height:16rem!important}}@media (max-width:48rem){.u-w-6-s{width:32rem!important}}@media (max-width:48rem){.u-h-6-s{height:32rem!important}}@media (max-width:48rem){.u-w-7-s{width:48rem!important}}@media (max-width:48rem){.u-h-7-s{height:48rem!important}}@media (max-width:48rem){.u-w-8-s{width:64rem!important}}@media (max-width:48rem){.u-h-8-s{height:64rem!important}}@media (max-width:48rem){.u-w-9-s{width:96rem!important}}@media (max-width:48rem){.u-h-9-s{height:96rem!important}}@media (max-width:48rem){.u-w-100-s{width:100%!important}}@media (max-width:48rem){.u-h-100-s{height:100%!important}}@media (max-width:48rem){.u-w-auto-s{width:auto!important}}@media (max-width:48rem){.u-h-auto-s{height:auto!important}}@media (max-width:48rem){.u-w-half-s{width:.5rem!important}}@media (max-width:48rem){.u-h-half-s{height:.5rem!important}}@media (max-width:48rem){.u-w-1-half-s{width:1.5rem!important}}@media (max-width:48rem){.u-h-1-half-s{height:1.5rem!important}}@media (max-width:48rem){.u-w-2-half-s{width:2.5rem!important}}@media (max-width:48rem){.u-h-2-half-s{height:2.5rem!important}}@media (max-width:63.938rem){.u-w-1-m{width:1rem!important}}@media (max-width:63.938rem){.u-h-1-m{height:1rem!important}}@media (max-width:63.938rem){.u-w-2-m{width:2rem!important}}@media (max-width:63.938rem){.u-h-2-m{height:2rem!important}}@media (max-width:63.938rem){.u-w-3-m{width:4rem!important}}@media (max-width:63.938rem){.u-h-3-m{height:4rem!important}}@media (max-width:63.938rem){.u-w-4-m{width:8rem!important}}@media (max-width:63.938rem){.u-h-4-m{height:8rem!important}}@media (max-width:63.938rem){.u-w-5-m{width:16rem!important}}@media (max-width:63.938rem){.u-h-5-m{height:16rem!important}}@media (max-width:63.938rem){.u-w-6-m{width:32rem!important}}@media (max-width:63.938rem){.u-h-6-m{height:32rem!important}}@media (max-width:63.938rem){.u-w-7-m{width:48rem!important}}@media (max-width:63.938rem){.u-h-7-m{height:48rem!important}}@media (max-width:63.938rem){.u-w-8-m{width:64rem!important}}@media (max-width:63.938rem){.u-h-8-m{height:64rem!important}}@media (max-width:63.938rem){.u-w-9-m{width:96rem!important}}@media (max-width:63.938rem){.u-h-9-m{height:96rem!important}}@media (max-width:63.938rem){.u-w-100-m{width:100%!important}}@media (max-width:63.938rem){.u-h-100-m{height:100%!important}}@media (max-width:63.938rem){.u-w-auto-m{width:auto!important}}@media (max-width:63.938rem){.u-h-auto-m{height:auto!important}}@media (max-width:63.938rem){.u-w-half-m{width:.5rem!important}}@media (max-width:63.938rem){.u-h-half-m{height:.5rem!important}}@media (max-width:63.938rem){.u-w-1-half-m{width:1.5rem!important}}@media (max-width:63.938rem){.u-h-1-half-m{height:1.5rem!important}}@media (max-width:63.938rem){.u-w-2-half-m{width:2.5rem!important}}@media (max-width:63.938rem){.u-h-2-half-m{height:2.5rem!important}}.u-visuallyhidden{position:absolute!important;border:0!important;width:.063rem!important;height:.063rem!important;overflow:hidden!important;padding:0!important;white-space:nowrap!important;clip:rect(.063rem,.063rem,.063rem,.063rem)!important;clip-path:inset(50%)!important}.u-hide{display:none!important;visibility:hidden!important}@media (max-width:63.938rem){.u-hide--mob{display:none!important}}@media (min-width:64rem){.u-hide--tablet{display:none!important}}@media (min-width:48.063rem){.u-hide--desk{display:none!important}}.u-dn{display:none}.u-di{display:inline}.u-db{display:block}.u-dib{display:inline-block}.u-dit{display:inline-table}.u-dt{display:table}.u-dtc{display:table-cell}.u-dt-row{display:table-row}.u-dt-row-group{display:table-row-group}.u-dt-column{display:table-column}.u-dt-column-group{display:table-column-group}@media (max-width:30rem){.u-dn-t{display:none}.u-di-t{display:inline}.u-db-t{display:block}.u-dib-t{display:inline-block}.u-dit-t{display:inline-table}.u-dt-t{display:table}.u-dtc-t{display:table-cell}.u-dt-row-t{display:table-row}.u-dt-row-group-t{display:table-row-group}.u-dt-column-t{display:table-column}.u-dt-column-group-t{display:table-column-group}}@media (max-width:48rem){.u-dn-s{display:none}.u-di-s{display:inline}.u-db-s{display:block}.u-dib-s{display:inline-block}.u-dit-s{display:inline-table}.u-dt-s{display:table}.u-dtc-s{display:table-cell}.u-dt-row-s{display:table-row}.u-dt-row-group-s{display:table-row-group}.u-dt-column-s{display:table-column}.u-dt-column-group-s{display:table-column-group}}@media (max-width:63.938rem){.u-dn-m{display:none}.u-di-m{display:inline}.u-db-m{display:block}.u-dib-m{display:inline-block}.u-dit-m{display:inline-table}.u-dt-m{display:table}.u-dtc-m{display:table-cell}.u-dt-row-m{display:table-row}.u-dt-row-group-m{display:table-row-group}.u-dt-column-m{display:table-column}.u-dt-column-group-m{display:table-column-group}}@-webkit-keyframes utils__shake___z0key{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}@keyframes utils__shake___z0key{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.utils__u-shake___3idDZ{animation-duration:.82s;animation-timing-function:cubic-bezier(.36,.07,.19,.97);animation-fill-mode:both;animation-name:utils__shake___z0key}.utils__u-elevation-1___Q5EaY{box-shadow:0 4px 12px 0 rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.08)}.utils__u-filter-gray-100___3ihr7{filter:grayscale(1)}.u-flex{display:flex}.u-inline-flex{display:inline-flex}.u-flex-none{flex:none}.u-flex-column{flex-direction:column}.u-flex-row{flex-direction:row}.u-flex-wrap{flex-wrap:wrap}.u-flex-nowrap{flex-wrap:nowrap}.u-flex-wrap-reverse{flex-wrap:wrap-reverse}.u-flex-column-reverse{flex-direction:column-reverse}.u-flex-row-reverse{flex-direction:row-reverse}.u-flex-auto{flex:1 1 auto}.u-flex-items-start{align-items:flex-start}.u-flex-items-end{align-items:flex-end}.u-flex-items-center{align-items:center}.u-flex-items-baseline{align-items:baseline}.u-flex-items-stretch{align-items:stretch}.u-flex-self-start{align-self:flex-start}.u-flex-self-end{align-self:flex-end}.u-flex-self-center{align-self:center}.u-flex-self-baseline{align-self:baseline}.u-flex-self-stretch{align-self:stretch}.u-flex-justify-start{justify-content:flex-start}.u-flex-justify-end{justify-content:flex-end}.u-flex-justify-center{justify-content:center}.u-flex-justify-between{justify-content:space-between}.u-flex-justify-around{justify-content:space-around}.u-flex-content-start{align-content:flex-start}.u-flex-content-end{align-content:flex-end}.u-flex-content-center{align-content:center}.u-flex-content-between{align-content:space-between}.u-flex-content-around{align-content:space-around}.u-flex-content-stretch{align-content:stretch}.u-flex-order-0{order:0}.u-flex-order-1{order:1}.u-flex-order-2{order:2}.u-flex-order-3{order:3}.u-flex-order-4{order:4}.u-flex-order-5{order:5}.u-flex-order-6{order:6}.u-flex-order-7{order:7}.u-flex-order-8{order:8}.u-flex-order-last{order:99999}.u-flex-grow-0{flex-grow:0}.u-flex-grow-1{flex-grow:1}.u-flex-shrink-0{flex-shrink:0}.u-flex-shrink-1{flex-shrink:1}@media (max-width:30rem){.u-flex-t{display:flex}.u-inline-flex-t{display:inline-flex}.u-flex-none-t{flex:none}.u-flex-column-t{flex-direction:column}.u-flex-row-t{flex-direction:row}.u-flex-wrap-t{flex-wrap:wrap}.u-flex-nowrap-t{flex-wrap:nowrap}.u-flex-wrap-reverse-t{flex-wrap:wrap-reverse}.u-flex-column-reverse-t{flex-direction:column-reverse}.u-flex-row-reverse-t{flex-direction:row-reverse}.u-flex-auto-t{flex:1 1 auto}.u-flex-items-start-t{align-items:flex-start}.u-flex-items-end-t{align-items:flex-end}.u-flex-items-center-t{align-items:center}.u-flex-items-baseline-t{align-items:baseline}.u-flex-items-stretch-t{align-items:stretch}.u-flex-self-start-t{align-self:flex-start}.u-flex-self-end-t{align-self:flex-end}.u-flex-self-center-t{align-self:center}.u-flex-self-baseline-t{align-self:baseline}.u-flex-self-stretch-t{align-self:stretch}.u-flex-justify-start-t{justify-content:flex-start}.u-flex-justify-end-t{justify-content:flex-end}.u-flex-justify-center-t{justify-content:center}.u-flex-justify-between-t{justify-content:space-between}.u-flex-justify-around-t{justify-content:space-around}.u-flex-content-start-t{align-content:flex-start}.u-flex-content-end-t{align-content:flex-end}.u-flex-content-center-t{align-content:center}.u-flex-content-between-t{align-content:space-between}.u-flex-content-around-t{align-content:space-around}.u-flex-content-stretch-t{align-content:stretch}.u-flex-order-0-t{order:0}.u-flex-order-1-t{order:1}.u-flex-order-2-t{order:2}.u-flex-order-3-t{order:3}.u-flex-order-4-t{order:4}.u-flex-order-5-t{order:5}.u-flex-order-6-t{order:6}.u-flex-order-7-t{order:7}.u-flex-order-8-t{order:8}.u-flex-order-last-t{order:99999}.u-flex-grow-0-t{flex-grow:0}.u-flex-grow-1-t{flex-grow:1}.u-flex-shrink-0-t{flex-shrink:0}.u-flex-shrink-1-t{flex-shrink:1}}@media (max-width:48rem){.u-flex-s{display:flex}.u-inline-flex-s{display:inline-flex}.u-flex-none-s{flex:none}.u-flex-column-s{flex-direction:column}.u-flex-row-s{flex-direction:row}.u-flex-wrap-s{flex-wrap:wrap}.u-flex-nowrap-s{flex-wrap:nowrap}.u-flex-wrap-reverse-s{flex-wrap:wrap-reverse}.u-flex-column-reverse-s{flex-direction:column-reverse}.u-flex-row-reverse-s{flex-direction:row-reverse}.u-flex-auto-s{flex:1 1 auto}.u-flex-items-start-s{align-items:flex-start}.u-flex-items-end-s{align-items:flex-end}.u-flex-items-center-s{align-items:center}.u-flex-items-baseline-s{align-items:baseline}.u-flex-items-stretch-s{align-items:stretch}.u-flex-self-start-s{align-self:flex-start}.u-flex-self-end-s{align-self:flex-end}.u-flex-self-center-s{align-self:center}.u-flex-self-baseline-s{align-self:baseline}.u-flex-self-stretch-s{align-self:stretch}.u-flex-justify-start-s{justify-content:flex-start}.u-flex-justify-end-s{justify-content:flex-end}.u-flex-justify-center-s{justify-content:center}.u-flex-justify-between-s{justify-content:space-between}.u-flex-justify-around-s{justify-content:space-around}.u-flex-content-start-s{align-content:flex-start}.u-flex-content-end-s{align-content:flex-end}.u-flex-content-center-s{align-content:center}.u-flex-content-between-s{align-content:space-between}.u-flex-content-around-s{align-content:space-around}.u-flex-content-stretch-s{align-content:stretch}.u-flex-order-0-s{order:0}.u-flex-order-1-s{order:1}.u-flex-order-2-s{order:2}.u-flex-order-3-s{order:3}.u-flex-order-4-s{order:4}.u-flex-order-5-s{order:5}.u-flex-order-6-s{order:6}.u-flex-order-7-s{order:7}.u-flex-order-8-s{order:8}.u-flex-order-last-s{order:99999}.u-flex-grow-0-s{flex-grow:0}.u-flex-grow-1-s{flex-grow:1}.u-flex-shrink-0-s{flex-shrink:0}.u-flex-shrink-1-s{flex-shrink:1}}@media (max-width:63.938rem){.u-flex-m{display:flex}.u-inline-flex-m{display:inline-flex}.u-flex-none-m{flex:none}.u-flex-column-m{flex-direction:column}.u-flex-row-m{flex-direction:row}.u-flex-wrap-m{flex-wrap:wrap}.u-flex-nowrap-m{flex-wrap:nowrap}.u-flex-wrap-reverse-m{flex-wrap:wrap-reverse}.u-flex-column-reverse-m{flex-direction:column-reverse}.u-flex-row-reverse-m{flex-direction:row-reverse}.u-flex-auto-m{flex:1 1 auto}.u-flex-items-start-m{align-items:flex-start}.u-flex-items-end-m{align-items:flex-end}.u-flex-items-center-m{align-items:center}.u-flex-items-baseline-m{align-items:baseline}.u-flex-items-stretch-m{align-items:stretch}.u-flex-self-start-m{align-self:flex-start}.u-flex-self-end-m{align-self:flex-end}.u-flex-self-center-m{align-self:center}.u-flex-self-baseline-m{align-self:baseline}.u-flex-self-stretch-m{align-self:stretch}.u-flex-justify-start-m{justify-content:flex-start}.u-flex-justify-end-m{justify-content:flex-end}.u-flex-justify-center-m{justify-content:center}.u-flex-justify-between-m{justify-content:space-between}.u-flex-justify-around-m{justify-content:space-around}.u-flex-content-start-m{align-content:flex-start}.u-flex-content-end-m{align-content:flex-end}.u-flex-content-center-m{align-content:center}.u-flex-content-between-m{align-content:space-between}.u-flex-content-around-m{align-content:space-around}.u-flex-content-stretch-m{align-content:stretch}.u-flex-order-0-m{order:0}.u-flex-order-1-m{order:1}.u-flex-order-2-m{order:2}.u-flex-order-3-m{order:3}.u-flex-order-4-m{order:4}.u-flex-order-5-m{order:5}.u-flex-order-6-m{order:6}.u-flex-order-7-m{order:7}.u-flex-order-8-m{order:8}.u-flex-order-last-m{order:99999}.u-flex-grow-0-m{flex-grow:0}.u-flex-grow-1-m{flex-grow:1}.u-flex-shrink-0-m{flex-shrink:0}.u-flex-shrink-1-m{flex-shrink:1}}.u-nolist{list-style-type:none}@media (max-width:30rem){.u-nolist-t{list-style-type:none}}@media (max-width:48rem){.u-nolist-s{list-style-type:none}}@media (max-width:63.938rem){.u-nolist-m{list-style-type:none}}.u-media{display:flex;align-items:center}.u-media-top{align-items:flex-start}.u-media-bottom{align-items:flex-end}.u-media-grow{flex:1 1 auto;overflow:hidden}.u-media-fixed{line-height:0;flex:0 0 auto}.utils__u-o-100___3mxuu{opacity:1}.utils__u-o-90___3jUP5{opacity:.9}.utils__u-o-80___2mfvM{opacity:.8}.utils__u-o-70___ju6nf{opacity:.7}.utils__u-o-60___2A6gX{opacity:.6}.utils__u-o-50___3tR5X{opacity:.5}.utils__u-o-40___1pUVy{opacity:.4}.utils__u-o-30___3fGrc{opacity:.3}.utils__u-o-20___2ysQZ{opacity:.2}.utils__u-o-10___RicFD{opacity:.1}.utils__u-o-05___2ozKr{opacity:.05}.utils__u-o-025___1kpVK{opacity:.025}.utils__u-o-0___3MPZ4{opacity:0}.u-ov-visible{overflow:visible}.u-ov-hidden{overflow:hidden}.u-ov-scroll{overflow:scroll}.u-ov-auto{overflow:auto}.u-p-0{padding:0!important}.u-pt-0{padding-top:0!important}.u-pb-0{padding-bottom:0!important}.u-pl-0{padding-left:0!important}.u-pr-0{padding-right:0!important}.u-pv-0{padding-top:0!important;padding-bottom:0!important}.u-ph-0{padding-left:0!important;padding-right:0!important}.u-p-1{padding:1rem!important}.u-pt-1{padding-top:1rem!important}.u-pb-1{padding-bottom:1rem!important}.u-pl-1{padding-left:1rem!important}.u-pr-1{padding-right:1rem!important}.u-pv-1{padding-top:1rem!important;padding-bottom:1rem!important}.u-ph-1{padding-left:1rem!important;padding-right:1rem!important}.u-p-2{padding:2rem!important}.u-pt-2{padding-top:2rem!important}.u-pb-2{padding-bottom:2rem!important}.u-pl-2{padding-left:2rem!important}.u-pr-2{padding-right:2rem!important}.u-pv-2{padding-top:2rem!important;padding-bottom:2rem!important}.u-ph-2{padding-left:2rem!important;padding-right:2rem!important}.u-p-3{padding:3rem!important}.u-pt-3{padding-top:3rem!important}.u-pb-3{padding-bottom:3rem!important}.u-pl-3{padding-left:3rem!important}.u-pr-3{padding-right:3rem!important}.u-pv-3{padding-top:3rem!important;padding-bottom:3rem!important}.u-ph-3{padding-left:3rem!important;padding-right:3rem!important}.u-p-auto{padding:auto!important}.u-pt-auto{padding-top:auto!important}.u-pb-auto{padding-bottom:auto!important}.u-pl-auto{padding-left:auto!important}.u-pr-auto{padding-right:auto!important}.u-pv-auto{padding-top:auto!important;padding-bottom:auto!important}.u-ph-auto{padding-left:auto!important;padding-right:auto!important}.u-p-half{padding:.5rem!important}.u-pt-half{padding-top:.5rem!important}.u-pb-half{padding-bottom:.5rem!important}.u-pl-half{padding-left:.5rem!important}.u-pr-half{padding-right:.5rem!important}.u-pv-half{padding-top:.5rem!important;padding-bottom:.5rem!important}.u-ph-half{padding-left:.5rem!important;padding-right:.5rem!important}.u-p-1-half{padding:1.5rem!important}.u-pt-1-half{padding-top:1.5rem!important}.u-pb-1-half{padding-bottom:1.5rem!important}.u-pl-1-half{padding-left:1.5rem!important}.u-pr-1-half{padding-right:1.5rem!important}.u-pv-1-half{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.u-ph-1-half{padding-left:1.5rem!important;padding-right:1.5rem!important}.u-p-2-half{padding:2.5rem!important}.u-pt-2-half{padding-top:2.5rem!important}.u-pb-2-half{padding-bottom:2.5rem!important}.u-pl-2-half{padding-left:2.5rem!important}.u-pr-2-half{padding-right:2.5rem!important}.u-pv-2-half{padding-top:2.5rem!important;padding-bottom:2.5rem!important}.u-ph-2-half{padding-left:2.5rem!important;padding-right:2.5rem!important}.u-m-0{margin:0!important}.u-mt-0{margin-top:0!important}.u-mb-0{margin-bottom:0!important}.u-ml-0{margin-left:0!important}.u-mr-0{margin-right:0!important}.u-mv-0{margin-top:0!important;margin-bottom:0!important}.u-mh-0{margin-left:0!important;margin-right:0!important}.u-m-1{margin:1rem!important}.u-mt-1{margin-top:1rem!important}.u-mb-1{margin-bottom:1rem!important}.u-ml-1{margin-left:1rem!important}.u-mr-1{margin-right:1rem!important}.u-mv-1{margin-top:1rem!important;margin-bottom:1rem!important}.u-mh-1{margin-left:1rem!important;margin-right:1rem!important}.u-m-2{margin:2rem!important}.u-mt-2{margin-top:2rem!important}.u-mb-2{margin-bottom:2rem!important}.u-ml-2{margin-left:2rem!important}.u-mr-2{margin-right:2rem!important}.u-mv-2{margin-top:2rem!important;margin-bottom:2rem!important}.u-mh-2{margin-left:2rem!important;margin-right:2rem!important}.u-m-3{margin:3rem!important}.u-mt-3{margin-top:3rem!important}.u-mb-3{margin-bottom:3rem!important}.u-ml-3{margin-left:3rem!important}.u-mr-3{margin-right:3rem!important}.u-mv-3{margin-top:3rem!important;margin-bottom:3rem!important}.u-mh-3{margin-left:3rem!important;margin-right:3rem!important}.u-m-auto{margin:auto!important}.u-mt-auto{margin-top:auto!important}.u-mb-auto{margin-bottom:auto!important}.u-ml-auto{margin-left:auto!important}.u-mr-auto{margin-right:auto!important}.u-mv-auto{margin-top:auto!important;margin-bottom:auto!important}.u-mh-auto{margin-left:auto!important;margin-right:auto!important}.u-m-half{margin:.5rem!important}.u-mt-half{margin-top:.5rem!important}.u-mb-half{margin-bottom:.5rem!important}.u-ml-half{margin-left:.5rem!important}.u-mr-half{margin-right:.5rem!important}.u-mv-half{margin-top:.5rem!important;margin-bottom:.5rem!important}.u-mh-half{margin-left:.5rem!important;margin-right:.5rem!important}.u-m-1-half{margin:1.5rem!important}.u-mt-1-half{margin-top:1.5rem!important}.u-mb-1-half{margin-bottom:1.5rem!important}.u-ml-1-half{margin-left:1.5rem!important}.u-mr-1-half{margin-right:1.5rem!important}.u-mv-1-half{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.u-mh-1-half{margin-left:1.5rem!important;margin-right:1.5rem!important}.u-m-2-half{margin:2.5rem!important}.u-mt-2-half{margin-top:2.5rem!important}.u-mb-2-half{margin-bottom:2.5rem!important}.u-ml-2-half{margin-left:2.5rem!important}.u-mr-2-half{margin-right:2.5rem!important}.u-mv-2-half{margin-top:2.5rem!important;margin-bottom:2.5rem!important}.u-mh-2-half{margin-left:2.5rem!important;margin-right:2.5rem!important}@media (max-width:30rem){.u-p-0-t{padding:0!important}}@media (max-width:30rem){.u-pt-0-t{padding-top:0!important}}@media (max-width:30rem){.u-pb-0-t{padding-bottom:0!important}}@media (max-width:30rem){.u-pl-0-t{padding-left:0!important}}@media (max-width:30rem){.u-pr-0-t{padding-right:0!important}}@media (max-width:30rem){.u-pv-0-t{padding-top:0!important;padding-bottom:0!important}}@media (max-width:30rem){.u-ph-0-t{padding-left:0!important;padding-right:0!important}}@media (max-width:30rem){.u-p-1-t{padding:1rem!important}}@media (max-width:30rem){.u-pt-1-t{padding-top:1rem!important}}@media (max-width:30rem){.u-pb-1-t{padding-bottom:1rem!important}}@media (max-width:30rem){.u-pl-1-t{padding-left:1rem!important}}@media (max-width:30rem){.u-pr-1-t{padding-right:1rem!important}}@media (max-width:30rem){.u-pv-1-t{padding-top:1rem!important;padding-bottom:1rem!important}}@media (max-width:30rem){.u-ph-1-t{padding-left:1rem!important;padding-right:1rem!important}}@media (max-width:30rem){.u-p-2-t{padding:2rem!important}}@media (max-width:30rem){.u-pt-2-t{padding-top:2rem!important}}@media (max-width:30rem){.u-pb-2-t{padding-bottom:2rem!important}}@media (max-width:30rem){.u-pl-2-t{padding-left:2rem!important}}@media (max-width:30rem){.u-pr-2-t{padding-right:2rem!important}}@media (max-width:30rem){.u-pv-2-t{padding-top:2rem!important;padding-bottom:2rem!important}}@media (max-width:30rem){.u-ph-2-t{padding-left:2rem!important;padding-right:2rem!important}}@media (max-width:30rem){.u-p-3-t{padding:3rem!important}}@media (max-width:30rem){.u-pt-3-t{padding-top:3rem!important}}@media (max-width:30rem){.u-pb-3-t{padding-bottom:3rem!important}}@media (max-width:30rem){.u-pl-3-t{padding-left:3rem!important}}@media (max-width:30rem){.u-pr-3-t{padding-right:3rem!important}}@media (max-width:30rem){.u-pv-3-t{padding-top:3rem!important;padding-bottom:3rem!important}}@media (max-width:30rem){.u-ph-3-t{padding-left:3rem!important;padding-right:3rem!important}}@media (max-width:30rem){.u-p-auto-t{padding:auto!important}}@media (max-width:30rem){.u-pt-auto-t{padding-top:auto!important}}@media (max-width:30rem){.u-pb-auto-t{padding-bottom:auto!important}}@media (max-width:30rem){.u-pl-auto-t{padding-left:auto!important}}@media (max-width:30rem){.u-pr-auto-t{padding-right:auto!important}}@media (max-width:30rem){.u-pv-auto-t{padding-top:auto!important;padding-bottom:auto!important}}@media (max-width:30rem){.u-ph-auto-t{padding-left:auto!important;padding-right:auto!important}}@media (max-width:30rem){.u-p-half-t{padding:.5rem!important}}@media (max-width:30rem){.u-pt-half-t{padding-top:.5rem!important}}@media (max-width:30rem){.u-pb-half-t{padding-bottom:.5rem!important}}@media (max-width:30rem){.u-pl-half-t{padding-left:.5rem!important}}@media (max-width:30rem){.u-pr-half-t{padding-right:.5rem!important}}@media (max-width:30rem){.u-pv-half-t{padding-top:.5rem!important;padding-bottom:.5rem!important}}@media (max-width:30rem){.u-ph-half-t{padding-left:.5rem!important;padding-right:.5rem!important}}@media (max-width:30rem){.u-p-1-half-t{padding:1.5rem!important}}@media (max-width:30rem){.u-pt-1-half-t{padding-top:1.5rem!important}}@media (max-width:30rem){.u-pb-1-half-t{padding-bottom:1.5rem!important}}@media (max-width:30rem){.u-pl-1-half-t{padding-left:1.5rem!important}}@media (max-width:30rem){.u-pr-1-half-t{padding-right:1.5rem!important}}@media (max-width:30rem){.u-pv-1-half-t{padding-top:1.5rem!important;padding-bottom:1.5rem!important}}@media (max-width:30rem){.u-ph-1-half-t{padding-left:1.5rem!important;padding-right:1.5rem!important}}@media (max-width:30rem){.u-p-2-half-t{padding:2.5rem!important}}@media (max-width:30rem){.u-pt-2-half-t{padding-top:2.5rem!important}}@media (max-width:30rem){.u-pb-2-half-t{padding-bottom:2.5rem!important}}@media (max-width:30rem){.u-pl-2-half-t{padding-left:2.5rem!important}}@media (max-width:30rem){.u-pr-2-half-t{padding-right:2.5rem!important}}@media (max-width:30rem){.u-pv-2-half-t{padding-top:2.5rem!important;padding-bottom:2.5rem!important}}@media (max-width:30rem){.u-ph-2-half-t{padding-left:2.5rem!important;padding-right:2.5rem!important}}@media (max-width:30rem){.u-m-0-t{margin:0!important}}@media (max-width:30rem){.u-mt-0-t{margin-top:0!important}}@media (max-width:30rem){.u-mb-0-t{margin-bottom:0!important}}@media (max-width:30rem){.u-ml-0-t{margin-left:0!important}}@media (max-width:30rem){.u-mr-0-t{margin-right:0!important}}@media (max-width:30rem){.u-mv-0-t{margin-top:0!important;margin-bottom:0!important}}@media (max-width:30rem){.u-mh-0-t{margin-left:0!important;margin-right:0!important}}@media (max-width:30rem){.u-m-1-t{margin:1rem!important}}@media (max-width:30rem){.u-mt-1-t{margin-top:1rem!important}}@media (max-width:30rem){.u-mb-1-t{margin-bottom:1rem!important}}@media (max-width:30rem){.u-ml-1-t{margin-left:1rem!important}}@media (max-width:30rem){.u-mr-1-t{margin-right:1rem!important}}@media (max-width:30rem){.u-mv-1-t{margin-top:1rem!important;margin-bottom:1rem!important}}@media (max-width:30rem){.u-mh-1-t{margin-left:1rem!important;margin-right:1rem!important}}@media (max-width:30rem){.u-m-2-t{margin:2rem!important}}@media (max-width:30rem){.u-mt-2-t{margin-top:2rem!important}}@media (max-width:30rem){.u-mb-2-t{margin-bottom:2rem!important}}@media (max-width:30rem){.u-ml-2-t{margin-left:2rem!important}}@media (max-width:30rem){.u-mr-2-t{margin-right:2rem!important}}@media (max-width:30rem){.u-mv-2-t{margin-top:2rem!important;margin-bottom:2rem!important}}@media (max-width:30rem){.u-mh-2-t{margin-left:2rem!important;margin-right:2rem!important}}@media (max-width:30rem){.u-m-3-t{margin:3rem!important}}@media (max-width:30rem){.u-mt-3-t{margin-top:3rem!important}}@media (max-width:30rem){.u-mb-3-t{margin-bottom:3rem!important}}@media (max-width:30rem){.u-ml-3-t{margin-left:3rem!important}}@media (max-width:30rem){.u-mr-3-t{margin-right:3rem!important}}@media (max-width:30rem){.u-mv-3-t{margin-top:3rem!important;margin-bottom:3rem!important}}@media (max-width:30rem){.u-mh-3-t{margin-left:3rem!important;margin-right:3rem!important}}@media (max-width:30rem){.u-m-auto-t{margin:auto!important}}@media (max-width:30rem){.u-mt-auto-t{margin-top:auto!important}}@media (max-width:30rem){.u-mb-auto-t{margin-bottom:auto!important}}@media (max-width:30rem){.u-ml-auto-t{margin-left:auto!important}}@media (max-width:30rem){.u-mr-auto-t{margin-right:auto!important}}@media (max-width:30rem){.u-mv-auto-t{margin-top:auto!important;margin-bottom:auto!important}}@media (max-width:30rem){.u-mh-auto-t{margin-left:auto!important;margin-right:auto!important}}@media (max-width:30rem){.u-m-half-t{margin:.5rem!important}}@media (max-width:30rem){.u-mt-half-t{margin-top:.5rem!important}}@media (max-width:30rem){.u-mb-half-t{margin-bottom:.5rem!important}}@media (max-width:30rem){.u-ml-half-t{margin-left:.5rem!important}}@media (max-width:30rem){.u-mr-half-t{margin-right:.5rem!important}}@media (max-width:30rem){.u-mv-half-t{margin-top:.5rem!important;margin-bottom:.5rem!important}}@media (max-width:30rem){.u-mh-half-t{margin-left:.5rem!important;margin-right:.5rem!important}}@media (max-width:30rem){.u-m-1-half-t{margin:1.5rem!important}}@media (max-width:30rem){.u-mt-1-half-t{margin-top:1.5rem!important}}@media (max-width:30rem){.u-mb-1-half-t{margin-bottom:1.5rem!important}}@media (max-width:30rem){.u-ml-1-half-t{margin-left:1.5rem!important}}@media (max-width:30rem){.u-mr-1-half-t{margin-right:1.5rem!important}}@media (max-width:30rem){.u-mv-1-half-t{margin-top:1.5rem!important;margin-bottom:1.5rem!important}}@media (max-width:30rem){.u-mh-1-half-t{margin-left:1.5rem!important;margin-right:1.5rem!important}}@media (max-width:30rem){.u-m-2-half-t{margin:2.5rem!important}}@media (max-width:30rem){.u-mt-2-half-t{margin-top:2.5rem!important}}@media (max-width:30rem){.u-mb-2-half-t{margin-bottom:2.5rem!important}}@media (max-width:30rem){.u-ml-2-half-t{margin-left:2.5rem!important}}@media (max-width:30rem){.u-mr-2-half-t{margin-right:2.5rem!important}}@media (max-width:30rem){.u-mv-2-half-t{margin-top:2.5rem!important;margin-bottom:2.5rem!important}}@media (max-width:30rem){.u-mh-2-half-t{margin-left:2.5rem!important;margin-right:2.5rem!important}}@media (max-width:48rem){.u-p-0-s{padding:0!important}}@media (max-width:48rem){.u-pt-0-s{padding-top:0!important}}@media (max-width:48rem){.u-pb-0-s{padding-bottom:0!important}}@media (max-width:48rem){.u-pl-0-s{padding-left:0!important}}@media (max-width:48rem){.u-pr-0-s{padding-right:0!important}}@media (max-width:48rem){.u-pv-0-s{padding-top:0!important;padding-bottom:0!important}}@media (max-width:48rem){.u-ph-0-s{padding-left:0!important;padding-right:0!important}}@media (max-width:48rem){.u-p-1-s{padding:1rem!important}}@media (max-width:48rem){.u-pt-1-s{padding-top:1rem!important}}@media (max-width:48rem){.u-pb-1-s{padding-bottom:1rem!important}}@media (max-width:48rem){.u-pl-1-s{padding-left:1rem!important}}@media (max-width:48rem){.u-pr-1-s{padding-right:1rem!important}}@media (max-width:48rem){.u-pv-1-s{padding-top:1rem!important;padding-bottom:1rem!important}}@media (max-width:48rem){.u-ph-1-s{padding-left:1rem!important;padding-right:1rem!important}}@media (max-width:48rem){.u-p-2-s{padding:2rem!important}}@media (max-width:48rem){.u-pt-2-s{padding-top:2rem!important}}@media (max-width:48rem){.u-pb-2-s{padding-bottom:2rem!important}}@media (max-width:48rem){.u-pl-2-s{padding-left:2rem!important}}@media (max-width:48rem){.u-pr-2-s{padding-right:2rem!important}}@media (max-width:48rem){.u-pv-2-s{padding-top:2rem!important;padding-bottom:2rem!important}}@media (max-width:48rem){.u-ph-2-s{padding-left:2rem!important;padding-right:2rem!important}}@media (max-width:48rem){.u-p-3-s{padding:3rem!important}}@media (max-width:48rem){.u-pt-3-s{padding-top:3rem!important}}@media (max-width:48rem){.u-pb-3-s{padding-bottom:3rem!important}}@media (max-width:48rem){.u-pl-3-s{padding-left:3rem!important}}@media (max-width:48rem){.u-pr-3-s{padding-right:3rem!important}}@media (max-width:48rem){.u-pv-3-s{padding-top:3rem!important;padding-bottom:3rem!important}}@media (max-width:48rem){.u-ph-3-s{padding-left:3rem!important;padding-right:3rem!important}}@media (max-width:48rem){.u-p-auto-s{padding:auto!important}}@media (max-width:48rem){.u-pt-auto-s{padding-top:auto!important}}@media (max-width:48rem){.u-pb-auto-s{padding-bottom:auto!important}}@media (max-width:48rem){.u-pl-auto-s{padding-left:auto!important}}@media (max-width:48rem){.u-pr-auto-s{padding-right:auto!important}}@media (max-width:48rem){.u-pv-auto-s{padding-top:auto!important;padding-bottom:auto!important}}@media (max-width:48rem){.u-ph-auto-s{padding-left:auto!important;padding-right:auto!important}}@media (max-width:48rem){.u-p-half-s{padding:.5rem!important}}@media (max-width:48rem){.u-pt-half-s{padding-top:.5rem!important}}@media (max-width:48rem){.u-pb-half-s{padding-bottom:.5rem!important}}@media (max-width:48rem){.u-pl-half-s{padding-left:.5rem!important}}@media (max-width:48rem){.u-pr-half-s{padding-right:.5rem!important}}@media (max-width:48rem){.u-pv-half-s{padding-top:.5rem!important;padding-bottom:.5rem!important}}@media (max-width:48rem){.u-ph-half-s{padding-left:.5rem!important;padding-right:.5rem!important}}@media (max-width:48rem){.u-p-1-half-s{padding:1.5rem!important}}@media (max-width:48rem){.u-pt-1-half-s{padding-top:1.5rem!important}}@media (max-width:48rem){.u-pb-1-half-s{padding-bottom:1.5rem!important}}@media (max-width:48rem){.u-pl-1-half-s{padding-left:1.5rem!important}}@media (max-width:48rem){.u-pr-1-half-s{padding-right:1.5rem!important}}@media (max-width:48rem){.u-pv-1-half-s{padding-top:1.5rem!important;padding-bottom:1.5rem!important}}@media (max-width:48rem){.u-ph-1-half-s{padding-left:1.5rem!important;padding-right:1.5rem!important}}@media (max-width:48rem){.u-p-2-half-s{padding:2.5rem!important}}@media (max-width:48rem){.u-pt-2-half-s{padding-top:2.5rem!important}}@media (max-width:48rem){.u-pb-2-half-s{padding-bottom:2.5rem!important}}@media (max-width:48rem){.u-pl-2-half-s{padding-left:2.5rem!important}}@media (max-width:48rem){.u-pr-2-half-s{padding-right:2.5rem!important}}@media (max-width:48rem){.u-pv-2-half-s{padding-top:2.5rem!important;padding-bottom:2.5rem!important}}@media (max-width:48rem){.u-ph-2-half-s{padding-left:2.5rem!important;padding-right:2.5rem!important}}@media (max-width:48rem){.u-m-0-s{margin:0!important}}@media (max-width:48rem){.u-mt-0-s{margin-top:0!important}}@media (max-width:48rem){.u-mb-0-s{margin-bottom:0!important}}@media (max-width:48rem){.u-ml-0-s{margin-left:0!important}}@media (max-width:48rem){.u-mr-0-s{margin-right:0!important}}@media (max-width:48rem){.u-mv-0-s{margin-top:0!important;margin-bottom:0!important}}@media (max-width:48rem){.u-mh-0-s{margin-left:0!important;margin-right:0!important}}@media (max-width:48rem){.u-m-1-s{margin:1rem!important}}@media (max-width:48rem){.u-mt-1-s{margin-top:1rem!important}}@media (max-width:48rem){.u-mb-1-s{margin-bottom:1rem!important}}@media (max-width:48rem){.u-ml-1-s{margin-left:1rem!important}}@media (max-width:48rem){.u-mr-1-s{margin-right:1rem!important}}@media (max-width:48rem){.u-mv-1-s{margin-top:1rem!important;margin-bottom:1rem!important}}@media (max-width:48rem){.u-mh-1-s{margin-left:1rem!important;margin-right:1rem!important}}@media (max-width:48rem){.u-m-2-s{margin:2rem!important}}@media (max-width:48rem){.u-mt-2-s{margin-top:2rem!important}}@media (max-width:48rem){.u-mb-2-s{margin-bottom:2rem!important}}@media (max-width:48rem){.u-ml-2-s{margin-left:2rem!important}}@media (max-width:48rem){.u-mr-2-s{margin-right:2rem!important}}@media (max-width:48rem){.u-mv-2-s{margin-top:2rem!important;margin-bottom:2rem!important}}@media (max-width:48rem){.u-mh-2-s{margin-left:2rem!important;margin-right:2rem!important}}@media (max-width:48rem){.u-m-3-s{margin:3rem!important}}@media (max-width:48rem){.u-mt-3-s{margin-top:3rem!important}}@media (max-width:48rem){.u-mb-3-s{margin-bottom:3rem!important}}@media (max-width:48rem){.u-ml-3-s{margin-left:3rem!important}}@media (max-width:48rem){.u-mr-3-s{margin-right:3rem!important}}@media (max-width:48rem){.u-mv-3-s{margin-top:3rem!important;margin-bottom:3rem!important}}@media (max-width:48rem){.u-mh-3-s{margin-left:3rem!important;margin-right:3rem!important}}@media (max-width:48rem){.u-m-auto-s{margin:auto!important}}@media (max-width:48rem){.u-mt-auto-s{margin-top:auto!important}}@media (max-width:48rem){.u-mb-auto-s{margin-bottom:auto!important}}@media (max-width:48rem){.u-ml-auto-s{margin-left:auto!important}}@media (max-width:48rem){.u-mr-auto-s{margin-right:auto!important}}@media (max-width:48rem){.u-mv-auto-s{margin-top:auto!important;margin-bottom:auto!important}}@media (max-width:48rem){.u-mh-auto-s{margin-left:auto!important;margin-right:auto!important}}@media (max-width:48rem){.u-m-half-s{margin:.5rem!important}}@media (max-width:48rem){.u-mt-half-s{margin-top:.5rem!important}}@media (max-width:48rem){.u-mb-half-s{margin-bottom:.5rem!important}}@media (max-width:48rem){.u-ml-half-s{margin-left:.5rem!important}}@media (max-width:48rem){.u-mr-half-s{margin-right:.5rem!important}}@media (max-width:48rem){.u-mv-half-s{margin-top:.5rem!important;margin-bottom:.5rem!important}}@media (max-width:48rem){.u-mh-half-s{margin-left:.5rem!important;margin-right:.5rem!important}}@media (max-width:48rem){.u-m-1-half-s{margin:1.5rem!important}}@media (max-width:48rem){.u-mt-1-half-s{margin-top:1.5rem!important}}@media (max-width:48rem){.u-mb-1-half-s{margin-bottom:1.5rem!important}}@media (max-width:48rem){.u-ml-1-half-s{margin-left:1.5rem!important}}@media (max-width:48rem){.u-mr-1-half-s{margin-right:1.5rem!important}}@media (max-width:48rem){.u-mv-1-half-s{margin-top:1.5rem!important;margin-bottom:1.5rem!important}}@media (max-width:48rem){.u-mh-1-half-s{margin-left:1.5rem!important;margin-right:1.5rem!important}}@media (max-width:48rem){.u-m-2-half-s{margin:2.5rem!important}}@media (max-width:48rem){.u-mt-2-half-s{margin-top:2.5rem!important}}@media (max-width:48rem){.u-mb-2-half-s{margin-bottom:2.5rem!important}}@media (max-width:48rem){.u-ml-2-half-s{margin-left:2.5rem!important}}@media (max-width:48rem){.u-mr-2-half-s{margin-right:2.5rem!important}}@media (max-width:48rem){.u-mv-2-half-s{margin-top:2.5rem!important;margin-bottom:2.5rem!important}}@media (max-width:48rem){.u-mh-2-half-s{margin-left:2.5rem!important;margin-right:2.5rem!important}}@media (max-width:63.938rem){.u-p-0-m{padding:0!important}}@media (max-width:63.938rem){.u-pt-0-m{padding-top:0!important}}@media (max-width:63.938rem){.u-pb-0-m{padding-bottom:0!important}}@media (max-width:63.938rem){.u-pl-0-m{padding-left:0!important}}@media (max-width:63.938rem){.u-pr-0-m{padding-right:0!important}}@media (max-width:63.938rem){.u-pv-0-m{padding-top:0!important;padding-bottom:0!important}}@media (max-width:63.938rem){.u-ph-0-m{padding-left:0!important;padding-right:0!important}}@media (max-width:63.938rem){.u-p-1-m{padding:1rem!important}}@media (max-width:63.938rem){.u-pt-1-m{padding-top:1rem!important}}@media (max-width:63.938rem){.u-pb-1-m{padding-bottom:1rem!important}}@media (max-width:63.938rem){.u-pl-1-m{padding-left:1rem!important}}@media (max-width:63.938rem){.u-pr-1-m{padding-right:1rem!important}}@media (max-width:63.938rem){.u-pv-1-m{padding-top:1rem!important;padding-bottom:1rem!important}}@media (max-width:63.938rem){.u-ph-1-m{padding-left:1rem!important;padding-right:1rem!important}}@media (max-width:63.938rem){.u-p-2-m{padding:2rem!important}}@media (max-width:63.938rem){.u-pt-2-m{padding-top:2rem!important}}@media (max-width:63.938rem){.u-pb-2-m{padding-bottom:2rem!important}}@media (max-width:63.938rem){.u-pl-2-m{padding-left:2rem!important}}@media (max-width:63.938rem){.u-pr-2-m{padding-right:2rem!important}}@media (max-width:63.938rem){.u-pv-2-m{padding-top:2rem!important;padding-bottom:2rem!important}}@media (max-width:63.938rem){.u-ph-2-m{padding-left:2rem!important;padding-right:2rem!important}}@media (max-width:63.938rem){.u-p-3-m{padding:3rem!important}}@media (max-width:63.938rem){.u-pt-3-m{padding-top:3rem!important}}@media (max-width:63.938rem){.u-pb-3-m{padding-bottom:3rem!important}}@media (max-width:63.938rem){.u-pl-3-m{padding-left:3rem!important}}@media (max-width:63.938rem){.u-pr-3-m{padding-right:3rem!important}}@media (max-width:63.938rem){.u-pv-3-m{padding-top:3rem!important;padding-bottom:3rem!important}}@media (max-width:63.938rem){.u-ph-3-m{padding-left:3rem!important;padding-right:3rem!important}}@media (max-width:63.938rem){.u-p-auto-m{padding:auto!important}}@media (max-width:63.938rem){.u-pt-auto-m{padding-top:auto!important}}@media (max-width:63.938rem){.u-pb-auto-m{padding-bottom:auto!important}}@media (max-width:63.938rem){.u-pl-auto-m{padding-left:auto!important}}@media (max-width:63.938rem){.u-pr-auto-m{padding-right:auto!important}}@media (max-width:63.938rem){.u-pv-auto-m{padding-top:auto!important;padding-bottom:auto!important}}@media (max-width:63.938rem){.u-ph-auto-m{padding-left:auto!important;padding-right:auto!important}}@media (max-width:63.938rem){.u-p-half-m{padding:.5rem!important}}@media (max-width:63.938rem){.u-pt-half-m{padding-top:.5rem!important}}@media (max-width:63.938rem){.u-pb-half-m{padding-bottom:.5rem!important}}@media (max-width:63.938rem){.u-pl-half-m{padding-left:.5rem!important}}@media (max-width:63.938rem){.u-pr-half-m{padding-right:.5rem!important}}@media (max-width:63.938rem){.u-pv-half-m{padding-top:.5rem!important;padding-bottom:.5rem!important}}@media (max-width:63.938rem){.u-ph-half-m{padding-left:.5rem!important;padding-right:.5rem!important}}@media (max-width:63.938rem){.u-p-1-half-m{padding:1.5rem!important}}@media (max-width:63.938rem){.u-pt-1-half-m{padding-top:1.5rem!important}}@media (max-width:63.938rem){.u-pb-1-half-m{padding-bottom:1.5rem!important}}@media (max-width:63.938rem){.u-pl-1-half-m{padding-left:1.5rem!important}}@media (max-width:63.938rem){.u-pr-1-half-m{padding-right:1.5rem!important}}@media (max-width:63.938rem){.u-pv-1-half-m{padding-top:1.5rem!important;padding-bottom:1.5rem!important}}@media (max-width:63.938rem){.u-ph-1-half-m{padding-left:1.5rem!important;padding-right:1.5rem!important}}@media (max-width:63.938rem){.u-p-2-half-m{padding:2.5rem!important}}@media (max-width:63.938rem){.u-pt-2-half-m{padding-top:2.5rem!important}}@media (max-width:63.938rem){.u-pb-2-half-m{padding-bottom:2.5rem!important}}@media (max-width:63.938rem){.u-pl-2-half-m{padding-left:2.5rem!important}}@media (max-width:63.938rem){.u-pr-2-half-m{padding-right:2.5rem!important}}@media (max-width:63.938rem){.u-pv-2-half-m{padding-top:2.5rem!important;padding-bottom:2.5rem!important}}@media (max-width:63.938rem){.u-ph-2-half-m{padding-left:2.5rem!important;padding-right:2.5rem!important}}@media (max-width:63.938rem){.u-m-0-m{margin:0!important}}@media (max-width:63.938rem){.u-mt-0-m{margin-top:0!important}}@media (max-width:63.938rem){.u-mb-0-m{margin-bottom:0!important}}@media (max-width:63.938rem){.u-ml-0-m{margin-left:0!important}}@media (max-width:63.938rem){.u-mr-0-m{margin-right:0!important}}@media (max-width:63.938rem){.u-mv-0-m{margin-top:0!important;margin-bottom:0!important}}@media (max-width:63.938rem){.u-mh-0-m{margin-left:0!important;margin-right:0!important}}@media (max-width:63.938rem){.u-m-1-m{margin:1rem!important}}@media (max-width:63.938rem){.u-mt-1-m{margin-top:1rem!important}}@media (max-width:63.938rem){.u-mb-1-m{margin-bottom:1rem!important}}@media (max-width:63.938rem){.u-ml-1-m{margin-left:1rem!important}}@media (max-width:63.938rem){.u-mr-1-m{margin-right:1rem!important}}@media (max-width:63.938rem){.u-mv-1-m{margin-top:1rem!important;margin-bottom:1rem!important}}@media (max-width:63.938rem){.u-mh-1-m{margin-left:1rem!important;margin-right:1rem!important}}@media (max-width:63.938rem){.u-m-2-m{margin:2rem!important}}@media (max-width:63.938rem){.u-mt-2-m{margin-top:2rem!important}}@media (max-width:63.938rem){.u-mb-2-m{margin-bottom:2rem!important}}@media (max-width:63.938rem){.u-ml-2-m{margin-left:2rem!important}}@media (max-width:63.938rem){.u-mr-2-m{margin-right:2rem!important}}@media (max-width:63.938rem){.u-mv-2-m{margin-top:2rem!important;margin-bottom:2rem!important}}@media (max-width:63.938rem){.u-mh-2-m{margin-left:2rem!important;margin-right:2rem!important}}@media (max-width:63.938rem){.u-m-3-m{margin:3rem!important}}@media (max-width:63.938rem){.u-mt-3-m{margin-top:3rem!important}}@media (max-width:63.938rem){.u-mb-3-m{margin-bottom:3rem!important}}@media (max-width:63.938rem){.u-ml-3-m{margin-left:3rem!important}}@media (max-width:63.938rem){.u-mr-3-m{margin-right:3rem!important}}@media (max-width:63.938rem){.u-mv-3-m{margin-top:3rem!important;margin-bottom:3rem!important}}@media (max-width:63.938rem){.u-mh-3-m{margin-left:3rem!important;margin-right:3rem!important}}@media (max-width:63.938rem){.u-m-auto-m{margin:auto!important}}@media (max-width:63.938rem){.u-mt-auto-m{margin-top:auto!important}}@media (max-width:63.938rem){.u-mb-auto-m{margin-bottom:auto!important}}@media (max-width:63.938rem){.u-ml-auto-m{margin-left:auto!important}}@media (max-width:63.938rem){.u-mr-auto-m{margin-right:auto!important}}@media (max-width:63.938rem){.u-mv-auto-m{margin-top:auto!important;margin-bottom:auto!important}}@media (max-width:63.938rem){.u-mh-auto-m{margin-left:auto!important;margin-right:auto!important}}@media (max-width:63.938rem){.u-m-half-m{margin:.5rem!important}}@media (max-width:63.938rem){.u-mt-half-m{margin-top:.5rem!important}}@media (max-width:63.938rem){.u-mb-half-m{margin-bottom:.5rem!important}}@media (max-width:63.938rem){.u-ml-half-m{margin-left:.5rem!important}}@media (max-width:63.938rem){.u-mr-half-m{margin-right:.5rem!important}}@media (max-width:63.938rem){.u-mv-half-m{margin-top:.5rem!important;margin-bottom:.5rem!important}}@media (max-width:63.938rem){.u-mh-half-m{margin-left:.5rem!important;margin-right:.5rem!important}}@media (max-width:63.938rem){.u-m-1-half-m{margin:1.5rem!important}}@media (max-width:63.938rem){.u-mt-1-half-m{margin-top:1.5rem!important}}@media (max-width:63.938rem){.u-mb-1-half-m{margin-bottom:1.5rem!important}}@media (max-width:63.938rem){.u-ml-1-half-m{margin-left:1.5rem!important}}@media (max-width:63.938rem){.u-mr-1-half-m{margin-right:1.5rem!important}}@media (max-width:63.938rem){.u-mv-1-half-m{margin-top:1.5rem!important;margin-bottom:1.5rem!important}}@media (max-width:63.938rem){.u-mh-1-half-m{margin-left:1.5rem!important;margin-right:1.5rem!important}}@media (max-width:63.938rem){.u-m-2-half-m{margin:2.5rem!important}}@media (max-width:63.938rem){.u-mt-2-half-m{margin-top:2.5rem!important}}@media (max-width:63.938rem){.u-mb-2-half-m{margin-bottom:2.5rem!important}}@media (max-width:63.938rem){.u-ml-2-half-m{margin-left:2.5rem!important}}@media (max-width:63.938rem){.u-mr-2-half-m{margin-right:2.5rem!important}}@media (max-width:63.938rem){.u-mv-2-half-m{margin-top:2.5rem!important;margin-bottom:2.5rem!important}}@media (max-width:63.938rem){.u-mh-2-half-m{margin-left:2.5rem!important;margin-right:2.5rem!important}}.u-pos-absolute{position:absolute}.u-pos-relative{position:relative}.u-pos-fixed{position:fixed}.u-pos-sticky{position:sticky}.u-pos-static{position:static}@media (max-width:30rem){.u-pos-absolute-t{position:absolute}.u-pos-relative-t{position:relative}.u-pos-fixed-t{position:fixed}.u-pos-sticky-t{position:sticky}.u-pos-static-t{position:static}}@media (max-width:48rem){.u-pos-absolute-s{position:absolute}.u-pos-relative-s{position:relative}.u-pos-fixed-s{position:fixed}.u-pos-sticky-s{position:sticky}.u-pos-static-s{position:static}}@media (max-width:63.938rem){.u-pos-absolute-m{position:absolute}.u-pos-relative-m{position:relative}.u-pos-fixed-m{position:fixed}.u-pos-sticky-m{position:sticky}.u-pos-static-m{position:static}}.u-top-m{top:1rem}.u-top-xs{top:.5rem}.u-top-s{top:.75rem}.u-top-l{top:1.5rem}.u-top-xl{top:2rem}.u-top-xxl{top:3rem}.u-top-0{top:0}.u-bottom-m{bottom:1rem}.u-bottom-xs{bottom:.5rem}.u-bottom-s{bottom:.75rem}.u-bottom-l{bottom:1.5rem}.u-bottom-xl{bottom:2rem}.u-bottom-xxl{bottom:3rem}.u-bottom-0{bottom:0}.u-left-m{left:1rem}.u-left-xs{left:.5rem}.u-left-s{left:.75rem}.u-left-l{left:1.5rem}.u-left-xl{left:2rem}.u-left-xxl{left:3rem}.u-left-0{left:0}.u-right-m{right:1rem}.u-right-xs{right:.5rem}.u-right-s{right:.75rem}.u-right-l{right:1.5rem}.u-right-xl{right:2rem}.u-right-xxl{right:3rem}.u-right-0{right:0}.u-stack-m>*+*{margin-top:1rem}.u-stack-xs>*+*{margin-top:.5rem}.u-stack-s>*+*{margin-top:.75rem}.u-stack-l>*+*{margin-top:1.5rem}.u-stack-xl>*+*{margin-top:2rem}.u-stack-xxl>*+*{margin-top:3rem}.u-row-m>*+*{margin-left:1rem}.u-row-xs>*+*{margin-left:.5rem}.u-row-s>*+*{margin-left:.75rem}.u-row-l>*+*{margin-left:1.5rem}.u-row-xl>*+*{margin-left:2rem}.u-row-xxl>*+*{margin-left:3rem}.u-black{color:var(--black)!important}.u-charcoalGrey{color:var(--charcoalGrey)!important}.u-coolGrey{color:var(--coolGrey)!important}.u-silver{color:var(--silver)!important}.u-slateGrey{color:var(--slateGrey)!important}.u-lightishPurple{color:#b449e7!important}.u-dodgerBlue{color:#297ef2!important}.u-overlay{color:var(--overlay)!important}.u-paleGrey{color:var(--paleGrey)!important}.u-monza{color:#dd0505!important}.u-pomegranate{color:#f52d2d!important}.u-primaryBackgroundLight{color:var(--primaryBackgroundLight)!important}.u-primaryColor{color:var(--primaryColor)!important}.u-primaryColorLight{color:var(--primaryColorLight)!important}.u-primaryContrastTextColor{color:var(--primaryContrastTextColor)!important}.u-error{color:var(--errorColor)!important}.u-errorBackground{color:var(--errorBackground)!important}.u-success{color:var(--successColor)!important}.u-warning{color:var(--warningColor)!important}.u-info{color:var(--infoColor)!important}.u-weirdGreen{color:#40de8e!important}.u-white{color:var(--white)!important}.u-breakword{word-break:break-word}.u-ellipsis{white-space:nowrap}.u-ellipsis,.u-spacellipsis{overflow:hidden;text-overflow:ellipsis}.u-spacellipsis{white-space:break-spaces}@media (max-width:30rem){.u-spacellipsis-t{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}@media (max-width:48rem){.u-spacellipsis-s{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}@media (max-width:63.938rem){.u-spacellipsis-m{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}.u-midellipsis{display:flex;flex-wrap:nowrap}.u-midellipsis>*{display:inline-block;max-width:50%;overflow:hidden;white-space:pre}.u-midellipsis>:first-child{text-overflow:ellipsis}.u-midellipsis>:last-child{text-overflow:clip;direction:rtl}@supports (text-overflow:\"[...]\"){.u-midellipsis>:first-child{text-overflow:\"[...]\"}}.u-link:link{color:var(--linkColor)!important;text-decoration:var(--linkTextDecoration)!important}.u-link:active,.u-link:focus,.u-link:hover,.u-link:visited{color:var(--linkColorActive)!important}.u-lh-tiny{line-height:1!important}.u-lh-xsmall{line-height:1.1!important}.u-lh-small{line-height:1.2!important}.u-lh-medium{line-height:1.3!important}.u-lh-large{line-height:1.4!important}.u-lh-xlarge{line-height:1.5!important}.u-fz-tiny{font-size:.75rem!important;line-height:1.3!important}.u-fz-xsmall{font-size:.813rem!important}.u-fz-small,.u-fz-xsmall{line-height:1.4!important}.u-fz-small{font-size:.875rem!important}.u-fz-medium{font-size:1rem!important}.u-fz-large,.u-fz-medium{line-height:1.5!important}.u-fz-large{font-size:1.125rem!important}@media (max-width:30rem){.u-fz-tiny-t{font-size:.75rem!important;line-height:1.3!important}.u-fz-xsmall-t{font-size:.813rem!important;line-height:1.4!important}.u-fz-small-t{font-size:.875rem!important;line-height:1.4!important}.u-fz-medium-t{font-size:1rem!important;line-height:1.5!important}.u-fz-large-t{font-size:1.125rem!important;line-height:1.5!important}}@media (max-width:48rem){.u-fz-tiny-s{font-size:.75rem!important;line-height:1.3!important}.u-fz-xsmall-s{font-size:.813rem!important;line-height:1.4!important}.u-fz-small-s{font-size:.875rem!important;line-height:1.4!important}.u-fz-medium-s{font-size:1rem!important;line-height:1.5!important}.u-fz-large-s{font-size:1.125rem!important;line-height:1.5!important}}@media (max-width:63.938rem){.u-fz-tiny-m{font-size:.75rem!important;line-height:1.3!important}.u-fz-xsmall-m{font-size:.813rem!important;line-height:1.4!important}.u-fz-small-m{font-size:.875rem!important;line-height:1.4!important}.u-fz-medium-m{font-size:1rem!important;line-height:1.5!important}.u-fz-large-m{font-size:1.125rem!important;line-height:1.5!important}}.u-ta-left{text-align:left!important}.u-ta-right{text-align:right!important}.u-ta-center{text-align:center!important}.u-ta-justify{text-align:justify!important}@media (max-width:30rem){.u-ta-left-t{text-align:left!important}.u-ta-right-t{text-align:right!important}.u-ta-center-t{text-align:center!important}.u-ta-justify-t{text-align:justify!important}}@media (max-width:48rem){.u-ta-left-s{text-align:left!important}.u-ta-right-s{text-align:right!important}.u-ta-center-s{text-align:center!important}.u-ta-justify-s{text-align:justify!important}}@media (max-width:63.938rem){.u-ta-left-m{text-align:left!important}.u-ta-right-m{text-align:right!important}.u-ta-center-m{text-align:center!important}.u-ta-justify-m{text-align:justify!important}}.u-fs-normal{font-style:normal!important}.u-fs-italic{font-style:italic!important}@media (max-width:30rem){.u-fs-normal-t{font-style:normal!important}.u-fs-italic-t{font-style:italic!important}}@media (max-width:48rem){.u-fs-normal-s{font-style:normal!important}.u-fs-italic-s{font-style:italic!important}}@media (max-width:63.938rem){.u-fs-normal-m{font-style:normal!important}.u-fs-italic-m{font-style:italic!important}}.u-fw-normal{font-weight:400}.u-fw-bold{font-weight:700}@media (max-width:30rem){.u-fw-normal-t{font-weight:400}.u-fw-bold-t{font-weight:700}}@media (max-width:48rem){.u-fw-normal-s{font-weight:400}.u-fw-bold-s{font-weight:700}}@media (max-width:63.938rem){.u-fw-normal-m{font-weight:400}.u-fw-bold-m{font-weight:700}}.u-title-h1,.u-title-h2,.u-title-h3,.u-title-h4{font-weight:700;color:var(--primaryTextColor)}.u-title-h1{font-size:1.5rem;letter-spacing:-.012rem}@media (max-width:48rem){.u-title-h1{font-size:1.25rem}}.u-title-h2{font-size:1.25rem}@media (max-width:48rem){.u-title-h2{font-size:1.125rem}}.u-title-h3{font-size:1.125rem}@media (max-width:48rem){.u-title-h3{font-size:1rem}}.u-title-h4{font-size:1rem}@media (max-width:48rem){.u-title-h4{font-weight:700;color:var(--primaryTextColor)}}.u-text{font-size:1rem;line-height:1.3;color:var(--primaryTextColor)}.u-caption{font-size:.75rem;line-height:1.2;color:var(--coolGrey)}.u-subtitle{line-height:1.313}.u-uppercase{text-transform:uppercase}.u-lowercase{text-transform:lowercase}.u-subtitle{font-size:.75rem;text-transform:uppercase;font-weight:700}", ""]); + + + +/***/ }), + +/***/ "/TyW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" +}), 'Warning')); + +/***/ }), + +/***/ "/VA8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var EnvironmentService = /*#__PURE__*/function () { + function EnvironmentService() { + (0, _classCallCheck2.default)(this, EnvironmentService); + } + (0, _createClass2.default)(EnvironmentService, [{ + key: "isAlpha", + value: function isAlpha() { + return true; + } + }, { + key: "isLocal", + value: function isLocal() { + return false; + } + + /** + * Returns true for local OR alpha + */ + }, { + key: "isDev", + value: function isDev() { + return true || false; + } + }, { + key: "isProduction", + value: function isProduction() { + if (!this.isAlpha()) { + return true; + } + return false; + } + }, { + key: "getPublicURL", + value: function getPublicURL() { + if (!this.isAlpha()) { + return 'https://ecolyo-agent.apps.grandlyon.com'; + } else { + return 'https://ecolyo-agent-rec.apps.grandlyon.com'; + } + } + }]); + return EnvironmentService; +}(); +exports.default = EnvironmentService; + +/***/ }), + +/***/ "/Ytg": +/***/ (function(module, exports) { + +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; + + +/***/ }), + +/***/ "/Zih": +/***/ (function(module, exports) { + +var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + }, + text, + + error = function (m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; + }, + + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + + number = function () { + // Parse a number value. + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error("Bad number"); + } else { + return number; + } + }, + + string = function () { + // Parse a string value. + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + if (ch === '"') { + while (next()) { + if (ch === '"') { + next(); + return string; + } else if (ch === '\\') { + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + } else { + string += ch; + } + } + } + error("Bad string"); + }, + + white = function () { + +// Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + + word = function () { + +// true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + + value, // Place holder for the value function. + + array = function () { + +// Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error("Bad array"); + }, + + object = function () { + +// Parse an object value. + + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if (Object.hasOwnProperty.call(object, key)) { + error('Duplicate key "' + key + '"'); + } + object[key] = value(); + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error("Bad object"); + }; + +value = function () { + +// Parse a JSON value. It could be an object, an array, a string, a number, +// or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } +}; + +// Return the json_parse function. It will have access to all of the above +// functions and variables. + +module.exports = function (source, reviver) { + var result; + + text = source; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error("Syntax error"); + } + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' ? (function walk(holder, key) { + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + }({'': result}, '')) : result; +}; + + +/***/ }), + +/***/ "/a52": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ZrPw"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("IU9S"); +/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("joyL"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("MIMv"); + + + + +/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ + + + + + + + + + + + +var styles = function styles(theme) { + var light = theme.palette.type === 'light'; + var placeholder = { + color: 'currentColor', + opacity: light ? 0.42 : 0.5, + transition: theme.transitions.create('opacity', { + duration: theme.transitions.duration.shorter + }) + }; + var placeholderHidden = { + opacity: '0 !important' + }; + var placeholderVisible = { + opacity: light ? 0.42 : 0.5 + }; + return { + '@global': { + '@keyframes mui-auto-fill': {}, + '@keyframes mui-auto-fill-cancel': {} + }, + + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.typography.body1, { + color: theme.palette.text.primary, + lineHeight: '1.1876em', + // Reset (19px), match the native input line-height + boxSizing: 'border-box', + // Prevent padding issue with fullWidth. + position: 'relative', + cursor: 'text', + display: 'inline-flex', + alignItems: 'center', + '&$disabled': { + color: theme.palette.text.disabled, + cursor: 'default' + } + }), + + /* Styles applied to the root element if the component is a descendant of `FormControl`. */ + formControl: {}, + + /* Styles applied to the root element if the component is focused. */ + focused: {}, + + /* Styles applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `startAdornment` is provided. */ + adornedStart: {}, + + /* Styles applied to the root element if `endAdornment` is provided. */ + adornedEnd: {}, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Styles applied to the `input` element if `margin="dense"`. */ + marginDense: {}, + + /* Styles applied to the root element if `multiline={true}`. */ + multiline: { + padding: "".concat(8 - 2, "px 0 ").concat(8 - 1, "px"), + '&$marginDense': { + paddingTop: 4 - 1 + } + }, + + /* Styles applied to the root element if the color is secondary. */ + colorSecondary: {}, + + /* Styles applied to the root element if `fullWidth={true}`. */ + fullWidth: { + width: '100%' + }, + + /* Styles applied to the `input` element. */ + input: { + font: 'inherit', + letterSpacing: 'inherit', + color: 'currentColor', + padding: "".concat(8 - 2, "px 0 ").concat(8 - 1, "px"), + border: 0, + boxSizing: 'content-box', + background: 'none', + height: '1.1876em', + // Reset (19px), match the native input line-height + margin: 0, + // Reset for Safari + WebkitTapHighlightColor: 'transparent', + display: 'block', + // Make the flex item shrink with Firefox + minWidth: 0, + width: '100%', + // Fix IE 11 width issue + animationName: 'mui-auto-fill-cancel', + animationDuration: '10ms', + '&::-webkit-input-placeholder': placeholder, + '&::-moz-placeholder': placeholder, + // Firefox 19+ + '&:-ms-input-placeholder': placeholder, + // IE 11 + '&::-ms-input-placeholder': placeholder, + // Edge + '&:focus': { + outline: 0 + }, + // Reset Firefox invalid required input style + '&:invalid': { + boxShadow: 'none' + }, + '&::-webkit-search-decoration': { + // Remove the padding when type=search. + '-webkit-appearance': 'none' + }, + // Show and hide the placeholder logic + 'label[data-shrink=false] + $formControl &': { + '&::-webkit-input-placeholder': placeholderHidden, + '&::-moz-placeholder': placeholderHidden, + // Firefox 19+ + '&:-ms-input-placeholder': placeholderHidden, + // IE 11 + '&::-ms-input-placeholder': placeholderHidden, + // Edge + '&:focus::-webkit-input-placeholder': placeholderVisible, + '&:focus::-moz-placeholder': placeholderVisible, + // Firefox 19+ + '&:focus:-ms-input-placeholder': placeholderVisible, + // IE 11 + '&:focus::-ms-input-placeholder': placeholderVisible // Edge + + }, + '&$disabled': { + opacity: 1 // Reset iOS opacity + + }, + '&:-webkit-autofill': { + animationDuration: '5000s', + animationName: 'mui-auto-fill' + } + }, + + /* Styles applied to the `input` element if `margin="dense"`. */ + inputMarginDense: { + paddingTop: 4 - 1 + }, + + /* Styles applied to the `input` element if `multiline={true}`. */ + inputMultiline: { + height: 'auto', + resize: 'none', + padding: 0 + }, + + /* Styles applied to the `input` element if `type="search"`. */ + inputTypeSearch: { + // Improve type search style. + '-moz-appearance': 'textfield', + '-webkit-appearance': 'textfield' + }, + + /* Styles applied to the `input` element if `startAdornment` is provided. */ + inputAdornedStart: {}, + + /* Styles applied to the `input` element if `endAdornment` is provided. */ + inputAdornedEnd: {}, + + /* Styles applied to the `input` element if `hiddenLabel={true}`. */ + inputHiddenLabel: {} + }; +}; +var useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_3__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_3__["useLayoutEffect"]; +/** + * `InputBase` contains as few styles as possible. + * It aims to be a simple building block for creating an input. + * It contains a load of style reset and some state logic. + */ + +var InputBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function InputBase(props, ref) { + var ariaDescribedby = props['aria-describedby'], + autoComplete = props.autoComplete, + autoFocus = props.autoFocus, + classes = props.classes, + className = props.className, + color = props.color, + defaultValue = props.defaultValue, + disabled = props.disabled, + endAdornment = props.endAdornment, + error = props.error, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + id = props.id, + _props$inputComponent = props.inputComponent, + inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent, + _props$inputProps = props.inputProps, + inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps, + inputRefProp = props.inputRef, + margin = props.margin, + _props$multiline = props.multiline, + multiline = _props$multiline === void 0 ? false : _props$multiline, + name = props.name, + onBlur = props.onBlur, + onChange = props.onChange, + onClick = props.onClick, + onFocus = props.onFocus, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp, + placeholder = props.placeholder, + readOnly = props.readOnly, + renderSuffix = props.renderSuffix, + rows = props.rows, + rowsMax = props.rowsMax, + rowsMin = props.rowsMin, + maxRows = props.maxRows, + minRows = props.minRows, + startAdornment = props.startAdornment, + _props$type = props.type, + type = _props$type === void 0 ? 'text' : _props$type, + valueProp = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["aria-describedby", "autoComplete", "autoFocus", "classes", "className", "color", "defaultValue", "disabled", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "rowsMax", "rowsMin", "maxRows", "minRows", "startAdornment", "type", "value"]); + + var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp; + + var _React$useRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](value != null), + isControlled = _React$useRef.current; + + var inputRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + var handleInputRefWarning = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (instance) { + if (false) {} + }, []); + var handleInputPropsRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__["default"])(inputPropsProp.ref, handleInputRefWarning); + var handleInputRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__["default"])(inputRefProp, handleInputPropsRefProp); + var handleInputRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__["default"])(inputRef, handleInputRefProp); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), + focused = _React$useState[0], + setFocused = _React$useState[1]; + + var muiFormControl = Object(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__["useFormControl"])(); + + if (false) {} + + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled'] + }); + fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input. + // We need to book keep the focused state manually. + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + if (!muiFormControl && disabled && focused) { + setFocused(false); + + if (onBlur) { + onBlur(); + } + } + }, [muiFormControl, disabled, focused, onBlur]); + var onFilled = muiFormControl && muiFormControl.onFilled; + var onEmpty = muiFormControl && muiFormControl.onEmpty; + var checkDirty = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (obj) { + if (Object(_utils__WEBPACK_IMPORTED_MODULE_12__["isFilled"])(obj)) { + if (onFilled) { + onFilled(); + } + } else if (onEmpty) { + onEmpty(); + } + }, [onFilled, onEmpty]); + useEnhancedEffect(function () { + if (isControlled) { + checkDirty({ + value: value + }); + } + }, [value, checkDirty, isControlled]); + + var handleFocus = function handleFocus(event) { + // Fix a bug with IE 11 where the focus/blur events are triggered + // while the input is disabled. + if (fcs.disabled) { + event.stopPropagation(); + return; + } + + if (onFocus) { + onFocus(event); + } + + if (inputPropsProp.onFocus) { + inputPropsProp.onFocus(event); + } + + if (muiFormControl && muiFormControl.onFocus) { + muiFormControl.onFocus(event); + } else { + setFocused(true); + } + }; + + var handleBlur = function handleBlur(event) { + if (onBlur) { + onBlur(event); + } + + if (inputPropsProp.onBlur) { + inputPropsProp.onBlur(event); + } + + if (muiFormControl && muiFormControl.onBlur) { + muiFormControl.onBlur(event); + } else { + setFocused(false); + } + }; + + var handleChange = function handleChange(event) { + if (!isControlled) { + var element = event.target || inputRef.current; + + if (element == null) { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["formatMuiErrorMessage"])(1)); + } + + checkDirty({ + value: element.value + }); + } + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + if (inputPropsProp.onChange) { + inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args)); + } // Perform in the willUpdate + + + if (onChange) { + onChange.apply(void 0, [event].concat(args)); + } + }; // Check the input state on mount, in case it was filled by the user + // or auto filled by the browser before the hydration (for SSR). + + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + checkDirty(inputRef.current); + }, []); // eslint-disable-line react-hooks/exhaustive-deps + + var handleClick = function handleClick(event) { + if (inputRef.current && event.currentTarget === event.target) { + inputRef.current.focus(); + } + + if (onClick) { + onClick(event); + } + }; + + var InputComponent = inputComponent; + + var inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, inputPropsProp, { + ref: handleInputRef + }); + + if (typeof InputComponent !== 'string') { + inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + // Rename ref to inputRef as we don't know the + // provided `inputComponent` structure. + inputRef: handleInputRef, + type: type + }, inputProps, { + ref: null + }); + } else if (multiline) { + if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) { + InputComponent = 'textarea'; + } else { + inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + minRows: rows || minRows, + rowsMax: rowsMax, + maxRows: maxRows + }, inputProps); + InputComponent = _TextareaAutosize__WEBPACK_IMPORTED_MODULE_11__["default"]; + } + } else { + inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + type: type + }, inputProps); + } + + var handleAutoFill = function handleAutoFill(event) { + // Provide a fake value as Chrome might not let you access it for security reasons. + checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : { + value: 'x' + }); + }; + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + if (muiFormControl) { + muiFormControl.setAdornedStart(Boolean(startAdornment)); + } + }, [muiFormControl, startAdornment]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__["default"])(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense), + onClick: handleClick, + ref: ref + }, other), startAdornment, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__["default"].Provider, { + value: null + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + "aria-invalid": fcs.error, + "aria-describedby": ariaDescribedby, + autoComplete: autoComplete, + autoFocus: autoFocus, + defaultValue: defaultValue, + disabled: fcs.disabled, + id: id, + onAnimationStart: handleAutoFill, + name: name, + placeholder: placeholder, + readOnly: readOnly, + required: fcs.required, + rows: rows, + value: value, + onKeyDown: onKeyDown, + onKeyUp: onKeyUp + }, inputProps, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense), + onBlur: handleBlur, + onChange: handleChange, + onFocus: handleFocus + }))), endAdornment, renderSuffix ? renderSuffix(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, fcs, { + startAdornment: startAdornment + })) : null); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiInputBase' +})(InputBase)); + +/***/ }), + +/***/ "/bBx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoMergeLevel2; }); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function autoMergeLevel2(inboundState, originalState, reducedState, _ref) { + var debug = _ref.debug; + + var newState = _extends({}, reducedState); + // only rehydrate if inboundState exists and is an object + if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { + Object.keys(inboundState).forEach(function (key) { + // ignore _persist data + if (key === '_persist') return; + // if reducer modifies substate, skip auto rehydration + if (originalState[key] !== reducedState[key]) { + if (false) {} + return; + } + if (isPlainEnoughObject(reducedState[key])) { + // if object is plain enough shallow merge the new values (hence "Level2") + newState[key] = _extends({}, newState[key], inboundState[key]); + return; + } + // otherwise hard set + newState[key] = inboundState[key]; + }); + } + + if (false) {} + + return newState; +} + +/* + autoMergeLevel2: + - merges 2 level of substate + - skips substate if already modified + - this is essentially redux-perist v4 behavior +*/ + +function isPlainEnoughObject(o) { + return o !== null && !Array.isArray(o) && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object'; +} + +/***/ }), + +/***/ "/bLz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_createNamedExportFrom", function() { return _createNamedExportFrom; }); +/** + * Copy a property from the given object into `exports`, under the given name. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param obj The object containing the property to copy. + * @param localName The name under which to export the property + * @param importedName The name under which the property lives in `obj` + */ +function _createNamedExportFrom(obj, localName, importedName) { + exports[localName] = obj[importedName]; +} + +// Sucrase version: +// function _createNamedExportFrom(obj, localName, importedName) { +// Object.defineProperty(exports, localName, {enumerable: true, get: () => obj[importedName]}); +// } + + +//# sourceMappingURL=_createNamedExportFrom.js.map + + +/***/ }), + +/***/ "/hc2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("vFJ3"); +/* harmony import */ var _internal_svg_icons_RadioButtonUnchecked__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ywrT"); +/* harmony import */ var _internal_svg_icons_RadioButtonChecked__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Af6T"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + root: { + position: 'relative', + display: 'flex', + '&$checked $layer': { + transform: 'scale(1)', + transition: theme.transitions.create('transform', { + easing: theme.transitions.easing.easeOut, + duration: theme.transitions.duration.shortest + }) + } + }, + layer: { + left: 0, + position: 'absolute', + transform: 'scale(0)', + transition: theme.transitions.create('transform', { + easing: theme.transitions.easing.easeIn, + duration: theme.transitions.duration.shortest + }) + }, + checked: {} + }; +}; +/** + * @ignore - internal component. + */ + +function RadioButtonIcon(props) { + var checked = props.checked, + classes = props.classes, + fontSize = props.fontSize; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.root, checked && classes.checked) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_svg_icons_RadioButtonUnchecked__WEBPACK_IMPORTED_MODULE_3__["default"], { + fontSize: fontSize + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_svg_icons_RadioButtonChecked__WEBPACK_IMPORTED_MODULE_4__["default"], { + fontSize: fontSize, + className: classes.layer + })); +} + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'PrivateRadioButtonIcon' +})(RadioButtonIcon)); + +/***/ }), + +/***/ "/iOI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isMuiElement; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +function isMuiElement(element, muiNames) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"](element) && muiNames.indexOf(element.type.muiName) !== -1; +} + +/***/ }), + +/***/ "/kI0": +/***/ (function(module, exports, __webpack_require__) { + +var get = __webpack_require__("/yh+"); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; + + +/***/ }), + +/***/ "/mIL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setContent", function() { return setContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsetContent", function() { return unsetContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultState", function() { return getDefaultState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContent", function() { return getContent; }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__); + + +var SET_CONTENT = 'SET_CONTENT'; +var UNSET_CONTENT = 'UNSET_CONTENT'; + +var getLastItemInMap = function getLastItemInMap(map) { + return Array.from(map)[map.size - 1]; +}; // action creator + + +var setContent = function setContent(location, content, id) { + return { + type: SET_CONTENT, + location: location, + content: content, + id: id + }; +}; +var unsetContent = function unsetContent(location, id) { + return { + type: UNSET_CONTENT, + location: location, + id: id + }; +}; // reducer + +var getDefaultState = function getDefaultState() { + return { + left: new Map(), + center: new Map(), + right: new Map(), + search: new Map() + }; +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultState(); + var action = arguments.length > 1 ? arguments[1] : undefined; + if (!action.location || typeof action.id === undefined) return state; + + switch (action.type) { + case SET_CONTENT: + { + var currentState = state[action.location]; + currentState.set(action.id, action.content); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.location, currentState)); + } + + case UNSET_CONTENT: + { + var _currentState = state[action.location]; + + if (!_currentState.get(action.id)) { + return state; + } + + _currentState.delete(action.id); + + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.location, _currentState)); + } + + default: + return state; + } +}; // selectors + +var getContent = function getContent(state, location) { + return getLastItemInMap(state[location]) && getLastItemInMap(state[location])[1]; +}; + +/***/ }), + +/***/ "/mpp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b0ha"); + + + +var at = '@global'; +var atPrefix = '@global '; + +var GlobalContainerRule = +/*#__PURE__*/ +function () { + function GlobalContainerRule(key, styles, options) { + this.type = 'global'; + this.at = at; + this.isProcessed = false; + this.key = key; + this.options = options; + this.rules = new jss__WEBPACK_IMPORTED_MODULE_1__["RuleList"](Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + parent: this + })); + + for (var selector in styles) { + this.rules.add(selector, styles[selector]); + } + + this.rules.process(); + } + /** + * Get a rule. + */ + + + var _proto = GlobalContainerRule.prototype; + + _proto.getRule = function getRule(name) { + return this.rules.get(name); + } + /** + * Create and register rule, run plugins. + */ + ; + + _proto.addRule = function addRule(name, style, options) { + var rule = this.rules.add(name, style, options); + if (rule) this.options.jss.plugins.onProcessRule(rule); + return rule; + } + /** + * Replace rule, run plugins. + */ + ; + + _proto.replaceRule = function replaceRule(name, style, options) { + var newRule = this.rules.replace(name, style, options); + if (newRule) this.options.jss.plugins.onProcessRule(newRule); + return newRule; + } + /** + * Get index of a rule. + */ + ; + + _proto.indexOf = function indexOf(rule) { + return this.rules.indexOf(rule); + } + /** + * Generates a CSS string. + */ + ; + + _proto.toString = function toString(options) { + return this.rules.toString(options); + }; + + return GlobalContainerRule; +}(); + +var GlobalPrefixedRule = +/*#__PURE__*/ +function () { + function GlobalPrefixedRule(key, style, options) { + this.type = 'global'; + this.at = at; + this.isProcessed = false; + this.key = key; + this.options = options; + var selector = key.substr(atPrefix.length); + this.rule = options.jss.createRule(selector, style, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + parent: this + })); + } + + var _proto2 = GlobalPrefixedRule.prototype; + + _proto2.toString = function toString(options) { + return this.rule ? this.rule.toString(options) : ''; + }; + + return GlobalPrefixedRule; +}(); + +var separatorRegExp = /\s*,\s*/g; + +function addScope(selector, scope) { + var parts = selector.split(separatorRegExp); + var scoped = ''; + + for (var i = 0; i < parts.length; i++) { + scoped += scope + " " + parts[i].trim(); + if (parts[i + 1]) scoped += ', '; + } + + return scoped; +} + +function handleNestedGlobalContainerRule(rule, sheet) { + var options = rule.options, + style = rule.style; + var rules = style ? style[at] : null; + if (!rules) return; + + for (var name in rules) { + sheet.addRule(name, rules[name], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + selector: addScope(name, rule.selector) + })); + } + + delete style[at]; +} + +function handlePrefixedGlobalRule(rule, sheet) { + var options = rule.options, + style = rule.style; + + for (var prop in style) { + if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue; + var selector = addScope(prop.substr(at.length), rule.selector); + sheet.addRule(selector, style[prop], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + selector: selector + })); + delete style[prop]; + } +} +/** + * Convert nested rules to separate, remove them from original styles. + */ + + +function jssGlobal() { + function onCreateRule(name, styles, options) { + if (!name) return null; + + if (name === at) { + return new GlobalContainerRule(name, styles, options); + } + + if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) { + return new GlobalPrefixedRule(name, styles, options); + } + + var parent = options.parent; + + if (parent) { + if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') { + options.scoped = false; + } + } + + if (!options.selector && options.scoped === false) { + options.selector = name; + } + + return null; + } + + function onProcessRule(rule, sheet) { + if (rule.type !== 'style' || !sheet) return; + handleNestedGlobalContainerRule(rule, sheet); + handlePrefixedGlobalRule(rule, sheet); + } + + return { + onCreateRule: onCreateRule, + onProcessRule: onProcessRule + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (jssGlobal); + + +/***/ }), + +/***/ "/otF": +/***/ (function(module, exports) { + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "/yh+": +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__("+Bmy"); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; + + +/***/ }), + +/***/ 0: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "0/NE": +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__("8ltH"), + arraySome = __webpack_require__("EftX"), + cacheHas = __webpack_require__("fO1A"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; + + +/***/ }), + +/***/ "00OQ": +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), + +/***/ "02by": +/***/ (function(module, exports, __webpack_require__) { + +var asciiToArray = __webpack_require__("2Ojh"), + hasUnicode = __webpack_require__("ppUe"), + unicodeToArray = __webpack_require__("sG2N"); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; + + +/***/ }), + +/***/ "03LE": +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__("iwVW"); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} + +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "05E2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _node_express_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6lZ+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Express", function() { return _node_express_js__WEBPACK_IMPORTED_MODULE_0__["Express"]; }); + +/* harmony import */ var _node_postgres_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("+Kpw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Postgres", function() { return _node_postgres_js__WEBPACK_IMPORTED_MODULE_1__["Postgres"]; }); + +/* harmony import */ var _node_mysql_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Bcp8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Mysql", function() { return _node_mysql_js__WEBPACK_IMPORTED_MODULE_2__["Mysql"]; }); + +/* harmony import */ var _node_mongo_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6JFH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Mongo", function() { return _node_mongo_js__WEBPACK_IMPORTED_MODULE_3__["Mongo"]; }); + +/* harmony import */ var _node_prisma_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("I6w8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Prisma", function() { return _node_prisma_js__WEBPACK_IMPORTED_MODULE_4__["Prisma"]; }); + +/* harmony import */ var _node_graphql_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wWdb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GraphQL", function() { return _node_graphql_js__WEBPACK_IMPORTED_MODULE_5__["GraphQL"]; }); + +/* harmony import */ var _node_apollo_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fpcP"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Apollo", function() { return _node_apollo_js__WEBPACK_IMPORTED_MODULE_6__["Apollo"]; }); + +/* harmony import */ var _browser_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("XMPp"); +/* harmony import */ var _browser_browsertracing_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("unBY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserTracing", function() { return _browser_browsertracing_js__WEBPACK_IMPORTED_MODULE_8__["BrowserTracing"]; }); + + + + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "05TQ": +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__("etLA"); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), + +/***/ "06hQ": +/***/ (function(module, exports) { + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; + + +/***/ }), + +/***/ "08Tt": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__("r0Co"); +var callBind = __webpack_require__("lrTv"); + +var implementation = __webpack_require__("B3W8"); +var getPolyfill = __webpack_require__("UxrS"); +var shim = __webpack_require__("akxm"); + +var polyfill = callBind(getPolyfill(), Object); + +define(polyfill, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = polyfill; + + +/***/ }), + +/***/ "08s0": +/***/ (function(module, exports, __webpack_require__) { + +var memoize = __webpack_require__("euuj"); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; + + +/***/ }), + +/***/ "08sj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getPrototypeOf; }); +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +/***/ }), + +/***/ "09Xu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return bindActionCreators; }); +function bindActionCreators(actionCreators, dispatch) { + var boundActionCreators = {}; + + var _loop = function _loop(key) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = function () { + return dispatch(actionCreator.apply(void 0, arguments)); + }; + } + }; + + for (var key in actionCreators) { + _loop(key); + } + + return boundActionCreators; +} + +/***/ }), + +/***/ "0A/q": +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__("kTya"), + keys = __webpack_require__("NHjt"); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; + + +/***/ }), + +/***/ "0Do6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getReferencedById = exports.getReferencedBy = exports.isReferencedById = exports.isReferencedBy = exports.create = exports.resolveClass = exports.attachRelationships = exports.responseToRelationship = exports.pickTypeAndId = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _pick = _interopRequireDefault(__webpack_require__("LF8A")); + +var _pickBy = _interopRequireDefault(__webpack_require__("pp5t")); + +var _Association = _interopRequireDefault(__webpack_require__("urEX")); + +var _HasOne = _interopRequireDefault(__webpack_require__("ZN96")); + +var _HasOneInPlace = _interopRequireDefault(__webpack_require__("7DJk")); + +var _HasMany = _interopRequireDefault(__webpack_require__("Jm63")); + +var _HasManyInPlace = _interopRequireDefault(__webpack_require__("BCXA")); + +var _HasManyFiles = _interopRequireDefault(__webpack_require__("Dktw")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var pickTypeAndId = function pickTypeAndId(x) { + return (0, _pick.default)(x, '_type', '_id'); +}; + +exports.pickTypeAndId = pickTypeAndId; + +var applyHelper = function applyHelper(fn, objOrArr) { + return Array.isArray(objOrArr) ? objOrArr.map(fn) : fn(objOrArr); +}; + +var responseToRelationship = function responseToRelationship(response) { + return (0, _pickBy.default)({ + data: applyHelper(pickTypeAndId, response.data), + meta: response.meta, + next: response.next, + skip: response.skip, + bookmark: response.bookmark + }); +}; + +exports.responseToRelationship = responseToRelationship; + +var attachRelationship = function attachRelationship(doc, relationships) { + return _objectSpread(_objectSpread({}, doc), {}, { + relationships: _objectSpread(_objectSpread({}, doc.relationships), relationships) + }); +}; + +var attachRelationships = function attachRelationships(response, relationshipsByDocId) { + if (Array.isArray(response.data)) { + return _objectSpread(_objectSpread({}, response), {}, { + data: response.data.map(function (doc) { + return attachRelationship(doc, relationshipsByDocId[doc._id]); + }) + }); + } else { + var doc = response.data; + return _objectSpread(_objectSpread({}, response), {}, { + data: attachRelationship(doc, relationshipsByDocId[doc._id]) + }); + } +}; + +exports.attachRelationships = attachRelationships; +var aliases = { + 'io.cozy.files:has-many': _HasManyFiles.default, + 'has-many': _HasMany.default, + 'belongs-to-in-place': _HasOneInPlace.default, + 'has-one': _HasOne.default, + 'has-one-in-place': _HasOneInPlace.default, + 'has-many-in-place': _HasManyInPlace.default +}; +/** + * Returns the relationship class for a given doctype/type. + * + * In the schema definition, some classes have string aliases + * so you do not have to import directly the association. + * + * Some doctypes can have built-in overriden relationships. + * + * @private + */ + +var resolveClass = function resolveClass(doctype, type) { + if (type === undefined) { + throw new Error('Undefined type for ' + doctype); + } + + if (typeof type !== 'string') { + return type; + } else { + var qualified = "".concat(doctype, ":").concat(type); + var cls = aliases[qualified] || aliases[type]; + + if (!cls) { + throw new Error("Unknown association '".concat(type, "'")); + } else { + return cls; + } + } +}; + +exports.resolveClass = resolveClass; + +var create = function create(target, _ref, accessors) { + var name = _ref.name, + type = _ref.type, + doctype = _ref.doctype; + + if (target[name] instanceof _Association.default) { + throw new Error("Association ".concat(name, " already exists")); + } + + return new type(target, name, doctype, accessors); +}; +/** + * Checks if the file is referenced by a specific doctype + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @param {import("../types").Doctype} referencedBy - Doctype where document is referenced + * @returns {boolean} If a reference is found + */ + + +exports.create = create; + +var isReferencedBy = function isReferencedBy(file, referencedBy) { + var _file$relationships, _file$relationships$r; + + var references = (file === null || file === void 0 ? void 0 : (_file$relationships = file.relationships) === null || _file$relationships === void 0 ? void 0 : (_file$relationships$r = _file$relationships.referenced_by) === null || _file$relationships$r === void 0 ? void 0 : _file$relationships$r.data) || (file === null || file === void 0 ? void 0 : file.referenced_by) || []; + return references.some(function (reference) { + return reference.type === referencedBy; + }); +}; +/** + * Checks if the file is referenced by a specific doctype and a specific Id of that reference + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @param {import("../types").Doctype} referencedBy - Doctype where document is referenced + * @param {string} referencedId - Id of the referenced document + * @returns {boolean} If a reference is found + */ + + +exports.isReferencedBy = isReferencedBy; + +var isReferencedById = function isReferencedById(file, referencedBy, referencedId) { + var _file$relationships2, _file$relationships2$; + + var references = (file === null || file === void 0 ? void 0 : (_file$relationships2 = file.relationships) === null || _file$relationships2 === void 0 ? void 0 : (_file$relationships2$ = _file$relationships2.referenced_by) === null || _file$relationships2$ === void 0 ? void 0 : _file$relationships2$.data) || (file === null || file === void 0 ? void 0 : file.referenced_by) || []; + return references.some(function (reference) { + return reference.type === referencedBy && reference.id === referencedId; + }); +}; +/** + * Get array of reference by an specific doctype + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @param {import("../types").Doctype} referencedBy - Doctype where document is referenced + * @returns {import("../types").Reference[]} Array of references found + */ + + +exports.isReferencedById = isReferencedById; + +var getReferencedBy = function getReferencedBy(file, referencedBy) { + var _file$relationships3, _file$relationships3$; + + var references = (file === null || file === void 0 ? void 0 : (_file$relationships3 = file.relationships) === null || _file$relationships3 === void 0 ? void 0 : (_file$relationships3$ = _file$relationships3.referenced_by) === null || _file$relationships3$ === void 0 ? void 0 : _file$relationships3$.data) || (file === null || file === void 0 ? void 0 : file.referenced_by) || []; + return references.filter(function (reference) { + return reference.type === referencedBy; + }); +}; +/** + * Get array of reference by an specific doctype and a specific Id of that reference + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @param {import("../types").Doctype} referencedBy - Doctype where document is referenced + * @param {string} referencedId - Id of the referenced document + * @returns {import("../types").Reference[]} Array of the reference found + */ + + +exports.getReferencedBy = getReferencedBy; + +var getReferencedById = function getReferencedById(file, referencedBy, referencedId) { + var _file$relationships4, _file$relationships4$; + + var references = (file === null || file === void 0 ? void 0 : (_file$relationships4 = file.relationships) === null || _file$relationships4 === void 0 ? void 0 : (_file$relationships4$ = _file$relationships4.referenced_by) === null || _file$relationships4$ === void 0 ? void 0 : _file$relationships4$.data) || (file === null || file === void 0 ? void 0 : file.referenced_by) || []; + return references.filter(function (reference) { + return reference.type === referencedBy && reference.id === referencedId; + }); +}; + +exports.getReferencedById = getReferencedById; + +/***/ }), + +/***/ "0E3h": +/***/ (function(module, exports, __webpack_require__) { + +var _typeof = __webpack_require__("euUg")["default"]; + +function _regeneratorRuntime() { + "use strict"; + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ + + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { + return exports; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + var exports = {}, + Op = Object.prototype, + hasOwn = Op.hasOwnProperty, + $Symbol = "function" == typeof Symbol ? Symbol : {}, + iteratorSymbol = $Symbol.iterator || "@@iterator", + asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", + toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function define(obj, key, value) { + return Object.defineProperty(obj, key, { + value: value, + enumerable: !0, + configurable: !0, + writable: !0 + }), obj[key]; + } + + try { + define({}, ""); + } catch (err) { + define = function define(obj, key, value) { + return obj[key] = value; + }; + } + + function wrap(innerFn, outerFn, self, tryLocsList) { + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, + generator = Object.create(protoGenerator.prototype), + context = new Context(tryLocsList || []); + return generator._invoke = function (innerFn, self, context) { + var state = "suspendedStart"; + return function (method, arg) { + if ("executing" === state) throw new Error("Generator is already running"); + + if ("completed" === state) { + if ("throw" === method) throw arg; + return doneResult(); + } + + for (context.method = method, context.arg = arg;;) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { + if ("suspendedStart" === state) throw state = "completed", context.arg; + context.dispatchException(context.arg); + } else "return" === context.method && context.abrupt("return", context.arg); + state = "executing"; + var record = tryCatch(innerFn, self, context); + + if ("normal" === record.type) { + if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; + return { + value: record.arg, + done: context.done + }; + } + + "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); + } + }; + }(innerFn, self, context), generator; + } + + function tryCatch(fn, obj, arg) { + try { + return { + type: "normal", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: "throw", + arg: err + }; + } + } + + exports.wrap = wrap; + var ContinueSentinel = {}; + + function Generator() {} + + function GeneratorFunction() {} + + function GeneratorFunctionPrototype() {} + + var IteratorPrototype = {}; + define(IteratorPrototype, iteratorSymbol, function () { + return this; + }); + var getProto = Object.getPrototypeOf, + NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function (method) { + define(prototype, method, function (arg) { + return this._invoke(method, arg); + }); + }); + } + + function AsyncIterator(generator, PromiseImpl) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + + if ("throw" !== record.type) { + var result = record.arg, + value = result.value; + return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { + invoke("next", value, resolve, reject); + }, function (err) { + invoke("throw", err, resolve, reject); + }) : PromiseImpl.resolve(value).then(function (unwrapped) { + result.value = unwrapped, resolve(result); + }, function (error) { + return invoke("throw", error, resolve, reject); + }); + } + + reject(record.arg); + } + + var previousPromise; + + this._invoke = function (method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + }; + } + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (undefined === method) { + if (context.delegate = null, "throw" === context.method) { + if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; + context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; + var info = record.arg; + return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); + } + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal", delete record.arg, entry.completion = record; + } + + function Context(tryLocsList) { + this.tryEntries = [{ + tryLoc: "root" + }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); + } + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) return iteratorMethod.call(iterable); + if ("function" == typeof iterable.next) return iterable; + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + for (; ++i < iterable.length;) { + if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; + } + + return next.value = undefined, next.done = !0, next; + }; + + return next.next = next; + } + } + + return { + next: doneResult + }; + } + + function doneResult() { + return { + value: undefined, + done: !0 + }; + } + + return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { + var ctor = "function" == typeof genFun && genFun.constructor; + return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); + }, exports.mark = function (genFun) { + return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; + }, exports.awrap = function (arg) { + return { + __await: arg + }; + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + return this; + }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { + void 0 === PromiseImpl && (PromiseImpl = Promise); + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { + return this; + }), define(Gp, "toString", function () { + return "[object Generator]"; + }), exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + return keys.reverse(), function next() { + for (; keys.length;) { + var key = keys.pop(); + if (key in object) return next.value = key, next.done = !1, next; + } + + return next.done = !0, next; + }; + }, exports.values = values, Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { + "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); + } + }, + stop: function stop() { + this.done = !0; + var rootRecord = this.tryEntries[0].completion; + if ("throw" === rootRecord.type) throw rootRecord.arg; + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) throw exception; + var context = this; + + function handle(loc, caught) { + return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i], + record = entry.completion; + if ("root" === entry.tryLoc) return handle("end"); + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"), + hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); + } else if (hasCatch) { + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); + } else { + if (!hasFinally) throw new Error("try statement without catch or finally"); + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); + var record = finallyEntry ? finallyEntry.completion : {}; + return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); + }, + complete: function complete(record, afterLoc) { + if ("throw" === record.type) throw record.arg; + return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; + } + }, + "catch": function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if ("throw" === record.type) { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } + + throw new Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + return this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }, "next" === this.method && (this.arg = undefined), ContinueSentinel; + } + }, exports; +} + +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "0GfA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return shallowEqual; }); +var hasOwn = Object.prototype.hasOwnProperty; + +function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +/***/ }), + +/***/ "0JkL": +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = __webpack_require__("LRPZ"); +var toISOString = __webpack_require__("sLDg"); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + + +/***/ }), + +/***/ "0KJs": +/***/ (function(module, exports, __webpack_require__) { + +var apply = __webpack_require__("ZLBK"), + arrayMap = __webpack_require__("4FGL"), + unzip = __webpack_require__("mcWW"); + +/** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ +function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); +} + +module.exports = unzipWith; + + +/***/ }), + +/***/ "0L9m": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Zidy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "0Lot": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createGenerateClassName; }); +/* harmony import */ var _ThemeProvider_nested__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9Rvm"); + +/** + * This is the list of the style rule name we use as drop in replacement for the built-in + * pseudo classes (:checked, :disabled, :focused, etc.). + * + * Why do they exist in the first place? + * These classes are used at a specificity of 2. + * It allows them to override previously definied styles as well as + * being untouched by simple user overrides. + */ + +var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters. +// When new generator function is created, rule counter is reset. +// We need to reset the rule counter for SSR for each request. +// +// It's inspired by +// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js + +function createGenerateClassName() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _options$disableGloba = options.disableGlobal, + disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba, + _options$productionPr = options.productionPrefix, + productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr, + _options$seed = options.seed, + seed = _options$seed === void 0 ? '' : _options$seed; + var seedPrefix = seed === '' ? '' : "".concat(seed, "-"); + var ruleCounter = 0; + + var getNextCounterId = function getNextCounterId() { + ruleCounter += 1; + + if (false) {} + + return ruleCounter; + }; + + return function (rule, styleSheet) { + var name = styleSheet.options.name; // Is a global static MUI style? + + if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) { + // We can use a shorthand class name, we never use the keys to style the components. + if (pseudoClasses.indexOf(rule.key) !== -1) { + return "Mui-".concat(rule.key); + } + + var prefix = "".concat(seedPrefix).concat(name, "-").concat(rule.key); + + if (!styleSheet.options.theme[_ThemeProvider_nested__WEBPACK_IMPORTED_MODULE_0__["default"]] || seed !== '') { + return prefix; + } + + return "".concat(prefix, "-").concat(getNextCounterId()); + } + + if (true) { + return "".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId()); + } + + var suffix = "".concat(rule.key, "-").concat(getNextCounterId()); // Help with debuggability. + + if (styleSheet.options.classNamePrefix) { + return "".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, "-").concat(suffix); + } + + return "".concat(seedPrefix).concat(suffix); + }; +} + +/***/ }), + +/***/ "0M3w": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flexBasis", function() { return flexBasis; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flexDirection", function() { return flexDirection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flexWrap", function() { return flexWrap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "justifyContent", function() { return justifyContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignItems", function() { return alignItems; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignContent", function() { return alignContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "order", function() { return order; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flex", function() { return flex; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flexGrow", function() { return flexGrow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flexShrink", function() { return flexShrink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignSelf", function() { return alignSelf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "justifyItems", function() { return justifyItems; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "justifySelf", function() { return justifySelf; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var flexBasis = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flexBasis' +}); +var flexDirection = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flexDirection' +}); +var flexWrap = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flexWrap' +}); +var justifyContent = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'justifyContent' +}); +var alignItems = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'alignItems' +}); +var alignContent = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'alignContent' +}); +var order = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'order' +}); +var flex = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flex' +}); +var flexGrow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flexGrow' +}); +var flexShrink = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'flexShrink' +}); +var alignSelf = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'alignSelf' +}); +var justifyItems = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'justifyItems' +}); +var justifySelf = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'justifySelf' +}); +var flexbox = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf); +/* harmony default export */ __webpack_exports__["default"] = (flexbox); + +/***/ }), + +/***/ "0VZR": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwqu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Step__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "0WOu": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; + + +/***/ }), + +/***/ "0Yrs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCLS", function() { return onCLS; }); +/* harmony import */ var _lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UDFD"); +/* harmony import */ var _lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("FXwW"); +/* harmony import */ var _lib_observe_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("u8T2"); +/* harmony import */ var _lib_onHidden_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("t3J8"); + + + + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Calculates the [CLS](https://web.dev/cls/) value for the current page and + * calls the `callback` function once the value is ready to be reported, along + * with all `layout-shift` performance entries that were used in the metric + * value calculation. The reported value is a `double` (corresponding to a + * [layout shift score](https://web.dev/cls/#layout-shift-score)). + * + * If the `reportAllChanges` configuration option is set to `true`, the + * `callback` function will be called as soon as the value is initially + * determined as well as any time the value changes throughout the page + * lifespan. + * + * _**Important:** CLS should be continually monitored for changes throughout + * the entire lifespan of a page—including if the user returns to the page after + * it's been hidden/backgrounded. However, since browsers often [will not fire + * additional callbacks once the user has backgrounded a + * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden), + * `callback` is always called when the page's visibility state changes to + * hidden. As a result, the `callback` function might be called multiple times + * during the same page load._ + */ +const onCLS = (onReport, opts = {}) => { + const metric = Object(_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_1__["initMetric"])('CLS', 0); + let report; + + let sessionValue = 0; + let sessionEntries = []; + + // const handleEntries = (entries: Metric['entries']) => { + const handleEntries = (entries) => { + entries.forEach(entry => { + // Only count layout shifts without recent user input. + if (!entry.hadRecentInput) { + const firstSessionEntry = sessionEntries[0]; + const lastSessionEntry = sessionEntries[sessionEntries.length - 1]; + + // If the entry occurred less than 1 second after the previous entry and + // less than 5 seconds after the first entry in the session, include the + // entry in the current session. Otherwise, start a new session. + if ( + sessionValue && + sessionEntries.length !== 0 && + entry.startTime - lastSessionEntry.startTime < 1000 && + entry.startTime - firstSessionEntry.startTime < 5000 + ) { + sessionValue += entry.value; + sessionEntries.push(entry); + } else { + sessionValue = entry.value; + sessionEntries = [entry]; + } + + // If the current session value is larger than the current CLS value, + // update CLS and the entries contributing to it. + if (sessionValue > metric.value) { + metric.value = sessionValue; + metric.entries = sessionEntries; + if (report) { + report(); + } + } + } + }); + }; + + const po = Object(_lib_observe_js__WEBPACK_IMPORTED_MODULE_2__["observe"])('layout-shift', handleEntries); + if (po) { + report = Object(_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, opts.reportAllChanges); + + Object(_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_3__["onHidden"])(() => { + handleEntries(po.takeRecords() ); + report(true); + }); + } +}; + + +//# sourceMappingURL=getCLS.js.map + + +/***/ }), + +/***/ "0ZKn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var stringify = __webpack_require__("ibCj"); + +var LOG_LENGTH_LIMIT = 64 * 1024 - 1; + +function prodFormat(type, message, label, namespace) { + var log = { + time: new Date(), + type: type, + label: label, + namespace: namespace + }; + + if (typeof message === 'object') { + if (message && message.no_retry) { + log.no_retry = message.no_retry; + } + + if (message && message.message) { + log.message = message.message; + } + } else { + log.message = message; + } // properly display error messages + + + if (log.message && log.message.stack) { + log.message = log.message.stack; + } // cut the string to avoid a fail in the stack + + + var result = log; + + try { + result = stringify(log).substr(0, LOG_LENGTH_LIMIT); + } catch (err) { + // eslint-disable-next-line no-console + console.log(err.message, 'cozy-logger: Failed to convert message to JSON'); + } + + return result; +} + +module.exports = prodFormat; + +/***/ }), + +/***/ "0aQ2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.13 String.prototype.sub() +__webpack_require__("A7oe")('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + + +/***/ }), + +/***/ "0gG/": +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__("GMq6"); + +/** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ +var now = function() { + return root.Date.now(); +}; + +module.exports = now; + + +/***/ }), + +/***/ "0hnX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +__webpack_require__("n04a"); + +__webpack_require__("gjWG"); + +__webpack_require__("keUb"); + +__webpack_require__("CjtL"); + +__webpack_require__("uANh"); + +__webpack_require__("WbV9"); + +__webpack_require__("8Lvr"); + +__webpack_require__("0qSf"); + +__webpack_require__("+J27"); + +__webpack_require__("/Mwq"); + +__webpack_require__("y4ky"); + +__webpack_require__("XMSJ"); + +__webpack_require__("bY23"); + +__webpack_require__("LAmv"); + +/***/ }), + +/***/ "0nAg": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalize = normalize; +exports.ensureFilePath = ensureFilePath; +exports.getParentFolderId = getParentFolderId; +exports.fetchBlobFileById = exports.isFromKonnector = exports.hasCertifications = exports.hasQualifications = exports.isPlainText = exports.doMobileUpload = exports.readMobileFile = exports.uploadFileWithConflictStrategy = exports.generateFileNameForRevision = exports.generateNewFileNameOnConflict = exports.overrideFileForPath = exports.move = exports.getFullpath = exports.hasMetadataAttribute = exports.fetchFilesByQualificationRules = exports.saveFileQualification = exports.isSharingShorcutNew = exports.isSharingShortcutNew = exports.isSharingShorcut = exports.isSharingShortcut = exports.getSharingShortcutTargetDoctype = exports.getSharingShortcutTargetMime = exports.getSharingShortcutStatus = exports.isShortcut = exports.shouldBeOpenedByOnlyOffice = exports.isOnlyOfficeFile = exports.isEncrypted = exports.isNote = exports.isDirectory = exports.isFile = exports.splitFilename = exports.ALBUMS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _isString = _interopRequireDefault(__webpack_require__("X6P4")); + +var _has = _interopRequireDefault(__webpack_require__("sFVN")); + +var _trimEnd = _interopRequireDefault(__webpack_require__("ncvv")); + +var _qualification = __webpack_require__("DRJ+"); + +var _dsl = __webpack_require__("v2kV"); + +var _const = __webpack_require__("P3Kl"); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var FILE_TYPE = 'file'; +var DIR_TYPE = 'directory'; +var ALBUMS_DOCTYPE = 'io.cozy.photos.albums'; +exports.ALBUMS_DOCTYPE = ALBUMS_DOCTYPE; +var FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/; +/** + * Returns base filename and extension + * + * @param {import("../types").IOCozyFile} file An io.cozy.files + * @returns {object} {filename, extension} + */ + +var splitFilename = function splitFilename(file) { + if (!(0, _isString.default)(file.name)) throw new Error('file should have a name property'); + + if (file.type === 'file') { + var match = file.name.match(FILENAME_WITH_EXTENSION_REGEX); + + if (match) { + return { + filename: match[1], + extension: match[2] + }; + } + } + + return { + filename: file.name, + extension: '' + }; +}; +/** + * + * @param {import("../types").IOCozyFile} file io.cozy.files + */ + + +exports.splitFilename = splitFilename; + +var isFile = function isFile(file) { + return file && file.type === FILE_TYPE; +}; +/** + * + * @param {import("../types").IOCozyFile} file io.cozy.files + */ + + +exports.isFile = isFile; + +var isDirectory = function isDirectory(file) { + return file && file.type === DIR_TYPE; +}; +/** + * Is file param a correct note + * + * @param {import("../types").IOCozyFile} file io.cozy.files + * @returns {boolean} + */ + + +exports.isDirectory = isDirectory; + +var isNote = function isNote(file) { + if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.title !== undefined && file.metadata.version !== undefined) return true; + return false; +}; +/** + * Whether the file is client-side encrypted + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @returns {boolean} + */ + + +exports.isNote = isNote; + +var isEncrypted = function isEncrypted(file) { + return !!file.encrypted; +}; +/** + * Whether the file is supported by Only Office + * + * @param {import("../types").IOCozyFile} file - io.cozy.file document + * @returns {boolean} + */ + + +exports.isEncrypted = isEncrypted; + +var isOnlyOfficeFile = function isOnlyOfficeFile(file) { + return isFile(file) && !isNote(file) && (file.class === 'text' || file.class === 'spreadsheet' || file.class === 'slide'); +}; +/** + * Whether the file should be opened by only office + * We want to be consistent with the stack so we check the class attributes + * But we want to exclude .txt and .md because the CozyUI Viewer can already show them + * + * @param {import("../types").IOCozyFile} file - io.cozy.file document + * @returns {boolean} + */ + + +exports.isOnlyOfficeFile = isOnlyOfficeFile; + +var shouldBeOpenedByOnlyOffice = function shouldBeOpenedByOnlyOffice(file) { + return isOnlyOfficeFile(file) && !file.name.endsWith('.txt') && !file.name.endsWith('.md'); +}; +/** + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @returns {boolean} true if the file is a shortcut + */ + + +exports.shouldBeOpenedByOnlyOffice = shouldBeOpenedByOnlyOffice; + +var isShortcut = function isShortcut(file) { + return file && file.class === 'shortcut'; +}; +/** + * Normalizes an object representing a io.cozy.files object + * + * Ensures existence of `_id` and `_type` + * + * @public + * @param {object} file - object representing the file + * @returns {object} full normalized object + */ + + +exports.isShortcut = isShortcut; + +function normalize(file) { + var id = file._id || file.id; + var doctype = file._type || _const.DOCTYPE_FILES; + return _objectSpread({ + _id: id, + id: id, + _type: doctype + }, file); +} +/** + * Ensure the file has a `path` attribute, or build it + * + * @public + * @param {object} file - object representing the file + * @param {object} parent - parent directory for the file + * @returns {object} file object with path attribute + */ + + +function ensureFilePath(file, parent) { + if (file.path) return file; + if (!parent || !parent.path) throw new Error("Could not define a file path for ".concat(file._id || file.id)); + var path = parent.path + '/' + file.name; + return _objectSpread({ + path: path + }, file); +} +/** + * Get the id of the parent folder (`null` for the root folder) + * + * @param {object} file - io.cozy.files document + * @returns {string|null} id of the parent folder, if any + */ + + +function getParentFolderId(file) { + var parentId = (0, _get.default)(file, 'attributes.dir_id'); + return parentId === '' ? null : parentId; +} +/** + * Returns the status of a sharing shortcut. + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {string} A description of the status + */ + + +var getSharingShortcutStatus = function getSharingShortcutStatus(file) { + return (0, _get.default)(file, 'metadata.sharing.status'); +}; +/** + * Returns the mime type of the target of the sharing shortcut, if it is a file. + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {string} The mime-type of the target file, or an empty string is the target is not a file. + */ + + +exports.getSharingShortcutStatus = getSharingShortcutStatus; + +var getSharingShortcutTargetMime = function getSharingShortcutTargetMime(file) { + return (0, _get.default)(file, 'metadata.target.mime'); +}; +/** + * Returns the doctype of the target of the sharing shortcut. + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {string} A doctype + */ + + +exports.getSharingShortcutTargetMime = getSharingShortcutTargetMime; + +var getSharingShortcutTargetDoctype = function getSharingShortcutTargetDoctype(file) { + return (0, _get.default)(file, 'metadata.target._type'); +}; +/** + * Returns whether the file is a shortcut to a sharing + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ + + +exports.getSharingShortcutTargetDoctype = getSharingShortcutTargetDoctype; + +var isSharingShortcut = function isSharingShortcut(file) { + return Boolean(getSharingShortcutStatus(file)); +}; +/** + * Returns whether the file is a shortcut to a sharing + * + * @deprecated Prefer to use isSharingShortcut. + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ + + +exports.isSharingShortcut = isSharingShortcut; + +var isSharingShorcut = function isSharingShorcut(file) { + _logger.default.warn('Deprecation: `isSharingShorcut` is deprecated, please use `isSharingShortcut` instead'); + + return isSharingShortcut(file); +}; +/** + * Returns whether the sharing shortcut is new + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ + + +exports.isSharingShorcut = isSharingShorcut; + +var isSharingShortcutNew = function isSharingShortcutNew(file) { + return getSharingShortcutStatus(file) === 'new'; +}; +/** + * Returns whether the sharing shortcut is new + * + * @deprecated Prefer to use isSharingShortcutNew. + * @param {object} file - io.cozy.files document + * + * @returns {boolean} + */ + + +exports.isSharingShortcutNew = isSharingShortcutNew; + +var isSharingShorcutNew = function isSharingShorcutNew(file) { + _logger.default.warn('Deprecation: `isSharingShorcutNew` is deprecated, please use `isSharingShortcutNew` instead'); + + return isSharingShortcutNew(file); +}; +/** + * Save the file with the given qualification + * + * @param {CozyClient} client - The CozyClient instance + * @param {import("../types").IOCozyFile} file - The file to qualify + * @param {object} qualification - The file qualification + * @returns {Promise<import("../types").IOCozyFile>} The saved file + */ + + +exports.isSharingShorcutNew = isSharingShorcutNew; + +var saveFileQualification = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file, qualification) { + var qualifiedFile; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + qualifiedFile = (0, _qualification.setQualification)(file, qualification); + return _context.abrupt("return", client.collection(_const.DOCTYPE_FILES).updateMetadataAttribute(file._id, qualifiedFile.metadata)); + + case 2: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function saveFileQualification(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Helper to query files based on qualification rules + * + * @param {object} client - The CozyClient instance + * @param {object} docRules - the rules containing the searched qualification and the count + * @returns {Promise<import("../types").QueryResult>} The files found by the rules + */ + + +exports.saveFileQualification = saveFileQualification; + +var fetchFilesByQualificationRules = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, docRules) { + var rules, count, query, result; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + rules = docRules.rules, count = docRules.count; + query = (0, _dsl.Q)(_const.DOCTYPE_FILES).where(_objectSpread({}, rules)).partialIndex({ + trashed: false + }).indexFields(['cozyMetadata.updatedAt', 'metadata.qualification']).sortBy([{ + 'cozyMetadata.updatedAt': 'desc' + }]).limitBy(count ? count : 1); + _context2.next = 4; + return client.query(query); + + case 4: + result = _context2.sent; + return _context2.abrupt("return", result); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function fetchFilesByQualificationRules(_x4, _x5) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Whether the file's metadata attribute exists + * + * @param {object} params - Param + * @param {import("../types").IOCozyFile} params.file - An io.cozy.files document + * @param {string} params.attribute - Metadata attribute to check + * @returns {boolean} + */ + + +exports.fetchFilesByQualificationRules = fetchFilesByQualificationRules; + +var hasMetadataAttribute = function hasMetadataAttribute(_ref3) { + var file = _ref3.file, + attribute = _ref3.attribute; + return (0, _has.default)(file, "metadata.".concat(attribute)); +}; +/** + * async getFullpath - Gets a file's path + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} dirId - The id of the parent directory + * @param {string} name - The file's name + * @returns {Promise<string>} The full path of the file in the cozy + **/ + + +exports.hasMetadataAttribute = hasMetadataAttribute; + +var getFullpath = /*#__PURE__*/function () { + var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client, dirId, name) { + var _yield$client$query, parentDir, parentDirectoryPath; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (dirId) { + _context3.next = 2; + break; + } + + throw new Error('You must provide a dirId'); + + case 2: + _context3.next = 4; + return client.query((0, _dsl.Q)(_const.DOCTYPE_FILES).getById(dirId)); + + case 4: + _yield$client$query = _context3.sent; + parentDir = _yield$client$query.data; + parentDirectoryPath = (0, _trimEnd.default)(parentDir.path, '/'); + return _context3.abrupt("return", "".concat(parentDirectoryPath, "/").concat(name)); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function getFullpath(_x6, _x7, _x8) { + return _ref4.apply(this, arguments); + }; +}(); +/** + * Move file to destination. + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} fileId - The file's id (required) + * @param {object} destination - The destination object containing: + * @param {string} destination.folderId - The destination folder's id (required) + * @param {string} destination.path - The file's path after the move (optional, used to optimize performance in case of conflict) + * @param {boolean} force - Whether we should overwrite, i.e. put to trash, the destination in case of conflict (defaults to false). + * @returns {Promise} - A promise that returns the move action response and the deleted file id (if any) if resolved or an Error if rejected + * + */ + + +exports.getFullpath = getFullpath; + +var move = /*#__PURE__*/function () { + var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(client, fileId, destination) { + var force, + folderId, + path, + resp, + destinationPath, + _yield$client$query2, + movedFile, + filename, + conflictResp, + _resp, + _args4 = arguments; + + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + force = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : false; + folderId = destination.folderId, path = destination.path; + _context4.prev = 2; + _context4.next = 5; + return client.collection(_const.DOCTYPE_FILES).updateFileMetadata(fileId, { + dir_id: folderId + }); + + case 5: + resp = _context4.sent; + return _context4.abrupt("return", { + moved: resp.data, + deleted: null + }); + + case 9: + _context4.prev = 9; + _context4.t0 = _context4["catch"](2); + + if (!(_context4.t0.status === 409 && force)) { + _context4.next = 35; + break; + } + + if (!path) { + _context4.next = 16; + break; + } + + destinationPath = path; + _context4.next = 24; + break; + + case 16: + _context4.next = 18; + return client.query((0, _dsl.Q)(_const.DOCTYPE_FILES).getById(fileId)); + + case 18: + _yield$client$query2 = _context4.sent; + movedFile = _yield$client$query2.data; + filename = movedFile.name; + _context4.next = 23; + return getFullpath(client, folderId, filename); + + case 23: + destinationPath = _context4.sent; + + case 24: + _context4.next = 26; + return client.collection(_const.DOCTYPE_FILES).statByPath(destinationPath); + + case 26: + conflictResp = _context4.sent; + _context4.next = 29; + return client.collection(_const.DOCTYPE_FILES).destroy(conflictResp.data); + + case 29: + _context4.next = 31; + return client.collection(_const.DOCTYPE_FILES).updateFileMetadata(fileId, { + dir_id: folderId + }); + + case 31: + _resp = _context4.sent; + return _context4.abrupt("return", { + moved: _resp.data, + deleted: conflictResp.data.id + }); + + case 35: + throw _context4.t0; + + case 36: + case "end": + return _context4.stop(); + } + } + }, _callee4, null, [[2, 9]]); + })); + + return function move(_x9, _x10, _x11) { + return _ref5.apply(this, arguments); + }; +}(); +/** + * + * Method to upload a file even if a file with the same name already exists. + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} dirPath - Fullpath of directory to upload to ex: path/to/ + * @param {object} file - HTML Object file + * @param {object} metadata - An object containing the wanted metadata to attach + * @returns {Promise<import("../types").IOCozyFile>} The overrided file + */ + + +exports.move = move; + +var overrideFileForPath = /*#__PURE__*/function () { + var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(client, dirPath, file, metadata) { + var path, filesCollection, existingFile, _existingFile$data, fileId, dirId, resp, _dirId, createdFile; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + path = dirPath; + if (!path.endsWith('/')) path = path + '/'; + filesCollection = client.collection(_const.DOCTYPE_FILES); + _context5.prev = 3; + _context5.next = 6; + return filesCollection.statByPath(path + file.name); + + case 6: + existingFile = _context5.sent; + _existingFile$data = existingFile.data, fileId = _existingFile$data.id, dirId = _existingFile$data.dir_id; + _context5.next = 10; + return filesCollection.updateFile(file, { + dirId: dirId, + fileId: fileId, + metadata: metadata + }); + + case 10: + resp = _context5.sent; + return _context5.abrupt("return", resp); + + case 14: + _context5.prev = 14; + _context5.t0 = _context5["catch"](3); + + if (!/Not Found/.test(_context5.t0)) { + _context5.next = 24; + break; + } + + _context5.next = 19; + return filesCollection.ensureDirectoryExists(path); + + case 19: + _dirId = _context5.sent; + _context5.next = 22; + return filesCollection.createFile(file, { + dirId: _dirId, + metadata: metadata + }); + + case 22: + createdFile = _context5.sent; + return _context5.abrupt("return", createdFile); + + case 24: + throw _context5.t0; + + case 25: + case "end": + return _context5.stop(); + } + } + }, _callee5, null, [[3, 14]]); + })); + + return function overrideFileForPath(_x12, _x13, _x14, _x15) { + return _ref6.apply(this, arguments); + }; +}(); +/** + * Method to generate a new filename if there is a conflict + * + * @param {string} filenameWithoutExtension - A filename without the extension + * @param {RegExp} [originalNameFormatRegex] - A regex to check if the name is still in his original format + * @returns {string} A filename with the right suffix + */ + + +exports.overrideFileForPath = overrideFileForPath; + +var generateNewFileNameOnConflict = function generateNewFileNameOnConflict(filenameWithoutExtension, originalNameFormatRegex) { + var isOriginalNameFormat = false; + + if (originalNameFormatRegex && originalNameFormatRegex.test(filenameWithoutExtension)) { + isOriginalNameFormat = true; + } //Check if the string ends by _1 + + + var regex = new RegExp('(_)([0-9]+)$'); + var matches = filenameWithoutExtension.match(regex); + var shouldIncrement = matches && !isOriginalNameFormat; + + if (shouldIncrement) { + var versionNumber = parseInt(matches[2]); //increment versionNumber + + versionNumber++; + var newFilenameWithoutExtension = filenameWithoutExtension.replace(new RegExp('(_)([0-9]+)$'), "_".concat(versionNumber)); + return newFilenameWithoutExtension; + } else { + return "".concat(filenameWithoutExtension, "_1"); + } +}; +/** + * Generate a file name for a revision + * + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @param {object} revision - The revision containing the updated_at + * @param {function} f - A function taking a a date and a format as arguments to generate the name. + */ + + +exports.generateNewFileNameOnConflict = generateNewFileNameOnConflict; + +var generateFileNameForRevision = function generateFileNameForRevision(file, revision, f) { + var _splitFilename = splitFilename(file), + filename = _splitFilename.filename, + extension = _splitFilename.extension; + + return "".concat(filename, "_").concat(f(revision.updated_at, 'DD MMMM - HH[h]mm')).concat(extension); +}; +/** + * @typedef FileUploadOptions + * @property {string} [name] - The file name to upload + * @property {string} [dirId] - The dirId to upload the file to + * @property {object} [metadata] - An object containing the metadata to attach + * @property {string} [contentType] - The file Content-Type + * @property {string} [conflictStrategy] - Erase / rename + */ + +/** + * The goal of this method is to upload a file based on a conflict strategy. + * Be careful: We need to check if the file exists by doing a statByPath query + * before trying to upload the file since if we post and the stack return a + * 409 conflict, we will get a SPDY_ERROR_PROTOCOL on Chrome. This is the only + * viable workaround + * If there is no conflict, then we upload the file. + * If there is a conflict, then we apply the conflict strategy : `erase` or `rename`: + * - The `erase` strategy means an upload with a new version + * - The `rename` strategy means a new upload with a new name + * + * @param {CozyClient} client - The CozyClient instance + * @param {string|ArrayBuffer} file - Can be the file path (file://) or the binary itself + * @param {FileUploadOptions} options - The upload options + */ + + +exports.generateFileNameForRevision = generateFileNameForRevision; + +var uploadFileWithConflictStrategy = /*#__PURE__*/function () { + var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(client, file, options) { + var name, dirId, conflictStrategy, path, existingFile, fileId, resp, _splitFilename2, filename, extension, newFileName; + + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + name = options.name, dirId = options.dirId, conflictStrategy = options.conflictStrategy; + _context6.prev = 1; + _context6.next = 4; + return getFullpath(client, dirId, name); + + case 4: + path = _context6.sent; + _context6.next = 7; + return client.collection(_const.DOCTYPE_FILES).statByPath(path); + + case 7: + existingFile = _context6.sent; + fileId = existingFile.data.id; + + if (!(conflictStrategy === 'erase')) { + _context6.next = 16; + break; + } + + _context6.next = 12; + return client.collection(_const.DOCTYPE_FILES).updateFile(file, _objectSpread(_objectSpread({}, options), {}, { + fileId: fileId + })); + + case 12: + resp = _context6.sent; + return _context6.abrupt("return", resp); + + case 16: + // @ts-ignore + _splitFilename2 = splitFilename({ + name: name, + type: 'file' + }), filename = _splitFilename2.filename, extension = _splitFilename2.extension; + newFileName = generateNewFileNameOnConflict(filename) + extension; //recall itself with the newFilename. + + return _context6.abrupt("return", uploadFileWithConflictStrategy(client, file, _objectSpread(_objectSpread({}, options), {}, { + name: newFileName + }))); + + case 19: + _context6.next = 26; + break; + + case 21: + _context6.prev = 21; + _context6.t0 = _context6["catch"](1); + + if (!/Not Found/.test(_context6.t0.message)) { + _context6.next = 25; + break; + } + + return _context6.abrupt("return", client.collection(_const.DOCTYPE_FILES).createFile(file, options)); + + case 25: + throw _context6.t0; + + case 26: + case "end": + return _context6.stop(); + } + } + }, _callee6, null, [[1, 21]]); + })); + + return function uploadFileWithConflictStrategy(_x16, _x17, _x18) { + return _ref7.apply(this, arguments); + }; +}(); +/** + * Read a file on a mobile + * + * @param {string} fileURL - The local file path (file://) + */ + + +exports.uploadFileWithConflictStrategy = uploadFileWithConflictStrategy; + +var readMobileFile = /*#__PURE__*/function () { + var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(fileURL) { + var p; + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + /** Cordova plugin doesn't support promise since they are supporting Android 4.X.X + * so we have to create manually a promise to be able to write beautiful code ;) + */ + p = new Promise(function (resolve, reject) { + var onResolvedLocalFS = /*#__PURE__*/function () { + var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(fileEntry) { + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + fileEntry.file( /*#__PURE__*/function () { + var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(file) { + var reader; + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + reader = new FileReader(); + reader.onloadend = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() { + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + resolve(reader.result); + + case 1: + case "end": + return _context7.stop(); + } + } + }, _callee7); + })); // Read the file as an ArrayBuffer + + reader.readAsArrayBuffer(file); + + case 3: + case "end": + return _context8.stop(); + } + } + }, _callee8); + })); + + return function (_x21) { + return _ref10.apply(this, arguments); + }; + }(), function (err) { + // Since this module is pretty recent, let's have this info in sentry if needed + console.error('error getting fileentry file!' + err); // eslint-disable-line no-console + + reject(err); + }); + + case 1: + case "end": + return _context9.stop(); + } + } + }, _callee9); + })); + + return function onResolvedLocalFS(_x20) { + return _ref9.apply(this, arguments); + }; + }(); + + var onError = function onError(error) { + reject(error); + }; + /** + * file:/// can not be converted to a fileEntry without the Cordova's File plugin. + * `resolveLocalFileSystemURL` is provided by this plugin and can resolve the native + * path to a fileEntry readable by a `FileReader` + * + * When we finished to read the fileEntry as buffer, we start the upload process + * + */ + // @ts-ignore + + + window.resolveLocalFileSystemURL(fileURL, onResolvedLocalFS, onError); + }); + return _context10.abrupt("return", p); + + case 2: + case "end": + return _context10.stop(); + } + } + }, _callee10); + })); + + return function readMobileFile(_x19) { + return _ref8.apply(this, arguments); + }; +}(); +/** + * Upload a file on a mobile + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} fileURL - The local file path (file://) + * @param {FileUploadOptions} options - The upload options + */ + + +exports.readMobileFile = readMobileFile; + +var doMobileUpload = /*#__PURE__*/function () { + var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(client, fileURL, options) { + var file; + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return readMobileFile(fileURL); + + case 2: + file = _context11.sent; + return _context11.abrupt("return", uploadFileWithConflictStrategy(client, file, options)); + + case 4: + case "end": + return _context11.stop(); + } + } + }, _callee11); + })); + + return function doMobileUpload(_x22, _x23, _x24) { + return _ref12.apply(this, arguments); + }; +}(); +/** + * @param {string} [mimeType=''] - Mime type of file + * @param {string} [fileName=''] - Name of file + * @returns {boolean} + */ + + +exports.doMobileUpload = doMobileUpload; + +var isPlainText = function isPlainText() { + var mimeType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var fileName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + return mimeType ? /^text\//.test(mimeType) : /\.(txt|md)$/.test(fileName); +}; +/** + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @returns {boolean} + */ + + +exports.isPlainText = isPlainText; + +var hasQualifications = function hasQualifications(file) { + return (0, _has.default)(file, 'metadata.qualification'); +}; +/** + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @returns {boolean} + */ + + +exports.hasQualifications = hasQualifications; + +var hasCertifications = function hasCertifications(file) { + return (0, _get.default)(file, 'metadata.carbonCopy', false) || (0, _get.default)(file, 'metadata.electronicSafe', false); +}; +/** + * @param {import("../types").IOCozyFile} file - io.cozy.files document + * @returns {boolean} + */ + + +exports.hasCertifications = hasCertifications; + +var isFromKonnector = function isFromKonnector(file) { + return (0, _has.default)(file, 'cozyMetadata.sourceAccount'); +}; +/** + * @param {CozyClient} client - Instance of CozyClient + * @param {string} fileId - Id of io.cozy.files document + * @returns {Promise<Blob>} + */ + + +exports.isFromKonnector = isFromKonnector; + +var fetchBlobFileById = /*#__PURE__*/function () { + var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(client, fileId) { + var fileColl, fileBin, fileBlob; + return _regenerator.default.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + fileColl = client.collection(_const.DOCTYPE_FILES); + _context12.next = 3; + return fileColl.fetchFileContentById(fileId); + + case 3: + fileBin = _context12.sent; + _context12.next = 6; + return fileBin.blob(); + + case 6: + fileBlob = _context12.sent; + return _context12.abrupt("return", fileBlob); + + case 8: + case "end": + return _context12.stop(); + } + } + }, _callee12); + })); + + return function fetchBlobFileById(_x25, _x26) { + return _ref13.apply(this, arguments); + }; +}(); + +exports.fetchBlobFileById = fetchBlobFileById; + +/***/ }), + +/***/ "0qSf": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("+Glb"); +module.exports = __webpack_require__("QtKs").f('asyncIterator'); + + +/***/ }), + +/***/ "0qf9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GRDF_YEAR_DOCTYPE = void 0; +var GRDF_YEAR_DOCTYPE = 'com.grandlyon.grdf.year'; +exports.GRDF_YEAR_DOCTYPE = GRDF_YEAR_DOCTYPE; + +/***/ }), + +/***/ "0uNo": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 21.1.3.25 String.prototype.trim() +__webpack_require__("V+ek")('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + + +/***/ }), + +/***/ "0vqW": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + + +/***/ }), + +/***/ "0x8W": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("Ky9W") +var buildFormatLocale = __webpack_require__("uxkL") + +/** + * @category Locales + * @summary Polish locale. + * @author Mateusz Derks [@ertrzyiks]{@link https://github.com/ertrzyiks} + * @author Just RAG [@justrag]{@link https://github.com/justrag} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "0xh1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDispatchHook", function() { return createDispatchHook; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useDispatch", function() { return useDispatch; }); +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("umgW"); +/* harmony import */ var _useStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pWWv"); + + +/** + * Hook factory, which creates a `useDispatch` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. + * @returns {Function} A `useDispatch` hook bound to the specified context. + */ + +function createDispatchHook(context) { + if (context === void 0) { + context = _components_Context__WEBPACK_IMPORTED_MODULE_0__["ReactReduxContext"]; + } + + var useStore = context === _components_Context__WEBPACK_IMPORTED_MODULE_0__["ReactReduxContext"] ? _useStore__WEBPACK_IMPORTED_MODULE_1__["useStore"] : Object(_useStore__WEBPACK_IMPORTED_MODULE_1__["createStoreHook"])(context); + return function useDispatch() { + var store = useStore(); + return store.dispatch; + }; +} +/** + * A hook to access the redux `dispatch` function. + * + * @returns {any|function} redux store's `dispatch` function + * + * @example + * + * import React, { useCallback } from 'react' + * import { useDispatch } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const dispatch = useDispatch() + * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) + * return ( + * <div> + * <span>{value}</span> + * <button onClick={increaseCounter}>Increase counter</button> + * </div> + * ) + * } + */ + +var useDispatch = /*#__PURE__*/createDispatchHook(); + +/***/ }), + +/***/ "1/nJ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ll/m"); +/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("pY8S"); +/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("FDZL"); +/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("BXyO"); +/* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("agfW"); +/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("F0EY"); +/* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("kpAa"); +/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("pzK5"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("OY/u"); + + + + + + + + + + + + + + + +var variantComponent = { + standard: _Input__WEBPACK_IMPORTED_MODULE_7__["default"], + filled: _FilledInput__WEBPACK_IMPORTED_MODULE_8__["default"], + outlined: _OutlinedInput__WEBPACK_IMPORTED_MODULE_9__["default"] +}; +var styles = { + /* Styles applied to the root element. */ + root: {} +}; +/** + * The `TextField` is a convenience wrapper for the most common cases (80%). + * It cannot be all things to all people, otherwise the API would grow out of control. + * + * ## Advanced Configuration + * + * It's important to understand that the text field is a simple abstraction + * on top of the following components: + * + * - [FormControl](/api/form-control/) + * - [InputLabel](/api/input-label/) + * - [FilledInput](/api/filled-input/) + * - [OutlinedInput](/api/outlined-input/) + * - [Input](/api/input/) + * - [FormHelperText](/api/form-helper-text/) + * + * If you wish to alter the props applied to the `input` element, you can do so as follows: + * + * ```jsx + * const inputProps = { + * step: 300, + * }; + * + * return <TextField id="time" type="time" inputProps={inputProps} />; + * ``` + * + * For advanced cases, please look at the source of TextField by clicking on the + * "Edit this page" button above. Consider either: + * + * - using the upper case props for passing values directly to the components + * - using the underlying components directly as shown in the demos + */ + +var TextField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TextField(props, ref) { + var autoComplete = props.autoComplete, + _props$autoFocus = props.autoFocus, + autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus, + children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + defaultValue = props.defaultValue, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$error = props.error, + error = _props$error === void 0 ? false : _props$error, + FormHelperTextProps = props.FormHelperTextProps, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + helperText = props.helperText, + hiddenLabel = props.hiddenLabel, + id = props.id, + InputLabelProps = props.InputLabelProps, + inputProps = props.inputProps, + InputProps = props.InputProps, + inputRef = props.inputRef, + label = props.label, + _props$multiline = props.multiline, + multiline = _props$multiline === void 0 ? false : _props$multiline, + name = props.name, + onBlur = props.onBlur, + onChange = props.onChange, + onFocus = props.onFocus, + placeholder = props.placeholder, + _props$required = props.required, + required = _props$required === void 0 ? false : _props$required, + rows = props.rows, + rowsMax = props.rowsMax, + maxRows = props.maxRows, + minRows = props.minRows, + _props$select = props.select, + select = _props$select === void 0 ? false : _props$select, + SelectProps = props.SelectProps, + type = props.type, + value = props.value, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["autoComplete", "autoFocus", "children", "classes", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "hiddenLabel", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "rowsMax", "maxRows", "minRows", "select", "SelectProps", "type", "value", "variant"]); + + if (false) {} + + var InputMore = {}; + + if (variant === 'outlined') { + if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') { + InputMore.notched = InputLabelProps.shrink; + } + + if (label) { + var _InputLabelProps$requ; + + var displayRequired = (_InputLabelProps$requ = InputLabelProps === null || InputLabelProps === void 0 ? void 0 : InputLabelProps.required) !== null && _InputLabelProps$requ !== void 0 ? _InputLabelProps$requ : required; + InputMore.label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, label, displayRequired && "\xA0*"); + } + } + + if (select) { + // unset defaults from textbox inputs + if (!SelectProps || !SelectProps.native) { + InputMore.id = undefined; + } + + InputMore['aria-describedby'] = undefined; + } + + var helperTextId = helperText && id ? "".concat(id, "-helper-text") : undefined; + var inputLabelId = label && id ? "".concat(id, "-label") : undefined; + var InputComponent = variantComponent[variant]; + var InputElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + "aria-describedby": helperTextId, + autoComplete: autoComplete, + autoFocus: autoFocus, + defaultValue: defaultValue, + fullWidth: fullWidth, + multiline: multiline, + name: name, + rows: rows, + rowsMax: rowsMax, + maxRows: maxRows, + minRows: minRows, + type: type, + value: value, + id: id, + inputRef: inputRef, + onBlur: onBlur, + onChange: onChange, + onFocus: onFocus, + placeholder: placeholder, + inputProps: inputProps + }, InputMore, InputProps)); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FormControl__WEBPACK_IMPORTED_MODULE_11__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + disabled: disabled, + error: error, + fullWidth: fullWidth, + hiddenLabel: hiddenLabel, + ref: ref, + required: required, + color: color, + variant: variant + }, other), label && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_InputLabel__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + htmlFor: id, + id: inputLabelId + }, InputLabelProps), label), select ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Select__WEBPACK_IMPORTED_MODULE_13__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + "aria-describedby": helperTextId, + id: id, + labelId: inputLabelId, + value: value, + input: InputElement + }, SelectProps), children) : InputElement, helperText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FormHelperText__WEBPACK_IMPORTED_MODULE_12__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + id: helperTextId + }, FormHelperTextProps), helperText)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_14__["default"])(styles, { + name: 'MuiTextField' +})(TextField)); + +/***/ }), + +/***/ "104p": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return jssPreset; }); +/* harmony import */ var jss_plugin_rule_value_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dLbP"); +/* harmony import */ var jss_plugin_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/mpp"); +/* harmony import */ var jss_plugin_nested__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("IMM0"); +/* harmony import */ var jss_plugin_camel_case__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("5tH4"); +/* harmony import */ var jss_plugin_default_unit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("JmEN"); +/* harmony import */ var jss_plugin_vendor_prefixer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Np9S"); +/* harmony import */ var jss_plugin_props_sort__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("CHEd"); + + + + + + + // Subset of jss-preset-default with only the plugins the Material-UI components are using. + +function jssPreset() { + return { + plugins: [Object(jss_plugin_rule_value_function__WEBPACK_IMPORTED_MODULE_0__["default"])(), Object(jss_plugin_global__WEBPACK_IMPORTED_MODULE_1__["default"])(), Object(jss_plugin_nested__WEBPACK_IMPORTED_MODULE_2__["default"])(), Object(jss_plugin_camel_case__WEBPACK_IMPORTED_MODULE_3__["default"])(), Object(jss_plugin_default_unit__WEBPACK_IMPORTED_MODULE_4__["default"])(), // Disable the vendor prefixer server-side, it does nothing. + // This way, we can get a performance boost. + // In the documentation, we are using `autoprefixer` to solve this problem. + typeof window === 'undefined' ? null : Object(jss_plugin_vendor_prefixer__WEBPACK_IMPORTED_MODULE_5__["default"])(), Object(jss_plugin_props_sort__WEBPACK_IMPORTED_MODULE_6__["default"])()] + }; +} + +/***/ }), + +/***/ "13ub": +/***/ (function(module, exports, __webpack_require__) { + +var toString = __webpack_require__("GCWF"), + upperFirst = __webpack_require__("Dg7S"); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; + + +/***/ }), + +/***/ "14g+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Integrations", function() { return INTEGRATIONS; }); +/* harmony import */ var _exports_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("kchN"); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pz9k"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["FunctionToString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hub", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Hub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["InboundFilters"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["SDK_VERSION"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["Scope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["addBreadcrumb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["addGlobalEventProcessor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureEvent", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureException", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureMessage", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["captureMessage"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "configureScope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["configureScope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransport", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["createTransport"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCurrentHub", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["getHubFromCarrier"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeMain", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["makeMain"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtra", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setExtra"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtras", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setExtras"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTag", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setTag"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTags", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setTags"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUser", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["setUser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startTransaction", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["startTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withScope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_1__["withScope"]; }); + +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("uDQB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WINDOW", function() { return _helpers_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"]; }); + +/* harmony import */ var _integrations_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("4fos"); +/* harmony import */ var _client_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Tyf5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserClient", function() { return _client_js__WEBPACK_IMPORTED_MODULE_4__["BrowserClient"]; }); + +/* harmony import */ var _transports_fetch_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("oldg"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeFetchTransport", function() { return _transports_fetch_js__WEBPACK_IMPORTED_MODULE_5__["makeFetchTransport"]; }); + +/* harmony import */ var _transports_xhr_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("m8uA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeXHRTransport", function() { return _transports_xhr_js__WEBPACK_IMPORTED_MODULE_6__["makeXHRTransport"]; }); + +/* harmony import */ var _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("wR54"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chromeStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["chromeStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackLineParsers", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["defaultStackLineParsers"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["defaultStackParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geckoStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["geckoStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera10StackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["opera10StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera11StackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["opera11StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "winjsStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_7__["winjsStackLineParser"]; }); + +/* harmony import */ var _sdk_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("sfhW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "close", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["close"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["defaultIntegrations"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["flush"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLoad", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["forceLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "init", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["init"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastEventId", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["lastEventId"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["onLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showReportDialog", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["showReportDialog"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_8__["wrap"]; }); + +/* harmony import */ var _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("kNwn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function() { return _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_9__["GlobalHandlers"]; }); + +/* harmony import */ var _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("r1R0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TryCatch", function() { return _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_10__["TryCatch"]; }); + +/* harmony import */ var _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("Strw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_11__["Breadcrumbs"]; }); + +/* harmony import */ var _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("MGrj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LinkedErrors", function() { return _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_12__["LinkedErrors"]; }); + +/* harmony import */ var _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("QiYU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HttpContext", function() { return _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_13__["HttpContext"]; }); + +/* harmony import */ var _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("Itbq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dedupe", function() { return _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_14__["Dedupe"]; }); + + + + + + + + + + + + + + + + + + + +let windowIntegrations = {}; + +// This block is needed to add compatibility with the integrations packages when used with a CDN +if (_helpers_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].Sentry && _helpers_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].Sentry.Integrations) { + windowIntegrations = _helpers_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].Sentry.Integrations; +} + +const INTEGRATIONS = { + ...windowIntegrations, + ..._sentry_core__WEBPACK_IMPORTED_MODULE_1__["Integrations"], + ..._integrations_index_js__WEBPACK_IMPORTED_MODULE_3__, +}; + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "19et": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; }); +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("j9Ms"); +/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("muMs"); + + +function _possibleConstructorReturn(self, call) { + if (call && (Object(_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + + return Object(_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(self); +} + +/***/ }), + +/***/ "1AJk": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("miZn"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9sWd"); +/* harmony import */ var _RadioGroupContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("pBCG"); +/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("VPKY"); + + + + + + + + + + +var RadioGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function RadioGroup(props, ref) { + var actions = props.actions, + children = props.children, + nameProp = props.name, + valueProp = props.value, + onChange = props.onChange, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["actions", "children", "name", "value", "onChange"]); + + var rootRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_7__["default"])({ + controlled: valueProp, + default: props.defaultValue, + name: 'RadioGroup' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_useControlled, 2), + value = _useControlled2[0], + setValue = _useControlled2[1]; + + react__WEBPACK_IMPORTED_MODULE_3__["useImperativeHandle"](actions, function () { + return { + focus: function focus() { + var input = rootRef.current.querySelector('input:not(:disabled):checked'); + + if (!input) { + input = rootRef.current.querySelector('input:not(:disabled)'); + } + + if (input) { + input.focus(); + } + } + }; + }, []); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__["default"])(ref, rootRef); + + var handleChange = function handleChange(event) { + setValue(event.target.value); + + if (onChange) { + onChange(event, event.target.value); + } + }; + + var name = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_9__["default"])(nameProp); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_RadioGroupContext__WEBPACK_IMPORTED_MODULE_8__["default"].Provider, { + value: { + name: name, + onChange: handleChange, + value: value + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_FormGroup__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + role: "radiogroup", + ref: handleRef + }, other), children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (RadioGroup); + +/***/ }), + +/***/ "1EDv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} + +function _extends() { + _extends = Object.assign ? Object.assign.bind() : function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + return _extends.apply(this, arguments); +} + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + + _setPrototypeOf(subClass, superClass); +} + +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct.bind(); + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + + return _construct.apply(null, arguments); +} + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return _construct(Class, arguments, _getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return _setPrototypeOf(Wrapper, Class); + }; + + return _wrapNativeSuper(Class); +} + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +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); +} + +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; +} + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + if (it) return (it = it.call(o)).next.bind(it); + + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + return function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }; + } + + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +// these aren't really private, but nor are they really useful to document + +/** + * @private + */ +var LuxonError = /*#__PURE__*/function (_Error) { + _inheritsLoose(LuxonError, _Error); + + function LuxonError() { + return _Error.apply(this, arguments) || this; + } + + return LuxonError; +}( /*#__PURE__*/_wrapNativeSuper(Error)); +/** + * @private + */ + + +var InvalidDateTimeError = /*#__PURE__*/function (_LuxonError) { + _inheritsLoose(InvalidDateTimeError, _LuxonError); + + function InvalidDateTimeError(reason) { + return _LuxonError.call(this, "Invalid DateTime: " + reason.toMessage()) || this; + } + + return InvalidDateTimeError; +}(LuxonError); +/** + * @private + */ + +var InvalidIntervalError = /*#__PURE__*/function (_LuxonError2) { + _inheritsLoose(InvalidIntervalError, _LuxonError2); + + function InvalidIntervalError(reason) { + return _LuxonError2.call(this, "Invalid Interval: " + reason.toMessage()) || this; + } + + return InvalidIntervalError; +}(LuxonError); +/** + * @private + */ + +var InvalidDurationError = /*#__PURE__*/function (_LuxonError3) { + _inheritsLoose(InvalidDurationError, _LuxonError3); + + function InvalidDurationError(reason) { + return _LuxonError3.call(this, "Invalid Duration: " + reason.toMessage()) || this; + } + + return InvalidDurationError; +}(LuxonError); +/** + * @private + */ + +var ConflictingSpecificationError = /*#__PURE__*/function (_LuxonError4) { + _inheritsLoose(ConflictingSpecificationError, _LuxonError4); + + function ConflictingSpecificationError() { + return _LuxonError4.apply(this, arguments) || this; + } + + return ConflictingSpecificationError; +}(LuxonError); +/** + * @private + */ + +var InvalidUnitError = /*#__PURE__*/function (_LuxonError5) { + _inheritsLoose(InvalidUnitError, _LuxonError5); + + function InvalidUnitError(unit) { + return _LuxonError5.call(this, "Invalid unit " + unit) || this; + } + + return InvalidUnitError; +}(LuxonError); +/** + * @private + */ + +var InvalidArgumentError = /*#__PURE__*/function (_LuxonError6) { + _inheritsLoose(InvalidArgumentError, _LuxonError6); + + function InvalidArgumentError() { + return _LuxonError6.apply(this, arguments) || this; + } + + return InvalidArgumentError; +}(LuxonError); +/** + * @private + */ + +var ZoneIsAbstractError = /*#__PURE__*/function (_LuxonError7) { + _inheritsLoose(ZoneIsAbstractError, _LuxonError7); + + function ZoneIsAbstractError() { + return _LuxonError7.call(this, "Zone is an abstract class") || this; + } + + return ZoneIsAbstractError; +}(LuxonError); + +/** + * @private + */ +var n = "numeric", + s = "short", + l = "long"; +var DATE_SHORT = { + year: n, + month: n, + day: n +}; +var DATE_MED = { + year: n, + month: s, + day: n +}; +var DATE_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s +}; +var DATE_FULL = { + year: n, + month: l, + day: n +}; +var DATE_HUGE = { + year: n, + month: l, + day: n, + weekday: l +}; +var TIME_SIMPLE = { + hour: n, + minute: n +}; +var TIME_WITH_SECONDS = { + hour: n, + minute: n, + second: n +}; +var TIME_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: s +}; +var TIME_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: l +}; +var TIME_24_SIMPLE = { + hour: n, + minute: n, + hourCycle: "h23" +}; +var TIME_24_WITH_SECONDS = { + hour: n, + minute: n, + second: n, + hourCycle: "h23" +}; +var TIME_24_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: s +}; +var TIME_24_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: l +}; +var DATETIME_SHORT = { + year: n, + month: n, + day: n, + hour: n, + minute: n +}; +var DATETIME_SHORT_WITH_SECONDS = { + year: n, + month: n, + day: n, + hour: n, + minute: n, + second: n +}; +var DATETIME_MED = { + year: n, + month: s, + day: n, + hour: n, + minute: n +}; +var DATETIME_MED_WITH_SECONDS = { + year: n, + month: s, + day: n, + hour: n, + minute: n, + second: n +}; +var DATETIME_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s, + hour: n, + minute: n +}; +var DATETIME_FULL = { + year: n, + month: l, + day: n, + hour: n, + minute: n, + timeZoneName: s +}; +var DATETIME_FULL_WITH_SECONDS = { + year: n, + month: l, + day: n, + hour: n, + minute: n, + second: n, + timeZoneName: s +}; +var DATETIME_HUGE = { + year: n, + month: l, + day: n, + weekday: l, + hour: n, + minute: n, + timeZoneName: l +}; +var DATETIME_HUGE_WITH_SECONDS = { + year: n, + month: l, + day: n, + weekday: l, + hour: n, + minute: n, + second: n, + timeZoneName: l +}; + +/** + * @private + */ +// TYPES + +function isUndefined(o) { + return typeof o === "undefined"; +} +function isNumber(o) { + return typeof o === "number"; +} +function isInteger(o) { + return typeof o === "number" && o % 1 === 0; +} +function isString(o) { + return typeof o === "string"; +} +function isDate(o) { + return Object.prototype.toString.call(o) === "[object Date]"; +} // CAPABILITIES + +function hasRelative() { + try { + return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; + } catch (e) { + return false; + } +} // OBJECTS AND ARRAYS + +function maybeArray(thing) { + return Array.isArray(thing) ? thing : [thing]; +} +function bestBy(arr, by, compare) { + if (arr.length === 0) { + return undefined; + } + + return arr.reduce(function (best, next) { + var pair = [by(next), next]; + + if (!best) { + return pair; + } else if (compare(best[0], pair[0]) === best[0]) { + return best; + } else { + return pair; + } + }, null)[1]; +} +function pick(obj, keys) { + return keys.reduce(function (a, k) { + a[k] = obj[k]; + return a; + }, {}); +} +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} // NUMBERS AND STRINGS + +function integerBetween(thing, bottom, top) { + return isInteger(thing) && thing >= bottom && thing <= top; +} // x % n but takes the sign of n instead of x + +function floorMod(x, n) { + return x - n * Math.floor(x / n); +} +function padStart(input, n) { + if (n === void 0) { + n = 2; + } + + var isNeg = input < 0; + var padded; + + if (isNeg) { + padded = "-" + ("" + -input).padStart(n, "0"); + } else { + padded = ("" + input).padStart(n, "0"); + } + + return padded; +} +function parseInteger(string) { + if (isUndefined(string) || string === null || string === "") { + return undefined; + } else { + return parseInt(string, 10); + } +} +function parseFloating(string) { + if (isUndefined(string) || string === null || string === "") { + return undefined; + } else { + return parseFloat(string); + } +} +function parseMillis(fraction) { + // Return undefined (instead of 0) in these cases, where fraction is not set + if (isUndefined(fraction) || fraction === null || fraction === "") { + return undefined; + } else { + var f = parseFloat("0." + fraction) * 1000; + return Math.floor(f); + } +} +function roundTo(number, digits, towardZero) { + if (towardZero === void 0) { + towardZero = false; + } + + var factor = Math.pow(10, digits), + rounder = towardZero ? Math.trunc : Math.round; + return rounder(number * factor) / factor; +} // DATE BASICS + +function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} +function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; +} +function daysInMonth(year, month) { + var modMonth = floorMod(month - 1, 12) + 1, + modYear = year + (month - modMonth) / 12; + + if (modMonth === 2) { + return isLeapYear(modYear) ? 29 : 28; + } else { + return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; + } +} // covert a calendar object to a local timestamp (epoch, but with the offset baked in) + +function objToLocalTS(obj) { + var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that + + if (obj.year < 100 && obj.year >= 0) { + d = new Date(d); + d.setUTCFullYear(d.getUTCFullYear() - 1900); + } + + return +d; +} +function weeksInWeekYear(weekYear) { + var p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, + last = weekYear - 1, + p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; + return p1 === 4 || p2 === 3 ? 53 : 52; +} +function untruncateYear(year) { + if (year > 99) { + return year; + } else return year > 60 ? 1900 + year : 2000 + year; +} // PARSING + +function parseZoneInfo(ts, offsetFormat, locale, timeZone) { + if (timeZone === void 0) { + timeZone = null; + } + + var date = new Date(ts), + intlOpts = { + hourCycle: "h23", + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }; + + if (timeZone) { + intlOpts.timeZone = timeZone; + } + + var modified = _extends({ + timeZoneName: offsetFormat + }, intlOpts); + + var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function (m) { + return m.type.toLowerCase() === "timezonename"; + }); + return parsed ? parsed.value : null; +} // signedOffset('-5', '30') -> -330 + +function signedOffset(offHourStr, offMinuteStr) { + var offHour = parseInt(offHourStr, 10); // don't || this because we want to preserve -0 + + if (Number.isNaN(offHour)) { + offHour = 0; + } + + var offMin = parseInt(offMinuteStr, 10) || 0, + offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; + return offHour * 60 + offMinSigned; +} // COERCION + +function asNumber(value) { + var numericValue = Number(value); + if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError("Invalid unit value " + value); + return numericValue; +} +function normalizeObject(obj, normalizer) { + var normalized = {}; + + for (var u in obj) { + if (hasOwnProperty(obj, u)) { + var v = obj[u]; + if (v === undefined || v === null) continue; + normalized[normalizer(u)] = asNumber(v); + } + } + + return normalized; +} +function formatOffset(offset, format) { + var hours = Math.trunc(Math.abs(offset / 60)), + minutes = Math.trunc(Math.abs(offset % 60)), + sign = offset >= 0 ? "+" : "-"; + + switch (format) { + case "short": + return "" + sign + padStart(hours, 2) + ":" + padStart(minutes, 2); + + case "narrow": + return "" + sign + hours + (minutes > 0 ? ":" + minutes : ""); + + case "techie": + return "" + sign + padStart(hours, 2) + padStart(minutes, 2); + + default: + throw new RangeError("Value format " + format + " is out of range for property format"); + } +} +function timeObject(obj) { + return pick(obj, ["hour", "minute", "second", "millisecond"]); +} +var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; + +/** + * @private + */ + + +var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; +var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; +function months(length) { + switch (length) { + case "narrow": + return [].concat(monthsNarrow); + + case "short": + return [].concat(monthsShort); + + case "long": + return [].concat(monthsLong); + + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; + + case "2-digit": + return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; + + default: + return null; + } +} +var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; +var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; +var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; +function weekdays(length) { + switch (length) { + case "narrow": + return [].concat(weekdaysNarrow); + + case "short": + return [].concat(weekdaysShort); + + case "long": + return [].concat(weekdaysLong); + + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7"]; + + default: + return null; + } +} +var meridiems = ["AM", "PM"]; +var erasLong = ["Before Christ", "Anno Domini"]; +var erasShort = ["BC", "AD"]; +var erasNarrow = ["B", "A"]; +function eras(length) { + switch (length) { + case "narrow": + return [].concat(erasNarrow); + + case "short": + return [].concat(erasShort); + + case "long": + return [].concat(erasLong); + + default: + return null; + } +} +function meridiemForDateTime(dt) { + return meridiems[dt.hour < 12 ? 0 : 1]; +} +function weekdayForDateTime(dt, length) { + return weekdays(length)[dt.weekday - 1]; +} +function monthForDateTime(dt, length) { + return months(length)[dt.month - 1]; +} +function eraForDateTime(dt, length) { + return eras(length)[dt.year < 0 ? 0 : 1]; +} +function formatRelativeTime(unit, count, numeric, narrow) { + if (numeric === void 0) { + numeric = "always"; + } + + if (narrow === void 0) { + narrow = false; + } + + var units = { + years: ["year", "yr."], + quarters: ["quarter", "qtr."], + months: ["month", "mo."], + weeks: ["week", "wk."], + days: ["day", "day", "days"], + hours: ["hour", "hr."], + minutes: ["minute", "min."], + seconds: ["second", "sec."] + }; + var lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; + + if (numeric === "auto" && lastable) { + var isDay = unit === "days"; + + switch (count) { + case 1: + return isDay ? "tomorrow" : "next " + units[unit][0]; + + case -1: + return isDay ? "yesterday" : "last " + units[unit][0]; + + case 0: + return isDay ? "today" : "this " + units[unit][0]; + + } + } + + var isInPast = Object.is(count, -0) || count < 0, + fmtValue = Math.abs(count), + singular = fmtValue === 1, + lilUnits = units[unit], + fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; + return isInPast ? fmtValue + " " + fmtUnit + " ago" : "in " + fmtValue + " " + fmtUnit; +} + +function stringifyTokens(splits, tokenToString) { + var s = ""; + + for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;) { + var token = _step.value; + + if (token.literal) { + s += token.val; + } else { + s += tokenToString(token.val); + } + } + + return s; +} + +var _macroTokenToFormatOpts = { + D: DATE_SHORT, + DD: DATE_MED, + DDD: DATE_FULL, + DDDD: DATE_HUGE, + t: TIME_SIMPLE, + tt: TIME_WITH_SECONDS, + ttt: TIME_WITH_SHORT_OFFSET, + tttt: TIME_WITH_LONG_OFFSET, + T: TIME_24_SIMPLE, + TT: TIME_24_WITH_SECONDS, + TTT: TIME_24_WITH_SHORT_OFFSET, + TTTT: TIME_24_WITH_LONG_OFFSET, + f: DATETIME_SHORT, + ff: DATETIME_MED, + fff: DATETIME_FULL, + ffff: DATETIME_HUGE, + F: DATETIME_SHORT_WITH_SECONDS, + FF: DATETIME_MED_WITH_SECONDS, + FFF: DATETIME_FULL_WITH_SECONDS, + FFFF: DATETIME_HUGE_WITH_SECONDS +}; +/** + * @private + */ + +var Formatter = /*#__PURE__*/function () { + Formatter.create = function create(locale, opts) { + if (opts === void 0) { + opts = {}; + } + + return new Formatter(locale, opts); + }; + + Formatter.parseFormat = function parseFormat(fmt) { + var current = null, + currentFull = "", + bracketed = false; + var splits = []; + + for (var i = 0; i < fmt.length; i++) { + var c = fmt.charAt(i); + + if (c === "'") { + if (currentFull.length > 0) { + splits.push({ + literal: bracketed, + val: currentFull + }); + } + + current = null; + currentFull = ""; + bracketed = !bracketed; + } else if (bracketed) { + currentFull += c; + } else if (c === current) { + currentFull += c; + } else { + if (currentFull.length > 0) { + splits.push({ + literal: false, + val: currentFull + }); + } + + currentFull = c; + current = c; + } + } + + if (currentFull.length > 0) { + splits.push({ + literal: bracketed, + val: currentFull + }); + } + + return splits; + }; + + Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) { + return _macroTokenToFormatOpts[token]; + }; + + function Formatter(locale, formatOpts) { + this.opts = formatOpts; + this.loc = locale; + this.systemLoc = null; + } + + var _proto = Formatter.prototype; + + _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) { + if (this.systemLoc === null) { + this.systemLoc = this.loc.redefaultToSystem(); + } + + var df = this.systemLoc.dtFormatter(dt, _extends({}, this.opts, opts)); + return df.format(); + }; + + _proto.formatDateTime = function formatDateTime(dt, opts) { + if (opts === void 0) { + opts = {}; + } + + var df = this.loc.dtFormatter(dt, _extends({}, this.opts, opts)); + return df.format(); + }; + + _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) { + if (opts === void 0) { + opts = {}; + } + + var df = this.loc.dtFormatter(dt, _extends({}, this.opts, opts)); + return df.formatToParts(); + }; + + _proto.resolvedOptions = function resolvedOptions(dt, opts) { + if (opts === void 0) { + opts = {}; + } + + var df = this.loc.dtFormatter(dt, _extends({}, this.opts, opts)); + return df.resolvedOptions(); + }; + + _proto.num = function num(n, p) { + if (p === void 0) { + p = 0; + } + + // we get some perf out of doing this here, annoyingly + if (this.opts.forceSimple) { + return padStart(n, p); + } + + var opts = _extends({}, this.opts); + + if (p > 0) { + opts.padTo = p; + } + + return this.loc.numberFormatter(opts).format(n); + }; + + _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) { + var _this = this; + + var knownEnglish = this.loc.listingMode() === "en", + useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", + string = function string(opts, extract) { + return _this.loc.extract(dt, opts, extract); + }, + formatOffset = function formatOffset(opts) { + if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { + return "Z"; + } + + return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; + }, + meridiem = function meridiem() { + return knownEnglish ? meridiemForDateTime(dt) : string({ + hour: "numeric", + hourCycle: "h12" + }, "dayperiod"); + }, + month = function month(length, standalone) { + return knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { + month: length + } : { + month: length, + day: "numeric" + }, "month"); + }, + weekday = function weekday(length, standalone) { + return knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { + weekday: length + } : { + weekday: length, + month: "long", + day: "numeric" + }, "weekday"); + }, + maybeMacro = function maybeMacro(token) { + var formatOpts = Formatter.macroTokenToFormatOpts(token); + + if (formatOpts) { + return _this.formatWithSystemDefault(dt, formatOpts); + } else { + return token; + } + }, + era = function era(length) { + return knownEnglish ? eraForDateTime(dt, length) : string({ + era: length + }, "era"); + }, + tokenToString = function tokenToString(token) { + // Where possible: http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles + switch (token) { + // ms + case "S": + return _this.num(dt.millisecond); + + case "u": // falls through + + case "SSS": + return _this.num(dt.millisecond, 3); + // seconds + + case "s": + return _this.num(dt.second); + + case "ss": + return _this.num(dt.second, 2); + // fractional seconds + + case "uu": + return _this.num(Math.floor(dt.millisecond / 10), 2); + + case "uuu": + return _this.num(Math.floor(dt.millisecond / 100)); + // minutes + + case "m": + return _this.num(dt.minute); + + case "mm": + return _this.num(dt.minute, 2); + // hours + + case "h": + return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); + + case "hh": + return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); + + case "H": + return _this.num(dt.hour); + + case "HH": + return _this.num(dt.hour, 2); + // offset + + case "Z": + // like +6 + return formatOffset({ + format: "narrow", + allowZ: _this.opts.allowZ + }); + + case "ZZ": + // like +06:00 + return formatOffset({ + format: "short", + allowZ: _this.opts.allowZ + }); + + case "ZZZ": + // like +0600 + return formatOffset({ + format: "techie", + allowZ: _this.opts.allowZ + }); + + case "ZZZZ": + // like EST + return dt.zone.offsetName(dt.ts, { + format: "short", + locale: _this.loc.locale + }); + + case "ZZZZZ": + // like Eastern Standard Time + return dt.zone.offsetName(dt.ts, { + format: "long", + locale: _this.loc.locale + }); + // zone + + case "z": + // like America/New_York + return dt.zoneName; + // meridiems + + case "a": + return meridiem(); + // dates + + case "d": + return useDateTimeFormatter ? string({ + day: "numeric" + }, "day") : _this.num(dt.day); + + case "dd": + return useDateTimeFormatter ? string({ + day: "2-digit" + }, "day") : _this.num(dt.day, 2); + // weekdays - standalone + + case "c": + // like 1 + return _this.num(dt.weekday); + + case "ccc": + // like 'Tues' + return weekday("short", true); + + case "cccc": + // like 'Tuesday' + return weekday("long", true); + + case "ccccc": + // like 'T' + return weekday("narrow", true); + // weekdays - format + + case "E": + // like 1 + return _this.num(dt.weekday); + + case "EEE": + // like 'Tues' + return weekday("short", false); + + case "EEEE": + // like 'Tuesday' + return weekday("long", false); + + case "EEEEE": + // like 'T' + return weekday("narrow", false); + // months - standalone + + case "L": + // like 1 + return useDateTimeFormatter ? string({ + month: "numeric", + day: "numeric" + }, "month") : _this.num(dt.month); + + case "LL": + // like 01, doesn't seem to work + return useDateTimeFormatter ? string({ + month: "2-digit", + day: "numeric" + }, "month") : _this.num(dt.month, 2); + + case "LLL": + // like Jan + return month("short", true); + + case "LLLL": + // like January + return month("long", true); + + case "LLLLL": + // like J + return month("narrow", true); + // months - format + + case "M": + // like 1 + return useDateTimeFormatter ? string({ + month: "numeric" + }, "month") : _this.num(dt.month); + + case "MM": + // like 01 + return useDateTimeFormatter ? string({ + month: "2-digit" + }, "month") : _this.num(dt.month, 2); + + case "MMM": + // like Jan + return month("short", false); + + case "MMMM": + // like January + return month("long", false); + + case "MMMMM": + // like J + return month("narrow", false); + // years + + case "y": + // like 2014 + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : _this.num(dt.year); + + case "yy": + // like 14 + return useDateTimeFormatter ? string({ + year: "2-digit" + }, "year") : _this.num(dt.year.toString().slice(-2), 2); + + case "yyyy": + // like 0012 + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : _this.num(dt.year, 4); + + case "yyyyyy": + // like 000012 + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : _this.num(dt.year, 6); + // eras + + case "G": + // like AD + return era("short"); + + case "GG": + // like Anno Domini + return era("long"); + + case "GGGGG": + return era("narrow"); + + case "kk": + return _this.num(dt.weekYear.toString().slice(-2), 2); + + case "kkkk": + return _this.num(dt.weekYear, 4); + + case "W": + return _this.num(dt.weekNumber); + + case "WW": + return _this.num(dt.weekNumber, 2); + + case "o": + return _this.num(dt.ordinal); + + case "ooo": + return _this.num(dt.ordinal, 3); + + case "q": + // like 1 + return _this.num(dt.quarter); + + case "qq": + // like 01 + return _this.num(dt.quarter, 2); + + case "X": + return _this.num(Math.floor(dt.ts / 1000)); + + case "x": + return _this.num(dt.ts); + + default: + return maybeMacro(token); + } + }; + + return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); + }; + + _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) { + var _this2 = this; + + var tokenToField = function tokenToField(token) { + switch (token[0]) { + case "S": + return "millisecond"; + + case "s": + return "second"; + + case "m": + return "minute"; + + case "h": + return "hour"; + + case "d": + return "day"; + + case "w": + return "week"; + + case "M": + return "month"; + + case "y": + return "year"; + + default: + return null; + } + }, + tokenToString = function tokenToString(lildur) { + return function (token) { + var mapped = tokenToField(token); + + if (mapped) { + return _this2.num(lildur.get(mapped), token.length); + } else { + return token; + } + }; + }, + tokens = Formatter.parseFormat(fmt), + realTokens = tokens.reduce(function (found, _ref) { + var literal = _ref.literal, + val = _ref.val; + return literal ? found : found.concat(val); + }, []), + collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function (t) { + return t; + })); + + return stringifyTokens(tokens, tokenToString(collapsed)); + }; + + return Formatter; +}(); + +var Invalid = /*#__PURE__*/function () { + function Invalid(reason, explanation) { + this.reason = reason; + this.explanation = explanation; + } + + var _proto = Invalid.prototype; + + _proto.toMessage = function toMessage() { + if (this.explanation) { + return this.reason + ": " + this.explanation; + } else { + return this.reason; + } + }; + + return Invalid; +}(); + +/** + * @interface + */ + +var Zone = /*#__PURE__*/function () { + function Zone() {} + + var _proto = Zone.prototype; + + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + _proto.offsetName = function offsetName(ts, opts) { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's value as a string + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + ; + + _proto.formatOffset = function formatOffset(ts, format) { + throw new ZoneIsAbstractError(); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @abstract + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + ; + + _proto.offset = function offset(ts) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is equal to another zone + * @abstract + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + ; + + _proto.equals = function equals(otherZone) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is valid. + * @abstract + * @type {boolean} + */ + ; + + _createClass(Zone, [{ + key: "type", + get: + /** + * The type of zone + * @abstract + * @type {string} + */ + function get() { + throw new ZoneIsAbstractError(); + } + /** + * The name of this zone. + * @abstract + * @type {string} + */ + + }, { + key: "name", + get: function get() { + throw new ZoneIsAbstractError(); + } + }, { + key: "ianaName", + get: function get() { + return this.name; + } + /** + * Returns whether the offset is known to be fixed for the whole year. + * @abstract + * @type {boolean} + */ + + }, { + key: "isUniversal", + get: function get() { + throw new ZoneIsAbstractError(); + } + }, { + key: "isValid", + get: function get() { + throw new ZoneIsAbstractError(); + } + }]); + + return Zone; +}(); + +var singleton$1 = null; +/** + * Represents the local zone for this JavaScript environment. + * @implements {Zone} + */ + +var SystemZone = /*#__PURE__*/function (_Zone) { + _inheritsLoose(SystemZone, _Zone); + + function SystemZone() { + return _Zone.apply(this, arguments) || this; + } + + var _proto = SystemZone.prototype; + + /** @override **/ + _proto.offsetName = function offsetName(ts, _ref) { + var format = _ref.format, + locale = _ref.locale; + return parseZoneInfo(ts, format, locale); + } + /** @override **/ + ; + + _proto.formatOffset = function formatOffset$1(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** @override **/ + ; + + _proto.offset = function offset(ts) { + return -new Date(ts).getTimezoneOffset(); + } + /** @override **/ + ; + + _proto.equals = function equals(otherZone) { + return otherZone.type === "system"; + } + /** @override **/ + ; + + _createClass(SystemZone, [{ + key: "type", + get: + /** @override **/ + function get() { + return "system"; + } + /** @override **/ + + }, { + key: "name", + get: function get() { + return new Intl.DateTimeFormat().resolvedOptions().timeZone; + } + /** @override **/ + + }, { + key: "isUniversal", + get: function get() { + return false; + } + }, { + key: "isValid", + get: function get() { + return true; + } + }], [{ + key: "instance", + get: + /** + * Get a singleton instance of the local zone + * @return {SystemZone} + */ + function get() { + if (singleton$1 === null) { + singleton$1 = new SystemZone(); + } + + return singleton$1; + } + }]); + + return SystemZone; +}(Zone); + +var dtfCache = {}; + +function makeDTF(zone) { + if (!dtfCache[zone]) { + dtfCache[zone] = new Intl.DateTimeFormat("en-US", { + hour12: false, + timeZone: zone, + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + era: "short" + }); + } + + return dtfCache[zone]; +} + +var typeToPos = { + year: 0, + month: 1, + day: 2, + era: 3, + hour: 4, + minute: 5, + second: 6 +}; + +function hackyOffset(dtf, date) { + var formatted = dtf.format(date).replace(/\u200E/g, ""), + parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), + fMonth = parsed[1], + fDay = parsed[2], + fYear = parsed[3], + fadOrBc = parsed[4], + fHour = parsed[5], + fMinute = parsed[6], + fSecond = parsed[7]; + return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond]; +} + +function partsOffset(dtf, date) { + var formatted = dtf.formatToParts(date); + var filled = []; + + for (var i = 0; i < formatted.length; i++) { + var _formatted$i = formatted[i], + type = _formatted$i.type, + value = _formatted$i.value; + var pos = typeToPos[type]; + + if (type === "era") { + filled[pos] = value; + } else if (!isUndefined(pos)) { + filled[pos] = parseInt(value, 10); + } + } + + return filled; +} + +var ianaZoneCache = {}; +/** + * A zone identified by an IANA identifier, like America/New_York + * @implements {Zone} + */ + +var IANAZone = /*#__PURE__*/function (_Zone) { + _inheritsLoose(IANAZone, _Zone); + + /** + * @param {string} name - Zone name + * @return {IANAZone} + */ + IANAZone.create = function create(name) { + if (!ianaZoneCache[name]) { + ianaZoneCache[name] = new IANAZone(name); + } + + return ianaZoneCache[name]; + } + /** + * Reset local caches. Should only be necessary in testing scenarios. + * @return {void} + */ + ; + + IANAZone.resetCache = function resetCache() { + ianaZoneCache = {}; + dtfCache = {}; + } + /** + * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. + * @param {string} s - The string to check validity on + * @example IANAZone.isValidSpecifier("America/New_York") //=> true + * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false + * @deprecated This method returns false for some valid IANA names. Use isValidZone instead. + * @return {boolean} + */ + ; + + IANAZone.isValidSpecifier = function isValidSpecifier(s) { + return this.isValidZone(s); + } + /** + * Returns whether the provided string identifies a real zone + * @param {string} zone - The string to check + * @example IANAZone.isValidZone("America/New_York") //=> true + * @example IANAZone.isValidZone("Fantasia/Castle") //=> false + * @example IANAZone.isValidZone("Sport~~blorp") //=> false + * @return {boolean} + */ + ; + + IANAZone.isValidZone = function isValidZone(zone) { + if (!zone) { + return false; + } + + try { + new Intl.DateTimeFormat("en-US", { + timeZone: zone + }).format(); + return true; + } catch (e) { + return false; + } + }; + + function IANAZone(name) { + var _this; + + _this = _Zone.call(this) || this; + /** @private **/ + + _this.zoneName = name; + /** @private **/ + + _this.valid = IANAZone.isValidZone(name); + return _this; + } + /** @override **/ + + + var _proto = IANAZone.prototype; + + /** @override **/ + _proto.offsetName = function offsetName(ts, _ref) { + var format = _ref.format, + locale = _ref.locale; + return parseZoneInfo(ts, format, locale, this.name); + } + /** @override **/ + ; + + _proto.formatOffset = function formatOffset$1(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** @override **/ + ; + + _proto.offset = function offset(ts) { + var date = new Date(ts); + if (isNaN(date)) return NaN; + var dtf = makeDTF(this.name); + + var _ref2 = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date), + year = _ref2[0], + month = _ref2[1], + day = _ref2[2], + adOrBc = _ref2[3], + hour = _ref2[4], + minute = _ref2[5], + second = _ref2[6]; + + if (adOrBc === "BC") { + year = -Math.abs(year) + 1; + } // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat + + + var adjustedHour = hour === 24 ? 0 : hour; + var asUTC = objToLocalTS({ + year: year, + month: month, + day: day, + hour: adjustedHour, + minute: minute, + second: second, + millisecond: 0 + }); + var asTS = +date; + var over = asTS % 1000; + asTS -= over >= 0 ? over : 1000 + over; + return (asUTC - asTS) / (60 * 1000); + } + /** @override **/ + ; + + _proto.equals = function equals(otherZone) { + return otherZone.type === "iana" && otherZone.name === this.name; + } + /** @override **/ + ; + + _createClass(IANAZone, [{ + key: "type", + get: function get() { + return "iana"; + } + /** @override **/ + + }, { + key: "name", + get: function get() { + return this.zoneName; + } + /** @override **/ + + }, { + key: "isUniversal", + get: function get() { + return false; + } + }, { + key: "isValid", + get: function get() { + return this.valid; + } + }]); + + return IANAZone; +}(Zone); + +var singleton = null; +/** + * A zone with a fixed offset (meaning no DST) + * @implements {Zone} + */ + +var FixedOffsetZone = /*#__PURE__*/function (_Zone) { + _inheritsLoose(FixedOffsetZone, _Zone); + + /** + * Get an instance with a specified offset + * @param {number} offset - The offset in minutes + * @return {FixedOffsetZone} + */ + FixedOffsetZone.instance = function instance(offset) { + return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); + } + /** + * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" + * @param {string} s - The offset string to parse + * @example FixedOffsetZone.parseSpecifier("UTC+6") + * @example FixedOffsetZone.parseSpecifier("UTC+06") + * @example FixedOffsetZone.parseSpecifier("UTC-6:00") + * @return {FixedOffsetZone} + */ + ; + + FixedOffsetZone.parseSpecifier = function parseSpecifier(s) { + if (s) { + var r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); + + if (r) { + return new FixedOffsetZone(signedOffset(r[1], r[2])); + } + } + + return null; + }; + + function FixedOffsetZone(offset) { + var _this; + + _this = _Zone.call(this) || this; + /** @private **/ + + _this.fixed = offset; + return _this; + } + /** @override **/ + + + var _proto = FixedOffsetZone.prototype; + + /** @override **/ + _proto.offsetName = function offsetName() { + return this.name; + } + /** @override **/ + ; + + _proto.formatOffset = function formatOffset$1(ts, format) { + return formatOffset(this.fixed, format); + } + /** @override **/ + ; + + /** @override **/ + _proto.offset = function offset() { + return this.fixed; + } + /** @override **/ + ; + + _proto.equals = function equals(otherZone) { + return otherZone.type === "fixed" && otherZone.fixed === this.fixed; + } + /** @override **/ + ; + + _createClass(FixedOffsetZone, [{ + key: "type", + get: function get() { + return "fixed"; + } + /** @override **/ + + }, { + key: "name", + get: function get() { + return this.fixed === 0 ? "UTC" : "UTC" + formatOffset(this.fixed, "narrow"); + } + }, { + key: "ianaName", + get: function get() { + if (this.fixed === 0) { + return "Etc/UTC"; + } else { + return "Etc/GMT" + formatOffset(-this.fixed, "narrow"); + } + } + }, { + key: "isUniversal", + get: function get() { + return true; + } + }, { + key: "isValid", + get: function get() { + return true; + } + }], [{ + key: "utcInstance", + get: + /** + * Get a singleton instance of UTC + * @return {FixedOffsetZone} + */ + function get() { + if (singleton === null) { + singleton = new FixedOffsetZone(0); + } + + return singleton; + } + }]); + + return FixedOffsetZone; +}(Zone); + +/** + * A zone that failed to parse. You should never need to instantiate this. + * @implements {Zone} + */ + +var InvalidZone = /*#__PURE__*/function (_Zone) { + _inheritsLoose(InvalidZone, _Zone); + + function InvalidZone(zoneName) { + var _this; + + _this = _Zone.call(this) || this; + /** @private */ + + _this.zoneName = zoneName; + return _this; + } + /** @override **/ + + + var _proto = InvalidZone.prototype; + + /** @override **/ + _proto.offsetName = function offsetName() { + return null; + } + /** @override **/ + ; + + _proto.formatOffset = function formatOffset() { + return ""; + } + /** @override **/ + ; + + _proto.offset = function offset() { + return NaN; + } + /** @override **/ + ; + + _proto.equals = function equals() { + return false; + } + /** @override **/ + ; + + _createClass(InvalidZone, [{ + key: "type", + get: function get() { + return "invalid"; + } + /** @override **/ + + }, { + key: "name", + get: function get() { + return this.zoneName; + } + /** @override **/ + + }, { + key: "isUniversal", + get: function get() { + return false; + } + }, { + key: "isValid", + get: function get() { + return false; + } + }]); + + return InvalidZone; +}(Zone); + +/** + * @private + */ +function normalizeZone(input, defaultZone) { + + if (isUndefined(input) || input === null) { + return defaultZone; + } else if (input instanceof Zone) { + return input; + } else if (isString(input)) { + var lowered = input.toLowerCase(); + if (lowered === "default") return defaultZone;else if (lowered === "local" || lowered === "system") return SystemZone.instance;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); + } else if (isNumber(input)) { + return FixedOffsetZone.instance(input); + } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { + // This is dumb, but the instanceof check above doesn't seem to really work + // so we're duck checking it + return input; + } else { + return new InvalidZone(input); + } +} + +var now = function now() { + return Date.now(); +}, + defaultZone = "system", + defaultLocale = null, + defaultNumberingSystem = null, + defaultOutputCalendar = null, + throwOnInvalid; +/** + * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. + */ + + +var Settings = /*#__PURE__*/function () { + function Settings() {} + + /** + * Reset Luxon's global caches. Should only be necessary in testing scenarios. + * @return {void} + */ + Settings.resetCaches = function resetCaches() { + Locale.resetCache(); + IANAZone.resetCache(); + }; + + _createClass(Settings, null, [{ + key: "now", + get: + /** + * Get the callback for returning the current timestamp. + * @type {function} + */ + function get() { + return now; + } + /** + * Set the callback for returning the current timestamp. + * The function should return a number, which will be interpreted as an Epoch millisecond count + * @type {function} + * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future + * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time + */ + , + set: function set(n) { + now = n; + } + /** + * Set the default time zone to create DateTimes in. Does not affect existing instances. + * Use the value "system" to reset this value to the system's time zone. + * @type {string} + */ + + }, { + key: "defaultZone", + get: + /** + * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. + * The default value is the system's time zone (the one set on the machine that runs this code). + * @type {Zone} + */ + function get() { + return normalizeZone(defaultZone, SystemZone.instance); + } + /** + * Get the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + , + set: function set(zone) { + defaultZone = zone; + } + }, { + key: "defaultLocale", + get: function get() { + return defaultLocale; + } + /** + * Set the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + , + set: function set(locale) { + defaultLocale = locale; + } + /** + * Get the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + + }, { + key: "defaultNumberingSystem", + get: function get() { + return defaultNumberingSystem; + } + /** + * Set the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + , + set: function set(numberingSystem) { + defaultNumberingSystem = numberingSystem; + } + /** + * Get the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + + }, { + key: "defaultOutputCalendar", + get: function get() { + return defaultOutputCalendar; + } + /** + * Set the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + , + set: function set(outputCalendar) { + defaultOutputCalendar = outputCalendar; + } + /** + * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + + }, { + key: "throwOnInvalid", + get: function get() { + return throwOnInvalid; + } + /** + * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + , + set: function set(t) { + throwOnInvalid = t; + } + }]); + + return Settings; +}(); + +var _excluded = ["base"], + _excluded2 = ["padTo", "floor"]; + +var intlLFCache = {}; + +function getCachedLF(locString, opts) { + if (opts === void 0) { + opts = {}; + } + + var key = JSON.stringify([locString, opts]); + var dtf = intlLFCache[key]; + + if (!dtf) { + dtf = new Intl.ListFormat(locString, opts); + intlLFCache[key] = dtf; + } + + return dtf; +} + +var intlDTCache = {}; + +function getCachedDTF(locString, opts) { + if (opts === void 0) { + opts = {}; + } + + var key = JSON.stringify([locString, opts]); + var dtf = intlDTCache[key]; + + if (!dtf) { + dtf = new Intl.DateTimeFormat(locString, opts); + intlDTCache[key] = dtf; + } + + return dtf; +} + +var intlNumCache = {}; + +function getCachedINF(locString, opts) { + if (opts === void 0) { + opts = {}; + } + + var key = JSON.stringify([locString, opts]); + var inf = intlNumCache[key]; + + if (!inf) { + inf = new Intl.NumberFormat(locString, opts); + intlNumCache[key] = inf; + } + + return inf; +} + +var intlRelCache = {}; + +function getCachedRTF(locString, opts) { + if (opts === void 0) { + opts = {}; + } + + var _opts = opts; + _opts.base; + var cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, _excluded); // exclude `base` from the options + + + var key = JSON.stringify([locString, cacheKeyOpts]); + var inf = intlRelCache[key]; + + if (!inf) { + inf = new Intl.RelativeTimeFormat(locString, opts); + intlRelCache[key] = inf; + } + + return inf; +} + +var sysLocaleCache = null; + +function systemLocale() { + if (sysLocaleCache) { + return sysLocaleCache; + } else { + sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale; + return sysLocaleCache; + } +} + +function parseLocaleString(localeStr) { + // I really want to avoid writing a BCP 47 parser + // see, e.g. https://github.com/wooorm/bcp-47 + // Instead, we'll do this: + // a) if the string has no -u extensions, just leave it alone + // b) if it does, use Intl to resolve everything + // c) if Intl fails, try again without the -u + var uIndex = localeStr.indexOf("-u-"); + + if (uIndex === -1) { + return [localeStr]; + } else { + var options; + var smaller = localeStr.substring(0, uIndex); + + try { + options = getCachedDTF(localeStr).resolvedOptions(); + } catch (e) { + options = getCachedDTF(smaller).resolvedOptions(); + } + + var _options = options, + numberingSystem = _options.numberingSystem, + calendar = _options.calendar; // return the smaller one so that we can append the calendar and numbering overrides to it + + return [smaller, numberingSystem, calendar]; + } +} + +function intlConfigString(localeStr, numberingSystem, outputCalendar) { + if (outputCalendar || numberingSystem) { + localeStr += "-u"; + + if (outputCalendar) { + localeStr += "-ca-" + outputCalendar; + } + + if (numberingSystem) { + localeStr += "-nu-" + numberingSystem; + } + + return localeStr; + } else { + return localeStr; + } +} + +function mapMonths(f) { + var ms = []; + + for (var i = 1; i <= 12; i++) { + var dt = DateTime.utc(2016, i, 1); + ms.push(f(dt)); + } + + return ms; +} + +function mapWeekdays(f) { + var ms = []; + + for (var i = 1; i <= 7; i++) { + var dt = DateTime.utc(2016, 11, 13 + i); + ms.push(f(dt)); + } + + return ms; +} + +function listStuff(loc, length, defaultOK, englishFn, intlFn) { + var mode = loc.listingMode(defaultOK); + + if (mode === "error") { + return null; + } else if (mode === "en") { + return englishFn(length); + } else { + return intlFn(length); + } +} + +function supportsFastNumbers(loc) { + if (loc.numberingSystem && loc.numberingSystem !== "latn") { + return false; + } else { + return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; + } +} +/** + * @private + */ + + +var PolyNumberFormatter = /*#__PURE__*/function () { + function PolyNumberFormatter(intl, forceSimple, opts) { + this.padTo = opts.padTo || 0; + this.floor = opts.floor || false; + + opts.padTo; + opts.floor; + var otherOpts = _objectWithoutPropertiesLoose(opts, _excluded2); + + if (!forceSimple || Object.keys(otherOpts).length > 0) { + var intlOpts = _extends({ + useGrouping: false + }, opts); + + if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; + this.inf = getCachedINF(intl, intlOpts); + } + } + + var _proto = PolyNumberFormatter.prototype; + + _proto.format = function format(i) { + if (this.inf) { + var fixed = this.floor ? Math.floor(i) : i; + return this.inf.format(fixed); + } else { + // to match the browser's numberformatter defaults + var _fixed = this.floor ? Math.floor(i) : roundTo(i, 3); + + return padStart(_fixed, this.padTo); + } + }; + + return PolyNumberFormatter; +}(); +/** + * @private + */ + + +var PolyDateFormatter = /*#__PURE__*/function () { + function PolyDateFormatter(dt, intl, opts) { + this.opts = opts; + var z; + + if (dt.zone.isUniversal) { + // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like. + // That is why fixed-offset TZ is set to that unless it is: + // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT. + // 2. Unsupported by the browser: + // - some do not support Etc/ + // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata + var gmtOffset = -1 * (dt.offset / 60); + var offsetZ = gmtOffset >= 0 ? "Etc/GMT+" + gmtOffset : "Etc/GMT" + gmtOffset; + + if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) { + z = offsetZ; + this.dt = dt; + } else { + // Not all fixed-offset zones like Etc/+4:30 are present in tzdata. + // So we have to make do. Two cases: + // 1. The format options tell us to show the zone. We can't do that, so the best + // we can do is format the date in UTC. + // 2. The format options don't tell us to show the zone. Then we can adjust them + // the time and tell the formatter to show it to us in UTC, so that the time is right + // and the bad zone doesn't show up. + z = "UTC"; + + if (opts.timeZoneName) { + this.dt = dt; + } else { + this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); + } + } + } else if (dt.zone.type === "system") { + this.dt = dt; + } else { + this.dt = dt; + z = dt.zone.name; + } + + var intlOpts = _extends({}, this.opts); + + if (z) { + intlOpts.timeZone = z; + } + + this.dtf = getCachedDTF(intl, intlOpts); + } + + var _proto2 = PolyDateFormatter.prototype; + + _proto2.format = function format() { + return this.dtf.format(this.dt.toJSDate()); + }; + + _proto2.formatToParts = function formatToParts() { + return this.dtf.formatToParts(this.dt.toJSDate()); + }; + + _proto2.resolvedOptions = function resolvedOptions() { + return this.dtf.resolvedOptions(); + }; + + return PolyDateFormatter; +}(); +/** + * @private + */ + + +var PolyRelFormatter = /*#__PURE__*/function () { + function PolyRelFormatter(intl, isEnglish, opts) { + this.opts = _extends({ + style: "long" + }, opts); + + if (!isEnglish && hasRelative()) { + this.rtf = getCachedRTF(intl, opts); + } + } + + var _proto3 = PolyRelFormatter.prototype; + + _proto3.format = function format(count, unit) { + if (this.rtf) { + return this.rtf.format(count, unit); + } else { + return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); + } + }; + + _proto3.formatToParts = function formatToParts(count, unit) { + if (this.rtf) { + return this.rtf.formatToParts(count, unit); + } else { + return []; + } + }; + + return PolyRelFormatter; +}(); +/** + * @private + */ + + +var Locale = /*#__PURE__*/function () { + Locale.fromOpts = function fromOpts(opts) { + return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); + }; + + Locale.create = function create(locale, numberingSystem, outputCalendar, defaultToEN) { + if (defaultToEN === void 0) { + defaultToEN = false; + } + + var specifiedLocale = locale || Settings.defaultLocale; // the system locale is useful for human readable strings but annoying for parsing/formatting known formats + + var localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); + var numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; + var outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; + return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); + }; + + Locale.resetCache = function resetCache() { + sysLocaleCache = null; + intlDTCache = {}; + intlNumCache = {}; + intlRelCache = {}; + }; + + Locale.fromObject = function fromObject(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + locale = _ref.locale, + numberingSystem = _ref.numberingSystem, + outputCalendar = _ref.outputCalendar; + + return Locale.create(locale, numberingSystem, outputCalendar); + }; + + function Locale(locale, numbering, outputCalendar, specifiedLocale) { + var _parseLocaleString = parseLocaleString(locale), + parsedLocale = _parseLocaleString[0], + parsedNumberingSystem = _parseLocaleString[1], + parsedOutputCalendar = _parseLocaleString[2]; + + this.locale = parsedLocale; + this.numberingSystem = numbering || parsedNumberingSystem || null; + this.outputCalendar = outputCalendar || parsedOutputCalendar || null; + this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); + this.weekdaysCache = { + format: {}, + standalone: {} + }; + this.monthsCache = { + format: {}, + standalone: {} + }; + this.meridiemCache = null; + this.eraCache = {}; + this.specifiedLocale = specifiedLocale; + this.fastNumbersCached = null; + } + + var _proto4 = Locale.prototype; + + _proto4.listingMode = function listingMode() { + var isActuallyEn = this.isEnglish(); + var hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); + return isActuallyEn && hasNoWeirdness ? "en" : "intl"; + }; + + _proto4.clone = function clone(alts) { + if (!alts || Object.getOwnPropertyNames(alts).length === 0) { + return this; + } else { + return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false); + } + }; + + _proto4.redefaultToEN = function redefaultToEN(alts) { + if (alts === void 0) { + alts = {}; + } + + return this.clone(_extends({}, alts, { + defaultToEN: true + })); + }; + + _proto4.redefaultToSystem = function redefaultToSystem(alts) { + if (alts === void 0) { + alts = {}; + } + + return this.clone(_extends({}, alts, { + defaultToEN: false + })); + }; + + _proto4.months = function months$1(length, format, defaultOK) { + var _this = this; + + if (format === void 0) { + format = false; + } + + if (defaultOK === void 0) { + defaultOK = true; + } + + return listStuff(this, length, defaultOK, months, function () { + var intl = format ? { + month: length, + day: "numeric" + } : { + month: length + }, + formatStr = format ? "format" : "standalone"; + + if (!_this.monthsCache[formatStr][length]) { + _this.monthsCache[formatStr][length] = mapMonths(function (dt) { + return _this.extract(dt, intl, "month"); + }); + } + + return _this.monthsCache[formatStr][length]; + }); + }; + + _proto4.weekdays = function weekdays$1(length, format, defaultOK) { + var _this2 = this; + + if (format === void 0) { + format = false; + } + + if (defaultOK === void 0) { + defaultOK = true; + } + + return listStuff(this, length, defaultOK, weekdays, function () { + var intl = format ? { + weekday: length, + year: "numeric", + month: "long", + day: "numeric" + } : { + weekday: length + }, + formatStr = format ? "format" : "standalone"; + + if (!_this2.weekdaysCache[formatStr][length]) { + _this2.weekdaysCache[formatStr][length] = mapWeekdays(function (dt) { + return _this2.extract(dt, intl, "weekday"); + }); + } + + return _this2.weekdaysCache[formatStr][length]; + }); + }; + + _proto4.meridiems = function meridiems$1(defaultOK) { + var _this3 = this; + + if (defaultOK === void 0) { + defaultOK = true; + } + + return listStuff(this, undefined, defaultOK, function () { + return meridiems; + }, function () { + // In theory there could be aribitrary day periods. We're gonna assume there are exactly two + // for AM and PM. This is probably wrong, but it's makes parsing way easier. + if (!_this3.meridiemCache) { + var intl = { + hour: "numeric", + hourCycle: "h12" + }; + _this3.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(function (dt) { + return _this3.extract(dt, intl, "dayperiod"); + }); + } + + return _this3.meridiemCache; + }); + }; + + _proto4.eras = function eras$1(length, defaultOK) { + var _this4 = this; + + if (defaultOK === void 0) { + defaultOK = true; + } + + return listStuff(this, length, defaultOK, eras, function () { + var intl = { + era: length + }; // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates + // to definitely enumerate them. + + if (!_this4.eraCache[length]) { + _this4.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(function (dt) { + return _this4.extract(dt, intl, "era"); + }); + } + + return _this4.eraCache[length]; + }); + }; + + _proto4.extract = function extract(dt, intlOpts, field) { + var df = this.dtFormatter(dt, intlOpts), + results = df.formatToParts(), + matching = results.find(function (m) { + return m.type.toLowerCase() === field; + }); + return matching ? matching.value : null; + }; + + _proto4.numberFormatter = function numberFormatter(opts) { + if (opts === void 0) { + opts = {}; + } + + // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) + // (in contrast, the rest of the condition is used heavily) + return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); + }; + + _proto4.dtFormatter = function dtFormatter(dt, intlOpts) { + if (intlOpts === void 0) { + intlOpts = {}; + } + + return new PolyDateFormatter(dt, this.intl, intlOpts); + }; + + _proto4.relFormatter = function relFormatter(opts) { + if (opts === void 0) { + opts = {}; + } + + return new PolyRelFormatter(this.intl, this.isEnglish(), opts); + }; + + _proto4.listFormatter = function listFormatter(opts) { + if (opts === void 0) { + opts = {}; + } + + return getCachedLF(this.intl, opts); + }; + + _proto4.isEnglish = function isEnglish() { + return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); + }; + + _proto4.equals = function equals(other) { + return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; + }; + + _createClass(Locale, [{ + key: "fastNumbers", + get: function get() { + if (this.fastNumbersCached == null) { + this.fastNumbersCached = supportsFastNumbers(this); + } + + return this.fastNumbersCached; + } + }]); + + return Locale; +}(); + +/* + * This file handles parsing for well-specified formats. Here's how it works: + * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. + * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object + * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. + * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. + * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. + * Some extractions are super dumb and simpleParse and fromStrings help DRY them. + */ + +function combineRegexes() { + for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) { + regexes[_key] = arguments[_key]; + } + + var full = regexes.reduce(function (f, r) { + return f + r.source; + }, ""); + return RegExp("^" + full + "$"); +} + +function combineExtractors() { + for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + extractors[_key2] = arguments[_key2]; + } + + return function (m) { + return extractors.reduce(function (_ref, ex) { + var mergedVals = _ref[0], + mergedZone = _ref[1], + cursor = _ref[2]; + + var _ex = ex(m, cursor), + val = _ex[0], + zone = _ex[1], + next = _ex[2]; + + return [_extends({}, mergedVals, val), zone || mergedZone, next]; + }, [{}, null, 1]).slice(0, 2); + }; +} + +function parse(s) { + if (s == null) { + return [null, null]; + } + + for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { + patterns[_key3 - 1] = arguments[_key3]; + } + + for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) { + var _patterns$_i = _patterns[_i], + regex = _patterns$_i[0], + extractor = _patterns$_i[1]; + var m = regex.exec(s); + + if (m) { + return extractor(m); + } + } + + return [null, null]; +} + +function simpleParse() { + for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + keys[_key4] = arguments[_key4]; + } + + return function (match, cursor) { + var ret = {}; + var i; + + for (i = 0; i < keys.length; i++) { + ret[keys[i]] = parseInteger(match[cursor + i]); + } + + return [ret, null, cursor + i]; + }; +} // ISO and SQL parsing + + +var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/; +var isoExtendedZone = "(?:" + offsetRegex.source + "?(?:\\[(" + ianaRegex.source + ")\\])?)?"; +var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; +var isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + isoExtendedZone); +var isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"); +var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/; +var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/; +var isoOrdinalRegex = /(\d{4})-?(\d{3})/; +var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"); +var extractISOOrdinalData = simpleParse("year", "ordinal"); +var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; // dumbed-down version of the ISO one + +var sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?"); +var sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?"); + +function int(match, pos, fallback) { + var m = match[pos]; + return isUndefined(m) ? fallback : parseInteger(m); +} + +function extractISOYmd(match, cursor) { + var item = { + year: int(match, cursor), + month: int(match, cursor + 1, 1), + day: int(match, cursor + 2, 1) + }; + return [item, null, cursor + 3]; +} + +function extractISOTime(match, cursor) { + var item = { + hours: int(match, cursor, 0), + minutes: int(match, cursor + 1, 0), + seconds: int(match, cursor + 2, 0), + milliseconds: parseMillis(match[cursor + 3]) + }; + return [item, null, cursor + 4]; +} + +function extractISOOffset(match, cursor) { + var local = !match[cursor] && !match[cursor + 1], + fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), + zone = local ? null : FixedOffsetZone.instance(fullOffset); + return [{}, zone, cursor + 3]; +} + +function extractIANAZone(match, cursor) { + var zone = match[cursor] ? IANAZone.create(match[cursor]) : null; + return [{}, zone, cursor + 1]; +} // ISO time parsing + + +var isoTimeOnly = RegExp("^T?" + isoTimeBaseRegex.source + "$"); // ISO duration parsing + +var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; + +function extractISODuration(match) { + var s = match[0], + yearStr = match[1], + monthStr = match[2], + weekStr = match[3], + dayStr = match[4], + hourStr = match[5], + minuteStr = match[6], + secondStr = match[7], + millisecondsStr = match[8]; + var hasNegativePrefix = s[0] === "-"; + var negativeSeconds = secondStr && secondStr[0] === "-"; + + var maybeNegate = function maybeNegate(num, force) { + if (force === void 0) { + force = false; + } + + return num !== undefined && (force || num && hasNegativePrefix) ? -num : num; + }; + + return [{ + years: maybeNegate(parseFloating(yearStr)), + months: maybeNegate(parseFloating(monthStr)), + weeks: maybeNegate(parseFloating(weekStr)), + days: maybeNegate(parseFloating(dayStr)), + hours: maybeNegate(parseFloating(hourStr)), + minutes: maybeNegate(parseFloating(minuteStr)), + seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"), + milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds) + }]; +} // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York +// and not just that we're in -240 *right now*. But since I don't think these are used that often +// I'm just going to ignore that + + +var obsOffsets = { + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 +}; + +function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = { + year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), + month: monthsShort.indexOf(monthStr) + 1, + day: parseInteger(dayStr), + hour: parseInteger(hourStr), + minute: parseInteger(minuteStr) + }; + if (secondStr) result.second = parseInteger(secondStr); + + if (weekdayStr) { + result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; + } + + return result; +} // RFC 2822/5322 + + +var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; + +function extractRFC2822(match) { + var weekdayStr = match[1], + dayStr = match[2], + monthStr = match[3], + yearStr = match[4], + hourStr = match[5], + minuteStr = match[6], + secondStr = match[7], + obsOffset = match[8], + milOffset = match[9], + offHourStr = match[10], + offMinuteStr = match[11], + result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + var offset; + + if (obsOffset) { + offset = obsOffsets[obsOffset]; + } else if (milOffset) { + offset = 0; + } else { + offset = signedOffset(offHourStr, offMinuteStr); + } + + return [result, new FixedOffsetZone(offset)]; +} + +function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); +} // http date + + +var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, + rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, + ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; + +function extractRFC1123Or850(match) { + var weekdayStr = match[1], + dayStr = match[2], + monthStr = match[3], + yearStr = match[4], + hourStr = match[5], + minuteStr = match[6], + secondStr = match[7], + result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; +} + +function extractASCII(match) { + var weekdayStr = match[1], + monthStr = match[2], + dayStr = match[3], + hourStr = match[4], + minuteStr = match[5], + secondStr = match[6], + yearStr = match[7], + result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; +} + +var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); +var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); +var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); +var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); +var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); +var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone); +var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone); +var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); +/* + * @private + */ + +function parseISODate(s) { + return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); +} +function parseRFC2822Date(s) { + return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); +} +function parseHTTPDate(s) { + return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); +} +function parseISODuration(s) { + return parse(s, [isoDuration, extractISODuration]); +} +var extractISOTimeOnly = combineExtractors(extractISOTime); +function parseISOTimeOnly(s) { + return parse(s, [isoTimeOnly, extractISOTimeOnly]); +} +var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); +var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); +var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); +function parseSQL(s) { + return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); +} + +var INVALID$2 = "Invalid Duration"; // unit conversion constants + +var lowOrderMatrix = { + weeks: { + days: 7, + hours: 7 * 24, + minutes: 7 * 24 * 60, + seconds: 7 * 24 * 60 * 60, + milliseconds: 7 * 24 * 60 * 60 * 1000 + }, + days: { + hours: 24, + minutes: 24 * 60, + seconds: 24 * 60 * 60, + milliseconds: 24 * 60 * 60 * 1000 + }, + hours: { + minutes: 60, + seconds: 60 * 60, + milliseconds: 60 * 60 * 1000 + }, + minutes: { + seconds: 60, + milliseconds: 60 * 1000 + }, + seconds: { + milliseconds: 1000 + } +}, + casualMatrix = _extends({ + years: { + quarters: 4, + months: 12, + weeks: 52, + days: 365, + hours: 365 * 24, + minutes: 365 * 24 * 60, + seconds: 365 * 24 * 60 * 60, + milliseconds: 365 * 24 * 60 * 60 * 1000 + }, + quarters: { + months: 3, + weeks: 13, + days: 91, + hours: 91 * 24, + minutes: 91 * 24 * 60, + seconds: 91 * 24 * 60 * 60, + milliseconds: 91 * 24 * 60 * 60 * 1000 + }, + months: { + weeks: 4, + days: 30, + hours: 30 * 24, + minutes: 30 * 24 * 60, + seconds: 30 * 24 * 60 * 60, + milliseconds: 30 * 24 * 60 * 60 * 1000 + } +}, lowOrderMatrix), + daysInYearAccurate = 146097.0 / 400, + daysInMonthAccurate = 146097.0 / 4800, + accurateMatrix = _extends({ + years: { + quarters: 4, + months: 12, + weeks: daysInYearAccurate / 7, + days: daysInYearAccurate, + hours: daysInYearAccurate * 24, + minutes: daysInYearAccurate * 24 * 60, + seconds: daysInYearAccurate * 24 * 60 * 60, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 + }, + quarters: { + months: 3, + weeks: daysInYearAccurate / 28, + days: daysInYearAccurate / 4, + hours: daysInYearAccurate * 24 / 4, + minutes: daysInYearAccurate * 24 * 60 / 4, + seconds: daysInYearAccurate * 24 * 60 * 60 / 4, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4 + }, + months: { + weeks: daysInMonthAccurate / 7, + days: daysInMonthAccurate, + hours: daysInMonthAccurate * 24, + minutes: daysInMonthAccurate * 24 * 60, + seconds: daysInMonthAccurate * 24 * 60 * 60, + milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 + } +}, lowOrderMatrix); // units ordered by size + +var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; +var reverseUnits = orderedUnits$1.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes" + +function clone$1(dur, alts, clear) { + if (clear === void 0) { + clear = false; + } + + // deep merge for vals + var conf = { + values: clear ? alts.values : _extends({}, dur.values, alts.values || {}), + loc: dur.loc.clone(alts.loc), + conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy, + matrix: alts.matrix || dur.matrix + }; + return new Duration(conf); +} + +function antiTrunc(n) { + return n < 0 ? Math.floor(n) : Math.ceil(n); +} // NB: mutates parameters + + +function convert(matrix, fromMap, fromUnit, toMap, toUnit) { + var conv = matrix[toUnit][fromUnit], + raw = fromMap[fromUnit] / conv, + sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), + // ok, so this is wild, but see the matrix in the tests + added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); + toMap[toUnit] += added; + fromMap[fromUnit] -= added * conv; +} // NB: mutates parameters + + +function normalizeValues(matrix, vals) { + reverseUnits.reduce(function (previous, current) { + if (!isUndefined(vals[current])) { + if (previous) { + convert(matrix, vals, previous, vals, current); + } + + return current; + } else { + return previous; + } + }, null); +} +/** + * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime. + * + * Here is a brief overview of commonly used methods and getters in Duration: + * + * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. + * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors. + * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors. + * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}. + * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON} + * + * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. + */ + + +var Duration = /*#__PURE__*/function () { + /** + * @private + */ + function Duration(config) { + var accurate = config.conversionAccuracy === "longterm" || false; + var matrix = accurate ? accurateMatrix : casualMatrix; + + if (config.matrix) { + matrix = config.matrix; + } + /** + * @access private + */ + + + this.values = config.values; + /** + * @access private + */ + + this.loc = config.loc || Locale.create(); + /** + * @access private + */ + + this.conversionAccuracy = accurate ? "longterm" : "casual"; + /** + * @access private + */ + + this.invalid = config.invalid || null; + /** + * @access private + */ + + this.matrix = matrix; + /** + * @access private + */ + + this.isLuxonDuration = true; + } + /** + * Create Duration from a number of milliseconds. + * @param {number} count of milliseconds + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + + + Duration.fromMillis = function fromMillis(count, opts) { + return Duration.fromObject({ + milliseconds: count + }, opts); + } + /** + * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. + * If this object is empty then a zero milliseconds duration is returned. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.years + * @param {number} obj.quarters + * @param {number} obj.months + * @param {number} obj.weeks + * @param {number} obj.days + * @param {number} obj.hours + * @param {number} obj.minutes + * @param {number} obj.seconds + * @param {number} obj.milliseconds + * @param {Object} [opts=[]] - options for creating this Duration + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the custom conversion system to use + * @return {Duration} + */ + ; + + Duration.fromObject = function fromObject(obj, opts) { + if (opts === void 0) { + opts = {}; + } + + if (obj == null || typeof obj !== "object") { + throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got " + (obj === null ? "null" : typeof obj)); + } + + return new Duration({ + values: normalizeObject(obj, Duration.normalizeUnit), + loc: Locale.fromObject(opts), + conversionAccuracy: opts.conversionAccuracy, + matrix: opts.matrix + }); + } + /** + * Create a Duration from DurationLike. + * + * @param {Object | number | Duration} durationLike + * One of: + * - object with keys like 'years' and 'hours'. + * - number representing milliseconds + * - Duration instance + * @return {Duration} + */ + ; + + Duration.fromDurationLike = function fromDurationLike(durationLike) { + if (isNumber(durationLike)) { + return Duration.fromMillis(durationLike); + } else if (Duration.isDuration(durationLike)) { + return durationLike; + } else if (typeof durationLike === "object") { + return Duration.fromObject(durationLike); + } else { + throw new InvalidArgumentError("Unknown duration argument " + durationLike + " of type " + typeof durationLike); + } + } + /** + * Create a Duration from an ISO 8601 duration string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the preset conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } + * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } + * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } + * @return {Duration} + */ + ; + + Duration.fromISO = function fromISO(text, opts) { + var _parseISODuration = parseISODuration(text), + parsed = _parseISODuration[0]; + + if (parsed) { + return Duration.fromObject(parsed, opts); + } else { + return Duration.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); + } + } + /** + * Create a Duration from an ISO 8601 time string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } + * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @return {Duration} + */ + ; + + Duration.fromISOTime = function fromISOTime(text, opts) { + var _parseISOTimeOnly = parseISOTimeOnly(text), + parsed = _parseISOTimeOnly[0]; + + if (parsed) { + return Duration.fromObject(parsed, opts); + } else { + return Duration.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); + } + } + /** + * Create an invalid Duration. + * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Duration} + */ + ; + + Duration.invalid = function invalid(reason, explanation) { + if (explanation === void 0) { + explanation = null; + } + + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); + } + + var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + + if (Settings.throwOnInvalid) { + throw new InvalidDurationError(invalid); + } else { + return new Duration({ + invalid: invalid + }); + } + } + /** + * @private + */ + ; + + Duration.normalizeUnit = function normalizeUnit(unit) { + var normalized = { + year: "years", + years: "years", + quarter: "quarters", + quarters: "quarters", + month: "months", + months: "months", + week: "weeks", + weeks: "weeks", + day: "days", + days: "days", + hour: "hours", + hours: "hours", + minute: "minutes", + minutes: "minutes", + second: "seconds", + seconds: "seconds", + millisecond: "milliseconds", + milliseconds: "milliseconds" + }[unit ? unit.toLowerCase() : unit]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + /** + * Check if an object is a Duration. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + ; + + Duration.isDuration = function isDuration(o) { + return o && o.isLuxonDuration || false; + } + /** + * Get the locale of a Duration, such 'en-GB' + * @type {string} + */ + ; + + var _proto = Duration.prototype; + + /** + * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: + * * `S` for milliseconds + * * `s` for seconds + * * `m` for minutes + * * `h` for hours + * * `d` for days + * * `w` for weeks + * * `M` for months + * * `y` for years + * Notes: + * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits + * * Tokens can be escaped by wrapping with single quotes. + * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. + * @param {string} fmt - the format string + * @param {Object} opts - options + * @param {boolean} [opts.floor=true] - floor numerical values + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" + * @return {string} + */ + _proto.toFormat = function toFormat(fmt, opts) { + if (opts === void 0) { + opts = {}; + } + + // reverse-compat since 1.2; we always round down now, never up, and we do it by default + var fmtOpts = _extends({}, opts, { + floor: opts.round !== false && opts.floor !== false + }); + + return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2; + } + /** + * Returns a string representation of a Duration with all units included. + * To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat + * @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`. + * @example + * ```js + * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 }) + * dur.toHuman() //=> '1 day, 5 hours, 6 minutes' + * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes' + * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min' + * ``` + */ + ; + + _proto.toHuman = function toHuman(opts) { + var _this = this; + + if (opts === void 0) { + opts = {}; + } + + var l = orderedUnits$1.map(function (unit) { + var val = _this.values[unit]; + + if (isUndefined(val)) { + return null; + } + + return _this.loc.numberFormatter(_extends({ + style: "unit", + unitDisplay: "long" + }, opts, { + unit: unit.slice(0, -1) + })).format(val); + }).filter(function (n) { + return n; + }); + return this.loc.listFormatter(_extends({ + type: "conjunction", + style: opts.listStyle || "narrow" + }, opts)).format(l); + } + /** + * Returns a JavaScript object with this Duration's values. + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } + * @return {Object} + */ + ; + + _proto.toObject = function toObject() { + if (!this.isValid) return {}; + return _extends({}, this.values); + } + /** + * Returns an ISO 8601-compliant string representation of this Duration. + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' + * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' + * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' + * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' + * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' + * @return {string} + */ + ; + + _proto.toISO = function toISO() { + // we could use the formatter, but this is an easier way to get the minimum string + if (!this.isValid) return null; + var s = "P"; + if (this.years !== 0) s += this.years + "Y"; + if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; + if (this.weeks !== 0) s += this.weeks + "W"; + if (this.days !== 0) s += this.days + "D"; + if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += "T"; + if (this.hours !== 0) s += this.hours + "H"; + if (this.minutes !== 0) s += this.minutes + "M"; + if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle "floating point madness" by removing extra decimal places + // https://stackoverflow.com/questions/588004/is-floating-point-math-broken + s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; + if (s === "P") s += "T0S"; + return s; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. + * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' + * @return {string} + */ + ; + + _proto.toISOTime = function toISOTime(opts) { + if (opts === void 0) { + opts = {}; + } + + if (!this.isValid) return null; + var millis = this.toMillis(); + if (millis < 0 || millis >= 86400000) return null; + opts = _extends({ + suppressMilliseconds: false, + suppressSeconds: false, + includePrefix: false, + format: "extended" + }, opts); + var value = this.shiftTo("hours", "minutes", "seconds", "milliseconds"); + var fmt = opts.format === "basic" ? "hhmm" : "hh:mm"; + + if (!opts.suppressSeconds || value.seconds !== 0 || value.milliseconds !== 0) { + fmt += opts.format === "basic" ? "ss" : ":ss"; + + if (!opts.suppressMilliseconds || value.milliseconds !== 0) { + fmt += ".SSS"; + } + } + + var str = value.toFormat(fmt); + + if (opts.includePrefix) { + str = "T" + str; + } + + return str; + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. + * @return {string} + */ + ; + + _proto.toJSON = function toJSON() { + return this.toISO(); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. + * @return {string} + */ + ; + + _proto.toString = function toString() { + return this.toISO(); + } + /** + * Returns an milliseconds value of this Duration. + * @return {number} + */ + ; + + _proto.toMillis = function toMillis() { + return this.as("milliseconds"); + } + /** + * Returns an milliseconds value of this Duration. Alias of {@link toMillis} + * @return {number} + */ + ; + + _proto.valueOf = function valueOf() { + return this.toMillis(); + } + /** + * Make this Duration longer by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + ; + + _proto.plus = function plus(duration) { + if (!this.isValid) return this; + var dur = Duration.fromDurationLike(duration), + result = {}; + + for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) { + var k = _step.value; + + if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { + result[k] = dur.get(k) + this.get(k); + } + } + + return clone$1(this, { + values: result + }, true); + } + /** + * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + ; + + _proto.minus = function minus(duration) { + if (!this.isValid) return this; + var dur = Duration.fromDurationLike(duration); + return this.plus(dur.negate()); + } + /** + * Scale this Duration by the specified amount. Return a newly-constructed Duration. + * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } + * @return {Duration} + */ + ; + + _proto.mapUnits = function mapUnits(fn) { + if (!this.isValid) return this; + var result = {}; + + for (var _i = 0, _Object$keys = Object.keys(this.values); _i < _Object$keys.length; _i++) { + var k = _Object$keys[_i]; + result[k] = asNumber(fn(this.values[k], k)); + } + + return clone$1(this, { + values: result + }, true); + } + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 + * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 + * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 + * @return {number} + */ + ; + + _proto.get = function get(unit) { + return this[Duration.normalizeUnit(unit)]; + } + /** + * "Set" the values of specified units. Return a newly-constructed Duration. + * @param {Object} values - a mapping of units to numbers + * @example dur.set({ years: 2017 }) + * @example dur.set({ hours: 8, minutes: 30 }) + * @return {Duration} + */ + ; + + _proto.set = function set(values) { + if (!this.isValid) return this; + + var mixed = _extends({}, this.values, normalizeObject(values, Duration.normalizeUnit)); + + return clone$1(this, { + values: mixed + }); + } + /** + * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. + * @example dur.reconfigure({ locale: 'en-GB' }) + * @return {Duration} + */ + ; + + _proto.reconfigure = function reconfigure(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + locale = _ref.locale, + numberingSystem = _ref.numberingSystem, + conversionAccuracy = _ref.conversionAccuracy, + matrix = _ref.matrix; + + var loc = this.loc.clone({ + locale: locale, + numberingSystem: numberingSystem + }); + var opts = { + loc: loc, + matrix: matrix, + conversionAccuracy: conversionAccuracy + }; + return clone$1(this, opts); + } + /** + * Return the length of the duration in the specified unit. + * @param {string} unit - a unit such as 'minutes' or 'days' + * @example Duration.fromObject({years: 1}).as('days') //=> 365 + * @example Duration.fromObject({years: 1}).as('months') //=> 12 + * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 + * @return {number} + */ + ; + + _proto.as = function as(unit) { + return this.isValid ? this.shiftTo(unit).get(unit) : NaN; + } + /** + * Reduce this Duration to its canonical representation in its current units. + * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } + * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } + * @return {Duration} + */ + ; + + _proto.normalize = function normalize() { + if (!this.isValid) return this; + var vals = this.toObject(); + normalizeValues(this.matrix, vals); + return clone$1(this, { + values: vals + }, true); + } + /** + * Convert this Duration into its representation in a different set of units. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } + * @return {Duration} + */ + ; + + _proto.shiftTo = function shiftTo() { + for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) { + units[_key] = arguments[_key]; + } + + if (!this.isValid) return this; + + if (units.length === 0) { + return this; + } + + units = units.map(function (u) { + return Duration.normalizeUnit(u); + }); + var built = {}, + accumulated = {}, + vals = this.toObject(); + var lastUnit; + + for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits$1), _step2; !(_step2 = _iterator2()).done;) { + var k = _step2.value; + + if (units.indexOf(k) >= 0) { + lastUnit = k; + var own = 0; // anything we haven't boiled down yet should get boiled to this unit + + for (var ak in accumulated) { + own += this.matrix[ak][k] * accumulated[ak]; + accumulated[ak] = 0; + } // plus anything that's already in this unit + + + if (isNumber(vals[k])) { + own += vals[k]; + } + + var i = Math.trunc(own); + built[k] = i; + accumulated[k] = (own * 1000 - i * 1000) / 1000; // plus anything further down the chain that should be rolled up in to this + + for (var down in vals) { + if (orderedUnits$1.indexOf(down) > orderedUnits$1.indexOf(k)) { + convert(this.matrix, vals, down, built, k); + } + } // otherwise, keep it in the wings to boil it later + + } else if (isNumber(vals[k])) { + accumulated[k] = vals[k]; + } + } // anything leftover becomes the decimal for the last unit + // lastUnit must be defined since units is not empty + + + for (var key in accumulated) { + if (accumulated[key] !== 0) { + built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; + } + } + + return clone$1(this, { + values: built + }, true).normalize(); + } + /** + * Return the negative of this Duration. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } + * @return {Duration} + */ + ; + + _proto.negate = function negate() { + if (!this.isValid) return this; + var negated = {}; + + for (var _i2 = 0, _Object$keys2 = Object.keys(this.values); _i2 < _Object$keys2.length; _i2++) { + var k = _Object$keys2[_i2]; + negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; + } + + return clone$1(this, { + values: negated + }, true); + } + /** + * Get the years. + * @type {number} + */ + ; + + /** + * Equality check + * Two Durations are equal iff they have the same units and the same values for each unit. + * @param {Duration} other + * @return {boolean} + */ + _proto.equals = function equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + + if (!this.loc.equals(other.loc)) { + return false; + } + + function eq(v1, v2) { + // Consider 0 and undefined as equal + if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0; + return v1 === v2; + } + + for (var _iterator3 = _createForOfIteratorHelperLoose(orderedUnits$1), _step3; !(_step3 = _iterator3()).done;) { + var u = _step3.value; + + if (!eq(this.values[u], other.values[u])) { + return false; + } + } + + return true; + }; + + _createClass(Duration, [{ + key: "locale", + get: function get() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration + * + * @type {string} + */ + + }, { + key: "numberingSystem", + get: function get() { + return this.isValid ? this.loc.numberingSystem : null; + } + }, { + key: "years", + get: function get() { + return this.isValid ? this.values.years || 0 : NaN; + } + /** + * Get the quarters. + * @type {number} + */ + + }, { + key: "quarters", + get: function get() { + return this.isValid ? this.values.quarters || 0 : NaN; + } + /** + * Get the months. + * @type {number} + */ + + }, { + key: "months", + get: function get() { + return this.isValid ? this.values.months || 0 : NaN; + } + /** + * Get the weeks + * @type {number} + */ + + }, { + key: "weeks", + get: function get() { + return this.isValid ? this.values.weeks || 0 : NaN; + } + /** + * Get the days. + * @type {number} + */ + + }, { + key: "days", + get: function get() { + return this.isValid ? this.values.days || 0 : NaN; + } + /** + * Get the hours. + * @type {number} + */ + + }, { + key: "hours", + get: function get() { + return this.isValid ? this.values.hours || 0 : NaN; + } + /** + * Get the minutes. + * @type {number} + */ + + }, { + key: "minutes", + get: function get() { + return this.isValid ? this.values.minutes || 0 : NaN; + } + /** + * Get the seconds. + * @return {number} + */ + + }, { + key: "seconds", + get: function get() { + return this.isValid ? this.values.seconds || 0 : NaN; + } + /** + * Get the milliseconds. + * @return {number} + */ + + }, { + key: "milliseconds", + get: function get() { + return this.isValid ? this.values.milliseconds || 0 : NaN; + } + /** + * Returns whether the Duration is invalid. Invalid durations are returned by diff operations + * on invalid DateTimes or Intervals. + * @return {boolean} + */ + + }, { + key: "isValid", + get: function get() { + return this.invalid === null; + } + /** + * Returns an error code if this Duration became invalid, or null if the Duration is valid + * @return {string} + */ + + }, { + key: "invalidReason", + get: function get() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Duration became invalid, or null if the Duration is valid + * @type {string} + */ + + }, { + key: "invalidExplanation", + get: function get() { + return this.invalid ? this.invalid.explanation : null; + } + }]); + + return Duration; +}(); + +var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end + +function validateStartEnd(start, end) { + if (!start || !start.isValid) { + return Interval.invalid("missing or invalid start"); + } else if (!end || !end.isValid) { + return Interval.invalid("missing or invalid end"); + } else if (end < start) { + return Interval.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO()); + } else { + return null; + } +} +/** + * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. + * + * Here is a brief overview of the most commonly used methods and getters in Interval: + * + * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}. + * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end. + * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}. + * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}. + * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs} + * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}. + */ + + +var Interval = /*#__PURE__*/function () { + /** + * @private + */ + function Interval(config) { + /** + * @access private + */ + this.s = config.start; + /** + * @access private + */ + + this.e = config.end; + /** + * @access private + */ + + this.invalid = config.invalid || null; + /** + * @access private + */ + + this.isLuxonInterval = true; + } + /** + * Create an invalid Interval. + * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Interval} + */ + + + Interval.invalid = function invalid(reason, explanation) { + if (explanation === void 0) { + explanation = null; + } + + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); + } + + var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + + if (Settings.throwOnInvalid) { + throw new InvalidIntervalError(invalid); + } else { + return new Interval({ + invalid: invalid + }); + } + } + /** + * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. + * @param {DateTime|Date|Object} start + * @param {DateTime|Date|Object} end + * @return {Interval} + */ + ; + + Interval.fromDateTimes = function fromDateTimes(start, end) { + var builtStart = friendlyDateTime(start), + builtEnd = friendlyDateTime(end); + var validateError = validateStartEnd(builtStart, builtEnd); + + if (validateError == null) { + return new Interval({ + start: builtStart, + end: builtEnd + }); + } else { + return validateError; + } + } + /** + * Create an Interval from a start DateTime and a Duration to extend to. + * @param {DateTime|Date|Object} start + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + ; + + Interval.after = function after(start, duration) { + var dur = Duration.fromDurationLike(duration), + dt = friendlyDateTime(start); + return Interval.fromDateTimes(dt, dt.plus(dur)); + } + /** + * Create an Interval from an end DateTime and a Duration to extend backwards to. + * @param {DateTime|Date|Object} end + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + ; + + Interval.before = function before(end, duration) { + var dur = Duration.fromDurationLike(duration), + dt = friendlyDateTime(end); + return Interval.fromDateTimes(dt.minus(dur), dt); + } + /** + * Create an Interval from an ISO 8601 string. + * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats. + * @param {string} text - the ISO string to parse + * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {Interval} + */ + ; + + Interval.fromISO = function fromISO(text, opts) { + var _split = (text || "").split("/", 2), + s = _split[0], + e = _split[1]; + + if (s && e) { + var start, startIsValid; + + try { + start = DateTime.fromISO(s, opts); + startIsValid = start.isValid; + } catch (e) { + startIsValid = false; + } + + var end, endIsValid; + + try { + end = DateTime.fromISO(e, opts); + endIsValid = end.isValid; + } catch (e) { + endIsValid = false; + } + + if (startIsValid && endIsValid) { + return Interval.fromDateTimes(start, end); + } + + if (startIsValid) { + var dur = Duration.fromISO(e, opts); + + if (dur.isValid) { + return Interval.after(start, dur); + } + } else if (endIsValid) { + var _dur = Duration.fromISO(s, opts); + + if (_dur.isValid) { + return Interval.before(end, _dur); + } + } + } + + return Interval.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); + } + /** + * Check if an object is an Interval. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + ; + + Interval.isInterval = function isInterval(o) { + return o && o.isLuxonInterval || false; + } + /** + * Returns the start of the Interval + * @type {DateTime} + */ + ; + + var _proto = Interval.prototype; + + /** + * Returns the length of the Interval in the specified unit. + * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. + * @return {number} + */ + _proto.length = function length(unit) { + if (unit === void 0) { + unit = "milliseconds"; + } + + return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN; + } + /** + * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. + * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' + * asks 'what dates are included in this interval?', not 'how many days long is this interval?' + * @param {string} [unit='milliseconds'] - the unit of time to count. + * @return {number} + */ + ; + + _proto.count = function count(unit) { + if (unit === void 0) { + unit = "milliseconds"; + } + + if (!this.isValid) return NaN; + var start = this.start.startOf(unit), + end = this.end.startOf(unit); + return Math.floor(end.diff(start, unit).get(unit)) + 1; + } + /** + * Returns whether this Interval's start and end are both in the same unit of time + * @param {string} unit - the unit of time to check sameness on + * @return {boolean} + */ + ; + + _proto.hasSame = function hasSame(unit) { + return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; + } + /** + * Return whether this Interval has the same start and end DateTimes. + * @return {boolean} + */ + ; + + _proto.isEmpty = function isEmpty() { + return this.s.valueOf() === this.e.valueOf(); + } + /** + * Return whether this Interval's start is after the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + ; + + _proto.isAfter = function isAfter(dateTime) { + if (!this.isValid) return false; + return this.s > dateTime; + } + /** + * Return whether this Interval's end is before the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + ; + + _proto.isBefore = function isBefore(dateTime) { + if (!this.isValid) return false; + return this.e <= dateTime; + } + /** + * Return whether this Interval contains the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + ; + + _proto.contains = function contains(dateTime) { + if (!this.isValid) return false; + return this.s <= dateTime && this.e > dateTime; + } + /** + * "Sets" the start and/or end dates. Returns a newly-constructed Interval. + * @param {Object} values - the values to set + * @param {DateTime} values.start - the starting DateTime + * @param {DateTime} values.end - the ending DateTime + * @return {Interval} + */ + ; + + _proto.set = function set(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + start = _ref.start, + end = _ref.end; + + if (!this.isValid) return this; + return Interval.fromDateTimes(start || this.s, end || this.e); + } + /** + * Split this Interval at each of the specified DateTimes + * @param {...DateTime} dateTimes - the unit of time to count. + * @return {Array} + */ + ; + + _proto.splitAt = function splitAt() { + var _this = this; + + if (!this.isValid) return []; + + for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { + dateTimes[_key] = arguments[_key]; + } + + var sorted = dateTimes.map(friendlyDateTime).filter(function (d) { + return _this.contains(d); + }).sort(), + results = []; + var s = this.s, + i = 0; + + while (s < this.e) { + var added = sorted[i] || this.e, + next = +added > +this.e ? this.e : added; + results.push(Interval.fromDateTimes(s, next)); + s = next; + i += 1; + } + + return results; + } + /** + * Split this Interval into smaller Intervals, each of the specified length. + * Left over time is grouped into a smaller interval + * @param {Duration|Object|number} duration - The length of each resulting interval. + * @return {Array} + */ + ; + + _proto.splitBy = function splitBy(duration) { + var dur = Duration.fromDurationLike(duration); + + if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { + return []; + } + + var s = this.s, + idx = 1, + next; + var results = []; + + while (s < this.e) { + var added = this.start.plus(dur.mapUnits(function (x) { + return x * idx; + })); + next = +added > +this.e ? this.e : added; + results.push(Interval.fromDateTimes(s, next)); + s = next; + idx += 1; + } + + return results; + } + /** + * Split this Interval into the specified number of smaller intervals. + * @param {number} numberOfParts - The number of Intervals to divide the Interval into. + * @return {Array} + */ + ; + + _proto.divideEqually = function divideEqually(numberOfParts) { + if (!this.isValid) return []; + return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); + } + /** + * Return whether this Interval overlaps with the specified Interval + * @param {Interval} other + * @return {boolean} + */ + ; + + _proto.overlaps = function overlaps(other) { + return this.e > other.s && this.s < other.e; + } + /** + * Return whether this Interval's end is adjacent to the specified Interval's start. + * @param {Interval} other + * @return {boolean} + */ + ; + + _proto.abutsStart = function abutsStart(other) { + if (!this.isValid) return false; + return +this.e === +other.s; + } + /** + * Return whether this Interval's start is adjacent to the specified Interval's end. + * @param {Interval} other + * @return {boolean} + */ + ; + + _proto.abutsEnd = function abutsEnd(other) { + if (!this.isValid) return false; + return +other.e === +this.s; + } + /** + * Return whether this Interval engulfs the start and end of the specified Interval. + * @param {Interval} other + * @return {boolean} + */ + ; + + _proto.engulfs = function engulfs(other) { + if (!this.isValid) return false; + return this.s <= other.s && this.e >= other.e; + } + /** + * Return whether this Interval has the same start and end as the specified Interval. + * @param {Interval} other + * @return {boolean} + */ + ; + + _proto.equals = function equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + + return this.s.equals(other.s) && this.e.equals(other.e); + } + /** + * Return an Interval representing the intersection of this Interval and the specified Interval. + * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. + * Returns null if the intersection is empty, meaning, the intervals don't intersect. + * @param {Interval} other + * @return {Interval} + */ + ; + + _proto.intersection = function intersection(other) { + if (!this.isValid) return this; + var s = this.s > other.s ? this.s : other.s, + e = this.e < other.e ? this.e : other.e; + + if (s >= e) { + return null; + } else { + return Interval.fromDateTimes(s, e); + } + } + /** + * Return an Interval representing the union of this Interval and the specified Interval. + * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. + * @param {Interval} other + * @return {Interval} + */ + ; + + _proto.union = function union(other) { + if (!this.isValid) return this; + var s = this.s < other.s ? this.s : other.s, + e = this.e > other.e ? this.e : other.e; + return Interval.fromDateTimes(s, e); + } + /** + * Merge an array of Intervals into a equivalent minimal set of Intervals. + * Combines overlapping and adjacent Intervals. + * @param {Array} intervals + * @return {Array} + */ + ; + + Interval.merge = function merge(intervals) { + var _intervals$sort$reduc = intervals.sort(function (a, b) { + return a.s - b.s; + }).reduce(function (_ref2, item) { + var sofar = _ref2[0], + current = _ref2[1]; + + if (!current) { + return [sofar, item]; + } else if (current.overlaps(item) || current.abutsStart(item)) { + return [sofar, current.union(item)]; + } else { + return [sofar.concat([current]), item]; + } + }, [[], null]), + found = _intervals$sort$reduc[0], + final = _intervals$sort$reduc[1]; + + if (final) { + found.push(final); + } + + return found; + } + /** + * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. + * @param {Array} intervals + * @return {Array} + */ + ; + + Interval.xor = function xor(intervals) { + var _Array$prototype; + + var start = null, + currentCount = 0; + + var results = [], + ends = intervals.map(function (i) { + return [{ + time: i.s, + type: "s" + }, { + time: i.e, + type: "e" + }]; + }), + flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), + arr = flattened.sort(function (a, b) { + return a.time - b.time; + }); + + for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;) { + var i = _step.value; + currentCount += i.type === "s" ? 1 : -1; + + if (currentCount === 1) { + start = i.time; + } else { + if (start && +start !== +i.time) { + results.push(Interval.fromDateTimes(start, i.time)); + } + + start = null; + } + } + + return Interval.merge(results); + } + /** + * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. + * @param {...Interval} intervals + * @return {Array} + */ + ; + + _proto.difference = function difference() { + var _this2 = this; + + for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + intervals[_key2] = arguments[_key2]; + } + + return Interval.xor([this].concat(intervals)).map(function (i) { + return _this2.intersection(i); + }).filter(function (i) { + return i && !i.isEmpty(); + }); + } + /** + * Returns a string representation of this Interval appropriate for debugging. + * @return {string} + */ + ; + + _proto.toString = function toString() { + if (!this.isValid) return INVALID$1; + return "[" + this.s.toISO() + " \u2013 " + this.e.toISO() + ")"; + } + /** + * Returns an ISO 8601-compliant string representation of this Interval. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + ; + + _proto.toISO = function toISO(opts) { + if (!this.isValid) return INVALID$1; + return this.s.toISO(opts) + "/" + this.e.toISO(opts); + } + /** + * Returns an ISO 8601-compliant string representation of date of this Interval. + * The time components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {string} + */ + ; + + _proto.toISODate = function toISODate() { + if (!this.isValid) return INVALID$1; + return this.s.toISODate() + "/" + this.e.toISODate(); + } + /** + * Returns an ISO 8601-compliant string representation of time of this Interval. + * The date components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + ; + + _proto.toISOTime = function toISOTime(opts) { + if (!this.isValid) return INVALID$1; + return this.s.toISOTime(opts) + "/" + this.e.toISOTime(opts); + } + /** + * Returns a string representation of this Interval formatted according to the specified format string. + * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime#toFormat} for details. + * @param {Object} opts - options + * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations + * @return {string} + */ + ; + + _proto.toFormat = function toFormat(dateFormat, _temp2) { + var _ref3 = _temp2 === void 0 ? {} : _temp2, + _ref3$separator = _ref3.separator, + separator = _ref3$separator === void 0 ? " – " : _ref3$separator; + + if (!this.isValid) return INVALID$1; + return "" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat); + } + /** + * Return a Duration representing the time spanned by this interval. + * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } + * @return {Duration} + */ + ; + + _proto.toDuration = function toDuration(unit, opts) { + if (!this.isValid) { + return Duration.invalid(this.invalidReason); + } + + return this.e.diff(this.s, unit, opts); + } + /** + * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes + * @param {function} mapFn + * @return {Interval} + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) + */ + ; + + _proto.mapEndpoints = function mapEndpoints(mapFn) { + return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); + }; + + _createClass(Interval, [{ + key: "start", + get: function get() { + return this.isValid ? this.s : null; + } + /** + * Returns the end of the Interval + * @type {DateTime} + */ + + }, { + key: "end", + get: function get() { + return this.isValid ? this.e : null; + } + /** + * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. + * @type {boolean} + */ + + }, { + key: "isValid", + get: function get() { + return this.invalidReason === null; + } + /** + * Returns an error code if this Interval is invalid, or null if the Interval is valid + * @type {string} + */ + + }, { + key: "invalidReason", + get: function get() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Interval became invalid, or null if the Interval is valid + * @type {string} + */ + + }, { + key: "invalidExplanation", + get: function get() { + return this.invalid ? this.invalid.explanation : null; + } + }]); + + return Interval; +}(); + +/** + * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. + */ + +var Info = /*#__PURE__*/function () { + function Info() {} + + /** + * Return whether the specified zone contains a DST. + * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. + * @return {boolean} + */ + Info.hasDST = function hasDST(zone) { + if (zone === void 0) { + zone = Settings.defaultZone; + } + + var proto = DateTime.now().setZone(zone).set({ + month: 12 + }); + return !zone.isUniversal && proto.offset !== proto.set({ + month: 6 + }).offset; + } + /** + * Return whether the specified zone is a valid IANA specifier. + * @param {string} zone - Zone to check + * @return {boolean} + */ + ; + + Info.isValidIANAZone = function isValidIANAZone(zone) { + return IANAZone.isValidZone(zone); + } + /** + * Converts the input into a {@link Zone} instance. + * + * * If `input` is already a Zone instance, it is returned unchanged. + * * If `input` is a string containing a valid time zone name, a Zone instance + * with that name is returned. + * * If `input` is a string that doesn't refer to a known time zone, a Zone + * instance with {@link Zone#isValid} == false is returned. + * * If `input is a number, a Zone instance with the specified fixed offset + * in minutes is returned. + * * If `input` is `null` or `undefined`, the default zone is returned. + * @param {string|Zone|number} [input] - the value to be converted + * @return {Zone} + */ + ; + + Info.normalizeZone = function normalizeZone$1(input) { + return normalizeZone(input, Settings.defaultZone); + } + /** + * Return an array of standalone month names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @example Info.months()[0] //=> 'January' + * @example Info.months('short')[0] //=> 'Jan' + * @example Info.months('numeric')[0] //=> '1' + * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' + * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' + * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' + * @return {Array} + */ + ; + + Info.months = function months(length, _temp) { + if (length === void 0) { + length = "long"; + } + + var _ref = _temp === void 0 ? {} : _temp, + _ref$locale = _ref.locale, + locale = _ref$locale === void 0 ? null : _ref$locale, + _ref$numberingSystem = _ref.numberingSystem, + numberingSystem = _ref$numberingSystem === void 0 ? null : _ref$numberingSystem, + _ref$locObj = _ref.locObj, + locObj = _ref$locObj === void 0 ? null : _ref$locObj, + _ref$outputCalendar = _ref.outputCalendar, + outputCalendar = _ref$outputCalendar === void 0 ? "gregory" : _ref$outputCalendar; + + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length); + } + /** + * Return an array of format month names. + * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that + * changes the string. + * See {@link Info#months} + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @return {Array} + */ + ; + + Info.monthsFormat = function monthsFormat(length, _temp2) { + if (length === void 0) { + length = "long"; + } + + var _ref2 = _temp2 === void 0 ? {} : _temp2, + _ref2$locale = _ref2.locale, + locale = _ref2$locale === void 0 ? null : _ref2$locale, + _ref2$numberingSystem = _ref2.numberingSystem, + numberingSystem = _ref2$numberingSystem === void 0 ? null : _ref2$numberingSystem, + _ref2$locObj = _ref2.locObj, + locObj = _ref2$locObj === void 0 ? null : _ref2$locObj, + _ref2$outputCalendar = _ref2.outputCalendar, + outputCalendar = _ref2$outputCalendar === void 0 ? "gregory" : _ref2$outputCalendar; + + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true); + } + /** + * Return an array of standalone week names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @example Info.weekdays()[0] //=> 'Monday' + * @example Info.weekdays('short')[0] //=> 'Mon' + * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' + * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' + * @return {Array} + */ + ; + + Info.weekdays = function weekdays(length, _temp3) { + if (length === void 0) { + length = "long"; + } + + var _ref3 = _temp3 === void 0 ? {} : _temp3, + _ref3$locale = _ref3.locale, + locale = _ref3$locale === void 0 ? null : _ref3$locale, + _ref3$numberingSystem = _ref3.numberingSystem, + numberingSystem = _ref3$numberingSystem === void 0 ? null : _ref3$numberingSystem, + _ref3$locObj = _ref3.locObj, + locObj = _ref3$locObj === void 0 ? null : _ref3$locObj; + + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length); + } + /** + * Return an array of format week names. + * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that + * changes the string. + * See {@link Info#weekdays} + * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale=null] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @return {Array} + */ + ; + + Info.weekdaysFormat = function weekdaysFormat(length, _temp4) { + if (length === void 0) { + length = "long"; + } + + var _ref4 = _temp4 === void 0 ? {} : _temp4, + _ref4$locale = _ref4.locale, + locale = _ref4$locale === void 0 ? null : _ref4$locale, + _ref4$numberingSystem = _ref4.numberingSystem, + numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem, + _ref4$locObj = _ref4.locObj, + locObj = _ref4$locObj === void 0 ? null : _ref4$locObj; + + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true); + } + /** + * Return an array of meridiems. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.meridiems() //=> [ 'AM', 'PM' ] + * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] + * @return {Array} + */ + ; + + Info.meridiems = function meridiems(_temp5) { + var _ref5 = _temp5 === void 0 ? {} : _temp5, + _ref5$locale = _ref5.locale, + locale = _ref5$locale === void 0 ? null : _ref5$locale; + + return Locale.create(locale).meridiems(); + } + /** + * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. + * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.eras() //=> [ 'BC', 'AD' ] + * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] + * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] + * @return {Array} + */ + ; + + Info.eras = function eras(length, _temp6) { + if (length === void 0) { + length = "short"; + } + + var _ref6 = _temp6 === void 0 ? {} : _temp6, + _ref6$locale = _ref6.locale, + locale = _ref6$locale === void 0 ? null : _ref6$locale; + + return Locale.create(locale, null, "gregory").eras(length); + } + /** + * Return the set of available features in this environment. + * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. + * Keys: + * * `relative`: whether this environment supports relative time formatting + * @example Info.features() //=> { relative: false } + * @return {Object} + */ + ; + + Info.features = function features() { + return { + relative: hasRelative() + }; + }; + + return Info; +}(); + +function dayDiff(earlier, later) { + var utcDayStart = function utcDayStart(dt) { + return dt.toUTC(0, { + keepLocalTime: true + }).startOf("day").valueOf(); + }, + ms = utcDayStart(later) - utcDayStart(earlier); + + return Math.floor(Duration.fromMillis(ms).as("days")); +} + +function highOrderDiffs(cursor, later, units) { + var differs = [["years", function (a, b) { + return b.year - a.year; + }], ["quarters", function (a, b) { + return b.quarter - a.quarter + (b.year - a.year) * 4; + }], ["months", function (a, b) { + return b.month - a.month + (b.year - a.year) * 12; + }], ["weeks", function (a, b) { + var days = dayDiff(a, b); + return (days - days % 7) / 7; + }], ["days", dayDiff]]; + var results = {}; + var lowestOrder, highWater; + + for (var _i = 0, _differs = differs; _i < _differs.length; _i++) { + var _differs$_i = _differs[_i], + unit = _differs$_i[0], + differ = _differs$_i[1]; + + if (units.indexOf(unit) >= 0) { + var _cursor$plus; + + lowestOrder = unit; + var delta = differ(cursor, later); + highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[unit] = delta, _cursor$plus)); + + if (highWater > later) { + var _cursor$plus2; + + cursor = cursor.plus((_cursor$plus2 = {}, _cursor$plus2[unit] = delta - 1, _cursor$plus2)); + delta -= 1; + } else { + cursor = highWater; + } + + results[unit] = delta; + } + } + + return [cursor, results, highWater, lowestOrder]; +} + +function _diff (earlier, later, units, opts) { + var _highOrderDiffs = highOrderDiffs(earlier, later, units), + cursor = _highOrderDiffs[0], + results = _highOrderDiffs[1], + highWater = _highOrderDiffs[2], + lowestOrder = _highOrderDiffs[3]; + + var remainingMillis = later - cursor; + var lowerOrderUnits = units.filter(function (u) { + return ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0; + }); + + if (lowerOrderUnits.length === 0) { + if (highWater < later) { + var _cursor$plus3; + + highWater = cursor.plus((_cursor$plus3 = {}, _cursor$plus3[lowestOrder] = 1, _cursor$plus3)); + } + + if (highWater !== cursor) { + results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); + } + } + + var duration = Duration.fromObject(results, opts); + + if (lowerOrderUnits.length > 0) { + var _Duration$fromMillis; + + return (_Duration$fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration); + } else { + return duration; + } +} + +var numberingSystems = { + arab: "[\u0660-\u0669]", + arabext: "[\u06F0-\u06F9]", + bali: "[\u1B50-\u1B59]", + beng: "[\u09E6-\u09EF]", + deva: "[\u0966-\u096F]", + fullwide: "[\uFF10-\uFF19]", + gujr: "[\u0AE6-\u0AEF]", + hanidec: "[〇|一|二|三|四|五|六|七|八|九]", + khmr: "[\u17E0-\u17E9]", + knda: "[\u0CE6-\u0CEF]", + laoo: "[\u0ED0-\u0ED9]", + limb: "[\u1946-\u194F]", + mlym: "[\u0D66-\u0D6F]", + mong: "[\u1810-\u1819]", + mymr: "[\u1040-\u1049]", + orya: "[\u0B66-\u0B6F]", + tamldec: "[\u0BE6-\u0BEF]", + telu: "[\u0C66-\u0C6F]", + thai: "[\u0E50-\u0E59]", + tibt: "[\u0F20-\u0F29]", + latn: "\\d" +}; +var numberingSystemsUTF16 = { + arab: [1632, 1641], + arabext: [1776, 1785], + bali: [6992, 7001], + beng: [2534, 2543], + deva: [2406, 2415], + fullwide: [65296, 65303], + gujr: [2790, 2799], + khmr: [6112, 6121], + knda: [3302, 3311], + laoo: [3792, 3801], + limb: [6470, 6479], + mlym: [3430, 3439], + mong: [6160, 6169], + mymr: [4160, 4169], + orya: [2918, 2927], + tamldec: [3046, 3055], + telu: [3174, 3183], + thai: [3664, 3673], + tibt: [3872, 3881] +}; +var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); +function parseDigits(str) { + var value = parseInt(str, 10); + + if (isNaN(value)) { + value = ""; + + for (var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + + if (str[i].search(numberingSystems.hanidec) !== -1) { + value += hanidecChars.indexOf(str[i]); + } else { + for (var key in numberingSystemsUTF16) { + var _numberingSystemsUTF = numberingSystemsUTF16[key], + min = _numberingSystemsUTF[0], + max = _numberingSystemsUTF[1]; + + if (code >= min && code <= max) { + value += code - min; + } + } + } + } + + return parseInt(value, 10); + } else { + return value; + } +} +function digitRegex(_ref, append) { + var numberingSystem = _ref.numberingSystem; + + if (append === void 0) { + append = ""; + } + + return new RegExp("" + numberingSystems[numberingSystem || "latn"] + append); +} + +var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; + +function intUnit(regex, post) { + if (post === void 0) { + post = function post(i) { + return i; + }; + } + + return { + regex: regex, + deser: function deser(_ref) { + var s = _ref[0]; + return post(parseDigits(s)); + } + }; +} + +var NBSP = String.fromCharCode(160); +var spaceOrNBSP = "[ " + NBSP + "]"; +var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); + +function fixListRegex(s) { + // make dots optional and also make them literal + // make space and non breakable space characters interchangeable + return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); +} + +function stripInsensitivities(s) { + return s.replace(/\./g, "") // ignore dots that were made optional + .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp + .toLowerCase(); +} + +function oneOf(strings, startIndex) { + if (strings === null) { + return null; + } else { + return { + regex: RegExp(strings.map(fixListRegex).join("|")), + deser: function deser(_ref2) { + var s = _ref2[0]; + return strings.findIndex(function (i) { + return stripInsensitivities(s) === stripInsensitivities(i); + }) + startIndex; + } + }; + } +} + +function offset(regex, groups) { + return { + regex: regex, + deser: function deser(_ref3) { + var h = _ref3[1], + m = _ref3[2]; + return signedOffset(h, m); + }, + groups: groups + }; +} + +function simple(regex) { + return { + regex: regex, + deser: function deser(_ref4) { + var s = _ref4[0]; + return s; + } + }; +} + +function escapeToken(value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); +} + +function unitForToken(token, loc) { + var one = digitRegex(loc), + two = digitRegex(loc, "{2}"), + three = digitRegex(loc, "{3}"), + four = digitRegex(loc, "{4}"), + six = digitRegex(loc, "{6}"), + oneOrTwo = digitRegex(loc, "{1,2}"), + oneToThree = digitRegex(loc, "{1,3}"), + oneToSix = digitRegex(loc, "{1,6}"), + oneToNine = digitRegex(loc, "{1,9}"), + twoToFour = digitRegex(loc, "{2,4}"), + fourToSix = digitRegex(loc, "{4,6}"), + literal = function literal(t) { + return { + regex: RegExp(escapeToken(t.val)), + deser: function deser(_ref5) { + var s = _ref5[0]; + return s; + }, + literal: true + }; + }, + unitate = function unitate(t) { + if (token.literal) { + return literal(t); + } + + switch (t.val) { + // era + case "G": + return oneOf(loc.eras("short", false), 0); + + case "GG": + return oneOf(loc.eras("long", false), 0); + // years + + case "y": + return intUnit(oneToSix); + + case "yy": + return intUnit(twoToFour, untruncateYear); + + case "yyyy": + return intUnit(four); + + case "yyyyy": + return intUnit(fourToSix); + + case "yyyyyy": + return intUnit(six); + // months + + case "M": + return intUnit(oneOrTwo); + + case "MM": + return intUnit(two); + + case "MMM": + return oneOf(loc.months("short", true, false), 1); + + case "MMMM": + return oneOf(loc.months("long", true, false), 1); + + case "L": + return intUnit(oneOrTwo); + + case "LL": + return intUnit(two); + + case "LLL": + return oneOf(loc.months("short", false, false), 1); + + case "LLLL": + return oneOf(loc.months("long", false, false), 1); + // dates + + case "d": + return intUnit(oneOrTwo); + + case "dd": + return intUnit(two); + // ordinals + + case "o": + return intUnit(oneToThree); + + case "ooo": + return intUnit(three); + // time + + case "HH": + return intUnit(two); + + case "H": + return intUnit(oneOrTwo); + + case "hh": + return intUnit(two); + + case "h": + return intUnit(oneOrTwo); + + case "mm": + return intUnit(two); + + case "m": + return intUnit(oneOrTwo); + + case "q": + return intUnit(oneOrTwo); + + case "qq": + return intUnit(two); + + case "s": + return intUnit(oneOrTwo); + + case "ss": + return intUnit(two); + + case "S": + return intUnit(oneToThree); + + case "SSS": + return intUnit(three); + + case "u": + return simple(oneToNine); + + case "uu": + return simple(oneOrTwo); + + case "uuu": + return intUnit(one); + // meridiem + + case "a": + return oneOf(loc.meridiems(), 0); + // weekYear (k) + + case "kkkk": + return intUnit(four); + + case "kk": + return intUnit(twoToFour, untruncateYear); + // weekNumber (W) + + case "W": + return intUnit(oneOrTwo); + + case "WW": + return intUnit(two); + // weekdays + + case "E": + case "c": + return intUnit(one); + + case "EEE": + return oneOf(loc.weekdays("short", false, false), 1); + + case "EEEE": + return oneOf(loc.weekdays("long", false, false), 1); + + case "ccc": + return oneOf(loc.weekdays("short", true, false), 1); + + case "cccc": + return oneOf(loc.weekdays("long", true, false), 1); + // offset/zone + + case "Z": + case "ZZ": + return offset(new RegExp("([+-]" + oneOrTwo.source + ")(?::(" + two.source + "))?"), 2); + + case "ZZZ": + return offset(new RegExp("([+-]" + oneOrTwo.source + ")(" + two.source + ")?"), 2); + // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing + // because we don't have any way to figure out what they are + + case "z": + return simple(/[a-z_+-/]{1,256}?/i); + + default: + return literal(t); + } + }; + + var unit = unitate(token) || { + invalidReason: MISSING_FTP + }; + unit.token = token; + return unit; +} + +var partTypeStyleToTokenVal = { + year: { + "2-digit": "yy", + numeric: "yyyyy" + }, + month: { + numeric: "M", + "2-digit": "MM", + short: "MMM", + long: "MMMM" + }, + day: { + numeric: "d", + "2-digit": "dd" + }, + weekday: { + short: "EEE", + long: "EEEE" + }, + dayperiod: "a", + dayPeriod: "a", + hour: { + numeric: "h", + "2-digit": "hh" + }, + minute: { + numeric: "m", + "2-digit": "mm" + }, + second: { + numeric: "s", + "2-digit": "ss" + }, + timeZoneName: { + long: "ZZZZZ", + short: "ZZZ" + } +}; + +function tokenForPart(part, locale, formatOpts) { + var type = part.type, + value = part.value; + + if (type === "literal") { + return { + literal: true, + val: value + }; + } + + var style = formatOpts[type]; + var val = partTypeStyleToTokenVal[type]; + + if (typeof val === "object") { + val = val[style]; + } + + if (val) { + return { + literal: false, + val: val + }; + } + + return undefined; +} + +function buildRegex(units) { + var re = units.map(function (u) { + return u.regex; + }).reduce(function (f, r) { + return f + "(" + r.source + ")"; + }, ""); + return ["^" + re + "$", units]; +} + +function match(input, regex, handlers) { + var matches = input.match(regex); + + if (matches) { + var all = {}; + var matchIndex = 1; + + for (var i in handlers) { + if (hasOwnProperty(handlers, i)) { + var h = handlers[i], + groups = h.groups ? h.groups + 1 : 1; + + if (!h.literal && h.token) { + all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); + } + + matchIndex += groups; + } + } + + return [matches, all]; + } else { + return [matches, {}]; + } +} + +function dateTimeFromMatches(matches) { + var toField = function toField(token) { + switch (token) { + case "S": + return "millisecond"; + + case "s": + return "second"; + + case "m": + return "minute"; + + case "h": + case "H": + return "hour"; + + case "d": + return "day"; + + case "o": + return "ordinal"; + + case "L": + case "M": + return "month"; + + case "y": + return "year"; + + case "E": + case "c": + return "weekday"; + + case "W": + return "weekNumber"; + + case "k": + return "weekYear"; + + case "q": + return "quarter"; + + default: + return null; + } + }; + + var zone = null; + var specificOffset; + + if (!isUndefined(matches.z)) { + zone = IANAZone.create(matches.z); + } + + if (!isUndefined(matches.Z)) { + if (!zone) { + zone = new FixedOffsetZone(matches.Z); + } + + specificOffset = matches.Z; + } + + if (!isUndefined(matches.q)) { + matches.M = (matches.q - 1) * 3 + 1; + } + + if (!isUndefined(matches.h)) { + if (matches.h < 12 && matches.a === 1) { + matches.h += 12; + } else if (matches.h === 12 && matches.a === 0) { + matches.h = 0; + } + } + + if (matches.G === 0 && matches.y) { + matches.y = -matches.y; + } + + if (!isUndefined(matches.u)) { + matches.S = parseMillis(matches.u); + } + + var vals = Object.keys(matches).reduce(function (r, k) { + var f = toField(k); + + if (f) { + r[f] = matches[k]; + } + + return r; + }, {}); + return [vals, zone, specificOffset]; +} + +var dummyDateTimeCache = null; + +function getDummyDateTime() { + if (!dummyDateTimeCache) { + dummyDateTimeCache = DateTime.fromMillis(1555555555555); + } + + return dummyDateTimeCache; +} + +function maybeExpandMacroToken(token, locale) { + if (token.literal) { + return token; + } + + var formatOpts = Formatter.macroTokenToFormatOpts(token.val); + var tokens = formatOptsToTokens(formatOpts, locale); + + if (tokens == null || tokens.includes(undefined)) { + return token; + } + + return tokens; +} + +function expandMacroTokens(tokens, locale) { + var _Array$prototype; + + return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function (t) { + return maybeExpandMacroToken(t, locale); + })); +} +/** + * @private + */ + +function explainFromTokens(locale, input, format) { + var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), + units = tokens.map(function (t) { + return unitForToken(t, locale); + }), + disqualifyingUnit = units.find(function (t) { + return t.invalidReason; + }); + + if (disqualifyingUnit) { + return { + input: input, + tokens: tokens, + invalidReason: disqualifyingUnit.invalidReason + }; + } else { + var _buildRegex = buildRegex(units), + regexString = _buildRegex[0], + handlers = _buildRegex[1], + regex = RegExp(regexString, "i"), + _match = match(input, regex, handlers), + rawMatches = _match[0], + matches = _match[1], + _ref6 = matches ? dateTimeFromMatches(matches) : [null, null, undefined], + result = _ref6[0], + zone = _ref6[1], + specificOffset = _ref6[2]; + + if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { + throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); + } + + return { + input: input, + tokens: tokens, + regex: regex, + rawMatches: rawMatches, + matches: matches, + result: result, + zone: zone, + specificOffset: specificOffset + }; + } +} +function parseFromTokens(locale, input, format) { + var _explainFromTokens = explainFromTokens(locale, input, format), + result = _explainFromTokens.result, + zone = _explainFromTokens.zone, + specificOffset = _explainFromTokens.specificOffset, + invalidReason = _explainFromTokens.invalidReason; + + return [result, zone, specificOffset, invalidReason]; +} +function formatOptsToTokens(formatOpts, locale) { + if (!formatOpts) { + return null; + } + + var formatter = Formatter.create(locale, formatOpts); + var parts = formatter.formatDateTimeParts(getDummyDateTime()); + return parts.map(function (p) { + return tokenForPart(p, locale, formatOpts); + }); +} + +var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], + leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + +function unitOutOfRange(unit, value) { + return new Invalid("unit out of range", "you specified " + value + " (of type " + typeof value + ") as a " + unit + ", which is invalid"); +} + +function dayOfWeek(year, month, day) { + var d = new Date(Date.UTC(year, month - 1, day)); + + if (year < 100 && year >= 0) { + d.setUTCFullYear(d.getUTCFullYear() - 1900); + } + + var js = d.getUTCDay(); + return js === 0 ? 7 : js; +} + +function computeOrdinal(year, month, day) { + return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; +} + +function uncomputeOrdinal(year, ordinal) { + var table = isLeapYear(year) ? leapLadder : nonLeapLadder, + month0 = table.findIndex(function (i) { + return i < ordinal; + }), + day = ordinal - table[month0]; + return { + month: month0 + 1, + day: day + }; +} +/** + * @private + */ + + +function gregorianToWeek(gregObj) { + var year = gregObj.year, + month = gregObj.month, + day = gregObj.day, + ordinal = computeOrdinal(year, month, day), + weekday = dayOfWeek(year, month, day); + var weekNumber = Math.floor((ordinal - weekday + 10) / 7), + weekYear; + + if (weekNumber < 1) { + weekYear = year - 1; + weekNumber = weeksInWeekYear(weekYear); + } else if (weekNumber > weeksInWeekYear(year)) { + weekYear = year + 1; + weekNumber = 1; + } else { + weekYear = year; + } + + return _extends({ + weekYear: weekYear, + weekNumber: weekNumber, + weekday: weekday + }, timeObject(gregObj)); +} +function weekToGregorian(weekData) { + var weekYear = weekData.weekYear, + weekNumber = weekData.weekNumber, + weekday = weekData.weekday, + weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), + yearInDays = daysInYear(weekYear); + var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, + year; + + if (ordinal < 1) { + year = weekYear - 1; + ordinal += daysInYear(year); + } else if (ordinal > yearInDays) { + year = weekYear + 1; + ordinal -= daysInYear(weekYear); + } else { + year = weekYear; + } + + var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), + month = _uncomputeOrdinal.month, + day = _uncomputeOrdinal.day; + + return _extends({ + year: year, + month: month, + day: day + }, timeObject(weekData)); +} +function gregorianToOrdinal(gregData) { + var year = gregData.year, + month = gregData.month, + day = gregData.day; + var ordinal = computeOrdinal(year, month, day); + return _extends({ + year: year, + ordinal: ordinal + }, timeObject(gregData)); +} +function ordinalToGregorian(ordinalData) { + var year = ordinalData.year, + ordinal = ordinalData.ordinal; + + var _uncomputeOrdinal2 = uncomputeOrdinal(year, ordinal), + month = _uncomputeOrdinal2.month, + day = _uncomputeOrdinal2.day; + + return _extends({ + year: year, + month: month, + day: day + }, timeObject(ordinalData)); +} +function hasInvalidWeekData(obj) { + var validYear = isInteger(obj.weekYear), + validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), + validWeekday = integerBetween(obj.weekday, 1, 7); + + if (!validYear) { + return unitOutOfRange("weekYear", obj.weekYear); + } else if (!validWeek) { + return unitOutOfRange("week", obj.week); + } else if (!validWeekday) { + return unitOutOfRange("weekday", obj.weekday); + } else return false; +} +function hasInvalidOrdinalData(obj) { + var validYear = isInteger(obj.year), + validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); + + if (!validYear) { + return unitOutOfRange("year", obj.year); + } else if (!validOrdinal) { + return unitOutOfRange("ordinal", obj.ordinal); + } else return false; +} +function hasInvalidGregorianData(obj) { + var validYear = isInteger(obj.year), + validMonth = integerBetween(obj.month, 1, 12), + validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); + + if (!validYear) { + return unitOutOfRange("year", obj.year); + } else if (!validMonth) { + return unitOutOfRange("month", obj.month); + } else if (!validDay) { + return unitOutOfRange("day", obj.day); + } else return false; +} +function hasInvalidTimeData(obj) { + var hour = obj.hour, + minute = obj.minute, + second = obj.second, + millisecond = obj.millisecond; + var validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, + validMinute = integerBetween(minute, 0, 59), + validSecond = integerBetween(second, 0, 59), + validMillisecond = integerBetween(millisecond, 0, 999); + + if (!validHour) { + return unitOutOfRange("hour", hour); + } else if (!validMinute) { + return unitOutOfRange("minute", minute); + } else if (!validSecond) { + return unitOutOfRange("second", second); + } else if (!validMillisecond) { + return unitOutOfRange("millisecond", millisecond); + } else return false; +} + +var INVALID = "Invalid DateTime"; +var MAX_DATE = 8.64e15; + +function unsupportedZone(zone) { + return new Invalid("unsupported zone", "the zone \"" + zone.name + "\" is not supported"); +} // we cache week data on the DT object and this intermediates the cache + + +function possiblyCachedWeekData(dt) { + if (dt.weekData === null) { + dt.weekData = gregorianToWeek(dt.c); + } + + return dt.weekData; +} // clone really means, "make a new object with these modifications". all "setters" really use this +// to create a new object while only changing some of the properties + + +function clone(inst, alts) { + var current = { + ts: inst.ts, + zone: inst.zone, + c: inst.c, + o: inst.o, + loc: inst.loc, + invalid: inst.invalid + }; + return new DateTime(_extends({}, current, alts, { + old: current + })); +} // find the right offset a given local time. The o input is our guess, which determines which +// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) + + +function fixOffset(localTS, o, tz) { + // Our UTC time is just a guess because our offset is just a guess + var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts + + var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done + + if (o === o2) { + return [utcGuess, o]; + } // If not, change the ts by the difference in the offset + + + utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done + + var o3 = tz.offset(utcGuess); + + if (o2 === o3) { + return [utcGuess, o2]; + } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time + + + return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; +} // convert an epoch timestamp into a calendar object with the given offset + + +function tsToObj(ts, offset) { + ts += offset * 60 * 1000; + var d = new Date(ts); + return { + year: d.getUTCFullYear(), + month: d.getUTCMonth() + 1, + day: d.getUTCDate(), + hour: d.getUTCHours(), + minute: d.getUTCMinutes(), + second: d.getUTCSeconds(), + millisecond: d.getUTCMilliseconds() + }; +} // convert a calendar object to a epoch timestamp + + +function objToTS(obj, offset, zone) { + return fixOffset(objToLocalTS(obj), offset, zone); +} // create a new DT instance by adding a duration, adjusting for DSTs + + +function adjustTime(inst, dur) { + var oPre = inst.o, + year = inst.c.year + Math.trunc(dur.years), + month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, + c = _extends({}, inst.c, { + year: year, + month: month, + day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 + }), + millisToAdd = Duration.fromObject({ + years: dur.years - Math.trunc(dur.years), + quarters: dur.quarters - Math.trunc(dur.quarters), + months: dur.months - Math.trunc(dur.months), + weeks: dur.weeks - Math.trunc(dur.weeks), + days: dur.days - Math.trunc(dur.days), + hours: dur.hours, + minutes: dur.minutes, + seconds: dur.seconds, + milliseconds: dur.milliseconds + }).as("milliseconds"), + localTS = objToLocalTS(c); + + var _fixOffset = fixOffset(localTS, oPre, inst.zone), + ts = _fixOffset[0], + o = _fixOffset[1]; + + if (millisToAdd !== 0) { + ts += millisToAdd; // that could have changed the offset by going over a DST, but we want to keep the ts the same + + o = inst.zone.offset(ts); + } + + return { + ts: ts, + o: o + }; +} // helper useful in turning the results of parsing into real dates +// by handling the zone options + + +function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) { + var setZone = opts.setZone, + zone = opts.zone; + + if (parsed && Object.keys(parsed).length !== 0) { + var interpretationZone = parsedZone || zone, + inst = DateTime.fromObject(parsed, _extends({}, opts, { + zone: interpretationZone, + specificOffset: specificOffset + })); + return setZone ? inst : inst.setZone(zone); + } else { + return DateTime.invalid(new Invalid("unparsable", "the input \"" + text + "\" can't be parsed as " + format)); + } +} // if you want to output a technical format (e.g. RFC 2822), this helper +// helps handle the details + + +function toTechFormat(dt, format, allowZ) { + if (allowZ === void 0) { + allowZ = true; + } + + return dt.isValid ? Formatter.create(Locale.create("en-US"), { + allowZ: allowZ, + forceSimple: true + }).formatDateTimeFromString(dt, format) : null; +} + +function _toISODate(o, extended) { + var longFormat = o.c.year > 9999 || o.c.year < 0; + var c = ""; + if (longFormat && o.c.year >= 0) c += "+"; + c += padStart(o.c.year, longFormat ? 6 : 4); + + if (extended) { + c += "-"; + c += padStart(o.c.month); + c += "-"; + c += padStart(o.c.day); + } else { + c += padStart(o.c.month); + c += padStart(o.c.day); + } + + return c; +} + +function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) { + var c = padStart(o.c.hour); + + if (extended) { + c += ":"; + c += padStart(o.c.minute); + + if (o.c.second !== 0 || !suppressSeconds) { + c += ":"; + } + } else { + c += padStart(o.c.minute); + } + + if (o.c.second !== 0 || !suppressSeconds) { + c += padStart(o.c.second); + + if (o.c.millisecond !== 0 || !suppressMilliseconds) { + c += "."; + c += padStart(o.c.millisecond, 3); + } + } + + if (includeOffset) { + if (o.isOffsetFixed && o.offset === 0 && !extendedZone) { + c += "Z"; + } else if (o.o < 0) { + c += "-"; + c += padStart(Math.trunc(-o.o / 60)); + c += ":"; + c += padStart(Math.trunc(-o.o % 60)); + } else { + c += "+"; + c += padStart(Math.trunc(o.o / 60)); + c += ":"; + c += padStart(Math.trunc(o.o % 60)); + } + } + + if (extendedZone) { + c += "[" + o.zone.ianaName + "]"; + } + + return c; +} // defaults for unspecified units in the supported calendars + + +var defaultUnitValues = { + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 +}, + defaultWeekUnitValues = { + weekNumber: 1, + weekday: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 +}, + defaultOrdinalUnitValues = { + ordinal: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 +}; // Units in the supported calendars, sorted by bigness + +var orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"], + orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"], + orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; // standardize case and plurality in units + +function normalizeUnit(unit) { + var normalized = { + year: "year", + years: "year", + month: "month", + months: "month", + day: "day", + days: "day", + hour: "hour", + hours: "hour", + minute: "minute", + minutes: "minute", + quarter: "quarter", + quarters: "quarter", + second: "second", + seconds: "second", + millisecond: "millisecond", + milliseconds: "millisecond", + weekday: "weekday", + weekdays: "weekday", + weeknumber: "weekNumber", + weeksnumber: "weekNumber", + weeknumbers: "weekNumber", + weekyear: "weekYear", + weekyears: "weekYear", + ordinal: "ordinal" + }[unit.toLowerCase()]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; +} // this is a dumbed down version of fromObject() that runs about 60% faster +// but doesn't do any validation, makes a bunch of assumptions about what units +// are present, and so on. + + +function quickDT(obj, opts) { + var zone = normalizeZone(opts.zone, Settings.defaultZone), + loc = Locale.fromObject(opts), + tsNow = Settings.now(); + var ts, o; // assume we have the higher-order units + + if (!isUndefined(obj.year)) { + for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits), _step; !(_step = _iterator()).done;) { + var u = _step.value; + + if (isUndefined(obj[u])) { + obj[u] = defaultUnitValues[u]; + } + } + + var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); + + if (invalid) { + return DateTime.invalid(invalid); + } + + var offsetProvis = zone.offset(tsNow); + + var _objToTS = objToTS(obj, offsetProvis, zone); + + ts = _objToTS[0]; + o = _objToTS[1]; + } else { + ts = tsNow; + } + + return new DateTime({ + ts: ts, + zone: zone, + loc: loc, + o: o + }); +} + +function diffRelative(start, end, opts) { + var round = isUndefined(opts.round) ? true : opts.round, + format = function format(c, unit) { + c = roundTo(c, round || opts.calendary ? 0 : 2, true); + var formatter = end.loc.clone(opts).relFormatter(opts); + return formatter.format(c, unit); + }, + differ = function differ(unit) { + if (opts.calendary) { + if (!end.hasSame(start, unit)) { + return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); + } else return 0; + } else { + return end.diff(start, unit).get(unit); + } + }; + + if (opts.unit) { + return format(differ(opts.unit), opts.unit); + } + + for (var _iterator2 = _createForOfIteratorHelperLoose(opts.units), _step2; !(_step2 = _iterator2()).done;) { + var unit = _step2.value; + var count = differ(unit); + + if (Math.abs(count) >= 1) { + return format(count, unit); + } + } + + return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]); +} + +function lastOpts(argList) { + var opts = {}, + args; + + if (argList.length > 0 && typeof argList[argList.length - 1] === "object") { + opts = argList[argList.length - 1]; + args = Array.from(argList).slice(0, argList.length - 1); + } else { + args = Array.from(argList); + } + + return [opts, args]; +} +/** + * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. + * + * A DateTime comprises of: + * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. + * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). + * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. + * + * Here is a brief overview of the most commonly used functionality it provides: + * + * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}. + * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month}, + * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors. + * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors. + * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors. + * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}. + * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}. + * + * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. + */ + + +var DateTime = /*#__PURE__*/function () { + /** + * @access private + */ + function DateTime(config) { + var zone = config.zone || Settings.defaultZone; + var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); + /** + * @access private + */ + + this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; + var c = null, + o = null; + + if (!invalid) { + var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); + + if (unchanged) { + var _ref = [config.old.c, config.old.o]; + c = _ref[0]; + o = _ref[1]; + } else { + var ot = zone.offset(this.ts); + c = tsToObj(this.ts, ot); + invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; + c = invalid ? null : c; + o = invalid ? null : ot; + } + } + /** + * @access private + */ + + + this._zone = zone; + /** + * @access private + */ + + this.loc = config.loc || Locale.create(); + /** + * @access private + */ + + this.invalid = invalid; + /** + * @access private + */ + + this.weekData = null; + /** + * @access private + */ + + this.c = c; + /** + * @access private + */ + + this.o = o; + /** + * @access private + */ + + this.isLuxonDateTime = true; + } // CONSTRUCT + + /** + * Create a DateTime for the current instant, in the system's time zone. + * + * Use Settings to override these default values if needed. + * @example DateTime.now().toISO() //~> now in the ISO format + * @return {DateTime} + */ + + + DateTime.now = function now() { + return new DateTime({}); + } + /** + * Create a local DateTime + * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month, 1-indexed + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @example DateTime.local() //~> now + * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time + * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 + * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 + * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale + * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 + * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC + * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 + * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 + * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 + * @return {DateTime} + */ + ; + + DateTime.local = function local() { + var _lastOpts = lastOpts(arguments), + opts = _lastOpts[0], + args = _lastOpts[1], + year = args[0], + month = args[1], + day = args[2], + hour = args[3], + minute = args[4], + second = args[5], + millisecond = args[6]; + + return quickDT({ + year: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + millisecond: millisecond + }, opts); + } + /** + * Create a DateTime in UTC + * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @param {Object} options - configuration options for the DateTime + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @example DateTime.utc() //~> now + * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z + * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z + * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z + * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale + * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z + * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale + * @return {DateTime} + */ + ; + + DateTime.utc = function utc() { + var _lastOpts2 = lastOpts(arguments), + opts = _lastOpts2[0], + args = _lastOpts2[1], + year = args[0], + month = args[1], + day = args[2], + hour = args[3], + minute = args[4], + second = args[5], + millisecond = args[6]; + + opts.zone = FixedOffsetZone.utcInstance; + return quickDT({ + year: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + millisecond: millisecond + }, opts); + } + /** + * Create a DateTime from a JavaScript Date object. Uses the default zone. + * @param {Date} date - a JavaScript Date object + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @return {DateTime} + */ + ; + + DateTime.fromJSDate = function fromJSDate(date, options) { + if (options === void 0) { + options = {}; + } + + var ts = isDate(date) ? date.valueOf() : NaN; + + if (Number.isNaN(ts)) { + return DateTime.invalid("invalid input"); + } + + var zoneToUse = normalizeZone(options.zone, Settings.defaultZone); + + if (!zoneToUse.isValid) { + return DateTime.invalid(unsupportedZone(zoneToUse)); + } + + return new DateTime({ + ts: ts, + zone: zoneToUse, + loc: Locale.fromObject(options) + }); + } + /** + * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} milliseconds - a number of milliseconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @return {DateTime} + */ + ; + + DateTime.fromMillis = function fromMillis(milliseconds, options) { + if (options === void 0) { + options = {}; + } + + if (!isNumber(milliseconds)) { + throw new InvalidArgumentError("fromMillis requires a numerical input, but received a " + typeof milliseconds + " with value " + milliseconds); + } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { + // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start + return DateTime.invalid("Timestamp out of range"); + } else { + return new DateTime({ + ts: milliseconds, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} seconds - a number of seconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @return {DateTime} + */ + ; + + DateTime.fromSeconds = function fromSeconds(seconds, options) { + if (options === void 0) { + options = {}; + } + + if (!isNumber(seconds)) { + throw new InvalidArgumentError("fromSeconds requires a numerical input"); + } else { + return new DateTime({ + ts: seconds * 1000, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.year - a year, such as 1987 + * @param {number} obj.month - a month, 1-12 + * @param {number} obj.day - a day of the month, 1-31, depending on the month + * @param {number} obj.ordinal - day of the year, 1-365 or 366 + * @param {number} obj.weekYear - an ISO week year + * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year + * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday + * @param {number} obj.hour - hour of the day, 0-23 + * @param {number} obj.minute - minute of the hour, 0-59 + * @param {number} obj.second - second of the minute, 0-59 + * @param {number} obj.millisecond - millisecond of the second, 0-999 + * @param {Object} opts - options for creating this DateTime + * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' + * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) + * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' + * @return {DateTime} + */ + ; + + DateTime.fromObject = function fromObject(obj, opts) { + if (opts === void 0) { + opts = {}; + } + + obj = obj || {}; + var zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); + + if (!zoneToUse.isValid) { + return DateTime.invalid(unsupportedZone(zoneToUse)); + } + + var tsNow = Settings.now(), + offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), + normalized = normalizeObject(obj, normalizeUnit), + containsOrdinal = !isUndefined(normalized.ordinal), + containsGregorYear = !isUndefined(normalized.year), + containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), + containsGregor = containsGregorYear || containsGregorMD, + definiteWeekDef = normalized.weekYear || normalized.weekNumber, + loc = Locale.fromObject(opts); // cases: + // just a weekday -> this week's instance of that weekday, no worries + // (gregorian data or ordinal) + (weekYear or weekNumber) -> error + // (gregorian month or day) + ordinal -> error + // otherwise just use weeks or ordinals or gregorian, depending on what's specified + + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + + var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; // configure ourselves to deal with gregorian dates or week stuff + + var units, + defaultValues, + objNow = tsToObj(tsNow, offsetProvis); + + if (useWeekData) { + units = orderedWeekUnits; + defaultValues = defaultWeekUnitValues; + objNow = gregorianToWeek(objNow); + } else if (containsOrdinal) { + units = orderedOrdinalUnits; + defaultValues = defaultOrdinalUnitValues; + objNow = gregorianToOrdinal(objNow); + } else { + units = orderedUnits; + defaultValues = defaultUnitValues; + } // set default values for missing stuff + + + var foundFirst = false; + + for (var _iterator3 = _createForOfIteratorHelperLoose(units), _step3; !(_step3 = _iterator3()).done;) { + var u = _step3.value; + var v = normalized[u]; + + if (!isUndefined(v)) { + foundFirst = true; + } else if (foundFirst) { + normalized[u] = defaultValues[u]; + } else { + normalized[u] = objNow[u]; + } + } // make sure the values we have are in range + + + var higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), + invalid = higherOrderInvalid || hasInvalidTimeData(normalized); + + if (invalid) { + return DateTime.invalid(invalid); + } // compute the actual time + + + var gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, + _objToTS2 = objToTS(gregorian, offsetProvis, zoneToUse), + tsFinal = _objToTS2[0], + offsetFinal = _objToTS2[1], + inst = new DateTime({ + ts: tsFinal, + zone: zoneToUse, + o: offsetFinal, + loc: loc + }); // gregorian data + weekday serves only to validate + + + if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { + return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of " + normalized.weekday + " and a date of " + inst.toISO()); + } + + return inst; + } + /** + * Create a DateTime from an ISO 8601 string + * @param {string} text - the ISO string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @example DateTime.fromISO('2016-05-25T09:08:34.123') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) + * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) + * @example DateTime.fromISO('2016-W05-4') + * @return {DateTime} + */ + ; + + DateTime.fromISO = function fromISO(text, opts) { + if (opts === void 0) { + opts = {}; + } + + var _parseISODate = parseISODate(text), + vals = _parseISODate[0], + parsedZone = _parseISODate[1]; + + return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); + } + /** + * Create a DateTime from an RFC 2822 string + * @param {string} text - the RFC 2822 string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') + * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') + * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') + * @return {DateTime} + */ + ; + + DateTime.fromRFC2822 = function fromRFC2822(text, opts) { + if (opts === void 0) { + opts = {}; + } + + var _parseRFC2822Date = parseRFC2822Date(text), + vals = _parseRFC2822Date[0], + parsedZone = _parseRFC2822Date[1]; + + return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); + } + /** + * Create a DateTime from an HTTP header date + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @param {string} text - the HTTP header date + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') + * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') + * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') + * @return {DateTime} + */ + ; + + DateTime.fromHTTP = function fromHTTP(text, opts) { + if (opts === void 0) { + opts = {}; + } + + var _parseHTTPDate = parseHTTPDate(text), + vals = _parseHTTPDate[0], + parsedZone = _parseHTTPDate[1]; + + return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); + } + /** + * Create a DateTime from an input string and format string. + * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @return {DateTime} + */ + ; + + DateTime.fromFormat = function fromFormat(text, fmt, opts) { + if (opts === void 0) { + opts = {}; + } + + if (isUndefined(text) || isUndefined(fmt)) { + throw new InvalidArgumentError("fromFormat requires an input string and a format"); + } + + var _opts = opts, + _opts$locale = _opts.locale, + locale = _opts$locale === void 0 ? null : _opts$locale, + _opts$numberingSystem = _opts.numberingSystem, + numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, + localeToUse = Locale.fromOpts({ + locale: locale, + numberingSystem: numberingSystem, + defaultToEN: true + }), + _parseFromTokens = parseFromTokens(localeToUse, text, fmt), + vals = _parseFromTokens[0], + parsedZone = _parseFromTokens[1], + specificOffset = _parseFromTokens[2], + invalid = _parseFromTokens[3]; + + if (invalid) { + return DateTime.invalid(invalid); + } else { + return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text, specificOffset); + } + } + /** + * @deprecated use fromFormat instead + */ + ; + + DateTime.fromString = function fromString(text, fmt, opts) { + if (opts === void 0) { + opts = {}; + } + + return DateTime.fromFormat(text, fmt, opts); + } + /** + * Create a DateTime from a SQL date, time, or datetime + * Defaults to en-US if no locale has been specified, regardless of the system's locale + * @param {string} text - the string to parse + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @example DateTime.fromSQL('2017-05-15') + * @example DateTime.fromSQL('2017-05-15 09:12:34') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) + * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) + * @example DateTime.fromSQL('09:12:34.342') + * @return {DateTime} + */ + ; + + DateTime.fromSQL = function fromSQL(text, opts) { + if (opts === void 0) { + opts = {}; + } + + var _parseSQL = parseSQL(text), + vals = _parseSQL[0], + parsedZone = _parseSQL[1]; + + return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); + } + /** + * Create an invalid DateTime. + * @param {DateTime} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {DateTime} + */ + ; + + DateTime.invalid = function invalid(reason, explanation) { + if (explanation === void 0) { + explanation = null; + } + + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); + } + + var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + + if (Settings.throwOnInvalid) { + throw new InvalidDateTimeError(invalid); + } else { + return new DateTime({ + invalid: invalid + }); + } + } + /** + * Check if an object is an instance of DateTime. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + ; + + DateTime.isDateTime = function isDateTime(o) { + return o && o.isLuxonDateTime || false; + } + /** + * Produce the format string for a set of options + * @param formatOpts + * @param localeOpts + * @returns {string} + */ + ; + + DateTime.parseFormatForOpts = function parseFormatForOpts(formatOpts, localeOpts) { + if (localeOpts === void 0) { + localeOpts = {}; + } + + var tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts)); + return !tokenList ? null : tokenList.map(function (t) { + return t ? t.val : null; + }).join(""); + } + /** + * Produce the the fully expanded format token for the locale + * Does NOT quote characters, so quoted tokens will not round trip correctly + * @param fmt + * @param localeOpts + * @returns {string} + */ + ; + + DateTime.expandFormat = function expandFormat(fmt, localeOpts) { + if (localeOpts === void 0) { + localeOpts = {}; + } + + var expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts)); + return expanded.map(function (t) { + return t.val; + }).join(""); + } // INFO + + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 + * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 + * @return {number} + */ + ; + + var _proto = DateTime.prototype; + + _proto.get = function get(unit) { + return this[unit]; + } + /** + * Returns whether the DateTime is valid. Invalid DateTimes occur when: + * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 + * * The DateTime was created by an operation on another invalid date + * @type {boolean} + */ + ; + + /** + * Returns the resolved Intl options for this DateTime. + * This is useful in understanding the behavior of formatting methods + * @param {Object} opts - the same options as toLocaleString + * @return {Object} + */ + _proto.resolvedLocaleOptions = function resolvedLocaleOptions(opts) { + if (opts === void 0) { + opts = {}; + } + + var _Formatter$create$res = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this), + locale = _Formatter$create$res.locale, + numberingSystem = _Formatter$create$res.numberingSystem, + calendar = _Formatter$create$res.calendar; + + return { + locale: locale, + numberingSystem: numberingSystem, + outputCalendar: calendar + }; + } // TRANSFORM + + /** + * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. + * + * Equivalent to {@link DateTime#setZone}('utc') + * @param {number} [offset=0] - optionally, an offset from UTC in minutes + * @param {Object} [opts={}] - options to pass to `setZone()` + * @return {DateTime} + */ + ; + + _proto.toUTC = function toUTC(offset, opts) { + if (offset === void 0) { + offset = 0; + } + + if (opts === void 0) { + opts = {}; + } + + return this.setZone(FixedOffsetZone.instance(offset), opts); + } + /** + * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. + * + * Equivalent to `setZone('local')` + * @return {DateTime} + */ + ; + + _proto.toLocal = function toLocal() { + return this.setZone(Settings.defaultZone); + } + /** + * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. + * + * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. + * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. + * @param {Object} opts - options + * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. + * @return {DateTime} + */ + ; + + _proto.setZone = function setZone(zone, _temp) { + var _ref2 = _temp === void 0 ? {} : _temp, + _ref2$keepLocalTime = _ref2.keepLocalTime, + keepLocalTime = _ref2$keepLocalTime === void 0 ? false : _ref2$keepLocalTime, + _ref2$keepCalendarTim = _ref2.keepCalendarTime, + keepCalendarTime = _ref2$keepCalendarTim === void 0 ? false : _ref2$keepCalendarTim; + + zone = normalizeZone(zone, Settings.defaultZone); + + if (zone.equals(this.zone)) { + return this; + } else if (!zone.isValid) { + return DateTime.invalid(unsupportedZone(zone)); + } else { + var newTS = this.ts; + + if (keepLocalTime || keepCalendarTime) { + var offsetGuess = zone.offset(this.ts); + var asObj = this.toObject(); + + var _objToTS3 = objToTS(asObj, offsetGuess, zone); + + newTS = _objToTS3[0]; + } + + return clone(this, { + ts: newTS, + zone: zone + }); + } + } + /** + * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. + * @param {Object} properties - the properties to set + * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) + * @return {DateTime} + */ + ; + + _proto.reconfigure = function reconfigure(_temp2) { + var _ref3 = _temp2 === void 0 ? {} : _temp2, + locale = _ref3.locale, + numberingSystem = _ref3.numberingSystem, + outputCalendar = _ref3.outputCalendar; + + var loc = this.loc.clone({ + locale: locale, + numberingSystem: numberingSystem, + outputCalendar: outputCalendar + }); + return clone(this, { + loc: loc + }); + } + /** + * "Set" the locale. Returns a newly-constructed DateTime. + * Just a convenient alias for reconfigure({ locale }) + * @example DateTime.local(2017, 5, 25).setLocale('en-GB') + * @return {DateTime} + */ + ; + + _proto.setLocale = function setLocale(locale) { + return this.reconfigure({ + locale: locale + }); + } + /** + * "Set" the values of specified units. Returns a newly-constructed DateTime. + * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. + * @param {Object} values - a mapping of units to numbers + * @example dt.set({ year: 2017 }) + * @example dt.set({ hour: 8, minute: 30 }) + * @example dt.set({ weekday: 5 }) + * @example dt.set({ year: 2005, ordinal: 234 }) + * @return {DateTime} + */ + ; + + _proto.set = function set(values) { + if (!this.isValid) return this; + var normalized = normalizeObject(values, normalizeUnit), + settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), + containsOrdinal = !isUndefined(normalized.ordinal), + containsGregorYear = !isUndefined(normalized.year), + containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), + containsGregor = containsGregorYear || containsGregorMD, + definiteWeekDef = normalized.weekYear || normalized.weekNumber; + + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + + var mixed; + + if (settingWeekStuff) { + mixed = weekToGregorian(_extends({}, gregorianToWeek(this.c), normalized)); + } else if (!isUndefined(normalized.ordinal)) { + mixed = ordinalToGregorian(_extends({}, gregorianToOrdinal(this.c), normalized)); + } else { + mixed = _extends({}, this.toObject(), normalized); // if we didn't set the day but we ended up on an overflow date, + // use the last day of the right month + + if (isUndefined(normalized.day)) { + mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); + } + } + + var _objToTS4 = objToTS(mixed, this.o, this.zone), + ts = _objToTS4[0], + o = _objToTS4[1]; + + return clone(this, { + ts: ts, + o: o + }); + } + /** + * Add a period of time to this DateTime and return the resulting DateTime + * + * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @example DateTime.now().plus(123) //~> in 123 milliseconds + * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes + * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow + * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday + * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min + * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min + * @return {DateTime} + */ + ; + + _proto.plus = function plus(duration) { + if (!this.isValid) return this; + var dur = Duration.fromDurationLike(duration); + return clone(this, adjustTime(this, dur)); + } + /** + * Subtract a period of time to this DateTime and return the resulting DateTime + * See {@link DateTime#plus} + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + @return {DateTime} + */ + ; + + _proto.minus = function minus(duration) { + if (!this.isValid) return this; + var dur = Duration.fromDurationLike(duration).negate(); + return clone(this, adjustTime(this, dur)); + } + /** + * "Set" this DateTime to the beginning of a unit of time. + * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' + * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' + * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' + * @return {DateTime} + */ + ; + + _proto.startOf = function startOf(unit) { + if (!this.isValid) return this; + var o = {}, + normalizedUnit = Duration.normalizeUnit(unit); + + switch (normalizedUnit) { + case "years": + o.month = 1; + // falls through + + case "quarters": + case "months": + o.day = 1; + // falls through + + case "weeks": + case "days": + o.hour = 0; + // falls through + + case "hours": + o.minute = 0; + // falls through + + case "minutes": + o.second = 0; + // falls through + + case "seconds": + o.millisecond = 0; + break; + // no default, invalid units throw in normalizeUnit() + } + + if (normalizedUnit === "weeks") { + o.weekday = 1; + } + + if (normalizedUnit === "quarters") { + var q = Math.ceil(this.month / 3); + o.month = (q - 1) * 3 + 1; + } + + return this.set(o); + } + /** + * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time + * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' + * @return {DateTime} + */ + ; + + _proto.endOf = function endOf(unit) { + var _this$plus; + + return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit).minus(1) : this; + } // OUTPUT + + /** + * Returns a string representation of this DateTime formatted according to the specified format string. + * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). + * Defaults to en-US if no locale has been specified, regardless of the system's locale. + * @param {string} fmt - the format string + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' + * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' + * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' + * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' + * @return {string} + */ + ; + + _proto.toFormat = function toFormat(fmt, opts) { + if (opts === void 0) { + opts = {}; + } + + return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID; + } + /** + * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. + * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation + * of the DateTime in the assigned locale. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toLocaleString(); //=> 4/20/2017 + * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' + * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' + * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' + * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' + * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' + * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' + * @return {string} + */ + ; + + _proto.toLocaleString = function toLocaleString(formatOpts, opts) { + if (formatOpts === void 0) { + formatOpts = DATE_SHORT; + } + + if (opts === void 0) { + opts = {}; + } + + return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID; + } + /** + * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts + * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. + * @example DateTime.now().toLocaleParts(); //=> [ + * //=> { type: 'day', value: '25' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'month', value: '05' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'year', value: '1982' } + * //=> ] + */ + ; + + _proto.toLocaleParts = function toLocaleParts(opts) { + if (opts === void 0) { + opts = {}; + } + + return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=false] - add the time zone format extension + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' + * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' + * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' + * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' + * @return {string} + */ + ; + + _proto.toISO = function toISO(_temp3) { + var _ref4 = _temp3 === void 0 ? {} : _temp3, + _ref4$format = _ref4.format, + format = _ref4$format === void 0 ? "extended" : _ref4$format, + _ref4$suppressSeconds = _ref4.suppressSeconds, + suppressSeconds = _ref4$suppressSeconds === void 0 ? false : _ref4$suppressSeconds, + _ref4$suppressMillise = _ref4.suppressMilliseconds, + suppressMilliseconds = _ref4$suppressMillise === void 0 ? false : _ref4$suppressMillise, + _ref4$includeOffset = _ref4.includeOffset, + includeOffset = _ref4$includeOffset === void 0 ? true : _ref4$includeOffset, + _ref4$extendedZone = _ref4.extendedZone, + extendedZone = _ref4$extendedZone === void 0 ? false : _ref4$extendedZone; + + if (!this.isValid) { + return null; + } + + var ext = format === "extended"; + + var c = _toISODate(this, ext); + + c += "T"; + c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + return c; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's date component + * @param {Object} opts - options + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' + * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' + * @return {string} + */ + ; + + _proto.toISODate = function toISODate(_temp4) { + var _ref5 = _temp4 === void 0 ? {} : _temp4, + _ref5$format = _ref5.format, + format = _ref5$format === void 0 ? "extended" : _ref5$format; + + if (!this.isValid) { + return null; + } + + return _toISODate(this, format === "extended"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's week date + * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' + * @return {string} + */ + ; + + _proto.toISOWeekDate = function toISOWeekDate() { + return toTechFormat(this, "kkkk-'W'WW-c"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's time component + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=true] - add the time zone format extension + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' + * @return {string} + */ + ; + + _proto.toISOTime = function toISOTime(_temp5) { + var _ref6 = _temp5 === void 0 ? {} : _temp5, + _ref6$suppressMillise = _ref6.suppressMilliseconds, + suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise, + _ref6$suppressSeconds = _ref6.suppressSeconds, + suppressSeconds = _ref6$suppressSeconds === void 0 ? false : _ref6$suppressSeconds, + _ref6$includeOffset = _ref6.includeOffset, + includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset, + _ref6$includePrefix = _ref6.includePrefix, + includePrefix = _ref6$includePrefix === void 0 ? false : _ref6$includePrefix, + _ref6$extendedZone = _ref6.extendedZone, + extendedZone = _ref6$extendedZone === void 0 ? false : _ref6$extendedZone, + _ref6$format = _ref6.format, + format = _ref6$format === void 0 ? "extended" : _ref6$format; + + if (!this.isValid) { + return null; + } + + var c = includePrefix ? "T" : ""; + return c + _toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + } + /** + * Returns an RFC 2822-compatible string representation of this DateTime + * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' + * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' + * @return {string} + */ + ; + + _proto.toRFC2822 = function toRFC2822() { + return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); + } + /** + * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. + * Specifically, the string conforms to RFC 1123. + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' + * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' + * @return {string} + */ + ; + + _proto.toHTTP = function toHTTP() { + return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Date + * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' + * @return {string} + */ + ; + + _proto.toSQLDate = function toSQLDate() { + if (!this.isValid) { + return null; + } + + return _toISODate(this, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Time + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc().toSQL() //=> '05:15:16.345' + * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' + * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' + * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' + * @return {string} + */ + ; + + _proto.toSQLTime = function toSQLTime(_temp6) { + var _ref7 = _temp6 === void 0 ? {} : _temp6, + _ref7$includeOffset = _ref7.includeOffset, + includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, + _ref7$includeZone = _ref7.includeZone, + includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone, + _ref7$includeOffsetSp = _ref7.includeOffsetSpace, + includeOffsetSpace = _ref7$includeOffsetSp === void 0 ? true : _ref7$includeOffsetSp; + + var fmt = "HH:mm:ss.SSS"; + + if (includeZone || includeOffset) { + if (includeOffsetSpace) { + fmt += " "; + } + + if (includeZone) { + fmt += "z"; + } else if (includeOffset) { + fmt += "ZZ"; + } + } + + return toTechFormat(this, fmt, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL DateTime + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' + * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' + * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' + * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' + * @return {string} + */ + ; + + _proto.toSQL = function toSQL(opts) { + if (opts === void 0) { + opts = {}; + } + + if (!this.isValid) { + return null; + } + + return this.toSQLDate() + " " + this.toSQLTime(opts); + } + /** + * Returns a string representation of this DateTime appropriate for debugging + * @return {string} + */ + ; + + _proto.toString = function toString() { + return this.isValid ? this.toISO() : INVALID; + } + /** + * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} + * @return {number} + */ + ; + + _proto.valueOf = function valueOf() { + return this.toMillis(); + } + /** + * Returns the epoch milliseconds of this DateTime. + * @return {number} + */ + ; + + _proto.toMillis = function toMillis() { + return this.isValid ? this.ts : NaN; + } + /** + * Returns the epoch seconds of this DateTime. + * @return {number} + */ + ; + + _proto.toSeconds = function toSeconds() { + return this.isValid ? this.ts / 1000 : NaN; + } + /** + * Returns the epoch seconds (as a whole number) of this DateTime. + * @return {number} + */ + ; + + _proto.toUnixInteger = function toUnixInteger() { + return this.isValid ? Math.floor(this.ts / 1000) : NaN; + } + /** + * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. + * @return {string} + */ + ; + + _proto.toJSON = function toJSON() { + return this.toISO(); + } + /** + * Returns a BSON serializable equivalent to this DateTime. + * @return {Date} + */ + ; + + _proto.toBSON = function toBSON() { + return this.toJSDate(); + } + /** + * Returns a JavaScript object with this DateTime's year, month, day, and so on. + * @param opts - options for generating the object + * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output + * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } + * @return {Object} + */ + ; + + _proto.toObject = function toObject(opts) { + if (opts === void 0) { + opts = {}; + } + + if (!this.isValid) return {}; + + var base = _extends({}, this.c); + + if (opts.includeConfig) { + base.outputCalendar = this.outputCalendar; + base.numberingSystem = this.loc.numberingSystem; + base.locale = this.loc.locale; + } + + return base; + } + /** + * Returns a JavaScript Date equivalent to this DateTime. + * @return {Date} + */ + ; + + _proto.toJSDate = function toJSDate() { + return new Date(this.isValid ? this.ts : NaN); + } // COMPARE + + /** + * Return the difference between two DateTimes as a Duration. + * @param {DateTime} otherDateTime - the DateTime to compare this one to + * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example + * var i1 = DateTime.fromISO('1982-05-25T09:45'), + * i2 = DateTime.fromISO('1983-10-14T10:30'); + * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } + * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } + * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } + * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } + * @return {Duration} + */ + ; + + _proto.diff = function diff(otherDateTime, unit, opts) { + if (unit === void 0) { + unit = "milliseconds"; + } + + if (opts === void 0) { + opts = {}; + } + + if (!this.isValid || !otherDateTime.isValid) { + return Duration.invalid("created by diffing an invalid DateTime"); + } + + var durOpts = _extends({ + locale: this.locale, + numberingSystem: this.numberingSystem + }, opts); + + var units = maybeArray(unit).map(Duration.normalizeUnit), + otherIsLater = otherDateTime.valueOf() > this.valueOf(), + earlier = otherIsLater ? this : otherDateTime, + later = otherIsLater ? otherDateTime : this, + diffed = _diff(earlier, later, units, durOpts); + + return otherIsLater ? diffed.negate() : diffed; + } + /** + * Return the difference between this DateTime and right now. + * See {@link DateTime#diff} + * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + ; + + _proto.diffNow = function diffNow(unit, opts) { + if (unit === void 0) { + unit = "milliseconds"; + } + + if (opts === void 0) { + opts = {}; + } + + return this.diff(DateTime.now(), unit, opts); + } + /** + * Return an Interval spanning between this DateTime and another DateTime + * @param {DateTime} otherDateTime - the other end point of the Interval + * @return {Interval} + */ + ; + + _proto.until = function until(otherDateTime) { + return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; + } + /** + * Return whether this DateTime is in the same unit of time as another DateTime. + * Higher-order units must also be identical for this function to return `true`. + * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. + * @param {DateTime} otherDateTime - the other DateTime + * @param {string} unit - the unit of time to check sameness on + * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day + * @return {boolean} + */ + ; + + _proto.hasSame = function hasSame(otherDateTime, unit) { + if (!this.isValid) return false; + var inputMs = otherDateTime.valueOf(); + var adjustedToZone = this.setZone(otherDateTime.zone, { + keepLocalTime: true + }); + return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit); + } + /** + * Equality check + * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. + * To compare just the millisecond values, use `+dt1 === +dt2`. + * @param {DateTime} other - the other DateTime + * @return {boolean} + */ + ; + + _proto.equals = function equals(other) { + return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); + } + /** + * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your + * platform supports Intl.RelativeTimeFormat. Rounds down by default. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" + * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" + * @param {boolean} [options.round=true] - whether to round the numbers in the output. + * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" + * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" + * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" + * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" + * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" + * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" + */ + ; + + _proto.toRelative = function toRelative(options) { + if (options === void 0) { + options = {}; + } + + if (!this.isValid) return null; + var base = options.base || DateTime.fromObject({}, { + zone: this.zone + }), + padding = options.padding ? this < base ? -options.padding : options.padding : 0; + var units = ["years", "months", "days", "hours", "minutes", "seconds"]; + var unit = options.unit; + + if (Array.isArray(options.unit)) { + units = options.unit; + unit = undefined; + } + + return diffRelative(base, this.plus(padding), _extends({}, options, { + numeric: "always", + units: units, + unit: unit + })); + } + /** + * Returns a string representation of this date relative to today, such as "yesterday" or "next month". + * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" + * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" + * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" + */ + ; + + _proto.toRelativeCalendar = function toRelativeCalendar(options) { + if (options === void 0) { + options = {}; + } + + if (!this.isValid) return null; + return diffRelative(options.base || DateTime.fromObject({}, { + zone: this.zone + }), this, _extends({}, options, { + numeric: "auto", + units: ["years", "months", "days"], + calendary: true + })); + } + /** + * Return the min of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum + * @return {DateTime} the min DateTime, or undefined if called with no argument + */ + ; + + DateTime.min = function min() { + for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { + dateTimes[_key] = arguments[_key]; + } + + if (!dateTimes.every(DateTime.isDateTime)) { + throw new InvalidArgumentError("min requires all arguments be DateTimes"); + } + + return bestBy(dateTimes, function (i) { + return i.valueOf(); + }, Math.min); + } + /** + * Return the max of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum + * @return {DateTime} the max DateTime, or undefined if called with no argument + */ + ; + + DateTime.max = function max() { + for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + dateTimes[_key2] = arguments[_key2]; + } + + if (!dateTimes.every(DateTime.isDateTime)) { + throw new InvalidArgumentError("max requires all arguments be DateTimes"); + } + + return bestBy(dateTimes, function (i) { + return i.valueOf(); + }, Math.max); + } // MISC + + /** + * Explain how a string would be parsed by fromFormat() + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see description) + * @param {Object} options - options taken by fromFormat() + * @return {Object} + */ + ; + + DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + _options$locale = _options.locale, + locale = _options$locale === void 0 ? null : _options$locale, + _options$numberingSys = _options.numberingSystem, + numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, + localeToUse = Locale.fromOpts({ + locale: locale, + numberingSystem: numberingSystem, + defaultToEN: true + }); + return explainFromTokens(localeToUse, text, fmt); + } + /** + * @deprecated use fromFormatExplain instead + */ + ; + + DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) { + if (options === void 0) { + options = {}; + } + + return DateTime.fromFormatExplain(text, fmt, options); + } // FORMAT PRESETS + + /** + * {@link DateTime#toLocaleString} format like 10/14/1983 + * @type {Object} + */ + ; + + _createClass(DateTime, [{ + key: "isValid", + get: function get() { + return this.invalid === null; + } + /** + * Returns an error code if this DateTime is invalid, or null if the DateTime is valid + * @type {string} + */ + + }, { + key: "invalidReason", + get: function get() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid + * @type {string} + */ + + }, { + key: "invalidExplanation", + get: function get() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime + * + * @type {string} + */ + + }, { + key: "locale", + get: function get() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime + * + * @type {string} + */ + + }, { + key: "numberingSystem", + get: function get() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime + * + * @type {string} + */ + + }, { + key: "outputCalendar", + get: function get() { + return this.isValid ? this.loc.outputCalendar : null; + } + /** + * Get the time zone associated with this DateTime. + * @type {Zone} + */ + + }, { + key: "zone", + get: function get() { + return this._zone; + } + /** + * Get the name of the time zone. + * @type {string} + */ + + }, { + key: "zoneName", + get: function get() { + return this.isValid ? this.zone.name : null; + } + /** + * Get the year + * @example DateTime.local(2017, 5, 25).year //=> 2017 + * @type {number} + */ + + }, { + key: "year", + get: function get() { + return this.isValid ? this.c.year : NaN; + } + /** + * Get the quarter + * @example DateTime.local(2017, 5, 25).quarter //=> 2 + * @type {number} + */ + + }, { + key: "quarter", + get: function get() { + return this.isValid ? Math.ceil(this.c.month / 3) : NaN; + } + /** + * Get the month (1-12). + * @example DateTime.local(2017, 5, 25).month //=> 5 + * @type {number} + */ + + }, { + key: "month", + get: function get() { + return this.isValid ? this.c.month : NaN; + } + /** + * Get the day of the month (1-30ish). + * @example DateTime.local(2017, 5, 25).day //=> 25 + * @type {number} + */ + + }, { + key: "day", + get: function get() { + return this.isValid ? this.c.day : NaN; + } + /** + * Get the hour of the day (0-23). + * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 + * @type {number} + */ + + }, { + key: "hour", + get: function get() { + return this.isValid ? this.c.hour : NaN; + } + /** + * Get the minute of the hour (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 + * @type {number} + */ + + }, { + key: "minute", + get: function get() { + return this.isValid ? this.c.minute : NaN; + } + /** + * Get the second of the minute (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 + * @type {number} + */ + + }, { + key: "second", + get: function get() { + return this.isValid ? this.c.second : NaN; + } + /** + * Get the millisecond of the second (0-999). + * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 + * @type {number} + */ + + }, { + key: "millisecond", + get: function get() { + return this.isValid ? this.c.millisecond : NaN; + } + /** + * Get the week year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 + * @type {number} + */ + + }, { + key: "weekYear", + get: function get() { + return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; + } + /** + * Get the week number of the week year (1-52ish). + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 + * @type {number} + */ + + }, { + key: "weekNumber", + get: function get() { + return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; + } + /** + * Get the day of the week. + * 1 is Monday and 7 is Sunday + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 11, 31).weekday //=> 4 + * @type {number} + */ + + }, { + key: "weekday", + get: function get() { + return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; + } + /** + * Get the ordinal (meaning the day of the year) + * @example DateTime.local(2017, 5, 25).ordinal //=> 145 + * @type {number|DateTime} + */ + + }, { + key: "ordinal", + get: function get() { + return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; + } + /** + * Get the human readable short month name, such as 'Oct'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthShort //=> Oct + * @type {string} + */ + + }, { + key: "monthShort", + get: function get() { + return this.isValid ? Info.months("short", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable long month name, such as 'October'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthLong //=> October + * @type {string} + */ + + }, { + key: "monthLong", + get: function get() { + return this.isValid ? Info.months("long", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable short weekday, such as 'Mon'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon + * @type {string} + */ + + }, { + key: "weekdayShort", + get: function get() { + return this.isValid ? Info.weekdays("short", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the human readable long weekday, such as 'Monday'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday + * @type {string} + */ + + }, { + key: "weekdayLong", + get: function get() { + return this.isValid ? Info.weekdays("long", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the UTC offset of this DateTime in minutes + * @example DateTime.now().offset //=> -240 + * @example DateTime.utc().offset //=> 0 + * @type {number} + */ + + }, { + key: "offset", + get: function get() { + return this.isValid ? +this.o : NaN; + } + /** + * Get the short human name for the zone's current offset, for example "EST" or "EDT". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + + }, { + key: "offsetNameShort", + get: function get() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "short", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + + }, { + key: "offsetNameLong", + get: function get() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "long", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get whether this zone's offset ever changes, as in a DST. + * @type {boolean} + */ + + }, { + key: "isOffsetFixed", + get: function get() { + return this.isValid ? this.zone.isUniversal : null; + } + /** + * Get whether the DateTime is in a DST. + * @type {boolean} + */ + + }, { + key: "isInDST", + get: function get() { + if (this.isOffsetFixed) { + return false; + } else { + return this.offset > this.set({ + month: 1, + day: 1 + }).offset || this.offset > this.set({ + month: 5 + }).offset; + } + } + /** + * Returns true if this DateTime is in a leap year, false otherwise + * @example DateTime.local(2016).isInLeapYear //=> true + * @example DateTime.local(2013).isInLeapYear //=> false + * @type {boolean} + */ + + }, { + key: "isInLeapYear", + get: function get() { + return isLeapYear(this.year); + } + /** + * Returns the number of days in this DateTime's month + * @example DateTime.local(2016, 2).daysInMonth //=> 29 + * @example DateTime.local(2016, 3).daysInMonth //=> 31 + * @type {number} + */ + + }, { + key: "daysInMonth", + get: function get() { + return daysInMonth(this.year, this.month); + } + /** + * Returns the number of days in this DateTime's year + * @example DateTime.local(2016).daysInYear //=> 366 + * @example DateTime.local(2013).daysInYear //=> 365 + * @type {number} + */ + + }, { + key: "daysInYear", + get: function get() { + return this.isValid ? daysInYear(this.year) : NaN; + } + /** + * Returns the number of weeks in this DateTime's year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2004).weeksInWeekYear //=> 53 + * @example DateTime.local(2013).weeksInWeekYear //=> 52 + * @type {number} + */ + + }, { + key: "weeksInWeekYear", + get: function get() { + return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; + } + }], [{ + key: "DATE_SHORT", + get: function get() { + return DATE_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' + * @type {Object} + */ + + }, { + key: "DATE_MED", + get: function get() { + return DATE_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' + * @type {Object} + */ + + }, { + key: "DATE_MED_WITH_WEEKDAY", + get: function get() { + return DATE_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983' + * @type {Object} + */ + + }, { + key: "DATE_FULL", + get: function get() { + return DATE_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' + * @type {Object} + */ + + }, { + key: "DATE_HUGE", + get: function get() { + return DATE_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "TIME_SIMPLE", + get: function get() { + return TIME_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "TIME_WITH_SECONDS", + get: function get() { + return TIME_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "TIME_WITH_SHORT_OFFSET", + get: function get() { + return TIME_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "TIME_WITH_LONG_OFFSET", + get: function get() { + return TIME_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. + * @type {Object} + */ + + }, { + key: "TIME_24_SIMPLE", + get: function get() { + return TIME_24_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. + * @type {Object} + */ + + }, { + key: "TIME_24_WITH_SECONDS", + get: function get() { + return TIME_24_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. + * @type {Object} + */ + + }, { + key: "TIME_24_WITH_SHORT_OFFSET", + get: function get() { + return TIME_24_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. + * @type {Object} + */ + + }, { + key: "TIME_24_WITH_LONG_OFFSET", + get: function get() { + return TIME_24_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_SHORT", + get: function get() { + return DATETIME_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_SHORT_WITH_SECONDS", + get: function get() { + return DATETIME_SHORT_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_MED", + get: function get() { + return DATETIME_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_MED_WITH_SECONDS", + get: function get() { + return DATETIME_MED_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_MED_WITH_WEEKDAY", + get: function get() { + return DATETIME_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_FULL", + get: function get() { + return DATETIME_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_FULL_WITH_SECONDS", + get: function get() { + return DATETIME_FULL_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_HUGE", + get: function get() { + return DATETIME_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + + }, { + key: "DATETIME_HUGE_WITH_SECONDS", + get: function get() { + return DATETIME_HUGE_WITH_SECONDS; + } + }]); + + return DateTime; +}(); +function friendlyDateTime(dateTimeish) { + if (DateTime.isDateTime(dateTimeish)) { + return dateTimeish; + } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { + return DateTime.fromJSDate(dateTimeish); + } else if (dateTimeish && typeof dateTimeish === "object") { + return DateTime.fromObject(dateTimeish); + } else { + throw new InvalidArgumentError("Unknown datetime argument: " + dateTimeish + ", of type " + typeof dateTimeish); + } +} + +var VERSION = "3.0.4"; + +exports.DateTime = DateTime; +exports.Duration = Duration; +exports.FixedOffsetZone = FixedOffsetZone; +exports.IANAZone = IANAZone; +exports.Info = Info; +exports.Interval = Interval; +exports.InvalidZone = InvalidZone; +exports.Settings = Settings; +exports.SystemZone = SystemZone; +exports.VERSION = VERSION; +exports.Zone = Zone; +//# sourceMappingURL=luxon.js.map + + +/***/ }), + +/***/ "1Evb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV4Instrumentation", function() { return reactRouterV4Instrumentation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV5Instrumentation", function() { return reactRouterV5Instrumentation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withSentryRouting", function() { return withSentryRouting; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); + + + + +const _jsxFileName = "/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouter.tsx"; +// We need to disable eslint no-explict-any because any is required for the +// react-router typings. +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/* eslint-enable @typescript-eslint/no-explicit-any */ + +let activeTransaction; + +function reactRouterV4Instrumentation( + history, + routes, + matchPath, +) { + return createReactRouterInstrumentation(history, 'react-router-v4', routes, matchPath); +} + +function reactRouterV5Instrumentation( + history, + routes, + matchPath, +) { + return createReactRouterInstrumentation(history, 'react-router-v5', routes, matchPath); +} + +function createReactRouterInstrumentation( + history, + name, + allRoutes = [], + matchPath, +) { + function getInitPathName() { + if (history && history.location) { + return history.location.pathname; + } + + if (_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"] && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location) { + return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location.pathname; + } + + return undefined; + } + + /** + * Normalizes a transaction name. Returns the new name as well as the + * source of the transaction. + * + * @param pathname The initial pathname we normalize + */ + function normalizeTransactionName(pathname) { + if (allRoutes.length === 0 || !matchPath) { + return [pathname, 'url']; + } + + const branches = matchRoutes(allRoutes, pathname, matchPath); + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let x = 0; x < branches.length; x++) { + if (branches[x].match.isExact) { + return [branches[x].match.path, 'route']; + } + } + + return [pathname, 'url']; + } + + const tags = { + 'routing.instrumentation': name, + }; + + return (customStartTransaction, startTransactionOnPageLoad = true, startTransactionOnLocationChange = true) => { + const initPathName = getInitPathName(); + if (startTransactionOnPageLoad && initPathName) { + const [name, source] = normalizeTransactionName(initPathName); + activeTransaction = customStartTransaction({ + name, + op: 'pageload', + tags, + metadata: { + source, + }, + }); + } + + if (startTransactionOnLocationChange && history.listen) { + history.listen((location, action) => { + if (action && (action === 'PUSH' || action === 'POP')) { + if (activeTransaction) { + activeTransaction.finish(); + } + + const [name, source] = normalizeTransactionName(location.pathname); + activeTransaction = customStartTransaction({ + name, + op: 'navigation', + tags, + metadata: { + source, + }, + }); + } + }); + } + }; +} + +/** + * Matches a set of routes to a pathname + * Based on implementation from + */ +function matchRoutes( + routes, + pathname, + matchPath, + branch = [], +) { + routes.some(route => { + const match = route.path + ? matchPath(pathname, route) + : branch.length + ? branch[branch.length - 1].match // use parent match + : computeRootMatch(pathname); // use default "root" match + + if (match) { + branch.push({ route, match }); + + if (route.routes) { + matchRoutes(route.routes, pathname, matchPath, branch); + } + } + + return !!match; + }); + + return branch; +} + +function computeRootMatch(pathname) { + return { path: '/', url: '/', params: {}, isExact: pathname === '/' }; +} + +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ +function withSentryRouting(Route) { + const componentDisplayName = (Route ).displayName || (Route ).name; + + const WrappedRoute = (props) => { + if (activeTransaction && props && props.computedMatch && props.computedMatch.isExact) { + activeTransaction.setName(props.computedMatch.path, 'route'); + } + + // @ts-ignore Setting more specific React Component typing for `R` generic above + // will break advanced type inference done by react router params: + // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164 + return react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Route, { ...props, __self: this, __source: {fileName: _jsxFileName, lineNumber: 174}} ); + }; + + WrappedRoute.displayName = `sentryRoute(${componentDisplayName})`; + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_1___default()(WrappedRoute, Route); + // @ts-ignore Setting more specific React Component typing for `R` generic above + // will break advanced type inference done by react router params: + // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13dc4235c069e25fe7ee16e11f529d909f9f3ff8/types/react-router/index.d.ts#L154-L164 + return WrappedRoute; +} +/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ + + +//# sourceMappingURL=reactrouter.js.map + + +/***/ }), + +/***/ "1GsC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); +/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("tTZ/"); +/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("UCvF"); + + + + +function getPath(obj, path) { + if (!path || typeof path !== 'string') { + return null; + } + + return path.split('.').reduce(function (acc, item) { + return acc && acc[item] ? acc[item] : null; + }, obj); +} + +function style(options) { + var prop = options.prop, + _options$cssProperty = options.cssProperty, + cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty, + themeKey = options.themeKey, + transform = options.transform; + + var fn = function fn(props) { + if (props[prop] == null) { + return null; + } + + var propValue = props[prop]; + var theme = props.theme; + var themeMapping = getPath(theme, themeKey) || {}; + + var styleFromPropValue = function styleFromPropValue(propValueFinal) { + var value; + + if (typeof themeMapping === 'function') { + value = themeMapping(propValueFinal); + } else if (Array.isArray(themeMapping)) { + value = themeMapping[propValueFinal] || propValueFinal; + } else { + value = getPath(themeMapping, propValueFinal) || propValueFinal; + + if (transform) { + value = transform(value); + } + } + + if (cssProperty === false) { + return value; + } + + return Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, cssProperty, value); + }; + + return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__["handleBreakpoints"])(props, propValue, styleFromPropValue); + }; + + fn.propTypes = false ? undefined : {}; + fn.filterProps = [prop]; + return fn; +} + +/* harmony default export */ __webpack_exports__["default"] = (style); + +/***/ }), + +/***/ "1I2P": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.receiveMutationError = exports.receiveMutationResult = exports.initMutation = exports.isReceivingMutationResult = exports.isMutationAction = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var INIT_MUTATION = 'INIT_MUTATION'; +var RECEIVE_MUTATION_RESULT = 'RECEIVE_MUTATION_RESULT'; +var RECEIVE_MUTATION_ERROR = 'RECEIVE_MUTATION_ERROR'; + +var isMutationAction = function isMutationAction(action) { + return [INIT_MUTATION, RECEIVE_MUTATION_RESULT, RECEIVE_MUTATION_ERROR].indexOf(action.type) !== -1; +}; + +exports.isMutationAction = isMutationAction; + +var isReceivingMutationResult = function isReceivingMutationResult(action) { + return action.type === RECEIVE_MUTATION_RESULT; +}; // actions + + +exports.isReceivingMutationResult = isReceivingMutationResult; + +var initMutation = function initMutation(mutationId, definition) { + return { + type: INIT_MUTATION, + mutationId: mutationId, + definition: definition + }; +}; + +exports.initMutation = initMutation; + +var receiveMutationResult = function receiveMutationResult(mutationId, response) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + return _objectSpread(_objectSpread({ + type: RECEIVE_MUTATION_RESULT, + mutationId: mutationId, + response: response + }, options), {}, { + definition: definition + }); +}; + +exports.receiveMutationResult = receiveMutationResult; + +var receiveMutationError = function receiveMutationError(mutationId, error) { + var definition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return { + type: RECEIVE_MUTATION_ERROR, + mutationId: mutationId, + error: error, + definition: definition + }; +}; + +exports.receiveMutationError = receiveMutationError; + +/***/ }), + +/***/ "1JFZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var isObject = __webpack_require__("pFmr"); +var getPrototypeOf = __webpack_require__("EjI+"); +var HAS_INSTANCE = __webpack_require__("Yhpl")('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__("GwHQ").f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + + +/***/ }), + +/***/ "1JyF": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"); + +var cid = new Date().valueOf().toString(36); + +function AjaxLogger(options) { + this.url = options.url || ''; + this.cache = []; + this.timer = null; + this.interval = options.interval || 30*1000; + this.enabled = true; + this.jQuery = window.jQuery; + this.extras = {}; +} + +Transform.mixin(AjaxLogger); + +AjaxLogger.prototype.write = function(name, level, args) { + if(!this.timer) { this.init(); } + this.cache.push([name, level].concat(args)); +}; + +AjaxLogger.prototype.init = function() { + if(!this.enabled || !this.jQuery) return; + var self = this; + this.timer = setTimeout(function() { + var i, logs = [], ajaxData, url = self.url; + if(self.cache.length == 0) return self.init(); + // Test each log line and only log the ones that are valid (e.g. don't have circular references). + // Slight performance hit but benefit is we log all valid lines. + for(i = 0; i < self.cache.length; i++) { + try { + JSON.stringify(self.cache[i]); + logs.push(self.cache[i]); + } catch(e) { } + } + if(self.jQuery.isEmptyObject(self.extras)) { + ajaxData = JSON.stringify({ logs: logs }); + url = self.url + '?client_id=' + cid; + } else { + ajaxData = JSON.stringify(self.jQuery.extend({logs: logs}, self.extras)); + } + + self.jQuery.ajax(url, { + type: 'POST', + cache: false, + processData: false, + data: ajaxData, + contentType: 'application/json', + timeout: 10000 + }).success(function(data, status, jqxhr) { + if(data.interval) { + self.interval = Math.max(1000, data.interval); + } + }).error(function() { + self.interval = 30000; + }).always(function() { + self.init(); + }); + self.cache = []; + }, this.interval); +}; + +AjaxLogger.prototype.end = function() {}; + +// wait until jQuery is defined. Useful if you don't control the load order. +AjaxLogger.jQueryWait = function(onDone) { + if(typeof window !== 'undefined' && (window.jQuery || window.$)) { + return onDone(window.jQuery || window.$); + } else if (typeof window !== 'undefined') { + setTimeout(function() { AjaxLogger.jQueryWait(onDone); }, 200); + } +}; + +module.exports = AjaxLogger; + + +/***/ }), + +/***/ "1UXZ": +/***/ (function(module, exports, __webpack_require__) { + +var baseSlice = __webpack_require__("eSMJ"); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; + + +/***/ }), + +/***/ "1Xb9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null} +var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={}; +E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F; +H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0}; +function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}} +function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)} +function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k= +a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h} +function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;} +var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p; +exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W; +exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f); +for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}}; +exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");}; +exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)}; +exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)}; +exports.useTransition=function(){return U.current.useTransition()};exports.version="18.2.0"; + + +/***/ }), + +/***/ "1aH1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/***/ }), + +/***/ "1aUX": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("Y5iN") +var buildFormatLocale = __webpack_require__("P5x0") + +/** + * @category Locales + * @summary German locale. + * @author Thomas Eilmsteiner [@DeMuu]{@link https://github.com/DeMuu} + * @author Asia [@asia-t]{@link https://github.com/asia-t} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "1bdm": +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__("pmGf")(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "1del": +/***/ (function(module, exports) { + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; + + +/***/ }), + +/***/ "1eDV": +/***/ (function(module, exports, __webpack_require__) { + +var TO_PRIMITIVE = __webpack_require__("Yhpl")('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) __webpack_require__("XyXA")(proto, TO_PRIMITIVE, __webpack_require__("MazV")); + + +/***/ }), + +/***/ "1iPU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("E8//"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'table-row-group' + } +}; +var tablelvl2 = { + variant: 'body' +}; +var defaultComponent = 'tbody'; +var TableBody = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableBody(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? defaultComponent : _props$component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: tablelvl2 + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref, + role: Component === defaultComponent ? null : 'rowgroup' + }, other))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTableBody' +})(TableBody)); + +/***/ }), + +/***/ "1iUu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _MobileStepper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("D+v4"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _MobileStepper__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "1mWX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("kjpz"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'absolute', + bottom: 0, + right: 0, + top: -5, + left: 0, + margin: 0, + padding: '0 8px', + pointerEvents: 'none', + borderRadius: 'inherit', + borderStyle: 'solid', + borderWidth: 1, + overflow: 'hidden' + }, + + /* Styles applied to the legend element when `labelWidth` is provided. */ + legend: { + textAlign: 'left', + padding: 0, + lineHeight: '11px', + // sync with `height` in `legend` styles + transition: theme.transitions.create('width', { + duration: 150, + easing: theme.transitions.easing.easeOut + }) + }, + + /* Styles applied to the legend element. */ + legendLabelled: { + display: 'block', + width: 'auto', + textAlign: 'left', + padding: 0, + height: 11, + // sync with `lineHeight` in `legend` styles + fontSize: '0.75em', + visibility: 'hidden', + maxWidth: 0.01, + transition: theme.transitions.create('max-width', { + duration: 50, + easing: theme.transitions.easing.easeOut + }), + '& > span': { + paddingLeft: 5, + paddingRight: 5, + display: 'inline-block' + } + }, + + /* Styles applied to the legend element is notched. */ + legendNotched: { + maxWidth: 1000, + transition: theme.transitions.create('max-width', { + duration: 100, + easing: theme.transitions.easing.easeOut, + delay: 50 + }) + } + }; +}; +/** + * @ignore - internal component. + */ + +var NotchedOutline = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function NotchedOutline(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + label = props.label, + labelWidthProp = props.labelWidth, + notched = props.notched, + style = props.style, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "classes", "className", "label", "labelWidth", "notched", "style"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var align = theme.direction === 'rtl' ? 'right' : 'left'; + + if (label !== undefined) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("fieldset", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + "aria-hidden": true, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref, + style: style + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("legend", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.legendLabelled, notched && classes.legendNotched) + }, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", null, label) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { + dangerouslySetInnerHTML: { + __html: '​' + } + }))); + } + + var labelWidth = labelWidthProp > 0 ? labelWidthProp * 0.75 + 8 : 0.01; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("fieldset", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + "aria-hidden": true, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, "padding".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(align)), 8), style), + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("legend", { + className: classes.legend, + style: { + // IE 11: fieldset with legend does not render + // a border radius. This maintains consistency + // by always having a legend rendered + width: notched ? labelWidth : 0.01 + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { + dangerouslySetInnerHTML: { + __html: '​' + } + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'PrivateNotchedOutline' +})(NotchedOutline)); + +/***/ }), + +/***/ "1pxY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $Math = GetIntrinsic('%Math%'); +var $Number = GetIntrinsic('%Number%'); + +module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; + + +/***/ }), + +/***/ "1xNE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__("TQc+"); +var isObject = __webpack_require__("pFmr"); +var invoke = __webpack_require__("WjuR"); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), + +/***/ "1ytp": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +/* global define */ + +(function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames() { + var classes = []; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes.push(arg); + } else if (Array.isArray(arg)) { + if (arg.length) { + var inner = classNames.apply(null, arg); + if (inner) { + classes.push(inner); + } + } + } else if (argType === 'object') { + if (arg.toString === Object.prototype.toString) { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes.push(key); + } + } + } else { + classes.push(arg.toString()); + } + } + } + + return classes.join(' '); + } + + if ( true && module.exports) { + classNames.default = classNames; + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return classNames; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}()); + + +/***/ }), + +/***/ "22V2": +/***/ (function(module) { + +module.exports = JSON.parse("{\"country\":{\"stranger\":\"Stranger\"},\"Scan\":{\"scan_a_doc\":\"Scan a doc\",\"save_doc\":\"Save the doc\",\"filename\":\"Filename\",\"save\":\"Save\",\"cancel\":\"Cancel\",\"qualify\":\"Describe\",\"apply\":\"Apply\",\"error\":{\"offline\":\"You are currently offline and you can't use this functionality. Please, try again later.\",\"uploading\":\"You are already uploading a file. Please wait until the end of this upload and try again.\",\"generic\":\"Something went wrong. Please try again.\"},\"successful\":{\"qualified_ok\":\"You just have successfully described your file! \"},\"items\":{\"accommodation_proof\":\"Proof of accommodation |||| Proof of accommodations\",\"appliance_invoice\":\"Appliance invoice |||| Appliance invoices\",\"bank_details\":\"Bank detail |||| Bank details\",\"bank_statement\":\"Bank statement |||| Bank statements\",\"birth_certificate\":\"Birth certificate |||| Birth certificates\",\"building_permit\":\"Building permit |||| Building permits\",\"caf\":\"Social benefit rate |||| Social benefit rates\",\"car_insurance\":\"Car insurance certificate |||| Car insurance certificates\",\"citizen_registration_certificate\":\"Certificate of citizen registration |||| Certificates of citizen registration\",\"diploma\":\"Diploma |||| Diplomas\",\"divorce\":\"Divorce |||| Divorces\",\"driver_license\":\"Driving license |||| Driving licenses\",\"electoral_card\":\"Electoral card |||| Electoral cards\",\"employment_center_certificate\":\"Employment center certificate |||| Employment center certificates\",\"energy_contract\":\"Energy provider contract |||| Energy provider contracts\",\"energy_invoice\":\"Energy invoice |||| Energy invoices\",\"family_record_book\":\"Family record book |||| Family record books\",\"family\":\"Family\",\"fidelity_card\":\"Fidelity card |||| Fidelity cards\",\"gradebook\":\"Gradebook |||| Gradebooks\",\"grocery_invoice\":\"Grocery invoice |||| Grocery invoices\",\"health_book\":\"Health book |||| Health books\",\"health_certificate\":\"Health/Vaccination certificate |||| Health/Vaccination certificates\",\"health_insurance_card\":\"Insurance card |||| Insurance cards\",\"health_invoice\":\"Health invoice |||| Health invoices\",\"health\":\"Health\",\"home\":\"Home\",\"house_insurance\":\"Home insurance |||| Home insurances\",\"house_sale_agreeement\":\"House sale agreement |||| House sale agreements\",\"identity_photo\":\"Identity photo |||| Identity photos\",\"identity\":\"Identity\",\"invoice\":\"Invoice |||| Invoices\",\"isp_invoice\":\"ISP invoice |||| ISP invoices\",\"large_family_card\":\" Large Family Card |||| Large Family Cards\",\"lease\":\"Lease |||| Leases\",\"library_card\":\"library card |||| library cards\",\"loan_agreement\":\"Loan agreement |||| Loan agreements\",\"mechanic_invoice\":\"Repair bill |||| Repair bills\",\"motivation_letter\":\"Motivation letter |||| Motivation letters\",\"national_health_insurance_card\":\"National health insurance card |||| National health insurance cards\",\"national_health_insurance_right_certificate\":\"National health insurance right certificate |||| National health insurance right certificates\",\"national_id_card\":\"ID card |||| ID cards\",\"note_identity_document\":\"Note Identity |||| Notes Identity\",\"note_family_document\":\"Note Family |||| Notes Family\",\"note_work_document\":\"Note Work & Study |||| Notes Work & Study\",\"note_health_document\":\"Note Health |||| Notes Health\",\"note_house_document\":\"Note Home |||| Notes Home\",\"note_transport_document\":\"Note Transport |||| Notes Transport\",\"note_activity_document\":\"Note Activities |||| Notes Activities\",\"note_finance\":\"Note Finance |||| Notes Finance\",\"note_invoice\":\"Note Invoice |||| Notes Invoice\",\"other_activity_document\":\"Other sports document |||| Other sports documents\",\"other_bank_document\":\"Other banking document |||| Other banking documents\",\"other_family_document\":\"Other family document |||| Other family documents\",\"other_health_document\":\"Other health document |||| Other health documents\",\"other_house_document\":\"Other house document |||| Other house documents\",\"other_identity_document\":\"Other document of identity |||| Other documents of identity\",\"other_invoice\":\"Other invoice |||| Other invoices\",\"other_revenue\":\"Other revenue |||| Other revenues\",\"other_tax_document\":\"Other tax document |||| Other tax documents\",\"other_transport_document\":\"Other transport document |||| Other transport documents\",\"other_work_document\":\"Other work document |||| Other work documents\",\"other_administrative_document\":\"Other administrative document |||| Other administrative documents\",\"others\":\"Others\",\"pacs\":\"Civil union |||| Civil unions\",\"passport\":\"Passeport |||| Passeports\",\"pay_sheet\":\"Pay sheet |||| Pay sheets\",\"payment_proof_family_allowance\":\"family allowance payment proof |||| family allowance payment proofs\",\"pension\":\"Pension |||| Pensions\",\"personal_sporting_licence\":\"Sporting licence |||| Sporting licences\",\"phone_invoice\":\"Phone invoice |||| Phone invoices\",\"pregnancy_medical_certificate\":\"Certificate of pregnancy |||| Certificates of pregnancy\",\"prescription\":\"Prescription |||| Prescriptions\",\"real_estate_tax\":\"Real estate tax |||| Real estate taxes\",\"receipt\":\"Receipt |||| Receipts\",\"rent_receipt\":\"Rent receipt |||| Rent receipts\",\"residence_permit\":\"Residence permit |||| Residence permits\",\"restaurant_invoice\":\"Restaurant invoice |||| Restaurant invoices\",\"resume\":\"Resume |||| Resumes\",\"school_attendance_certificate\":\"Certificate of school attendance |||| Certificates of school attendance\",\"school_insurance_certificate\":\"Certificate of school insurance |||| Certificates of school insurance\",\"single_parent_benefit\":\"Single parent benefit |||| Single parent benefits\",\"student_card\":\"Student card |||| Student cards\",\"tax_notice\":\"Tax notice |||| Tax notices\",\"tax_return\":\"Tax return |||| Tax returns\",\"tax_timetable\":\"Payment Plans Installment Agreement |||| Payment Plans Installment Agreements\",\"technical_diagnostic_record\":\"Technical diagnostic record |||| Technical diagnostic records\",\"telecom_invoice\":\"Telecom invoice |||| Telecom invoices\",\"transport_card\":\"Transport card |||| Transport cards\",\"transport_invoice\":\"Transport invoice |||| Transport invoices\",\"transport\":\"Transport\",\"unemployment_benefit\":\"Unemployment benefit |||| Unemployment benefits\",\"unfit_for_habitation_declaration\":\"Declaration of unfit for habitation |||| Declarations of unfit for habitation\",\"vehicle_registration\":\"Vehicle registration |||| Vehicle registrations\",\"water_invoice\":\"Water invoice |||| Water invoices\",\"web_service_invoice\":\"Web service invoice |||| Web service invoices\",\"wedding\":\"Wedding contract |||| Wedding contracts\",\"work_contract\":\"Work contract |||| Work contracts\",\"work_disability_recognition\":\"Recognition of disability |||| Recognitions of disability\",\"work_invoice\":\"Work invoice |||| Work invoices\",\"work_quote\":\"Work quote |||| Work quotes\",\"work_study\":\"Work & Study\"},\"attributes\":{\"contractType\":{\"cdi\":\"CDI\",\"cdd\":\"CDD\",\"alternate\":\"Alternate\",\"internship\":\"Internship\",\"other\":\"Other\"}},\"themes\":{\"activity\":\"Activities\",\"family\":\"Family\",\"finance\":\"Finance\",\"health\":\"Health\",\"home\":\"Home\",\"identity\":\"Identity\",\"invoice\":\"Invoice\",\"others\":\"Others\",\"transport\":\"Transport\",\"undefined\":\"Undefined\",\"work_study\":\"Work & Study\"}}}"); + +/***/ }), + +/***/ "24Iz": +/***/ (function(module) { + +module.exports = JSON.parse("{\"desktop\":{\"icon\":\"icon-laptop.svg\",\"link\":{\"type\":\"external\"}},\"mobile\":{\"icon\":\"icon-phone.svg\",\"link\":{\"type\":\"external\"}},\"support\":{\"icon\":\"icon-question-mark.svg\",\"link\":{\"type\":\"external\"}}}"); + +/***/ }), + +/***/ "26Ja": +/***/ (function(module, exports) { + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; + + +/***/ }), + +/***/ "27gE": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.9 Reflect.has(target, propertyKey) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), + +/***/ "28Sz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _GridList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UrlN"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _GridList__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "2B+r": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LGLP"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("eCKa"); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("jTJl"); + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + +/* Generated with node_modules/.bin/svgr src/assets/sprites/icon-cozy-home.svg */ + +function SvgIconCozyHome(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5___default()({ + width: 32, + height: 32 + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("g", { + fill: "none", + fillRule: "evenodd" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("circle", { + fill: "#297EF2", + fillRule: "nonzero", + cx: 16, + cy: 16, + r: 16 + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("path", { + d: "M19.314 17.561a.555.555 0 01-.82.12 4.044 4.044 0 01-2.499.862 4.04 4.04 0 01-2.494-.86.557.557 0 01-.815-.12.547.547 0 01.156-.748c.214-.14.229-.421.229-.424a.555.555 0 01.176-.385.504.504 0 01.386-.145.544.544 0 01.528.553c0 .004 0 .153-.054.36a2.954 2.954 0 003.784-.008 1.765 1.765 0 01-.053-.344.546.546 0 01.536-.561h.01c.294 0 .538.237.545.532 0 0 .015.282.227.422a.544.544 0 01.158.746m2.322-6.369a5.94 5.94 0 00-1.69-3.506A5.651 5.651 0 0015.916 6a5.648 5.648 0 00-4.029 1.687 5.936 5.936 0 00-1.691 3.524 5.677 5.677 0 00-3.433 1.737 5.966 5.966 0 00-1.643 4.137C5.12 20.347 7.704 23 10.882 23h10.236c3.176 0 5.762-2.653 5.762-5.915 0-3.083-2.31-5.623-5.244-5.893", + fill: "#FFF" + }))); +} + +var IconCozyHome = /*#__PURE__*/function (_PureComponent) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(IconCozyHome, _PureComponent); + + var _super = _createSuper(IconCozyHome); + + function IconCozyHome() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, IconCozyHome); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(IconCozyHome, [{ + key: "render", + value: function render() { + var _this$props = this.props, + className = _this$props.className, + isInvertedTheme = _this$props.isInvertedTheme; + + var fetchIcon = function fetchIcon() { + if (isInvertedTheme) { + return "".concat(_lib_stack__WEBPACK_IMPORTED_MODULE_9__["default"].get.cozyURL(), "/assets/images/icon-cozy-home-inverted.svg"); + } + + return "".concat(_lib_stack__WEBPACK_IMPORTED_MODULE_9__["default"].get.cozyURL(), "/assets/images/icon-cozy-home.svg"); + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8___default.a, { + fetchIcon: fetchIcon, + fallbackIcon: SvgIconCozyHome, + className: className + }); + } + }]); + + return IconCozyHome; +}(react__WEBPACK_IMPORTED_MODULE_6__["PureComponent"]); + +IconCozyHome.propTypes = { + className: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (IconCozyHome); + +/***/ }), + +/***/ "2D1v": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _CozyRealtime = _interopRequireDefault(__webpack_require__("PdKc")); + +/** + * Realtime plugin for cozy-client + * + * - Handles login/logout + * - Proxies subscribe/unsubscribe/unsubscribeAll to CozyRealtime + * + * @class + */ +var RealtimePlugin = /*#__PURE__*/function () { + /** + * Constructor of RealtimePlugin + * + * @constructor + * @param {CozyClient} client A cozy-client instance + */ + function RealtimePlugin(client) { + (0, _classCallCheck2.default)(this, RealtimePlugin); + this.client = client; + this.realtime = null; + this.handleLogin = this.handleLogin.bind(this); + this.handleLogout = this.handleLogout.bind(this); + this.client.on('login', this.handleLogin); + this.client.on('logout', this.handleLogout); + if (client.isLogged) this.handleLogin(); + } + + (0, _createClass2.default)(RealtimePlugin, [{ + key: "handleLogin", + value: function handleLogin() { + this.realtime = new _CozyRealtime.default({ + client: this.client + }); + this.client.emit('plugin:realtime:login'); + } + }, { + key: "handleLogout", + value: function handleLogout() { + this.unsubscribeAll(); + this.realtime = null; + this.client.emit('plugin:realtime:logout'); + } + }, { + key: "checkRealtimeInstance", + value: function checkRealtimeInstance() { + if (!this.realtime) throw new Error('Unable to use realtime while cozy-client is not logged in'); + } + /** + * @see CozyRealtime.subscribe + */ + + }, { + key: "subscribe", + value: function subscribe() { + var _this$realtime; + + this.checkRealtimeInstance(); + + (_this$realtime = this.realtime).subscribe.apply(_this$realtime, arguments); + } + /** + * @see CozyRealtime.unsubscribe + */ + + }, { + key: "unsubscribe", + value: function unsubscribe() { + var _this$realtime2; + + this.checkRealtimeInstance(); + + (_this$realtime2 = this.realtime).unsubscribe.apply(_this$realtime2, arguments); + } + /** + * @see CozyRealtime.unsubscribeAll + */ + + }, { + key: "unsubscribeAll", + value: function unsubscribeAll() { + this.checkRealtimeInstance(); + this.realtime.unsubscribeAll(); + } + /** + * @see CozyRealtime.sendNotification + */ + + }, { + key: "sendNotification", + value: function sendNotification() { + var _this$realtime3; + + this.checkRealtimeInstance(); + + (_this$realtime3 = this.realtime).sendNotification.apply(_this$realtime3, arguments); + } + }]); + return RealtimePlugin; +}(); + +RealtimePlugin.pluginName = 'realtime'; +var _default = RealtimePlugin; +exports.default = _default; + +/***/ }), + +/***/ "2GSc": +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__("WnzN"); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; + + +/***/ }), + +/***/ "2Ggn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fY06"); +/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Nm31"); + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + flex: '1 1 auto', + minWidth: 0, + marginTop: 4, + marginBottom: 4 + }, + + /* Styles applied to the `Typography` components if primary and secondary are set. */ + multiline: { + marginTop: 6, + marginBottom: 6 + }, + + /* Styles applied to the `Typography` components if dense. */ + dense: {}, + + /* Styles applied to the root element if `inset={true}`. */ + inset: { + paddingLeft: 56 + }, + + /* Styles applied to the primary `Typography` component. */ + primary: {}, + + /* Styles applied to the secondary `Typography` component. */ + secondary: {} +}; +var ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListItemText(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$disableTypogra = props.disableTypography, + disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra, + _props$inset = props.inset, + inset = _props$inset === void 0 ? false : _props$inset, + primaryProp = props.primary, + primaryTypographyProps = props.primaryTypographyProps, + secondaryProp = props.secondary, + secondaryTypographyProps = props.secondaryTypographyProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"]); + + var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__["default"]), + dense = _React$useContext.dense; + + var primary = primaryProp != null ? primaryProp : children; + + if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__["default"] && !disableTypography) { + primary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + variant: dense ? 'body2' : 'body1', + className: classes.primary, + component: "span", + display: "block" + }, primaryTypographyProps), primary); + } + + var secondary = secondaryProp; + + if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__["default"] && !disableTypography) { + secondary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + variant: "body2", + className: classes.secondary, + color: "textSecondary", + display: "block" + }, secondaryTypographyProps), secondary); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline), + ref: ref + }, other), primary, secondary); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiListItemText' +})(ListItemText)); + +/***/ }), + +/***/ "2Ojh": +/***/ (function(module, exports) { + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; + + +/***/ }), + +/***/ "2Pqz": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.1 Number.EPSILON +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + + +/***/ }), + +/***/ "2T8D": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableRow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7wwr"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableRow__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "2UmT": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNavigationEntry", function() { return getNavigationEntry; }); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+2Xp"); + + +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const getNavigationEntryFromPerformanceTiming = () => { + // eslint-disable-next-line deprecation/deprecation + const timing = _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].performance.timing; + // eslint-disable-next-line deprecation/deprecation + const type = _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].performance.navigation.type; + + const navigationEntry = { + entryType: 'navigation', + startTime: 0, + type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate', + }; + + for (const key in timing) { + if (key !== 'navigationStart' && key !== 'toJSON') { + navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0); + } + } + return navigationEntry ; +}; + +const getNavigationEntry = () => { + if (_types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].__WEB_VITALS_POLYFILL__) { + return ( + _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].performance && + ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) || + getNavigationEntryFromPerformanceTiming()) + ); + } else { + return _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0]; + } +}; + + +//# sourceMappingURL=getNavigationEntry.js.map + + +/***/ }), + +/***/ "2WYM": +/***/ (function(module, exports) { + +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; + + +/***/ }), + +/***/ "2X0w": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("npFJ")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("sVxE"); +var hasOwn = __webpack_require__("H8OS"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "2kdj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEnvelopeEndpointWithUrlEncodedAuth", function() { return getEnvelopeEndpointWithUrlEncodedAuth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getReportDialogEndpoint", function() { return getReportDialogEndpoint; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +const SENTRY_API_VERSION = '7'; + +/** Returns the prefix to construct Sentry ingestion API endpoints. */ +function getBaseApiEndpoint(dsn) { + const protocol = dsn.protocol ? `${dsn.protocol}:` : ''; + const port = dsn.port ? `:${dsn.port}` : ''; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`; +} + +/** Returns the ingest API endpoint for target. */ +function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; +} + +/** Returns a URL-encoded string with auth config suitable for a query string. */ +function _encodedAuth(dsn, sdkInfo) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["urlEncode"])({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }), + }); +} + +/** + * Returns the envelope endpoint URL with auth in the query string. + * + * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests. + */ +function getEnvelopeEndpointWithUrlEncodedAuth( + dsn, + // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below + // options: ClientOptions = {} as ClientOptions, + tunnelOrOptions = {} , +) { + // TODO (v8): Use this code instead + // const { tunnel, _metadata = {} } = options; + // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`; + + const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel; + const sdkInfo = + typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk; + + return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; +} + +/** Returns the url to the report dialog endpoint. */ +function getReportDialogEndpoint( + dsnLike, + dialogOptions + +, +) { + const dsn = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["makeDsn"])(dsnLike); + const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`; + + let encodedOptions = `dsn=${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dsnToString"])(dsn)}`; + for (const key in dialogOptions) { + if (key === 'dsn') { + continue; + } + + if (key === 'user') { + const user = dialogOptions.user; + if (!user) { + continue; + } + if (user.name) { + encodedOptions += `&name=${encodeURIComponent(user.name)}`; + } + if (user.email) { + encodedOptions += `&email=${encodeURIComponent(user.email)}`; + } + } else { + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`; + } + } + + return `${endpoint}?${encodedOptions}`; +} + + +//# sourceMappingURL=api.js.map + + +/***/ }), + +/***/ "2ld/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FluidType = exports.FluidState = void 0; +var FluidType; +exports.FluidType = FluidType; +(function (FluidType) { + FluidType[FluidType["ELECTRICITY"] = 0] = "ELECTRICITY"; + FluidType[FluidType["WATER"] = 1] = "WATER"; + FluidType[FluidType["GAS"] = 2] = "GAS"; + FluidType[FluidType["MULTIFLUID"] = 3] = "MULTIFLUID"; +})(FluidType || (exports.FluidType = FluidType = {})); +var FluidState; +exports.FluidState = FluidState; +(function (FluidState) { + FluidState[FluidState["KONNECTOR_NOT_FOUND"] = 0] = "KONNECTOR_NOT_FOUND"; + FluidState[FluidState["NOT_CONNECTED"] = 1] = "NOT_CONNECTED"; + FluidState[FluidState["DONE"] = 200] = "DONE"; + FluidState[FluidState["ERROR"] = 300] = "ERROR"; + FluidState[FluidState["ERROR_LOGIN_FAILED"] = 301] = "ERROR_LOGIN_FAILED"; +})(FluidState || (exports.FluidState = FluidState = {})); + +/***/ }), + +/***/ "2mG2": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("06hQ"), + isPrototype = __webpack_require__("R+nh"), + nativeKeysIn = __webpack_require__("KqmD"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; + + +/***/ }), + +/***/ "2maa": +/***/ (function(module) { + +module.exports = JSON.parse("{}"); + +/***/ }), + +/***/ "2o28": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// https://github.com/tc39/proposal-promise-finally + +var $export = __webpack_require__("LRPZ"); +var core = __webpack_require__("WSXa"); +var global = __webpack_require__("ETne"); +var speciesConstructor = __webpack_require__("iyRu"); +var promiseResolve = __webpack_require__("jOpP"); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + + +/***/ }), + +/***/ "2oAD": +/***/ (function(module, exports) { + +function declensionGroup (scheme, count) { + if (count === 1) { + return scheme.one + } + + if (count >= 2 && count <= 4) { + return scheme.twoFour + } + + // if count === null || count === 0 || count >= 5 + return scheme.other +} + +function declension (scheme, count, time) { + var group = declensionGroup(scheme, count) + var finalText = group[time] || group + return finalText.replace('{{count}}', count) +} + +function extractPreposition (token) { + var result = ['lessThan', 'about', 'over', 'almost'].filter(function (preposition) { + return !!token.match(new RegExp('^' + preposition)) + }) + + return result[0] +} + +function prefixPreposition (preposition) { + var translation = '' + + if (preposition === 'almost') { + translation = 'takmer' + } + + if (preposition === 'about') { + translation = 'približne' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function suffixPreposition (preposition) { + var translation = '' + + if (preposition === 'lessThan') { + translation = 'menej než' + } + + if (preposition === 'over') { + translation = 'viac než' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function lowercaseFirstLetter (string) { + return string.charAt(0).toLowerCase() + string.slice(1) +} + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + xSeconds: { + one: { + regular: 'sekunda', + past: 'sekundou', + future: 'sekundu' + }, + twoFour: { + regular: '{{count}} sekundy', + past: '{{count}} sekundami', + future: '{{count}} sekundy' + }, + other: { + regular: '{{count}} sekúnd', + past: '{{count}} sekundami', + future: '{{count}} sekúnd' + } + }, + + halfAMinute: { + other: { + regular: 'pol minúty', + past: 'pol minútou', + future: 'pol minúty' + } + }, + + xMinutes: { + one: { + regular: 'minúta', + past: 'minútou', + future: 'minútu' + }, + twoFour: { + regular: '{{count}} minúty', + past: '{{count}} minútami', + future: '{{count}} minúty' + }, + other: { + regular: '{{count}} minút', + past: '{{count}} minútami', + future: '{{count}} minút' + } + }, + + xHours: { + one: { + regular: 'hodina', + past: 'hodinou', + future: 'hodinu' + }, + twoFour: { + regular: '{{count}} hodiny', + past: '{{count}} hodinami', + future: '{{count}} hodiny' + }, + other: { + regular: '{{count}} hodín', + past: '{{count}} hodinami', + future: '{{count}} hodín' + } + }, + + xDays: { + one: { + regular: 'deň', + past: 'dňom', + future: 'deň' + }, + twoFour: { + regular: '{{count}} dni', + past: '{{count}} dňami', + future: '{{count}} dni' + }, + other: { + regular: '{{count}} dní', + past: '{{count}} dňami', + future: '{{count}} dní' + } + }, + + xMonths: { + one: { + regular: 'mesiac', + past: 'mesiacom', + future: 'mesiac' + }, + twoFour: { + regular: '{{count}} mesiace', + past: '{{count}} mesiacmi', + future: '{{count}} mesiace' + }, + other: { + regular: '{{count}} mesiacov', + past: '{{count}} mesiacmi', + future: '{{count}} mesiacov' + } + }, + + xYears: { + one: { + regular: 'rok', + past: 'rokom', + future: 'rok' + }, + twoFour: { + regular: '{{count}} roky', + past: '{{count}} rokmi', + future: '{{count}} roky' + }, + other: { + regular: '{{count}} rokov', + past: '{{count}} rokmi', + future: '{{count}} rokov' + } + } + } + + function localize (token, count, options) { + options = options || {} + + var preposition = extractPreposition(token) || '' + var key = lowercaseFirstLetter(token.substring(preposition.length)) + var scheme = distanceInWordsLocale[key] + + if (!options.addSuffix) { + return prefixPreposition(preposition) + suffixPreposition(preposition) + declension(scheme, count, 'regular') + } + + if (options.comparison > 0) { + return prefixPreposition(preposition) + 'za ' + suffixPreposition(preposition) + declension(scheme, count, 'future') + } else { + return prefixPreposition(preposition) + 'pred ' + suffixPreposition(preposition) + declension(scheme, count, 'past') + } + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "2pt2": +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./_lib/build_formatting_tokens_reg_exp/index.js": "fQxh", + "./ar/build_distance_in_words_locale/index.js": "7ale", + "./ar/build_format_locale/index.js": "BUJk", + "./ar/index.js": "HoPF", + "./be/build_distance_in_words_locale/index.js": "rXT6", + "./be/build_format_locale/index.js": "6c7I", + "./be/index.js": "y+wm", + "./bg/build_distance_in_words_locale/index.js": "QV4S", + "./bg/build_format_locale/index.js": "h7EV", + "./bg/index.js": "6drF", + "./ca/build_distance_in_words_locale/index.js": "wVGO", + "./ca/build_format_locale/index.js": "qOJT", + "./ca/index.js": "J4Lj", + "./cs/build_distance_in_words_locale/index.js": "qeVT", + "./cs/build_format_locale/index.js": "9c+d", + "./cs/index.js": "jOEl", + "./da/build_distance_in_words_locale/index.js": "P7Gw", + "./da/build_format_locale/index.js": "ILGm", + "./da/index.js": "qqlu", + "./de/build_distance_in_words_locale/index.js": "Y5iN", + "./de/build_format_locale/index.js": "P5x0", + "./de/index.js": "1aUX", + "./el/build_distance_in_words_locale/index.js": "42PH", + "./el/build_format_locale/index.js": "wtRR", + "./el/index.js": "Nutn", + "./en/build_distance_in_words_locale/index.js": "jiHV", + "./en/build_format_locale/index.js": "Fyqn", + "./en/index.js": "mnDI", + "./eo/build_distance_in_words_locale/index.js": "+LkS", + "./eo/build_format_locale/index.js": "+W4M", + "./eo/index.js": "CG0c", + "./es/build_distance_in_words_locale/index.js": "zthh", + "./es/build_format_locale/index.js": "qi+F", + "./es/index.js": "jiRl", + "./fi/build_distance_in_words_locale/index.js": "+5Qr", + "./fi/build_format_locale/index.js": "y4fA", + "./fi/index.js": "kPjA", + "./fil/build_distance_in_words_locale/index.js": "yta+", + "./fil/build_format_locale/index.js": "A/Ua", + "./fil/index.js": "HcOy", + "./fr/build_distance_in_words_locale/index.js": "dS4D", + "./fr/build_format_locale/index.js": "yxzQ", + "./fr/index.js": "9cqe", + "./hr/build_distance_in_words_locale/index.js": "Z4qh", + "./hr/build_format_locale/index.js": "GXOL", + "./hr/index.js": "rGV6", + "./hu/build_distance_in_words_locale/index.js": "A6Uc", + "./hu/build_format_locale/index.js": "+c4x", + "./hu/index.js": "fxkC", + "./id/build_distance_in_words_locale/index.js": "riUr", + "./id/build_format_locale/index.js": "siJb", + "./id/index.js": "SJjQ", + "./is/build_distance_in_words_locale/index.js": "ROjY", + "./is/build_format_locale/index.js": "qi1n", + "./is/index.js": "KnO/", + "./it/build_distance_in_words_locale/index.js": "6Ku4", + "./it/build_format_locale/index.js": "YYsG", + "./it/index.js": "nOHs", + "./ja/build_distance_in_words_locale/index.js": "L5XS", + "./ja/build_format_locale/index.js": "SxiJ", + "./ja/index.js": "XIbb", + "./ko/build_distance_in_words_locale/index.js": "Hbvh", + "./ko/build_format_locale/index.js": "cEgd", + "./ko/index.js": "szAg", + "./mk/build_distance_in_words_locale/index.js": "FaeQ", + "./mk/build_format_locale/index.js": "sIRx", + "./mk/index.js": "Caof", + "./nb/build_distance_in_words_locale/index.js": "NrmK", + "./nb/build_format_locale/index.js": "S7yZ", + "./nb/index.js": "Rk98", + "./nl/build_distance_in_words_locale/index.js": "BZiP", + "./nl/build_format_locale/index.js": "HdNd", + "./nl/index.js": "J+GK", + "./pl/build_distance_in_words_locale/index.js": "Ky9W", + "./pl/build_format_locale/index.js": "uxkL", + "./pl/index.js": "0x8W", + "./pt/build_distance_in_words_locale/index.js": "pN3j", + "./pt/build_format_locale/index.js": "RFRV", + "./pt/index.js": "lwnL", + "./ro/build_distance_in_words_locale/index.js": "JAuI", + "./ro/build_format_locale/index.js": "j1sQ", + "./ro/index.js": "gHE0", + "./ru/build_distance_in_words_locale/index.js": "7ryk", + "./ru/build_format_locale/index.js": "cTIL", + "./ru/index.js": "8J30", + "./sk/build_distance_in_words_locale/index.js": "2oAD", + "./sk/build_format_locale/index.js": "jVdS", + "./sk/index.js": "a5Cf", + "./sl/build_distance_in_words_locale/index.js": "m2c+", + "./sl/build_format_locale/index.js": "l1+s", + "./sl/index.js": "qHQe", + "./sr/build_distance_in_words_locale/index.js": "h7wD", + "./sr/build_format_locale/index.js": "oLNh", + "./sr/index.js": "oBDG", + "./sv/build_distance_in_words_locale/index.js": "RjDH", + "./sv/build_format_locale/index.js": "LRUT", + "./sv/index.js": "9KBP", + "./th/build_distance_in_words_locale/index.js": "SjuW", + "./th/build_format_locale/index.js": "yHKE", + "./th/index.js": "rRsv", + "./tr/build_distance_in_words_locale/index.js": "oPNn", + "./tr/build_format_locale/index.js": "JNO2", + "./tr/index.js": "Ra5m", + "./zh_cn/build_distance_in_words_locale/index.js": "+qzK", + "./zh_cn/build_format_locale/index.js": "EDbf", + "./zh_cn/index.js": "SUby", + "./zh_tw/build_distance_in_words_locale/index.js": "HKTt", + "./zh_tw/build_format_locale/index.js": "L1Oa", + "./zh_tw/index.js": "ZoqY" +}; + + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = "2pt2"; + +/***/ }), + +/***/ "2rqr": +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), + +/***/ "2uU8": +/***/ (function(module, exports) { + +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + + +/***/ }), + +/***/ "2y6E": +/***/ (function(module, exports, __webpack_require__) { + +var getPrototypeOf = __webpack_require__("wDGE"); + +var setPrototypeOf = __webpack_require__("4dPT"); + +var isNativeFunction = __webpack_require__("/otF"); + +var construct = __webpack_require__("GZTL"); + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); + } + + function Wrapper() { + return construct(Class, arguments, getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return setPrototypeOf(Wrapper, Class); + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _wrapNativeSuper(Class); +} + +module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ 3: +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("jI5P"); +module.exports = __webpack_require__("EzKc"); + + +/***/ }), + +/***/ "3+Qv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CyXu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Collapse__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "39/8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _minilog = _interopRequireDefault(__webpack_require__("B4A6")); + +var logger = (0, _minilog.default)('cozy-client'); + +_minilog.default.suggest.deny('cozy-client', 'info'); + +var _default = logger; +exports.default = _default; + +/***/ }), + +/***/ "3AVn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rDuK"); + + +function merge(acc, item) { + if (!item) { + return acc; + } + + return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__["deepmerge"])(acc, item, { + clone: false // No need to clone deep, it's way faster. + + }); +} + +/* harmony default export */ __webpack_exports__["default"] = (merge); + +/***/ }), + +/***/ "3EGO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var blue = { + 50: '#e3f2fd', + 100: '#bbdefb', + 200: '#90caf9', + 300: '#64b5f6', + 400: '#42a5f5', + 500: '#2196f3', + 600: '#1e88e5', + 700: '#1976d2', + 800: '#1565c0', + 900: '#0d47a1', + A100: '#82b1ff', + A200: '#448aff', + A400: '#2979ff', + A700: '#2962ff' +}; +/* harmony default export */ __webpack_exports__["default"] = (blue); + +/***/ }), + +/***/ "3EJA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createStyles; }); +function createStyles(styles) { + return styles; +} + +/***/ }), + +/***/ "3FvR": +/***/ (function(module, exports, __webpack_require__) { + +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + __webpack_require__("iNsi")(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + + +/***/ }), + +/***/ "3MFU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return makeStyles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("b0ha"); +/* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("SoMK"); +/* harmony import */ var _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("pQ7r"); +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NFku"); +/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("6P1f"); +/* harmony import */ var _indexCounter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("n4G9"); +/* harmony import */ var _getStylesCreator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("HyJZ"); +/* harmony import */ var _getStylesCreator_noopTheme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("CHAu"); + + + + + + + + + + + + +function getClasses(_ref, classes, Component) { + var state = _ref.state, + stylesOptions = _ref.stylesOptions; + + if (stylesOptions.disableGeneration) { + return classes || {}; + } + + if (!state.cacheClasses) { + state.cacheClasses = { + // Cache for the finalized classes value. + value: null, + // Cache for the last used classes prop pointer. + lastProp: null, + // Cache for the last used rendered classes pointer. + lastJSS: {} + }; + } // Tracks if either the rendered classes or classes prop has changed, + // requiring the generation of a new finalized classes object. + + + var generate = false; + + if (state.classes !== state.cacheClasses.lastJSS) { + state.cacheClasses.lastJSS = state.classes; + generate = true; + } + + if (classes !== state.cacheClasses.lastProp) { + state.cacheClasses.lastProp = classes; + generate = true; + } + + if (generate) { + state.cacheClasses.value = Object(_mergeClasses__WEBPACK_IMPORTED_MODULE_4__["default"])({ + baseClasses: state.cacheClasses.lastJSS, + newClasses: classes, + Component: Component + }); + } + + return state.cacheClasses.value; +} + +function attach(_ref2, props) { + var state = _ref2.state, + theme = _ref2.theme, + stylesOptions = _ref2.stylesOptions, + stylesCreator = _ref2.stylesCreator, + name = _ref2.name; + + if (stylesOptions.disableGeneration) { + return; + } + + var sheetManager = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].get(stylesOptions.sheetsManager, stylesCreator, theme); + + if (!sheetManager) { + sheetManager = { + refs: 0, + staticSheet: null, + dynamicStyles: null + }; + _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager); + } + + var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, stylesCreator.options, stylesOptions, { + theme: theme, + flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl' + }); + + options.generateId = options.serverGenerateClassName || options.generateClassName; + var sheetsRegistry = stylesOptions.sheetsRegistry; + + if (sheetManager.refs === 0) { + var staticSheet; + + if (stylesOptions.sheetsCache) { + staticSheet = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].get(stylesOptions.sheetsCache, stylesCreator, theme); + } + + var styles = stylesCreator.create(theme, name); + + if (!staticSheet) { + staticSheet = stylesOptions.jss.createStyleSheet(styles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + link: false + }, options)); + staticSheet.attach(); + + if (stylesOptions.sheetsCache) { + _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet); + } + } + + if (sheetsRegistry) { + sheetsRegistry.add(staticSheet); + } + + sheetManager.staticSheet = staticSheet; + sheetManager.dynamicStyles = Object(jss__WEBPACK_IMPORTED_MODULE_3__["getDynamicStyles"])(styles); + } + + if (sheetManager.dynamicStyles) { + var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + link: true + }, options)); + dynamicSheet.update(props); + dynamicSheet.attach(); + state.dynamicSheet = dynamicSheet; + state.classes = Object(_mergeClasses__WEBPACK_IMPORTED_MODULE_4__["default"])({ + baseClasses: sheetManager.staticSheet.classes, + newClasses: dynamicSheet.classes + }); + + if (sheetsRegistry) { + sheetsRegistry.add(dynamicSheet); + } + } else { + state.classes = sheetManager.staticSheet.classes; + } + + sheetManager.refs += 1; +} + +function update(_ref3, props) { + var state = _ref3.state; + + if (state.dynamicSheet) { + state.dynamicSheet.update(props); + } +} + +function detach(_ref4) { + var state = _ref4.state, + theme = _ref4.theme, + stylesOptions = _ref4.stylesOptions, + stylesCreator = _ref4.stylesCreator; + + if (stylesOptions.disableGeneration) { + return; + } + + var sheetManager = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].get(stylesOptions.sheetsManager, stylesCreator, theme); + sheetManager.refs -= 1; + var sheetsRegistry = stylesOptions.sheetsRegistry; + + if (sheetManager.refs === 0) { + _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__["default"].delete(stylesOptions.sheetsManager, stylesCreator, theme); + stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet); + + if (sheetsRegistry) { + sheetsRegistry.remove(sheetManager.staticSheet); + } + } + + if (state.dynamicSheet) { + stylesOptions.jss.removeStyleSheet(state.dynamicSheet); + + if (sheetsRegistry) { + sheetsRegistry.remove(state.dynamicSheet); + } + } +} + +function useSynchronousEffect(func, values) { + var key = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef([]); + var output; // Store "generation" key. Just returns a new object every time + + var currentKey = react__WEBPACK_IMPORTED_MODULE_2___default.a.useMemo(function () { + return {}; + }, values); // eslint-disable-line react-hooks/exhaustive-deps + // "the first render", or "memo dropped the value" + + if (key.current !== currentKey) { + key.current = currentKey; + output = func(); + } + + react__WEBPACK_IMPORTED_MODULE_2___default.a.useEffect(function () { + return function () { + if (output) { + output(); + } + }; + }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps + ); +} + +function makeStyles(stylesOrCreator) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var name = options.name, + classNamePrefixOption = options.classNamePrefix, + Component = options.Component, + _options$defaultTheme = options.defaultTheme, + defaultTheme = _options$defaultTheme === void 0 ? _getStylesCreator_noopTheme__WEBPACK_IMPORTED_MODULE_10__["default"] : _options$defaultTheme, + stylesOptions2 = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(options, ["name", "classNamePrefix", "Component", "defaultTheme"]); + + var stylesCreator = Object(_getStylesCreator__WEBPACK_IMPORTED_MODULE_9__["default"])(stylesOrCreator); + var classNamePrefix = name || classNamePrefixOption || 'makeStyles'; + stylesCreator.options = { + index: Object(_indexCounter__WEBPACK_IMPORTED_MODULE_8__["increment"])(), + name: name, + meta: classNamePrefix, + classNamePrefix: classNamePrefix + }; + + var useStyles = function useStyles() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_6__["default"])() || defaultTheme; + + var stylesOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, react__WEBPACK_IMPORTED_MODULE_2___default.a.useContext(_StylesProvider__WEBPACK_IMPORTED_MODULE_7__["StylesContext"]), stylesOptions2); + + var instance = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef(); + var shouldUpdate = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef(); + useSynchronousEffect(function () { + var current = { + name: name, + state: {}, + stylesCreator: stylesCreator, + stylesOptions: stylesOptions, + theme: theme + }; + attach(current, props); + shouldUpdate.current = false; + instance.current = current; + return function () { + detach(current); + }; + }, [theme, stylesCreator]); + react__WEBPACK_IMPORTED_MODULE_2___default.a.useEffect(function () { + if (shouldUpdate.current) { + update(instance.current, props); + } + + shouldUpdate.current = true; + }); + var classes = getClasses(instance.current, props.classes, Component); + + if (false) {} + + return classes; + }; + + return useStyles; +} + +/***/ }), + +/***/ "3N1e": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9sWd"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OJkG"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("OY/u"); +/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("x0Kp"); + + + + + + + + + + + +var styles = { + root: { + padding: 9 + }, + checked: {}, + disabled: {}, + input: { + cursor: 'inherit', + position: 'absolute', + opacity: 0, + width: '100%', + height: '100%', + top: 0, + left: 0, + margin: 0, + padding: 0, + zIndex: 1 + } +}; +/** + * @ignore - internal component. + */ + +var SwitchBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function SwitchBase(props, ref) { + var autoFocus = props.autoFocus, + checkedProp = props.checked, + checkedIcon = props.checkedIcon, + classes = props.classes, + className = props.className, + defaultChecked = props.defaultChecked, + disabledProp = props.disabled, + icon = props.icon, + id = props.id, + inputProps = props.inputProps, + inputRef = props.inputRef, + name = props.name, + onBlur = props.onBlur, + onChange = props.onChange, + onFocus = props.onFocus, + readOnly = props.readOnly, + required = props.required, + tabIndex = props.tabIndex, + type = props.type, + value = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["autoFocus", "checked", "checkedIcon", "classes", "className", "defaultChecked", "disabled", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"]); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_7__["default"])({ + controlled: checkedProp, + default: Boolean(defaultChecked), + name: 'SwitchBase', + state: 'checked' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_useControlled, 2), + checked = _useControlled2[0], + setCheckedState = _useControlled2[1]; + + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_8__["default"])(); + + var handleFocus = function handleFocus(event) { + if (onFocus) { + onFocus(event); + } + + if (muiFormControl && muiFormControl.onFocus) { + muiFormControl.onFocus(event); + } + }; + + var handleBlur = function handleBlur(event) { + if (onBlur) { + onBlur(event); + } + + if (muiFormControl && muiFormControl.onBlur) { + muiFormControl.onBlur(event); + } + }; + + var handleInputChange = function handleInputChange(event) { + var newChecked = event.target.checked; + setCheckedState(newChecked); + + if (onChange) { + // TODO v5: remove the second argument. + onChange(event, newChecked); + } + }; + + var disabled = disabledProp; + + if (muiFormControl) { + if (typeof disabled === 'undefined') { + disabled = muiFormControl.disabled; + } + } + + var hasLabelFor = type === 'checkbox' || type === 'radio'; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_IconButton__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + component: "span", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className, checked && classes.checked, disabled && classes.disabled), + disabled: disabled, + tabIndex: null, + role: undefined, + onFocus: handleFocus, + onBlur: handleBlur, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + autoFocus: autoFocus, + checked: checkedProp, + defaultChecked: defaultChecked, + className: classes.input, + disabled: disabled, + id: hasLabelFor && id, + name: name, + onChange: handleInputChange, + readOnly: readOnly, + ref: inputRef, + required: required, + tabIndex: tabIndex, + type: type, + value: value + }, inputProps)), checked ? checkedIcon : icon); +}); // NB: If changed, please update Checkbox, Switch and Radio +// so that the API documentation is updated. + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_9__["default"])(styles, { + name: 'PrivateSwitchBase' +})(SwitchBase)); + +/***/ }), + +/***/ "3Ok2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("gRM1"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Grid__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "3UCn": +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__("mKCr"), + createAggregator = __webpack_require__("aB24"); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; + + +/***/ }), + +/***/ "3Vsr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5ZEc"); +/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("x0Kp"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _ExpansionPanel_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("lsN8"); + + + +/* eslint-disable jsx-a11y/aria-role */ + + + + + + + +var styles = function styles(theme) { + var transition = { + duration: theme.transitions.duration.shortest + }; + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + minHeight: 8 * 6, + transition: theme.transitions.create(['min-height', 'background-color'], transition), + padding: theme.spacing(0, 2), + '&:hover:not($disabled)': { + cursor: 'pointer' + }, + '&$expanded': { + minHeight: 64 + }, + '&$focused': { + backgroundColor: theme.palette.action.focus + }, + '&$disabled': { + opacity: theme.palette.action.disabledOpacity + } + }, + + /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */ + expanded: {}, + + /* Pseudo-class applied to the root element if `focused={true}`. */ + focused: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the children wrapper element. */ + content: { + display: 'flex', + flexGrow: 1, + transition: theme.transitions.create(['margin'], transition), + margin: '12px 0', + '&$expanded': { + margin: '20px 0' + } + }, + + /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */ + expandIcon: { + transform: 'rotate(0deg)', + transition: theme.transitions.create('transform', transition), + '&:hover': { + // Disable the hover effect for the IconButton, + // because a hover effect should apply to the entire Expand button and + // not only to the IconButton. + backgroundColor: 'transparent' + }, + '&$expanded': { + transform: 'rotate(180deg)' + } + } + }; +}; +var warnedOnce = false; +/** + * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention. + * + * You should use `import { AccordionSummary } from '@material-ui/core'` + * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`. + */ + +var ExpansionPanelSummary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ExpansionPanelSummary(props, ref) { + if (false) {} + + var children = props.children, + classes = props.classes, + className = props.className, + expandIcon = props.expandIcon, + IconButtonProps = props.IconButtonProps, + onBlur = props.onBlur, + onClick = props.onClick, + onFocusVisible = props.onFocusVisible, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "expandIcon", "IconButtonProps", "onBlur", "onClick", "onFocusVisible"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + focusedState = _React$useState[0], + setFocusedState = _React$useState[1]; + + var handleFocusVisible = function handleFocusVisible(event) { + setFocusedState(true); + + if (onFocusVisible) { + onFocusVisible(event); + } + }; + + var handleBlur = function handleBlur(event) { + setFocusedState(false); + + if (onBlur) { + onBlur(event); + } + }; + + var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_ExpansionPanel_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_8__["default"]), + _React$useContext$dis = _React$useContext.disabled, + disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis, + expanded = _React$useContext.expanded, + toggle = _React$useContext.toggle; + + var handleChange = function handleChange(event) { + if (toggle) { + toggle(event); + } + + if (onClick) { + onClick(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + focusRipple: false, + disableRipple: true, + disabled: disabled, + component: "div", + "aria-expanded": expanded, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused), + onFocusVisible: handleFocusVisible, + onBlur: handleBlur, + onClick: handleChange, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.content, expanded && classes.expanded) + }, children), expandIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_IconButton__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.expandIcon, expanded && classes.expanded), + edge: "end", + component: "div", + tabIndex: null, + role: null, + "aria-hidden": true + }, IconButtonProps), expandIcon)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiExpansionPanelSummary' +})(ExpansionPanelSummary)); + +/***/ }), + +/***/ "3ZIp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createMixins; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); + + +function createMixins(breakpoints, spacing, mixins) { + var _toolbar; + + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + gutters: function gutters() { + var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', "\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join('\n')); + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + paddingLeft: spacing(2), + paddingRight: spacing(2) + }, styles, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + paddingLeft: spacing(3), + paddingRight: spacing(3) + }, styles[breakpoints.up('sm')]))); + }, + toolbar: (_toolbar = { + minHeight: 56 + }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), { + minHeight: 48 + }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(_toolbar, breakpoints.up('sm'), { + minHeight: 64 + }), _toolbar) + }, mixins); +} + +/***/ }), + +/***/ "3bBg": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BAGGAGE_HEADER_NAME", function() { return BAGGAGE_HEADER_NAME; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_BAGGAGE_STRING_LENGTH", function() { return MAX_BAGGAGE_STRING_LENGTH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SENTRY_BAGGAGE_KEY_PREFIX", function() { return SENTRY_BAGGAGE_KEY_PREFIX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SENTRY_BAGGAGE_KEY_PREFIX_REGEX", function() { return SENTRY_BAGGAGE_KEY_PREFIX_REGEX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "baggageHeaderToDynamicSamplingContext", function() { return baggageHeaderToDynamicSamplingContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dynamicSamplingContextToSentryBaggageHeader", function() { return dynamicSamplingContextToSentryBaggageHeader; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); +/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("loS6"); + + + +const BAGGAGE_HEADER_NAME = 'baggage'; + +const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-'; + +const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; + +/** + * Max length of a serialized baggage string + * + * https://www.w3.org/TR/baggage/#limits + */ +const MAX_BAGGAGE_STRING_LENGTH = 8192; + +/** + * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the "sentry-" prefixed values + * from it. + * + * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks. + * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise. + */ +function baggageHeaderToDynamicSamplingContext( + // Very liberal definition of what any incoming header might look like + baggageHeader, +) { + if (!Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(baggageHeader) && !Array.isArray(baggageHeader)) { + return undefined; + } + + // Intermediary object to store baggage key value pairs of incoming baggage headers on. + // It is later used to read Sentry-DSC-values from. + let baggageObject = {}; + + if (Array.isArray(baggageHeader)) { + // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it + baggageObject = baggageHeader.reduce((acc, curr) => { + const currBaggageObject = baggageHeaderToObject(curr); + return { + ...acc, + ...currBaggageObject, + }; + }, {}); + } else { + // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but + // this is how we choose to handle it) + if (!baggageHeader) { + return undefined; + } + + baggageObject = baggageHeaderToObject(baggageHeader); + } + + // Read all "sentry-" prefixed values out of the baggage object and put it onto a dynamic sampling context object. + const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + + // Only return a dynamic sampling context object if there are keys in it. + // A keyless object means there were no sentry values on the header, which means that there is no DSC. + if (Object.keys(dynamicSamplingContext).length > 0) { + return dynamicSamplingContext ; + } else { + return undefined; + } +} + +/** + * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with "sentry-". + * + * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility + * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is + * `undefined` the function will return `undefined`. + * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext` + * was `undefined`, or if `dynamicSamplingContext` didn't contain any values. + */ +function dynamicSamplingContextToSentryBaggageHeader( + // this also takes undefined for convenience and bundle size in other places + dynamicSamplingContext, +) { + // Prefix all DSC keys with "sentry-" and put them into a new object + const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => { + if (dscValue) { + acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue; + } + return acc; + }, + {}, + ); + + return objectToBaggageHeader(sentryPrefixedDSC); +} + +/** + * Will parse a baggage header, which is a simple key-value map, into a flat object. + * + * @param baggageHeader The baggage header to parse. + * @returns a flat object containing all the key-value pairs from `baggageHeader`. + */ +function baggageHeaderToObject(baggageHeader) { + return baggageHeader + .split(',') + .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim()))) + .reduce((acc, [key, value]) => { + acc[key] = value; + return acc; + }, {}); +} + +/** + * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs. + * + * @param object The object to turn into a baggage header. + * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header + * is not spec compliant. + */ +function objectToBaggageHeader(object) { + if (Object.keys(object).length === 0) { + // An empty baggage header is not spec compliant: We return undefined. + return undefined; + } + + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`; + const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _logger_js__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`, + ); + return baggageHeader; + } else { + return newBaggageHeader; + } + }, ''); +} + + +//# sourceMappingURL=baggage.js.map + + +/***/ }), + +/***/ "3pU+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3AVn"); + + + +function compose() { + for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) { + styles[_key] = arguments[_key]; + } + + var fn = function fn(props) { + return styles.reduce(function (acc, style) { + var output = style(props); + + if (output) { + return Object(_merge__WEBPACK_IMPORTED_MODULE_1__["default"])(acc, output); + } + + return acc; + }, {}); + }; // Alternative approach that doesn't yield any performance gain. + // const handlers = styles.reduce((acc, style) => { + // style.filterProps.forEach(prop => { + // acc[prop] = style; + // }); + // return acc; + // }, {}); + // const fn = props => { + // return Object.keys(props).reduce((acc, prop) => { + // if (handlers[prop]) { + // return merge(acc, handlers[prop](props)); + // } + // return acc; + // }, {}); + // }; + + + fn.propTypes = false ? undefined : {}; + fn.filterProps = styles.reduce(function (acc, style) { + return acc.concat(style.filterProps); + }, []); + return fn; +} + +/* harmony default export */ __webpack_exports__["default"] = (compose); + +/***/ }), + +/***/ "3qHZ": +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), + +/***/ "3rVP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getDeviceName = void 0; + +var _capitalize = _interopRequireDefault(__webpack_require__("13ub")); + +var _cordova = __webpack_require__("I/47"); + +var _plugins = __webpack_require__("e7+3"); + +var _platform = __webpack_require__("GA40"); + +var DEFAULT_DEVICE = 'Device'; + +// device +var getAppleModel = function getAppleModel(identifier) { + var devices = ['iPhone', 'iPad', 'Watch', 'AppleTV']; + + for (var _i = 0, _devices = devices; _i < _devices.length; _i++) { + var _device = _devices[_i]; + + if (identifier.match(new RegExp(_device))) { + return _device; + } + } + + return DEFAULT_DEVICE; +}; + +var getDeviceName = function getDeviceName() { + if (!(0, _plugins.hasDevicePlugin)()) { + if ((0, _cordova.isCordova)()) { + console.warn('You should install `cordova-plugin-device`.'); // eslint-disable-line no-console + } + + return DEFAULT_DEVICE; + } + + var _window$device = window.device, + manufacturer = _window$device.manufacturer, + originalModel = _window$device.model; + var model = (0, _platform.isIOSApp)() ? getAppleModel(originalModel) : originalModel; + return "".concat((0, _capitalize.default)(manufacturer), " ").concat(model); +}; + +exports.getDeviceName = getDeviceName; + +/***/ }), + +/***/ "3rvV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var refType = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object]); +/* harmony default export */ __webpack_exports__["default"] = (refType); + +/***/ }), + +/***/ "3wGQ": +/***/ (function(module, exports) { + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; + + +/***/ }), + +/***/ "3yS1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsFunction", function() { return whenMapDispatchToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsMissing", function() { return whenMapDispatchToPropsIsMissing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsObject", function() { return whenMapDispatchToPropsIsObject; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iNHL"); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fbfW"); + + +function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsFunc"])(mapDispatchToProps, 'mapDispatchToProps') : undefined; +} +function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return { + dispatch: dispatch + }; + }) : undefined; +} +function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return Object(redux__WEBPACK_IMPORTED_MODULE_0__["bindActionCreators"])(mapDispatchToProps, dispatch); + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); + +/***/ }), + +/***/ "3zUp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_RETRY_AFTER", function() { return DEFAULT_RETRY_AFTER; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disabledUntil", function() { return disabledUntil; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRateLimited", function() { return isRateLimited; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseRetryAfterHeader", function() { return parseRetryAfterHeader; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateRateLimits", function() { return updateRateLimits; }); +// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend + +const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds + +/** + * Extracts Retry-After value from the request header or returns default value + * @param header string representation of 'Retry-After' header + * @param now current unix timestamp + * + */ +function parseRetryAfterHeader(header, now = Date.now()) { + const headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) { + return headerDelay * 1000; + } + + const headerDate = Date.parse(`${header}`); + if (!isNaN(headerDate)) { + return headerDate - now; + } + + return DEFAULT_RETRY_AFTER; +} + +/** + * Gets the time that given category is disabled until for rate limiting + */ +function disabledUntil(limits, category) { + return limits[category] || limits.all || 0; +} + +/** + * Checks if a category is rate limited + */ +function isRateLimited(limits, category, now = Date.now()) { + return disabledUntil(limits, category) > now; +} + +/** + * Update ratelimits from incoming headers. + * Returns true if headers contains a non-empty rate limiting header. + */ +function updateRateLimits( + limits, + { statusCode, headers }, + now = Date.now(), +) { + const updatedRateLimits = { + ...limits, + }; + + // "The name is case-insensitive." + // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get + const rateLimitHeader = headers && headers['x-sentry-rate-limits']; + const retryAfterHeader = headers && headers['retry-after']; + + if (rateLimitHeader) { + /** + * rate limit headers are of the form + * <header>,<header>,.. + * where each <header> is of the form + * <retry_after>: <categories>: <scope>: <reason_code> + * where + * <retry_after> is a delay in seconds + * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form + * <category>;<category>;... + * <scope> is what's being limited (org, project, or key) - ignored by SDK + * <reason_code> is an arbitrary string like "org_quota" - ignored by SDK + */ + for (const limit of rateLimitHeader.trim().split(',')) { + const [retryAfter, categories] = limit.split(':', 2); + const headerDelay = parseInt(retryAfter, 10); + const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default + if (!categories) { + updatedRateLimits.all = now + delay; + } else { + for (const category of categories.split(';')) { + updatedRateLimits[category] = now + delay; + } + } + } + } else if (retryAfterHeader) { + updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now); + } else if (statusCode === 429) { + updatedRateLimits.all = now + 60 * 1000; + } + + return updatedRateLimits; +} + + +//# sourceMappingURL=ratelimit.js.map + + +/***/ }), + +/***/ "41Vg": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; + + +/***/ }), + +/***/ "42PH": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'λιγότερο από ένα δευτερόλεπτο', + other: 'λιγότερο από {{count}} δευτερόλεπτα' + }, + + xSeconds: { + one: '1 δευτερόλεπτο', + other: '{{count}} δευτερόλεπτα' + }, + + halfAMinute: 'μισό λεπτό', + + lessThanXMinutes: { + one: 'λιγότερο από ένα λεπτό', + other: 'λιγότερο από {{count}} λεπτά' + }, + + xMinutes: { + one: '1 λεπτό', + other: '{{count}} λεπτά' + }, + + aboutXHours: { + one: 'περίπου 1 ώρα', + other: 'περίπου {{count}} ώρες' + }, + + xHours: { + one: '1 ώρα', + other: '{{count}} ώρες' + }, + + xDays: { + one: '1 ημέρα', + other: '{{count}} ημέρες' + }, + + aboutXMonths: { + one: 'περίπου 1 μήνας', + other: 'περίπου {{count}} μήνες' + }, + + xMonths: { + one: '1 μήνας', + other: '{{count}} μήνες' + }, + + aboutXYears: { + one: 'περίπου 1 χρόνο', + other: 'περίπου {{count}} χρόνια' + }, + + xYears: { + one: '1 χρόνο', + other: '{{count}} χρόνια' + }, + + overXYears: { + one: 'πάνω από 1 χρόνο', + other: 'πάνω από {{count}} χρόνια' + }, + + almostXYears: { + one: 'περίπου 1 χρόνο', + other: 'περίπου {{count}} χρόνια' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'σε ' + result + } else { + return result + ' πρίν' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "44qC": +/***/ (function(module, exports, __webpack_require__) { + +var baseClamp = __webpack_require__("BDgH"), + baseToString = __webpack_require__("xl7M"), + toInteger = __webpack_require__("lhrJ"), + toString = __webpack_require__("GCWF"); + +/** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ +function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; +} + +module.exports = startsWith; + + +/***/ }), + +/***/ "46VF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("jiof"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); + + + + + + + + +var styles = function styles(theme) { + var light = theme.palette.type === 'light'; + var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)'; + return { + /* Styles applied to the root element. */ + root: { + position: 'relative' + }, + + /* Styles applied to the root element if the component is a descendant of `FormControl`. */ + formControl: { + 'label + &': { + marginTop: 16 + } + }, + + /* Styles applied to the root element if the component is focused. */ + focused: {}, + + /* Styles applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if color secondary. */ + colorSecondary: { + '&$underline:after': { + borderBottomColor: theme.palette.secondary.main + } + }, + + /* Styles applied to the root element if `disableUnderline={false}`. */ + underline: { + '&:after': { + borderBottom: "2px solid ".concat(theme.palette.primary.main), + left: 0, + bottom: 0, + // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 + content: '""', + position: 'absolute', + right: 0, + transform: 'scaleX(0)', + transition: theme.transitions.create('transform', { + duration: theme.transitions.duration.shorter, + easing: theme.transitions.easing.easeOut + }), + pointerEvents: 'none' // Transparent to the hover style. + + }, + '&$focused:after': { + transform: 'scaleX(1)' + }, + '&$error:after': { + borderBottomColor: theme.palette.error.main, + transform: 'scaleX(1)' // error is always underlined in red + + }, + '&:before': { + borderBottom: "1px solid ".concat(bottomLineColor), + left: 0, + bottom: 0, + // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 + content: '"\\00a0"', + position: 'absolute', + right: 0, + transition: theme.transitions.create('border-bottom-color', { + duration: theme.transitions.duration.shorter + }), + pointerEvents: 'none' // Transparent to the hover style. + + }, + '&:hover:not($disabled):before': { + borderBottom: "2px solid ".concat(theme.palette.text.primary), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + borderBottom: "1px solid ".concat(bottomLineColor) + } + }, + '&$disabled:before': { + borderBottomStyle: 'dotted' + } + }, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Styles applied to the `input` element if `margin="dense"`. */ + marginDense: {}, + + /* Styles applied to the root element if `multiline={true}`. */ + multiline: {}, + + /* Styles applied to the root element if `fullWidth={true}`. */ + fullWidth: {}, + + /* Styles applied to the `input` element. */ + input: {}, + + /* Styles applied to the `input` element if `margin="dense"`. */ + inputMarginDense: {}, + + /* Styles applied to the `input` element if `multiline={true}`. */ + inputMultiline: {}, + + /* Styles applied to the `input` element if `type="search"`. */ + inputTypeSearch: {} + }; +}; +var Input = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Input(props, ref) { + var disableUnderline = props.disableUnderline, + classes = props.classes, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$inputComponent = props.inputComponent, + inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent, + _props$multiline = props.multiline, + multiline = _props$multiline === void 0 ? false : _props$multiline, + _props$type = props.type, + type = _props$type === void 0 ? 'text' : _props$type, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["disableUnderline", "classes", "fullWidth", "inputComponent", "multiline", "type"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_InputBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, classes, { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, !disableUnderline && classes.underline), + underline: null + }), + fullWidth: fullWidth, + inputComponent: inputComponent, + multiline: multiline, + ref: ref, + type: type + }, other)); +}); + false ? undefined : void 0; +Input.muiName = 'Input'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiInput' +})(Input)); + +/***/ }), + +/***/ "4733": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Snackbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BjKX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Snackbar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "48N2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_optionalChain", function() { return _optionalChain; }); +/** + * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, + * descriptors, and functions. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 + * + * @param ops Array result of expression conversion + * @returns The value of the expression + */ +function _optionalChain(ops) { + let lastAccessLHS = undefined; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i] ; + const fn = ops[i + 1] ; + i += 2; + // by checking for loose equality to `null`, we catch both `null` and `undefined` + if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { + // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it + return; + } + if (op === 'access' || op === 'optionalAccess') { + lastAccessLHS = value; + value = fn(value); + } else if (op === 'call' || op === 'optionalCall') { + value = fn((...args) => (value ).call(lastAccessLHS, ...args)); + lastAccessLHS = undefined; + } + } + return value; +} + +// Sucrase version +// function _optionalChain(ops) { +// let lastAccessLHS = undefined; +// let value = ops[0]; +// let i = 1; +// while (i < ops.length) { +// const op = ops[i]; +// const fn = ops[i + 1]; +// i += 2; +// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { +// return undefined; +// } +// if (op === 'access' || op === 'optionalAccess') { +// lastAccessLHS = value; +// value = fn(value); +// } else if (op === 'call' || op === 'optionalCall') { +// value = fn((...args) => value.call(lastAccessLHS, ...args)); +// lastAccessLHS = undefined; +// } +// } +// return value; +// } + + +//# sourceMappingURL=_optionalChain.js.map + + +/***/ }), + +/***/ "49+2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oR6s"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Button__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "4ESo": +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "4FGL": +/***/ (function(module, exports) { + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; + + +/***/ }), + +/***/ "4Fdj": +/***/ (function(module, exports) { + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; + + +/***/ }), + +/***/ "4Fsf": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"), + Filter = __webpack_require__("DhlH"); + +var log = new Transform(), + slice = Array.prototype.slice; + +exports = module.exports = function create(name) { + var o = function() { log.write(name, undefined, slice.call(arguments)); return o; }; + o.debug = function() { log.write(name, 'debug', slice.call(arguments)); return o; }; + o.info = function() { log.write(name, 'info', slice.call(arguments)); return o; }; + o.warn = function() { log.write(name, 'warn', slice.call(arguments)); return o; }; + o.error = function() { log.write(name, 'error', slice.call(arguments)); return o; }; + o.group = function() { log.write(name, 'group', slice.call(arguments)); return o; }; + o.groupEnd = function() { log.write(name, 'groupEnd', slice.call(arguments)); return o; }; + o.log = o.debug; // for interface compliance with Node and browser consoles + o.suggest = exports.suggest; + o.format = log.format; + return o; +}; + +// filled in separately +exports.defaultBackend = exports.defaultFormatter = null; + +exports.pipe = function(dest) { + return log.pipe(dest); +}; + +exports.end = exports.unpipe = exports.disable = function(from) { + return log.unpipe(from); +}; + +exports.Transform = Transform; +exports.Filter = Filter; +// this is the default filter that's applied when .enable() is called normally +// you can bypass it completely and set up your own pipes +exports.suggest = new Filter(); + +exports.enable = function() { + if(exports.defaultFormatter) { + return log.pipe(exports.suggest) // filter + .pipe(exports.defaultFormatter) // formatter + .pipe(exports.defaultBackend); // backend + } + return log.pipe(exports.suggest) // filter + .pipe(exports.defaultBackend); // formatter +}; + + + +/***/ }), + +/***/ "4GiZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); + +var boxShadow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'boxShadow', + themeKey: 'shadows' +}); +/* harmony default export */ __webpack_exports__["default"] = (boxShadow); + +/***/ }), + +/***/ "4HHt": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getAppDisplayName = exports.getUrl = exports.isInstalled = exports.getStoreInstallationURL = exports.getStoreURL = void 0; + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var STORE_SLUG = 'store'; +/** + * Returns the store URL of an app/konnector + * + * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or /konnectors + * @param {object} [app={}] AppObject + * @returns {string} URL as string + */ + +var getStoreURL = function getStoreURL() { + var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (!app.slug) { + throw new Error('Expected app / konnector with the defined slug'); + } + + var storeApp = isInstalled(appData, { + slug: STORE_SLUG + }); + if (!storeApp) return null; + var storeUrl = storeApp.links && storeApp.links.related; + if (!storeUrl) return null; + return "".concat(storeUrl, "#/discover/").concat(app.slug); +}; +/** + * Returns the store URL to install/update an app/konnector + * + * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or + * /konnectors/ + * @param {object} [app={}] AppObject + * @returns {string} URL as string + */ + + +exports.getStoreURL = getStoreURL; + +var getStoreInstallationURL = function getStoreInstallationURL() { + var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var storeUrl = getStoreURL(appData, app); + + if (!storeUrl) { + return null; + } + + return "".concat(storeUrl, "/install"); +}; +/** + * + * @param {Array} apps Array of apps returned by /apps /konnectors + * @param {object} wantedApp io.cozy.app with at least a slug + * @returns {object} The io.cozy.app is installed or undefined if not + */ + + +exports.getStoreInstallationURL = getStoreInstallationURL; + +var isInstalled = function isInstalled() { + var apps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var wantedApp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return apps.find(function (app) { + return app.attributes && app.attributes.slug === wantedApp.slug; + }); +}; +/** + * + * @param {object} app io.cozy.apps document + * @returns {string} url to the app + */ + + +exports.isInstalled = isInstalled; + +var getUrl = function getUrl(app) { + return app.links && app.links.related; +}; +/** + * getAppDisplayName - Combines the translated prefix and name of the app into a single string. + * + * @param {object} app io.cozy.apps or io.cozy.konnectors document + * @param {string} lang Locale to use + * + * @returns {string} Name of the app suitable for display + */ + + +exports.getUrl = getUrl; + +var getAppDisplayName = function getAppDisplayName(app, lang) { + var basePrefix = (0, _get.default)(app, 'name_prefix'); + var baseName = (0, _get.default)(app, 'name'); + var translatedName = (0, _get.default)(app, ['locales', lang, 'name'], baseName); + var translatedPrefix = (0, _get.default)(app, ['locales', lang, 'name_prefix'], basePrefix); + return translatedPrefix && translatedPrefix.toLowerCase() !== 'cozy' ? "".concat(translatedPrefix, " ").concat(translatedName) : translatedName; +}; + +exports.getAppDisplayName = getAppDisplayName; + +/***/ }), + +/***/ "4K71": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isQualificationNote = exports.getThemeByItem = void 0; + +var _documentTypeData = __webpack_require__("Wysw"); + +/** + * @param {import("../../types").QualificationAttributes} item - Qualification item + * @returns {import("../../types").Theme|undefined} + */ +var findDefaultItemTheme = function findDefaultItemTheme(item) { + return _documentTypeData.themesList.find(function (theme) { + return theme.defaultItems && theme.defaultItems.includes(item.label); + }); +}; +/** + * @param {import("../../types").QualificationAttributes} item - Qualification item + * @returns {import("../../types").Theme|undefined} + */ + + +var getThemeByItem = function getThemeByItem(item) { + var defaultTheme = findDefaultItemTheme(item); + + if (defaultTheme) { + return defaultTheme; + } + + return _documentTypeData.themesList.find(function (theme) { + return theme.items.some(function (it) { + return it.label === item.label; + }); + }); +}; +/** + * Check if a qualification is a note + * + * @param {import("../../types").QualificationAttributes} item - Qualification item + * @returns {boolean} + */ + + +exports.getThemeByItem = getThemeByItem; + +var isQualificationNote = function isQualificationNote(item) { + return item.label.toLowerCase().startsWith('note_'); +}; + +exports.isQualificationNote = isQualificationNote; + +/***/ }), + +/***/ "4KdM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoMergeLevel1; }); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function autoMergeLevel1(inboundState, originalState, reducedState, _ref) { + var debug = _ref.debug; + + var newState = _extends({}, reducedState); + // only rehydrate if inboundState exists and is an object + if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { + Object.keys(inboundState).forEach(function (key) { + // ignore _persist data + if (key === '_persist') return; + // if reducer modifies substate, skip auto rehydration + if (originalState[key] !== reducedState[key]) { + if (false) {} + return; + } + // otherwise hard set the new value + newState[key] = inboundState[key]; + }); + } + + if (false) {} + + return newState; +} + +/* + autoMergeLevel1: + - merges 1 level of substate + - skips substate if already modified +*/ + +/***/ }), + +/***/ "4M1+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _registry = _interopRequireDefault(__webpack_require__("J3p3")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +/** + * Returns all apps in maintenance + * + * @param {CozyClient} client CozyClient instance + * + * @returns {import("../types").AppsDoctype[]} An array with all apps in maintenance + */ +var useAppsInMaintenance = function useAppsInMaintenance(client) { + var _useState = (0, _react.useState)([]), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + appsInMaintenance = _useState2[0], + setAppsInMaintenance = _useState2[1]; + + (0, _react.useEffect)(function () { + var fetchData = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var registry, newAppsInMaintenance; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + registry = new _registry.default({ + client: client + }); + _context.next = 3; + return registry.fetchAppsInMaintenance(); + + case 3: + newAppsInMaintenance = _context.sent; + setAppsInMaintenance(newAppsInMaintenance || []); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function fetchData() { + return _ref.apply(this, arguments); + }; + }(); + + fetchData(); + }, [client]); + return appsInMaintenance; +}; + +var _default = useAppsInMaintenance; +exports.default = _default; + +/***/ }), + +/***/ "4P2O": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsConstant", function() { return wrapMapToPropsConstant; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDependsOnOwnProps", function() { return getDependsOnOwnProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsFunc", function() { return wrapMapToPropsFunc; }); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GV8L"); + +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. + +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// + +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (false) {} + return props; + }; + + return proxy; + }; +} + +/***/ }), + +/***/ "4Rfx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3+Qv"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + marginTop: 8, + marginLeft: 12, + // half icon + paddingLeft: 8 + 12, + // margin + half icon + paddingRight: 8, + borderLeft: "1px solid ".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]) + }, + + /* Styles applied to the root element if `last={true}` (controlled by `Step`). */ + last: { + borderLeft: 'none' + }, + + /* Styles applied to the Transition component. */ + transition: {} + }; +}; +var StepContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function StepContent(props, ref) { + var active = props.active, + alternativeLabel = props.alternativeLabel, + children = props.children, + classes = props.classes, + className = props.className, + completed = props.completed, + expanded = props.expanded, + last = props.last, + optional = props.optional, + orientation = props.orientation, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_5__["default"] : _props$TransitionComp, + _props$transitionDura = props.transitionDuration, + transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura, + TransitionProps = props.TransitionProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "expanded", "last", "optional", "orientation", "TransitionComponent", "transitionDuration", "TransitionProps"]); + + if (false) {} + + var transitionDuration = transitionDurationProp; + + if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) { + transitionDuration = undefined; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, last && classes.last), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: active || expanded, + className: classes.transition, + timeout: transitionDuration, + unmountOnExit: true + }, TransitionProps), children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiStepContent' +})(StepContent)); + +/***/ }), + +/***/ "4SeG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ll/m"); +/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("88Tv"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("IU9S"); + + + + + + + + +function getContainer(container) { + container = typeof container === 'function' ? container() : container; // #StrictMode ready + + return react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"](container); +} + +var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"]; +/** + * Portals provide a first-class way to render children into a DOM node + * that exists outside the DOM hierarchy of the parent component. + */ + +var Portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"](function Portal(props, ref) { + var children = props.children, + container = props.container, + _props$disablePortal = props.disablePortal, + disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal, + onRendered = props.onRendered; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](null), + mountNode = _React$useState[0], + setMountNode = _React$useState[1]; + + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"](children) ? children.ref : null, ref); + useEnhancedEffect(function () { + if (!disablePortal) { + setMountNode(getContainer(container) || document.body); + } + }, [container, disablePortal]); + useEnhancedEffect(function () { + if (mountNode && !disablePortal) { + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_5__["default"])(ref, mountNode); + return function () { + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_5__["default"])(ref, null); + }; + } + + return undefined; + }, [ref, mountNode, disablePortal]); + useEnhancedEffect(function () { + if (onRendered && (mountNode || disablePortal)) { + onRendered(); + } + }, [onRendered, mountNode, disablePortal]); + + if (disablePortal) { + if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"](children)) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](children, { + ref: handleRef + }); + } + + return children; + } + + return mountNode ? /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_1__["createPortal"](children, mountNode) : mountNode; +}); + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Portal); + +/***/ }), + +/***/ "4Soe": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Imports +exports.i(__webpack_require__("UTF8"), ""); +exports.i(__webpack_require__("/O3k"), ""); +exports.push([module.i, "@import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);", ""]); + +// Module +exports.push([module.i, "/* Cozy UI utilities classes */\n/* Cozy UI React components styles */\n/* App styles */\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\nhtml {\n background: #121212;\n}\n\nbody {\n background: #121212;\n overflow: unset !important;\n}\n\n.column {\n display: flex;\n flex-direction: column;\n}\n\n.row {\n display: flex;\n flex-direction: row;\n}\n\n.cozy-bar {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 0;\n}\n\n[role=banner] .coz-bar-container {\n background-color: #ffffff;\n}\n@media only screen and (max-width : 768px) {\n [role=banner] .coz-bar-container {\n padding: 0.6rem 0 0 0;\n background-color: unset;\n }\n}\n\n.coz-bar-wrapper {\n box-shadow: unset !important;\n background: unset !important;\n}\n\n.coz-label {\n color: #32363f;\n}\n\n.content-view-loading {\n height: 80vh;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n color: #e0e0e0;\n}\n.content-view-loading .content-view-loading-text {\n padding-top: 1rem;\n margin: 0 2rem;\n text-align: center;\n}\n.content-view-loading .content-view-loading-button {\n max-width: 50vw;\n margin-top: 1rem;\n}\n\n[role=main] {\n /* width */\n /* Track */\n /* Handle */\n}\n[role=main]::-webkit-scrollbar {\n width: 10px;\n}\n[role=main]::-webkit-scrollbar-track {\n background: #3e4045;\n}\n[role=main]::-webkit-scrollbar-thumb {\n background: #6f7074;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n* {\n font-family: Lato, sans-serif;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np {\n color: #a0a0a0;\n font-family: Lato, sans-serif;\n}\n\n.home-title {\n font-size: 1rem;\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n line-height: 120%;\n text-transform: uppercase;\n}\n\n.app-title {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 21px;\n line-height: 24px;\n text-align: center;\n letter-spacing: 0.15px;\n color: #e0e0e0;\n text-shadow: 0px -1px 0px #060609, 0px 1px 0px rgba(255, 255, 255, 0.07);\n}\n\n.text-10, .text-10-italic, .text-10-bold, .text-10-bold-capitalize, .text-10-bold-uppercase, .text-10-normal, .text-10-normal-150, .text-10-normal-uppercase {\n font-style: normal;\n font-size: 0.625rem;\n line-height: 120%;\n}\n.text-10-normal, .text-10-normal-150, .text-10-normal-uppercase {\n font-weight: normal;\n}\n.text-10-normal-uppercase {\n text-transform: uppercase;\n}\n.text-10-normal-150 {\n line-height: 150%;\n}\n.text-10-bold, .text-10-bold-capitalize, .text-10-bold-uppercase {\n font-weight: 700;\n}\n.text-10-bold-uppercase {\n text-transform: uppercase;\n}\n.text-10-bold-capitalize {\n text-transform: capitalize;\n}\n.text-10-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-13, .text-13-italic, .text-13-bold, .text-13-bold-capitalize, .text-13-bold-uppercase, .text-13-normal, .text-13-normal-150, .text-13-normal-uppercase {\n font-style: normal;\n font-size: 0.8125rem;\n line-height: 120%;\n}\n.text-13-normal, .text-13-normal-150, .text-13-normal-uppercase {\n font-weight: normal;\n}\n.text-13-normal-uppercase {\n text-transform: uppercase;\n}\n.text-13-normal-150 {\n line-height: 150%;\n}\n.text-13-bold, .text-13-bold-capitalize, .text-13-bold-uppercase {\n font-weight: 700;\n}\n.text-13-bold-uppercase {\n text-transform: uppercase;\n}\n.text-13-bold-capitalize {\n text-transform: capitalize;\n}\n.text-13-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-14, .text-14-italic, .text-14-bold, .text-14-bold-capitalize, .text-14-bold-uppercase, .text-14-normal, .text-14-normal-150, .text-14-normal-uppercase {\n font-style: normal;\n font-size: 0.875rem;\n line-height: 120%;\n}\n.text-14-normal, .text-14-normal-150, .text-14-normal-uppercase {\n font-weight: normal;\n}\n.text-14-normal-uppercase {\n text-transform: uppercase;\n}\n.text-14-normal-150 {\n line-height: 150%;\n}\n.text-14-bold, .text-14-bold-capitalize, .text-14-bold-uppercase {\n font-weight: 700;\n}\n.text-14-bold-uppercase {\n text-transform: uppercase;\n}\n.text-14-bold-capitalize {\n text-transform: capitalize;\n}\n.text-14-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-15, .text-15-italic, .text-15-bold, .text-15-bold-capitalize, .text-15-bold-uppercase, .text-15-normal, .text-15-normal-150, .text-15-normal-uppercase {\n font-style: normal;\n font-size: 0.938rem;\n line-height: 120%;\n}\n.text-15-normal, .text-15-normal-150, .text-15-normal-uppercase {\n font-weight: normal;\n}\n.text-15-normal-uppercase {\n text-transform: uppercase;\n}\n.text-15-normal-150 {\n line-height: 150%;\n}\n.text-15-bold, .text-15-bold-capitalize, .text-15-bold-uppercase {\n font-weight: 700;\n}\n.text-15-bold-uppercase {\n text-transform: uppercase;\n}\n.text-15-bold-capitalize {\n text-transform: capitalize;\n}\n.text-15-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-16, .text-16-italic, .text-16-bold, .text-16-bold-capitalize, .text-16-bold-uppercase, .text-16-normal, .text-16-normal-150, .text-16-normal-uppercase {\n font-style: normal;\n font-size: 1rem;\n line-height: 120%;\n}\n.text-16-normal, .text-16-normal-150, .text-16-normal-uppercase {\n font-weight: normal;\n}\n.text-16-normal-uppercase {\n text-transform: uppercase;\n}\n.text-16-normal-150 {\n line-height: 150%;\n}\n.text-16-bold, .text-16-bold-capitalize, .text-16-bold-uppercase {\n font-weight: 700;\n}\n.text-16-bold-uppercase {\n text-transform: uppercase;\n}\n.text-16-bold-capitalize {\n text-transform: capitalize;\n}\n.text-16-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-18, .text-18-italic, .text-18-bold, .text-18-bold-capitalize, .text-18-bold-uppercase, .text-18-normal, .text-18-normal-150, .text-18-normal-uppercase {\n font-style: normal;\n font-size: 1.125rem;\n line-height: 120%;\n}\n.text-18-normal, .text-18-normal-150, .text-18-normal-uppercase {\n font-weight: normal;\n}\n.text-18-normal-uppercase {\n text-transform: uppercase;\n}\n.text-18-normal-150 {\n line-height: 150%;\n}\n.text-18-bold, .text-18-bold-capitalize, .text-18-bold-uppercase {\n font-weight: 700;\n}\n.text-18-bold-uppercase {\n text-transform: uppercase;\n}\n.text-18-bold-capitalize {\n text-transform: capitalize;\n}\n.text-18-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-19, .text-19-italic, .text-19-bold, .text-19-bold-capitalize, .text-19-bold-uppercase, .text-19-normal, .text-19-normal-150, .text-19-normal-uppercase {\n font-style: normal;\n font-size: 1.188rem;\n line-height: 120%;\n}\n.text-19-normal, .text-19-normal-150, .text-19-normal-uppercase {\n font-weight: normal;\n}\n.text-19-normal-uppercase {\n text-transform: uppercase;\n}\n.text-19-normal-150 {\n line-height: 150%;\n}\n.text-19-bold, .text-19-bold-capitalize, .text-19-bold-uppercase {\n font-weight: 700;\n}\n.text-19-bold-uppercase {\n text-transform: uppercase;\n}\n.text-19-bold-capitalize {\n text-transform: capitalize;\n}\n.text-19-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-20, .text-20-italic, .text-20-bold, .text-20-bold-capitalize, .text-20-bold-uppercase, .text-20-normal, .text-20-normal-150, .text-20-normal-uppercase {\n font-style: normal;\n font-size: 1.25rem;\n line-height: 120%;\n}\n.text-20-normal, .text-20-normal-150, .text-20-normal-uppercase {\n font-weight: normal;\n}\n.text-20-normal-uppercase {\n text-transform: uppercase;\n}\n.text-20-normal-150 {\n line-height: 150%;\n}\n.text-20-bold, .text-20-bold-capitalize, .text-20-bold-uppercase {\n font-weight: 700;\n}\n.text-20-bold-uppercase {\n text-transform: uppercase;\n}\n.text-20-bold-capitalize {\n text-transform: capitalize;\n}\n.text-20-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-21, .text-21-italic, .text-21-bold, .text-21-bold-capitalize, .text-21-bold-uppercase, .text-21-normal, .text-21-normal-150, .text-21-normal-uppercase {\n font-style: normal;\n font-size: 1.313rem;\n line-height: 120%;\n}\n.text-21-normal, .text-21-normal-150, .text-21-normal-uppercase {\n font-weight: normal;\n}\n.text-21-normal-uppercase {\n text-transform: uppercase;\n}\n.text-21-normal-150 {\n line-height: 150%;\n}\n.text-21-bold, .text-21-bold-capitalize, .text-21-bold-uppercase {\n font-weight: 700;\n}\n.text-21-bold-uppercase {\n text-transform: uppercase;\n}\n.text-21-bold-capitalize {\n text-transform: capitalize;\n}\n.text-21-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-22, .text-22-italic, .text-22-bold, .text-22-bold-capitalize, .text-22-bold-uppercase, .text-22-normal, .text-22-normal-150, .text-22-normal-uppercase {\n font-style: normal;\n font-size: 1.375rem;\n line-height: 120%;\n}\n.text-22-normal, .text-22-normal-150, .text-22-normal-uppercase {\n font-weight: normal;\n}\n.text-22-normal-uppercase {\n text-transform: uppercase;\n}\n.text-22-normal-150 {\n line-height: 150%;\n}\n.text-22-bold, .text-22-bold-capitalize, .text-22-bold-uppercase {\n font-weight: 700;\n}\n.text-22-bold-uppercase {\n text-transform: uppercase;\n}\n.text-22-bold-capitalize {\n text-transform: capitalize;\n}\n.text-22-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-24, .text-24-italic, .text-24-bold, .text-24-bold-capitalize, .text-24-bold-uppercase, .text-24-normal, .text-24-normal-150, .text-24-normal-uppercase {\n font-style: normal;\n font-size: 1.5rem;\n line-height: 120%;\n}\n.text-24-normal, .text-24-normal-150, .text-24-normal-uppercase {\n font-weight: normal;\n}\n.text-24-normal-uppercase {\n text-transform: uppercase;\n}\n.text-24-normal-150 {\n line-height: 150%;\n}\n.text-24-bold, .text-24-bold-capitalize, .text-24-bold-uppercase {\n font-weight: 700;\n}\n.text-24-bold-uppercase {\n text-transform: uppercase;\n}\n.text-24-bold-capitalize {\n text-transform: capitalize;\n}\n.text-24-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-26, .text-26-italic, .text-26-bold, .text-26-bold-capitalize, .text-26-bold-uppercase, .text-26-normal, .text-26-normal-150, .text-26-normal-uppercase {\n font-style: normal;\n font-size: 1.625rem;\n line-height: 120%;\n}\n.text-26-normal, .text-26-normal-150, .text-26-normal-uppercase {\n font-weight: normal;\n}\n.text-26-normal-uppercase {\n text-transform: uppercase;\n}\n.text-26-normal-150 {\n line-height: 150%;\n}\n.text-26-bold, .text-26-bold-capitalize, .text-26-bold-uppercase {\n font-weight: 700;\n}\n.text-26-bold-uppercase {\n text-transform: uppercase;\n}\n.text-26-bold-capitalize {\n text-transform: capitalize;\n}\n.text-26-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-28, .text-28-italic, .text-28-bold, .text-28-bold-capitalize, .text-28-bold-uppercase, .text-28-normal, .text-28-normal-150, .text-28-normal-uppercase {\n font-style: normal;\n font-size: 1.75rem;\n line-height: 120%;\n}\n.text-28-normal, .text-28-normal-150, .text-28-normal-uppercase {\n font-weight: normal;\n}\n.text-28-normal-uppercase {\n text-transform: uppercase;\n}\n.text-28-normal-150 {\n line-height: 150%;\n}\n.text-28-bold, .text-28-bold-capitalize, .text-28-bold-uppercase {\n font-weight: 700;\n}\n.text-28-bold-uppercase {\n text-transform: uppercase;\n}\n.text-28-bold-capitalize {\n text-transform: capitalize;\n}\n.text-28-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n.text-36, .text-36-italic, .text-36-bold, .text-36-bold-capitalize, .text-36-bold-uppercase, .text-36-normal, .text-36-normal-150, .text-36-normal-uppercase {\n font-style: normal;\n font-size: 2.25rem;\n line-height: 120%;\n}\n.text-36-normal, .text-36-normal-150, .text-36-normal-uppercase {\n font-weight: normal;\n}\n.text-36-normal-uppercase {\n text-transform: uppercase;\n}\n.text-36-normal-150 {\n line-height: 150%;\n}\n.text-36-bold, .text-36-bold-capitalize, .text-36-bold-uppercase {\n font-weight: 700;\n}\n.text-36-bold-uppercase {\n text-transform: uppercase;\n}\n.text-36-bold-capitalize {\n text-transform: capitalize;\n}\n.text-36-italic {\n font-style: italic;\n font-weight: normal;\n}\n\n/* Card */\n.card-title-on {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 1.125rem;\n line-height: 120%;\n color: #e0e0e0;\n}\n\n.card-text-bold {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 1rem;\n line-height: 120%;\n color: #e0e0e0;\n}\n\n.card-indicator {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 1rem;\n line-height: 120%;\n color: #e0e0e0;\n}\n\n.card-text {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 1rem;\n line-height: 120%;\n color: #e0e0e0;\n}\n\n/* Chart */\n.chart-ticks-x-text {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 1rem;\n line-height: 120%;\n}\n@media only screen and (max-width : 768px) {\n .chart-ticks-x-text {\n font-size: 0.685rem;\n }\n}\n\n.chart-ticks-y-text {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: normal;\n font-size: 0.9rem;\n line-height: 120%;\n}\n@media only screen and (max-width : 768px) {\n .chart-ticks-y-text {\n font-size: 0.75rem;\n }\n}\n\n/* Cozy bar */\n.cozybar {\n font-family: Lato, sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 1.3125rem;\n line-height: 120%;\n color: #e0e0e0;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n.axis {\n color: #7b7b7b;\n}\n.axis .tick-text {\n fill: #7b7b7b;\n}\n.axis .tick-text.tick-text-selected {\n fill: #e0e0e0;\n}\n.axis .separator {\n text-align: center;\n margin: 0 2px;\n font-size: 1rem !important;\n}\n\n.value-text {\n fill: #7b7b7b;\n}\n.value-text.selected {\n fill: #e0e0e0;\n}\n\n.barContainer.disabled *,\n.barFill.disabled * {\n cursor: default !important;\n}\n.barContainer:hover,\n.barFill:hover {\n cursor: pointer;\n}\n\n.background-true {\n opacity: 0.1;\n}\n.background-true:hover {\n cursor: pointer;\n}\n\n.background-false {\n opacity: 0;\n}\n\n.bar-compare-ELECTRICITY:hover,\n.bar-compare-GAS:hover,\n.bar-compare-WATER:hover,\n.bar-compare-MULTIFLUID:hover,\n.bar-MULTIFLUID:hover,\n.bar-WATER:hover,\n.bar-GAS:hover,\n.bar-ELECTRICITY:hover {\n cursor: pointer;\n}\n.bar-compare-ELECTRICITY:hover.disabled,\n.bar-compare-GAS:hover.disabled,\n.bar-compare-WATER:hover.disabled,\n.bar-compare-MULTIFLUID:hover.disabled,\n.bar-MULTIFLUID:hover.disabled,\n.bar-WATER:hover.disabled,\n.bar-GAS:hover.disabled,\n.bar-ELECTRICITY:hover.disabled {\n cursor: default;\n}\n\n.bar-ELECTRICITY {\n fill: #5d3d2a;\n}\n.bar-ELECTRICITY.selected {\n fill: #d87b39;\n filter: drop-shadow(0 -0.1rem 0.2rem #d87b39);\n}\n\n.bar-compare-ELECTRICITY {\n fill: #795c47;\n}\n.bar-compare-ELECTRICITY.selected {\n fill: #e2bca1;\n filter: drop-shadow(0 -0.1rem 0.2rem #e2bca1);\n}\n\n.bar-WATER {\n fill: #20415e;\n}\n.bar-WATER.selected {\n fill: #3a98ec;\n filter: drop-shadow(0 -0.1rem 0.2rem #3a98ec);\n}\n\n.bar-compare-WATER {\n fill: #4d5c6e;\n}\n.bar-compare-WATER.selected {\n fill: #abd4fa;\n filter: drop-shadow(0 -0.1rem 0.2rem #abd4fa);\n}\n\n.bar-GAS {\n fill: #184940;\n}\n.bar-GAS.selected {\n fill: #45d1b8;\n filter: drop-shadow(0 -0.1rem 0.2rem #45d1b8);\n}\n\n.bar-compare-GAS {\n fill: #597773;\n}\n.bar-compare-GAS.selected {\n fill: #a8f7e9;\n filter: drop-shadow(0 -0.1rem 0.2rem #a8f7e9);\n}\n\n.bar-MULTIFLUID {\n fill: #705d1d;\n}\n.bar-MULTIFLUID.selected {\n fill: #e3b82a;\n filter: drop-shadow(0 -0.1rem 0.2rem #e3b82a);\n}\n.bar-MULTIFLUID.disabled:hover {\n cursor: default;\n}\n\n.bar-duel {\n fill: #61f0f2;\n}\n.bar-duel.selected {\n fill: #61f0f2;\n filter: drop-shadow(0 -0.1rem 0.2rem #61f0f2);\n}\n.bar-duel.disabled:hover {\n cursor: default;\n}\n\n.bar-UNCOMING {\n fill: #7b7b7b;\n opacity: 0.6;\n}\n.bar-UNCOMING.selected {\n fill: #7b7b7b;\n}\n.bar-UNCOMING.disabled:hover {\n cursor: default;\n}\n\n.bar-compare-MULTIFLUID {\n fill: #7d6a4e;\n}\n.bar-compare-MULTIFLUID.selected {\n fill: #ffd597;\n filter: drop-shadow(0 -0.1rem 0.2rem #e3b82a);\n}\n\n.bar-average {\n stroke-width: 2;\n stroke: #e3b82a;\n}\n\n.week {\n fill: #e2bca1;\n}\n.week.selected {\n fill: #e2bca1;\n filter: drop-shadow(0 -0.1rem 0.2rem #e2bca1);\n}\n\n.weekend {\n fill: #ffd597;\n}\n.weekend.selected {\n fill: #ffd597;\n filter: drop-shadow(0 -0.1rem 0.2rem #e3b82a);\n}\n\n/** Animation **/\n.bounce-1 {\n animation-name: bounce-1;\n animation-timing-function: cubic-bezier(1, 1, 0.42, 1);\n animation-iteration-count: 1;\n transform-origin: bottom center;\n transform-box: fill-box;\n}\n\n@keyframes bounce-1 {\n 0% {\n transform: scale(0.1, 0.1);\n }\n 28% {\n transform: scale(0.1, 1.1);\n }\n 45% {\n transform: scale(0.8, 0.95);\n }\n 55% {\n transform: scale(1, 1);\n }\n 65% {\n transform: scale(1, 0.98);\n }\n 75% {\n transform: scale(1, 1);\n }\n}\n.bounce-2 {\n animation-name: bounce-2;\n animation-timing-function: cubic-bezier(1, 1, 0.42, 1);\n animation-iteration-count: 1;\n transform-origin: bottom center;\n transform-box: fill-box;\n}\n\n@keyframes bounce-2 {\n 0% {\n transform: scale(1, 1);\n }\n 28% {\n transform: scale(1, 1.1);\n }\n 45% {\n transform: scale(0.8, 0.95);\n }\n 55% {\n transform: scale(1, 1);\n }\n 65% {\n transform: scale(1, 0.98);\n }\n 75% {\n transform: scale(1, 1);\n }\n}\n.bounce-3 {\n animation-name: bounce-3;\n animation-timing-function: cubic-bezier(1, 1, 0.42, 1);\n animation-iteration-count: 1;\n transform-origin: bottom center;\n}\n\n@keyframes bounce-3 {\n 0% {\n opacity: 0.6;\n transform: scaleY(1);\n }\n 50% {\n transform: scaleY(1.1);\n opacity: 0.8;\n }\n 100% {\n transform: scaleY(1);\n opacity: 1;\n }\n}\n/** Animation delay **/\n.delay {\n animation-duration: 0.4s;\n}\n\n.delay--0 {\n animation-duration: 0.4s;\n}\n\n.delay--1 {\n animation-duration: 0.48s;\n}\n\n.delay--2 {\n animation-duration: 0.56s;\n}\n\n.delay--3 {\n animation-duration: 0.64s;\n}\n\n.delay--4 {\n animation-duration: 0.72s;\n}\n\n.delay--5 {\n animation-duration: 0.8s;\n}\n\n.delay--6 {\n animation-duration: 0.88s;\n}\n\n.delay--7 {\n animation-duration: 0.96s;\n}\n\n.delay--8 {\n animation-duration: 1.04s;\n}\n\n.delay--9 {\n animation-duration: 1.12s;\n}\n\n.delay--10 {\n animation-duration: 1.2s;\n}\n\n.delay--11 {\n animation-duration: 1.28s;\n}\n\n.delay--12 {\n animation-duration: 1.36s;\n}\n\n.delay--13 {\n animation-duration: 1.44s;\n}\n\n.delay--14 {\n animation-duration: 1.52s;\n}\n\n.delay--15 {\n animation-duration: 1.6s;\n}\n\n.delay--16 {\n animation-duration: 1.68s;\n}\n\n.delay--17 {\n animation-duration: 1.76s;\n}\n\n.delay--18 {\n animation-duration: 1.84s;\n}\n\n.delay--19 {\n animation-duration: 1.92s;\n}\n\n.delay--20 {\n animation-duration: 2s;\n}\n\n.delay--21 {\n animation-duration: 2.08s;\n}\n\n.delay--22 {\n animation-duration: 2.16s;\n}\n\n.delay--23 {\n animation-duration: 2.24s;\n}\n\n.delay--24 {\n animation-duration: 2.32s;\n}\n\n.delay--25 {\n animation-duration: 2.4s;\n}\n\n.delay--26 {\n animation-duration: 2.48s;\n}\n\n.delay--27 {\n animation-duration: 2.56s;\n}\n\n.delay--28 {\n animation-duration: 2.64s;\n}\n\n.delay--29 {\n animation-duration: 2.72s;\n}\n\n.delay--30 {\n animation-duration: 2.8s;\n}\n\n.delay--31 {\n animation-duration: 2.88s;\n}\n\n.delay--32 {\n animation-duration: 2.96s;\n}\n\n.delay--33 {\n animation-duration: 3.04s;\n}\n\n.delay--34 {\n animation-duration: 3.12s;\n}\n\n.delay--35 {\n animation-duration: 3.2s;\n}\n\n.delay--36 {\n animation-duration: 3.28s;\n}\n\n.delay--37 {\n animation-duration: 3.36s;\n}\n\n.delay--38 {\n animation-duration: 3.44s;\n}\n\n.delay--39 {\n animation-duration: 3.52s;\n}\n\n.delay--40 {\n animation-duration: 3.6s;\n}\n\n.delay--41 {\n animation-duration: 3.68s;\n}\n\n.delay--42 {\n animation-duration: 3.76s;\n}\n\n.delay--43 {\n animation-duration: 3.84s;\n}\n\n.delay--44 {\n animation-duration: 3.92s;\n}\n\n.delay--45 {\n animation-duration: 4s;\n}\n\n.delay--46 {\n animation-duration: 4.08s;\n}\n\n.delay--47 {\n animation-duration: 4.16s;\n}\n\n.delay--48 {\n animation-duration: 4.24s;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\nbutton span {\n font-size: 1rem;\n font-weight: 700;\n}\nbutton.btnPrimary {\n background: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(226, 137, 4, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #f1c017;\n border: 1px solid;\n border-color: transparent;\n border-radius: 2px;\n width: 100%;\n text-transform: initial;\n transition: all 150ms ease-in-out;\n}\nbutton.btnPrimary span:first-child {\n color: #121212;\n}\nbutton.btnPrimary:hover, button.btnPrimary:focus, button.btnPrimary.active, button.btnPrimary:disabled {\n background-color: #b89318;\n}\nbutton.btnPrimary:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\nbutton.btnSecondary {\n background: transparent;\n border: 1px solid;\n border-color: #e0e0e0;\n border-radius: 2px;\n width: 100%;\n text-transform: initial;\n transition: all 150ms ease-in-out;\n}\nbutton.btnSecondary span:first-child {\n color: #e0e0e0;\n}\nbutton.btnSecondary:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\nbutton.btnText {\n text-decoration: underline;\n}\nbutton.btnText span {\n text-transform: none;\n font-weight: 400;\n}\nbutton.btnPrimaryNegative {\n background: linear-gradient(180deg, #61f0f2 0%, #48c2c4 100%);\n border: 1px solid;\n border-color: transparent;\n border-radius: 2px;\n width: 100%;\n text-transform: initial;\n transition: all 150ms ease-in-out;\n}\nbutton.btnPrimaryNegative span:first-child {\n color: #121212;\n}\nbutton.btnPrimaryNegative:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\nbutton.btnPrimaryNegative:hover {\n opacity: 0.7;\n}\nbutton.btnIncrement {\n background: linear-gradient(180deg, #323339 0%, #25262b 100%);\n border: 1px solid;\n border-color: transparent;\n border-radius: 2px;\n width: 100%;\n text-transform: initial;\n transition: all 150ms ease-in-out;\n min-width: 40px;\n width: 40px;\n height: 40px;\n border-radius: 4px;\n box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.55);\n}\nbutton.btnIncrement span:first-child {\n color: #ffffff;\n}\nbutton.btnIncrement:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\ninput.inputText,\ninput.inputNumber {\n box-sizing: border-box;\n border: 1px solid #7b7b7b;\n background: transparent;\n transition: all 300ms ease;\n color: #e0e0e0;\n}\ninput.inputText:focus, input.inputText:focus-visible,\ninput.inputNumber:focus,\ninput.inputNumber:focus-visible {\n border-color: #e3b82a;\n outline: none;\n}\n\ninput.inputText {\n appearance: none;\n border-radius: 4px;\n height: 45px;\n width: 100%;\n max-width: 280px;\n padding: 0 0.5rem;\n}\n\ninput.inputNumber {\n border-radius: 2px;\n height: 40px;\n width: 60px;\n max-width: 5rem;\n text-align: center;\n}\n\ninput.inputCheckbox {\n width: 24px;\n min-width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n border-radius: 4px;\n cursor: pointer;\n appearance: none;\n background: #121212;\n position: relative;\n border: solid 1px #7b7b7b;\n}\ninput.inputCheckbox:checked {\n background: #e3b82a;\n border-color: #e3b82a;\n}\ninput.inputCheckbox:checked:before, input.inputCheckbox:checked:after {\n content: \"\";\n position: absolute;\n display: inline-block;\n background: #121212;\n border-radius: 0.5rem;\n}\ninput.inputCheckbox:checked:before {\n width: 3px;\n height: 12px;\n left: 10px;\n top: 4px;\n transform: rotate(41deg);\n}\ninput.inputCheckbox:checked:after {\n width: 3px;\n height: 6px;\n left: 5px;\n top: 8px;\n transform: rotate(133deg);\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n.card {\n background: linear-gradient(180deg, #323339 0%, #25262b 100%);\n box-sizing: border-box;\n box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.75);\n border-radius: 4px;\n padding: 16px;\n}\n.card:hover {\n background: linear-gradient(180deg, rgba(70, 71, 77, 0.7) 0%, rgba(57, 58, 63, 0.7) 100%);\n}\n.card.rich-card {\n padding: 16px;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\ndiv.modal-root .MuiBackdrop-root {\n background-color: hsla(231deg, 11%, 12%, 0.85);\n}\n\ndiv.modal-paper {\n background: linear-gradient(180deg, #323339 0%, #25262b 100%);\n width: 36rem;\n max-width: 100%;\n max-height: 90vh;\n padding: 2rem;\n box-sizing: border-box;\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55);\n border-radius: 4px;\n margin: 0 0 0 13.75rem;\n align-items: center;\n color: #ffffff;\n}\n@media only screen and (max-width : 1023px) {\n div.modal-paper {\n width: 35rem;\n margin: 0;\n }\n}\n@media only screen and (max-width : 768px) {\n div.modal-paper {\n padding: 1rem 1rem 1.5rem;\n width: 85%;\n max-width: 35rem;\n margin: 0;\n }\n}\ndiv.modal-paper.no-padding {\n padding: 0;\n}\ndiv.modal-paper.blue-border {\n border: 1px solid rgba(88, 255, 255, 0.2509803922);\n}\ndiv.modal-paper.blue-light-border {\n border: 1px solid #61f0f2;\n}\ndiv.modal-paper.yellow-border {\n border: 1px solid rgba(227, 184, 42, 0.4);\n}\ndiv.modal-paper .modal-paper-close-button {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n padding: 5px 5px;\n z-index: 10;\n}\n\ndiv.modal-paper-full-screen {\n background: linear-gradient(180deg, #323339 0%, #25262b 100%);\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.55);\n border-radius: 4px;\n color: #ffffff;\n display: flex;\n align-items: center;\n}\ndiv.modal-paper-full-screen.dark-background {\n background: #121212;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\ndiv.expansion-panel-root {\n margin: 1.2rem 0;\n color: #e0e0e0;\n background: linear-gradient(180deg, #323339 0%, #25262b 100%);\n border-radius: 4px;\n box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.75);\n transition: background-color 0.6s ease;\n box-sizing: border-box;\n}\ndiv.expansion-panel-root.Mui-expanded:first-child {\n margin: 1.2rem 0;\n}\ndiv.expansion-panel-root.Mui-expanded:last-child {\n margin: 1.2rem 0;\n}\ndiv.expansion-panel-root.red-border {\n border: 1px solid #d25959;\n}\n\ndiv.expansion-panel-summary {\n padding: 0.25rem 1.2rem;\n min-height: 4rem;\n}\ndiv.expansion-panel-summary.Mui-focused {\n border-radius: 4px;\n background-color: unset;\n box-shadow: 0 0 0 1px #e0e0e0;\n}\ndiv.expansion-panel-summary.Mui-expanded {\n min-height: 4rem;\n}\ndiv.expansion-panel-summary.Mui-expanded.small {\n min-height: 3rem;\n}\ndiv.expansion-panel-summary.small {\n padding: 0 1.2rem;\n min-height: 3rem;\n}\ndiv.expansion-panel-summary.bold-text {\n font-weight: bold;\n}\n\ndiv.expansion-panel-content {\n display: flex;\n align-items: center;\n}\ndiv.expansion-panel-content.Mui-expanded {\n margin: 0.75rem 0;\n}\n\ndiv.expansion-panel-details {\n padding: 0 1.2rem 1.2rem;\n}\n\n/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\na {\n color: #deaf0e;\n}\na:visited {\n color: #deaf0e;\n}\n\na:focus {\n outline: none;\n box-shadow: inset 0 0 0 1px #e0e0e0;\n}\na:focus > div:first-child {\n box-shadow: 0 0 0 1px #e0e0e0;\n}\n\na.MuiLink-underlineHover:hover {\n text-decoration: none;\n}\n\na.MuiTypography-colorPrimary {\n color: #e0e0e0;\n}\n\n:root {\n white-space: pre-line;\n --blue: #58ffff;\n --blue40: rgba(88, 255, 255, 0.2509803922);\n --blueBackground: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(1, 153, 163, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #58ffff;\n --blueRadialGradient: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(1, 153, 163, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #58ffff;\n --blueRadialGradientTrans: radial-gradient(circle, #58ffff 0%, rgba(255, 255, 255, 0) 100%);\n --elecColor: #d87b39;\n --elecColor40: rgba(216, 123, 57, 0.4);\n --elecCompareColor: #e2bca1;\n --gasColor: #45d1b8;\n --gasColor40: rgba(69, 209, 184, 0.4);\n --gasCompareColor: #a8f7e9;\n --waterColor: #3a98ec;\n --waterColor40: rgba(58, 152, 236, 0.4);\n --waterCompareColor: #abd4fa;\n --multiColor: #e3b82a;\n --multiCompareColor: #ffd597;\n --redPrimary: #d25959;\n --greyBright: #e0e0e0;\n --greyDark: #7b7b7b;\n --textWhite: #ffffff;\n --softGrey: #a0a0a0;\n --darkLight: #25262b;\n --darkLight2: #121212;\n --textFont: Lato, sans-serif;\n --greyLinearGradientBackground: linear-gradient(180deg, #323339 0%, #25262b 100%);\n --multiColorRadialGradientTrans: radial-gradient(circle, #e3b82a 0%, rgba(255, 255, 255, 0) 100%);\n --elecColorRadialGradientTrans: radial-gradient(circle, #d87b39 0%, rgba(255, 255, 255, 0) 100%);\n --waterColorRadialGradientTrans: radial-gradient(circle, #3a98ec 0%, rgba(255, 255, 255, 0) 100%);\n --gasColorRadialGradientTrans: radial-gradient(circle, #e3b82a 0%, rgba(255, 255, 255, 0) 100%);\n --multiColorRadialGradient: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(226, 137, 4, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #f1c017;\n --elecColorRadialGradient: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(158, 67, 2, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #d87b39;\n --gasColorRadialGradient: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(4, 106, 88, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #45d1b8;\n --waterColorRadialGradient: radial-gradient(105.25% 64.58% at 49.68% 70.83%, rgba(2, 93, 174, 0.5) 0%, rgba(255, 255, 255, 0) 100%), #3a98ec;\n}\n\n.application {\n overflow-x: hidden;\n background-color: #121212;\n}\n\n.accordion-icon {\n color: #ffffff;\n}\n\n.loaderContainer {\n height: 80vh;\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n}\n\n.makeStyles-fab-1 {\n top: 12px;\n left: 3rem !important;\n width: 36px !important;\n height: 36px !important;\n background-color: #323339 !important;\n}", ""]); + + + +/***/ }), + +/***/ "4YQP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.9 String.prototype.italics() +__webpack_require__("A7oe")('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + + +/***/ }), + +/***/ "4as5": +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; + + +/***/ }), + +/***/ "4dPT": +/***/ (function(module, exports) { + +function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _setPrototypeOf(o, p); +} + +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "4eKc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; + + +/***/ }), + +/***/ "4fbw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var useRealtime = function useRealtime(client, specs, deps) { + (0, _react.useEffect)(function () { + var subscribeRealtime = function subscribeRealtime() { + Object.entries(specs).forEach(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + doctype = _ref2[0], + events = _ref2[1]; + + Object.entries(events).forEach( /*#__PURE__*/function () { + var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) { + var _ref5, event, callback; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref5 = (0, _slicedToArray2.default)(_ref3, 2), event = _ref5[0], callback = _ref5[1]; + _context.prev = 1; + _context.next = 4; + return client.plugins.realtime.subscribe(event, doctype, callback); + + case 4: + _context.next = 10; + break; + + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](1); + console.error(_context.t0); + console.error("[useRealtime] Impossible to subscribe to ".concat(event, " event on ").concat(doctype, ". Does your app have the required permissions on this doctype?")); + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 6]]); + })); + + return function (_x) { + return _ref4.apply(this, arguments); + }; + }()); + }); + }; + + var unsubscribeRealtime = function unsubscribeRealtime() { + Object.entries(specs).forEach(function (_ref6) { + var _ref7 = (0, _slicedToArray2.default)(_ref6, 2), + doctype = _ref7[0], + events = _ref7[1]; + + Object.entries(events).forEach( /*#__PURE__*/function () { + var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref8) { + var _ref10, event, callback; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _ref10 = (0, _slicedToArray2.default)(_ref8, 2), event = _ref10[0], callback = _ref10[1]; + _context2.prev = 1; + _context2.next = 4; + return client.plugins.realtime.unsubscribe(event, doctype, callback); + + case 4: + _context2.next = 10; + break; + + case 6: + _context2.prev = 6; + _context2.t0 = _context2["catch"](1); + console.error(_context2.t0); + console.error("[useRealtime] Impossible to unsubscribe from ".concat(event, " event on ").concat(doctype, ". Does your app have the required permissions on this doctype?")); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[1, 6]]); + })); + + return function (_x2) { + return _ref9.apply(this, arguments); + }; + }()); + }); + }; + + if (!client.plugins || !client.plugins.realtime) { + console.error('[useRealtime] The provided CozyClient instance does not have a RealtimePlugin registered, useRealtime will not work'); + return; + } + + subscribeRealtime(); + return unsubscribeRealtime; + }, deps); // eslint-disable-line react-hooks/exhaustive-deps +}; + +var _default = useRealtime; +exports.default = _default; + +/***/ }), + +/***/ "4fos": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _globalhandlers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("kNwn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function() { return _globalhandlers_js__WEBPACK_IMPORTED_MODULE_0__["GlobalHandlers"]; }); + +/* harmony import */ var _trycatch_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("r1R0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TryCatch", function() { return _trycatch_js__WEBPACK_IMPORTED_MODULE_1__["TryCatch"]; }); + +/* harmony import */ var _breadcrumbs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Strw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return _breadcrumbs_js__WEBPACK_IMPORTED_MODULE_2__["Breadcrumbs"]; }); + +/* harmony import */ var _linkederrors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("MGrj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LinkedErrors", function() { return _linkederrors_js__WEBPACK_IMPORTED_MODULE_3__["LinkedErrors"]; }); + +/* harmony import */ var _httpcontext_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("QiYU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HttpContext", function() { return _httpcontext_js__WEBPACK_IMPORTED_MODULE_4__["HttpContext"]; }); + +/* harmony import */ var _dedupe_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Itbq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dedupe", function() { return _dedupe_js__WEBPACK_IMPORTED_MODULE_5__["Dedupe"]; }); + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "4gX9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createMigrate; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ph6I"); + + +function createMigrate(migrations, config) { + var _ref = config || {}, + debug = _ref.debug; + + return function (state, currentVersion) { + if (!state) { + if (false) {} + return Promise.resolve(undefined); + } + + var inboundVersion = state._persist && state._persist.version !== undefined ? state._persist.version : _constants__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_VERSION"]; + if (inboundVersion === currentVersion) { + if (false) {} + return Promise.resolve(state); + } + if (inboundVersion > currentVersion) { + if (false) {} + return Promise.resolve(state); + } + + var migrationKeys = Object.keys(migrations).map(function (ver) { + return parseInt(ver); + }).filter(function (key) { + return currentVersion >= key && key > inboundVersion; + }).sort(function (a, b) { + return a - b; + }); + + if (false) {} + try { + var migratedState = migrationKeys.reduce(function (state, versionKey) { + if (false) {} + return migrations[versionKey](state); + }, state); + return Promise.resolve(migratedState); + } catch (err) { + return Promise.reject(err); + } + }; +} + +/***/ }), + +/***/ "4oQl": +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__("GwHQ").f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || __webpack_require__("WXXH") && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + + +/***/ }), + +/***/ "4pse": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return Bar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapStateToProps", function() { return mapStateToProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapDispatchToProps", function() { return mapDispatchToProps; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("LGLP"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("IGOm"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("AHiN"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("Kv7L"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var _Apps_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("9DWD"); +/* harmony import */ var _Banner__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("BAxE"); +/* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("PPEI"); +/* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("rHzI"); +/* harmony import */ var _Apps__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("74/M"); +/* harmony import */ var _Claudy__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("iAsL"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("gc+w"); + + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + + + + +/* Generated with node_modules/.bin/svgr src/assets/sprites/icon-apps.svg */ + +function SvgIconApps(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8___default()({ + width: 16, + height: 16 + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("path", { + d: "M0 0h4v4H0V0zm0 6h4v4H0V6zm0 6h4v4H0v-4zM6 0h4v4H6V0zm0 6h4v4H6V6zm0 6h4v4H6v-4zm6-12h4v4h-4V0zm0 6h4v4h-4V6zm0 6h4v4h-4v-4z", + fillRule: "evenodd" + })); +} + +var Bar = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Bar, _Component); + + var _super = _createSuper(Bar); + + function Bar(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Bar); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "toggleDrawer", function () { + // don't allow to toggle the drawer if claudy opened or is opening + if (_this.state.claudyOpened || _this.state.claudyFired) return; + var drawerVisible = !_this.state.drawerVisible; // don't wait for transitionend if displaying + + if (drawerVisible) _this.props.onDrawer(drawerVisible); + + _this.setState({ + drawerVisible: drawerVisible + }); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "toggleClaudy", function () { + var isFromDrawer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + if (!_this.props.claudyEnabled) return; + var claudyOpened = _this.state.claudyOpened; + + if (isFromDrawer && !claudyOpened) { + // if opened from drawer + // reset to toggle via the Claudy component + return _this.setState({ + claudyFired: true + }); + } + + if (_this.state.claudyFired) _this.setState({ + claudyFired: false + }); + + _this.setState({ + claudyOpened: !claudyOpened + }); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "renderLeft", function () { + var _this$props = _this.props, + t = _this$props.t, + isPublic = _this$props.isPublic, + webviewContext = _this$props.webviewContext, + isInvertedTheme = _this$props.isInvertedTheme; + + if (Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__["isFlagshipApp"])() || cozy_flags__WEBPACK_IMPORTED_MODULE_15___default()('flagship.debug')) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_16__["ButtonCozyHome"], { + webviewContext: webviewContext, + isInvertedTheme: isInvertedTheme + }); + } // data-tutorial attribute allows to be targeted in an application tutorial + + + return !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("button", { + type: "button", + className: "coz-bar-btn coz-bar-burger", + onClick: _this.toggleDrawer, + "data-tutorial": "apps-mobile" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13___default.a, { + icon: SvgIconApps, + width: 16, + height: 16, + color: "currentColor" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("span", { + className: "coz-bar-hidden" + }, t('drawer'))) : null; + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "renderRight", function () { + var isPublic = _this.props.isPublic; + return !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Settings__WEBPACK_IMPORTED_MODULE_19__["default"], { + onLogOut: _this.props.onLogOut + }) : null; + }); + + _this.state = { + claudyFired: false, + // true to fire claudy (used by the drawer) + claudyOpened: false, + drawerVisible: false + }; + _this.fetchApps = _this.fetchApps.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + _this.fetchInitialData = _this.fetchInitialData.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + _this.handleTokenRefreshed = _this.handleTokenRefreshed.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Bar, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.fetchInitialData(); + var cozyClient = this.props.cozyClient; + cozyClient.on('tokenRefreshed', this.handleTokenRefreshed); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + var cozyClient = this.props.cozyClient; + cozyClient.removeListener('tokenRefreshed', this.handleTokenRefreshed); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps, prevState) { + if (!this.props.hasFetchedApps && this.state.drawerVisible && prevState.drawerVisible !== this.state.drawerVisible) { + this.fetchApps(); + } + } + }, { + key: "handleTokenRefreshed", + value: function handleTokenRefreshed() { + this.fetchInitialData(); + } + }, { + key: "fetchApps", + value: function fetchApps() { + this.props.fetchApps(); + } + }, { + key: "fetchInitialData", + value: function fetchInitialData() { + if (this.props.isPublic) { + return; + } + + this.props.fetchContext(); + this.props.fetchSettingsData(false); + this.fetchApps(); + } + }, { + key: "renderCenter", + value: function renderCenter() { + var _this$props2 = this.props, + appName = _this$props2.appName, + appNamePrefix = _this$props2.appNamePrefix, + appSlug = _this$props2.appSlug, + iconPath = _this$props2.iconPath, + isPublic = _this$props2.isPublic, + isInvertedTheme = _this$props2.isInvertedTheme; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps__WEBPACK_IMPORTED_MODULE_20__["default"], { + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + iconPath: iconPath, + isPublic: isPublic, + isInvertedTheme: isInvertedTheme + }); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$state = this.state, + claudyFired = _this$state.claudyFired, + claudyOpened = _this$state.claudyOpened, + drawerVisible = _this$state.drawerVisible; + var _this$props3 = this.props, + theme = _this$props3.theme, + themeOverrides = _this$props3.themeOverrides, + barLeft = _this$props3.barLeft, + barRight = _this$props3.barRight, + barCenter = _this$props3.barCenter, + barSearch = _this$props3.barSearch, + claudyEnabled = _this$props3.claudyEnabled, + onDrawer = _this$props3.onDrawer, + isPublic = _this$props3.isPublic, + onLogOut = _this$props3.onLogOut, + userActionRequired = _this$props3.userActionRequired, + isInvertedTheme = _this$props3.isInvertedTheme; + var pColor = themeOverrides.primaryColor, + pctColor = themeOverrides.primaryContrastTextColor; + var pStyle = pColor ? { + '--cozBarThemePrimaryColor': pColor + } : {}; + var pctStyle = pctColor ? { + '--cozBarThemePrimaryContrastTextColor': pctColor + } : {}; + + var themeStyle = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, pStyle, pctStyle); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-bar-wrapper coz-theme-".concat(theme), + style: themeStyle + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + id: "cozy-bar-modal-dom-place" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-bar-container" + }, barLeft || this.renderLeft(), barCenter || this.renderCenter(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "u-flex-grow" + }, barSearch), barRight || this.renderRight(), !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Drawer__WEBPACK_IMPORTED_MODULE_18__["default"], { + visible: drawerVisible, + onClose: this.toggleDrawer, + onClaudy: claudyEnabled && function () { + return _this2.toggleClaudy(true); + } || false, + isClaudyLoading: claudyFired, + drawerListener: function drawerListener() { + return onDrawer(drawerVisible); + }, + onLogOut: onLogOut, + isInvertedTheme: isInvertedTheme + }) : null, claudyEnabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Claudy__WEBPACK_IMPORTED_MODULE_21__["default"], { + claudyFired: claudyFired, + onToggle: function onToggle() { + return _this2.toggleClaudy(false); + }, + opened: claudyOpened + })), userActionRequired && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Banner__WEBPACK_IMPORTED_MODULE_17__["default"], userActionRequired)); + } + }]); + + return Bar; +}(react__WEBPACK_IMPORTED_MODULE_9__["Component"]); +Bar.propTypes = { + appName: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.func, + onDrawer: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.func, + userActionRequired: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.object, + cozyClient: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.object.isRequired, + isDrive: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool.isRequired +}; +var mapStateToProps = function mapStateToProps(state) { + return { + theme: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getTheme"])(state).name, + themeOverrides: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getTheme"])(state).overrides, + barLeft: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'left'), + barRight: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'right'), + barCenter: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'center'), + barSearch: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'search'), + isDrive: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["isCurrentApp"])(state, { + slug: 'drive' + }), + claudyEnabled: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["shouldEnableClaudy"])(state), + hasFetchedApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["hasFetched"])(state), + webviewContext: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getWebviewContext"])(state) + }; +}; +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchApps: function fetchApps() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchApps"])()); + }, + fetchContext: function fetchContext() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchContext"])()); + }, + fetchSettingsData: function fetchSettingsData(displayBusy) { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchSettingsData"])(displayBusy)); + } + }; +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__["translate"])()(Object(react_redux__WEBPACK_IMPORTED_MODULE_10__["connect"])(mapStateToProps, mapDispatchToProps)(Bar))); + +/***/ }), + +/***/ "4s8E": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("3qHZ"); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), + +/***/ "4vqY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__("r0Co"); +var getPolyfill = __webpack_require__("Lbe8"); + +module.exports = function shimForEach() { + var polyfill = getPolyfill(); + define( + Array.prototype, + { forEach: polyfill }, + { forEach: function () { return Array.prototype.forEach !== polyfill; } } + ); + return polyfill; +}; + + +/***/ }), + +/***/ "4xNu": +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__("00OQ"); +var toIObject = __webpack_require__("764U"); +var arrayIndexOf = __webpack_require__("IHbp")(false); +var IE_PROTO = __webpack_require__("X27e")('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), + +/***/ "5/Pu": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; + + +/***/ }), + +/***/ "50dN": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = __webpack_require__("LRPZ"); +var getProto = __webpack_require__("EjI+"); +var anObject = __webpack_require__("eckd"); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + + +/***/ }), + +/***/ "52+2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultTheme", function() { return getDefaultTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return getTheme; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); + +var SET_THEME = 'SET_THEME'; +var DEFAULT_THEME = 'default'; +var PRIMARY_THEME = 'primary'; +var THEMES = [DEFAULT_THEME, PRIMARY_THEME]; +var EMPTY_OVERRIDES = {}; // Theme state is { name, overrides } +// where both have the form described in `setTheme` + +var DEFAULT_STATE = { + name: DEFAULT_THEME, + overrides: EMPTY_OVERRIDES +}; +/** + * Change the cozy-bar theme + * + * Today, the value 'primary' will change the background color + * of the bar in the mobile view. It will then use the + * `--primaryColor` CSS variable and the `--primaryContrastTextColor` + * for the text. + * + * @function + * @param {String} name - either 'default' or 'primary' + * @param {Object} overrides - overrides of default values for the theme + * default to an empty object (no overrides) + * It will only overrides the values for the + * 'primary' specific theme/view + * @param {Object} overrides.primaryColor - the background color + * @param {Object} overrides.primaryContrastTextColor - the text color + * @returns {Object} action `{ type: SET_THEME, theme: {name, overrides} } + */ + +var setTheme = function setTheme(name) { + var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_OVERRIDES; + return { + type: SET_THEME, + theme: { + name: name, + overrides: overrides + } + }; +}; +var getDefaultTheme = function getDefaultTheme() { + return DEFAULT_STATE; +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultTheme(); + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (action.type === SET_THEME) { + if (THEMES.includes(action.theme.name)) { + return action.theme; + } + + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, action.theme, { + name: DEFAULT_THEME + }); + } else { + return state; + } +}; // selector + +var getTheme = function getTheme(state) { + return state; +}; + +/***/ }), + +/***/ "525Y": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UserExplorationType = exports.UserExplorationState = exports.UserExplorationID = void 0; +var UserExplorationState; +exports.UserExplorationState = UserExplorationState; +(function (UserExplorationState) { + UserExplorationState[UserExplorationState["UNLOCKED"] = 0] = "UNLOCKED"; + UserExplorationState[UserExplorationState["ONGOING"] = 1] = "ONGOING"; + UserExplorationState[UserExplorationState["NOTIFICATION"] = 2] = "NOTIFICATION"; + UserExplorationState[UserExplorationState["DONE"] = 3] = "DONE"; +})(UserExplorationState || (exports.UserExplorationState = UserExplorationState = {})); +var UserExplorationType; +exports.UserExplorationType = UserExplorationType; +(function (UserExplorationType) { + UserExplorationType[UserExplorationType["DECLARATIVE"] = 0] = "DECLARATIVE"; + UserExplorationType[UserExplorationType["ACTION"] = 1] = "ACTION"; + UserExplorationType[UserExplorationType["CONSUMPTION"] = 2] = "CONSUMPTION"; + UserExplorationType[UserExplorationType["ECOGESTURE"] = 3] = "ECOGESTURE"; +})(UserExplorationType || (exports.UserExplorationType = UserExplorationType = {})); +var UserExplorationID; +exports.UserExplorationID = UserExplorationID; +(function (UserExplorationID) { + UserExplorationID["EXPLORATION001"] = "EXPLORATION001"; + UserExplorationID["EXPLORATION002"] = "EXPLORATION002"; + UserExplorationID["EXPLORATION003"] = "EXPLORATION003"; + UserExplorationID["EXPLORATION004"] = "EXPLORATION004"; + UserExplorationID["EXPLORATION004_0"] = "EXPLORATION004_0"; + UserExplorationID["EXPLORATION005"] = "EXPLORATION005"; + UserExplorationID["EXPLORATION006"] = "EXPLORATION006"; + UserExplorationID["EXPLORATION007"] = "EXPLORATION007"; + UserExplorationID["EXPLORATION008"] = "EXPLORATION008"; +})(UserExplorationID || (exports.UserExplorationID = UserExplorationID = {})); + +/***/ }), + +/***/ "57ZE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createClientReportEnvelope", function() { return createClientReportEnvelope; }); +/* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("EYYg"); +/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("VkL2"); + + + +/** + * Creates client report envelope + * @param discarded_events An array of discard events + * @param dsn A DSN that can be set on the header. Optional. + */ +function createClientReportEnvelope( + discarded_events, + dsn, + timestamp, +) { + const clientReportItem = [ + { type: 'client_report' }, + { + timestamp: timestamp || Object(_time_js__WEBPACK_IMPORTED_MODULE_1__["dateTimestampInSeconds"])(), + discarded_events, + }, + ]; + return Object(_envelope_js__WEBPACK_IMPORTED_MODULE_0__["createEnvelope"])(dsn ? { dsn } : {}, [clientReportItem]); +} + + +//# sourceMappingURL=clientreport.js.map + + +/***/ }), + +/***/ "59q6": +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__("Ce+n"), + unzipWith = __webpack_require__("0KJs"); + +/** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ +var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); +}); + +module.exports = zipWith; + + +/***/ }), + +/***/ "5GZQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var levels = { + secret: 0, + debug: 10, + info: 20, + warn: 30, + error: 40, + ok: 50, + critical: 50 +}; + +var Secret = __webpack_require__("TXAW"); + +var filterSecrets = function filterSecrets(level, type, message) { + if (type !== 'secret' && message instanceof Secret) { + throw new Error('You should log a secret with log.secret'); + } +}; + +var filterLevel = function filterLevel(level, type) { + return levels[type] >= levels[level]; +}; + +module.exports = { + filterSecrets: filterSecrets, + filterLevel: filterLevel +}; + +/***/ }), + +/***/ "5Mkc": +/***/ (function(module, exports, __webpack_require__) { + +var constant = __webpack_require__("pYrY"), + defineProperty = __webpack_require__("brbn"), + identity = __webpack_require__("Q7kj"); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; + + +/***/ }), + +/***/ "5QCN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["FunctionToString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hub", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Hub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["InboundFilters"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Scope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["addBreadcrumb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureEvent", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureException", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureMessage", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["captureMessage"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "configureScope", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["configureScope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransport", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["createTransport"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCurrentHub", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["getHubFromCarrier"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeMain", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["makeMain"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtra", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setExtra"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtras", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setExtras"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTag", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setTag"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTags", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setTags"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["setUser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startTransaction", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["startTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withScope", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["withScope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WINDOW", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserClient", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["BrowserClient"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeFetchTransport", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["makeFetchTransport"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeXHRTransport", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["makeXHRTransport"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chromeStackLineParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["chromeStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackLineParsers", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["defaultStackLineParsers"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["defaultStackParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geckoStackLineParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["geckoStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera10StackLineParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["opera10StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera11StackLineParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["opera11StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "winjsStackLineParser", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["winjsStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "close", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["close"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["defaultIntegrations"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["flush"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLoad", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["forceLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastEventId", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["lastEventId"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["onLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showReportDialog", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["showReportDialog"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["wrap"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["GlobalHandlers"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TryCatch", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["TryCatch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Breadcrumbs"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LinkedErrors", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["LinkedErrors"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HttpContext", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["HttpContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dedupe", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Dedupe"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Integrations", function() { return _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["Integrations"]; }); + +/* harmony import */ var _sdk_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f2KQ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "init", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_1__["init"]; }); + +/* harmony import */ var _profiler_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("JTVy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Profiler", function() { return _profiler_js__WEBPACK_IMPORTED_MODULE_2__["Profiler"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useProfiler", function() { return _profiler_js__WEBPACK_IMPORTED_MODULE_2__["useProfiler"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withProfiler", function() { return _profiler_js__WEBPACK_IMPORTED_MODULE_2__["withProfiler"]; }); + +/* harmony import */ var _errorboundary_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("+71A"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorBoundary", function() { return _errorboundary_js__WEBPACK_IMPORTED_MODULE_3__["ErrorBoundary"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withErrorBoundary", function() { return _errorboundary_js__WEBPACK_IMPORTED_MODULE_3__["withErrorBoundary"]; }); + +/* harmony import */ var _redux_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Vtbw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createReduxEnhancer", function() { return _redux_js__WEBPACK_IMPORTED_MODULE_4__["createReduxEnhancer"]; }); + +/* harmony import */ var _reactrouterv3_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("R0wv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reactRouterV3Instrumentation", function() { return _reactrouterv3_js__WEBPACK_IMPORTED_MODULE_5__["reactRouterV3Instrumentation"]; }); + +/* harmony import */ var _reactrouter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("1Evb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reactRouterV4Instrumentation", function() { return _reactrouter_js__WEBPACK_IMPORTED_MODULE_6__["reactRouterV4Instrumentation"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reactRouterV5Instrumentation", function() { return _reactrouter_js__WEBPACK_IMPORTED_MODULE_6__["reactRouterV5Instrumentation"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withSentryRouting", function() { return _reactrouter_js__WEBPACK_IMPORTED_MODULE_6__["withSentryRouting"]; }); + +/* harmony import */ var _reactrouterv6_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("QJcL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reactRouterV6Instrumentation", function() { return _reactrouterv6_js__WEBPACK_IMPORTED_MODULE_7__["reactRouterV6Instrumentation"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withSentryReactRouterV6Routing", function() { return _reactrouterv6_js__WEBPACK_IMPORTED_MODULE_7__["withSentryReactRouterV6Routing"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapCreateBrowserRouter", function() { return _reactrouterv6_js__WEBPACK_IMPORTED_MODULE_7__["wrapCreateBrowserRouter"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapUseRoutes", function() { return _reactrouterv6_js__WEBPACK_IMPORTED_MODULE_7__["wrapUseRoutes"]; }); + + + + + + + + + + +; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "5RFn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` +/* globals document: false */ +var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {}; + +module.exports = reflectApply + ? function isCallable(value) { + if (value === documentDotAll) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value); + } + : function isCallable(value) { + if (value === documentDotAll) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + + +/***/ }), + +/***/ "5UXE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Tab__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GXf6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Tab__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "5V4Q": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DELAY_RIPPLE", function() { return DELAY_RIPPLE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("jlvQ"); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _Ripple__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("f0gi"); + + + + + + + + + +var DURATION = 550; +var DELAY_RIPPLE = 80; +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + overflow: 'hidden', + pointerEvents: 'none', + position: 'absolute', + zIndex: 0, + top: 0, + right: 0, + bottom: 0, + left: 0, + borderRadius: 'inherit' + }, + + /* Styles applied to the internal `Ripple` components `ripple` class. */ + ripple: { + opacity: 0, + position: 'absolute' + }, + + /* Styles applied to the internal `Ripple` components `rippleVisible` class. */ + rippleVisible: { + opacity: 0.3, + transform: 'scale(1)', + animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) + }, + + /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */ + ripplePulsate: { + animationDuration: "".concat(theme.transitions.duration.shorter, "ms") + }, + + /* Styles applied to the internal `Ripple` components `child` class. */ + child: { + opacity: 1, + display: 'block', + width: '100%', + height: '100%', + borderRadius: '50%', + backgroundColor: 'currentColor' + }, + + /* Styles applied to the internal `Ripple` components `childLeaving` class. */ + childLeaving: { + opacity: 0, + animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut) + }, + + /* Styles applied to the internal `Ripple` components `childPulsate` class. */ + childPulsate: { + position: 'absolute', + left: 0, + top: 0, + animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite") + }, + '@keyframes enter': { + '0%': { + transform: 'scale(0)', + opacity: 0.1 + }, + '100%': { + transform: 'scale(1)', + opacity: 0.3 + } + }, + '@keyframes exit': { + '0%': { + opacity: 1 + }, + '100%': { + opacity: 0 + } + }, + '@keyframes pulsate': { + '0%': { + transform: 'scale(1)' + }, + '50%': { + transform: 'scale(0.92)' + }, + '100%': { + transform: 'scale(1)' + } + } + }; +}; +/** + * @ignore - internal component. + * + * TODO v5: Make private + */ + +var TouchRipple = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function TouchRipple(props, ref) { + var _props$center = props.center, + centerProp = _props$center === void 0 ? false : _props$center, + classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["center", "classes", "className"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"]([]), + ripples = _React$useState[0], + setRipples = _React$useState[1]; + + var nextKey = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](0); + var rippleCallback = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + if (rippleCallback.current) { + rippleCallback.current(); + rippleCallback.current = null; + } + }, [ripples]); // Used to filter out mouse emulated events on mobile. + + var ignoringMouseDown = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](false); // We use a timer in order to only show the ripples for touch "click" like events. + // We don't want to display the ripple for touch scroll events. + + var startTimer = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); // This is the hook called once the previous timeout is ready. + + var startTimerCommit = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var container = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + return function () { + clearTimeout(startTimer.current); + }; + }, []); + var startCommit = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (params) { + var pulsate = params.pulsate, + rippleX = params.rippleX, + rippleY = params.rippleY, + rippleSize = params.rippleSize, + cb = params.cb; + setRipples(function (oldRipples) { + return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(oldRipples), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Ripple__WEBPACK_IMPORTED_MODULE_8__["default"], { + key: nextKey.current, + classes: classes, + timeout: DURATION, + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize + })]); + }); + nextKey.current += 1; + rippleCallback.current = cb; + }, [classes]); + var start = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function () { + var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var cb = arguments.length > 2 ? arguments[2] : undefined; + var _options$pulsate = options.pulsate, + pulsate = _options$pulsate === void 0 ? false : _options$pulsate, + _options$center = options.center, + center = _options$center === void 0 ? centerProp || options.pulsate : _options$center, + _options$fakeElement = options.fakeElement, + fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement; + + if (event.type === 'mousedown' && ignoringMouseDown.current) { + ignoringMouseDown.current = false; + return; + } + + if (event.type === 'touchstart') { + ignoringMouseDown.current = true; + } + + var element = fakeElement ? null : container.current; + var rect = element ? element.getBoundingClientRect() : { + width: 0, + height: 0, + left: 0, + top: 0 + }; // Get the size of the ripple + + var rippleX; + var rippleY; + var rippleSize; + + if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) { + rippleX = Math.round(rect.width / 2); + rippleY = Math.round(rect.height / 2); + } else { + var _ref = event.touches ? event.touches[0] : event, + clientX = _ref.clientX, + clientY = _ref.clientY; + + rippleX = Math.round(clientX - rect.left); + rippleY = Math.round(clientY - rect.top); + } + + if (center) { + rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even. + + if (rippleSize % 2 === 0) { + rippleSize += 1; + } + } else { + var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2; + var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2; + rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2)); + } // Touche devices + + + if (event.touches) { + // check that this isn't another touchstart due to multitouch + // otherwise we will only clear a single timer when unmounting while two + // are running + if (startTimerCommit.current === null) { + // Prepare the ripple effect. + startTimerCommit.current = function () { + startCommit({ + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize, + cb: cb + }); + }; // Delay the execution of the ripple effect. + + + startTimer.current = setTimeout(function () { + if (startTimerCommit.current) { + startTimerCommit.current(); + startTimerCommit.current = null; + } + }, DELAY_RIPPLE); // We have to make a tradeoff with this value. + } + } else { + startCommit({ + pulsate: pulsate, + rippleX: rippleX, + rippleY: rippleY, + rippleSize: rippleSize, + cb: cb + }); + } + }, [centerProp, startCommit]); + var pulsate = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function () { + start({}, { + pulsate: true + }); + }, [start]); + var stop = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (event, cb) { + clearTimeout(startTimer.current); // The touch interaction occurs too quickly. + // We still want to show ripple effect. + + if (event.type === 'touchend' && startTimerCommit.current) { + event.persist(); + startTimerCommit.current(); + startTimerCommit.current = null; + startTimer.current = setTimeout(function () { + stop(event, cb); + }); + return; + } + + startTimerCommit.current = null; + setRipples(function (oldRipples) { + if (oldRipples.length > 0) { + return oldRipples.slice(1); + } + + return oldRipples; + }); + rippleCallback.current = cb; + }, []); + react__WEBPACK_IMPORTED_MODULE_3__["useImperativeHandle"](ref, function () { + return { + pulsate: pulsate, + start: start, + stop: stop + }; + }, [pulsate, start, stop]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.root, className), + ref: container + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](react_transition_group__WEBPACK_IMPORTED_MODULE_5__["TransitionGroup"], { + component: null, + exit: true + }, ripples)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + flip: false, + name: 'MuiTouchRipple' +})( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["memo"](TouchRipple))); + +/***/ }), + +/***/ "5Xqt": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var weak = __webpack_require__("zPcw"); +var validate = __webpack_require__("LEB8"); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +__webpack_require__("BjNV")(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + + +/***/ }), + +/***/ "5Ysx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(process, module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dynamicRequire", function() { return dynamicRequire; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNodeEnv", function() { return isNodeEnv; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadModule", function() { return loadModule; }); +/* harmony import */ var _env_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hk1d"); + + +/** + * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something, + * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere. + */ + +/** + * Checks whether we're in the Node.js or Browser environment + * + * @returns Answer to given question + */ +function isNodeEnv() { + // explicitly check for browser bundles as those can be optimized statically + // by terser/rollup. + return ( + !Object(_env_js__WEBPACK_IMPORTED_MODULE_0__["isBrowserBundle"])() && + Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]' + ); +} + +/** + * Requires a module which is protected against bundler minification. + * + * @param request The module path to resolve + */ +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any +function dynamicRequire(mod, request) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return mod.require(request); +} + +/** + * Helper for dynamically loading module that should work with linked dependencies. + * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))` + * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during + * build time. `require.resolve` is also not available in any other way, so we cannot create, + * a fake helper like we do with `dynamicRequire`. + * + * We always prefer to use local package, thus the value is not returned early from each `try/catch` block. + * That is to mimic the behavior of `require.resolve` exactly. + * + * @param moduleName module name to require + * @returns possibly required module + */ +function loadModule(moduleName) { + let mod; + + try { + mod = dynamicRequire(module, moduleName); + } catch (e) { + // no-empty + } + + try { + const { cwd } = dynamicRequire(module, 'process'); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ; + } catch (e) { + // no-empty + } + + return mod; +} + + +//# sourceMappingURL=node.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("JtWf"), __webpack_require__("BE8o")(module))) + +/***/ }), + +/***/ "5ZEc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("l81d"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ButtonBase__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "5cT/": +/***/ (function(module, exports, __webpack_require__) { + +var MATCH = __webpack_require__("Yhpl")('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + + +/***/ }), + +/***/ "5hN5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addInstrumentationHandler", function() { return addInstrumentationHandler; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); +/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("loS6"); +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pt+A"); +/* harmony import */ var _stacktrace_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7SIe"); +/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("PVZM"); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7bZ2"); + + + + + + + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = Object(_worldwide_js__WEBPACK_IMPORTED_MODULE_5__["getGlobalObject"])(); + +/** + * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc. + * - Console API + * - Fetch API + * - XHR API + * - History API + * - DOM API (click/typing) + * - Error API + * - UnhandledRejection API + */ + +const handlers = {}; +const instrumented = {}; + +/** Instruments given API */ +function instrument(type) { + if (instrumented[type]) { + return; + } + + instrumented[type] = true; + + switch (type) { + case 'console': + instrumentConsole(); + break; + case 'dom': + instrumentDOM(); + break; + case 'xhr': + instrumentXHR(); + break; + case 'fetch': + instrumentFetch(); + break; + case 'history': + instrumentHistory(); + break; + case 'error': + instrumentError(); + break; + case 'unhandledrejection': + instrumentUnhandledRejection(); + break; + default: + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _logger_js__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('unknown instrumentation type:', type); + return; + } +} + +/** + * Add handler that will be called when given type of instrumentation triggers. + * Use at your own risk, this might break without changelog notice, only used internally. + * @hidden + */ +function addInstrumentationHandler(type, callback) { + handlers[type] = handlers[type] || []; + (handlers[type] ).push(callback); + instrument(type); +} + +/** JSDoc */ +function triggerHandlers(type, data) { + if (!type || !handlers[type]) { + return; + } + + for (const handler of handlers[type] || []) { + try { + handler(data); + } catch (e) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _logger_js__WEBPACK_IMPORTED_MODULE_1__["logger"].error( + `Error while triggering instrumentation handler.\nType: ${type}\nName: ${Object(_stacktrace_js__WEBPACK_IMPORTED_MODULE_3__["getFunctionName"])(handler)}\nError:`, + e, + ); + } + } +} + +/** JSDoc */ +function instrumentConsole() { + if (!('console' in WINDOW)) { + return; + } + + _logger_js__WEBPACK_IMPORTED_MODULE_1__["CONSOLE_LEVELS"].forEach(function (level) { + if (!(level in WINDOW.console)) { + return; + } + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(WINDOW.console, level, function (originalConsoleMethod) { + return function (...args) { + triggerHandlers('console', { args, level }); + + // this fails for some browsers. :( + if (originalConsoleMethod) { + originalConsoleMethod.apply(WINDOW.console, args); + } + }; + }); + }); +} + +/** JSDoc */ +function instrumentFetch() { + if (!Object(_supports_js__WEBPACK_IMPORTED_MODULE_4__["supportsNativeFetch"])()) { + return; + } + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(WINDOW, 'fetch', function (originalFetch) { + return function (...args) { + const handlerData = { + args, + fetchData: { + method: getFetchMethod(args), + url: getFetchUrl(args), + }, + startTimestamp: Date.now(), + }; + + triggerHandlers('fetch', { + ...handlerData, + }); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return originalFetch.apply(WINDOW, args).then( + (response) => { + triggerHandlers('fetch', { + ...handlerData, + endTimestamp: Date.now(), + response, + }); + return response; + }, + (error) => { + triggerHandlers('fetch', { + ...handlerData, + endTimestamp: Date.now(), + error, + }); + // NOTE: If you are a Sentry user, and you are seeing this stack frame, + // it means the sentry.javascript SDK caught an error invoking your application code. + // This is expected behavior and NOT indicative of a bug with sentry.javascript. + throw error; + }, + ); + }; + }); +} + +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/** Extract `method` from fetch call arguments */ +function getFetchMethod(fetchArgs = []) { + if ('Request' in WINDOW && Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isInstanceOf"])(fetchArgs[0], Request) && fetchArgs[0].method) { + return String(fetchArgs[0].method).toUpperCase(); + } + if (fetchArgs[1] && fetchArgs[1].method) { + return String(fetchArgs[1].method).toUpperCase(); + } + return 'GET'; +} + +/** Extract `url` from fetch call arguments */ +function getFetchUrl(fetchArgs = []) { + if (typeof fetchArgs[0] === 'string') { + return fetchArgs[0]; + } + if ('Request' in WINDOW && Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isInstanceOf"])(fetchArgs[0], Request)) { + return fetchArgs[0].url; + } + return String(fetchArgs[0]); +} +/* eslint-enable @typescript-eslint/no-unsafe-member-access */ + +/** JSDoc */ +function instrumentXHR() { + if (!('XMLHttpRequest' in WINDOW)) { + return; + } + + const xhrproto = XMLHttpRequest.prototype; + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(xhrproto, 'open', function (originalOpen) { + return function ( ...args) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const xhr = this; + const url = args[1]; + const xhrInfo = (xhr.__sentry_xhr__ = { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + method: Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(args[0]) ? args[0].toUpperCase() : args[0], + url: args[1], + }); + + // if Sentry key appears in URL, don't capture it as a request + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) { + xhr.__sentry_own_request__ = true; + } + + const onreadystatechangeHandler = function () { + if (xhr.readyState === 4) { + try { + // touching statusCode in some platforms throws + // an exception + xhrInfo.status_code = xhr.status; + } catch (e) { + /* do nothing */ + } + + triggerHandlers('xhr', { + args, + endTimestamp: Date.now(), + startTimestamp: Date.now(), + xhr, + }); + } + }; + + if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') { + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(xhr, 'onreadystatechange', function (original) { + return function (...readyStateArgs) { + onreadystatechangeHandler(); + return original.apply(xhr, readyStateArgs); + }; + }); + } else { + xhr.addEventListener('readystatechange', onreadystatechangeHandler); + } + + return originalOpen.apply(xhr, args); + }; + }); + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(xhrproto, 'send', function (originalSend) { + return function ( ...args) { + if (this.__sentry_xhr__ && args[0] !== undefined) { + this.__sentry_xhr__.body = args[0]; + } + + triggerHandlers('xhr', { + args, + startTimestamp: Date.now(), + xhr: this, + }); + + return originalSend.apply(this, args); + }; + }); +} + +let lastHref; + +/** JSDoc */ +function instrumentHistory() { + if (!Object(_supports_js__WEBPACK_IMPORTED_MODULE_4__["supportsHistory"])()) { + return; + } + + const oldOnPopState = WINDOW.onpopstate; + WINDOW.onpopstate = function ( ...args) { + const to = WINDOW.location.href; + // keep track of the current URL state, as we always receive only the updated state + const from = lastHref; + lastHref = to; + triggerHandlers('history', { + from, + to, + }); + if (oldOnPopState) { + // Apparently this can throw in Firefox when incorrectly implemented plugin is installed. + // https://github.com/getsentry/sentry-javascript/issues/3344 + // https://github.com/bugsnag/bugsnag-js/issues/469 + try { + return oldOnPopState.apply(this, args); + } catch (_oO) { + // no-empty + } + } + }; + + /** @hidden */ + function historyReplacementFunction(originalHistoryFunction) { + return function ( ...args) { + const url = args.length > 2 ? args[2] : undefined; + if (url) { + // coerce to string (this is what pushState does) + const from = lastHref; + const to = String(url); + // keep track of the current URL state, as we always receive only the updated state + lastHref = to; + triggerHandlers('history', { + from, + to, + }); + } + return originalHistoryFunction.apply(this, args); + }; + } + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(WINDOW.history, 'pushState', historyReplacementFunction); + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(WINDOW.history, 'replaceState', historyReplacementFunction); +} + +const debounceDuration = 1000; +let debounceTimerID; +let lastCapturedEvent; + +/** + * Decide whether the current event should finish the debounce of previously captured one. + * @param previous previously captured event + * @param current event to be captured + */ +function shouldShortcircuitPreviousDebounce(previous, current) { + // If there was no previous event, it should always be swapped for the new one. + if (!previous) { + return true; + } + + // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress. + if (previous.type !== current.type) { + return true; + } + + try { + // If both events have the same type, it's still possible that actions were performed on different targets. + // e.g. 2 clicks on different buttons. + if (previous.target !== current.target) { + return true; + } + } catch (e) { + // just accessing `target` property can throw an exception in some rare circumstances + // see: https://github.com/getsentry/sentry-javascript/issues/838 + } + + // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_ + // to which an event listener was attached), we treat them as the same action, as we want to capture + // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box. + return false; +} + +/** + * Decide whether an event should be captured. + * @param event event to be captured + */ +function shouldSkipDOMEvent(event) { + // We are only interested in filtering `keypress` events for now. + if (event.type !== 'keypress') { + return false; + } + + try { + const target = event.target ; + + if (!target || !target.tagName) { + return true; + } + + // Only consider keypress events on actual input elements. This will disregard keypresses targeting body + // e.g.tabbing through elements, hotkeys, etc. + if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) { + return false; + } + } catch (e) { + // just accessing `target` property can throw an exception in some rare circumstances + // see: https://github.com/getsentry/sentry-javascript/issues/838 + } + + return true; +} + +/** + * Wraps addEventListener to capture UI breadcrumbs + * @param handler function that will be triggered + * @param globalListener indicates whether event was captured by the global event listener + * @returns wrapped breadcrumb events handler + * @hidden + */ +function makeDOMEventHandler(handler, globalListener = false) { + return (event) => { + // It's possible this handler might trigger multiple times for the same + // event (e.g. event propagation through node ancestors). + // Ignore if we've already captured that event. + if (!event || lastCapturedEvent === event) { + return; + } + + // We always want to skip _some_ events. + if (shouldSkipDOMEvent(event)) { + return; + } + + const name = event.type === 'keypress' ? 'input' : event.type; + + // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons. + if (debounceTimerID === undefined) { + handler({ + event: event, + name, + global: globalListener, + }); + lastCapturedEvent = event; + } + // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one. + // If that's the case, emit the previous event and store locally the newly-captured DOM event. + else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) { + handler({ + event: event, + name, + global: globalListener, + }); + lastCapturedEvent = event; + } + + // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together. + clearTimeout(debounceTimerID); + debounceTimerID = WINDOW.setTimeout(() => { + debounceTimerID = undefined; + }, debounceDuration); + }; +} + +/** JSDoc */ +function instrumentDOM() { + if (!('document' in WINDOW)) { + return; + } + + // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom + // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before + // we instrument `addEventListener` so that we don't end up attaching this handler twice. + const triggerDOMHandler = triggerHandlers.bind(null, 'dom'); + const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); + WINDOW.document.addEventListener('click', globalDOMEventHandler, false); + WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false); + + // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled + // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That + // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler + // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still + // guaranteed to fire at least once.) + ['EventTarget', 'Node'].forEach((target) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const proto = (WINDOW )[target] && (WINDOW )[target].prototype; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins + if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { + return; + } + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])(proto, 'addEventListener', function (originalAddEventListener) { + return function ( + + type, + listener, + options, + ) { + if (type === 'click' || type == 'keypress') { + try { + const el = this ; + const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {}); + const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 }); + + if (!handlerForType.handler) { + const handler = makeDOMEventHandler(triggerDOMHandler); + handlerForType.handler = handler; + originalAddEventListener.call(this, type, handler, options); + } + + handlerForType.refCount += 1; + } catch (e) { + // Accessing dom properties is always fragile. + // Also allows us to skip `addEventListenrs` calls with no proper `this` context. + } + } + + return originalAddEventListener.call(this, type, listener, options); + }; + }); + + Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["fill"])( + proto, + 'removeEventListener', + function (originalRemoveEventListener) { + return function ( + + type, + listener, + options, + ) { + if (type === 'click' || type == 'keypress') { + try { + const el = this ; + const handlers = el.__sentry_instrumentation_handlers__ || {}; + const handlerForType = handlers[type]; + + if (handlerForType) { + handlerForType.refCount -= 1; + // If there are no longer any custom handlers of the current type on this element, we can remove ours, too. + if (handlerForType.refCount <= 0) { + originalRemoveEventListener.call(this, type, handlerForType.handler, options); + handlerForType.handler = undefined; + delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete + } + + // If there are no longer any custom handlers of any type on this element, cleanup everything. + if (Object.keys(handlers).length === 0) { + delete el.__sentry_instrumentation_handlers__; + } + } + } catch (e) { + // Accessing dom properties is always fragile. + // Also allows us to skip `addEventListenrs` calls with no proper `this` context. + } + } + + return originalRemoveEventListener.call(this, type, listener, options); + }; + }, + ); + }); +} + +let _oldOnErrorHandler = null; +/** JSDoc */ +function instrumentError() { + _oldOnErrorHandler = WINDOW.onerror; + + WINDOW.onerror = function (msg, url, line, column, error) { + triggerHandlers('error', { + column, + error, + line, + msg, + url, + }); + + if (_oldOnErrorHandler) { + // eslint-disable-next-line prefer-rest-params + return _oldOnErrorHandler.apply(this, arguments); + } + + return false; + }; +} + +let _oldOnUnhandledRejectionHandler = null; +/** JSDoc */ +function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection; + + WINDOW.onunhandledrejection = function (e) { + triggerHandlers('unhandledrejection', e); + + if (_oldOnUnhandledRejectionHandler) { + // eslint-disable-next-line prefer-rest-params + return _oldOnUnhandledRejectionHandler.apply(this, arguments); + } + + return true; + }; +} + + +//# sourceMappingURL=instrument.js.map + + +/***/ }), + +/***/ "5lG/": +/***/ (function(module, exports, __webpack_require__) { + +var compareDesc = __webpack_require__("cozM") +var parse = __webpack_require__("soLG") +var differenceInSeconds = __webpack_require__("oapZ") +var enLocale = __webpack_require__("mnDI") + +var MINUTES_IN_DAY = 1440 +var MINUTES_IN_MONTH = 43200 +var MINUTES_IN_YEAR = 525600 + +/** + * @category Common Helpers + * @summary Return the distance between the given dates in words. + * + * @description + * Return the distance between the given dates in words, using strict units. + * This is like `distanceInWords`, but does not use helpers like 'almost', 'over', + * 'less than' and the like. + * + * | Distance between dates | Result | + * |------------------------|---------------------| + * | 0 ... 59 secs | [0..59] seconds | + * | 1 ... 59 mins | [1..59] minutes | + * | 1 ... 23 hrs | [1..23] hours | + * | 1 ... 29 days | [1..29] days | + * | 1 ... 11 months | [1..11] months | + * | 1 ... N years | [1..N] years | + * + * @param {Date|String|Number} dateToCompare - the date to compare with + * @param {Date|String|Number} date - the other date + * @param {Object} [options] - the object with options + * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first + * @param {'s'|'m'|'h'|'d'|'M'|'Y'} [options.unit] - if specified, will force a unit + * @param {'floor'|'ceil'|'round'} [options.partialMethod='floor'] - which way to round partial units + * @param {Object} [options.locale=enLocale] - the locale object + * @returns {String} the distance in words + * + * @example + * // What is the distance between 2 July 2014 and 1 January 2015? + * var result = distanceInWordsStrict( + * new Date(2014, 6, 2), + * new Date(2015, 0, 2) + * ) + * //=> '6 months' + * + * @example + * // What is the distance between 1 January 2015 00:00:15 + * // and 1 January 2015 00:00:00? + * var result = distanceInWordsStrict( + * new Date(2015, 0, 1, 0, 0, 15), + * new Date(2015, 0, 1, 0, 0, 0), + * ) + * //=> '15 seconds' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, with a suffix? + * var result = distanceInWordsStrict( + * new Date(2016, 0, 1), + * new Date(2015, 0, 1), + * {addSuffix: true} + * ) + * //=> '1 year ago' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, in minutes? + * var result = distanceInWordsStrict( + * new Date(2016, 0, 1), + * new Date(2015, 0, 1), + * {unit: 'm'} + * ) + * //=> '525600 minutes' + * + * @example + * // What is the distance from 1 January 2016 + * // to 28 January 2015, in months, rounded up? + * var result = distanceInWordsStrict( + * new Date(2015, 0, 28), + * new Date(2015, 0, 1), + * {unit: 'M', partialMethod: 'ceil'} + * ) + * //=> '1 month' + * + * @example + * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? + * var eoLocale = require('date-fns/locale/eo') + * var result = distanceInWordsStrict( + * new Date(2016, 7, 1), + * new Date(2015, 0, 1), + * {locale: eoLocale} + * ) + * //=> '1 jaro' + */ +function distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) { + var options = dirtyOptions || {} + + var comparison = compareDesc(dirtyDateToCompare, dirtyDate) + + var locale = options.locale + var localize = enLocale.distanceInWords.localize + if (locale && locale.distanceInWords && locale.distanceInWords.localize) { + localize = locale.distanceInWords.localize + } + + var localizeOptions = { + addSuffix: Boolean(options.addSuffix), + comparison: comparison + } + + var dateLeft, dateRight + if (comparison > 0) { + dateLeft = parse(dirtyDateToCompare) + dateRight = parse(dirtyDate) + } else { + dateLeft = parse(dirtyDate) + dateRight = parse(dirtyDateToCompare) + } + + var unit + var mathPartial = Math[options.partialMethod ? String(options.partialMethod) : 'floor'] + var seconds = differenceInSeconds(dateRight, dateLeft) + var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset() + var minutes = mathPartial(seconds / 60) - offset + var hours, days, months, years + + if (options.unit) { + unit = String(options.unit) + } else { + if (minutes < 1) { + unit = 's' + } else if (minutes < 60) { + unit = 'm' + } else if (minutes < MINUTES_IN_DAY) { + unit = 'h' + } else if (minutes < MINUTES_IN_MONTH) { + unit = 'd' + } else if (minutes < MINUTES_IN_YEAR) { + unit = 'M' + } else { + unit = 'Y' + } + } + + // 0 up to 60 seconds + if (unit === 's') { + return localize('xSeconds', seconds, localizeOptions) + + // 1 up to 60 mins + } else if (unit === 'm') { + return localize('xMinutes', minutes, localizeOptions) + + // 1 up to 24 hours + } else if (unit === 'h') { + hours = mathPartial(minutes / 60) + return localize('xHours', hours, localizeOptions) + + // 1 up to 30 days + } else if (unit === 'd') { + days = mathPartial(minutes / MINUTES_IN_DAY) + return localize('xDays', days, localizeOptions) + + // 1 up to 12 months + } else if (unit === 'M') { + months = mathPartial(minutes / MINUTES_IN_MONTH) + return localize('xMonths', months, localizeOptions) + + // 1 year up to max Date + } else if (unit === 'Y') { + years = mathPartial(minutes / MINUTES_IN_YEAR) + return localize('xYears', years, localizeOptions) + } + + throw new Error('Unknown unit: ' + unit) +} + +module.exports = distanceInWordsStrict + + +/***/ }), + +/***/ "5qNH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.3 String.prototype.big() +__webpack_require__("A7oe")('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + + +/***/ }), + +/***/ "5skM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_MONTH_DOCTYPE = void 0; +var ENEDIS_MONTH_DOCTYPE = 'com.grandlyon.enedis.month'; +exports.ENEDIS_MONTH_DOCTYPE = ENEDIS_MONTH_DOCTYPE; + +/***/ }), + +/***/ "5tH4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+IMj"); + + +/** + * Convert camel cased property names to dash separated. + */ + +function convertCase(style) { + var converted = {}; + + for (var prop in style) { + var key = prop.indexOf('--') === 0 ? prop : Object(hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__["default"])(prop); + converted[key] = style[prop]; + } + + if (style.fallbacks) { + if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks); + } + + return converted; +} +/** + * Allow camel cased property names by converting them back to dasherized. + */ + + +function camelCase() { + function onProcessStyle(style) { + if (Array.isArray(style)) { + // Handle rules like @font-face, which can have multiple styles in an array + for (var index = 0; index < style.length; index++) { + style[index] = convertCase(style[index]); + } + + return style; + } + + return convertCase(style); + } + + function onChangeValue(value, prop, rule) { + if (prop.indexOf('--') === 0) { + return value; + } + + var hyphenatedProp = Object(hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__["default"])(prop); // There was no camel case in place + + if (prop === hyphenatedProp) return value; + rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above. + + return null; + } + + return { + onProcessStyle: onProcessStyle, + onChangeValue: onChangeValue + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (camelCase); + + +/***/ }), + +/***/ "5wjq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var indigo = { + 50: '#e8eaf6', + 100: '#c5cae9', + 200: '#9fa8da', + 300: '#7986cb', + 400: '#5c6bc0', + 500: '#3f51b5', + 600: '#3949ab', + 700: '#303f9f', + 800: '#283593', + 900: '#1a237e', + A100: '#8c9eff', + A200: '#536dfe', + A400: '#3d5afe', + A700: '#304ffe' +}; +/* harmony default export */ __webpack_exports__["default"] = (indigo); + +/***/ }), + +/***/ "5y8V": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = __webpack_require__("Yfzq"); +var getPrototypeOf = __webpack_require__("EjI+"); +var has = __webpack_require__("00OQ"); +var $export = __webpack_require__("LRPZ"); +var isObject = __webpack_require__("pFmr"); +var anObject = __webpack_require__("eckd"); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + + +/***/ }), + +/***/ "5z4W": +/***/ (function(module, exports) { + +module.exports = {"name":"Ecolyo","slug":"ecolyo","icon":"icon.svg","categories":["energy"],"version":"2.7.2","licence":"AGPL-3.0","editor":"Métropole de Lyon","default_locale":"fr","locales":{"fr":{"short_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer.","long_description":"Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre les consommations d’énergie et d’eau de votre foyer afin de vous accompagner dans la gestion quotidienne de ces consommations et ce, de façon ludique en vous lançant des défis personnalisés.","permissions":{"ecolyo":{"description":"Requises pour le fonctionnement des différentes parties de l’application (Analyse, liste d’astuces personnalisée, …)."},"enedis":{"description":"Requises pour l’affichage et l’analyse de vos consommations électriques dans Ecolyo. Issues du connecteur Enedis."},"grdf":{"description":"Requises pour l’affichage et l’analyse de vos consommations de gaz dans Ecolyo. Issues du connecteur GRDF."},"egl":{"description":"Requises pour l’affichage et l’analyse de vos consommations d’eau dans Ecolyo. Issues du connecteur Eau du Grand Lyon."},"konnectors":{"description":"Requis pour vérifier la présence des connecteurs Enedis, GRDF et Eau du Grand Lyon ainsi que pour pouvoir les configurer à partir de l’application Ecolyo."},"accounts":{"description":"Requis pour stocker des informations propres aux comptes énergie et eau (Enedis, GRDF, Eau du Grand Lyon). Sont stockés votre numéro de PDL pour Enedis, votre numéro de PCE pour GRDF, vos logins et mots de passe pour Eau du Grand Lyon."},"triggers":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"jobs":{"description":"Requis pour le bon fonctionnement des connecteurs énergie et eau."},"terms":{"description":"Nécessaire pour la gestion des consentements de l'application"},"apps":{"description":"Requis par Cozy pour afficher les icônes des applications installées dans la barre Cozy."},"settings":{"description":"Requis pour afficher les paramètres Cozy dans la barre Cozy."},"ecolyo-dju":{"description":"Requis pour la récupération des DJU (Degrés Jours Unifiés), informations météorologiques permettant d’ajuster le modèle de comparaison des consommations énergétiques."},"dacc-dev":{"description":"Requis pour la récupération et l’envoi de statistiques d’utilisation anonymisées dans un environnement de test."},"dacc":{"description":"Requis pour envoyer des statistiques d'utilisation anonymisées."},"backoffice-prod":{"description":"Requis pour la récupération des données de la newsletter."},"backoffice-rec":{"description":"Requis pour la récupération des données de la newsletter dans un environment de test."},"backoffice-custom-popup":{"description":"Requis pour la récupération des alertes personnalisées."},"backoffice-custom-popup-rec":{"description":"Requis pour la récupération des alertes personnalisées dans un environment de test."},"backoffice-partners-info":{"description":"Requis pour la récupération du status des services partenaires"},"backoffice-partners-info-rec":{"description":"Requis pour la récupération du status des services partenaires dans un environment de test."},"backoffice-prices":{"description":"Requis pour la récupération du prix des fluides."},"backoffice-prices-rec":{"description":"Requis pour la récupération du prix des fluides dans un environnement de test."}}},"en":{"short_description":"Ecolyo a free service developed by Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home.","long_description":"Ecolyo a free service developed by the Métropole de Lyon to help you to monitor and understand the energy and water consumption of your home. To help you in reducing your daily consumption it gives you best energy consumption practices, consumption analysis and challenges to take up. At least one Smartmeter is needed among Linky (for electricity), Gazpar (for gas) or Téléo (for water).","permissions":{"ecolyo":{"description":"Required for the operation of the different parts of the application (Analysis, customized eco-gesture lists, etc...)."},"enedis":{"description":"Required for the display and analysis of your electricity consumption in Ecolyo. Retrieved by the Enedis connector."},"grdf":{"description":"Required for the display and analysis of your gas consumption in Ecolyo. Retrieved by the GRDF connector."},"egl":{"description":"Required for the display and analysis of your water consumption in Ecolyo. Retrieved by the Eau du Grand Lyon connector."},"konnectors":{"description":"Required to verify the presence of the Enedis, GRDF and Eau du Grand Lyon connectors as well as to be able to configure them from the Ecolyo application."},"accounts":{"description":"Required to store information specific to energy and water accounts (Enedis, GRDF, Eau du Grand Lyon). Your PDL number for Enedis, your PCE number for GRDF, your logins and passwords for Eau du Grand Lyon are stored."},"triggers":{"description":"Required for the correct functioning of the energy and water connectors."},"jobs":{"description":"Required for the correct functioning of the energy and water connectors."},"terms":{"description":"Required for the correct managment of CGU."},"apps":{"description":"Required to display the icons of installed applications in the Cozy bar."},"settings":{"description":"Required for the application's consents managment"},"ecolyo-dju":{"description":"Required to gather udd data (Unified Degree Days), a meteorological data allowing the app to adjust our energical consumption model. "},"dacc-dev":{"description":"Required for gathering and sending anonymous usage statistics for test environment."},"dacc":{"description":"Required for sending cozy anonymized stats."},"agent":{"description":"Required for retrieving informations from our partners."},"backoffice-prod":{"description":"Required for retrieving newsletter informations from backoffice prod."},"backoffice-rec":{"description":"Required for retrieving newsletter informations from backoffice rec."},"backoffice-custom-popup":{"description":"Required for retrieving custom alerts."},"backoffice-custom-popup-rec":{"description":"Required for retrieving custom alerts in test environment."},"backoffice-partners-info":{"description":"Required for getting the status of partners' services"},"backoffice-partners-info-rec":{"description":"Required for getting the status of partners' services in test environment."},"backoffice-prices":{"description":"Required for getting fluid prices form backoffice prod"},"backoffice-prices-rec":{"description":"Required for getting fluid prices form backoffice rec."}}}},"langs":["fr"],"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"routes":{"/public":{"folder":"/public","index":"index.html","public":true},"/":{"folder":"/","index":"index.html","public":false}},"services":{"enedisHalfHourMonthlyAnalysis":{"type":"node","file":"services/enedisHalfHourMonthlyAnalysis/ecolyo.js","trigger":"@cron 0 0 8 3 * *"},"monthlyReportNotification":{"type":"node","file":"services/monthlyReportNotification/ecolyo.js","trigger":"@cron 0 0 10 3 * *"},"consumptionAlert":{"type":"node","file":"services/consumptionAlert/ecolyo.js","trigger":"@daily after 11am"},"aggregatorUsageEvents":{"type":"node","file":"services/aggregatorUsageEvents/ecolyo.js","trigger":"@daily before 7am"},"fluidsPrices":{"type":"node","file":"services/fluidsPrices/ecolyo.js","trigger":"@daily before 7am"}},"permissions":{"ecolyo":{"type":"com.grandlyon.ecolyo.*"},"enedis":{"type":"com.grandlyon.enedis.*"},"grdf":{"type":"com.grandlyon.grdf.*"},"egl":{"type":"com.grandlyon.egl.*"},"agent":{"type":"org.ecolyo.agent.*"},"konnectors":{"type":"io.cozy.konnectors"},"accounts":{"type":"io.cozy.accounts"},"triggers":{"type":"io.cozy.triggers"},"jobs":{"type":"io.cozy.jobs"},"terms":{"type":"io.cozy.terms"},"apps":{"type":"io.cozy.apps","verbs":["GET"]},"settings":{"type":"io.cozy.settings","verbs":["GET"]},"ecolyo-dju":{"type":"org.ecolyo.dju_v2","verbs":["GET"]},"dacc":{"type":"cc.cozycloud.dacc_v2","verbs":["ALL"]},"dacc-dev":{"type":"cc.cozycloud.dacc.dev_v2","verbs":["ALL"]},"backoffice-prod":{"type":"org.ecolyo.agent","verbs":["ALL"]},"backoffice-rec":{"type":"org.ecolyo.agent.rec","verbs":["ALL"]},"backoffice-custom-popup":{"type":"org.ecolyo.agent.custom.popup","verbs":["ALL"]},"backoffice-custom-popup-rec":{"type":"org.ecolyo.agent.custom.popup.rec","verbs":["ALL"]},"backoffice-partners-info":{"type":"org.ecolyo.agent.partners.info","verbs":["ALL"]},"backoffice-partners-info-rec":{"type":"org.ecolyo.agent.partners.info.rec","verbs":["ALL"]},"backoffice-prices":{"type":"org.ecolyo.agent.prices","verbs":["ALL"]},"backoffice-prices-rec":{"type":"org.ecolyo.agent.prices.rec","verbs":["ALL"]}}} + +/***/ }), + +/***/ "67e+": +/***/ (function(module, exports, __webpack_require__) { + +var baseForOwn = __webpack_require__("i91D"), + createBaseEach = __webpack_require__("Jnpc"); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; + + +/***/ }), + +/***/ "6JFH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mongo", function() { return Mongo; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +// This allows us to use the same array for both defaults options and the type itself. +// (note `as const` at the end to make it a union of string literal types (i.e. "a" | "b" | ... ) +// and not just a string[]) + +const OPERATIONS = [ + 'aggregate', // aggregate(pipeline, options, callback) + 'bulkWrite', // bulkWrite(operations, options, callback) + 'countDocuments', // countDocuments(query, options, callback) + 'createIndex', // createIndex(fieldOrSpec, options, callback) + 'createIndexes', // createIndexes(indexSpecs, options, callback) + 'deleteMany', // deleteMany(filter, options, callback) + 'deleteOne', // deleteOne(filter, options, callback) + 'distinct', // distinct(key, query, options, callback) + 'drop', // drop(options, callback) + 'dropIndex', // dropIndex(indexName, options, callback) + 'dropIndexes', // dropIndexes(options, callback) + 'estimatedDocumentCount', // estimatedDocumentCount(options, callback) + 'find', // find(query, options, callback) + 'findOne', // findOne(query, options, callback) + 'findOneAndDelete', // findOneAndDelete(filter, options, callback) + 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback) + 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback) + 'indexes', // indexes(options, callback) + 'indexExists', // indexExists(indexes, options, callback) + 'indexInformation', // indexInformation(options, callback) + 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback) + 'insertMany', // insertMany(docs, options, callback) + 'insertOne', // insertOne(doc, options, callback) + 'isCapped', // isCapped(options, callback) + 'mapReduce', // mapReduce(map, reduce, options, callback) + 'options', // options(options, callback) + 'parallelCollectionScan', // parallelCollectionScan(options, callback) + 'rename', // rename(newName, options, callback) + 'replaceOne', // replaceOne(filter, doc, options, callback) + 'stats', // stats(options, callback) + 'updateMany', // updateMany(filter, update, options, callback) + 'updateOne', // updateOne(filter, update, options, callback) +] ; + +// All of the operations above take `options` and `callback` as their final parameters, but some of them +// take additional parameters as well. For those operations, this is a map of +// { <operation name>: [<names of additional parameters>] }, as a way to know what to call the operation's +// positional arguments when we add them to the span's `data` object later +const OPERATION_SIGNATURES + + = { + // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well + // see https://github.com/getsentry/sentry-javascript/pull/3102 + bulkWrite: ['operations'], + countDocuments: ['query'], + createIndex: ['fieldOrSpec'], + createIndexes: ['indexSpecs'], + deleteMany: ['filter'], + deleteOne: ['filter'], + distinct: ['key', 'query'], + dropIndex: ['indexName'], + find: ['query'], + findOne: ['query'], + findOneAndDelete: ['filter'], + findOneAndReplace: ['filter', 'replacement'], + findOneAndUpdate: ['filter', 'update'], + indexExists: ['indexes'], + insertMany: ['docs'], + insertOne: ['doc'], + mapReduce: ['map', 'reduce'], + rename: ['newName'], + replaceOne: ['filter', 'doc'], + updateMany: ['filter', 'update'], + updateOne: ['filter', 'update'], +}; + +/** Tracing integration for mongo package */ +class Mongo { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Mongo';} + + /** + * @inheritDoc + */ + __init() {this.name = Mongo.id;} + + /** + * @inheritDoc + */ + constructor(options = {}) {;Mongo.prototype.__init.call(this); + this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS ); + this._describeOperations = 'describeOperations' in options ? options.describeOperations : true; + this._useMongoose = !!options.useMongoose; + } + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + const moduleName = this._useMongoose ? 'mongoose' : 'mongodb'; + const pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"])(moduleName); + + if (!pkg) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error(`Mongo Integration was unable to require \`${moduleName}\` package.`); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Mongo Integration is skipped because of instrumenter configuration.'); + return; + } + + this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub); + } + + /** + * Patches original collection methods + */ + _instrumentOperations(collection, operations, getCurrentHub) { + operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub)); + } + + /** + * Patches original collection to utilize our tracing functionality + */ + _patchOperation(collection, operation, getCurrentHub) { + if (!(operation in collection.prototype)) return; + + const getSpanContext = this._getSpanContextFromOperationArguments.bind(this); + + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(collection.prototype, operation, function (orig) { + return function ( ...args) { + const lastArg = args[args.length - 1]; + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); + + // Check if the operation was passed a callback. (mapReduce requires a different check, as + // its (non-callback) arguments can also be functions.) + if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) { + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5(getSpanContext(this, operation, args))]); + const maybePromise = orig.call(this, ...args) ; + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(maybePromise)) { + return maybePromise.then((res) => { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); + return res; + }); + } else { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + return maybePromise; + } + } + + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _10 => _10.startChild, 'call', _11 => _11(getSpanContext(this, operation, args.slice(0, -1)))]); + return orig.call(this, ...args.slice(0, -1), function (err, result) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]); + lastArg(err, result); + }); + }; + }); + } + + /** + * Form a SpanContext based on the user input to a given operation. + */ + _getSpanContextFromOperationArguments( + collection, + operation, + args, + ) { + const data = { + collectionName: collection.collectionName, + dbName: collection.dbName, + namespace: collection.namespace, + }; + const spanContext = { + op: 'db', + description: operation, + data, + }; + + // If the operation takes no arguments besides `options` and `callback`, or if argument + // collection is disabled for this operation, just return early. + const signature = OPERATION_SIGNATURES[operation]; + const shouldDescribe = Array.isArray(this._describeOperations) + ? this._describeOperations.includes(operation) + : this._describeOperations; + + if (!signature || !shouldDescribe) { + return spanContext; + } + + try { + // Special case for `mapReduce`, as the only one accepting functions as arguments. + if (operation === 'mapReduce') { + const [map, reduce] = args ; + data[signature[0]] = typeof map === 'string' ? map : map.name || '<anonymous>'; + data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || '<anonymous>'; + } else { + for (let i = 0; i < signature.length; i++) { + data[signature[i]] = JSON.stringify(args[i]); + } + } + } catch (_oO) { + // no-empty + } + + return spanContext; + } +}Mongo.__initStatic(); + + +//# sourceMappingURL=mongo.js.map + + +/***/ }), + +/***/ "6Ku4": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'meno di un secondo', + other: 'meno di {{count}} secondi' + }, + + xSeconds: { + one: 'un secondo', + other: '{{count}} secondi' + }, + + halfAMinute: 'alcuni secondi', + + lessThanXMinutes: { + one: 'meno di un minuto', + other: 'meno di {{count}} minuti' + }, + + xMinutes: { + one: 'un minuto', + other: '{{count}} minuti' + }, + + aboutXHours: { + one: 'circa un\'ora', + other: 'circa {{count}} ore' + }, + + xHours: { + one: 'un\'ora', + other: '{{count}} ore' + }, + + xDays: { + one: 'un giorno', + other: '{{count}} giorni' + }, + + aboutXMonths: { + one: 'circa un mese', + other: 'circa {{count}} mesi' + }, + + xMonths: { + one: 'un mese', + other: '{{count}} mesi' + }, + + aboutXYears: { + one: 'circa un anno', + other: 'circa {{count}} anni' + }, + + xYears: { + one: 'un anno', + other: '{{count}} anni' + }, + + overXYears: { + one: 'più di un anno', + other: 'più di {{count}} anni' + }, + + almostXYears: { + one: 'quasi un anno', + other: 'quasi {{count}} anni' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'tra ' + result + } else { + return result + ' fa' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "6O9A": +/***/ (function(module, exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = __webpack_require__(0); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>'; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + + +/***/ }), + +/***/ "6ORS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread2; }); +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); + + +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; +} + +function _objectSpread2(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) { + Object(_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(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; +} + +/***/ }), + +/***/ "6P1f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BqmN"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sheetsManager", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__["sheetsManager"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesContext", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__["StylesContext"]; }); + + + + +/***/ }), + +/***/ "6Ry2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("WWey"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListItemIcon__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "6SuJ": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__("05TQ"); +var $getPrototypeOf = __webpack_require__("EjI+"); + +__webpack_require__("80eX")('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), + +/***/ "6TOZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.BreakpointsProvider = void 0; +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _throttle = _interopRequireDefault(__webpack_require__("y0wq")); +var _breakpoints = _interopRequireWildcard(__webpack_require__("S5nn")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var getBreakpointsStatus = function getBreakpointsStatus() { + return (0, _breakpoints.getBreakpointsStatus)(_breakpoints.default); +}; +var BreakpointsCtx = /*#__PURE__*/(0, _react.createContext)(null); +var BreakpointsProvider = function BreakpointsProvider(_ref) { + var children = _ref.children; + var _useState = (0, _react.useState)(getBreakpointsStatus()), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + breakpoints = _useState2[0], + setBreakpoints = _useState2[1]; + (0, _react.useEffect)(function () { + var handleResize = (0, _throttle.default)(function () { + setBreakpoints(getBreakpointsStatus()); + }, 100); + window.addEventListener('resize', handleResize); + return function () { + window.removeEventListener('resize', handleResize); + }; + }, []); + return /*#__PURE__*/_react.default.createElement(BreakpointsCtx.Provider, { + value: breakpoints + }, children); +}; +exports.BreakpointsProvider = BreakpointsProvider; +var useBreakpoints = function useBreakpoints() { + var v = (0, _react.useContext)(BreakpointsCtx); + if (v === null) { + throw new Error('Cannot use useBreakpoints without BreakpointsProvider. The component must have a BreakpointsProvider above it.'); + } + return v; +}; +var _default = useBreakpoints; +exports.default = _default; + +/***/ }), + +/***/ "6VwF": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Day Helpers + * @summary Return the start of a day for the given date. + * + * @description + * Return the start of a day for the given date. + * The result will be in the local timezone. + * + * @param {Date|String|Number} date - the original date + * @returns {Date} the start of a day + * + * @example + * // The start of a day for 2 September 2014 11:55:00: + * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Tue Sep 02 2014 00:00:00 + */ +function startOfDay (dirtyDate) { + var date = parse(dirtyDate) + date.setHours(0, 0, 0, 0) + return date +} + +module.exports = startOfDay + + +/***/ }), + +/***/ "6Wbw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9aAh"); + +var defaultTheme = Object(_createTheme__WEBPACK_IMPORTED_MODULE_0__["default"])(); +/* harmony default export */ __webpack_exports__["default"] = (defaultTheme); + +/***/ }), + +/***/ "6X5L": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ErrorReturned = exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__("2y6E")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var ErrorReturned = /*#__PURE__*/function (_String) { + (0, _inherits2.default)(ErrorReturned, _String); + + var _super = _createSuper(ErrorReturned); + + function ErrorReturned() { + (0, _classCallCheck2.default)(this, ErrorReturned); + return _super.apply(this, arguments); + } + + return ErrorReturned; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(String)); +/** + * Delete outdated results from cache + */ + + +exports.ErrorReturned = ErrorReturned; + +var garbageCollect = function garbageCollect(cache, maxDuration) { + var now = Date.now(); + + for (var _i = 0, _Object$keys = Object.keys(cache); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + var delta = now - cache[key].date; + + if (delta > maxDuration) { + delete cache[key]; + } + } +}; + +var isPromise = function isPromise(maybePromise) { + return typeof maybePromise === 'object' && typeof maybePromise.then === 'function'; +}; +/** + * Memoize with maxDuration and custom key + */ + + +var memoize = function memoize(fn, options) { + var cache = {}; + return function () { + var key = options.key.apply(null, arguments); + garbageCollect(cache, options.maxDuration); + var existing = cache[key]; + + if (existing) { + return existing.result; + } else { + var result = fn.apply(this, arguments); + cache[key] = { + result: result, + date: Date.now() + }; + /** + * If the result is a promise and this promise + * failed or resolved with a specific error (aka ErrorReturned), + * let's remove the result from the cache since we don't want to + * memoize error + */ + + if (isPromise(result)) { + result.then(function (v) { + if (v instanceof ErrorReturned) { + delete cache[key]; + } + }).catch(function (e) { + delete cache[key]; + }); + } + + return result; + } + }; +}; + +var _default = memoize; +exports.default = _default; + +/***/ }), + +/***/ "6ZUk": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsArguments = __webpack_require__("M+cw"), + isObjectLike = __webpack_require__("S5PF"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; + + +/***/ }), + +/***/ "6aqz": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) || + (typeof self !== "undefined" && self) || + window; +var apply = Function.prototype.apply; + +// DOM APIs, for completeness + +exports.setTimeout = function() { + return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout); +}; +exports.setInterval = function() { + return new Timeout(apply.call(setInterval, scope, arguments), clearInterval); +}; +exports.clearTimeout = +exports.clearInterval = function(timeout) { + if (timeout) { + timeout.close(); + } +}; + +function Timeout(id, clearFn) { + this._id = id; + this._clearFn = clearFn; +} +Timeout.prototype.unref = Timeout.prototype.ref = function() {}; +Timeout.prototype.close = function() { + this._clearFn.call(scope, this._id); +}; + +// Does not start the time, just sets up the members needed. +exports.enroll = function(item, msecs) { + clearTimeout(item._idleTimeoutId); + item._idleTimeout = msecs; +}; + +exports.unenroll = function(item) { + clearTimeout(item._idleTimeoutId); + item._idleTimeout = -1; +}; + +exports._unrefActive = exports.active = function(item) { + clearTimeout(item._idleTimeoutId); + + var msecs = item._idleTimeout; + if (msecs >= 0) { + item._idleTimeoutId = setTimeout(function onTimeout() { + if (item._onTimeout) + item._onTimeout(); + }, msecs); + } +}; + +// setimmediate attaches itself to the global object +__webpack_require__("xPkG"); +// On some exotic environments, it's not clear which object `setimmediate` was +// able to install onto. Search each possibility in the same order as the +// `setimmediate` library. +exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || + (typeof global !== "undefined" && global.setImmediate) || + (this && this.setImmediate); +exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || + (typeof global !== "undefined" && global.clearImmediate) || + (this && this.clearImmediate); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "6b0M": +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__("pJ4J"); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "6c7I": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['студз', 'лют', 'сак', 'крас', 'май', 'чэрв', 'ліп', 'жн', 'вер', 'кастр', 'ліст', 'снеж'] + var monthsFull = ['студзень', 'люты', 'сакавік', 'красавік', 'май', 'чэрвень', 'ліпень', 'жнівень', 'верасень', 'кастрычнік', 'лістапад', 'снежань'] + var weekdays2char = ['нд', 'пн', 'аў', 'ср', 'чц', 'пт', 'сб'] + var weekdays3char = ['нядз', 'пан', 'аўт', 'сер', 'чац', 'пят', 'суб'] + var weekdaysFull = ['нядзеля', 'панядзелак', 'аўторак', 'серада', 'чацвер', 'пятніца', 'субота'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "6cet": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.removeQueryString = exports.buildRedirectionURL = exports.pickService = exports.errorSerializer = void 0; + +// helper to serialize/deserialize an error for/from postMessage +var errorSerializer = function () { + var mapErrorProperties = function mapErrorProperties(from, to) { + var result = Object.assign(to, from); + var nativeProperties = ['name', 'message']; + return nativeProperties.reduce(function (result, property) { + if (from[property]) { + to[property] = from[property]; + } + + return result; + }, result); + }; + + return { + serialize: function serialize(error) { + return mapErrorProperties(error, {}); + }, + deserialize: function deserialize(data) { + return mapErrorProperties(data, new Error(data.message)); + } + }; +}(); +/** + * + * Returns the first service from the services in the intent. + * Throws if service not found. + * + * If filterServices is passed, the first service matching filterServices + * is returned. + * + * In the future, users will have to pick the desired service from a list. + * + */ + + +exports.errorSerializer = errorSerializer; + +var pickService = function pickService(intent, filterServices) { + var services = intent.attributes.services || []; + var service = filterServices ? services.find(filterServices) : services[0]; + + if (!service) { + throw new Error('Unable to find a service'); + } + + return service; +}; + +exports.pickService = pickService; + +var buildRedirectionURL = function buildRedirectionURL(url, data) { + var isSerializable = function isSerializable(value) { + return !['object', 'function'].includes(typeof value); + }; + + var parameterStrings = Object.keys(data).filter(function (key) { + return isSerializable(data[key]); + }).map(function (key) { + return "".concat(key, "=").concat(data[key]); + }); + return parameterStrings.length ? "".concat(url, "?").concat(parameterStrings.join('&')) : url; +}; + +exports.buildRedirectionURL = buildRedirectionURL; + +var removeQueryString = function removeQueryString(url) { + return url.replace(/\?[^/#]*/, ''); +}; + +exports.removeQueryString = removeQueryString; + +/***/ }), + +/***/ "6drF": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("QV4S") +var buildFormatLocale = __webpack_require__("h7EV") + +/** + * @category Locales + * @summary Bulgarian locale. + * @author Nikolay Stoynov [@arvigeus]{@link https://github.com/arvigeus} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "6eDQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toPrimitive = __webpack_require__("z/Pn"); + +// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive + +module.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); +}; + + +/***/ }), + +/***/ "6kWt": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !__webpack_require__("WXXH"), 'Object', { defineProperties: __webpack_require__("ptZF") }); + + +/***/ }), + +/***/ "6lZ+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Express", function() { return Express; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +/** + * Express integration + * + * Provides an request and error handler for Express framework as well as tracing capabilities + */ +class Express { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Express';} + + /** + * @inheritDoc + */ + __init() {this.name = Express.id;} + + /** + * Express App instance + */ + + /** + * @inheritDoc + */ + constructor(options = {}) {;Express.prototype.__init.call(this); + this._router = options.router || options.app; + this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use'); + } + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + if (!this._router) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('ExpressIntegration is missing an Express instance'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Express Integration is skipped because of instrumenter configuration.'); + return; + } + + instrumentMiddlewares(this._router, this._methods); + instrumentRouter(this._router ); + } +}Express.__initStatic(); + +/** + * Wraps original middleware function in a tracing call, which stores the info about the call as a span, + * and finishes it once the middleware is done invoking. + * + * Express middlewares have 3 various forms, thus we have to take care of all of them: + * // sync + * app.use(function (req, res) { ... }) + * // async + * app.use(function (req, res, next) { ... }) + * // error handler + * app.use(function (err, req, res, next) { ... }) + * + * They all internally delegate to the `router[method]` of the given application instance. + */ +// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any +function wrap(fn, method) { + const arity = fn.length; + + switch (arity) { + case 2: { + return function ( req, res) { + const transaction = res.__sentry_transaction; + if (transaction) { + const span = transaction.startChild({ + description: fn.name, + op: `middleware.express.${method}`, + }); + res.once('finish', () => { + span.finish(); + }); + } + return fn.call(this, req, res); + }; + } + case 3: { + return function ( + + req, + res, + next, + ) { + const transaction = res.__sentry_transaction; + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([transaction, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({ + description: fn.name, + op: `middleware.express.${method}`, + })]); + fn.call(this, req, res, function ( ...args) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _4 => _4.finish, 'call', _5 => _5()]); + next.call(this, ...args); + }); + }; + } + case 4: { + return function ( + + err, + req, + res, + next, + ) { + const transaction = res.__sentry_transaction; + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([transaction, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({ + description: fn.name, + op: `middleware.express.${method}`, + })]); + fn.call(this, err, req, res, function ( ...args) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + next.call(this, ...args); + }); + }; + } + default: { + throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`); + } + } +} + +/** + * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use` + * and wraps every function, as well as array of functions with a call to our `wrap` method. + * We have to take care of the arrays as well as iterate over all of the arguments, + * as `app.use` can accept middlewares in few various forms. + * + * app.use([<path>], <fn>) + * app.use([<path>], <fn>, ...<fn>) + * app.use([<path>], ...<fn>[]) + */ +function wrapMiddlewareArgs(args, method) { + return args.map((arg) => { + if (typeof arg === 'function') { + return wrap(arg, method); + } + + if (Array.isArray(arg)) { + return arg.map((a) => { + if (typeof a === 'function') { + return wrap(a, method); + } + return a; + }); + } + + return arg; + }); +} + +/** + * Patches original router to utilize our tracing functionality + */ +function patchMiddleware(router, method) { + const originalCallback = router[method]; + + router[method] = function (...args) { + return originalCallback.call(this, ...wrapMiddlewareArgs(args, method)); + }; + + return router; +} + +/** + * Patches original router methods + */ +function instrumentMiddlewares(router, methods = []) { + methods.forEach((method) => patchMiddleware(router, method)); +} + +/** + * Patches the prototype of Express.Router to accumulate the resolved route + * if a layer instance's `match` function was called and it returned a successful match. + * + * @see https://github.com/expressjs/express/blob/master/lib/router/index.js + * + * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router. + */ +function instrumentRouter(appOrRouter) { + // This is how we can distinguish between app and routers + const isApp = 'settings' in appOrRouter; + + // In case the app's top-level router hasn't been initialized yet, we have to do it now + if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) { + appOrRouter.lazyrouter(); + } + + const router = isApp ? appOrRouter._router : appOrRouter; + + if (!router) { + /* + If we end up here, this means likely that this integration is used with Express 3 or Express 5. + For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5, + we'd need to make more changes to the routing instrumentation because the router is no longer part of + the Express core package but maintained in its own package. The new router has different function + signatures and works slightly differently, demanding more changes than just taking the router from + `app.router` instead of `app._router`. + @see https://github.com/pillarjs/router + + TODO: Proper Express 5 support + */ + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Cannot instrument router for URL Parameterization (did not find a valid router).'); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Routing instrumentation is currently only supported in Express 4.'); + return; + } + + const routerProto = Object.getPrototypeOf(router) ; + + const originalProcessParams = routerProto.process_params; + routerProto.process_params = function process_params( + layer, + called, + req, + res, + done, + ) { + // Base case: We're in the first part of the URL (thus we start with the root '/') + if (!req._reconstructedRoute) { + req._reconstructedRoute = ''; + } + + // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route. + const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer); + + if (layerRoutePath || isRegex || isArray) { + req._hasParameters = true; + } + + // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path + const partialRoute = layerRoutePath || layer.path || ''; + + // Normalize the partial route so that it doesn't contain leading or trailing slashes + // and exclude empty or '*' wildcard routes. + // The exclusion of '*' routes is our best effort to not "pollute" the transaction name + // with interim handlers (e.g. ones that check authentication or do other middleware stuff). + // We want to end up with the parameterized URL of the incoming request without any extraneous path segments. + const finalPartialRoute = partialRoute + .split('/') + .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*'))) + .join('/'); + + // If we found a valid partial URL, we append it to the reconstructed route + if (finalPartialRoute && finalPartialRoute.length > 0) { + // If the partial route is from a regex route, we append a '/' to close the regex + req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`; + } + + // Now we check if we are in the "last" part of the route. We determine this by comparing the + // number of URL segments from the original URL to that of our reconstructed parameterized URL. + // If we've reached our final destination, we update the transaction name. + const urlLength = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(req.originalUrl || '') + numExtraSegments; + const routeLength = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(req._reconstructedRoute); + + if (urlLength === routeLength) { + if (!req._hasParameters) { + if (req._reconstructedRoute !== req.originalUrl) { + req._reconstructedRoute = req.originalUrl; + } + } + + const transaction = res.__sentry_transaction; + if (transaction && transaction.metadata.source !== 'custom') { + // If the request URL is '/' or empty, the reconstructed route will be empty. + // Therefore, we fall back to setting the final route to '/' in this case. + const finalRoute = req._reconstructedRoute || '/'; + + transaction.setName(...Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["extractPathForTransaction"])(req, { path: true, method: true, customRoute: finalRoute })); + } + } + + return originalProcessParams.call(this, layer, called, req, res, done); + }; +} + +/** + * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`), + * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\/path[2-5]/, /path/:id]`). Additionally + * returns extra information about the route, such as if the route is defined as regex or as an array. + * + * @param layer the layer to extract the stringified route from + * + * @returns an object containing the stringified route, a flag determining if the route was a regex + * and the number of extra segments to the matched path that are additionally in the route, + * if the route was an array (defaults to 0). + */ +function getLayerRoutePathInfo(layer) { + const lrp = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([layer, 'access', _10 => _10.route, 'optionalAccess', _11 => _11.path]); + + const isRegex = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isRegExp"])(lrp); + const isArray = Array.isArray(lrp); + + if (!lrp) { + return { isRegex, isArray, numExtraSegments: 0 }; + } + + const numExtraSegments = isArray + ? Math.max(getNumberOfArrayUrlSegments(lrp ) - Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(layer.path || ''), 0) + : 0; + + const layerRoutePath = getLayerRoutePathString(isArray, lrp); + + return { layerRoutePath, isRegex, isArray, numExtraSegments }; +} + +/** + * Returns the number of URL segments in an array of routes + * + * Example: ['/api/test', /\/api\/post[0-9]/, '/users/:id/details`] -> 7 + */ +function getNumberOfArrayUrlSegments(routesArray) { + return routesArray.reduce((accNumSegments, currentRoute) => { + // array members can be a RegEx -> convert them toString + return accNumSegments + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(currentRoute.toString()); + }, 0); +} + +/** + * Extracts and returns the stringified version of the layers route path + * Handles route arrays (by joining the paths together) as well as RegExp and normal + * string values (in the latter case the toString conversion is technically unnecessary but + * it doesn't hurt us either). + */ +function getLayerRoutePathString(isArray, lrp) { + if (isArray) { + return (lrp ).map(r => r.toString()).join(','); + } + return lrp && lrp.toString(); +} + + +//# sourceMappingURL=express.js.map + + +/***/ }), + +/***/ "6m9v": +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__("+Bmy"); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; + + +/***/ }), + +/***/ "6mdx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "initQuery", { + enumerable: true, + get: function get() { + return _queries.initQuery; + } +}); +Object.defineProperty(exports, "loadQuery", { + enumerable: true, + get: function get() { + return _queries.loadQuery; + } +}); +Object.defineProperty(exports, "receiveQueryResult", { + enumerable: true, + get: function get() { + return _queries.receiveQueryResult; + } +}); +Object.defineProperty(exports, "receiveQueryError", { + enumerable: true, + get: function get() { + return _queries.receiveQueryError; + } +}); +Object.defineProperty(exports, "initMutation", { + enumerable: true, + get: function get() { + return _mutations.initMutation; + } +}); +Object.defineProperty(exports, "receiveMutationResult", { + enumerable: true, + get: function get() { + return _mutations.receiveMutationResult; + } +}); +Object.defineProperty(exports, "receiveMutationError", { + enumerable: true, + get: function get() { + return _mutations.receiveMutationError; + } +}); +exports.resetState = exports.getRawQueryFromState = exports.getQueryFromState = exports.getQueryFromStore = exports.getDocumentFromState = exports.getCollectionFromState = exports.getStateRoot = exports.createStore = exports.default = exports.StoreProxy = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _cozyFlags = _interopRequireDefault(__webpack_require__("8ZpT")); + +var _redux = __webpack_require__("H360"); + +var _reduxThunk = _interopRequireDefault(__webpack_require__("lTib")); + +var _documents = _interopRequireWildcard(__webpack_require__("sAh9")); + +var _queries = _interopRequireWildcard(__webpack_require__("8K8d")); + +var _mutations = __webpack_require__("1I2P"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var RESET_ACTION_TYPE = 'COZY_CLIENT.RESET_STATE'; + +var resetState = function resetState() { + return { + type: RESET_ACTION_TYPE + }; +}; + +exports.resetState = resetState; + +var StoreProxy = /*#__PURE__*/function () { + function StoreProxy(state) { + (0, _classCallCheck2.default)(this, StoreProxy); + this.state = state; + } + + (0, _createClass2.default)(StoreProxy, [{ + key: "readDocument", + value: function readDocument(doctype, id) { + return this.state.documents[doctype][id]; + } + }, { + key: "writeDocument", + value: function writeDocument(document) { + this.setState(function (state) { + return _objectSpread(_objectSpread({}, state), {}, { + documents: _objectSpread(_objectSpread({}, state.documents), {}, (0, _defineProperty2.default)({}, document._type, _objectSpread(_objectSpread({}, state.documents[document._type]), {}, (0, _defineProperty2.default)({}, document._id, document)))) + }); + }); + } + }, { + key: "setState", + value: function setState(updaterFn) { + this.state = updaterFn(this.state); + } + }, { + key: "getState", + value: function getState() { + return this.state; + } + }]); + return StoreProxy; +}(); + +exports.StoreProxy = StoreProxy; +var initialState = { + documents: {}, + queries: {} +}; + +var combinedReducer = function combinedReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (action.type == RESET_ACTION_TYPE) { + return initialState; + } + + if (!(0, _queries.isQueryAction)(action) && !(0, _mutations.isMutationAction)(action)) { + return state; + } + + if (action.update) { + var proxy = new StoreProxy(state); + action.update(proxy, action.response); + return { + documents: proxy.getState().documents, + queries: (0, _queries.default)(proxy.getState().queries, action, proxy.getState().documents) + }; + } + + var nextDocuments = (0, _documents.default)(state.documents, action); + var haveDocumentsChanged = nextDocuments !== state.documents; + return { + documents: nextDocuments, + queries: (0, _queries.default)(state.queries, action, nextDocuments, haveDocumentsChanged) + }; +}; + +var _default = combinedReducer; +exports.default = _default; + +var composedEnhancer = // @ts-ignore '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__' doesn't exist 'Window & typeof globalThis'.ts(2339) +// should be (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ in ts file +// see https://github.com/reduxjs/redux-devtools/tree/main/extension#11-basic-store +(0, _cozyFlags.default)('debug') && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || _redux.compose; + +var createStore = function createStore() { + return (0, _redux.createStore)((0, _redux.combineReducers)({ + cozy: combinedReducer + }), composedEnhancer((0, _redux.applyMiddleware)(_reduxThunk.default))); +}; + +exports.createStore = createStore; + +var getStateRoot = function getStateRoot(state) { + return state.cozy || {}; +}; + +exports.getStateRoot = getStateRoot; + +var getCollectionFromState = function getCollectionFromState(state, doctype) { + return (0, _documents.getCollectionFromSlice)(getStateRoot(state).documents, doctype); +}; + +exports.getCollectionFromState = getCollectionFromState; + +var getDocumentFromState = function getDocumentFromState(state, doctype, id) { + return (0, _documents.getDocumentFromSlice)(getStateRoot(state).documents, doctype, id); +}; + +exports.getDocumentFromState = getDocumentFromState; + +var getQueryFromStore = function getQueryFromStore(store, queryId) { + return getQueryFromState(store.getState(), queryId); +}; + +exports.getQueryFromStore = getQueryFromStore; + +var getQueryFromState = function getQueryFromState(state, queryId) { + return (0, _queries.getQueryFromSlice)(getStateRoot(state).queries, queryId, getStateRoot(state).documents); +}; + +exports.getQueryFromState = getQueryFromState; + +var getRawQueryFromState = function getRawQueryFromState(state, queryId) { + return (0, _queries.getQueryFromSlice)(getStateRoot(state).queries, queryId); +}; + +exports.getRawQueryFromState = getRawQueryFromState; + +/***/ }), + +/***/ "6nuH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function() { return SDK_VERSION; }); +const SDK_VERSION = '7.21.1'; + + +//# sourceMappingURL=version.js.map + + +/***/ }), + +/***/ "6oIw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _I18n = __webpack_require__("nUfk"); +var _enums = __webpack_require__("j0hM"); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +__webpack_require__("m66x"); +/** + * Loader of Ecolyo, default color is gold + * @param color {'gold' | 'gaz' | 'elec' | 'water'} Default is gold + * @param text Optional, text to be placed under the loader + */ +var Loader = function Loader(_ref) { + var _ref$color = _ref.color, + color = _ref$color === void 0 ? 'gold' : _ref$color, + fluidType = _ref.fluidType, + text = _ref.text; + var _useI18n = (0, _I18n.useI18n)(), + t = _useI18n.t; + var variant = color; + switch (fluidType) { + case _enums.FluidType.ELECTRICITY: + variant = 'elec'; + break; + case _enums.FluidType.GAS: + variant = 'gaz'; + break; + case _enums.FluidType.WATER: + variant = 'water'; + break; + } + return /*#__PURE__*/_react.default.createElement("div", { + className: "loader ".concat(variant) + }, /*#__PURE__*/_react.default.createElement("div", { + className: "bars", + "aria-busy": "true", + role: "progressbar", + "aria-label": t('common.accessibility.loading'), + title: t('common.accessibility.loading') + }, /*#__PURE__*/_react.default.createElement("div", { + className: "bar" + }), /*#__PURE__*/_react.default.createElement("div", { + className: "bar" + }), /*#__PURE__*/_react.default.createElement("div", { + className: "bar" + })), text); +}; +var _default = Loader; +exports.default = _default; + +/***/ }), + +/***/ "6oOG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBarAPI", function() { return createBarAPI; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBarProxiedAPI", function() { return createBarProxiedAPI; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("gc+w"); +/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ZmJ+"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + // The React API need unique IDs, so we will increment this variable + +var idToIncrement = 0; +/** + * Wraps argument into a React element if it is a string. Is used + * for setBar{Left,Right,Center} to be able to pass HTML + * + * @param {ReactElement|string} v + * @return {ReactElement} + */ + +var wrapInElement = function wrapInElement(v) { + if (typeof v === 'string') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + dangerouslySetInnerHTML: { + __html: v + } + }); + } else { + return v; + } +}; +/** + * Creates a React component that enables to access store + * properties in a declarative way. + * + * @param {BarStore} store + */ + + +var barContentComponent = function barContentComponent(store, location) { + return /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(BarContent, _Component); + + var _super = _createSuper(BarContent); + + function BarContent() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, BarContent); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(BarContent, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.componentId = idToIncrement++; + this.setContent(this.props.children); + } + }, { + key: "setContent", + value: function setContent(content) { + try { + content = react__WEBPACK_IMPORTED_MODULE_5___default.a.Children.only(content); // eslint-disable-next-line no-empty + } catch (e) {} + + store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["setContent"])(location, content, this.componentId)); + } + }, { + key: "unsetContent", + value: function unsetContent() { + store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["unsetContent"])(location, this.componentId)); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.unsetContent(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.children !== prevProps.children) { + this.setContent(this.props.children); + } + } + }, { + key: "render", + value: function render() { + return null; + } + }]); + + return BarContent; + }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); +}; +/** + * Creates a public API + * + * - getters/setters for public attributes + * - React components that act as getters/setters + * + * @param {ReduxStore} store - Store on which the API will act + * @return {object} - Methods of the public API + */ + + +var createBarAPI = function createBarAPI(store) { + // setBar{Left,Right,Center} and <Bar{Left,Right,Center} /> + var methods = {}; + _helpers__WEBPACK_IMPORTED_MODULE_7__["locations"].forEach(function (location) { + // expose JS API + methods[Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getJsApiName"])(location)] = function (value) { + return store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["setContent"])(location, wrapInElement(value), 'js')); + }; // expose React API + + + methods[Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getReactApiName"])(location)] = barContentComponent(store, location); + }); + + methods.setLocale = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setLocale"].apply(void 0, arguments)); + }; + + methods.setTheme = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setTheme"].apply(void 0, arguments)); + }; + + methods.setWebviewContext = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setWebviewContext"].apply(void 0, arguments)); + }; + + return methods; +}; // Handle exceptions for API before init + +var showAPIError = function showAPIError(name) { + // eslint-disable-next-line no-console + console.error("You tried to use the CozyBar API (".concat(name, ") but the CozyBar is not initialised yet via cozy.bar.init(...).")); +}; + +var makeProxyMethodToAPI = function makeProxyMethodToAPI(exposedAPI, fnName) { + return function () { + if (exposedAPI[fnName]) { + return exposedAPI[fnName].apply(exposedAPI, arguments); + } else { + showAPIError(fnName); + } + }; +}; +/** Creates an API that swallows error until bar is correctly initialized */ + + +var createBarProxiedAPI = function createBarProxiedAPI(exposedAPI) { + var apiReferences = {}; + _helpers__WEBPACK_IMPORTED_MODULE_7__["locations"].forEach(function (location) { + var jsAPIName = Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getJsApiName"])(location); + var reactAPIName = Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getReactApiName"])(location); + apiReferences[jsAPIName] = makeProxyMethodToAPI(exposedAPI, jsAPIName); + + apiReferences[reactAPIName] = function (props) { + if (exposedAPI[reactAPIName]) { + return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(exposedAPI[reactAPIName], props); + } else { + showAPIError(reactAPIName); + } + }; + }); + + for (var _i = 0, _arr = ['setLocale', 'setTheme', 'setWebviewContext']; _i < _arr.length; _i++) { + var fnName = _arr[_i]; + apiReferences[fnName] = makeProxyMethodToAPI(exposedAPI, fnName); + } + + return apiReferences; +}; + +/***/ }), + +/***/ "6pUc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TextField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/nJ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TextField__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "6qXu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ES5Type = __webpack_require__("vYmo"); + +// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values + +module.exports = function Type(x) { + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; + } + return ES5Type(x); +}; + + +/***/ }), + +/***/ "6td7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/help.svg` to regenerate; + +function SvgHelp(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M8 16A8 8 0 118 0a8 8 0 010 16zm1-7.198C10.122 8.355 11 7.21 11 6c0-1.552-1.448-3-3-3S5 4.448 5 6h2c0-.448.552-1 1-1 .448 0 1 .552 1 1 0 .448-.552 1-1 1a1 1 0 00-1 1v2h2V8.802zM7 11v2h2v-2H7z" + })); +} +var _default = SvgHelp; +exports.default = _default; + +/***/ }), + +/***/ "6veJ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListSubheader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("WLJI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListSubheader__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "6vz+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutPropertiesLoose; }); +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +/***/ }), + +/***/ "6wVF": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GRDF_DAY_DOCTYPE = void 0; +var GRDF_DAY_DOCTYPE = 'com.grandlyon.grdf.day'; +exports.GRDF_DAY_DOCTYPE = GRDF_DAY_DOCTYPE; + +/***/ }), + +/***/ "6yJA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _cozy_minilog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("B4A6"); +/* harmony import */ var _cozy_minilog__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cozy_minilog__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("eA9r"); +/* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_set__WEBPACK_IMPORTED_MODULE_2__); + + + +lodash_set__WEBPACK_IMPORTED_MODULE_2___default()(window, "cozy.debug.flagship", function () { + return cozy_flags__WEBPACK_IMPORTED_MODULE_0___default()('flagship.debug', true); +}); +var minilog = window.minilog || _cozy_minilog__WEBPACK_IMPORTED_MODULE_1___default.a; +var logger = minilog('cozy-bar'); + +if (!cozy_flags__WEBPACK_IMPORTED_MODULE_0___default()('bar.debug')) { + minilog.suggest.deny('cozy-bar', 'info'); +} + +/* harmony default export */ __webpack_exports__["default"] = (logger); + +/***/ }), + +/***/ "7/5b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var shape = { + borderRadius: 4 +}; +/* harmony default export */ __webpack_exports__["default"] = (shape); + +/***/ }), + +/***/ "70hl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Nm31"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + listStyle: 'none', + margin: 0, + padding: 0, + position: 'relative' + }, + + /* Styles applied to the root element if `disablePadding={false}`. */ + padding: { + paddingTop: 8, + paddingBottom: 8 + }, + + /* Styles applied to the root element if dense. */ + dense: {}, + + /* Styles applied to the root element if a `subheader` is provided. */ + subheader: { + paddingTop: 0 + } +}; +var List = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function List(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'ul' : _props$component, + _props$dense = props.dense, + dense = _props$dense === void 0 ? false : _props$dense, + _props$disablePadding = props.disablePadding, + disablePadding = _props$disablePadding === void 0 ? false : _props$disablePadding, + subheader = props.subheader, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "component", "dense", "disablePadding", "subheader"]); + + var context = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { + return { + dense: dense + }; + }, [dense]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ListContext__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: context + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, dense && classes.dense, !disablePadding && classes.padding, subheader && classes.subheader), + ref: ref + }, other), subheader, children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiList' +})(List)); + +/***/ }), + +/***/ "71Jx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formControlState; }); +function formControlState(_ref) { + var props = _ref.props, + states = _ref.states, + muiFormControl = _ref.muiFormControl; + return states.reduce(function (acc, state) { + acc[state] = props[state]; + + if (muiFormControl) { + if (typeof props[state] === 'undefined') { + acc[state] = muiFormControl[state]; + } + } + + return acc; + }, {}); +} + +/***/ }), + +/***/ "73Z9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BulkEditError = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__("2y6E")); + +var _zipWith = _interopRequireDefault(__webpack_require__("59q6")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var BulkEditError = /*#__PURE__*/function (_Error) { + (0, _inherits2.default)(BulkEditError, _Error); + + var _super = _createSuper(BulkEditError); + + /** + * Indicates that a bulk edit has (potentially partially) failed + * + * @param {import("./types").CouchDBBulkResult[]} bulkResponse - CouchDB Bulk response + * @param {import("./types").CozyClientDocument[]} updatedDocs - Docs with updated _id and _rev + */ + function BulkEditError(bulkResponse, updatedDocs) { + var _this; + + (0, _classCallCheck2.default)(this, BulkEditError); + _this = _super.call(this, 'Error while bulk saving'); + _this.name = 'BulkEditError'; + _this.results = (0, _zipWith.default)(bulkResponse, updatedDocs, function (result, doc) { + return _objectSpread(_objectSpread({}, result), {}, { + doc: doc + }); + }); + return _this; + } + /** + * Get documents that have been correctly updated + * + * @returns {import("./types").CozyClientDocument[]} + */ + + + (0, _createClass2.default)(BulkEditError, [{ + key: "getUpdatedDocuments", + value: function getUpdatedDocuments() { + return this.results.filter(function (r) { + return r.ok; + }).map(function (r) { + return r.doc; + }); + } + /** + * Get bulk errors results + * + * @returns {Array<import("./types").CouchDBBulkResult & { doc: import("./types").CozyClientDocument }>} + */ + + }, { + key: "getErrors", + value: function getErrors() { + return this.results.filter(function (r) { + return !r.ok; + }); + } + }]); + return BulkEditError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +exports.BulkEditError = BulkEditError; + +/***/ }), + +/***/ "74/M": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _AppsContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("m1uh"); +/* harmony import */ var _AppNavButtons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("UnG5"); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + +var Apps = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Apps, _Component); + + var _super = _createSuper(Apps); + + function Apps(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Apps); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "onClickOutside", function (event) { + if (_this.state.opened) { + // if it's not a cozy-bar nav popup, close the opened popup + if (!_this.rootRef.contains(event.target) && !_this.modalContainer.contains(event.target)) { + _this.setState({ + opened: false + }); + + event.stopPropagation(); + } + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggleMenu", function () { + _this.setState({ + opened: !_this.state.opened + }); + }); + + _this.state = { + opened: false + }; + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Apps, [{ + key: "componentDidMount", + value: function componentDidMount() { + document.body.addEventListener('click', this.onClickOutside); + this.modalContainer = document.getElementById('cozy-bar-modal-dom-place'); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + document.body.removeEventListener('click', this.onClickOutside); + } + }, { + key: "render", + // data-tutorial attribute allows to be targeted in an application tutorial + value: function render() { + var _this2 = this; + + var _this$props = this.props, + appName = _this$props.appName, + appNamePrefix = _this$props.appNamePrefix, + appSlug = _this$props.appSlug, + iconPath = _this$props.iconPath, + isPublic = _this$props.isPublic, + isInvertedTheme = _this$props.isInvertedTheme; + var opened = this.state.opened; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("nav", { + className: "coz-nav coz-nav-apps", + ref: function ref(_ref) { + _this2.rootRef = _ref; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_AppNavButtons__WEBPACK_IMPORTED_MODULE_10__["default"], { + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + iconPath: iconPath, + handleClick: this.toggleMenu, + opened: opened, + isPublic: isPublic, + isInvertedTheme: isInvertedTheme + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav-pop coz-nav-pop--apps", + id: "coz-nav-pop--apps", + "aria-hidden": !opened + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_AppsContent__WEBPACK_IMPORTED_MODULE_9__["default"], { + isInvertedTheme: isInvertedTheme + }))); + } + }]); + + return Apps; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +Apps.propTypes = { + appName: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (Apps); + +/***/ }), + +/***/ "74bI": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("06hQ"); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; + + +/***/ }), + +/***/ "764U": +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__("pTfQ"); +var defined = __webpack_require__("etLA"); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), + +/***/ "79eC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("csMb"); +/* harmony import */ var _Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fIGU"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("UPk3"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("V6W0"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("kjpz"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("xOGQ"); +/* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("M3Gw"); +/* harmony import */ var _SwipeArea__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("xf3R"); + + + + + + + + + + + + + + + // This value is closed to what browsers are using internally to +// trigger a native scroll. + +var UNCERTAINTY_THRESHOLD = 3; // px +// We can only have one node at the time claiming ownership for handling the swipe. +// Otherwise, the UX would be confusing. +// That's why we use a singleton here. + +var nodeThatClaimedTheSwipe = null; // Exported for test purposes. + +function reset() { + nodeThatClaimedTheSwipe = null; +} + +function calculateCurrentX(anchor, touches) { + return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX; +} + +function calculateCurrentY(anchor, touches) { + return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY; +} + +function getMaxTranslate(horizontalSwipe, paperInstance) { + return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight; +} + +function getTranslate(currentTranslate, startLocation, open, maxTranslate) { + return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate); +} + +function getDomTreeShapes(element, rootNode) { + // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129 + var domTreeShapes = []; + + while (element && element !== rootNode) { + var style = window.getComputedStyle(element); + + if ( // Ignore the scroll children if the element is absolute positioned. + style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden + style.getPropertyValue('overflow-x') === 'hidden') { + domTreeShapes = []; + } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) { + // Ignore the nodes that have no width. + // Keep elements with a scroll + domTreeShapes.push(element); + } + + element = element.parentElement; + } + + return domTreeShapes; +} + +function findNativeHandler(_ref) { + var domTreeShapes = _ref.domTreeShapes, + start = _ref.start, + current = _ref.current, + anchor = _ref.anchor; + // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175 + var axisProperties = { + scrollPosition: { + x: 'scrollLeft', + y: 'scrollTop' + }, + scrollLength: { + x: 'scrollWidth', + y: 'scrollHeight' + }, + clientLength: { + x: 'clientWidth', + y: 'clientHeight' + } + }; + return domTreeShapes.some(function (shape) { + // Determine if we are going backward or forward. + var goingForward = current >= start; + + if (anchor === 'top' || anchor === 'left') { + goingForward = !goingForward; + } + + var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y'; + var scrollPosition = shape[axisProperties.scrollPosition[axis]]; + var areNotAtStart = scrollPosition > 0; + var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]]; + + if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) { + return shape; + } + + return null; + }); +} + +var iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent); +var transitionDurationDefault = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__["duration"].leavingScreen +}; +var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useEffect"]; +var SwipeableDrawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function SwipeableDrawer(inProps, ref) { + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_11__["default"])(); + var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_6__["getThemeProps"])({ + name: 'MuiSwipeableDrawer', + props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, inProps), + theme: theme + }); + var _props$anchor = props.anchor, + anchor = _props$anchor === void 0 ? 'left' : _props$anchor, + _props$disableBackdro = props.disableBackdropTransition, + disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro, + _props$disableDiscove = props.disableDiscovery, + disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove, + _props$disableSwipeTo = props.disableSwipeToOpen, + disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo, + hideBackdrop = props.hideBackdrop, + _props$hysteresis = props.hysteresis, + hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis, + _props$minFlingVeloci = props.minFlingVelocity, + minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci, + _props$ModalProps = props.ModalProps; + _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps; + + var BackdropProps = _props$ModalProps.BackdropProps, + ModalPropsProp = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(_props$ModalProps, ["BackdropProps"]), + onClose = props.onClose, + onOpen = props.onOpen, + open = props.open, + _props$PaperProps = props.PaperProps, + PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps, + SwipeAreaProps = props.SwipeAreaProps, + _props$swipeAreaWidth = props.swipeAreaWidth, + swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth, + _props$transitionDura = props.transitionDuration, + transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'temporary' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + maybeSwiping = _React$useState[0], + setMaybeSwiping = _React$useState[1]; + + var swipeInstance = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({ + isSwiping: null + }); + var swipeAreaRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + var backdropRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + var paperRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + var touchDetected = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](false); // Ref for transition duration based on / to match swipe speed + + var calculatedDurationRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); // Use a ref so the open value used is always up to date inside useCallback. + + useEnhancedEffect(function () { + calculatedDurationRef.current = null; + }, [open]); + var setPosition = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (translate) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$mode = options.mode, + mode = _options$mode === void 0 ? null : _options$mode, + _options$changeTransi = options.changeTransition, + changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi; + var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["getAnchor"])(theme, anchor); + var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1; + var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["isHorizontal"])(anchor); + var transform = horizontalSwipe ? "translate(".concat(rtlTranslateMultiplier * translate, "px, 0)") : "translate(0, ".concat(rtlTranslateMultiplier * translate, "px)"); + var drawerStyle = paperRef.current.style; + drawerStyle.webkitTransform = transform; + drawerStyle.transform = transform; + var transition = ''; + + if (mode) { + transition = theme.transitions.create('all', Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_12__["getTransitionProps"])({ + timeout: transitionDuration + }, { + mode: mode + })); + } + + if (changeTransition) { + drawerStyle.webkitTransition = transition; + drawerStyle.transition = transition; + } + + if (!disableBackdropTransition && !hideBackdrop) { + var backdropStyle = backdropRef.current.style; + backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current); + + if (changeTransition) { + backdropStyle.webkitTransition = transition; + backdropStyle.transition = transition; + } + } + }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]); + var handleBodyTouchEnd = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__["default"])(function (event) { + if (!touchDetected.current) { + return; + } + + nodeThatClaimedTheSwipe = null; + touchDetected.current = false; + setMaybeSwiping(false); // The swipe wasn't started. + + if (!swipeInstance.current.isSwiping) { + swipeInstance.current.isSwiping = null; + return; + } + + swipeInstance.current.isSwiping = null; + var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["getAnchor"])(theme, anchor); + var horizontal = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["isHorizontal"])(anchor); + var current; + + if (horizontal) { + current = calculateCurrentX(anchorRtl, event.changedTouches); + } else { + current = calculateCurrentY(anchorRtl, event.changedTouches); + } + + var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY; + var maxTranslate = getMaxTranslate(horizontal, paperRef.current); + var currentTranslate = getTranslate(current, startLocation, open, maxTranslate); + var translateRatio = currentTranslate / maxTranslate; + + if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) { + // Calculate transition duration to match swipe speed + calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000; + } + + if (open) { + if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) { + onClose(); + } else { + // Reset the position, the swipe was aborted. + setPosition(0, { + mode: 'exit' + }); + } + + return; + } + + if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) { + onOpen(); + } else { + // Reset the position, the swipe was aborted. + setPosition(getMaxTranslate(horizontal, paperRef.current), { + mode: 'enter' + }); + } + }); + var handleBodyTouchMove = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__["default"])(function (event) { + // the ref may be null when a parent component updates while swiping + if (!paperRef.current || !touchDetected.current) { + return; + } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer + + + if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) { + return; + } + + var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["getAnchor"])(theme, anchor); + var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["isHorizontal"])(anchor); + var currentX = calculateCurrentX(anchorRtl, event.touches); + var currentY = calculateCurrentY(anchorRtl, event.touches); + + if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) { + var domTreeShapes = getDomTreeShapes(event.target, paperRef.current); + var nativeHandler = findNativeHandler({ + domTreeShapes: domTreeShapes, + start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY, + current: horizontalSwipe ? currentX : currentY, + anchor: anchor + }); + + if (nativeHandler) { + nodeThatClaimedTheSwipe = nativeHandler; + return; + } + + nodeThatClaimedTheSwipe = swipeInstance.current; + } // We don't know yet. + + + if (swipeInstance.current.isSwiping == null) { + var dx = Math.abs(currentX - swipeInstance.current.startX); + var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS. + + if (dx > dy) { + if (event.cancelable) { + event.preventDefault(); + } + } + + var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD; + + if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) { + swipeInstance.current.isSwiping = definitelySwiping; + + if (!definitelySwiping) { + handleBodyTouchEnd(event); + return; + } // Shift the starting point. + + + swipeInstance.current.startX = currentX; + swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start. + + if (!disableDiscovery && !open) { + if (horizontalSwipe) { + swipeInstance.current.startX -= swipeAreaWidth; + } else { + swipeInstance.current.startY -= swipeAreaWidth; + } + } + } + } + + if (!swipeInstance.current.isSwiping) { + return; + } + + var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current); + var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY; + + if (open && !swipeInstance.current.paperHit) { + startLocation = Math.min(startLocation, maxTranslate); + } + + var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate); + + if (open) { + if (!swipeInstance.current.paperHit) { + var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate; + + if (paperHit) { + swipeInstance.current.paperHit = true; + swipeInstance.current.startX = currentX; + swipeInstance.current.startY = currentY; + } else { + return; + } + } else if (translate === 0) { + swipeInstance.current.startX = currentX; + swipeInstance.current.startY = currentY; + } + } + + if (swipeInstance.current.lastTranslate === null) { + swipeInstance.current.lastTranslate = translate; + swipeInstance.current.lastTime = performance.now() + 1; + } + + var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter. + + swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6; + swipeInstance.current.lastTranslate = translate; + swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS. + + if (event.cancelable) { + event.preventDefault(); + } + + setPosition(translate); + }); + var handleBodyTouchStart = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__["default"])(function (event) { + // We are not supposed to handle this touch move. + // Example of use case: ignore the event if there is a Slider. + if (event.defaultPrevented) { + return; + } // We can only have one node at the time claiming ownership for handling the swipe. + + + if (event.muiHandled) { + return; + } // At least one element clogs the drawer interaction zone. + + + if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) { + return; + } + + var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["getAnchor"])(theme, anchor); + var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["isHorizontal"])(anchor); + var currentX = calculateCurrentX(anchorRtl, event.touches); + var currentY = calculateCurrentY(anchorRtl, event.touches); + + if (!open) { + if (disableSwipeToOpen || event.target !== swipeAreaRef.current) { + return; + } + + if (horizontalSwipe) { + if (currentX > swipeAreaWidth) { + return; + } + } else if (currentY > swipeAreaWidth) { + return; + } + } + + event.muiHandled = true; + nodeThatClaimedTheSwipe = null; + swipeInstance.current.startX = currentX; + swipeInstance.current.startY = currentY; + setMaybeSwiping(true); + + if (!open && paperRef.current) { + // The ref may be null when a parent component updates while swiping. + setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), { + changeTransition: false + }); + } + + swipeInstance.current.velocity = 0; + swipeInstance.current.lastTime = null; + swipeInstance.current.lastTranslate = null; + swipeInstance.current.paperHit = false; + touchDetected.current = true; + }); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (variant === 'temporary') { + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__["default"])(paperRef.current); + doc.addEventListener('touchstart', handleBodyTouchStart); + doc.addEventListener('touchmove', handleBodyTouchMove, { + passive: false + }); + doc.addEventListener('touchend', handleBodyTouchEnd); + return function () { + doc.removeEventListener('touchstart', handleBodyTouchStart); + doc.removeEventListener('touchmove', handleBodyTouchMove, { + passive: false + }); + doc.removeEventListener('touchend', handleBodyTouchEnd); + }; + } + + return undefined; + }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + return function () { + // We need to release the lock. + if (nodeThatClaimedTheSwipe === swipeInstance.current) { + nodeThatClaimedTheSwipe = null; + } + }; + }, []); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (!open) { + setMaybeSwiping(false); + } + }, [open]); + var handleBackdropRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (instance) { + // #StrictMode ready + backdropRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__["findDOMNode"](instance); + }, []); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + open: variant === 'temporary' && maybeSwiping ? true : open, + variant: variant, + ModalProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, BackdropProps, { + ref: handleBackdropRef + }) + }, ModalPropsProp), + PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, PaperProps, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + pointerEvents: variant === 'temporary' && !open ? 'none' : '' + }, PaperProps.style), + ref: paperRef + }), + anchor: anchor, + transitionDuration: calculatedDurationRef.current || transitionDuration, + onClose: onClose, + ref: ref + }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_NoSsr__WEBPACK_IMPORTED_MODULE_13__["default"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_SwipeArea__WEBPACK_IMPORTED_MODULE_14__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + anchor: anchor, + ref: swipeAreaRef, + width: swipeAreaWidth + }, SwipeAreaProps)))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (SwipeableDrawer); + +/***/ }), + +/***/ "7B3A": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("vFJ3"); +/* harmony import */ var _internal_svg_icons_CheckCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("p0HI"); +/* harmony import */ var _internal_svg_icons_Warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("/TyW"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ZbWQ"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'block', + color: theme.palette.text.disabled, + '&$completed': { + color: theme.palette.primary.main + }, + '&$active': { + color: theme.palette.primary.main + }, + '&$error': { + color: theme.palette.error.main + } + }, + + /* Styles applied to the SVG text element. */ + text: { + fill: theme.palette.primary.contrastText, + fontSize: theme.typography.caption.fontSize, + fontFamily: theme.typography.fontFamily + }, + + /* Pseudo-class applied to the root element if `active={true}`. */ + active: {}, + + /* Pseudo-class applied to the root element if `completed={true}`. */ + completed: {}, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {} + }; +}; + +var _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("circle", { + cx: "12", + cy: "12", + r: "12" +}); + +var StepIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"](function StepIcon(props, ref) { + var _props$completed = props.completed, + completed = _props$completed === void 0 ? false : _props$completed, + icon = props.icon, + _props$active = props.active, + active = _props$active === void 0 ? false : _props$active, + _props$error = props.error, + error = _props$error === void 0 ? false : _props$error, + classes = props.classes; + + if (typeof icon === 'number' || typeof icon === 'string') { + var className = Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.root, active && classes.active, error && classes.error, completed && classes.completed); + + if (error) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_svg_icons_Warning__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: className, + ref: ref + }); + } + + if (completed) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_internal_svg_icons_CheckCircle__WEBPACK_IMPORTED_MODULE_3__["default"], { + className: className, + ref: ref + }); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_SvgIcon__WEBPACK_IMPORTED_MODULE_6__["default"], { + className: className, + ref: ref + }, _ref, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("text", { + className: classes.text, + x: "12", + y: "16", + textAnchor: "middle" + }, icon)); + } + + return icon; +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiStepIcon' +})(StepIcon)); + +/***/ }), + +/***/ "7BbM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _toArray2 = _interopRequireDefault(__webpack_require__("X8hs")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _mapValues = _interopRequireDefault(__webpack_require__("7FTH")); + +var _fromPairs = _interopRequireDefault(__webpack_require__("C+aL")); + +var _flatten = _interopRequireDefault(__webpack_require__("Jy5R")); + +var _uniqBy = _interopRequireDefault(__webpack_require__("93hV")); + +var _zip = _interopRequireDefault(__webpack_require__("aG6e")); + +var _forEach = _interopRequireDefault(__webpack_require__("PPrd")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _microee = _interopRequireDefault(__webpack_require__("GIvT")); + +var _cozyStackClient = _interopRequireWildcard(__webpack_require__("yg5R")); + +var _const = __webpack_require__("P3Kl"); + +var _StackLink = _interopRequireDefault(__webpack_require__("lpkQ")); + +var _associations = __webpack_require__("Suxc"); + +var _helpers = __webpack_require__("0Do6"); + +var _helpers2 = __webpack_require__("Eg6m"); + +var _dsl = __webpack_require__("v2kV"); + +var _mobile = __webpack_require__("VNZK"); + +var _optimize = _interopRequireDefault(__webpack_require__("tXsl")); + +var _store = _interopRequireWildcard(__webpack_require__("6mdx")); + +var _policies = _interopRequireDefault(__webpack_require__("lRSd")); + +var _Schema = _interopRequireDefault(__webpack_require__("wo9o")); + +var _CozyLink = __webpack_require__("sV2q"); + +var _ObservableQuery = _interopRequireDefault(__webpack_require__("TGEi")); + +var _snapshots = __webpack_require__("f6/b"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +var _queries = __webpack_require__("8K8d"); + +var _jsonStableStringify = _interopRequireDefault(__webpack_require__("Kju7")); + +var _promiseCache = _interopRequireDefault(__webpack_require__("z0CH")); + +var _flagshipCertification = __webpack_require__("hscW"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +var ensureArray = function ensureArray(arr) { + return Array.isArray(arr) ? arr : [arr]; +}; + +var deprecatedHandler = function deprecatedHandler(msg) { + return { + get: function get(target, prop) { + _logger.default.warn(msg); + + return target[prop]; + } + }; +}; + +var supportsReferences = function supportsReferences(relationshipClass) { + return relationshipClass.prototype.addReferences && relationshipClass.prototype.removeReferences; +}; + +var referencesUnsupportedError = function referencesUnsupportedError(relationshipClassName) { + return new Error("The \"".concat(relationshipClassName, "\" relationship does not support references. If you need to add references to a document, its relationship class must have the methods {add,remove}References")); +}; + +var securiseUri = function securiseUri(uri) { + var _window$cozy; + + if (uri && typeof window !== 'undefined' && (_window$cozy = window['cozy']) !== null && _window$cozy !== void 0 && _window$cozy.isSecureProtocol) { + var secureUrl = new URL(uri); + secureUrl.protocol = 'https:'; + return secureUrl.toString(); + } + + return uri; +}; + +var DOC_CREATION = 'creation'; +var DOC_UPDATE = 'update'; +/** + * @typedef {object} ClientOptions + * @property {object} [client] + * @property {object} [link] + * @property {object} [links] + * @property {import("./types").Token} [token] + * @property {string} [uri] + * @property {object} [stackClient] + * @property {boolean} [warningForCustomHandlers] + * @property {boolean} [autoHydrate] + * @property {boolean} [backgroundFetching] - If set to true, backgroundFetching will be enabled by default on every query. Meaning that, when the fetchStatus has already been loaded, it won't be updated during future fetches. Instead, a `isFetching` attribute will be used to indicate when background fetching is started. + * @property {object} [oauth] + * @property {Function} [onTokenRefresh] + * @property {Function} [onError] - Default callback if a query is errored + * @property {import("./types").Link} [link] - Backward compatibility + * @property {Array<import("./types").Link>} [links] - List of links + * @property {object} [schema] - Schema description for each doctypes + * @property {import("./types").AppMetadata} [appMetadata] - Metadata about the application that will be used in ensureCozyMetadata + * @property {import("./types").ClientCapabilities} [capabilities] - Capabilities sent by the stack + * @property {boolean} [store] - If set to false, the client will not instantiate a Redux store automatically. Use this if you want to merge cozy-client's store with your own redux store. See [here](https://docs.cozy.io/en/cozy-client/react-integration/#1b-use-your-own-redux-store) for more information. + */ + +/** + * Responsible for + * + * - Creating observable queries + * - Hydration + * - Creating plan for saving documents + * - Associations + */ + +var CozyClient = /*#__PURE__*/function () { + /** + * @param {ClientOptions} rawOptions - Options + * + * @example + * ```js + * const client = new CozyClient({ + * schema: { + * todos: { + * doctype: 'io.cozy.todos', + * relationships: { + * authors: { + * type: 'has-many', + * doctype: 'io.cozy.persons' + * } + * } + * } + * } + * }) + * ``` + * + * Cozy-Client will automatically call `this.login()` if provided with a token and an uri + */ + function CozyClient() { + var _this = this; + + var rawOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (0, _classCallCheck2.default)(this, CozyClient); + (0, _defineProperty2.default)(this, "fetchQueryAndGetFromState", /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { + var definition, options; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + definition = _ref.definition, options = _ref.options; + _context.prev = 1; + _context.next = 4; + return _this.query(definition, options); + + case 4: + return _context.abrupt("return", _this.getQueryFromState(options.as, options)); + + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](1); + throw _context.t0; + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 7]]); + })); + + return function (_x) { + return _ref2.apply(this, arguments); + }; + }()); + + var link = rawOptions.link, + links = rawOptions.links, + _rawOptions$schema = rawOptions.schema, + schema = _rawOptions$schema === void 0 ? {} : _rawOptions$schema, + _rawOptions$appMetada = rawOptions.appMetadata, + appMetadata = _rawOptions$appMetada === void 0 ? {} : _rawOptions$appMetada, + capabilities = rawOptions.capabilities, + _options = (0, _objectWithoutProperties2.default)(rawOptions, ["link", "links", "schema", "appMetadata", "capabilities"]); + + if (link) { + _logger.default.warn('`link` is deprecated, use `links`'); + } + + this.appMetadata = appMetadata; + this.loginPromise = null; + _options.uri = securiseUri(_options.uri); + this.options = _options; + this.queryIdGenerator = new _queries.QueryIDGenerator(); + this.isLogged = false; + this.instanceOptions = {}; // Bind handlers + + this.handleRevocationChange = this.handleRevocationChange.bind(this); + this.handleTokenRefresh = this.handleTokenRefresh.bind(this); + this.createClient(); + var stackClient = this.getStackClient(); + stackClient.on('error', function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _this.emit.apply(_this, ['error'].concat(args)); + }); + this.links = ensureArray(link || links || new _StackLink.default()); + this.registerClientOnLinks(); + this.chain = (0, _CozyLink.chain)(this.links); + this.schema = new _Schema.default(schema, stackClient); + /** + * @type {import("./types").ClientCapabilities} + */ + + this.capabilities = capabilities || null; // Instances of plugins registered with registerPlugin + + this.plugins = {}; + + if (!(this.stackClient instanceof _cozyStackClient.OAuthClient)) { + try { + this.loadInstanceOptionsFromDOM(); + } catch (err) {// not a critical error, we may be in node or the instance options are not on the default HTML element + } + } + /** + * Holds in-flight promises for deduplication purpose + * + * @private + * @type {PromiseCache} + */ + + + this._promiseCache = new _promiseCache.default(); + + if (_options.uri && _options.token) { + this.login(); + } + /** + * @type {object} + */ + + + this.storeAccesors = null; + + if (_options.store !== false) { + this.ensureStore(); + } + } + /** + * Gets overrided by MicroEE.mixin + * This is here just so typescript does not scream + * + * TODO Find a better way to make TS understand that emit is + * a method from cozy-client + */ + + + (0, _createClass2.default)(CozyClient, [{ + key: "emit", + value: function emit() {} + }, { + key: "on", + value: function on() {} + }, { + key: "removeListener", + value: function removeListener() {} + /** + * A plugin is a class whose constructor receives the client as first argument. + * The main mean of interaction with the client should be with events + * like "login"/"logout". + * + * The plugin system is meant to encourage separation of concerns, modularity + * and testability : instead of registering events at module level, please + * create a plugin that subscribes to events. + * + * Plugin instances are stored internally in the `plugins` attribute of the client + * and can be accessed via this mean. A plugin class must have the attribute + * `pluginName` that will be use as the key in the `plugins` object. + * + * Two plugins with the same `pluginName` cannot co-exist. + * + * @example + * ```js + * class AlertPlugin { + * constructor(client, options) { + * this.client = client + * this.options = options + * this.handleLogin = this.handleLogin.bind(this) + * this.handleLogout = this.handleLogout.bind(this) + * this.client.on("login", this.handleLogin) + * this.client.on("logout", this.handleLogout) + * } + * + * handleLogin() { + * alert(this.options.onLoginAlert) + * } + * + * handleLogout() { + * alert(this.options.onLogoutAlert) + * } + * } + * + * AlertPlugin.pluginName = 'alerts' + * + * client.registerPlugin(AlertPlugin, { + * onLoginAlert: 'client has logged in !', + * onLogoutAlert: 'client has logged out !' + * }) + * + * // the instance of the plugin is accessible via + * client.plugins.alerts + * ``` + */ + + }, { + key: "registerPlugin", + value: function registerPlugin(Plugin, options) { + if (!Plugin.pluginName) { + throw new Error('Cannot register a plugin whose class does not have `pluginName` attribute.'); + } + + if (this.plugins[Plugin.pluginName]) { + throw new Error("Cannot register plugin ".concat(Plugin.pluginName, ". A plugin with the same name has already been registered.")); + } + + var instance = new Plugin(this, options); + this.plugins[Plugin.pluginName] = instance; + return instance; + } + /** + * To help with the transition from cozy-client-js to cozy-client, it is possible to instantiate + * a client with a cookie-based instance of cozy-client-js. + * + * @param {import("./types").OldCozyClient} oldClient - An instance of the deprecated cozy-client + * @param {object} options - CozyStackClient options + * @returns {CozyClient} + */ + + }, { + key: "addSchema", + value: function addSchema(schemaDefinition) { + this.schema.add(schemaDefinition); + } + }, { + key: "registerClientOnLinks", + value: function registerClientOnLinks() { + var _iterator = _createForOfIteratorHelper(this.links), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var link = _step.value; + + if (link.registerClient) { + try { + link.registerClient(this); + } catch (e) { + _logger.default.warn(e); + } + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + /** + * Notify the links that they can start and set isLogged to true. + * + * On mobile, where url/token are set after instantiation, use this method + * to set the token and uri via options. + * + * Emits + * + * - "beforeLogin" at the beginning, before links have been set up + * - "login" when the client is fully logged in and links have been set up + * + * @param {object} [options] - Options + * @param {string} options.token - If passed, the token is set on the client + * @param {string} options.uri - If passed, the uri is set on the client + * @returns {Promise} - Resolves when all links have been setup and client is fully logged in + * + */ + + }, { + key: "login", + value: function login(options) { + // Keep the promise to be able to return it in future calls. + // This allows us to autoLogin in constructor without breaking any compatibility + // with codes that uses an explicit login. + if (this.isLogged && !this.isRevoked) { + _logger.default.warn("CozyClient is already logged."); + + return this.loginPromise; + } + + return this.loginPromise = this._login(options); + } + }, { + key: "_login", + value: function () { + var _login2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) { + var _iterator2, _step2, link; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.emit('beforeLogin'); + this.registerClientOnLinks(); + + if (options) { + if (options.uri) { + this.stackClient.setUri(options.uri); + } + + if (options.token) { + this.stackClient.setToken(options.token); + } + } + + _iterator2 = _createForOfIteratorHelper(this.links); + _context2.prev = 4; + + _iterator2.s(); + + case 6: + if ((_step2 = _iterator2.n()).done) { + _context2.next = 13; + break; + } + + link = _step2.value; + + if (!link.onLogin) { + _context2.next = 11; + break; + } + + _context2.next = 11; + return link.onLogin(); + + case 11: + _context2.next = 6; + break; + + case 13: + _context2.next = 18; + break; + + case 15: + _context2.prev = 15; + _context2.t0 = _context2["catch"](4); + + _iterator2.e(_context2.t0); + + case 18: + _context2.prev = 18; + + _iterator2.f(); + + return _context2.finish(18); + + case 21: + this.isLogged = true; + this.isRevoked = false; + + if (!(this.stackClient instanceof _cozyStackClient.OAuthClient)) { + _context2.next = 26; + break; + } + + _context2.next = 26; + return this.loadInstanceOptionsFromStack(); + + case 26: + this.emit('login'); + + case 27: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[4, 15, 18, 21]]); + })); + + function _login(_x2) { + return _login2.apply(this, arguments); + } + + return _login; + }() + /** + * Logs out the client and reset all the links + * + * Emits + * + * - "beforeLogout" at the beginning, before links have been reset + * - "logout" when the client is fully logged out and links have been reset + * + * @returns {Promise} - Resolves when all links have been reset and client is fully logged out + */ + + }, { + key: "logout", + value: function () { + var _logout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { + var _iterator3, _step3, link; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (this.isLogged) { + _context3.next = 3; + break; + } + + _logger.default.warn("CozyClient isn't logged."); + + return _context3.abrupt("return"); + + case 3: + this.emit('beforeLogout'); + this.isLogged = false; + + if (!(this.stackClient instanceof _cozyStackClient.OAuthClient)) { + _context3.next = 17; + break; + } + + _context3.prev = 6; + + if (!(this.stackClient.unregister && (!this.stackClient.isRegistered || this.stackClient.isRegistered()))) { + _context3.next = 10; + break; + } + + _context3.next = 10; + return this.stackClient.unregister(); + + case 10: + _context3.next = 15; + break; + + case 12: + _context3.prev = 12; + _context3.t0 = _context3["catch"](6); + + _logger.default.warn("Impossible to unregister client on stack: ".concat(_context3.t0)); + + case 15: + _context3.next = 25; + break; + + case 17: + _context3.prev = 17; + _context3.next = 20; + return this.stackClient.fetch('DELETE', '/auth/login'); + + case 20: + _context3.next = 25; + break; + + case 22: + _context3.prev = 22; + _context3.t1 = _context3["catch"](17); + + _logger.default.warn("Impossible to log out: ".concat(_context3.t1)); + + case 25: + // clean information on links + _iterator3 = _createForOfIteratorHelper(this.links); + _context3.prev = 26; + + _iterator3.s(); + + case 28: + if ((_step3 = _iterator3.n()).done) { + _context3.next = 41; + break; + } + + link = _step3.value; + + if (!link.reset) { + _context3.next = 39; + break; + } + + _context3.prev = 31; + _context3.next = 34; + return link.reset(); + + case 34: + _context3.next = 39; + break; + + case 36: + _context3.prev = 36; + _context3.t2 = _context3["catch"](31); + + _logger.default.warn(_context3.t2); + + case 39: + _context3.next = 28; + break; + + case 41: + _context3.next = 46; + break; + + case 43: + _context3.prev = 43; + _context3.t3 = _context3["catch"](26); + + _iterator3.e(_context3.t3); + + case 46: + _context3.prev = 46; + + _iterator3.f(); + + return _context3.finish(46); + + case 49: + if (this.store) { + this.dispatch((0, _store.resetState)()); + } + + this.emit('logout'); + + case 51: + case "end": + return _context3.stop(); + } + } + }, _callee3, this, [[6, 12], [17, 22], [26, 43, 46, 49], [31, 36]]); + })); + + function logout() { + return _logout.apply(this, arguments); + } + + return logout; + }() + /** + * Forwards to a stack client instance and returns + * a [DocumentCollection]{@link https://docs.cozy.io/en/cozy-client/api/cozy-stack-client/#DocumentCollection} instance. + * + * @param {string} doctype The collection doctype. + * @returns {import("./types").DocumentCollection} Collection corresponding to the doctype + */ + + }, { + key: "collection", + value: function collection(doctype) { + return this.getStackClient().collection(doctype); + } + }, { + key: "fetch", + value: function fetch(method, path, body) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + return this.getStackClient().fetch(method, path, body, options); + } + }, { + key: "all", + value: function all(doctype) { + _logger.default.warn("\nclient.all is deprecated, prefer to use the Q helper to build a new QueryDefinition.\n\nimport { Q } from 'cozy-client'\nclient.query(Q('io.cozy.bills'))"); + + return (0, _dsl.Q)(doctype); + } + }, { + key: "find", + value: function find(doctype) { + var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + _logger.default.warn('client.find(doctype, selector) is deprecated, please use Q(doctype).where(selector) to build the same query.'); + + return new _dsl.QueryDefinition({ + doctype: doctype, + selector: selector + }); + } + }, { + key: "get", + value: function get(doctype, id) { + _logger.default.warn("client.get(".concat(doctype, ", id) is deprecated, please use Q(").concat(doctype, ").getById(id) to build the same query.")); + + return new _dsl.QueryDefinition({ + doctype: doctype, + id: id + }); + } + /** + * Creates a document and saves it on the server + * + * @param {string} type - Doctype of the document + * @param {object} doc - Document to save + * @param {import("./types").ReferenceMap} [references] - References are a special kind of relationship + * that is not stored inside the referencer document, they are used for example between a photo + * and its album. You should not need to use it normally. + * @param {object} options - Mutation options + * + * @example + * ```js + * await client.create('io.cozy.todos', { + * label: 'My todo', + * relationships: { + * authors: { + * data: [{_id: 1, _type: 'io.cozy.persons'}] + * } + * } + * }) + * ``` + * + * @returns {Promise} + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(type, doc, references) { + var options, + _type, + attributes, + normalizedDoc, + ret, + _args4 = arguments; + + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + options = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : {}; + _type = doc._type, attributes = (0, _objectWithoutProperties2.default)(doc, ["_type"]); + normalizedDoc = _objectSpread({ + _type: type + }, attributes); + _context4.next = 5; + return this.schema.validate(normalizedDoc); + + case 5: + ret = _context4.sent; + + if (!(ret !== true)) { + _context4.next = 8; + break; + } + + throw new Error('Validation failed'); + + case 8: + return _context4.abrupt("return", this.mutate(this.getDocumentSavePlan(normalizedDoc, references), options)); + + case 9: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function create(_x3, _x4, _x5) { + return _create.apply(this, arguments); + } + + return create; + }() + }, { + key: "validate", + value: function validate(document) { + return this.schema.validate(document); + } + /** + * Create or update a document on the server + * + * @param {object} doc - Document to save + * @param {object} mutationOptions - Mutation options + * @returns {Promise} + */ + + }, { + key: "save", + value: function () { + var _save = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(doc) { + var mutationOptions, + _type, + attributes, + normalizedDoc, + ret, + _args5 = arguments; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + mutationOptions = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; + _type = doc._type, attributes = (0, _objectWithoutProperties2.default)(doc, ["_type"]); + + if (_type) { + _context5.next = 4; + break; + } + + throw new Error('The document must have a `_type` property'); + + case 4: + normalizedDoc = _objectSpread({ + _type: _type + }, attributes); + _context5.next = 7; + return this.schema.validate(normalizedDoc); + + case 7: + ret = _context5.sent; + + if (!(ret !== true)) { + _context5.next = 10; + break; + } + + throw new Error('Validation failed'); + + case 10: + return _context5.abrupt("return", this.mutate(this.getDocumentSavePlan(normalizedDoc), mutationOptions)); + + case 11: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function save(_x6) { + return _save.apply(this, arguments); + } + + return save; + }() + /** + * Saves multiple documents in one batch + * - Can only be called with documents from the same doctype + * - Does not support automatic creation of references + * + * @param {import("./types").CozyClientDocument[]} docs - Documents from the same doctype + * @param {Object} mutationOptions - Mutation Options + * @param {string} [mutationOptions.as] - Mutation id + * @param {Function} [mutationOptions.update] - Function to update the document + * @param {Function} [mutationOptions.updateQueries] - Function to update queries + * @returns {Promise<void>} + */ + + }, { + key: "saveAll", + value: function () { + var _saveAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(docs) { + var _this2 = this; + + var mutationOptions, + doctypes, + validations, + errors, + toSaveDocs, + mutation, + _args6 = arguments; + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + mutationOptions = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {}; + doctypes = Array.from(new Set(docs.map(function (x) { + return x._type; + }))); + + if (!(doctypes.length !== 1)) { + _context6.next = 4; + break; + } + + throw new Error('saveAll can only save documents with the same doctype'); + + case 4: + _context6.next = 6; + return Promise.all(docs.map(function (d) { + return _this2.schema.validate(d); + })); + + case 6: + validations = _context6.sent; + errors = validations.filter(function (validation) { + return validation !== true; + }); + + if (!(errors.length > 0)) { + _context6.next = 11; + break; + } + + _logger.default.warn('There has been some validation errors while bulk saving', errors); + + throw new Error('Validation failed for at least one doc'); + + case 11: + toSaveDocs = docs.map(function (d) { + return _this2.prepareDocumentForSave(d); + }); + mutation = _dsl.Mutations.updateDocuments(toSaveDocs); + return _context6.abrupt("return", this.mutate(mutation, mutationOptions)); + + case 14: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function saveAll(_x7) { + return _saveAll.apply(this, arguments); + } + + return saveAll; + }() + /** + * @param {import("./types").CozyClientDocument} document - Document that will be saved + * @param {object} [options={event: DOC_CREATION}] - Event + * @param {string} [options.event] - Mutation type + * @returns {import("./types").CozyClientDocument} + */ + + }, { + key: "ensureCozyMetadata", + value: function ensureCozyMetadata(document) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { + event: DOC_CREATION + }; + var METADATA_VERSION = 1; + if (this.appMetadata === undefined) return document; + var doctypeVersion; + + if (document._type) { + var schema = this.schema.getDoctypeSchema(document._type); + doctypeVersion = (0, _get.default)(schema, 'doctypeVersion'); + } + + var _this$appMetadata = this.appMetadata, + slug = _this$appMetadata.slug, + sourceAccount = _this$appMetadata.sourceAccount, + version = _this$appMetadata.version; + var now = new Date().toISOString(); + var cozyMetadata = (0, _get.default)(document, 'cozyMetadata', {}); + + if (options.event === DOC_CREATION) { + cozyMetadata = _objectSpread({ + metadataVersion: METADATA_VERSION, + doctypeVersion: doctypeVersion, + createdByApp: slug, + sourceAccount: sourceAccount, + createdAt: now, + createdByAppVersion: version, + updatedAt: now, + updatedByApps: slug ? [{ + date: now, + slug: slug, + version: version + }] : [] + }, cozyMetadata); + } else if (options.event === DOC_UPDATE) { + cozyMetadata = _objectSpread(_objectSpread({}, cozyMetadata), {}, { + updatedAt: now, + updatedByApps: [{ + date: now, + slug: slug, + version: version + }].concat((0, _toConsumableArray2.default)((0, _get.default)(document, 'cozyMetadata.updatedByApps', []).filter(function (info) { + return info.slug !== slug; + }))) + }); + } + + return _objectSpread(_objectSpread({}, document), {}, { + cozyMetadata: cozyMetadata + }); + } + /** + * Dehydrates and adds metadata before saving a document + * + * @param {import("./types").CozyClientDocument} doc - Document that will be saved + * @returns {import("./types").CozyClientDocument} + */ + + }, { + key: "prepareDocumentForSave", + value: function prepareDocumentForSave(doc) { + var isNewDoc = !doc._rev; + var dehydratedDoc = this.ensureCozyMetadata((0, _helpers2.dehydrate)(doc), { + event: isNewDoc ? DOC_CREATION : DOC_UPDATE + }); + return dehydratedDoc; + } + /** + * Creates a list of mutations to execute to create a document and its relationships. + * + * ```js + * const baseDoc = { _type: 'io.cozy.todo', label: 'Go hiking' } + * // relations can be arrays or single objects + * const relationships = { + * attachments: [{ _id: 12345, _type: 'io.cozy.files' }, { _id: 6789, _type: 'io.cozy.files' }], + * bills: { _id: 9999, _type: 'io.cozy.bills' } + * } + * client.getDocumentSavePlan(baseDoc, relationships) + * ``` + * + * + * @param {import("./types").CozyClientDocument} document - Document to create + * @param {import("./types").ReferenceMap} [referencesByName] - References to the created document. The + * relationship class associated to each reference list should support references, otherwise this + * method will throw. + * + * @returns {import("./types").Mutation[]|import("./types").Mutation} One or more mutation to execute + */ + + }, { + key: "getDocumentSavePlan", + value: function getDocumentSavePlan(document, referencesByName) { + var _this3 = this; + + var isNewDoc = !document._rev; + var docToSave = this.prepareDocumentForSave(document); + var saveMutation = isNewDoc ? _dsl.Mutations.createDocument(docToSave) : _dsl.Mutations.updateDocument(docToSave); + var hasReferences = referencesByName && Object.values(referencesByName).filter(function (references) { + return Array.isArray(references) ? references.length > 0 : references; + }).length > 0; + + if (!hasReferences) { + return saveMutation; + } else { + for (var _i = 0, _Object$keys = Object.keys(referencesByName); _i < _Object$keys.length; _i++) { + var relName = _Object$keys[_i]; + var doctype = document._type; + var doctypeRelationship = this.schema.getRelationship(doctype, relName); + var relationshipClass = doctypeRelationship.type; + + if (!supportsReferences(relationshipClass)) { + throw referencesUnsupportedError(doctypeRelationship.name); + } + } + } + + if (referencesByName && !isNewDoc) { + throw new Error('Unable to save external relationships on a not-new document'); + } + + return [saveMutation, function (response) { + var doc = _this3.hydrateDocument(response.data); + + return Object.entries(referencesByName).map(function (_ref3) { + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), + relName = _ref4[0], + references = _ref4[1]; + + var relationship = doc[relName]; + return relationship.addReferences(references); + }); + }]; + } + /** + * Hooks are an observable system for events on documents. + * There are at the moment only 2 hooks available. + * + * - before:destroy, called just before a document is destroyed via CozyClient::destroy + * - after:destroy, called after a document is destroyed via CozyClient::destroy + * + * @example + * ``` + * CozyClient.registerHook('io.cozy.bank.accounts', 'before:destroy', () => { + * console.log('A io.cozy.bank.accounts is being destroyed') + * }) + * ``` + * + * @param {string} doctype - Doctype on which the hook will be registered + * @param {string} name - Name of the hook + * @param {Function} fn - Callback to be executed + */ + + }, { + key: "triggerHook", + value: function triggerHook(name, document) { + if (!CozyClient.hooks) return; + var allHooks = CozyClient.hooks[document._type] || {}; + var hooks = allHooks[name] || []; + + var _iterator4 = _createForOfIteratorHelper(hooks), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var h = _step4.value; + h(this, document); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + } + /** + * Destroys a document. {before,after}:destroy hooks will be fired. + * + * @param {import("./types").CozyClientDocument} document - Document to be deleted + * @returns {Promise<import("./types").CozyClientDocument>} The document that has been deleted + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(document) { + var mutationOptions, + res, + _args7 = arguments; + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + mutationOptions = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {}; + _context7.next = 3; + return this.triggerHook('before:destroy', document); + + case 3: + _context7.next = 5; + return this.mutate(_dsl.Mutations.deleteDocument(document), mutationOptions); + + case 5: + res = _context7.sent; + _context7.next = 8; + return this.triggerHook('after:destroy', document); + + case 8: + return _context7.abrupt("return", res); + + case 9: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function destroy(_x8) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + }, { + key: "upload", + value: function upload(file, dirPath) { + var mutationOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return this.mutate(_dsl.Mutations.uploadFile(file, dirPath), mutationOptions); + } + /** + * Makes sure that the query exists in the store + * + * @param {string} queryId - Id of the query + * @param {QueryDefinition} queryDefinition - Definition of the query + * @param {import("./types").QueryOptions} [options] - Additional options + */ + + }, { + key: "ensureQueryExists", + value: function ensureQueryExists(queryId, queryDefinition, options) { + this.ensureStore(); + var existingQuery = (0, _store.getQueryFromState)(this.store.getState(), queryId); // Don't trigger the INIT_QUERY for fetchMore() calls + + if (existingQuery.fetchStatus !== 'loaded' || !queryDefinition.skip && !queryDefinition.bookmark) { + this.dispatch((0, _store.initQuery)(queryId, queryDefinition, options)); + } + } + /** + * Executes a query and returns its results. + * + * Results from the query will be saved internally and can be retrieved via + * `getQueryFromState` or directly using `<Query />`. `<Query />` automatically + * executes its query when mounted if no fetch policy has been indicated. + * + * @param {QueryDefinition} queryDefinition - Definition that will be executed + * @param {import("./types").QueryOptions} [options] - Options + * @returns {Promise<import("./types").QueryResult>} + */ + + }, { + key: "query", + value: function () { + var _query = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(queryDefinition) { + var _this4 = this; + + var _ref5, + update, + options, + queryId, + existingQuery, + shouldFetch, + backgroundFetching, + response, + _args8 = arguments; + + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _ref5 = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {}; + update = _ref5.update, options = (0, _objectWithoutProperties2.default)(_ref5, ["update"]); + this.ensureStore(); + queryId = options.as || this.queryIdGenerator.generateId(queryDefinition); + existingQuery = this.getQueryFromState(queryId, options); + + if (!(options.enabled !== undefined)) { + _context8.next = 8; + break; + } + + if (!('boolean' !== typeof options.enabled)) { + _context8.next = 8; + break; + } + + throw new Error("option.enabled should be a boolean for this query: ".concat(JSON.stringify(queryDefinition))); + + case 8: + if (!options.fetchPolicy) { + _context8.next = 14; + break; + } + + if (options.as) { + _context8.next = 11; + break; + } + + throw new Error('Cannot use `fetchPolicy` without naming the query, please use `as` to name the query'); + + case 11: + shouldFetch = options.fetchPolicy(existingQuery); + + if (shouldFetch) { + _context8.next = 14; + break; + } + + return _context8.abrupt("return"); + + case 14: + if (!(existingQuery && Object.keys(existingQuery).length > 0)) { + _context8.next = 17; + break; + } + + if (!(existingQuery.fetchStatus === 'loading')) { + _context8.next = 17; + break; + } + + return _context8.abrupt("return", this._promiseCache.get(function () { + return (0, _jsonStableStringify.default)(queryDefinition); + })); + + case 17: + this.ensureQueryExists(queryId, queryDefinition, options); + _context8.prev = 18; + backgroundFetching = options.backgroundFetching !== undefined ? options.backgroundFetching : this.options.backgroundFetching; + this.dispatch((0, _store.loadQuery)(queryId, { + backgroundFetching: backgroundFetching + })); + _context8.next = 23; + return this._promiseCache.exec(function () { + return _this4.requestQuery(queryDefinition); + }, function () { + return (0, _jsonStableStringify.default)(queryDefinition); + }); + + case 23: + response = _context8.sent; + this.dispatch((0, _store.receiveQueryResult)(queryId, response, { + update: update, + backgroundFetching: backgroundFetching + })); + return _context8.abrupt("return", response); + + case 28: + _context8.prev = 28; + _context8.t0 = _context8["catch"](18); + this.dispatch((0, _store.receiveQueryError)(queryId, _context8.t0)); // specific onError + + if (!options.onError) { + _context8.next = 35; + break; + } + + options.onError(_context8.t0); // defaulted onError + + _context8.next = 40; + break; + + case 35: + if (!this.options.onError) { + _context8.next = 39; + break; + } + + this.options.onError(_context8.t0); + _context8.next = 40; + break; + + case 39: + throw _context8.t0; + + case 40: + case "end": + return _context8.stop(); + } + } + }, _callee8, this, [[18, 28]]); + })); + + function query(_x9) { + return _query.apply(this, arguments); + } + + return query; + }() + /** + * Will fetch all documents for a `queryDefinition`, automatically fetching more + * documents if the total of documents is superior to the pagination limit. Can + * result in a lot of network requests. + * + * @param {QueryDefinition} queryDefinition - Definition to be executed + * @param {import("./types").QueryOptions} [options] - Options + * @returns {Promise<import("./types").QueryResult>} All documents matching the query + */ + + }, { + key: "queryAll", + value: function () { + var _queryAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(queryDefinition) { + var options, + queryId, + mergedOptions, + resp, + documents, + currentResult, + _args9 = arguments; + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + options = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {}; + queryId = options.as || this.queryIdGenerator.generateId(queryDefinition); + mergedOptions = _objectSpread(_objectSpread({}, options), {}, { + as: queryId + }); + _context9.prev = 3; + _context9.next = 6; + return this.query(queryDefinition, mergedOptions); + + case 6: + resp = _context9.sent; + documents = resp.data; + + case 8: + if (!(resp && resp.next)) { + _context9.next = 22; + break; + } + + if (!resp.bookmark) { + _context9.next = 15; + break; + } + + _context9.next = 12; + return this.query(queryDefinition.offsetBookmark(resp.bookmark), mergedOptions); + + case 12: + resp = _context9.sent; + _context9.next = 19; + break; + + case 15: + currentResult = (0, _store.getRawQueryFromState)(this.store.getState(), queryId); + _context9.next = 18; + return this.query(queryDefinition.offset(currentResult.data.length), mergedOptions); + + case 18: + resp = _context9.sent; + + case 19: + documents.push.apply(documents, (0, _toConsumableArray2.default)(resp.data)); + _context9.next = 8; + break; + + case 22: + return _context9.abrupt("return", documents); + + case 25: + _context9.prev = 25; + _context9.t0 = _context9["catch"](3); + + _logger.default.log("queryAll error for ".concat(_context9.t0.toString())); + + return _context9.abrupt("return", []); + + case 29: + case "end": + return _context9.stop(); + } + } + }, _callee9, this, [[3, 25]]); + })); + + function queryAll(_x10) { + return _queryAll.apply(this, arguments); + } + + return queryAll; + }() + }, { + key: "watchQuery", + value: function watchQuery() { + _logger.default.warn('client.watchQuery is deprecated, please use client.makeObservableQuery.'); + + return this.makeObservableQuery.apply(this, arguments); + } + }, { + key: "makeObservableQuery", + value: function makeObservableQuery(queryDefinition) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + this.ensureStore(); + var queryId = options.as || this.queryIdGenerator.generateId(queryDefinition); + this.ensureQueryExists(queryId, queryDefinition); + return new _ObservableQuery.default(queryId, queryDefinition, this, options); + } + /** + * Mutate a document + * + * @param {object} mutationDefinition - Describe the mutation + * @param {object} [options] - Options + * @param {string} [options.as] - Mutation id + * @param {Function} [options.update] - Function to update the document + * @param {Function} [options.updateQueries] - Function to update queries + * @returns {Promise} + */ + + }, { + key: "mutate", + value: function () { + var _mutate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(mutationDefinition) { + var _ref6, + update, + updateQueries, + options, + mutationId, + response, + _args10 = arguments; + + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _ref6 = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {}; + update = _ref6.update, updateQueries = _ref6.updateQueries, options = (0, _objectWithoutProperties2.default)(_ref6, ["update", "updateQueries"]); + this.ensureStore(); + mutationId = options.as || this.queryIdGenerator.generateId(mutationDefinition); + this.dispatch((0, _store.initMutation)(mutationId, mutationDefinition)); + _context10.prev = 5; + _context10.next = 8; + return this.requestMutation(mutationDefinition); + + case 8: + response = _context10.sent; + this.dispatch((0, _store.receiveMutationResult)(mutationId, response, { + update: update, + updateQueries: updateQueries + }, mutationDefinition)); + return _context10.abrupt("return", response); + + case 13: + _context10.prev = 13; + _context10.t0 = _context10["catch"](5); + this.dispatch((0, _store.receiveMutationError)(mutationId, _context10.t0, mutationDefinition)); + throw _context10.t0; + + case 17: + case "end": + return _context10.stop(); + } + } + }, _callee10, this, [[5, 13]]); + })); + + function mutate(_x11) { + return _mutate.apply(this, arguments); + } + + return mutate; + }() + /** + * Executes a query through links and fetches relationships + * + * @private + * @param {QueryDefinition} definition QueryDefinition to be executed + * @returns {Promise<import("./types").ClientResponse>} + */ + + }, { + key: "requestQuery", + value: function () { + var _requestQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(definition) { + var mainResponse, withIncluded; + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return this.chain.request(definition); + + case 2: + mainResponse = _context11.sent; + + if (definition.includes) { + _context11.next = 5; + break; + } + + return _context11.abrupt("return", mainResponse); + + case 5: + _context11.next = 7; + return this.fetchRelationships(mainResponse, this.getIncludesRelationships(definition)); + + case 7: + withIncluded = _context11.sent; + return _context11.abrupt("return", withIncluded); + + case 9: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function requestQuery(_x12) { + return _requestQuery.apply(this, arguments); + } + + return requestQuery; + }() + /** + * Fetch relationships for a response (can be several docs). + * Fills the `relationships` attribute of each documents. + * + * Can potentially result in several fetch requests. + * Queries are optimized before being sent (multiple single documents queries can be packed into + * one multiple document query) for example. + * + * @private + */ + + }, { + key: "fetchRelationships", + value: function () { + var _fetchRelationships = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(response, relationshipsByName) { + var _this5 = this; + + var isSingleDoc, responseDocs, queryDefToDocIdAndRel, documents, definitions, optimizedDefinitions, responses, uniqueDocuments, included, relationshipsByDocId, _iterator5, _step5, _step5$value, def, resp, docIdAndRel, _docIdAndRel, docId, relName; + + return _regenerator.default.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + isSingleDoc = !Array.isArray(response.data); + + if (!(!isSingleDoc && response.data.length === 0)) { + _context12.next = 3; + break; + } + + return _context12.abrupt("return", response); + + case 3: + responseDocs = isSingleDoc ? [response.data] : response.data; + queryDefToDocIdAndRel = new Map(); + documents = []; + definitions = []; + responseDocs.forEach(function (doc) { + return (0, _forEach.default)(relationshipsByName, function (relationship, relName) { + try { + var queryDef = relationship.type.query(doc, _this5, relationship); + var docId = doc._id; // Used to reattach responses into the relationships attribute of + // each document + + queryDefToDocIdAndRel.set(queryDef, [docId, relName]); // Relationships can yield "queries" that are already resolved documents. + // These do not need to go through the usual link request mechanism. + + if (queryDef instanceof _dsl.QueryDefinition) { + definitions.push(queryDef); + } else { + documents.push(queryDef); + } + } catch (_unused) {// eslint-disable-next-line + // We do not crash completely if one the relationship behaves badly and + // throws + } + }); + }); // Definitions can be in optimized/regrouped in case of HasMany relationships. + + optimizedDefinitions = (0, _optimize.default)(definitions); + _context12.next = 11; + return Promise.all(optimizedDefinitions.map(function (req) { + return _this5.chain.request(req); + })); + + case 11: + responses = _context12.sent; + // "Included" documents will be stored in the `documents` store + uniqueDocuments = (0, _uniqBy.default)((0, _flatten.default)(documents), '_id'); + included = (0, _flatten.default)(responses.map(function (r) { + return r.included || r.data; + })).concat(uniqueDocuments).filter(Boolean); // Some relationships have the relationship data on the other side of the + // relationship (ex: io.cozy.photos.albums do not have photo inclusion information, + // it is on the io.cozy.files side). + // Here we take the data received from the relationship queries, and group + // it so that we can fill the `relationships` attribute of each doc before + // storing the document. This makes the data easier to manipulate for the front-end. + + relationshipsByDocId = {}; + _iterator5 = _createForOfIteratorHelper((0, _zip.default)(optimizedDefinitions, responses)); + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + _step5$value = (0, _slicedToArray2.default)(_step5.value, 2), def = _step5$value[0], resp = _step5$value[1]; + docIdAndRel = queryDefToDocIdAndRel.get(def); + + if (docIdAndRel) { + _docIdAndRel = (0, _slicedToArray2.default)(docIdAndRel, 2), docId = _docIdAndRel[0], relName = _docIdAndRel[1]; + relationshipsByDocId[docId] = relationshipsByDocId[docId] || {}; + relationshipsByDocId[docId][relName] = (0, _helpers.responseToRelationship)(resp); + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + return _context12.abrupt("return", _objectSpread(_objectSpread({}, (0, _helpers.attachRelationships)(response, relationshipsByDocId)), {}, { + included: included + })); + + case 18: + case "end": + return _context12.stop(); + } + } + }, _callee12); + })); + + function fetchRelationships(_x13, _x14) { + return _fetchRelationships.apply(this, arguments); + } + + return fetchRelationships; + }() + }, { + key: "requestMutation", + value: function () { + var _requestMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(definition) { + var _this6 = this; + + var _definition, first, rest, firstResponse; + + return _regenerator.default.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + if (!Array.isArray(definition)) { + _context13.next = 8; + break; + } + + _definition = (0, _toArray2.default)(definition), first = _definition[0], rest = _definition.slice(1); + _context13.next = 4; + return this.requestMutation(first); + + case 4: + firstResponse = _context13.sent; + _context13.next = 7; + return Promise.all(rest.map(function (def) { + var mutationDef = typeof def === 'function' ? def(firstResponse) : def; + return _this6.requestMutation(mutationDef); + })); + + case 7: + return _context13.abrupt("return", firstResponse); + + case 8: + return _context13.abrupt("return", this.chain.request(definition)); + + case 9: + case "end": + return _context13.stop(); + } + } + }, _callee13, this); + })); + + function requestMutation(_x15) { + return _requestMutation.apply(this, arguments); + } + + return requestMutation; + }() + }, { + key: "getIncludesRelationships", + value: function getIncludesRelationships(queryDefinition) { + var _this7 = this; + + var includes = queryDefinition.includes, + doctype = queryDefinition.doctype; + if (!includes) return {}; + return (0, _fromPairs.default)(includes.map(function (relName) { + return [relName, _this7.schema.getRelationship(doctype, relName)]; + })); + } + /** + * Returns documents with their relationships resolved according to their schema. + * If related documents are not in the store, they will not be fetched automatically. + * Instead, the relationships will have null documents. + * + * @param {string} doctype - Doctype of the documents being hydrated + * @param {Array<import("./types").CozyClientDocument>} documents - Documents to be hydrated + * @returns {Array<import("./types").HydratedDocument>} + */ + + }, { + key: "hydrateDocuments", + value: function hydrateDocuments(doctype, documents) { + var _this8 = this; + + if (this.options.autoHydrate === false) { + return documents; + } + + var schema = this.schema.getDoctypeSchema(doctype); + var relationships = schema.relationships; + + if (relationships) { + return documents.map(function (doc) { + return _this8.hydrateDocument(doc, schema); + }); + } else { + return documents; + } + } + /** + * Resolves relationships on a document. + * + * The original document is kept in the target attribute of + * the relationship + * + * @param {import("./types").CozyClientDocument} document - for which relationships must be resolved + * @param {Schema} [schemaArg] - Optional + * @returns {import("./types").HydratedDocument} + */ + + }, { + key: "hydrateDocument", + value: function hydrateDocument(document, schemaArg) { + if (!document) { + return document; + } + + var schema = schemaArg || this.schema.getDoctypeSchema(document._type); + return _objectSpread(_objectSpread({}, document), this.hydrateRelationships(document, schema.relationships)); + } + }, { + key: "hydrateRelationships", + value: function hydrateRelationships(document, schemaRelationships) { + var methods = this.getRelationshipStoreAccessors(); + return (0, _mapValues.default)(schemaRelationships, function (assoc, name) { + return (0, _associations.create)(document, assoc, methods); + }); + } + /** + * Creates (locally) a new document for the given doctype. + * This document is hydrated : its relationships are there + * and working. + */ + + }, { + key: "makeNewDocument", + value: function makeNewDocument(doctype) { + var obj = { + _type: doctype + }; + return this.hydrateDocument(obj); + } + }, { + key: "generateRandomId", + value: function generateRandomId() { + return this.queryIdGenerator.generateRandomId(); + } + /** + * Creates an association that is linked to the store. + */ + + }, { + key: "getAssociation", + value: function getAssociation(document, associationName) { + return (0, _associations.create)(document, this.schema.getRelationship(document._type, associationName), this.getRelationshipStoreAccessors()); + } + /** + * Returns the accessors that are given to the relationships for them + * to deal with the stores. + * + * Relationships need to have access to the store to ping it when + * a modification (addById/removeById etc...) has been done. This wakes + * the store up, which in turn will update the `<Query>`s and re-render the data. + */ + + }, { + key: "getRelationshipStoreAccessors", + value: function getRelationshipStoreAccessors() { + var _this9 = this; + + if (!this.storeAccesors) { + this.storeAccessors = { + get: this.getDocumentFromState.bind(this), + save: function save(document, opts) { + return _this9.save.call(_this9, document, opts); + }, + dispatch: this.dispatch.bind(this), + query: function query(def, opts) { + return _this9.query.call(_this9, def, opts); + }, + mutate: function mutate(def, opts) { + return _this9.mutate.call(_this9, def, opts); + } + }; + } + + return this.storeAccessors; + } + /** + * Get a collection of documents from the internal store. + * + * @param {string} type - Doctype of the collection + * + * @returns {import("./types").CozyClientDocument[]} Array of documents or null if the collection does not exist. + */ + + }, { + key: "getCollectionFromState", + value: function getCollectionFromState(type) { + try { + return (0, _store.getCollectionFromState)(this.store.getState(), type); + } catch (e) { + _logger.default.warn('Could not getCollectionFromState', type, e.message); + + return null; + } + } + /** + * Get a document from the internal store. + * + * @param {string} type - Doctype of the document + * @param {string} id - Id of the document + * + * @returns {import("./types").CozyClientDocument} Document or null if the object does not exist. + */ + + }, { + key: "getDocumentFromState", + value: function getDocumentFromState(type, id) { + try { + return (0, _store.getDocumentFromState)(this.store.getState(), type, id); + } catch (e) { + _logger.default.warn('Could not getDocumentFromState', type, id, e.message); + + return null; + } + } + /** + * Get a query from the internal store. + * + * @param {string} id - Id of the query (set via Query.props.as) + * @param {object} options - Options + * @param {boolean} [options.hydrated] - Whether documents should be returned already hydrated (default: false) + * @param {object} [options.singleDocData] - If true, the "data" returned will be + * a single doc instead of an array for single doc queries. Defaults to false for backward + * compatibility but will be set to true in the future. + * + * @returns {import("./types").QueryState} - Query state or null if it does not exist. + */ + + }, { + key: "getQueryFromState", + value: function getQueryFromState(id) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var hydrated = options.hydrated || false; + var singleDocData = options.singleDocData || false; + + try { + var queryResults = (0, _store.getQueryFromState)(this.store.getState(), id); + var doctype = queryResults.definition && queryResults.definition.doctype; + var isSingleDocQuery = queryResults.definition && queryResults.definition.id; + + if (!hydrated && !singleDocData) { + // Early return let's us preserve reference equality in the simple case + return queryResults; + } + + var data = hydrated && doctype ? this.hydrateDocuments(doctype, queryResults.data) : queryResults.data; + return _objectSpread(_objectSpread({}, queryResults), {}, { + data: isSingleDocQuery && singleDocData ? data[0] : data + }); + } catch (e) { + _logger.default.warn("Could not get query from state. queryId: ".concat(id, ", error: ").concat(e.message)); + + return null; + } + } + /** + * Executes a query and returns the results from internal store. + * + * Can be useful in pure JS context (without React) + * Has a behavior close to <Query /> or useQuery + * + * @param {object} query - Query with definition and options + * @param {QueryDefinition} query.definition - Query Definition + * @param {import("./types").QueryOptions} query.options - Query Options + * @returns {Promise<import("./types").QueryState>} Query state + */ + + }, { + key: "register", + + /** + * Performs a complete OAuth flow using a Cordova webview + * or React Native WebView for auth. + * The `register` method's name has been chosen for compat reasons with the Authentication compo. + * + * @param {string} cozyURL Receives the URL of the cozy instance. + * @returns {object} Contains the fetched token and the client information. + */ + value: function register(cozyURL) { + var stackClient = this.getStackClient(); + stackClient.setUri(cozyURL); + return this.startOAuthFlow(_mobile.authFunction); + } + }, { + key: "isReactNative", + value: function isReactNative() { + return typeof navigator != 'undefined' && navigator.product == 'ReactNative'; + } + /** + * Performs a complete OAuth flow, including updating the internal token at the end. + * + * @param {import("./types").OpenURLCallback} openURLCallback Receives the URL to present to the user as a parameter, and should return a promise that resolves with the URL the user was redirected to after accepting the permissions. + * @returns {Promise<object>} Contains the fetched token and the client information. These should be stored and used to restore the client. + */ + + }, { + key: "startOAuthFlow", + value: function () { + var _startOAuthFlow = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(openURLCallback) { + var stackClient; + return _regenerator.default.wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + stackClient = this.getStackClient(); + _context14.next = 3; + return stackClient.register(); + + case 3: + _context14.next = 5; + return this.certifyFlagship(); + + case 5: + return _context14.abrupt("return", this.authorize({ + openURLCallback: openURLCallback + })); + + case 6: + case "end": + return _context14.stop(); + } + } + }, _callee14, this); + })); + + function startOAuthFlow(_x16) { + return _startOAuthFlow.apply(this, arguments); + } + + return startOAuthFlow; + }() + /** + * Perform the Flagship certification process for verifying that the current running app is a genuine Cozy application + * + * This mechanism is described in https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/flagship-certification/README.md + */ + + }, { + key: "certifyFlagship", + value: function () { + var _certifyFlagship2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() { + var stackClient; + return _regenerator.default.wrap(function _callee15$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + stackClient = this.getStackClient(); + + if (!stackClient.oauthOptions.shouldRequireFlagshipPermissions) { + _context15.next = 4; + break; + } + + _context15.next = 4; + return (0, _flagshipCertification.certifyFlagship)(stackClient.oauthOptions.certificationConfig, this); + + case 4: + case "end": + return _context15.stop(); + } + } + }, _callee15, this); + })); + + function certifyFlagship() { + return _certifyFlagship2.apply(this, arguments); + } + + return certifyFlagship; + }() + /** + * Creates an OAuth token with needed permissions for the current client. + * The authorization page URL generation can be overriding by passing a function pointer as `openURLCallback` parameter + * It is possible to skip the session creation process (when using an in-app browser) by passing a sessionCode (see https://docs.cozy.io/en/cozy-stack/auth/#post-authsession_code) + * + * @param {object} [options] - Authorization options + * @param {import("./types").OpenURLCallback} [options.openURLCallback] - Receives the URL to present to the user as a parameter, and should return a promise that resolves with the URL the user was redirected to after accepting the permissions. + * @param {import("./types").SessionCode} [options.sessionCode] - session code than can be added to the authorization URL to automatically create the session. + * @param {import("./types").PKCECodes} [options.pkceCodes] - code verifier and a code challenge that should be used in the PKCE verification process. + * @returns {Promise<object>} Contains the fetched token and the client information. These should be stored and used to restore the client. + */ + + }, { + key: "authorize", + value: function () { + var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() { + var _ref7, + _ref7$openURLCallback, + openURLCallback, + _ref7$sessionCode, + sessionCode, + _ref7$pkceCodes, + pkceCodes, + codeVerifier, + codeChallenge, + stackClient, + stateCode, + url, + redirectedURL, + code, + token, + _stackClient, + _args16 = arguments; + + return _regenerator.default.wrap(function _callee16$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + _ref7 = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {}, _ref7$openURLCallback = _ref7.openURLCallback, openURLCallback = _ref7$openURLCallback === void 0 ? _mobile.authFunction : _ref7$openURLCallback, _ref7$sessionCode = _ref7.sessionCode, sessionCode = _ref7$sessionCode === void 0 ? undefined : _ref7$sessionCode, _ref7$pkceCodes = _ref7.pkceCodes, pkceCodes = _ref7$pkceCodes === void 0 ? {} : _ref7$pkceCodes; + _context16.prev = 1; + codeVerifier = pkceCodes.codeVerifier, codeChallenge = pkceCodes.codeChallenge; + stackClient = this.getStackClient(); + stateCode = stackClient.generateStateCode(); + url = stackClient.getAuthCodeURL({ + stateCode: stateCode, + scopes: undefined, + sessionCode: sessionCode, + codeChallenge: codeChallenge + }); + _context16.next = 8; + return openURLCallback(url); + + case 8: + redirectedURL = _context16.sent; + code = stackClient.getAccessCodeFromURL(redirectedURL, stateCode); + _context16.next = 12; + return stackClient.fetchAccessToken(code, undefined, undefined, codeVerifier); + + case 12: + token = _context16.sent; + stackClient.setToken(token); + return _context16.abrupt("return", { + token: token, + infos: stackClient.oauthOptions, + client: stackClient.oauthOptions // for compat with Authentication comp reasons + + }); + + case 17: + _context16.prev = 17; + _context16.t0 = _context16["catch"](1); + + /* if REGISTRATION_ABORT is emited, we have to unregister the client. */ + if (_context16.t0.message === _const.REGISTRATION_ABORT) { + _stackClient = this.getStackClient(); + + _stackClient.unregister(); + } + + throw _context16.t0; + + case 21: + case "end": + return _context16.stop(); + } + } + }, _callee16, this, [[1, 17]]); + })); + + function authorize() { + return _authorize.apply(this, arguments); + } + + return authorize; + }() + /** + * Renews the token if, for instance, new permissions are required or token + * has expired. + * + * @returns {object} Contains the fetched token and the client information. + */ + + }, { + key: "renewAuthorization", + value: function renewAuthorization() { + return this.authorize({ + openURLCallback: _mobile.authFunction + }); + } + /** + * Sets the internal store of the client. Use this when you want to have cozy-client's + * internal store colocated with your existing Redux store. + * + * Typically, you would need to do this only once in your application, this is why + * setStore throws if you do it twice. If you really need to set the store again, + * use options.force = true. + * + * @example + * ``` + * const client = new CozyClient() + * const store = createStore(combineReducers({ + * todos: todoReducer, + * cozy: client.reducer() + * }) + * client.setStore(store) + * ``` + * + * @param {import("./types").ReduxStore} store - A redux store + * @param {object} [options] - Options + * @param {boolean} [options.force] - Will deactivate throwing when client's store already exists + */ + + }, { + key: "setStore", + value: function setStore(store) { + var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref8$force = _ref8.force, + force = _ref8$force === void 0 ? false : _ref8$force; + + if (store === undefined) { + throw new Error('Store is undefined'); + } else if (this.store && !force) { + throw new Error("Client already has a store, it is forbidden to change store.\nsetStore must be called before any query is executed. Try to\ncall setStore earlier in your code, preferably just after the\ninstantiation of the client."); + } + + this.store = store; + } + }, { + key: "ensureStore", + value: function ensureStore() { + if (!this.store) { + this.setStore((0, _store.createStore)()); + } + } + /** + * Returns whether the client has been revoked on the server + */ + + }, { + key: "checkForRevocation", + value: function () { + var _checkForRevocation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() { + return _regenerator.default.wrap(function _callee17$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + if (!(this.stackClient instanceof _cozyStackClient.OAuthClient)) { + _context17.next = 4; + break; + } + + return _context17.abrupt("return", this.stackClient.checkForRevocation()); + + case 4: + throw 'checkForRevocation is only implemented for OAutClient'; + + case 5: + case "end": + return _context17.stop(); + } + } + }, _callee17, this); + })); + + function checkForRevocation() { + return _checkForRevocation.apply(this, arguments); + } + + return checkForRevocation; + }() + /** Sets public attribute and emits event related to revocation */ + + }, { + key: "handleRevocationChange", + value: function handleRevocationChange(state) { + if (state) { + this.isRevoked = true; + this.emit('revoked'); + } else { + this.isRevoked = false; + this.emit('unrevoked'); + } + } + /** Emits event when token is refreshed */ + + }, { + key: "handleTokenRefresh", + value: function handleTokenRefresh(token) { + this.emit('tokenRefreshed'); + + if (this.options.onTokenRefresh) { + deprecatedHandler("Using onTokenRefresh is deprecated, please use events like this: cozyClient.on('tokenRefreshed', token => console.log('Token has been refreshed', token)). https://git.io/fj3M3"); + this.options.onTokenRefresh(token); + } + } + /** + * If no stack client has been passed in options, creates a default stack + * client and attaches handlers for revocation and token refresh. + * If a stackClient has been passed in options, ensure it has handlers for + * revocation and token refresh. + * + * If `oauth` options are passed, stackClient is an OAuthStackClient. + */ + + }, { + key: "createClient", + value: function createClient() { + if (this.options.client) { + _logger.default.warn('CozyClient: Using options.client is deprecated, please use options.stackClient.'); + } + + var warningForCustomHandlers = this.options.warningForCustomHandlers !== undefined ? this.options.warningForCustomHandlers : true; + var stackClient = this.options.client || this.options.stackClient; + var handlers = { + onRevocationChange: this.handleRevocationChange, + onTokenRefresh: this.handleTokenRefresh + }; + + if (stackClient) { + this.stackClient = stackClient; + + if (!stackClient.options) { + stackClient.options = {}; + } + + for (var _i2 = 0, _Object$keys2 = Object.keys(handlers); _i2 < _Object$keys2.length; _i2++) { + var handlerName = _Object$keys2[_i2]; + + if (!stackClient.options[handlerName]) { + stackClient.options[handlerName] = handlers[handlerName]; + } else { + if (warningForCustomHandlers) { + _logger.default.warn("You passed a stackClient with its own ".concat(handlerName, ". It is not supported, unexpected things might happen.")); + } + } + } + } else { + var options = _objectSpread(_objectSpread({}, this.options), handlers); + + this.stackClient = this.options.oauth ? new _cozyStackClient.OAuthClient(options) : new _cozyStackClient.default(options); + } + + this.client = new Proxy(this.stackClient, deprecatedHandler('Using cozyClient.client is deprecated, please use cozyClient.stackClient.')); + } + }, { + key: "getClient", + value: function getClient() { + _logger.default.warn('CozyClient: getClient() is deprecated, please use getStackClient().'); + + return this.getStackClient(); + } + }, { + key: "getStackClient", + value: function getStackClient() { + if (!this.stackClient) { + this.createClient(); + } + + return this.stackClient; + } + }, { + key: "reducer", + value: function reducer() { + return _store.default; + } + }, { + key: "dispatch", + value: function dispatch(action) { + return this.store.dispatch(action); + } + /** + * getInstanceOptions - Returns current instance options, such as domain or app slug + * + * @returns {object} + */ + + }, { + key: "getInstanceOptions", + value: function getInstanceOptions() { + return this.instanceOptions; + } + /** + * loadInstanceOptionsFromDOM - Loads the dataset injected by the Stack in web pages and exposes it through getInstanceOptions + * + * @param {string} [selector=[role=application]] A selector for the node that holds the dataset to load + * + * @returns {void} + */ + + }, { + key: "loadInstanceOptionsFromDOM", + value: function loadInstanceOptionsFromDOM() { + var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '[role=application]'; + var root = document.querySelector(selector); + + if (!(root instanceof HTMLElement)) { + throw new Error('The selector that is passed does not return an HTMLElement'); + } + + var _root$dataset = root.dataset, + _root$dataset$cozy = _root$dataset.cozy, + cozy = _root$dataset$cozy === void 0 ? '{}' : _root$dataset$cozy, + dataset = (0, _objectWithoutProperties2.default)(_root$dataset, ["cozy"]); + this.instanceOptions = _objectSpread(_objectSpread({}, JSON.parse(cozy)), dataset); + this.capabilities = this.instanceOptions.capabilities || null; + } + /** + * loadInstanceOptionsFromStack - Loads the instance options from cozy-stack and exposes it through getInstanceOptions + * + * This method is not iso with loadInstanceOptionsFromDOM for now. + * + * @returns {Promise<void>} + */ + + }, { + key: "loadInstanceOptionsFromStack", + value: function () { + var _loadInstanceOptionsFromStack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() { + var _instanceData$attribu, _instanceData$attribu2; + + var _yield$this$query, data, _yield$this$query2, instanceData; + + return _regenerator.default.wrap(function _callee18$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + _context18.next = 2; + return this.query((0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.capabilities')); + + case 2: + _yield$this$query = _context18.sent; + data = _yield$this$query.data; + _context18.next = 6; + return this.query((0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.instance')); + + case 6: + _yield$this$query2 = _context18.sent; + instanceData = _yield$this$query2.data; + this.instanceOptions = { + capabilities: data.attributes, + locale: (_instanceData$attribu = instanceData.attributes) === null || _instanceData$attribu === void 0 ? void 0 : _instanceData$attribu.locale, + tracking: (_instanceData$attribu2 = instanceData.attributes) === null || _instanceData$attribu2 === void 0 ? void 0 : _instanceData$attribu2.tracking + }; + this.capabilities = this.instanceOptions.capabilities || null; + + case 10: + case "end": + return _context18.stop(); + } + } + }, _callee18, this); + })); + + function loadInstanceOptionsFromStack() { + return _loadInstanceOptionsFromStack.apply(this, arguments); + } + + return loadInstanceOptionsFromStack; + }() + /** + * Directly set the data in the store, without using a query + * This is useful for cases like Pouch replication, which wants to + * set some data in the store. + * + * @param {object} data - Data that is inserted in the store. Shape: { doctype: [data] } + */ + + }, { + key: "setData", + value: function setData(data) { + var _this10 = this; + + this.ensureStore(); + Object.entries(data).forEach(function (_ref9) { + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), + doctype = _ref10[0], + data = _ref10[1]; + + _this10.dispatch((0, _store.receiveQueryResult)(null, { + data: data + })); + }); + } + /** + * At any time put an error function + * + * @param {Function} [onError] - Set a callback for queries which are errored + * @throws {Error} onError should not have been defined yet + */ + + }, { + key: "setOnError", + value: function setOnError(onError) { + if (this.options && this.options.onError) { + throw new Error('On Error is already defined'); + } + + this.options.onError = onError; + } + }, { + key: "toJSON", + value: function toJSON() { + return new _snapshots.CozyClient({ + uri: this.options.uri + }); + } + /** + * + * @param {import("./types").AppMetadata} newAppMetadata AppMetadata to update + */ + + }, { + key: "setAppMetadata", + value: function setAppMetadata(newAppMetadata) { + this.appMetadata = _objectSpread(_objectSpread({}, this.appMetadata), newAppMetadata); + } + }], [{ + key: "fromOldClient", + value: function fromOldClient(oldClient, options) { + return new CozyClient(_objectSpread({ + uri: oldClient._url, + token: oldClient._token.token + }, options)); + } + /** + * To help with the transition from cozy-client-js to cozy-client, it is possible to instantiate + * a client with an OAuth-based instance of cozy-client-js. + * + * Warning: unlike other instantiators, this one needs to be awaited. + * + * @param {import("./types").OldCozyClient} oldClient - An OAuth instance of the deprecated cozy-client + * @param {object} options - CozyStackClient options + * @returns {Promise<CozyClient>} An instance of a client, configured from the old client + */ + + }, { + key: "fromOldOAuthClient", + value: function () { + var _fromOldOAuthClient = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(oldClient, options) { + var credentials, oauthOptions, client; + return _regenerator.default.wrap(function _callee19$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + if (!oldClient._oauth) { + _context19.next = 12; + break; + } + + _context19.next = 3; + return oldClient.authorize(); + + case 3: + credentials = _context19.sent; + oauthOptions = { + oauth: credentials.client, + token: credentials.token, + scope: credentials.token.scope + }; + client = new CozyClient(_objectSpread(_objectSpread({ + uri: oldClient._url + }, oauthOptions), options)); + + if (!client.loginPromise) { + _context19.next = 9; + break; + } + + _context19.next = 9; + return client.loginPromise; + + case 9: + return _context19.abrupt("return", client); + + case 12: + throw new Error('Cannot instantiate a new client: old client is not an OAuth client. CozyClient.fromOldClient might be more suitable.'); + + case 13: + case "end": + return _context19.stop(); + } + } + }, _callee19); + })); + + function fromOldOAuthClient(_x17, _x18) { + return _fromOldOAuthClient.apply(this, arguments); + } + + return fromOldOAuthClient; + }() + /** + * In konnector/service context, CozyClient can be instantiated from + * environment variables + * + * @param {import("./types").NodeEnvironment} [envArg] - The environment + * @param {object} options - Options + * @returns {CozyClient} + */ + + }, { + key: "fromEnv", + value: function fromEnv(envArg) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var env = envArg || (typeof process !== 'undefined' ? Object({"USE_REACT":true}) : {}); + var COZY_URL = env.COZY_URL, + COZY_CREDENTIALS = env.COZY_CREDENTIALS; + + if (!COZY_URL || !COZY_CREDENTIALS) { + throw new Error('Env used to instantiate CozyClient must have COZY_URL and COZY_CREDENTIALS'); + } + + try { + options.oauth = JSON.parse(COZY_CREDENTIALS); + } catch (err) { + options.token = COZY_CREDENTIALS.trim(); + } + + options.uri = COZY_URL.trim(); + return new CozyClient(_objectSpread({}, options)); + } + /** + * When used from an app, CozyClient can be instantiated from the data injected by the stack in + * the DOM. + * + * @param {object} options - CozyClient constructor options + * @param {string} selector - Options + * @returns {CozyClient} - CozyClient instance + */ + + }, { + key: "fromDOM", + value: function fromDOM() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var selector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '[role=application]'; + var root = document.querySelector(selector); + + if (!(root instanceof HTMLElement)) { + throw new Error("Cannot find an HTMLElement corresponding to ".concat(selector)); + } + + if (!root || !root.dataset) { + throw new Error("Found no data in ".concat(selector, " to instantiate cozyClient")); + } + + var data = root.dataset.cozy ? JSON.parse(root.dataset.cozy) : _objectSpread({}, root.dataset); + var domain = data.domain, + token = data.token; + + if (!domain || !token) { + domain = domain || data.cozyDomain; + token = token || data.cozyToken; + } + + if (!domain || !token) { + throw new Error("Found no data in ".concat(root.dataset, " to instantiate cozyClient")); + } + + return new CozyClient(_objectSpread({ + uri: "".concat(window.location.protocol, "//").concat(domain), + token: token, + capabilities: data.capabilities + }, options)); + } + }, { + key: "registerHook", + value: function registerHook(doctype, name, fn) { + var hooks = CozyClient.hooks[doctype] = CozyClient.hooks[doctype] || {}; + hooks[name] = hooks[name] || []; + hooks[name].push(fn); + } + }]); + return CozyClient; +}(); + +CozyClient.hooks = CozyClient.hooks || {}; +CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config + +CozyClient.version = "40.6.0"; + +_microee.default.mixin(CozyClient); + +var _default = CozyClient; +exports.default = _default; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("JtWf"))) + +/***/ }), + +/***/ "7CCE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("AJwH"); +var callBound = __webpack_require__("KqZw"); +var $TypeError = GetIntrinsic('%TypeError%'); + +var Call = __webpack_require__("WOzN"); +var Get = __webpack_require__("FDHv"); +var HasProperty = __webpack_require__("8A9P"); +var IsCallable = __webpack_require__("Td2o"); +var LengthOfArrayLike = __webpack_require__("yP9i"); +var ToObject = __webpack_require__("Lpe+"); +var ToString = __webpack_require__("xTjC"); + +var isString = __webpack_require__("8tBr"); + +var $split = callBound('String.prototype.split'); + +// Check failure of by-index access of string characters (IE < 9) and failure of `0 in boxedString` (Rhino) +var boxedString = Object('a'); +var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + +module.exports = function forEach(callbackfn) { + var thisO = ToObject(this); + var O = splitString && isString(this) ? $split(this, '') : thisO; + + var len = LengthOfArrayLike(O); + + if (!IsCallable(callbackfn)) { + throw new $TypeError('Array.prototype.forEach callback must be a function'); + } + + var thisArg; + if (arguments.length > 1) { + thisArg = arguments[1]; + } + + var k = 0; + while (k < len) { + var Pk = ToString(k); + var kPresent = HasProperty(O, Pk); + if (kPresent) { + var kValue = Get(O, Pk); + Call(callbackfn, thisArg, [kValue, k, O]); + } + k += 1; + } + + return void undefined; +}; + + +/***/ }), + +/***/ "7DJk": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BelongsToInPlace = exports.default = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _Association2 = _interopRequireDefault(__webpack_require__("urEX")); + +var _dsl = __webpack_require__("v2kV"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * Here the id of the document is directly set in the attribute + * of the document, not in the relationships attribute + */ +var HasOneInPlace = /*#__PURE__*/function (_Association) { + (0, _inherits2.default)(HasOneInPlace, _Association); + + var _super = _createSuper(HasOneInPlace); + + function HasOneInPlace() { + (0, _classCallCheck2.default)(this, HasOneInPlace); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(HasOneInPlace, [{ + key: "dehydrate", + value: function dehydrate(doc) { + return _objectSpread(_objectSpread({}, doc), {}, (0, _defineProperty2.default)({}, this.name, this.raw || undefined)); + } + }, { + key: "raw", + get: function get() { + return this.target[this.name]; + } + }, { + key: "data", + get: function get() { + return this.get(this.doctype, this.raw); + } + /** + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - The query params + * + * @returns {import("../types").CozyClientDocument | QueryDefinition} + */ + + }], [{ + key: "query", + value: function query(document, client, assoc) { + var id = document[assoc.name]; + return client.getDocumentFromState(assoc.doctype, id) || (0, _dsl.Q)(assoc.doctype).getById(id); + } + }]); + return HasOneInPlace; +}(_Association2.default); + +exports.default = HasOneInPlace; +var BelongsToInPlace = HasOneInPlace; +exports.BelongsToInPlace = BelongsToInPlace; + +/***/ }), + +/***/ "7FTH": +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__("mKCr"), + baseForOwn = __webpack_require__("i91D"), + baseIteratee = __webpack_require__("JF7T"); + +/** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; +} + +module.exports = mapValues; + + +/***/ }), + +/***/ "7Is5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_realtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("+s1f"); +/* harmony import */ var cozy_realtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_realtime__WEBPACK_IMPORTED_MODULE_2__); + + + +var APPS_DOCTYPE = 'io.cozy.apps'; +/** + * Initialize realtime sockets + * + * @private + * @param {object} + * @returns {Promise} + */ + +function initializeRealtime(_ref) { + var getApp = _ref.getApp, + onCreate = _ref.onCreate, + onDelete = _ref.onDelete, + cozyClient = _ref.cozyClient; + + var handleAppCreation = /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(app) { + var fullApp; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return getApp(app.slug); + + case 3: + fullApp = _context.sent; + _context.next = 9; + break; + + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](0); + throw new Error("Cannot fetch app ".concat(app.slug, ": ").concat(_context.t0.message)); + + case 9: + if (typeof onCreate === 'function') { + onCreate(fullApp); + } + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 6]]); + })); + + return function handleAppCreation(_x) { + return _ref2.apply(this, arguments); + }; + }(); + + var handleAppRemoval = function handleAppRemoval(app) { + if (typeof onDelete === 'function') { + onDelete(app); + } + }; + + try { + var realtime = new cozy_realtime__WEBPACK_IMPORTED_MODULE_2___default.a({ + client: cozyClient + }); + realtime.subscribe('created', APPS_DOCTYPE, handleAppCreation); + realtime.subscribe('deleted', APPS_DOCTYPE, handleAppRemoval); + } catch (error) { + // eslint-disable-next-line no-console + console.warn("Cannot initialize realtime in Cozy-bar: ".concat(error.message)); + } +} + +/* harmony default export */ __webpack_exports__["default"] = (initializeRealtime); + +/***/ }), + +/***/ "7K1O": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isFlagshipApp = exports.getFlagshipMetadata = exports.FlagshipRoutes = void 0; + +var _cozyLogger = _interopRequireDefault(__webpack_require__("rUPj")); + +var FlagshipRoutes; +exports.FlagshipRoutes = FlagshipRoutes; + +(function (FlagshipRoutes) { + FlagshipRoutes["Home"] = "home"; + FlagshipRoutes["Cozyapp"] = "cozyapp"; + FlagshipRoutes["Authenticate"] = "authenticate"; + FlagshipRoutes["Onboarding"] = "onboarding"; + FlagshipRoutes["Stack"] = "stack"; +})(FlagshipRoutes || (exports.FlagshipRoutes = FlagshipRoutes = {})); + +var getGlobalWindow = function getGlobalWindow() { + if (typeof window !== 'undefined') return window;else { + (0, _cozyLogger.default)('error', "\"window\" is not defined. This means that getGlobalWindow() shouldn't have been called and investigation should be done to prevent this call"); + return undefined; + } +}; + +var getFlagshipMetadata = function getFlagshipMetadata() { + var _getGlobalWindow, _getGlobalWindow$cozy; + + return ((_getGlobalWindow = getGlobalWindow()) === null || _getGlobalWindow === void 0 ? void 0 : (_getGlobalWindow$cozy = _getGlobalWindow.cozy) === null || _getGlobalWindow$cozy === void 0 ? void 0 : _getGlobalWindow$cozy.flagship) || {}; +}; + +exports.getFlagshipMetadata = getFlagshipMetadata; + +var isFlagshipApp = function isFlagshipApp() { + var _getGlobalWindow2, _getGlobalWindow2$coz; + + return ((_getGlobalWindow2 = getGlobalWindow()) === null || _getGlobalWindow2 === void 0 ? void 0 : (_getGlobalWindow2$coz = _getGlobalWindow2.cozy) === null || _getGlobalWindow2$coz === void 0 ? void 0 : _getGlobalWindow2$coz.flagship) !== undefined; +}; + +exports.isFlagshipApp = isFlagshipApp; + +/***/ }), + +/***/ "7K2Q": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("/iOI"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("IU9S"); +/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("Nm31"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__); + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */ + root: { + display: 'flex', + justifyContent: 'flex-start', + alignItems: 'center', + position: 'relative', + textDecoration: 'none', + width: '100%', + boxSizing: 'border-box', + textAlign: 'left', + paddingTop: 8, + paddingBottom: 8, + '&$focusVisible': { + backgroundColor: theme.palette.action.selected + }, + '&$selected, &$selected:hover': { + backgroundColor: theme.palette.action.selected + }, + '&$disabled': { + opacity: 0.5 + } + }, + + /* Styles applied to the `container` element if `children` includes `ListItemSecondaryAction`. */ + container: { + position: 'relative' + }, + + /* Pseudo-class applied to the `component`'s `focusVisibleClassName` prop if `button={true}`. */ + focusVisible: {}, + + /* Styles applied to the `component` element if dense. */ + dense: { + paddingTop: 4, + paddingBottom: 4 + }, + + /* Styles applied to the `component` element if `alignItems="flex-start"`. */ + alignItemsFlexStart: { + alignItems: 'flex-start' + }, + + /* Pseudo-class applied to the inner `component` element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the inner `component` element if `divider={true}`. */ + divider: { + borderBottom: "1px solid ".concat(theme.palette.divider), + backgroundClip: 'padding-box' + }, + + /* Styles applied to the inner `component` element if `disableGutters={false}`. */ + gutters: { + paddingLeft: 16, + paddingRight: 16 + }, + + /* Styles applied to the inner `component` element if `button={true}`. */ + button: { + transition: theme.transitions.create('background-color', { + duration: theme.transitions.duration.shortest + }), + '&:hover': { + textDecoration: 'none', + backgroundColor: theme.palette.action.hover, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Styles applied to the `component` element if `children` includes `ListItemSecondaryAction`. */ + secondaryAction: { + // Add some space to avoid collision as `ListItemSecondaryAction` + // is absolutely positioned. + paddingRight: 48 + }, + + /* Pseudo-class applied to the root element if `selected={true}`. */ + selected: {} + }; +}; +var useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"]; +/** + * Uses an additional container component if `ListItemSecondaryAction` is the last child. + */ + +var ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListItem(props, ref) { + var _props$alignItems = props.alignItems, + alignItems = _props$alignItems === void 0 ? 'center' : _props$alignItems, + _props$autoFocus = props.autoFocus, + autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus, + _props$button = props.button, + button = _props$button === void 0 ? false : _props$button, + childrenProp = props.children, + classes = props.classes, + className = props.className, + componentProp = props.component, + _props$ContainerCompo = props.ContainerComponent, + ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo, + _props$ContainerProps = props.ContainerProps; + _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps; + + var ContainerClassName = _props$ContainerProps.className, + ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_props$ContainerProps, ["className"]), + _props$dense = props.dense, + dense = _props$dense === void 0 ? false : _props$dense, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableGutters = props.disableGutters, + disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, + _props$divider = props.divider, + divider = _props$divider === void 0 ? false : _props$divider, + focusVisibleClassName = props.focusVisibleClassName, + _props$selected = props.selected, + selected = _props$selected === void 0 ? false : _props$selected, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["alignItems", "autoFocus", "button", "children", "classes", "className", "component", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "divider", "focusVisibleClassName", "selected"]); + + var context = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__["default"]); + var childContext = { + dense: dense || context.dense || false, + alignItems: alignItems + }; + var listItemRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + useEnhancedEffect(function () { + if (autoFocus) { + if (listItemRef.current) { + listItemRef.current.focus(); + } else if (false) {} + } + }, [autoFocus]); + var children = react__WEBPACK_IMPORTED_MODULE_2__["Children"].toArray(childrenProp); + var hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(children[children.length - 1], ['ListItemSecondaryAction']); + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (instance) { + // #StrictMode ready + listItemRef.current = react_dom__WEBPACK_IMPORTED_MODULE_11__["findDOMNode"](instance); + }, []); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(handleOwnRef, ref); + + var componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, childContext.dense && classes.dense, !disableGutters && classes.gutters, divider && classes.divider, disabled && classes.disabled, button && classes.button, alignItems !== "center" && classes.alignItemsFlexStart, hasSecondaryAction && classes.secondaryAction, selected && classes.selected), + disabled: disabled + }, other); + + var Component = componentProp || 'li'; + + if (button) { + componentProps.component = componentProp || 'div'; + componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.focusVisible, focusVisibleClassName); + Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"]; + } + + if (hasSecondaryAction) { + // Use div by default. + Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li. + + if (ContainerComponent === 'li') { + if (Component === 'li') { + Component = 'div'; + } else if (componentProps.component === 'li') { + componentProps.component = 'div'; + } + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__["default"].Provider, { + value: childContext + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ContainerComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.container, ContainerClassName), + ref: handleRef + }, ContainerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, componentProps, children), children.pop())); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__["default"].Provider, { + value: childContext + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: handleRef + }, componentProps), children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiListItem' +})(ListItem)); + +/***/ }), + +/***/ "7MQn": +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__("lBlV"), + isArrayLike = __webpack_require__("yTJ1"), + isIndex = __webpack_require__("9yx8"), + isObject = __webpack_require__("06hQ"); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; + + +/***/ }), + +/***/ "7MuN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasPassword = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _instance = __webpack_require__("vWU+"); + +var _bitwarden = __webpack_require__("CfF8"); + +var _capability = __webpack_require__("rh8z"); + +/** + * Checks whether the user has a password + * + * @param {import("../CozyClient").default} client - The CozyClient instance + * @returns {Promise<boolean>} - Returns true if the user has a password + */ +var hasPassword = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var hasExtensionInstalled, hasPasswordDefined; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _bitwarden.hasExtensionInstalledAttribute)(client); + + case 2: + hasExtensionInstalled = _context.sent; + _context.next = 5; + return (0, _instance.hasPasswordDefinedAttribute)(client); + + case 5: + hasPasswordDefined = _context.sent; + return _context.abrupt("return", !((0, _capability.isMagicLink)(client) || (0, _capability.isOIDC)(client)) || hasExtensionInstalled || hasPasswordDefined); + + case 7: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function hasPassword(_x) { + return _ref.apply(this, arguments); + }; +}(); + +exports.hasPassword = hasPassword; + +/***/ }), + +/***/ "7NDg": +/***/ (function(module, exports, __webpack_require__) { + +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__("DnF+"); +var IObject = __webpack_require__("pTfQ"); +var toObject = __webpack_require__("05TQ"); +var toLength = __webpack_require__("yhnj"); +var asc = __webpack_require__("BZRD"); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; + + +/***/ }), + +/***/ "7SIe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStackParser", function() { return createStackParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFunctionName", function() { return getFunctionName; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nodeStackLineParser", function() { return nodeStackLineParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stackParserFromStackParserOptions", function() { return stackParserFromStackParserOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripSentryFramesAndReverse", function() { return stripSentryFramesAndReverse; }); +/* harmony import */ var _buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); + + +const STACKTRACE_LIMIT = 50; + +/** + * Creates a stack parser with the supplied line parsers + * + * StackFrames are returned in the correct order for Sentry Exception + * frames and with Sentry SDK internal frames removed from the top and bottom + * + */ +function createStackParser(...parsers) { + const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]); + + return (stack, skipFirst = 0) => { + const frames = []; + + for (const line of stack.split('\n').slice(skipFirst)) { + // https://github.com/getsentry/sentry-javascript/issues/5459 + // Remove webpack (error: *) wrappers + const cleanedLine = line.replace(/\(error: (.*)\)/, '$1'); + + for (const parser of sortedParsers) { + const frame = parser(cleanedLine); + + if (frame) { + frames.push(frame); + break; + } + } + } + + return stripSentryFramesAndReverse(frames); + }; +} + +/** + * Gets a stack parser implementation from Options.stackParser + * @see Options + * + * If options contains an array of line parsers, it is converted into a parser + */ +function stackParserFromStackParserOptions(stackParser) { + if (Array.isArray(stackParser)) { + return createStackParser(...stackParser); + } + return stackParser; +} + +/** + * @hidden + */ +function stripSentryFramesAndReverse(stack) { + if (!stack.length) { + return []; + } + + let localStack = stack; + + const firstFrameFunction = localStack[0].function || ''; + const lastFrameFunction = localStack[localStack.length - 1].function || ''; + + // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) + if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) { + localStack = localStack.slice(1); + } + + // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) + if (lastFrameFunction.indexOf('sentryWrapped') !== -1) { + localStack = localStack.slice(0, -1); + } + + // The frame where the crash happened, should be the last entry in the array + return localStack + .slice(0, STACKTRACE_LIMIT) + .map(frame => ({ + ...frame, + filename: frame.filename || localStack[0].filename, + function: frame.function || '?', + })) + .reverse(); +} + +const defaultFunctionName = '<anonymous>'; + +/** + * Safely extract function name from itself + */ +function getFunctionName(fn) { + try { + if (!fn || typeof fn !== 'function') { + return defaultFunctionName; + } + return fn.name || defaultFunctionName; + } catch (e) { + // Just accessing custom props in some Selenium environments + // can cause a "Permission denied" exception (see raven-js#495). + return defaultFunctionName; + } +} + +// eslint-disable-next-line complexity +function node(getModule) { + const FILENAME_MATCH = /^\s*[-]{4,}$/; + const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + + // eslint-disable-next-line complexity + return (line) => { + if (line.match(FILENAME_MATCH)) { + return { + filename: line, + }; + } + + const lineMatch = line.match(FULL_MATCH); + if (!lineMatch) { + return undefined; + } + + let object; + let method; + let functionName; + let typeName; + let methodName; + + if (lineMatch[1]) { + functionName = lineMatch[1]; + + let methodStart = functionName.lastIndexOf('.'); + if (functionName[methodStart - 1] === '.') { + // eslint-disable-next-line no-plusplus + methodStart--; + } + + if (methodStart > 0) { + object = functionName.substr(0, methodStart); + method = functionName.substr(methodStart + 1); + const objectEnd = object.indexOf('.Module'); + if (objectEnd > 0) { + functionName = functionName.substr(objectEnd + 1); + object = object.substr(0, objectEnd); + } + } + typeName = undefined; + } + + if (method) { + typeName = object; + methodName = method; + } + + if (method === '<anonymous>') { + methodName = undefined; + functionName = undefined; + } + + if (functionName === undefined) { + methodName = methodName || '<anonymous>'; + functionName = typeName ? `${typeName}.${methodName}` : methodName; + } + + const filename = Object(_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([lineMatch, 'access', _ => _[2], 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3('file://')]) ? lineMatch[2].substr(7) : lineMatch[2]; + const isNative = lineMatch[5] === 'native'; + const isInternal = + isNative || (filename && !filename.startsWith('/') && !filename.startsWith('.') && filename.indexOf(':\\') !== 1); + + // in_app is all that's not an internal Node function or a module within node_modules + // note that isNative appears to return true even for node core libraries + // see https://github.com/getsentry/raven-node/issues/176 + const in_app = !isInternal && filename !== undefined && !filename.includes('node_modules/'); + + return { + filename, + module: Object(_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([getModule, 'optionalCall', _4 => _4(filename)]), + function: functionName, + lineno: parseInt(lineMatch[3], 10) || undefined, + colno: parseInt(lineMatch[4], 10) || undefined, + in_app, + }; + }; +} + +/** + * Node.js stack line parser + * + * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`. + * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain + */ +function nodeStackLineParser(getModule) { + return [90, node(getModule)]; +} + + +//# sourceMappingURL=stacktrace.js.map + + +/***/ }), + +/***/ "7UWH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeStringForRegex", function() { return escapeStringForRegex; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMatchingPattern", function() { return isMatchingPattern; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "safeJoin", function() { return safeJoin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snipLine", function() { return snipLine; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringMatchesSomePattern", function() { return stringMatchesSomePattern; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "truncate", function() { return truncate; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); + + +/** + * Truncates given string to the maximum characters count + * + * @param str An object that contains serializable values + * @param max Maximum number of characters in truncated string (0 = unlimited) + * @returns string Encoded + */ +function truncate(str, max = 0) { + if (typeof str !== 'string' || max === 0) { + return str; + } + return str.length <= max ? str : `${str.substr(0, max)}...`; +} + +/** + * This is basically just `trim_line` from + * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 + * + * @param str An object that contains serializable values + * @param max Maximum number of characters in truncated string + * @returns string Encoded + */ +function snipLine(line, colno) { + let newLine = line; + const lineLength = newLine.length; + if (lineLength <= 150) { + return newLine; + } + if (colno > lineLength) { + // eslint-disable-next-line no-param-reassign + colno = lineLength; + } + + let start = Math.max(colno - 60, 0); + if (start < 5) { + start = 0; + } + + let end = Math.min(start + 140, lineLength); + if (end > lineLength - 5) { + end = lineLength; + } + if (end === lineLength) { + start = Math.max(end - 140, 0); + } + + newLine = newLine.slice(start, end); + if (start > 0) { + newLine = `'{snip} ${newLine}`; + } + if (end < lineLength) { + newLine += ' {snip}'; + } + + return newLine; +} + +/** + * Join values in array + * @param input array of values to be joined together + * @param delimiter string to be placed in-between values + * @returns Joined values + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function safeJoin(input, delimiter) { + if (!Array.isArray(input)) { + return ''; + } + + const output = []; + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < input.length; i++) { + const value = input[i]; + try { + output.push(String(value)); + } catch (e) { + output.push('[value cannot be serialized]'); + } + } + + return output.join(delimiter); +} + +/** + * Checks if the given value matches a regex or string + * + * @param value The string to test + * @param pattern Either a regex or a string against which `value` will be matched + * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match + * `pattern` if it contains `pattern`. Only applies to string-type patterns. + */ +function isMatchingPattern( + value, + pattern, + requireExactStringMatch = false, +) { + if (!Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(value)) { + return false; + } + + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isRegExp"])(pattern)) { + return pattern.test(value); + } + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(pattern)) { + return requireExactStringMatch ? value === pattern : value.includes(pattern); + } + + return false; +} + +/** + * Test the given string against an array of strings and regexes. By default, string matching is done on a + * substring-inclusion basis rather than a strict equality basis + * + * @param testString The string to test + * @param patterns The patterns against which to test the string + * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to + * count. If false, `testString` will match a string pattern if it contains that pattern. + * @returns + */ +function stringMatchesSomePattern( + testString, + patterns = [], + requireExactStringMatch = false, +) { + return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch)); +} + +/** + * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to + * `new RegExp()`. + * + * Based on https://github.com/sindresorhus/escape-string-regexp. Vendored to a) reduce the size by skipping the runtime + * type-checking, and b) ensure it gets down-compiled for old versions of Node (the published package only supports Node + * 12+). + * + * @param regexString The string to escape + * @returns An version of the string with all special regex characters escaped + */ +function escapeStringForRegex(regexString) { + // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems + // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20. + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'); +} + + +//# sourceMappingURL=string.js.map + + +/***/ }), + +/***/ "7XCK": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__("g6ov"), + getSymbolsIn = __webpack_require__("S/72"), + keysIn = __webpack_require__("+aIf"); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; + + +/***/ }), + +/***/ "7Y53": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("5ZEc"); +/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("x0Kp"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _Accordion_AccordionContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("VmiN"); + + + +/* eslint-disable jsx-a11y/aria-role */ + + + + + + + + +var styles = function styles(theme) { + var transition = { + duration: theme.transitions.duration.shortest + }; + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + minHeight: 8 * 6, + transition: theme.transitions.create(['min-height', 'background-color'], transition), + padding: theme.spacing(0, 2), + '&:hover:not($disabled)': { + cursor: 'pointer' + }, + '&$expanded': { + minHeight: 64 + }, + '&$focused, &$focusVisible': { + backgroundColor: theme.palette.action.focus + }, + '&$disabled': { + opacity: theme.palette.action.disabledOpacity + } + }, + + /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */ + expanded: {}, + + /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */ + focused: {}, + + /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */ + focusVisible: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the children wrapper element. */ + content: { + display: 'flex', + flexGrow: 1, + transition: theme.transitions.create(['margin'], transition), + margin: '12px 0', + '&$expanded': { + margin: '20px 0' + } + }, + + /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */ + expandIcon: { + transform: 'rotate(0deg)', + transition: theme.transitions.create('transform', transition), + '&:hover': { + // Disable the hover effect for the IconButton, + // because a hover effect should apply to the entire Expand button and + // not only to the IconButton. + backgroundColor: 'transparent' + }, + '&$expanded': { + transform: 'rotate(180deg)' + } + } + }; +}; +var AccordionSummary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function AccordionSummary(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + expandIcon = props.expandIcon, + focusVisibleClassName = props.focusVisibleClassName, + _props$IconButtonProp = props.IconButtonProps, + IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp, + onClick = props.onClick, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "expandIcon", "focusVisibleClassName", "IconButtonProps", "onClick"]); + + var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_Accordion_AccordionContext__WEBPACK_IMPORTED_MODULE_9__["default"]), + _React$useContext$dis = _React$useContext.disabled, + disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis, + expanded = _React$useContext.expanded, + toggle = _React$useContext.toggle; + + var handleChange = function handleChange(event) { + if (toggle) { + toggle(event); + } + + if (onClick) { + onClick(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + focusRipple: false, + disableRipple: true, + disabled: disabled, + component: "div", + "aria-expanded": expanded, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, disabled && classes.disabled, expanded && classes.expanded), + focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.focusVisible, classes.focused, focusVisibleClassName), + onClick: handleChange, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.content, expanded && classes.expanded) + }, children), expandIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_IconButton__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.expandIcon, expanded && classes.expanded), + edge: "end", + component: "div", + tabIndex: null, + role: null, + "aria-hidden": true + }, IconButtonProps), expandIcon)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiAccordionSummary' +})(AccordionSummary)); + +/***/ }), + +/***/ "7Z2w": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("mgiV"); +module.exports = __webpack_require__("kdnj").global; + + +/***/ }), + +/***/ "7ZTE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getStylesCreator; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("j9Ms"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); +/* harmony import */ var _noopTheme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("CHAu"); + + + + +function getStylesCreator(stylesOrCreator) { + var themingEnabled = typeof stylesOrCreator === 'function'; + + if (false) {} + + return { + create: function create(theme, name) { + var styles; + + try { + styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator; + } catch (err) { + if (false) {} + + throw err; + } + + if (!name || !theme.overrides || !theme.overrides[name]) { + return styles; + } + + var overrides = theme.overrides[name]; + + var stylesWithOverrides = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, styles); + + Object.keys(overrides).forEach(function (key) { + if (false) {} + + stylesWithOverrides[key] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["deepmerge"])(stylesWithOverrides[key], overrides[key]); + }); + return stylesWithOverrides; + }, + options: {} + }; +} + +/***/ }), + +/***/ "7ale": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'أقل من ثانية واحدة', + other: 'أقل من {{count}} ثواني' + }, + + xSeconds: { + one: 'ثانية واحدة', + other: '{{count}} ثواني' + }, + + halfAMinute: 'نصف دقيقة', + + lessThanXMinutes: { + one: 'أقل من دقيقة', + other: 'أقل من {{count}} دقيقة' + }, + + xMinutes: { + one: 'دقيقة واحدة', + other: '{{count}} دقائق' + }, + + aboutXHours: { + one: 'ساعة واحدة تقريباً', + other: '{{count}} ساعات تقريباً' + }, + + xHours: { + one: 'ساعة واحدة', + other: '{{count}} ساعات' + }, + + xDays: { + one: 'يوم واحد', + other: '{{count}} أيام' + }, + + aboutXMonths: { + one: 'شهر واحد تقريباً', + other: '{{count}} أشهر تقريباً' + }, + + xMonths: { + one: 'شهر واحد', + other: '{{count}} أشهر' + }, + + aboutXYears: { + one: 'عام واحد تقريباً', + other: '{{count}} أعوام تقريباً' + }, + + xYears: { + one: 'عام واحد', + other: '{{count}} أعوام' + }, + + overXYears: { + one: 'أكثر من عام', + other: 'أكثر من {{count}} أعوام' + }, + + almostXYears: { + one: 'عام واحد تقريباً', + other: '{{count}} أعوام تقريباً' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'في خلال ' + result + } else { + return 'منذ ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "7bGD": +/***/ (function(module, exports) { + +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + + +/***/ }), + +/***/ "7bZ2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GLOBAL_OBJ", function() { return GLOBAL_OBJ; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGlobalObject", function() { return getGlobalObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGlobalSingleton", function() { return getGlobalSingleton; }); +/** Internal global with common properties and Sentry extensions */ + +// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification +// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js +// core-js has the following licence: +// +// Copyright (c) 2014-2022 Denis Pushkarev +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +/** Returns 'obj' if it's the global object, otherwise returns undefined */ +function isGlobalObj(obj) { + return obj && obj.Math == Math ? obj : undefined; +} + +/** Get's the global object for the current JavaScript runtime */ +const GLOBAL_OBJ = + (typeof globalThis == 'object' && isGlobalObj(globalThis)) || + // eslint-disable-next-line no-restricted-globals + (typeof window == 'object' && isGlobalObj(window)) || + (typeof self == 'object' && isGlobalObj(self)) || + (typeof global == 'object' && isGlobalObj(global)) || + (function () { + return this; + })() || + {}; + +/** + * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8 + */ +function getGlobalObject() { + return GLOBAL_OBJ ; +} + +/** + * Returns a global singleton contained in the global `__SENTRY__` object. + * + * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory + * function and added to the `__SENTRY__` object. + * + * @param name name of the global singleton on __SENTRY__ + * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__` + * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value + * @returns the singleton + */ +function getGlobalSingleton(name, creator, obj) { + const gbl = (obj || GLOBAL_OBJ) ; + const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {}); + const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator()); + return singleton; +} + + +//# sourceMappingURL=worldwide.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "7hLD": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.resetFlags = exports.listFlags = exports.initializeFromRemote = exports.initializeFromDOM = exports.initialize = exports.getTemplateData = exports.enable = exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _store = _interopRequireDefault(__webpack_require__("uh8Z")); + +var _dsl = __webpack_require__("v2kV"); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +var store = new _store.default(); +/** + * Public API to use flags + */ + +var flag = function flag() { + var args = [].slice.call(arguments); + + if (args.length === 1) { + return store.get(args[0]); + } else { + store.set(args[0], args[1]); + return args[1]; + } +}; +/** List all flags from the store */ + + +var listFlags = function listFlags() { + return store.keys().sort(); +}; +/** Resets all the flags */ + + +exports.listFlags = listFlags; + +var resetFlags = function resetFlags() { + listFlags().forEach(function (name) { + return store.remove(name); + }); +}; +/** + * Enables several flags + * + * Supports passing either object flagName -> flagValue + * + * @param {string[]|Object} flagsToEnable + */ + + +exports.resetFlags = resetFlags; + +var enable = function enable(flagsToEnable) { + var flagNameToValue; + + if (Array.isArray(flagsToEnable)) { + if (flagsToEnable.length === 0) { + return; + } // eslint-disable-next-line no-console + + + console.log('flags.enable: Deprecation warning: prefer to use an object { flag1: true, flag2: true } instead of an array when using flags.enable'); + flagNameToValue = flagsToEnable.map(function (flagName) { + return [flagName, true]; + }); + } else if (typeof flagsToEnable === 'object') { + flagNameToValue = Object.entries(flagsToEnable); + } + + if (!flagNameToValue) { + return; + } + + var _iterator = _createForOfIteratorHelper(flagNameToValue), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = (0, _slicedToArray2.default)(_step.value, 2), + flagName = _step$value[0], + flagValue = _step$value[1]; + + flag(flagName, flagValue); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } +}; +/** + * Initializes flags from the remote endpoint serving instance flags + * + * @private + * @see https://docs.cozy.io/en/cozy-stack/settings/#get-settingsflags + * @param {CozyClient} client + */ + + +exports.enable = enable; + +var initializeFromRemote = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var _yield$client$query, attributes; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return client.query((0, _dsl.Q)('io.cozy.settings').getById('flags')); + + case 2: + _yield$client$query = _context.sent; + attributes = _yield$client$query.data.attributes; + enable(attributes); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function initializeFromRemote(_x) { + return _ref.apply(this, arguments); + }; +}(); + +exports.initializeFromRemote = initializeFromRemote; + +var capitalize = function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +}; + +var getTemplateData = function getTemplateData(attr) { + if (typeof document === 'undefined') { + return null; + } + + var allDataNode = document.querySelector('[data-cozy]'); + var attrNode = document.querySelector("[data-cozy-".concat(attr, "]")); + + try { + if (allDataNode) { + return JSON.parse(allDataNode.dataset.cozy)[attr]; + } else if (attrNode) { + // eslint-disable-next-line no-console + console.warn('Prefer to use [data-cozy] to store template data. <div data-cozy="{{.CozyData}}></div>. "'); + return JSON.parse(attrNode.dataset["cozy".concat(capitalize(attr))]); + } else { + return null; + } + } catch (e) { + return null; + } +}; +/** + * Initialize from the template data injected by cozy-stack into the DOM + * + * @private + * @see https://docs.cozy.io/en/cozy-stack/client-app-dev/#good-practices-for-your-application + * + * @returns {Boolean} - False is DOM initialization could not be completed, true otherwise + */ + + +exports.getTemplateData = getTemplateData; + +var initializeFromDOM = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var domData; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + domData = getTemplateData('flags'); + + if (domData) { + _context2.next = 3; + break; + } + + return _context2.abrupt("return", false); + + case 3: + enable(domData); + return _context2.abrupt("return", true); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function initializeFromDOM() { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Initialize flags from DOM if possible, otherwise from remote endpoint + * + * @example + * + * Flags can be taken from the flags injected by the stack + * ``` + * <div data-cozy="{{ .CozyData }}"></div> + * + * // not recommended but possible + * <div data-flags="{{ .Flags }}"></div> + * ```` + * + * @param {CozyClient} client - A CozyClient + * @return {Promise} Resolves when flags have been initialized + */ + + +exports.initializeFromDOM = initializeFromDOM; + +var initialize = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client) { + var domRes; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return initializeFromDOM(); + + case 2: + domRes = _context3.sent; + + if (!(domRes == false)) { + _context3.next = 6; + break; + } + + _context3.next = 6; + return initializeFromRemote(client); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function initialize(_x2) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.initialize = initialize; + +var FlagClientPlugin = /*#__PURE__*/function () { + function FlagClientPlugin(client) { + (0, _classCallCheck2.default)(this, FlagClientPlugin); + this.client = client; + this.handleLogin = this.handleLogin.bind(this); + this.handleLogout = this.handleLogout.bind(this); + this.client.on('login', this.handleLogin); + this.client.on('logout', this.handleLogout); + this.setupInitializing(); + if (client.isLogged) this.handleLogin(); + } + /** + * Fetches and sets flags from remote + */ + + + (0, _createClass2.default)(FlagClientPlugin, [{ + key: "refresh", + value: function () { + var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return flag.initializeFromRemote(this.client); + + case 2: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function refresh() { + return _refresh.apply(this, arguments); + } + + return refresh; + }() + /** + * Sets up a promise that can be awaited to wait for flag complete + * initialization + */ + + }, { + key: "setupInitializing", + value: function setupInitializing() { + var _this = this; + + this.initializing = new Promise(function (resolve) { + _this.resolveInitializing = resolve; + }); + } + }, { + key: "handleLogin", + value: function () { + var _handleLogin = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return flag.initialize(this.client); + + case 2: + this.resolveInitializing(); + this.client.emit('plugin:flag:login'); + + case 4: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function handleLogin() { + return _handleLogin.apply(this, arguments); + } + + return handleLogin; + }() + }, { + key: "handleLogout", + value: function () { + var _handleLogout = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() { + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + flag.reset(); + this.setupInitializing(); + this.client.emit('plugin:flag:logout'); + + case 3: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function handleLogout() { + return _handleLogout.apply(this, arguments); + } + + return handleLogout; + }() + }]); + return FlagClientPlugin; +}(); + +FlagClientPlugin.pluginName = 'flags'; +flag.store = store; +flag.list = listFlags; +flag.reset = resetFlags; +flag.enable = enable; +flag.initializeFromRemote = initializeFromRemote; +flag.initializeFromDOM = initializeFromDOM; +flag.initialize = initialize; +flag.plugin = FlagClientPlugin; +var _default = flag; +exports.default = _default; + +/***/ }), + +/***/ "7hhC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" +}), 'Cancel')); + +/***/ }), + +/***/ "7i6R": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var RequireObjectCoercible = __webpack_require__("YG3o"); +var ToString = __webpack_require__("xTjC"); +var callBound = __webpack_require__("KqZw"); +var $replace = callBound('String.prototype.replace'); + +var mvsIsWS = (/^\s$/).test('\u180E'); +/* eslint-disable no-control-regex */ +var leftWhitespace = mvsIsWS + ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ + : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; +var rightWhitespace = mvsIsWS + ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ + : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/; +/* eslint-enable no-control-regex */ + +module.exports = function trim() { + var S = ToString(RequireObjectCoercible(this)); + return $replace($replace(S, leftWhitespace, ''), rightWhitespace, ''); +}; + + +/***/ }), + +/***/ "7mpy": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.numbers = void 0; +var numbers = { + maxAttempts: 20 +}; +exports.numbers = numbers; + +/***/ }), + +/***/ "7myG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeToSize", function() { return normalizeToSize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "walk", function() { return visit; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); +/* harmony import */ var _memo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZGFV"); +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pt+A"); +/* harmony import */ var _stacktrace_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7SIe"); + + + + + +/** + * Recursively normalizes the given object. + * + * - Creates a copy to prevent original input mutation + * - Skips non-enumerable properties + * - When stringifying, calls `toJSON` if implemented + * - Removes circular references + * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format + * - Translates known global objects/classes to a string representations + * - Takes care of `Error` object serialization + * - Optionally limits depth of final output + * - Optionally limits number of properties/elements included in any single object/array + * + * @param input The object to be normalized. + * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.) + * @param maxProperties The max number of elements or properties to be included in any single array or + * object in the normallized output. + * @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function normalize(input, depth = +Infinity, maxProperties = +Infinity) { + try { + // since we're at the outermost level, we don't provide a key + return visit('', input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } +} + +/** JSDoc */ +function normalizeToSize( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + object, + // Default Node.js REPL depth + depth = 3, + // 100kB, as 200kB is max payload size, so half sounds reasonable + maxSize = 100 * 1024, +) { + const normalized = normalize(object, depth); + + if (jsonSize(normalized) > maxSize) { + return normalizeToSize(object, depth - 1, maxSize); + } + + return normalized ; +} + +/** + * Visits a node to perform normalization on it + * + * @param key The key corresponding to the given node + * @param value The node to be visited + * @param depth Optional number indicating the maximum recursion depth + * @param maxProperties Optional maximum number of properties/elements included in any single object/array + * @param memo Optional Memo class handling decycling + */ +function visit( + key, + value, + depth = +Infinity, + maxProperties = +Infinity, + memo = Object(_memo_js__WEBPACK_IMPORTED_MODULE_1__["memoBuilder"])(), +) { + const [memoize, unmemoize] = memo; + + // Get the simple cases out of the way first + if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isNaN"])(value))) { + return value ; + } + + const stringified = stringifyValue(key, value); + + // Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`. + // Everything else will have already been serialized, so if we don't see that pattern, we're done. + if (!stringified.startsWith('[object ')) { + return stringified; + } + + // From here on, we can assert that `value` is either an object or an array. + + // Do not normalize objects that we know have already been normalized. As a general rule, the + // "__sentry_skip_normalization__" property should only be used sparingly and only should only be set on objects that + // have already been normalized. + if ((value )['__sentry_skip_normalization__']) { + return value ; + } + + // We're also done if we've reached the max depth + if (depth === 0) { + // At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`. + return stringified.replace('object ', ''); + } + + // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now. + if (memoize(value)) { + return '[Circular ~]'; + } + + // If the value has a `toJSON` method, we call it to extract more information + const valueWithToJSON = value ; + if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') { + try { + const jsonValue = valueWithToJSON.toJSON(); + // We need to normalize the return value of `.toJSON()` in case it has circular references + return visit('', jsonValue, depth - 1, maxProperties, memo); + } catch (err) { + // pass (The built-in `toJSON` failed, but we can still try to do it ourselves) + } + } + + // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse + // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each + // property/entry, and keep track of the number of items we add to it. + const normalized = (Array.isArray(value) ? [] : {}) ; + let numAdded = 0; + + // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant + // properties are non-enumerable and otherwise would get missed. + const visitable = Object(_object_js__WEBPACK_IMPORTED_MODULE_2__["convertToPlainObject"])(value ); + + for (const visitKey in visitable) { + // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) { + continue; + } + + if (numAdded >= maxProperties) { + normalized[visitKey] = '[MaxProperties ~]'; + break; + } + + // Recursively visit all the child nodes + const visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo); + + numAdded += 1; + } + + // Once we've visited all the branches, remove the parent from memo storage + unmemoize(value); + + // Return accumulated values + return normalized; +} + +/** + * Stringify the given value. Handles various known special values and types. + * + * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn + * the number 1231 into "[Object Number]", nor on `null`, as it will throw. + * + * @param value The value to stringify + * @returns A stringified representation of the given value + */ +function stringifyValue( + key, + // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for + // our internal use, it'll do + value, +) { + try { + if (key === 'domain' && value && typeof value === 'object' && (value )._events) { + return '[Domain]'; + } + + if (key === 'domainEmitter') { + return '[DomainEmitter]'; + } + + // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first + // which won't throw if they are not present. + + if (typeof global !== 'undefined' && value === global) { + return '[Global]'; + } + + // eslint-disable-next-line no-restricted-globals + if (typeof window !== 'undefined' && value === window) { + return '[Window]'; + } + + // eslint-disable-next-line no-restricted-globals + if (typeof document !== 'undefined' && value === document) { + return '[Document]'; + } + + // React's SyntheticEvent thingy + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isSyntheticEvent"])(value)) { + return '[SyntheticEvent]'; + } + + if (typeof value === 'number' && value !== value) { + return '[NaN]'; + } + + // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own) + if (value === void 0) { + return '[undefined]'; + } + + if (typeof value === 'function') { + return `[Function: ${Object(_stacktrace_js__WEBPACK_IMPORTED_MODULE_3__["getFunctionName"])(value)}]`; + } + + if (typeof value === 'symbol') { + return `[${String(value)}]`; + } + + // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion + if (typeof value === 'bigint') { + return `[BigInt: ${String(value)}]`; + } + + // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting + // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as + // `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class), + // we can make sure that only plain objects come out that way. + return `[object ${(Object.getPrototypeOf(value) ).constructor.name}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } +} + +/** Calculates bytes size of input string */ +function utf8Length(value) { + // eslint-disable-next-line no-bitwise + return ~-encodeURI(value).split(/%..|./).length; +} + +/** Calculates bytes size of input object */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function jsonSize(value) { + return utf8Length(JSON.stringify(value)); +} + + +//# sourceMappingURL=normalize.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "7oz+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatMuiErrorMessage; }); +/** + * WARNING: Don't import this directly. + * Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead. + * @param {number} code + */ +function formatMuiErrorMessage(code) { + // Apply babel-plugin-transform-template-literals in loose mode + // loose mode is safe iff we're concatenating primitives + // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose + + /* eslint-disable prefer-template */ + var url = 'https://mui.com/production-error/?code=' + code; + + for (var i = 1; i < arguments.length; i += 1) { + // rest params over-transpile for this case + // eslint-disable-next-line prefer-rest-params + url += '&args[]=' + encodeURIComponent(arguments[i]); + } + + return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.'; + /* eslint-enable prefer-template */ +} + +/***/ }), + +/***/ "7ryk": +/***/ (function(module, exports) { + +function declension (scheme, count) { + // scheme for count=1 exists + if (scheme.one !== undefined && count === 1) { + return scheme.one + } + + var rem10 = count % 10 + var rem100 = count % 100 + + // 1, 21, 31, ... + if (rem10 === 1 && rem100 !== 11) { + return scheme.singularNominative.replace('{{count}}', count) + + // 2, 3, 4, 22, 23, 24, 32 ... + } else if ((rem10 >= 2 && rem10 <= 4) && (rem100 < 10 || rem100 > 20)) { + return scheme.singularGenitive.replace('{{count}}', count) + + // 5, 6, 7, 8, 9, 10, 11, ... + } else { + return scheme.pluralGenitive.replace('{{count}}', count) + } +} + +function buildLocalizeTokenFn (scheme) { + return function (count, options) { + if (options.addSuffix) { + if (options.comparison > 0) { + if (scheme.future) { + return declension(scheme.future, count) + } else { + return 'через ' + declension(scheme.regular, count) + } + } else { + if (scheme.past) { + return declension(scheme.past, count) + } else { + return declension(scheme.regular, count) + ' назад' + } + } + } else { + return declension(scheme.regular, count) + } + } +} + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: buildLocalizeTokenFn({ + regular: { + one: 'меньше секунды', + singularNominative: 'меньше {{count}} секунды', + singularGenitive: 'меньше {{count}} секунд', + pluralGenitive: 'меньше {{count}} секунд' + }, + future: { + one: 'меньше, чем через секунду', + singularNominative: 'меньше, чем через {{count}} секунду', + singularGenitive: 'меньше, чем через {{count}} секунды', + pluralGenitive: 'меньше, чем через {{count}} секунд' + } + }), + + xSeconds: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} секунда', + singularGenitive: '{{count}} секунды', + pluralGenitive: '{{count}} секунд' + }, + past: { + singularNominative: '{{count}} секунду назад', + singularGenitive: '{{count}} секунды назад', + pluralGenitive: '{{count}} секунд назад' + }, + future: { + singularNominative: 'через {{count}} секунду', + singularGenitive: 'через {{count}} секунды', + pluralGenitive: 'через {{count}} секунд' + } + }), + + halfAMinute: function (_, options) { + if (options.addSuffix) { + if (options.comparison > 0) { + return 'через полминуты' + } else { + return 'полминуты назад' + } + } + + return 'полминуты' + }, + + lessThanXMinutes: buildLocalizeTokenFn({ + regular: { + one: 'меньше минуты', + singularNominative: 'меньше {{count}} минуты', + singularGenitive: 'меньше {{count}} минут', + pluralGenitive: 'меньше {{count}} минут' + }, + future: { + one: 'меньше, чем через минуту', + singularNominative: 'меньше, чем через {{count}} минуту', + singularGenitive: 'меньше, чем через {{count}} минуты', + pluralGenitive: 'меньше, чем через {{count}} минут' + } + }), + + xMinutes: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} минута', + singularGenitive: '{{count}} минуты', + pluralGenitive: '{{count}} минут' + }, + past: { + singularNominative: '{{count}} минуту назад', + singularGenitive: '{{count}} минуты назад', + pluralGenitive: '{{count}} минут назад' + }, + future: { + singularNominative: 'через {{count}} минуту', + singularGenitive: 'через {{count}} минуты', + pluralGenitive: 'через {{count}} минут' + } + }), + + aboutXHours: buildLocalizeTokenFn({ + regular: { + singularNominative: 'около {{count}} часа', + singularGenitive: 'около {{count}} часов', + pluralGenitive: 'около {{count}} часов' + }, + future: { + singularNominative: 'приблизительно через {{count}} час', + singularGenitive: 'приблизительно через {{count}} часа', + pluralGenitive: 'приблизительно через {{count}} часов' + } + }), + + xHours: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} час', + singularGenitive: '{{count}} часа', + pluralGenitive: '{{count}} часов' + } + }), + + xDays: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} день', + singularGenitive: '{{count}} дня', + pluralGenitive: '{{count}} дней' + } + }), + + aboutXMonths: buildLocalizeTokenFn({ + regular: { + singularNominative: 'около {{count}} месяца', + singularGenitive: 'около {{count}} месяцев', + pluralGenitive: 'около {{count}} месяцев' + }, + future: { + singularNominative: 'приблизительно через {{count}} месяц', + singularGenitive: 'приблизительно через {{count}} месяца', + pluralGenitive: 'приблизительно через {{count}} месяцев' + } + }), + + xMonths: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} месяц', + singularGenitive: '{{count}} месяца', + pluralGenitive: '{{count}} месяцев' + } + }), + + aboutXYears: buildLocalizeTokenFn({ + regular: { + singularNominative: 'около {{count}} года', + singularGenitive: 'около {{count}} лет', + pluralGenitive: 'около {{count}} лет' + }, + future: { + singularNominative: 'приблизительно через {{count}} год', + singularGenitive: 'приблизительно через {{count}} года', + pluralGenitive: 'приблизительно через {{count}} лет' + } + }), + + xYears: buildLocalizeTokenFn({ + regular: { + singularNominative: '{{count}} год', + singularGenitive: '{{count}} года', + pluralGenitive: '{{count}} лет' + } + }), + + overXYears: buildLocalizeTokenFn({ + regular: { + singularNominative: 'больше {{count}} года', + singularGenitive: 'больше {{count}} лет', + pluralGenitive: 'больше {{count}} лет' + }, + future: { + singularNominative: 'больше, чем через {{count}} год', + singularGenitive: 'больше, чем через {{count}} года', + pluralGenitive: 'больше, чем через {{count}} лет' + } + }), + + almostXYears: buildLocalizeTokenFn({ + regular: { + singularNominative: 'почти {{count}} год', + singularGenitive: 'почти {{count}} года', + pluralGenitive: 'почти {{count}} лет' + }, + future: { + singularNominative: 'почти через {{count}} год', + singularGenitive: 'почти через {{count}} года', + pluralGenitive: 'почти через {{count}} лет' + } + }) + } + + function localize (token, count, options) { + options = options || {} + return distanceInWordsLocale[token](count, options) + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "7ttI": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EGL_DAY_DOCTYPE = void 0; +var EGL_DAY_DOCTYPE = 'com.grandlyon.egl.day'; +exports.EGL_DAY_DOCTYPE = EGL_DAY_DOCTYPE; + +/***/ }), + +/***/ "7txB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instanceReq", function() { return instanceReq; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contextReq", function() { return contextReq; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diskUsageReq", function() { return diskUsageReq; }); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("xEu0"); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cozy_client__WEBPACK_IMPORTED_MODULE_0__); + +var instanceReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('instance'); + }, + as: 'instanceQuery' +}; +var contextReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('context'); + }, + as: 'contextQuery' +}; +var diskUsageReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('disk-usage'); + }, + as: 'diskUsageQuery' +}; + +/***/ }), + +/***/ "7tyZ": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__("XeXG"); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("9YbP")(module))) + +/***/ }), + +/***/ "7u78": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.ButtonLink = exports.Button = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +var _classnames = _interopRequireDefault(__webpack_require__("1ytp")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _Icon = _interopRequireWildcard(__webpack_require__("AHiN")); +var _Spinner = _interopRequireDefault(__webpack_require__("ImID")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _excluded = ["busy", "disabled"], + _excluded2 = ["children", "icon", "iconOnly", "label", "subtle", "className", "extension", "round", "size", "theme", "align", "extraRight", "tag"]; +var styles = { + "c-btn": "styles__c-btn___-2Vnj", + "c-btn--regular": "styles__c-btn--regular___2HUly", + "c-btn--ghost": "styles__c-btn--ghost___1HC3L", + "c-btn--highlight": "styles__c-btn--highlight___2jRfu", + "c-btn--alpha": "styles__c-btn--alpha___2ECZi", + "c-btn--action": "styles__c-btn--action___36KFm", + "c-btn--close": "styles__c-btn--close___3f0AP", + "c-btn--danger": "styles__c-btn--danger___17T_C", + "c-btn--secondary": "styles__c-btn--secondary___3Br_N", + "c-btn--danger-outline": "styles__c-btn--danger-outline___1mO1B", + "c-btn--text": "styles__c-btn--text___2Vp-2", + "c-btn--left": "styles__c-btn--left___23VNa", + "c-btn--center": "styles__c-btn--center___16_Xh", + "c-btn--right": "styles__c-btn--right___wklLq", + "c-btn--tiny": "styles__c-btn--tiny___1pFv6", + "c-btn--small": "styles__c-btn--small___3ArkI", + "c-btn--large": "styles__c-btn--large___2gatN", + "c-btn--full": "styles__c-btn--full___2VmR1", + "c-btn--narrow": "styles__c-btn--narrow___27FHD", + "c-btn--round": "styles__c-btn--round___1Lkyl", + "c-btn--subtle": "styles__c-btn--subtle___OknKf", + "spin": "styles__spin___alZ_V", + "shake": "styles__shake___2NWWT" +}; +var btnClass = function btnClass(options) { + var _cx; + var className = options.className, + extension = options.extension, + size = options.size, + theme = options.theme, + variant = options.variant, + round = options.round, + align = options.align; + return (0, _classnames.default)(styles['c-btn'], (_cx = {}, (0, _defineProperty2.default)(_cx, styles["c-btn--".concat(theme)], theme), (0, _defineProperty2.default)(_cx, styles["c-btn--".concat(size)], size !== 'normal'), (0, _defineProperty2.default)(_cx, styles["c-btn--".concat(variant)], variant), (0, _defineProperty2.default)(_cx, styles["c-btn--".concat(extension)], extension), (0, _defineProperty2.default)(_cx, styles["c-btn--".concat(align)], align), (0, _defineProperty2.default)(_cx, styles["c-btn--round"], round), _cx), className); +}; +var transformToAria = function transformToAria(tag) { + return function (props) { + var busy = props.busy, + disabled = props.disabled, + newProps = (0, _objectWithoutProperties2.default)(props, _excluded); + if (busy) { + newProps['aria-busy'] = true; + } + if (disabled) { + newProps['aria-disabled'] = true; + } + if (tag === 'button' && disabled) { + newProps['disabled'] = true; + } + return newProps; + }; +}; +var tagToTransformProps = { + button: transformToAria('button'), + a: transformToAria('a') +}; +var identity = function identity(x) { + return x; +}; +var sizeToIconSize = { + tiny: 8, + small: 12, + large: 18 +}; +var BaseButton = function BaseButton(props) { + var children = props.children, + icon = props.icon, + iconOnly = props.iconOnly, + label = props.label, + subtle = props.subtle, + className = props.className, + extension = props.extension, + round = props.round, + size = props.size, + theme = props.theme, + align = props.align, + extraRight = props.extraRight, + Tag = props.tag, + restProps = (0, _objectWithoutProperties2.default)(props, _excluded2); + var transformProps = tagToTransformProps[Tag] || identity; + var tooltip = iconOnly ? label : null; + var iconOnlyClass = iconOnly ? 'u-visuallyhidden' : null; + return /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({}, transformProps(restProps), { + className: btnClass({ + extension: extension, + align: align, + round: round, + size: size, + theme: theme, + className: className, + variant: subtle && 'subtle' + }), + title: tooltip + }), /*#__PURE__*/_react.default.createElement("span", null, _Icon.default.isProperIcon(icon) ? /*#__PURE__*/_react.default.createElement(_Icon.default, { + size: sizeToIconSize[size], + icon: icon, + "aria-hidden": true, + focusable: "false" + }) : icon, label && /*#__PURE__*/_react.default.createElement("span", { + className: iconOnlyClass + }, label), children, extraRight && /*#__PURE__*/_react.default.createElement("span", { + className: "u-ml-auto" + }, extraRight), restProps.busy && /*#__PURE__*/_react.default.createElement(_Icon.default, { + size: sizeToIconSize[size], + icon: _Spinner.default, + spin: true, + className: "u-ml-half", + "aria-hidden": true, + focusable: "false" + }))); +}; +var Button = function Button(props) { + return /*#__PURE__*/_react.default.createElement(BaseButton, props); +}; +exports.Button = Button; +var ButtonLink = function ButtonLink(props) { + return /*#__PURE__*/_react.default.createElement(BaseButton, props); +}; +exports.ButtonLink = ButtonLink; +var DefaultButton = function DefaultButton(props) { + if (!props.tag) { + return /*#__PURE__*/_react.default.createElement(Button, props); + } else { + return /*#__PURE__*/_react.default.createElement(BaseButton, props); + } +}; +var _default = DefaultButton; // Proptypes (unfortunately, Styleguidist does not pick +// proptypes coming from a spread so we have to keep both +// proptypes in sync) +exports.default = _default; +Button.propTypes = { + /** DEPRECATED: please use label and icon */ + children: _propTypes.default.node, + /** Label of the button */ + label: _propTypes.default.node.isRequired, + /** Icon of the button */ + icon: _propTypes.default.oneOfType([_propTypes.default.node, _Icon.iconPropType]), + /** Displays only the icon, not the label */ + iconOnly: _propTypes.default.bool, + theme: _propTypes.default.string, + size: _propTypes.default.oneOf(['tiny', 'small', 'large', 'normal']), + /** Spacing of the button */ + extension: _propTypes.default.oneOf(['narrow', 'full']), + /** Button's label alignment */ + align: _propTypes.default.oneOf(['left', 'right', 'center']), + /** Will make the button round */ + round: _propTypes.default.bool, + /** Extra class */ + className: _propTypes.default.string, + /** What to do on click */ + onClick: _propTypes.default.func, + /** Adds an element to the right of the button */ + extraRight: _propTypes.default.PropTypes.node, + // Only for Button + + /** Will display a spinner if true */ + busy: _propTypes.default.bool, + /** Disables the button */ + disabled: _propTypes.default.bool, + /** Type of the underlying `<button />` */ + type: _propTypes.default.oneOf(['button', 'reset', 'submit']), + /** Use the `subtle` alternative look for the Button */ + subtle: _propTypes.default.bool +}; +Button.defaultProps = { + type: 'submit', + tag: 'button', + size: 'normal', + align: 'center' +}; +ButtonLink.defaultProps = { + tag: 'a' +}; + +/***/ }), + +/***/ "7u7H": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/logout.svg` to regenerate; + +function SvgLogout(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M12.586 9H5a1 1 0 110-2h7.586l-1.293-1.293a1 1 0 111.414-1.414l3 3a1 1 0 010 1.414l-3 3a1 1 0 01-1.414-1.414L12.586 9zM0 1a1 1 0 112 0v14a1 1 0 01-2 0V1z" + })); +} +var _default = SvgLogout; +exports.default = _default; + +/***/ }), + +/***/ "7wnO": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__("eckd"); +var dPs = __webpack_require__("ptZF"); +var enumBugKeys = __webpack_require__("OAwH"); +var IE_PROTO = __webpack_require__("X27e")('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__("aKmJ")('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__("W53A").appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), + +/***/ "7wwr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("E8//"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + color: 'inherit', + display: 'table-row', + verticalAlign: 'middle', + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + '&$hover:hover': { + backgroundColor: theme.palette.action.hover + }, + '&$selected, &$selected:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.selectedOpacity) + } + }, + + /* Pseudo-class applied to the root element if `selected={true}`. */ + selected: {}, + + /* Pseudo-class applied to the root element if `hover={true}`. */ + hover: {}, + + /* Styles applied to the root element if table variant="head". */ + head: {}, + + /* Styles applied to the root element if table variant="footer". */ + footer: {} + }; +}; +var defaultComponent = 'tr'; +/** + * Will automatically set dynamic row height + * based on the material table element parent (head, body, etc). + */ + +var TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableRow(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? defaultComponent : _props$component, + _props$hover = props.hover, + hover = _props$hover === void 0 ? false : _props$hover, + _props$selected = props.selected, + selected = _props$selected === void 0 ? false : _props$selected, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component", "hover", "selected"]); + + var tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__["default"]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, tablelvl2 && { + 'head': classes.head, + 'footer': classes.footer + }[tablelvl2.variant], hover && classes.hover, selected && classes.selected), + role: Component === defaultComponent ? null : 'row' + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTableRow' +})(TableRow)); + +/***/ }), + +/***/ "7wxI": +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__("Q6Yr")('native-function-to-string', Function.toString); + + +/***/ }), + +/***/ "7yia": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fetchTimeSeriesByIntervalAndSource = exports.saveTimeSeries = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _dsl = __webpack_require__("v2kV"); + +var validateTimeSeriesFormat = function validateTimeSeriesFormat(timeseries) { + if (!timeseries.startDate || !timeseries.endDate) { + throw new Error('You must specify a startDate and endDate for the time serie'); + } + + if (!Date.parse(timeseries.startDate) || !Date.parse(timeseries.endDate)) { + throw new Error('Invalid date format for the time serie'); + } + + if (!timeseries.dataType) { + throw new Error('You must specify a dataType for the time serie'); + } + + if (!timeseries.series || !Array.isArray(timeseries.series)) { + throw new Error('You must specify a series array for the time serie'); + } +}; +/** + * @typedef TimeSeries + * @property dataType {String} - The type of time series, e.g. 'electricity' + * @property startDate {Date} - The starting date of the series + * @property endDate {Date} - The end date of the series + * @property endType {Date} - The starting date of the series + * @property source {String} - The data source, e.g. 'enedis.fr' + * @property theme {String} - The theme used to group time series, e.g. 'energy' + * @property series {Array} - An array of objects representing the time series + */ + +/** + * Helper to save a time series document. + * + * @param {object} client - The CozyClient instance + * + + * @param {TimeSeries} timeseriesOption - The time series to save + */ + + +var saveTimeSeries = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, timeseriesOption) { + var dataType, series, startDate, endDate, source, theme, doctype, timeseries; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + dataType = timeseriesOption.dataType, series = timeseriesOption.series, startDate = timeseriesOption.startDate, endDate = timeseriesOption.endDate, source = timeseriesOption.source, theme = timeseriesOption.theme; + validateTimeSeriesFormat({ + dataType: dataType, + series: series, + startDate: startDate, + endDate: endDate, + source: source + }); + doctype = "io.cozy.timeseries.".concat(dataType); + timeseries = { + _type: doctype, + startDate: startDate, + endDate: endDate, + source: source, + theme: theme, + series: series + }; + return _context.abrupt("return", client.save(timeseries)); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function saveTimeSeries(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Helper to retrieve time series by their date interval and source. + * + * @param {object} client - The CozyClient instance + * @param {object} params - The query params + * @param {Date} params.startDate - The starting date of the series + * @param {Date} params.endDate - The end date of the series + * @param {String} params.dataType - The type of time series, e.g. 'electricity' + * @param {String} params.source - The data source, e.g. 'enedis.fr' + * @param {number} params.limit - Number of serie items to retrieve + * + * @typedef TimeSeriesJSONAPI + * @property data {Array<TimeSeries>} - The JSON-API data response + * @returns {Promise<TimeSeriesJSONAPI>} The TimeSeries found by the query in JSON-API format + */ + + +exports.saveTimeSeries = saveTimeSeries; + +var fetchTimeSeriesByIntervalAndSource = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, _ref2) { + var startDate, endDate, dataType, source, limit, doctype, query; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + startDate = _ref2.startDate, endDate = _ref2.endDate, dataType = _ref2.dataType, source = _ref2.source, limit = _ref2.limit; + + /** + * @type {import("../types").Doctype} + */ + doctype = "io.cozy.timeseries.".concat(dataType); + query = (0, _dsl.Q)(doctype).where({ + source: source, + startDate: { + $gte: startDate + }, + endDate: { + $lte: endDate + } + }).indexFields(['source', 'startDate', 'endDate']).sortBy([{ + source: 'desc' + }, { + startDate: 'desc' + }, { + endDate: 'desc' + }]).limitBy(limit || 5); + return _context2.abrupt("return", client.query(query)); + + case 4: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function fetchTimeSeriesByIntervalAndSource(_x3, _x4) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.fetchTimeSeriesByIntervalAndSource = fetchTimeSeriesByIntervalAndSource; + +/***/ }), + +/***/ "7zRI": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _NativeIntentProvider = __webpack_require__("pv+S"); + +Object.keys(_NativeIntentProvider).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _NativeIntentProvider[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _NativeIntentProvider[key]; + } + }); +}); + +var _WebviewIntentProvider = __webpack_require__("S7Vc"); + +Object.keys(_WebviewIntentProvider).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _WebviewIntentProvider[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _WebviewIntentProvider[key]; + } + }); +}); + +var _NativeContext = __webpack_require__("pP+T"); + +Object.keys(_NativeContext).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _NativeContext[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _NativeContext[key]; + } + }); +}); + +var _WebviewContext = __webpack_require__("Dl8V"); + +Object.keys(_WebviewContext).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _WebviewContext[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _WebviewContext[key]; + } + }); +}); + +var _useNativeIntent = __webpack_require__("rufD"); + +Object.keys(_useNativeIntent).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _useNativeIntent[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _useNativeIntent[key]; + } + }); +}); + +var _useWebviewIntent = __webpack_require__("dMYP"); + +Object.keys(_useWebviewIntent).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _useWebviewIntent[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _useWebviewIntent[key]; + } + }); +}); + +/***/ }), + +/***/ "7zid": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("VDWE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "80eX": +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__("LRPZ"); +var core = __webpack_require__("WSXa"); +var fails = __webpack_require__("enc5"); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), + +/***/ "831c": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarCenter", function() { return setBarCenter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarLeft", function() { return setBarLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarRight", function() { return setBarRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarSearch", function() { return setBarSearch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarLeft", function() { return BarLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarRight", function() { return BarRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarCenter", function() { return BarCenter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarSearch", function() { return BarSearch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateAccessToken", function() { return updateAccessToken; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Kv7L"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6TOZ"); +/* harmony import */ var cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("jTJl"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("gc+w"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return _lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setLocale"]; }); + +/* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("6oOG"); +/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("LegK"); +/* harmony import */ var _locales_en_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("9+Ek"); +var _locales_en_json__WEBPACK_IMPORTED_MODULE_8___namespace = /*#__PURE__*/__webpack_require__.t("9+Ek", 1); +/* harmony import */ var _locales_fr_json__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("TbTh"); +var _locales_fr_json__WEBPACK_IMPORTED_MODULE_9___namespace = /*#__PURE__*/__webpack_require__.t("TbTh", 1); +/* harmony import */ var _locales_es_json__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("gRKh"); +var _locales_es_json__WEBPACK_IMPORTED_MODULE_10___namespace = /*#__PURE__*/__webpack_require__.t("gRKh", 1); + + + +/* global __VERSION__ */ + + + + + + + + + +var locales = { + en: _locales_en_json__WEBPACK_IMPORTED_MODULE_8__, + fr: _locales_fr_json__WEBPACK_IMPORTED_MODULE_9__, + es: _locales_es_json__WEBPACK_IMPORTED_MODULE_10__ +}; + +var createBarElement = function createBarElement() { + var targetName = Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__["isMobileApp"])() ? 'mobile' : 'browser'; + var barNode = document.createElement('div'); + barNode.setAttribute('id', 'coz-bar'); + barNode.setAttribute('role', 'banner'); + barNode.classList.add("coz-target--".concat(targetName)); + return barNode; +}; + +var injectBarInDOM = function injectBarInDOM(data) { + if (document.getElementById('coz-bar') !== null) { + return; + } + + var barNode = createBarElement(); + var appNode = document.querySelector(_dom__WEBPACK_IMPORTED_MODULE_7__["APP_SELECTOR"]); + + if (!appNode) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar is looking for a \"".concat(_dom__WEBPACK_IMPORTED_MODULE_7__["APP_SELECTOR"], "\" tag that contains your application and can't find it :'(\u2026 The BAR is now disabled")); + return null; + } + + document.body.insertBefore(barNode, appNode); // method to put cozy-bar z-index on the top when Drawer visible and vice versa + + data.onDrawer = function (visible) { + barNode.dataset.drawerVisible = visible; + }; // specific layout behaviour if banner displayed + + + if (data.userActionRequired) { + document.body.classList.add('has-banner'); + } + + return barNode; +}; + +var renderBar = function renderBar(barNode, options) { + // import React related modules on init only + var React = __webpack_require__("ivGQ"); + + var _require = __webpack_require__("Y/FK"), + render = _require.render; + + var _require2 = __webpack_require__("IGOm"), + connect = _require2.connect, + Provider = _require2.Provider; + + var I18n = __webpack_require__("nUfk").default; + + var Bar = __webpack_require__("4pse").default; + + var CozyProvider = __webpack_require__("xEu0").CozyProvider; + + var cozyClient = options.cozyClient; // we connect the I18n component to the store to listen + // locale change from the api setLocale() + + var EnhancedI18n = connect(function (state) { + return { + lang: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["getLocale"])(state) + }; + })(I18n); + var barComponent = /*#__PURE__*/React.createElement(Provider, { + store: options.reduxStore + }, /*#__PURE__*/React.createElement(EnhancedI18n, { + dictRequire: function dictRequire(lang) { + return locales[lang]; + } + }, /*#__PURE__*/React.createElement(cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__["BreakpointsProvider"], null, cozyClient ? /*#__PURE__*/React.createElement(CozyProvider, { + client: cozyClient + }, /*#__PURE__*/React.createElement(Bar, options)) : /*#__PURE__*/React.createElement(Bar, options)))); + render(barComponent, barNode); // for testing only + + return barComponent; +}; + +var makeCozyClientAutomatically = function makeCozyClientAutomatically(_ref) { + var cozyURL = _ref.cozyURL, + token = _ref.token, + isPublic = _ref.isPublic; + var ccURI = cozyURL || Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultStackURL"])(isPublic); + var ccToken = token || Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultToken"])(isPublic); + var ccOptions = { + uri: ccURI, + token: ccToken + }; + + var CozyClient = __webpack_require__("xEu0").default; // eslint-disable-next-line no-console + + + console.warn('Automatically made cozyClient. Options: ', ccOptions); + return new CozyClient(ccOptions); +}; + +var exposedAPI = {}; +/** + * Initializes the cozy bar + * + * It can be initialized either with a cozyClient instance + * + * @param {Object} options - Options + * @param {string} options.appName - App name to be displayed in the bar + * @param {string} options.appNamePrefix - App name prefix to be displayed in the bar + * @param {string} options.appSlug - App slug to be displayed in the bar + * @param {string} options.lang - Language for the bar + * @param {string} options.iconPath - Icon path for the bar + * @param {string} options.isInvertedTheme - For use Home icon with inverted color + * @param {Object} options.cozyClient - a cozy client instance + * @param {string} options.cozyURL - URL or domain of the stack + * @param {string} options.token - Access token for the stack + * @param {boolean} options.replaceTitleOnMobile - Replace title on mobile (default: false) + * @param {boolean} options.isPublic - Is public (default: false) + * @param {Function} options.onLogout - On logout callback + * @example + * import cozyBar from 'cozy-bar' + * cozyBar.init({ appName: 'My awesome app', appNamePrefix: 'Cozy', lang: 'en', iconPath: 'icon.svg', cozyClient: client }) + */ + +var init = /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { + var _ref3, + appName, + _ref3$appNamePrefix, + appNamePrefix, + _ref3$appSlug, + appSlug, + lang, + _ref3$iconPath, + iconPath, + isInvertedTheme, + cozyClient, + cozyURL, + token, + _ref3$replaceTitleOnM, + replaceTitleOnMobile, + _ref3$isPublic, + isPublic, + onLogOut, + getOrCreateStore, + reduxStore, + apiMethods, + options, + barNode, + _args = arguments; + + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, appName = _ref3.appName, _ref3$appNamePrefix = _ref3.appNamePrefix, appNamePrefix = _ref3$appNamePrefix === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getAppNamePrefix"])() : _ref3$appNamePrefix, _ref3$appSlug = _ref3.appSlug, appSlug = _ref3$appSlug === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getAppSlug"])() : _ref3$appSlug, lang = _ref3.lang, _ref3$iconPath = _ref3.iconPath, iconPath = _ref3$iconPath === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultIcon"])() : _ref3$iconPath, isInvertedTheme = _ref3.isInvertedTheme, cozyClient = _ref3.cozyClient, cozyURL = _ref3.cozyURL, token = _ref3.token, _ref3$replaceTitleOnM = _ref3.replaceTitleOnMobile, replaceTitleOnMobile = _ref3$replaceTitleOnM === void 0 ? false : _ref3$replaceTitleOnM, _ref3$isPublic = _ref3.isPublic, isPublic = _ref3$isPublic === void 0 ? false : _ref3$isPublic, onLogOut = _ref3.onLogOut; + + // Force public mode in `/public` URLs + if (!isPublic && /^\/public/.test(window.location.pathname)) { + isPublic = true; + } + + if (!cozyClient) { + cozyClient = makeCozyClientAutomatically({ + cozyURL: cozyURL, + token: token, + isPublic: isPublic + }); + } // store + + + getOrCreateStore = __webpack_require__("phkM").default; + reduxStore = getOrCreateStore(); + reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setInfos"])(appName, appNamePrefix, appSlug)); + _lib_stack__WEBPACK_IMPORTED_MODULE_4__["default"].init({ + cozyClient: cozyClient, + onCreate: function onCreate(data) { + return reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["onRealtimeCreate"])(data)); + }, + onDelete: function onDelete(data) { + return reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["onRealtimeDelete"])(data)); + } + }); + + if (lang) { + reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setLocale"])(lang)); + } // Assign all api methods to the bar object + + + apiMethods = Object(_lib_api__WEBPACK_IMPORTED_MODULE_6__["createBarAPI"])(reduxStore); + Object.assign(exposedAPI, apiMethods); + options = { + appName: appName, + isInvertedTheme: isInvertedTheme, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + cozyClient: cozyClient, + iconPath: iconPath, + replaceTitleOnMobile: replaceTitleOnMobile, + isPublic: isPublic, + onLogOut: onLogOut, + userActionRequired: Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getUserActionRequired"])(), + reduxStore: reduxStore + }; + barNode = injectBarInDOM(options); + renderBar(barNode, options); + + case 13: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function init() { + return _ref2.apply(this, arguments); + }; +}(); + +var updateAccessToken = function updateAccessToken(accessToken) { + _lib_stack__WEBPACK_IMPORTED_MODULE_4__["default"].updateAccessToken(accessToken); +}; + +var proxiedAPI = Object(_lib_api__WEBPACK_IMPORTED_MODULE_6__["createBarProxiedAPI"])(exposedAPI); +var setBarCenter = proxiedAPI.setBarCenter, + setBarLeft = proxiedAPI.setBarLeft, + setBarRight = proxiedAPI.setBarRight, + setBarSearch = proxiedAPI.setBarSearch, + BarCenter = proxiedAPI.BarCenter, + BarRight = proxiedAPI.BarRight, + BarLeft = proxiedAPI.BarLeft, + BarSearch = proxiedAPI.BarSearch, + setTheme = proxiedAPI.setTheme, + setWebviewContext = proxiedAPI.setWebviewContext; +var version = "\"0.0.0-development\""; + + +/***/ }), + +/***/ "85H2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" +}), 'Person')); + +/***/ }), + +/***/ "870Y": +/***/ (function(module, exports) { + +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + +/***/ }), + +/***/ "87D/": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + isObject = __webpack_require__("06hQ"); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; + + +/***/ }), + +/***/ "889z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithHoles; }); +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +/***/ }), + +/***/ "88Tv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setRef; }); +// TODO v5: consider to make it private +function setRef(ref, value) { + if (typeof ref === 'function') { + ref(value); + } else if (ref) { + ref.current = value; + } +} + +/***/ }), + +/***/ "8A9P": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsPropertyKey = __webpack_require__("90jO"); +var Type = __webpack_require__("6qXu"); + +// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty + +module.exports = function HasProperty(O, P) { + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: `O` must be an Object'); + } + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: `P` must be a Property Key'); + } + return P in O; +}; + + +/***/ }), + +/***/ "8Ax9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var grey = { + 50: '#fafafa', + 100: '#f5f5f5', + 200: '#eeeeee', + 300: '#e0e0e0', + 400: '#bdbdbd', + 500: '#9e9e9e', + 600: '#757575', + 700: '#616161', + 800: '#424242', + 900: '#212121', + A100: '#d5d5d5', + A200: '#aaaaaa', + A400: '#303030', + A700: '#616161' +}; +/* harmony default export */ __webpack_exports__["default"] = (grey); + +/***/ }), + +/***/ "8CAL": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"), + root = __webpack_require__("GMq6"); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; + + +/***/ }), + +/***/ "8Gjz": +/***/ (function(module, exports, __webpack_require__) { + +var isDate = __webpack_require__("no2e") + +/** + * @category Common Helpers + * @summary Is the given date valid? + * + * @description + * Returns false if argument is Invalid Date and true otherwise. + * Invalid Date is a Date, whose time value is NaN. + * + * Time value of Date: http://es5.github.io/#x15.9.1.1 + * + * @param {Date} date - the date to check + * @returns {Boolean} the date is valid + * @throws {TypeError} argument must be an instance of Date + * + * @example + * // For the valid date: + * var result = isValid(new Date(2014, 1, 31)) + * //=> true + * + * @example + * // For the invalid date: + * var result = isValid(new Date('')) + * //=> false + */ +function isValid (dirtyDate) { + if (isDate(dirtyDate)) { + return !isNaN(dirtyDate) + } else { + throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date') + } +} + +module.exports = isValid + + +/***/ }), + +/***/ "8J30": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("7ryk") +var buildFormatLocale = __webpack_require__("cTIL") + +/** + * @category Locales + * @summary Russian locale. + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "8K8d": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.QueryIDGenerator = exports.getQueryFromSlice = exports.receiveQueryError = exports.receiveQueryResult = exports.loadQuery = exports.initQuery = exports.default = exports.updateData = exports.makeSorterFromDefinition = exports.mergeSelectorAndPartialIndex = exports.convert$gtNullSelectors = exports.sortAndLimitDocsIds = exports.isReceivingData = exports.isQueryAction = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _mapValues = _interopRequireDefault(__webpack_require__("7FTH")); + +var _groupBy = _interopRequireDefault(__webpack_require__("t5bv")); + +var _difference = _interopRequireDefault(__webpack_require__("9Dxo")); + +var _intersection = _interopRequireDefault(__webpack_require__("ZyOJ")); + +var _concat = _interopRequireDefault(__webpack_require__("u1Q0")); + +var _isPlainObject = _interopRequireDefault(__webpack_require__("JZOQ")); + +var _uniq = _interopRequireDefault(__webpack_require__("efAt")); + +var _orderBy = _interopRequireDefault(__webpack_require__("v5XQ")); + +var _isString = _interopRequireDefault(__webpack_require__("X6P4")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _sift = _interopRequireDefault(__webpack_require__("wf6R")); + +var _cozyFlags = _interopRequireDefault(__webpack_require__("8ZpT")); + +var _documents = __webpack_require__("sAh9"); + +var _mutations = __webpack_require__("1I2P"); + +var _helpers = __webpack_require__("ZGxo"); + +var _dsl = __webpack_require__("v2kV"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var INIT_QUERY = 'INIT_QUERY'; +var LOAD_QUERY = 'LOAD_QUERY'; +var RECEIVE_QUERY_RESULT = 'RECEIVE_QUERY_RESULT'; +var RECEIVE_QUERY_ERROR = 'RECEIVE_QUERY_ERROR'; // Read if the devtools are open to store the execution time +// This is done at runtime to not read the value everytime +// we receive a result. So you have to refresh your page +// in order to get the stats + +var executionStatsEnabled = (0, _cozyFlags.default)('debug'); + +var isQueryAction = function isQueryAction(action) { + return [INIT_QUERY, LOAD_QUERY, RECEIVE_QUERY_RESULT, RECEIVE_QUERY_ERROR].indexOf(action.type) !== -1; +}; + +exports.isQueryAction = isQueryAction; + +var isReceivingData = function isReceivingData(action) { + return action.type === RECEIVE_QUERY_RESULT; +}; +/** @type {import("../types").QueryState} */ + + +exports.isReceivingData = isReceivingData; +var queryInitialState = { + id: null, + definition: null, + fetchStatus: 'pending', + isFetching: null, + lastFetch: null, + lastUpdate: null, + lastErrorUpdate: null, + lastError: null, + hasMore: false, + count: 0, + fetchedPagesCount: 0, + data: [], + bookmark: null +}; +/** + * Return the docs ids accordingly to the given sort and fetched docs + * + * @param {import("../types").QueryState} queryState - Current state + * @param {import("../types").DocumentsStateSlice} documents - Reference to the documents slice + * @param {Array<string>} ids - The updated ids after query + * @param {object} params - The additional params + * @param {number} params.count - The count of retrieved docs + * @param {number} params.fetchedPagesCount - The number of pages already fetched + * @returns {Array<string>} The list of sorted ids + */ + +var sortAndLimitDocsIds = function sortAndLimitDocsIds(queryState, documents, ids, _ref) { + var count = _ref.count, + fetchedPagesCount = _ref.fetchedPagesCount; + var evaluatedIds = (0, _toConsumableArray2.default)(ids); + + if (queryState.definition.sort && documents) { + var sorter = makeSorterFromDefinition(queryState.definition); + var allDocs = documents[queryState.definition.doctype]; + var docs = allDocs ? evaluatedIds.map(function (_id) { + return allDocs[_id]; + }).filter(Boolean) : []; + evaluatedIds = sorter(docs).map(_helpers.properId); + } + + var limit = queryState.definition.limit; + + if (limit) { + var sliceCount; + + if (count < limit) { + // When there are less results than the limit, this is either the first + // or last paginated query. + sliceCount = fetchedPagesCount > 1 ? limit * (fetchedPagesCount - 1) + count : count; + } else { + sliceCount = limit * fetchedPagesCount; + } + + evaluatedIds = evaluatedIds.slice(0, sliceCount); + } + + return evaluatedIds; +}; +/** + * Return the query docs ids, taken from the action response and the documents' slice + * + * @param {import("../types").QueryState} queryState - Current state + * @param {object} response - The action response + * @param {import("../types").DocumentsStateSlice} documents - Reference to the documents slice + * @param {object} params - The additional params + * @param {number} params.count - The count of retrieved docs + * @param {number} params.fetchedPagesCount - The number of pages already fetched + * @returns {Array<string>} The list of sorted ids + */ + + +exports.sortAndLimitDocsIds = sortAndLimitDocsIds; + +var updateQueryDataFromResponse = function updateQueryDataFromResponse(queryState, response, documents, _ref2) { + var count = _ref2.count, + fetchedPagesCount = _ref2.fetchedPagesCount; + var updatedIds = (0, _uniq.default)([].concat((0, _toConsumableArray2.default)(queryState.data), (0, _toConsumableArray2.default)(response.data.map(_helpers.properId)))); + return sortAndLimitDocsIds(queryState, documents, updatedIds, { + count: count, + fetchedPagesCount: fetchedPagesCount + }); +}; +/** + * Reducer for a query slice + * + * @param {import("../types").QueryState} state - Current state + * @param {any} action - Redux action + * @param {import("../types").DocumentsStateSlice} documents - Reference to the next documents slice + * @returns {import("../types").QueryState} - Next state + */ + + +var query = function query() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : queryInitialState; + var action = arguments.length > 1 ? arguments[1] : undefined; + var documents = arguments.length > 2 ? arguments[2] : undefined; + + switch (action.type) { + case INIT_QUERY: + if (state.lastUpdate && state.id === action.queryId && state.definition === action.queryDefinition) { + return state; + } + + return _objectSpread(_objectSpread({}, state), {}, { + id: action.queryId, + definition: action.queryDefinition, + options: action.options, + fetchStatus: state.lastUpdate ? state.fetchStatus : 'pending' + }); + + case LOAD_QUERY: + if (state.fetchStatus === 'loading') { + return state; + } + + if (state.fetchStatus === 'loaded' && action.backgroundFetching) { + return _objectSpread(_objectSpread({}, state), {}, { + fetchStatus: 'loaded', + isFetching: true + }); + } + + return _objectSpread(_objectSpread({}, state), {}, { + fetchStatus: 'loading' + }); + + case RECEIVE_QUERY_RESULT: + { + var response = action.response; // Data can be null when we get a 404 not found + // see Collection.get() + // but we still need to update the fetchStatus. + + if (!response.data) { + return _objectSpread(_objectSpread({}, state), {}, { + fetchStatus: 'loaded', + isFetching: action.backgroundFetching ? false : null, + lastFetch: Date.now(), + lastUpdate: Date.now() + }); + } + /** @type {Partial<import("../types").QueryState>} */ + + + var common = _objectSpread({ + fetchStatus: 'loaded', + isFetching: action.backgroundFetching ? false : null, + lastFetch: Date.now(), + lastUpdate: Date.now() + }, executionStatsEnabled && { + execution_stats: response.execution_stats + }); + + if (!Array.isArray(response.data)) { + return _objectSpread(_objectSpread(_objectSpread({}, state), common), {}, { + hasMore: false, + count: 1, + data: [(0, _helpers.properId)(response.data)] + }); + } + + var count = response.meta && response.meta.count ? response.meta.count : response.data.length; + + if (action.backgroundFetching) { + return _objectSpread(_objectSpread(_objectSpread({}, state), common), {}, { + bookmark: response.bookmark || null, + hasMore: response.next !== undefined ? response.next : state.hasMore, + count: count, + data: response.data.map(_helpers.properId) + }); + } + + var fetchedPagesCount = state.fetchedPagesCount + 1; + var data = updateQueryDataFromResponse(state, response, documents, { + count: count, + fetchedPagesCount: fetchedPagesCount + }); + return _objectSpread(_objectSpread(_objectSpread({}, state), common), {}, { + bookmark: response.bookmark || null, + hasMore: response.next !== undefined ? response.next : state.hasMore, + count: count, + fetchedPagesCount: fetchedPagesCount, + data: data + }); + } + + case RECEIVE_QUERY_ERROR: + return _objectSpread(_objectSpread({}, state), {}, { + id: action.queryId, + fetchStatus: 'failed', + isFetching: action.backgroundFetching ? false : null, + lastError: action.error, + lastErrorUpdate: Date.now() + }); + + default: + return state; + } +}; +/** + * Normalize sift selector + * + * @returns {object} + */ + + +var convert$gtNullSelectors = function convert$gtNullSelectors(selector) { + var result = {}; + + for (var _i = 0, _Object$entries = Object.entries(selector); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + + var convertedValue = (0, _isPlainObject.default)(value) ? convert$gtNullSelectors(value) : value; + var convertedKey = key === '$gt' && convertedValue === null ? '$gtnull' : key; + result[convertedKey] = convertedValue; + } + + return result; +}; +/** + * Merges query selectors with query partial indexes + * + * @param {object} queryDefinition - A query definition + * @returns {object} A query definition selector + */ + + +exports.convert$gtNullSelectors = convert$gtNullSelectors; + +var mergeSelectorAndPartialIndex = function mergeSelectorAndPartialIndex(queryDefinition) { + return _objectSpread(_objectSpread({}, (0, _get.default)(queryDefinition, 'selector')), (0, _get.default)(queryDefinition, 'partialFilter')); +}; +/** + * @param {QueryDefinition} queryDefinition - A query definition + * @returns {function(import("../types").CozyClientDocument): boolean} + */ + + +exports.mergeSelectorAndPartialIndex = mergeSelectorAndPartialIndex; + +var getSelectorFilterFn = function getSelectorFilterFn(queryDefinition) { + if (queryDefinition.selector || queryDefinition.partialFilter) { + var selectors = mergeSelectorAndPartialIndex(queryDefinition); // sift does not work like couchdb when using { $gt: null } as a selector, so we use a custom operator + + _sift.default.use({ + $gtnull: function $gtnull(_selectorValue, actualValue) { + return !!actualValue; + } + }); + + return (0, _sift.default)(convert$gtNullSelectors(selectors)); + } else if (queryDefinition.id) { + /** @type {object} */ + var siftQuery = { + _id: queryDefinition.id + }; + return (0, _sift.default)(siftQuery); + } else if (queryDefinition.ids) { + /** @type {object} */ + var _siftQuery = { + _id: { + $in: queryDefinition.ids + } + }; + return (0, _sift.default)(_siftQuery); + } else { + return null; + } +}; +/** + * + * Returns a predicate function that checks if a document should be + * included in the result of the query. + * + * @param {import("../types").QueryState} query - Definition of the query + * @returns {function(import("../types").CozyClientDocument): boolean} Predicate function + */ + + +var getQueryDocumentsChecker = function getQueryDocumentsChecker(query) { + var qdoctype = query.definition.doctype; + var selectorFilterFn = getSelectorFilterFn(query.definition); + return function (datum) { + var ddoctype = datum._type; + if (ddoctype !== qdoctype) return false; + if (datum._deleted) return false; + if (!selectorFilterFn) return true; + return !!selectorFilterFn(datum); + }; +}; + +var makeCaseInsensitiveStringSorter = function makeCaseInsensitiveStringSorter(attrName) { + return function (item) { + var attrValue = (0, _get.default)(item, attrName); + return (0, _isString.default)(attrValue) ? attrValue.toLowerCase() : attrValue; + }; +}; +/** + * Creates a sort function from a definition. + * + * Used to sort query results inside the store when creating a file or + * receiving updates. + * + * @param {QueryDefinition} definition - A query definition + * @returns {function(Array<import("../types").CozyClientDocument>): Array<import("../types").CozyClientDocument>} + * + * @private + */ + + +var makeSorterFromDefinition = function makeSorterFromDefinition(definition) { + var sort = definition.sort; + + if (!sort) { + return function (docs) { + return docs; + }; + } else if (!Array.isArray(definition.sort)) { + _logger.default.warn('Correct update of queries with a sort that is not an array is not supported. Use an array as argument of QueryDefinition::sort'); + + return function (docs) { + return docs; + }; + } else { + var attributeOrders = sort.map(function (x) { + return Object.entries(x)[0]; + }); + var attrs = attributeOrders.map(function (x) { + return x[0]; + }).map(makeCaseInsensitiveStringSorter); + var orders = attributeOrders.map(function (x) { + return x[1]; + }); + return function (docs) { + return (0, _orderBy.default)(docs, attrs, orders); + }; + } +}; +/** + * Updates query state when new data comes in + * + * @param {import("../types").QueryState} query - Current query state + * @param {Array<import("../types").CozyClientDocument>} newData - New documents (in most case from the server) + * @param {import("../types").DocumentsStateSlice} documents - A reference to the documents slice + * @returns {import("../types").QueryState} - Updated query state + */ + + +exports.makeSorterFromDefinition = makeSorterFromDefinition; + +var updateData = function updateData(query, newData, documents) { + var belongsToQuery = getQueryDocumentsChecker(query); + var res = (0, _mapValues.default)((0, _groupBy.default)(newData, belongsToQuery), function (docs) { + return docs.map(_helpers.properId); + }); + var _res$true = res.true, + matchedIds = _res$true === void 0 ? [] : _res$true, + _res$false = res.false, + unmatchedIds = _res$false === void 0 ? [] : _res$false; + var originalIds = query.data; + var autoUpdate = query.options && query.options.autoUpdate; + var shouldRemove = !autoUpdate || autoUpdate.remove !== false; + var shouldAdd = !autoUpdate || autoUpdate.add !== false; + var shouldUpdate = !autoUpdate || autoUpdate.update !== false; + var toRemove = shouldRemove ? (0, _intersection.default)(originalIds, unmatchedIds) : []; + var toAdd = shouldAdd ? (0, _difference.default)(matchedIds, originalIds) : []; + var toUpdate = shouldUpdate ? (0, _intersection.default)(originalIds, matchedIds) : []; + var changed = toRemove.length || toAdd.length || toUpdate.length; // concat doesn't check duplicates (contrarily to union), which is ok as + // toAdd does not contain any id present in originalIds, by construction. + // It is also faster than union. + + var updatedData = (0, _difference.default)((0, _concat.default)(originalIds, toAdd), toRemove); + var fetchedPagesCount = query.fetchedPagesCount; + var docsIds = sortAndLimitDocsIds(query, documents, updatedData, { + count: updatedData.length, + fetchedPagesCount: fetchedPagesCount + }); + return _objectSpread(_objectSpread({}, query), {}, { + data: docsIds, + count: docsIds.length, + fetchedPagesCount: fetchedPagesCount, + lastUpdate: changed ? Date.now() : query.lastUpdate + }); +}; +/** + * Creates a function that returns an updated query state + * from an action + * + * @param {object} action - A redux action + * @param {import("../types").DocumentsStateSlice} documents - Reference to documents slice + * @returns {function(import("../types").QueryState): import("../types").QueryState} - Updater query state + */ + + +exports.updateData = updateData; + +var autoQueryUpdater = function autoQueryUpdater(action, documents) { + return function (query) { + var data = (0, _get.default)(action, 'response.data') || (0, _get.default)(action, 'definition.document'); + if (!data) return query; + + if (!Array.isArray(data)) { + data = [data]; + } + + if (!data.length) { + return query; + } + + if (query.definition.doctype !== data[0]._type) { + return query; + } + + return updateData(query, data, documents); + }; +}; +/** + * Creates a function that returns an updated query state + * from an action + * + * @param {object} action - A redux action + * @param {import("../types").DocumentsStateSlice} documents - Reference to documents slice + * @returns {function(import("../types").QueryState): import("../types").QueryState} - Updater query state + */ + + +var manualQueryUpdater = function manualQueryUpdater(action, documents) { + return function (query) { + var updateQueries = action.updateQueries; + var response = action.response; + var updater = updateQueries[query.id]; + + if (!updater) { + return query; + } + + var doctype = query.definition.doctype; + var oldData = query.data; + var oldDocs = mapIdsToDocuments(documents, doctype, oldData); + var newData = updater(oldDocs, response); + var newDataIds = newData.map(_helpers.properId); + return _objectSpread(_objectSpread({}, query), {}, { + data: newDataIds, + count: newDataIds.length, + lastUpdate: Date.now() + }); + }; +}; +/** + * @param {import("../types").QueriesStateSlice} state - Redux slice containing all the query states indexed by name + * @param {object} action - Income redux action + * @param {import("../types").DocumentsStateSlice} documents - Reference to documents slice + * @param {boolean} haveDocumentsChanged - Has the document slice changed with current action + * @returns {import("../types").QueriesStateSlice} + */ + + +var queries = function queries() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + var documents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var haveDocumentsChanged = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + + if (action.type == INIT_QUERY) { + var newQueryState = query(state[action.queryId], action, documents); // Do not create new object unnecessarily + + if (newQueryState === state[action.queryId]) { + return state; + } + + return _objectSpread(_objectSpread({}, state), {}, (0, _defineProperty2.default)({}, action.queryId, newQueryState)); + } + + if (isQueryAction(action)) { + var updater = autoQueryUpdater(action, documents); + return (0, _mapValues.default)(state, function (queryState) { + if (queryState.id == action.queryId) { + return query(queryState, action, documents); + } else if (haveDocumentsChanged) { + return updater(queryState); + } else { + return queryState; + } + }); + } + + if ((0, _mutations.isReceivingMutationResult)(action)) { + var _updater = action.updateQueries ? manualQueryUpdater(action, documents) : autoQueryUpdater(action, documents); + + return (0, _mapValues.default)(state, _updater); + } + + return state; +}; + +var _default = queries; +/** + * Create the query states in the store. Queries are indexed + * in the store by queryId + * + * @param {string} queryId Name/id of the query + * @param {QueryDefinition} queryDefinition - Definition of the created query + * @param {import("../types").QueryOptions} [options] - Options for the created query + * @returns {object} Redux action to dispatch + */ + +exports.default = _default; + +var initQuery = function initQuery(queryId, queryDefinition) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (!queryDefinition.doctype) { + throw new Error('Cannot init query with no doctype'); + } + + return { + type: INIT_QUERY, + queryId: queryId, + queryDefinition: queryDefinition, + options: options + }; +}; +/** + * Update the fetchStatus when the query is loading + * + * @param {string} queryId - id of the query + * @param {import("../types").QueryOptions} [options] - Options for the created query + * @returns {object} Redux action to dispatch + */ + + +exports.initQuery = initQuery; + +var loadQuery = function loadQuery(queryId, options) { + return _objectSpread({ + type: LOAD_QUERY, + queryId: queryId + }, options); +}; +/** + * Update the fetchStatus when the query is loading + * + * @param {string} queryId - id of the query + * @param {object} response - The action response + * @param {import("../types").QueryOptions} [options] - Options for the created query + * @returns {object} Redux action to dispatch + */ + + +exports.loadQuery = loadQuery; + +var receiveQueryResult = function receiveQueryResult(queryId, response) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return _objectSpread({ + type: RECEIVE_QUERY_RESULT, + queryId: queryId, + response: response + }, options); +}; +/** + * Update the fetchStatus when the query is loading + * + * @param {string} queryId - id of the query + * @param {object} error - The action error + * @param {import("../types").QueryOptions} [options] - Options for the created query + * @returns {object} Redux action to dispatch + */ + + +exports.receiveQueryResult = receiveQueryResult; + +var receiveQueryError = function receiveQueryError(queryId, error) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return _objectSpread({ + type: RECEIVE_QUERY_ERROR, + queryId: queryId, + error: error + }, options); +}; // selectors + + +exports.receiveQueryError = receiveQueryError; + +var mapIdsToDocuments = function mapIdsToDocuments(documents, doctype, ids) { + return ids.map(function (id) { + return (0, _documents.getDocumentFromSlice)(documents, doctype, id); + }); +}; + +var getQueryFromSlice = function getQueryFromSlice(state, queryId, documents) { + if (!state || !state[queryId]) { + return _objectSpread(_objectSpread({}, queryInitialState), {}, { + id: queryId, + data: null + }); + } + + var query = state[queryId]; + return documents ? _objectSpread(_objectSpread({}, query), {}, { + data: mapIdsToDocuments(documents, query.definition.doctype, query.data) + }) : query; +}; + +exports.getQueryFromSlice = getQueryFromSlice; + +var QueryIDGenerator = /*#__PURE__*/function () { + function QueryIDGenerator() { + (0, _classCallCheck2.default)(this, QueryIDGenerator); + this.idCounter = 1; + } + /** + * Generates a random id for unamed queries + */ + + + (0, _createClass2.default)(QueryIDGenerator, [{ + key: "generateRandomId", + value: function generateRandomId() { + var id = this.idCounter; + this.idCounter++; + return id.toString(); + } + /** + * Generates an id for queries + * If the query is a getById only query, + * we can generate a name for it. + * + * If not, let's generate a random id + * + * @param {QueryDefinition} queryDefinition The query definition + * @returns {string} + */ + + }, { + key: "generateId", + value: function generateId(queryDefinition) { + if (!(0, _dsl.isAGetByIdQuery)(queryDefinition)) { + return this.generateRandomId(); + } else { + var id = queryDefinition.id, + doctype = queryDefinition.doctype; + return "".concat(doctype, "/").concat(id); + } + } + }]); + return QueryIDGenerator; +}(); + +exports.QueryIDGenerator = QueryIDGenerator; +QueryIDGenerator.UNNAMED = 'unnamed'; + +/***/ }), + +/***/ "8Lvr": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("ub0a"); +module.exports = __webpack_require__("WSXa").String.trimRight; + + +/***/ }), + +/***/ "8P/a": +/***/ (function(module, exports) { + +var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + +function quote(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; +} + +function str(key, holder) { + // Produce a string from holder[key]. + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + + // If the value has a toJSON method, call it to obtain a replacement value. + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + + // What happens next depends on the value's type. + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + // JSON numbers must be finite. Encode non-finite numbers as null. + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + return String(value); + + case 'object': + if (!value) return 'null'; + gap += indent; + partial = []; + + // Array.isArray + if (Object.prototype.toString.apply(value) === '[object Array]') { + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + + // Join all of the elements together, separated with commas, and + // wrap them in brackets. + v = partial.length === 0 ? '[]' : gap ? + '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + + // If the replacer is an array, use it to select the members to be + // stringified. + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + else { + // Otherwise, iterate through all of the keys in the object. + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + + // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + v = partial.length === 0 ? '{}' : gap ? + '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : + '{' + partial.join(',') + '}'; + gap = mind; + return v; + } +} + +module.exports = function (value, replacer, space) { + var i; + gap = ''; + indent = ''; + + // If the space parameter is a number, make an indent string containing that + // many spaces. + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + } + // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent = space; + } + + // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + rep = replacer; + if (replacer && typeof replacer !== 'function' + && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + + // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + return str('', {'': value}); +}; + + +/***/ }), + +/***/ "8Sc7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +/** + * Caches promises while they are pending + * Serves to dedupe equal queries requested at the same time + */ +var PromiseCache = /*#__PURE__*/function () { + function PromiseCache() { + (0, _classCallCheck2.default)(this, PromiseCache); + + /** + * Holds pending promises + * + * @type {Object.<string, Promise>} + */ + this.pending = {}; + } + /** + * Tries to find a pending promise corresponding to the result of keyFunc + * - If not found, promiseFunc is executed and the resulting promise is stored while it's pending + * - If found, it is immediately returned + * + * @template T + * @param {function(): Promise<T>} promiseFunc - Not executed only if an "equal" promise is already pending. + * @param {function(): string} keyFunc - Returns a key to find in cache to find a pending promise. + * @returns {Promise<T>} + */ + + + (0, _createClass2.default)(PromiseCache, [{ + key: "exec", + value: function () { + var _exec = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(promiseFunc, keyFunc) { + var key, already, prom, response; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + key = keyFunc(); + already = this.pending[key]; + + if (already) { + prom = already; + } else { + prom = promiseFunc(); + this.pending[key] = prom; + } + + _context.prev = 3; + _context.next = 6; + return prom; + + case 6: + response = _context.sent; + return _context.abrupt("return", response); + + case 8: + _context.prev = 8; + this.pending[key] = null; + return _context.finish(8); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[3,, 8, 11]]); + })); + + function exec(_x, _x2) { + return _exec.apply(this, arguments); + } + + return exec; + }() + /** + * + * @param {function(): string} keyFunc - Returns a key to find in cache to find a pending promise. + * @returns {Promise | null} + */ + + }, { + key: "get", + value: function get(keyFunc) { + var key = keyFunc(); + var already = this.pending[key]; + if (already) return already; + return null; + } + }]); + return PromiseCache; +}(); + +var _default = PromiseCache; +exports.default = _default; + +/***/ }), + +/***/ "8U3o": +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__("v64C"), + arrayEach = __webpack_require__("e3C4"), + assignValue = __webpack_require__("D8Vt"), + baseAssign = __webpack_require__("0A/q"), + baseAssignIn = __webpack_require__("9GUs"), + cloneBuffer = __webpack_require__("rPTK"), + copyArray = __webpack_require__("MbtP"), + copySymbols = __webpack_require__("bwib"), + copySymbolsIn = __webpack_require__("Q+nl"), + getAllKeys = __webpack_require__("sAcZ"), + getAllKeysIn = __webpack_require__("7XCK"), + getTag = __webpack_require__("FqJm"), + initCloneArray = __webpack_require__("yTqm"), + initCloneByTag = __webpack_require__("G9Pb"), + initCloneObject = __webpack_require__("QLTc"), + isArray = __webpack_require__("8u9v"), + isBuffer = __webpack_require__("cjAe"), + isMap = __webpack_require__("Mw38"), + isObject = __webpack_require__("06hQ"), + isSet = __webpack_require__("nbQj"), + keys = __webpack_require__("NHjt"), + keysIn = __webpack_require__("+aIf"); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; + + +/***/ }), + +/***/ "8ZQa": +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__("VNFE"); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; + + +/***/ }), + +/***/ "8ZpT": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _flag = _interopRequireDefault(__webpack_require__("7hLD")); + +var _connect = _interopRequireDefault(__webpack_require__("G1be")); + +var _FlagSwitcher = _interopRequireDefault(__webpack_require__("JSg/")); + +var _useFlag = _interopRequireDefault(__webpack_require__("mXbR")); + +/* global __ENABLED_FLAGS__ */ +_flag.default.connect = _connect.default; +_flag.default.FlagSwitcher = _FlagSwitcher.default; +_flag.default.useFlag = _useFlag.default; + +if (true) { + _flag.default.enable([]); +} + +var _default = _flag.default; +exports.default = _default; + +/***/ }), + +/***/ "8cmQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _extends; }); +function _extends() { + _extends = Object.assign ? Object.assign.bind() : function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + return _extends.apply(this, arguments); +} + +/***/ }), + +/***/ "8eMP": +/***/ (function(module, exports) { + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "8ltH": +/***/ (function(module, exports, __webpack_require__) { + +var MapCache = __webpack_require__("kNUc"), + setCacheAdd = __webpack_require__("3wGQ"), + setCacheHas = __webpack_require__("rfY1"); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; + + +/***/ }), + +/***/ "8oDz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ztbB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "8tBr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var strValue = String.prototype.valueOf; +var tryStringObject = function tryStringObject(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var strClass = '[object String]'; +var hasToStringTag = __webpack_require__("yx3C")(); + +module.exports = function isString(value) { + if (typeof value === 'string') { + return true; + } + if (typeof value !== 'object') { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; +}; + + +/***/ }), + +/***/ "8tCe": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); + +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); + +var _context = _interopRequireDefault(__webpack_require__("eDV5")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var storePropType = _propTypes.default.shape({ + subscribe: _propTypes.default.func.isRequired, + dispatch: _propTypes.default.func.isRequired, + getState: _propTypes.default.func.isRequired +}); + +var CozyProvider = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(CozyProvider, _Component); + + var _super = _createSuper(CozyProvider); + + function CozyProvider(props, context) { + var _this; + + (0, _classCallCheck2.default)(this, CozyProvider); + _this = _super.call(this, props, context); + + if (!props.client) { + throw new Error('CozyProvider was not passed a client instance.'); + } + + if (props.store) { + props.client.setStore(props.store); + } + + return _this; + } + + (0, _createClass2.default)(CozyProvider, [{ + key: "getChildContext", + value: function getChildContext() { + return { + store: this.props.store || this.context.store || this.props.client.store, + client: this.props.client + }; + } + }, { + key: "render", + value: function render() { + return /*#__PURE__*/_react.default.createElement(_context.default.Provider, { + value: this.getChildContext() + }, this.props.children); + } + }]); + return CozyProvider; +}(_react.Component); + +exports.default = CozyProvider; +(0, _defineProperty2.default)(CozyProvider, "propTypes", { + store: storePropType, + client: _propTypes.default.object.isRequired, + children: _propTypes.default.element.isRequired +}); +(0, _defineProperty2.default)(CozyProvider, "childContextTypes", { + store: _propTypes.default.object, + client: _propTypes.default.object.isRequired +}); +(0, _defineProperty2.default)(CozyProvider, "contextTypes", { + store: _propTypes.default.object +}); + +/***/ }), + +/***/ "8u9v": +/***/ (function(module, exports) { + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; + + +/***/ }), + +/***/ "8wnD": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = __webpack_require__("GwHQ"); +var gOPD = __webpack_require__("Yfzq"); +var getPrototypeOf = __webpack_require__("EjI+"); +var has = __webpack_require__("00OQ"); +var $export = __webpack_require__("LRPZ"); +var createDesc = __webpack_require__("nVWS"); +var anObject = __webpack_require__("eckd"); +var isObject = __webpack_require__("pFmr"); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + + +/***/ }), + +/***/ "8xrp": +/***/ (function(module, exports, __webpack_require__) { + +var isStrictComparable = __webpack_require__("74bI"), + keys = __webpack_require__("NHjt"); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; + + +/***/ }), + +/***/ "8yBV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _DialogActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wgy5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _DialogActions__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "9+Ek": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Show menu drawer\",\"profile\":\"Profile\",\"plans\":\"Plans\",\"permissions\":\"Permissions\",\"connectedDevices\":\"Connected devices\",\"connections\":\"Connections\",\"storage\":\"Storage\",\"storage_phrase\":\"%{diskUsage} GB of %{diskQuota} GB used\",\"help\":\"FAQ\",\"contact\":\"Contact us\",\"logout\":\"Log out\",\"soon\":\"soon\",\"error_UnavailableStack\":\"The stack is unreachable (connection timed-out).\",\"error_UnauthorizedStack\":\"Some permissions are missing, the application can't access the requested resource on the stack.\",\"no_apps\":\"No applications found on the Cozy.\",\"menu\":{\"apps\":\"Apps\",\"settings\":\"Settings\",\"home_mobile\":\"Back to dashboard...\",\"home\":\"Back to dashboard\",\"home_title\":\"Home\"},\"Categories\":{\"cozy\":\"Cozy apps\",\"partners\":\"Partners apps\",\"ptnb\":\"expPTNB\",\"others\":\"Other apps\"},\"claudy\":{\"title\":\"How to drive your Cozy?\"},\"permsModal\":{\"title\":\"Access your whole Cozy from your application\",\"description\":\"Authorize %{app} to display your Cozy applications on this device\",\"button\":\"Authorize access\"},\"comingSoon\":{\"store\":{\"title\":\"The Store application will be available soon in your Cozy.\",\"description\":\"Thanks to Cozy Store you will be able to install the applications that you want in your Cozy.\"}},\"banner\":{\"tos-updated\":{\"description\":\"To comply with the GDPR, Cozy Cloud has updated its Terms of Services that have taken effect on May 25, 2018\",\"CTA\":\"Read now\"}}}"); + +/***/ }), + +/***/ "90jO": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey + +module.exports = function IsPropertyKey(argument) { + return typeof argument === 'string' || typeof argument === 'symbol'; +}; + + +/***/ }), + +/***/ "92Wp": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// https://ecma-international.org/ecma-262/6.0/#sec-isarray +module.exports = __webpack_require__("FyNJ"); + + +/***/ }), + +/***/ "93hV": +/***/ (function(module, exports, __webpack_require__) { + +var baseIteratee = __webpack_require__("JF7T"), + baseUniq = __webpack_require__("VHLe"); + +/** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : []; +} + +module.exports = uniqBy; + + +/***/ }), + +/***/ "95RP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__("Cf+5"); +__webpack_require__("LRPZ")({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), + +/***/ "99IF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDOMError", function() { return isDOMError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDOMException", function() { return isDOMException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return isElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return isError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isErrorEvent", function() { return isErrorEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEvent", function() { return isEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInstanceOf", function() { return isInstanceOf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNaN", function() { return isNaN; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return isPlainObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return isPrimitive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return isRegExp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSyntheticEvent", function() { return isSyntheticEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isThenable", function() { return isThenable; }); +// eslint-disable-next-line @typescript-eslint/unbound-method +const objectToString = Object.prototype.toString; + +/** + * Checks whether given value's type is one of a few Error or Error-like + * {@link isError}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isError(wat) { + switch (objectToString.call(wat)) { + case '[object Error]': + case '[object Exception]': + case '[object DOMException]': + return true; + default: + return isInstanceOf(wat, Error); + } +} +/** + * Checks whether given value is an instance of the given built-in class. + * + * @param wat The value to be checked + * @param className + * @returns A boolean representing the result. + */ +function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; +} + +/** + * Checks whether given value's type is ErrorEvent + * {@link isErrorEvent}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isErrorEvent(wat) { + return isBuiltin(wat, 'ErrorEvent'); +} + +/** + * Checks whether given value's type is DOMError + * {@link isDOMError}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isDOMError(wat) { + return isBuiltin(wat, 'DOMError'); +} + +/** + * Checks whether given value's type is DOMException + * {@link isDOMException}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isDOMException(wat) { + return isBuiltin(wat, 'DOMException'); +} + +/** + * Checks whether given value's type is a string + * {@link isString}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isString(wat) { + return isBuiltin(wat, 'String'); +} + +/** + * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol) + * {@link isPrimitive}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isPrimitive(wat) { + return wat === null || (typeof wat !== 'object' && typeof wat !== 'function'); +} + +/** + * Checks whether given value's type is an object literal + * {@link isPlainObject}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isPlainObject(wat) { + return isBuiltin(wat, 'Object'); +} + +/** + * Checks whether given value's type is an Event instance + * {@link isEvent}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isEvent(wat) { + return typeof Event !== 'undefined' && isInstanceOf(wat, Event); +} + +/** + * Checks whether given value's type is an Element instance + * {@link isElement}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isElement(wat) { + return typeof Element !== 'undefined' && isInstanceOf(wat, Element); +} + +/** + * Checks whether given value's type is an regexp + * {@link isRegExp}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isRegExp(wat) { + return isBuiltin(wat, 'RegExp'); +} + +/** + * Checks whether given value has a then function. + * @param wat A value to be checked. + */ +function isThenable(wat) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return Boolean(wat && wat.then && typeof wat.then === 'function'); +} + +/** + * Checks whether given value's type is a SyntheticEvent + * {@link isSyntheticEvent}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isSyntheticEvent(wat) { + return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; +} + +/** + * Checks whether given value is NaN + * {@link isNaN}. + * + * @param wat A value to be checked. + * @returns A boolean representing the result. + */ +function isNaN(wat) { + return typeof wat === 'number' && wat !== wat; +} + +/** + * Checks whether given value's type is an instance of provided constructor. + * {@link isInstanceOf}. + * + * @param wat A value to be checked. + * @param base A constructor to be used in a check. + * @returns A boolean representing the result. + */ +function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch (_e) { + return false; + } +} + + +//# sourceMappingURL=is.js.map + + +/***/ }), + +/***/ "9AMN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistStore; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iNHL"); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Oxgs"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ph6I"); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + + + +var initialState = { + registry: [], + bootstrapped: false +}; + +var persistorReducer = function persistorReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + case _constants__WEBPACK_IMPORTED_MODULE_2__["REGISTER"]: + return _extends({}, state, { registry: [].concat(_toConsumableArray(state.registry), [action.key]) }); + case _constants__WEBPACK_IMPORTED_MODULE_2__["REHYDRATE"]: + var firstIndex = state.registry.indexOf(action.key); + var registry = [].concat(_toConsumableArray(state.registry)); + registry.splice(firstIndex, 1); + return _extends({}, state, { registry: registry, bootstrapped: registry.length === 0 }); + default: + return state; + } +}; + +function persistStore(store, options, cb) { + // help catch incorrect usage of passing PersistConfig in as PersistorOptions + if (false) { var bannedKeys, optionsToTest; } + var boostrappedCb = cb || false; + + var _pStore = Object(redux__WEBPACK_IMPORTED_MODULE_0__["createStore"])(persistorReducer, initialState, options ? options.enhancer : undefined); + var register = function register(key) { + _pStore.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["REGISTER"], + key: key + }); + }; + + var rehydrate = function rehydrate(key, payload, err) { + var rehydrateAction = { + type: _constants__WEBPACK_IMPORTED_MODULE_2__["REHYDRATE"], + payload: payload, + err: err, + key: key + // dispatch to `store` to rehydrate and `persistor` to track result + };store.dispatch(rehydrateAction); + _pStore.dispatch(rehydrateAction); + if (boostrappedCb && persistor.getState().bootstrapped) { + boostrappedCb(); + boostrappedCb = false; + } + }; + + var persistor = _extends({}, _pStore, { + purge: function purge() { + var results = []; + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["PURGE"], + result: function result(purgeResult) { + results.push(purgeResult); + } + }); + return Promise.all(results); + }, + flush: function flush() { + var results = []; + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["FLUSH"], + result: function result(flushResult) { + results.push(flushResult); + } + }); + return Promise.all(results); + }, + pause: function pause() { + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["PAUSE"] + }); + }, + persist: function persist() { + store.dispatch({ type: _constants__WEBPACK_IMPORTED_MODULE_2__["PERSIST"], register: register, rehydrate: rehydrate }); + } + }); + + persistor.persist(); + + return persistor; +} + +/***/ }), + +/***/ "9Cpk": +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__("Tusy"); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; + + +/***/ }), + +/***/ "9DWD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonCozyHome", function() { return ButtonCozyHome; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Kv7L"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _IconCozyHome__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2B+r"); + + + + + +var ButtonCozyHome = function ButtonCozyHome(_ref) { + var webviewContext = _ref.webviewContext, + homeHref = _ref.homeHref, + isInvertedTheme = _ref.isInvertedTheme; + if (Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isFlagshipApp"])() || cozy_flags__WEBPACK_IMPORTED_MODULE_2___default()('flagship.debug')) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + onClick: function onClick() { + webviewContext.call('backToHome'); + }, + className: "coz-nav-apps-btns-home --is-flagship" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); + + if (homeHref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + href: homeHref, + className: "coz-nav-apps-btns-home" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { + className: "coz-nav-apps-btns-home" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); +}; +ButtonCozyHome.propTypes = { + webviewContext: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, + homeHref: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool +}; + +/***/ }), + +/***/ "9DvV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $TypeError = GetIntrinsic('%TypeError%'); + +// http://262.ecma-international.org/5.1/#sec-9.10 + +module.exports = function CheckObjectCoercible(value, optMessage) { + if (value == null) { + throw new $TypeError(optMessage || ('Cannot call method on ' + value)); + } + return value; +}; + + +/***/ }), + +/***/ "9Dxo": +/***/ (function(module, exports, __webpack_require__) { + +var baseDifference = __webpack_require__("VNf9"), + baseFlatten = __webpack_require__("IcUP"), + baseRest = __webpack_require__("Ce+n"), + isArrayLikeObject = __webpack_require__("Ynj+"); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; + + +/***/ }), + +/***/ "9FgK": +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ "9GUs": +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__("kTya"), + keysIn = __webpack_require__("+aIf"); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; + + +/***/ }), + +/***/ "9Jz5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getScrollbarSize; }); +// A change of the browser zoom change the scrollbar size. +// Credit https://github.com/twbs/bootstrap/blob/3ffe3a5d82f6f561b82ff78d82b32a7d14aed558/js/src/modal.js#L512-L519 +function getScrollbarSize() { + var scrollDiv = document.createElement('div'); + scrollDiv.style.width = '99px'; + scrollDiv.style.height = '99px'; + scrollDiv.style.position = 'absolute'; + scrollDiv.style.top = '-9999px'; + scrollDiv.style.overflow = 'scroll'; + document.body.appendChild(scrollDiv); + var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarSize; +} + +/***/ }), + +/***/ "9KBP": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("RjDH") +var buildFormatLocale = __webpack_require__("LRUT") + +/** + * @category Locales + * @summary Swedish locale. + * @author Johannes Ulén [@ejulen]{@link https://github.com/ejulen} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "9Qlz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _fetch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oldg"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeFetchTransport", function() { return _fetch_js__WEBPACK_IMPORTED_MODULE_0__["makeFetchTransport"]; }); + +/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("m8uA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeXHRTransport", function() { return _xhr_js__WEBPACK_IMPORTED_MODULE_1__["makeXHRTransport"]; }); + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "9QuI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _AppBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Oh9W"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _AppBar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "9RlF": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.6 String.prototype.fixed() +__webpack_require__("A7oe")('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + + +/***/ }), + +/***/ "9Rvm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var hasSymbol = typeof Symbol === 'function' && Symbol.for; +/* harmony default export */ __webpack_exports__["default"] = (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__'); + +/***/ }), + +/***/ "9T7s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CardContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("DaKy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CardContent__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "9YbP": +/***/ (function(module, exports) { + +module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), + +/***/ "9a3J": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return requirePropFactory; }); +function requirePropFactory(componentNameInError) { + if (true) { + return function () { + return null; + }; + } + + var requireProp = function requireProp(requiredProp) { + return function (props, propName, componentName, location, propFullName) { + var propFullNameSafe = propFullName || propName; + + if (typeof props[propName] !== 'undefined' && !props[requiredProp]) { + return new Error("The prop `".concat(propFullNameSafe, "` of ") + "`".concat(componentNameInError, "` must be used on `").concat(requiredProp, "`.")); + } + + return null; + }; + }; + + return requireProp; +} + +/***/ }), + +/***/ "9aAh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMuiTheme", function() { return createMuiTheme; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); +/* harmony import */ var _createBreakpoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Hf6u"); +/* harmony import */ var _createMixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3ZIp"); +/* harmony import */ var _createPalette__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("G/Dp"); +/* harmony import */ var _createTypography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("abT5"); +/* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Hssr"); +/* harmony import */ var _shape__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("7/5b"); +/* harmony import */ var _createSpacing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("W24B"); +/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("V6W0"); +/* harmony import */ var _zIndex__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("kshm"); + + + + + + + + + + + + + +function createTheme() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var _options$breakpoints = options.breakpoints, + breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints, + _options$mixins = options.mixins, + mixinsInput = _options$mixins === void 0 ? {} : _options$mixins, + _options$palette = options.palette, + paletteInput = _options$palette === void 0 ? {} : _options$palette, + spacingInput = options.spacing, + _options$typography = options.typography, + typographyInput = _options$typography === void 0 ? {} : _options$typography, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["breakpoints", "mixins", "palette", "spacing", "typography"]); + + var palette = Object(_createPalette__WEBPACK_IMPORTED_MODULE_5__["default"])(paletteInput); + var breakpoints = Object(_createBreakpoints__WEBPACK_IMPORTED_MODULE_3__["default"])(breakpointsInput); + var spacing = Object(_createSpacing__WEBPACK_IMPORTED_MODULE_9__["default"])(spacingInput); + var muiTheme = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["deepmerge"])({ + breakpoints: breakpoints, + direction: 'ltr', + mixins: Object(_createMixins__WEBPACK_IMPORTED_MODULE_4__["default"])(breakpoints, spacing, mixinsInput), + overrides: {}, + // Inject custom styles + palette: palette, + props: {}, + // Provide default props + shadows: _shadows__WEBPACK_IMPORTED_MODULE_7__["default"], + typography: Object(_createTypography__WEBPACK_IMPORTED_MODULE_6__["default"])(palette, typographyInput), + spacing: spacing, + shape: _shape__WEBPACK_IMPORTED_MODULE_8__["default"], + transitions: _transitions__WEBPACK_IMPORTED_MODULE_10__["default"], + zIndex: _zIndex__WEBPACK_IMPORTED_MODULE_11__["default"] + }, other); + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + muiTheme = args.reduce(function (acc, argument) { + return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["deepmerge"])(acc, argument); + }, muiTheme); + + if (false) { var traverse, pseudoClasses; } + + return muiTheme; +} + +var warnedOnce = false; +function createMuiTheme() { + if (false) {} + + return createTheme.apply(void 0, arguments); +} +/* harmony default export */ __webpack_exports__["default"] = (createTheme); + +/***/ }), + +/***/ "9c+d": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'] + var monthsFull = ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'] + var weekdays2char = ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'] + var weekdays3char = ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'] + var weekdaysFull = ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'] + var meridiemUppercase = ['DOP.', 'ODP.'] + var meridiemLowercase = ['dop.', 'odp.'] + var meridiemFull = ['dopoledne', 'odpoledne'] + + var formatters = { + // Month: led, úno, ..., pro + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: leden, únor, ..., prosinec + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: ne, po, ..., so + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: ned, pon, ..., sob + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: neděle, pondělí, ..., sobota + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // DOP., ODP. + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // dop., odp. + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // dopoledne, odpoledne + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "9cqe": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("dS4D") +var buildFormatLocale = __webpack_require__("yxzQ") + +/** + * @category Locales + * @summary French locale. + * @author Jean Dupouy [@izeau]{@link https://github.com/izeau} + * @author François B [@fbonzon]{@link https://github.com/fbonzon} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "9d30": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__("pFmr"); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), + +/***/ "9k8N": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +/** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ +var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); +}); + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = unionWith; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "9kEc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _AccordionDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZySd"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _AccordionDetails__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "9sWd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useControlled; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ + +function useControlled(_ref) { + var controlled = _ref.controlled, + defaultProp = _ref.default, + name = _ref.name, + _ref$state = _ref.state, + state = _ref$state === void 0 ? 'value' : _ref$state; + + var _React$useRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](controlled !== undefined), + isControlled = _React$useRef.current; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](defaultProp), + valueState = _React$useState[0], + setValue = _React$useState[1]; + + var value = isControlled ? controlled : valueState; + + if (false) { var _React$useRef2, defaultValue; } + + var setValueIfUncontrolled = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (newValue) { + if (!isControlled) { + setValue(newValue); + } + }, []); + return [value, setValueIfUncontrolled]; +} + +/***/ }), + +/***/ "9unf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useMediaQuery; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("csMb"); + + + +function useMediaQuery(queryInput) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_2__["useTheme"])(); + var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_2__["getThemeProps"])({ + theme: theme, + name: 'MuiUseMediaQuery', + props: {} + }); + + if (false) {} + + var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput; + query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature. + // All the browsers Material-UI support have this built-in. + // This defensive check is here for simplicity. + // Most of the time, the match media logic isn't central to people tests. + + var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined'; + + var _props$options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, options), + _props$options$defaul = _props$options.defaultMatches, + defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul, + _props$options$matchM = _props$options.matchMedia, + matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM, + _props$options$noSsr = _props$options.noSsr, + noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr, + _props$options$ssrMat = _props$options.ssrMatchMedia, + ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__["useState"](function () { + if (noSsr && supportMatchMedia) { + return matchMedia(query).matches; + } + + if (ssrMatchMedia) { + return ssrMatchMedia(query).matches; + } // Once the component is mounted, we rely on the + // event listeners to return the correct matches value. + + + return defaultMatches; + }), + match = _React$useState[0], + setMatch = _React$useState[1]; + + react__WEBPACK_IMPORTED_MODULE_1__["useEffect"](function () { + var active = true; + + if (!supportMatchMedia) { + return undefined; + } + + var queryList = matchMedia(query); + + var updateMatch = function updateMatch() { + // Workaround Safari wrong implementation of matchMedia + // TODO can we remove it? + // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677 + if (active) { + setMatch(queryList.matches); + } + }; + + updateMatch(); + queryList.addListener(updateMatch); + return function () { + active = false; + queryList.removeListener(updateMatch); + }; + }, [query, matchMedia, supportMatchMedia]); + + if (false) {} + + return match; +} + +/***/ }), + +/***/ "9xia": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"), + color = __webpack_require__("N/CO"), + colors = { debug: ['gray'], info: ['purple' ], warn: [ 'yellow', true ], error: [ 'red', true ] }, + logger = new Transform(); + +logger.write = function(name, level, args) { + var fn = console.log; + if(level != 'debug' && console[level]) { + fn = console[level]; + } + + var subset = [], i = 0; + if(level != 'info') { + for(; i < args.length; i++) { + if(typeof args[i] != 'string') break; + } + fn.apply(console, [ '%c'+name +' '+ args.slice(0, i).join(' '), color.apply(color, colors[level]) ].concat(args.slice(i))); + } else { + fn.apply(console, [ '%c'+name, color.apply(color, colors[level]) ].concat(args)); + } +}; + +// NOP, because piping the formatted logs can only cause trouble. +logger.pipe = function() { }; + +module.exports = logger; + + +/***/ }), + +/***/ "9xp8": +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), + +/***/ "9yx8": +/***/ (function(module, exports) { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; + + +/***/ }), + +/***/ "9zvY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.KONNECTORS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _pick = _interopRequireDefault(__webpack_require__("LF8A")); + +var _AppCollection2 = _interopRequireDefault(__webpack_require__("aXTZ")); + +var _TriggerCollection = _interopRequireWildcard(__webpack_require__("Aqqx")); + +var _DocumentCollection = __webpack_require__("GSeB"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var KONNECTORS_DOCTYPE = 'io.cozy.konnectors'; +exports.KONNECTORS_DOCTYPE = KONNECTORS_DOCTYPE; + +var KonnectorCollection = /*#__PURE__*/function (_AppCollection) { + (0, _inherits2.default)(KonnectorCollection, _AppCollection); + + var _super = _createSuper(KonnectorCollection); + + function KonnectorCollection(stackClient) { + var _this; + + (0, _classCallCheck2.default)(this, KonnectorCollection); + _this = _super.call(this, stackClient); + _this.doctype = KONNECTORS_DOCTYPE; + _this.endpoint = '/konnectors/'; + return _this; + } + + (0, _createClass2.default)(KonnectorCollection, [{ + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + throw new Error('create() method is not available for konnectors'); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function create() { + return _create.apply(this, arguments); + } + + return create; + }() + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + throw new Error('destroy() method is not available for konnectors'); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function destroy() { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + /** + * Find triggers for a particular konnector + * + * @param {string} slug of the konnector + */ + + }, { + key: "findTriggersBySlug", + value: function () { + var _findTriggersBySlug = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(slug) { + var triggerCol, _yield$triggerCol$all, rawTriggers; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + triggerCol = new _TriggerCollection.default(this.stackClient); + _context3.next = 3; + return triggerCol.all({ + limit: null + }); + + case 3: + _yield$triggerCol$all = _context3.sent; + rawTriggers = _yield$triggerCol$all.data; + return _context3.abrupt("return", rawTriggers.map(function (x) { + return x.attributes; + }).filter(function (triggerAttrs) { + return (0, _TriggerCollection.isForKonnector)(triggerAttrs, slug); + })); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function findTriggersBySlug(_x) { + return _findTriggersBySlug.apply(this, arguments); + } + + return findTriggersBySlug; + }() + /** + * Launch a trigger for a given konnector. + * + * @param {string} slug - Konnector slug + * @param {object} options - Options + * @param {object} options.accountId - Pinpoint the account that should be used, useful if the user + * has more than 1 account for 1 konnector + */ + + }, { + key: "launch", + value: function () { + var _launch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(slug) { + var options, + triggerCol, + konnTriggers, + filteredTriggers, + filterAttrs, + _args4 = arguments; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}; + triggerCol = new _TriggerCollection.default(this.stackClient); + _context4.next = 4; + return this.findTriggersBySlug(slug); + + case 4: + konnTriggers = _context4.sent; + filteredTriggers = options.accountId ? konnTriggers.filter(function (triggerAttrs) { + return (0, _TriggerCollection.isForAccount)(triggerAttrs, options.accountId); + }) : konnTriggers; + + if (!(filteredTriggers.length === 1)) { + _context4.next = 10; + break; + } + + return _context4.abrupt("return", triggerCol.launch(konnTriggers[0])); + + case 10: + filterAttrs = JSON.stringify((0, _pick.default)({ + slug: slug, + accountId: options.accountId + })); + + if (!(filteredTriggers.length === 0)) { + _context4.next = 15; + break; + } + + throw new Error("No trigger found for ".concat(filterAttrs)); + + case 15: + if (!(filteredTriggers.length > 1)) { + _context4.next = 17; + break; + } + + throw new Error("More than 1 trigger found for ".concat(filterAttrs)); + + case 17: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function launch(_x2) { + return _launch.apply(this, arguments); + } + + return launch; + }() + /** + * Updates a konnector + * + * @param {string} slug - Konnector slug + * @param {object} options - Options + * @param {object} options.source - Specify the source (ex: registry://slug/stable) + * @param {boolean} options.sync - Wait for konnector to be updated, otherwise the job + * is just scheduled + */ + + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(slug) { + var options, + source, + sync, + reqOptions, + rawKonnector, + _args5 = arguments; + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; + + if (slug) { + _context5.next = 3; + break; + } + + throw new Error('Cannot call update with no slug'); + + case 3: + source = options.source || null; + sync = options.sync || false; + reqOptions = sync ? { + headers: { + Accept: 'text/event-stream' + } + } : {}; + _context5.next = 8; + return this.stackClient.fetchJSON('PUT', "/konnectors/".concat(slug) + (source ? "?Source=".concat(source) : ''), reqOptions); + + case 8: + rawKonnector = _context5.sent; + return _context5.abrupt("return", (0, _DocumentCollection.normalizeDoc)(rawKonnector)); + + case 10: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function update(_x3) { + return _update.apply(this, arguments); + } + + return update; + }() + }]); + return KonnectorCollection; +}(_AppCollection2.default); + +var _default = KonnectorCollection; +exports.default = _default; + +/***/ }), + +/***/ "A+qA": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CHALLENGE_DOCTYPE = void 0; +var CHALLENGE_DOCTYPE = 'com.grandlyon.ecolyo.challenge'; +exports.CHALLENGE_DOCTYPE = CHALLENGE_DOCTYPE; + +/***/ }), + +/***/ "A/Ua": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'] + var monthsFull = ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'] + var weekdays2char = ['Li', 'Lu', 'Ma', 'Mi', 'Hu', 'Bi', 'Sa'] + var weekdays3char = ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'] + var weekdaysFull = ['Linggo', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado'] + var meridiemUppercase = ['NU', 'NT', 'NH', 'NG'] + var meridiemLowercase = ['nu', 'nt', 'nh', 'ng'] + var meridiemFull = ['ng umaga', 'ng tanghali', 'ng hapon', 'ng gabi'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + if (date.getHours() > 12) { + var modulo = date.getHours() % 12 + if (modulo < 6) { + return meridiemUppercase[2] + } else { + return meridiemUppercase[3] + } + } else if (date.getHours() < 12) { + return meridiemUppercase[0] + } else { + return meridiemUppercase[1] + } + }, + + // am, pm + 'a': function (date) { + if (date.getHours() > 12) { + var modulo = date.getHours() % 12 + if (modulo < 6) { + return meridiemLowercase[2] + } else { + return meridiemLowercase[3] + } + } else if (date.getHours() < 12) { + return meridiemLowercase[0] + } else { + return meridiemLowercase[1] + } + }, + + // a.m., p.m. + 'aa': function (date) { + if (date.getHours() > 12) { + var modulo = date.getHours() % 12 + if (modulo < 6) { + return meridiemFull[2] + } else { + return meridiemFull[3] + } + } else if (date.getHours() < 12) { + return meridiemFull[0] + } else { + return meridiemFull[1] + } + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return 'ika-' + number +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "A0lo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_TRANSPORT_BUFFER_SIZE", function() { return DEFAULT_TRANSPORT_BUFFER_SIZE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTransport", function() { return createTransport; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +const DEFAULT_TRANSPORT_BUFFER_SIZE = 30; + +/** + * Creates an instance of a Sentry `Transport` + * + * @param options + * @param makeRequest + */ +function createTransport( + options, + makeRequest, + buffer = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["makePromiseBuffer"])(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE), +) { + let rateLimits = {}; + + const flush = (timeout) => buffer.drain(timeout); + + function send(envelope) { + const filteredEnvelopeItems = []; + + // Drop rate limited items from envelope + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["forEachEnvelopeItem"])(envelope, (item, type) => { + const envelopeItemDataCategory = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["envelopeItemTypeToDataCategory"])(type); + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isRateLimited"])(rateLimits, envelopeItemDataCategory)) { + options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory); + } else { + filteredEnvelopeItems.push(item); + } + }); + + // Skip sending if envelope is empty after filtering out rate limited events + if (filteredEnvelopeItems.length === 0) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["resolvedSyncPromise"])(); + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const filteredEnvelope = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["createEnvelope"])(envelope[0], filteredEnvelopeItems ); + + // Creates client report for each item in an envelope + const recordEnvelopeLoss = (reason) => { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["forEachEnvelopeItem"])(filteredEnvelope, (_, type) => { + options.recordDroppedEvent(reason, Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["envelopeItemTypeToDataCategory"])(type)); + }); + }; + + const requestTask = () => + makeRequest({ body: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["serializeEnvelope"])(filteredEnvelope, options.textEncoder) }).then( + response => { + // We don't want to throw on NOK responses, but we want to at least log them + if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(`Sentry responded with status code ${response.statusCode} to sent event.`); + } + + rateLimits = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["updateRateLimits"])(rateLimits, response); + }, + error => { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Failed while sending event:', error); + recordEnvelopeLoss('network_error'); + }, + ); + + return buffer.add(requestTask).then( + result => result, + error => { + if (error instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Skipped sending event because buffer is full.'); + recordEnvelopeLoss('queue_overflow'); + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["resolvedSyncPromise"])(); + } else { + throw error; + } + }, + ); + } + + return { + send, + flush, + }; +} + + +//# sourceMappingURL=base.js.map + + +/***/ }), + +/***/ "A2AU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("70hl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _List__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "A3W/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_optionalChainDelete", function() { return _optionalChainDelete; }); +/* harmony import */ var _optionalChain_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("48N2"); + + +/** + * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, + * descriptors, and functions, in cases where the value of the expression is to be deleted. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See + * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 + * + * @param ops Array result of expression conversion + * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable + * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which + * case `false`. + */ +function _optionalChainDelete(ops) { + const result = Object(_optionalChain_js__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])(ops) ; + // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case, + // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in + // which case we return whatever the `delete` returned, which will be a boolean. + return result == null ? true : result; +} + +// Sucrase version: +// function _optionalChainDelete(ops) { +// const result = _optionalChain(ops); +// // by checking for loose equality to `null`, we catch both `null` and `undefined` +// return result == null ? true : result; +// } + + +//# sourceMappingURL=_optionalChainDelete.js.map + + +/***/ }), + +/***/ "A6Uc": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'kevesebb, mint egy másodperce', + other: 'kevesebb, mint {{count}} másodperce' + }, + + xSeconds: { + one: '1 másodperce', + other: '{{count}} másodperce' + }, + + halfAMinute: 'fél perce', + + lessThanXMinutes: { + one: 'kevesebb, mint egy perce', + other: 'kevesebb, mint {{count}} perce' + }, + + xMinutes: { + one: '1 perce', + other: '{{count}} perce' + }, + + aboutXHours: { + one: 'közel 1 órája', + other: 'közel {{count}} órája' + }, + + xHours: { + one: '1 órája', + other: '{{count}} órája' + }, + + xDays: { + one: '1 napja', + other: '{{count}} napja' + }, + + aboutXMonths: { + one: 'közel 1 hónapja', + other: 'közel {{count}} hónapja' + }, + + xMonths: { + one: '1 hónapja', + other: '{{count}} hónapja' + }, + + aboutXYears: { + one: 'közel 1 éve', + other: 'közel {{count}} éve' + }, + + xYears: { + one: '1 éve', + other: '{{count}} éve' + }, + + overXYears: { + one: 'több, mint 1 éve', + other: 'több, mint {{count}} éve' + }, + + almostXYears: { + one: 'majdnem 1 éve', + other: 'majdnem {{count}} éve' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return '' + result + } else { + return result + '' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "A7oe": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var fails = __webpack_require__("enc5"); +var defined = __webpack_require__("etLA"); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + '</' + tag + '>'; +}; +module.exports = function (NAME, exec) { + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function () { + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; + + +/***/ }), + +/***/ "AEpG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _internal_svg_icons_Person__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("85H2"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, + width: 40, + height: 40, + fontFamily: theme.typography.fontFamily, + fontSize: theme.typography.pxToRem(20), + lineHeight: 1, + borderRadius: '50%', + overflow: 'hidden', + userSelect: 'none' + }, + + /* Styles applied to the root element if not `src` or `srcSet`. */ + colorDefault: { + color: theme.palette.background.default, + backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600] + }, + + /* Styles applied to the root element if `variant="circle"`. */ + circle: {}, + + /* Styles applied to the root element if `variant="circular"`. */ + circular: {}, + + /* Styles applied to the root element if `variant="rounded"`. */ + rounded: { + borderRadius: theme.shape.borderRadius + }, + + /* Styles applied to the root element if `variant="square"`. */ + square: { + borderRadius: 0 + }, + + /* Styles applied to the img element if either `src` or `srcSet` is defined. */ + img: { + width: '100%', + height: '100%', + textAlign: 'center', + // Handle non-square image. The property isn't supported by IE 11. + objectFit: 'cover', + // Hide alt text. + color: 'transparent', + // Hide the image broken icon, only works on Chrome. + textIndent: 10000 + }, + + /* Styles applied to the fallback icon */ + fallback: { + width: '75%', + height: '75%' + } + }; +}; + +function useLoaded(_ref) { + var src = _ref.src, + srcSet = _ref.srcSet; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + loaded = _React$useState[0], + setLoaded = _React$useState[1]; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (!src && !srcSet) { + return undefined; + } + + setLoaded(false); + var active = true; + var image = new Image(); + image.src = src; + image.srcSet = srcSet; + + image.onload = function () { + if (!active) { + return; + } + + setLoaded('loaded'); + }; + + image.onerror = function () { + if (!active) { + return; + } + + setLoaded('error'); + }; + + return function () { + active = false; + }; + }, [src, srcSet]); + return loaded; +} + +var Avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Avatar(props, ref) { + var alt = props.alt, + childrenProp = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + imgProps = props.imgProps, + sizes = props.sizes, + src = props.src, + srcSet = props.srcSet, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'circular' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["alt", "children", "classes", "className", "component", "imgProps", "sizes", "src", "srcSet", "variant"]); + + var children = null; // Use a hook instead of onError on the img element to support server-side rendering. + + var loaded = useLoaded({ + src: src, + srcSet: srcSet + }); + var hasImg = src || srcSet; + var hasImgNotFailing = hasImg && loaded !== 'error'; + + if (hasImgNotFailing) { + children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("img", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + alt: alt, + src: src, + srcSet: srcSet, + sizes: sizes, + className: classes.img + }, imgProps)); + } else if (childrenProp != null) { + children = childrenProp; + } else if (hasImg && alt) { + children = alt[0]; + } else { + children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_Person__WEBPACK_IMPORTED_MODULE_7__["default"], { + className: classes.fallback + }); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault), + ref: ref + }, other), children); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiAvatar' +})(Avatar)); + +/***/ }), + +/***/ "AHiN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.iconPropType = exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _classnames = _interopRequireDefault(__webpack_require__("1ytp")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var _excluded = ["icon", "width", "height", "color", "className", "preserveColor", "rotate", "size", "spin"]; +var styles = { + "icon--spin": "styles__icon--spin___ybfC1", + "spin": "styles__spin___2Vvw3", + "icon": "styles__icon___23x3R", + "icon--preserveColor": "styles__icon--preserveColor___3gBz6", + "shake": "styles__shake___wT_3z" +}; +var DEFAULT_SIZE = '16'; +function getSvgObject(icon) { + var anchor; + if (icon.id) { + anchor = "#".concat(icon.id); + } else if (icon[0] === '#') { + anchor = icon; + } else { + anchor = '#' + icon; + } + if (!anchor) { + console.warn("Icon not found ".concat(icon, ".")); + return null; + } + return function (props) { + return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("use", { + xlinkHref: anchor + })); + }; +} +function isFunction(obj) { + return obj instanceof Function; +} +function Icon(props) { + var icon = props.icon, + width = props.width, + height = props.height, + color = props.color, + className = props.className, + preserveColor = props.preserveColor, + rotate = props.rotate, + size = props.size, + spin = props.spin, + restProps = (0, _objectWithoutProperties2.default)(props, _excluded); + var Svg = (0, _react.useMemo)(function () { + return isFunction(icon) ? icon : getSvgObject(icon); + }, [icon]); + var style = props.style; + style = Object.assign({}, style); + if (color) { + style['fill'] = color; + } + if (rotate) { + style['transform'] = "rotate(".concat(rotate, "deg)"); + } + var iconClassName = preserveColor ? 'icon--preserveColor' : 'icon'; + var iconClass = (0, _classnames.default)(className, styles[iconClassName], (0, _defineProperty2.default)({}, styles['icon--spin'], spin)); + return Svg ? /*#__PURE__*/_react.default.createElement(Svg, (0, _extends2.default)({ + className: iconClass, + style: style, + width: width || size || DEFAULT_SIZE, + height: height || size || DEFAULT_SIZE + }, restProps)) : null; +} +Icon.isProperIcon = function (icon) { + var isSvgSymbol = icon && !!icon.id; + var isIconIdentifier = typeof icon === 'string'; + var isSvgr = isFunction(icon); + return isSvgSymbol || isIconIdentifier || isSvgr; +}; +var iconPropType = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.func]); +exports.iconPropType = iconPropType; +Icon.propTypes = { + icon: iconPropType.isRequired, + width: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + color: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]), + className: _propTypes.default.string, + preserveColor: _propTypes.default.bool, + /** Shorthand for both width and height */ + size: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + spin: _propTypes.default.bool +}; +Icon.defaultProps = { + spin: false +}; +var _default = Icon; +exports.default = _default; + +/***/ }), + +/***/ "AIES": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.openDeeplinkOrRedirect = void 0; + +/** + * This file is used to open the native app from a webapp + * if this native app is installed + * + * From a webapp, we don't have any clue if a native app is installed. + * The only way to know that, is to try to open the custom link + * (aka cozydrive://) and if nothing happens (no blur) we redirect to + * the callback + * + * Firefox tries to open custom link, so we need to create an iframe + * to detect if this is supported or not + */ +var _createHiddenIframe = function _createHiddenIframe(target, uri, randomId) { + var iframe = document.createElement('iframe'); + iframe.src = uri; + iframe.id = "hiddenIframe_".concat(randomId); + iframe.style.display = 'none'; + target.appendChild(iframe); + return iframe; +}; + +var openUriWithHiddenFrame = function openUriWithHiddenFrame(uri, failCb) { + var randomId = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); + window.addEventListener('blur', onBlur); + + var iframe = _createHiddenIframe(document.body, 'about:blank', randomId); + + var timeout = setTimeout(function () { + failCb(); + window.removeEventListener('blur', onBlur); + iframe.parentElement.removeChild(iframe); + }, 500); + + function onBlur() { + clearTimeout(timeout); + window.removeEventListener('blur', onBlur); + iframe.parentElement.removeChild(iframe); + } + + iframe.contentWindow.location.href = uri; +}; + +var openUriWithTimeoutHack = function openUriWithTimeoutHack(uri, failCb) { + var timeout = setTimeout(function () { + failCb(); + target.removeEventListener('blur', onBlur); + }, 500); // handle page running in an iframe (blur must be registered with top level window) + + var target = window; + + while (target != target.parent) { + target = target.parent; + } + + target.addEventListener('blur', onBlur); + + function onBlur() { + clearTimeout(timeout); + target.removeEventListener('blur', onBlur); + } // Why is an uri assigned to location object? + + + window.location = uri; +}; + +var openUriWithMsLaunchUri = function openUriWithMsLaunchUri(uri, failCb) { + navigator.msLaunchUri(uri, undefined, failCb); +}; + +var checkBrowser = function checkBrowser() { + var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; + var ua = navigator.userAgent.toLowerCase(); + var isSafari = ua.includes('safari') && !ua.includes('chrome') || Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; + var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + var isIOS122 = isIOS && (ua.includes('os 12_2') || ua.includes('os 12_3')); + return { + isOpera: isOpera, + isFirefox: typeof window.InstallTrigger !== 'undefined', + isSafari: isSafari, + isChrome: !!window.chrome && !isOpera, + isIOS122: isIOS122, + isIOS: isIOS + }; +}; +/** + * + * @param {String} deeplink (cozydrive://) + * @param {String} failCb (http://drive.cozy.ios) + */ + + +var openDeeplinkOrRedirect = function openDeeplinkOrRedirect(deeplink, failCb) { + if (navigator.msLaunchUri) { + // for IE and Edge in Win 8 and Win 10 + openUriWithMsLaunchUri(deeplink, failCb); + } else { + var browser = checkBrowser(); + + if (browser.isChrome || browser.isIOS && !browser.isIOS122) { + openUriWithTimeoutHack(deeplink, failCb); + } else if (browser.isSafari && !browser.isIOS122 || browser.isFirefox) { + openUriWithHiddenFrame(deeplink, failCb); + } else { + failCb(); + } + } +}; + +exports.openDeeplinkOrRedirect = openDeeplinkOrRedirect; + +/***/ }), + +/***/ "AJH6": +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), + +/***/ "AJRS": +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__("WnzN"); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; + + +/***/ }), + +/***/ "AJwH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("npFJ")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("sVxE"); +var hasOwn = __webpack_require__("H8OS"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "AMIv": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var macrotask = __webpack_require__("GuUT").set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__("ARbH")(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + + +/***/ }), + +/***/ "ARbH": +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), + +/***/ "AW5y": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("NFPV"); +/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("JGNw"); +/* harmony import */ var _utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("K7Xa"); +/* harmony import */ var _internal_animate__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("GGtO"); +/* harmony import */ var _ScrollbarSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("tEOf"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("OY/u"); +/* harmony import */ var _TabIndicator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("WHG9"); +/* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("apCG"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("UPk3"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("kjpz"); + + + + + + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + overflow: 'hidden', + minHeight: 48, + WebkitOverflowScrolling: 'touch', + // Add iOS momentum scrolling. + display: 'flex' + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + flexDirection: 'column' + }, + + /* Styles applied to the flex container element. */ + flexContainer: { + display: 'flex' + }, + + /* Styles applied to the flex container element if `orientation="vertical"`. */ + flexContainerVertical: { + flexDirection: 'column' + }, + + /* Styles applied to the flex container element if `centered={true}` & `!variant="scrollable"`. */ + centered: { + justifyContent: 'center' + }, + + /* Styles applied to the tablist element. */ + scroller: { + position: 'relative', + display: 'inline-block', + flex: '1 1 auto', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the tablist element if `!variant="scrollable"`. */ + fixed: { + overflowX: 'hidden', + width: '100%' + }, + + /* Styles applied to the tablist element if `variant="scrollable"`. */ + scrollable: { + overflowX: 'scroll', + // Hide dimensionless scrollbar on MacOS + scrollbarWidth: 'none', + // Firefox + '&::-webkit-scrollbar': { + display: 'none' // Safari + Chrome + + } + }, + + /* Styles applied to the `ScrollButtonComponent` component. */ + scrollButtons: {}, + + /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons="auto"` or scrollButtons="desktop"`. */ + scrollButtonsDesktop: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down('xs'), { + display: 'none' + }), + + /* Styles applied to the `TabIndicator` component. */ + indicator: {} + }; +}; +var Tabs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Tabs(props, ref) { + var ariaLabel = props['aria-label'], + ariaLabelledBy = props['aria-labelledby'], + action = props.action, + _props$centered = props.centered, + centered = _props$centered === void 0 ? false : _props$centered, + childrenProp = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$indicatorColor = props.indicatorColor, + indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor, + onChange = props.onChange, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + _props$ScrollButtonCo = props.ScrollButtonComponent, + ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? _TabScrollButton__WEBPACK_IMPORTED_MODULE_15__["default"] : _props$ScrollButtonCo, + _props$scrollButtons = props.scrollButtons, + scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons, + selectionFollowsFocus = props.selectionFollowsFocus, + _props$TabIndicatorPr = props.TabIndicatorProps, + TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr, + TabScrollButtonProps = props.TabScrollButtonProps, + _props$textColor = props.textColor, + textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor, + value = props.value, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["aria-label", "aria-labelledby", "action", "centered", "children", "classes", "className", "component", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_17__["default"])(); + var scrollable = variant === 'scrollable'; + var isRtl = theme.direction === 'rtl'; + var vertical = orientation === 'vertical'; + var scrollStart = vertical ? 'scrollTop' : 'scrollLeft'; + var start = vertical ? 'top' : 'left'; + var end = vertical ? 'bottom' : 'right'; + var clientSize = vertical ? 'clientHeight' : 'clientWidth'; + var size = vertical ? 'height' : 'width'; + + if (false) {} + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), + mounted = _React$useState[0], + setMounted = _React$useState[1]; + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_3__["useState"]({}), + indicatorStyle = _React$useState2[0], + setIndicatorStyle = _React$useState2[1]; + + var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_3__["useState"]({ + start: false, + end: false + }), + displayScroll = _React$useState3[0], + setDisplayScroll = _React$useState3[1]; + + var _React$useState4 = react__WEBPACK_IMPORTED_MODULE_3__["useState"]({ + overflow: 'hidden', + marginBottom: null + }), + scrollerStyle = _React$useState4[0], + setScrollerStyle = _React$useState4[1]; + + var valueToIndex = new Map(); + var tabsRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var tabListRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + + var getTabsMeta = function getTabsMeta() { + var tabsNode = tabsRef.current; + var tabsMeta; + + if (tabsNode) { + var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft + + tabsMeta = { + clientWidth: tabsNode.clientWidth, + scrollLeft: tabsNode.scrollLeft, + scrollTop: tabsNode.scrollTop, + scrollLeftNormalized: Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__["getNormalizedScrollLeft"])(tabsNode, theme.direction), + scrollWidth: tabsNode.scrollWidth, + top: rect.top, + bottom: rect.bottom, + left: rect.left, + right: rect.right + }; + } + + var tabMeta; + + if (tabsNode && value !== false) { + var _children = tabListRef.current.children; + + if (_children.length > 0) { + var tab = _children[valueToIndex.get(value)]; + + if (false) {} + + tabMeta = tab ? tab.getBoundingClientRect() : null; + } + } + + return { + tabsMeta: tabsMeta, + tabMeta: tabMeta + }; + }; + + var updateIndicatorState = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__["default"])(function () { + var _newIndicatorStyle; + + var _getTabsMeta = getTabsMeta(), + tabsMeta = _getTabsMeta.tabsMeta, + tabMeta = _getTabsMeta.tabMeta; + + var startValue = 0; + + if (tabMeta && tabsMeta) { + if (vertical) { + startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop; + } else { + var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft; + startValue = tabMeta.left - tabsMeta.left + correction; + } + } + + var newIndicatorStyle = (_newIndicatorStyle = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])(_newIndicatorStyle, start, startValue), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle); + + if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) { + setIndicatorStyle(newIndicatorStyle); + } else { + var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]); + var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]); + + if (dStart >= 1 || dSize >= 1) { + setIndicatorStyle(newIndicatorStyle); + } + } + }); + + var scroll = function scroll(scrollValue) { + Object(_internal_animate__WEBPACK_IMPORTED_MODULE_11__["default"])(scrollStart, tabsRef.current, scrollValue); + }; + + var moveTabsScroll = function moveTabsScroll(delta) { + var scrollValue = tabsRef.current[scrollStart]; + + if (vertical) { + scrollValue += delta; + } else { + scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge + + scrollValue *= isRtl && Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__["detectScrollType"])() === 'reverse' ? -1 : 1; + } + + scroll(scrollValue); + }; + + var handleStartScrollClick = function handleStartScrollClick() { + moveTabsScroll(-tabsRef.current[clientSize]); + }; + + var handleEndScrollClick = function handleEndScrollClick() { + moveTabsScroll(tabsRef.current[clientSize]); + }; + + var handleScrollbarSizeChange = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function (scrollbarHeight) { + setScrollerStyle({ + overflow: null, + marginBottom: -scrollbarHeight + }); + }, []); + + var getConditionalElements = function getConditionalElements() { + var conditionalElements = {}; + conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ScrollbarSize__WEBPACK_IMPORTED_MODULE_12__["default"], { + className: classes.scrollable, + onChange: handleScrollbarSizeChange + }) : null; + var scrollButtonsActive = displayScroll.start || displayScroll.end; + var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on'); + conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](ScrollButtonComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + orientation: orientation, + direction: isRtl ? 'right' : 'left', + onClick: handleStartScrollClick, + disabled: !displayScroll.start, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop) + }, TabScrollButtonProps)) : null; + conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](ScrollButtonComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + orientation: orientation, + direction: isRtl ? 'left' : 'right', + onClick: handleEndScrollClick, + disabled: !displayScroll.end, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop) + }, TabScrollButtonProps)) : null; + return conditionalElements; + }; + + var scrollSelectedIntoView = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__["default"])(function () { + var _getTabsMeta2 = getTabsMeta(), + tabsMeta = _getTabsMeta2.tabsMeta, + tabMeta = _getTabsMeta2.tabMeta; + + if (!tabMeta || !tabsMeta) { + return; + } + + if (tabMeta[start] < tabsMeta[start]) { + // left side of button is out of view + var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]); + scroll(nextScrollStart); + } else if (tabMeta[end] > tabsMeta[end]) { + // right side of button is out of view + var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]); + + scroll(_nextScrollStart); + } + }); + var updateScrollButtonState = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__["default"])(function () { + if (scrollable && scrollButtons !== 'off') { + var _tabsRef$current = tabsRef.current, + scrollTop = _tabsRef$current.scrollTop, + scrollHeight = _tabsRef$current.scrollHeight, + clientHeight = _tabsRef$current.clientHeight, + scrollWidth = _tabsRef$current.scrollWidth, + clientWidth = _tabsRef$current.clientWidth; + var showStartScroll; + var showEndScroll; + + if (vertical) { + showStartScroll = scrollTop > 1; + showEndScroll = scrollTop < scrollHeight - clientHeight - 1; + } else { + var scrollLeft = Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__["getNormalizedScrollLeft"])(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms. + + showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1; + showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1; + } + + if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) { + setDisplayScroll({ + start: showStartScroll, + end: showEndScroll + }); + } + } + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_8__["default"])(function () { + updateIndicatorState(); + updateScrollButtonState(); + }); + var win = Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__["default"])(tabsRef.current); + win.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + win.removeEventListener('resize', handleResize); + }; + }, [updateIndicatorState, updateScrollButtonState]); + var handleTabsScroll = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_8__["default"])(function () { + updateScrollButtonState(); + })); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + return function () { + handleTabsScroll.clear(); + }; + }, [handleTabsScroll]); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + setMounted(true); + }, []); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + updateIndicatorState(); + updateScrollButtonState(); + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + scrollSelectedIntoView(); + }, [scrollSelectedIntoView, indicatorStyle]); + react__WEBPACK_IMPORTED_MODULE_3__["useImperativeHandle"](action, function () { + return { + updateIndicator: updateIndicatorState, + updateScrollButtons: updateScrollButtonState + }; + }, [updateIndicatorState, updateScrollButtonState]); + var indicator = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_TabIndicator__WEBPACK_IMPORTED_MODULE_14__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: classes.indicator, + orientation: orientation, + color: indicatorColor + }, TabIndicatorProps, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, indicatorStyle, TabIndicatorProps.style) + })); + var childIndex = 0; + var children = react__WEBPACK_IMPORTED_MODULE_3__["Children"].map(childrenProp, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child)) { + return null; + } + + if (false) {} + + var childValue = child.props.value === undefined ? childIndex : child.props.value; + valueToIndex.set(childValue, childIndex); + var selected = childValue === value; + childIndex += 1; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](child, { + fullWidth: variant === 'fullWidth', + indicator: selected && !mounted && indicator, + selected: selected, + selectionFollowsFocus: selectionFollowsFocus, + onChange: onChange, + textColor: textColor, + value: childValue + }); + }); + + var handleKeyDown = function handleKeyDown(event) { + var target = event.target; // Keyboard navigation assumes that [role="tab"] are siblings + // though we might warn in the future about nested, interactive elements + // as a a11y violation + + var role = target.getAttribute('role'); + + if (role !== 'tab') { + return; + } + + var newFocusTarget = null; + var previousItemKey = orientation !== "vertical" ? 'ArrowLeft' : 'ArrowUp'; + var nextItemKey = orientation !== "vertical" ? 'ArrowRight' : 'ArrowDown'; + + if (orientation !== "vertical" && theme.direction === 'rtl') { + // swap previousItemKey with nextItemKey + previousItemKey = 'ArrowRight'; + nextItemKey = 'ArrowLeft'; + } + + switch (event.key) { + case previousItemKey: + newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild; + break; + + case nextItemKey: + newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild; + break; + + case 'Home': + newFocusTarget = tabListRef.current.firstChild; + break; + + case 'End': + newFocusTarget = tabListRef.current.lastChild; + break; + + default: + break; + } + + if (newFocusTarget !== null) { + newFocusTarget.focus(); + event.preventDefault(); + } + }; + + var conditionalElements = getConditionalElements(); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.root, className, vertical && classes.vertical), + ref: ref + }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.scroller, scrollable ? classes.scrollable : classes.fixed), + style: scrollerStyle, + ref: tabsRef, + onScroll: handleTabsScroll + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + "aria-label": ariaLabel, + "aria-labelledby": ariaLabelledBy, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered), + onKeyDown: handleKeyDown, + ref: tabListRef, + role: "tablist" + }, children), mounted && indicator), conditionalElements.scrollButtonEnd); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_13__["default"])(styles, { + name: 'MuiTabs' +})(Tabs)); + +/***/ }), + +/***/ "AdZl": +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__("+ERu"), + isArguments = __webpack_require__("6ZUk"), + isArray = __webpack_require__("8u9v"), + isIndex = __webpack_require__("9yx8"), + isLength = __webpack_require__("hGls"), + toKey = __webpack_require__("Iv0v"); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; + + +/***/ }), + +/***/ "AdqI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridGap", function() { return gridGap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridColumnGap", function() { return gridColumnGap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridRowGap", function() { return gridRowGap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridColumn", function() { return gridColumn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridRow", function() { return gridRow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridAutoFlow", function() { return gridAutoFlow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridAutoColumns", function() { return gridAutoColumns; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridAutoRows", function() { return gridAutoRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridTemplateColumns", function() { return gridTemplateColumns; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridTemplateRows", function() { return gridTemplateRows; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridTemplateAreas", function() { return gridTemplateAreas; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gridArea", function() { return gridArea; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var gridGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridGap' +}); +var gridColumnGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridColumnGap' +}); +var gridRowGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridRowGap' +}); +var gridColumn = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridColumn' +}); +var gridRow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridRow' +}); +var gridAutoFlow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridAutoFlow' +}); +var gridAutoColumns = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridAutoColumns' +}); +var gridAutoRows = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridAutoRows' +}); +var gridTemplateColumns = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridTemplateColumns' +}); +var gridTemplateRows = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridTemplateRows' +}); +var gridTemplateAreas = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridTemplateAreas' +}); +var gridArea = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'gridArea' +}); +var grid = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea); +/* harmony default export */ __webpack_exports__["default"] = (grid); + +/***/ }), + +/***/ "Af6T": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z" +}), 'RadioButtonChecked')); + +/***/ }), + +/***/ "AhYZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6vz+"); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("I4/v"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var dom_helpers_addClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("PRYp"); +/* harmony import */ var dom_helpers_removeClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("/G4y"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("lbMJ"); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("Y2Dv"); + + + + + + + + + + +var _addClass = function addClass(node, classes) { + return node && classes && classes.split(' ').forEach(function (c) { + return Object(dom_helpers_addClass__WEBPACK_IMPORTED_MODULE_4__["default"])(node, c); + }); +}; + +var removeClass = function removeClass(node, classes) { + return node && classes && classes.split(' ').forEach(function (c) { + return Object(dom_helpers_removeClass__WEBPACK_IMPORTED_MODULE_5__["default"])(node, c); + }); +}; +/** + * A transition component inspired by the excellent + * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should + * use it if you're using CSS transitions or animations. It's built upon the + * [`Transition`](https://reactcommunity.org/react-transition-group/transition) + * component, so it inherits all of its props. + * + * `CSSTransition` applies a pair of class names during the `appear`, `enter`, + * and `exit` states of the transition. The first class is applied and then a + * second `*-active` class in order to activate the CSS transition. After the + * transition, matching `*-done` class names are applied to persist the + * transition state. + * + * ```jsx + * function App() { + * const [inProp, setInProp] = useState(false); + * return ( + * <div> + * <CSSTransition in={inProp} timeout={200} classNames="my-node"> + * <div> + * {"I'll receive my-node-* classes"} + * </div> + * </CSSTransition> + * <button type="button" onClick={() => setInProp(true)}> + * Click to Enter + * </button> + * </div> + * ); + * } + * ``` + * + * When the `in` prop is set to `true`, the child component will first receive + * the class `example-enter`, then the `example-enter-active` will be added in + * the next tick. `CSSTransition` [forces a + * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215) + * between before adding the `example-enter-active`. This is an important trick + * because it allows us to transition between `example-enter` and + * `example-enter-active` even though they were added immediately one after + * another. Most notably, this is what makes it possible for us to animate + * _appearance_. + * + * ```css + * .my-node-enter { + * opacity: 0; + * } + * .my-node-enter-active { + * opacity: 1; + * transition: opacity 200ms; + * } + * .my-node-exit { + * opacity: 1; + * } + * .my-node-exit-active { + * opacity: 0; + * transition: opacity 200ms; + * } + * ``` + * + * `*-active` classes represent which styles you want to animate **to**, so it's + * important to add `transition` declaration only to them, otherwise transitions + * might not behave as intended! This might not be obvious when the transitions + * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in + * the example above (minus `transition`), but it becomes apparent in more + * complex transitions. + * + * **Note**: If you're using the + * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear) + * prop, make sure to define styles for `.appear-*` classes as well. + */ + + +var CSSTransition = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__["default"])(CSSTransition, _React$Component); + + function CSSTransition() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; + _this.appliedClasses = { + appear: {}, + enter: {}, + exit: {} + }; + + _this.onEnter = function (maybeNode, maybeAppearing) { + var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing), + node = _this$resolveArgument[0], + appearing = _this$resolveArgument[1]; + + _this.removeClasses(node, 'exit'); + + _this.addClass(node, appearing ? 'appear' : 'enter', 'base'); + + if (_this.props.onEnter) { + _this.props.onEnter(maybeNode, maybeAppearing); + } + }; + + _this.onEntering = function (maybeNode, maybeAppearing) { + var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), + node = _this$resolveArgument2[0], + appearing = _this$resolveArgument2[1]; + + var type = appearing ? 'appear' : 'enter'; + + _this.addClass(node, type, 'active'); + + if (_this.props.onEntering) { + _this.props.onEntering(maybeNode, maybeAppearing); + } + }; + + _this.onEntered = function (maybeNode, maybeAppearing) { + var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), + node = _this$resolveArgument3[0], + appearing = _this$resolveArgument3[1]; + + var type = appearing ? 'appear' : 'enter'; + + _this.removeClasses(node, type); + + _this.addClass(node, type, 'done'); + + if (_this.props.onEntered) { + _this.props.onEntered(maybeNode, maybeAppearing); + } + }; + + _this.onExit = function (maybeNode) { + var _this$resolveArgument4 = _this.resolveArguments(maybeNode), + node = _this$resolveArgument4[0]; + + _this.removeClasses(node, 'appear'); + + _this.removeClasses(node, 'enter'); + + _this.addClass(node, 'exit', 'base'); + + if (_this.props.onExit) { + _this.props.onExit(maybeNode); + } + }; + + _this.onExiting = function (maybeNode) { + var _this$resolveArgument5 = _this.resolveArguments(maybeNode), + node = _this$resolveArgument5[0]; + + _this.addClass(node, 'exit', 'active'); + + if (_this.props.onExiting) { + _this.props.onExiting(maybeNode); + } + }; + + _this.onExited = function (maybeNode) { + var _this$resolveArgument6 = _this.resolveArguments(maybeNode), + node = _this$resolveArgument6[0]; + + _this.removeClasses(node, 'exit'); + + _this.addClass(node, 'exit', 'done'); + + if (_this.props.onExited) { + _this.props.onExited(maybeNode); + } + }; + + _this.resolveArguments = function (maybeNode, maybeAppearing) { + return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing` + : [maybeNode, maybeAppearing]; + }; + + _this.getClassNames = function (type) { + var classNames = _this.props.classNames; + var isStringClassNames = typeof classNames === 'string'; + var prefix = isStringClassNames && classNames ? classNames + "-" : ''; + var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type]; + var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"]; + var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"]; + return { + baseClassName: baseClassName, + activeClassName: activeClassName, + doneClassName: doneClassName + }; + }; + + return _this; + } + + var _proto = CSSTransition.prototype; + + _proto.addClass = function addClass(node, type, phase) { + var className = this.getClassNames(type)[phase + "ClassName"]; + + var _this$getClassNames = this.getClassNames('enter'), + doneClassName = _this$getClassNames.doneClassName; + + if (type === 'appear' && phase === 'done' && doneClassName) { + className += " " + doneClassName; + } // This is to force a repaint, + // which is necessary in order to transition styles when adding a class name. + + + if (phase === 'active') { + /* eslint-disable no-unused-expressions */ + node && node.scrollTop; + } + + if (className) { + this.appliedClasses[type][phase] = className; + + _addClass(node, className); + } + }; + + _proto.removeClasses = function removeClasses(node, type) { + var _this$appliedClasses$ = this.appliedClasses[type], + baseClassName = _this$appliedClasses$.base, + activeClassName = _this$appliedClasses$.active, + doneClassName = _this$appliedClasses$.done; + this.appliedClasses[type] = {}; + + if (baseClassName) { + removeClass(node, baseClassName); + } + + if (activeClassName) { + removeClass(node, activeClassName); + } + + if (doneClassName) { + removeClass(node, doneClassName); + } + }; + + _proto.render = function render() { + var _this$props = this.props, + _ = _this$props.classNames, + props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, ["classNames"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(_Transition__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { + onEnter: this.onEnter, + onEntered: this.onEntered, + onEntering: this.onEntering, + onExit: this.onExit, + onExiting: this.onExiting, + onExited: this.onExited + })); + }; + + return CSSTransition; +}(react__WEBPACK_IMPORTED_MODULE_6___default.a.Component); + +CSSTransition.defaultProps = { + classNames: '' +}; +CSSTransition.propTypes = false ? undefined : {}; +/* harmony default export */ __webpack_exports__["default"] = (CSSTransition); + +/***/ }), + +/***/ "AkUS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("LGLP"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); + + + +function SvgIconClaudy(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + viewBox: "0 0 32 32" + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("path", { + d: "M22 12h-7c-.6 0-1 .4-1 1s.4 1 1 1h7c.6 0 1-.4 1-1s-.4-1-1-1zm3-5H15c-.5 0-1 .4-1 1s.4 1 1 1h10c.5 0 1-.4 1-1s-.4-1-1-1z", + fill: "none" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("path", { + fill: "#FFF", + d: "M31 1H9c-.6 0-1 .5-1 1v15c2.2 0 4.1 1.2 5.2 3H18v1.9c0 .6.4.7.8.4l3.3-2.3H31c.6 0 1-.5 1-1V2c0-.6-.4-1-1-1zm-9 13h-7c-.6 0-1-.4-1-1s.4-1 1-1h7c.6 0 1 .4 1 1s-.4 1-1 1zm3-5H15c-.6 0-1-.4-1-1s.5-1 1-1h10c.6 0 1 .4 1 1s-.5 1-1 1zM10.4 26.7c0 .1-.7 1.3-2.4 1.3-1.8 0-2.4-1.2-2.4-1.3-.1-.2 0-.5.2-.7.2-.1.5 0 .7.2 0 0 .4.7 1.6.7 1.1 0 1.5-.7 1.6-.7.1-.2.4-.3.7-.2.1.2.2.5 0 .7M12 23c0-2.2-1.8-4-4-4s-4 1.8-4 4c-2.2 0-4 1.8-4 4s1.8 4 4 4h8c2.2 0 4-1.8 4-4s-1.8-4-4-4" + })); +} + +/* harmony default export */ __webpack_exports__["default"] = (SvgIconClaudy); + +/***/ }), + +/***/ "Ap1d": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForbiddenException", function() { return ForbiddenException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerErrorException", function() { return ServerErrorException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotFoundException", function() { return NotFoundException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MethodNotAllowedException", function() { return MethodNotAllowedException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnavailableStackException", function() { return UnavailableStackException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnavailableSettingsException", function() { return UnavailableSettingsException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnauthorizedStackException", function() { return UnauthorizedStackException; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2y6E"); +/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var ForbiddenException = /*#__PURE__*/function (_Error) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(ForbiddenException, _Error); + + var _super = _createSuper(ForbiddenException); + + function ForbiddenException(message) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ForbiddenException); + + _this = _super.call(this); + _this.name = 'Forbidden'; + _this.status = 403; + _this.message = message || 'The application does not have permission to access this resource.'; + _this.stack = new Error().stack; + return _this; + } + + return ForbiddenException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var ServerErrorException = /*#__PURE__*/function (_Error2) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(ServerErrorException, _Error2); + + var _super2 = _createSuper(ServerErrorException); + + function ServerErrorException(message) { + var _this2; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ServerErrorException); + + _this2 = _super2.call(this); + _this2.name = 'ServerError'; + _this2.status = 500; + _this2.message = message || 'A server error occurred'; + _this2.stack = new Error().stack; + return _this2; + } + + return ServerErrorException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var NotFoundException = /*#__PURE__*/function (_Error3) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(NotFoundException, _Error3); + + var _super3 = _createSuper(NotFoundException); + + function NotFoundException(message) { + var _this3; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, NotFoundException); + + _this3 = _super3.call(this); + _this3.name = 'NotFound'; + _this3.status = 404; + _this3.message = message || 'The ressource was not found'; + _this3.stack = new Error().stack; + return _this3; + } + + return NotFoundException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var MethodNotAllowedException = /*#__PURE__*/function (_Error4) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(MethodNotAllowedException, _Error4); + + var _super4 = _createSuper(MethodNotAllowedException); + + function MethodNotAllowedException(message) { + var _this4; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MethodNotAllowedException); + + _this4 = _super4.call(this); + _this4.name = 'MethodNotAllowed'; + _this4.status = 405; + _this4.message = message || 'Method not allowed'; + _this4.stack = new Error().stack; + return _this4; + } + + return MethodNotAllowedException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnavailableStackException = /*#__PURE__*/function (_Error5) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnavailableStackException, _Error5); + + var _super5 = _createSuper(UnavailableStackException); + + function UnavailableStackException(message) { + var _this5; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnavailableStackException); + + _this5 = _super5.call(this); + _this5.name = 'UnavailableStack'; + _this5.message = message || 'The stack is temporarily unavailable'; + _this5.stack = new Error().stack; + return _this5; + } + + return UnavailableStackException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnauthorizedStackException = /*#__PURE__*/function (_Error6) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnauthorizedStackException, _Error6); + + var _super6 = _createSuper(UnauthorizedStackException); + + function UnauthorizedStackException(message) { + var _this6; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnauthorizedStackException); + + _this6 = _super6.call(this); + _this6.name = 'UnauthorizedStack'; + _this6.status = 401; + _this6.message = message || 'The app is not allowed to access to the requested resource'; + _this6.stack = new Error().stack; + return _this6; + } + + return UnauthorizedStackException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnavailableSettingsException = /*#__PURE__*/function (_Error7) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnavailableSettingsException, _Error7); + + var _super7 = _createSuper(UnavailableSettingsException); + + function UnavailableSettingsException(message) { + var _this7; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnavailableSettingsException); + + _this7 = _super7.call(this); + _this7.name = 'UnavailableSettings'; + _this7.message = message || "The 'Settings' application isn't available or installed in the stack"; + _this7.stack = new Error().stack; + return _this7; + } + + return UnavailableSettingsException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + + + +/***/ }), + +/***/ "Aqqx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.isForAccount = exports.isForKonnector = exports.normalizeTrigger = exports.TRIGGERS_DOCTYPE = exports.JOBS_DOCTYPE = void 0; + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _get3 = _interopRequireDefault(__webpack_require__("RNXH")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _Collection = _interopRequireWildcard(__webpack_require__("XXj1")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _JobCollection = __webpack_require__("mcp6"); + +var _utils = __webpack_require__("YJcZ"); + +var _errors = __webpack_require__("twUa"); + +function _templateObject4() { + var data = (0, _taggedTemplateLiteral2.default)(["/jobs/triggers/", "/launch"]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/jobs/triggers/", ""]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/jobs/triggers/", ""]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/jobs/triggers"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var JOBS_DOCTYPE = 'io.cozy.jobs'; +exports.JOBS_DOCTYPE = JOBS_DOCTYPE; +var TRIGGERS_DOCTYPE = 'io.cozy.triggers'; +exports.TRIGGERS_DOCTYPE = TRIGGERS_DOCTYPE; + +var normalizeTrigger = function normalizeTrigger(trigger) { + return _objectSpread(_objectSpread(_objectSpread({}, trigger), (0, _DocumentCollection2.normalizeDoc)(trigger, TRIGGERS_DOCTYPE)), trigger.attributes); +}; + +exports.normalizeTrigger = normalizeTrigger; + +var isForKonnector = function isForKonnector(triggerAttrs, slug) { + return triggerAttrs.worker === 'konnector' && triggerAttrs.message.konnector == slug; +}; + +exports.isForKonnector = isForKonnector; + +var isForAccount = function isForAccount(triggerAttrs, accountId) { + return triggerAttrs.message.account == accountId; +}; + +exports.isForAccount = isForAccount; + +var buildParamsUrl = function buildParamsUrl(worker, type) { + var urlParams = new URLSearchParams(); + + if (worker) { + if (Array.isArray(worker.$in)) { + urlParams.set('Worker', worker.$in.join(',')); + } else { + urlParams.set('Worker', worker); + } + } + + if (type) { + if (Array.isArray(type.$in)) { + urlParams.set('Type', type.$in.join(',')); + } else { + urlParams.set('Type', type); + } + } + + return urlParams.toString(); +}; +/** + * Implements `DocumentCollection` API along with specific methods for `io.cozy.triggers`. + */ + + +var TriggerCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(TriggerCollection, _DocumentCollection); + + var _super = _createSuper(TriggerCollection); + + function TriggerCollection(stackClient) { + (0, _classCallCheck2.default)(this, TriggerCollection); + return _super.call(this, TRIGGERS_DOCTYPE, stackClient); + } + /** + * Get the list of triggers. + * + * @see https://docs.cozy.io/en/cozy-stack/jobs/#get-jobstriggers + * @param {{Worker}} options The fetch options: Worker allow to filter only triggers associated with a specific worker. + * @returns {{data}} The JSON API conformant response. + * @throws {FetchError} + */ + + + (0, _createClass2.default)(TriggerCollection, [{ + key: "all", + value: function () { + var _all = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var options, + resp, + _args = arguments; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; + _context.prev = 1; + _context.next = 4; + return this.stackClient.fetchJSON('GET', "/jobs/triggers"); + + case 4: + resp = _context.sent; + return _context.abrupt("return", { + data: resp.data.map(function (row) { + return normalizeTrigger(row, TRIGGERS_DOCTYPE); + }), + meta: { + count: resp.data.length + }, + next: false, + skip: 0 + }); + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](1); + return _context.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context.t0)); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[1, 8]]); + })); + + function all() { + return _all.apply(this, arguments); + } + + return all; + }() + /** + * Creates a Trigger document + * + * @see https://docs.cozy.io/en/cozy-stack/jobs/#post-jobstriggers + * @param {object} attributes Trigger's attributes + * @returns {object} Stack response, containing trigger document under `data` attribute. + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(attributes) { + var path, resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + path = (0, _utils.uri)(_templateObject()); + _context2.next = 3; + return this.stackClient.fetchJSON('POST', path, { + data: { + attributes: attributes + } + }); + + case 3: + resp = _context2.sent; + return _context2.abrupt("return", { + data: normalizeTrigger(resp.data) + }); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function create(_x) { + return _create.apply(this, arguments); + } + + return create; + }() + /** + * Deletes a trigger + * + * @see https://docs.cozy.io/en/cozy-stack/jobs/#delete-jobstriggerstrigger-id + * @param {object} document The trigger to delete — must have an _id field + * @returns {object} The deleted document + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(document) { + var _id; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _id = document._id; + + if (_id) { + _context3.next = 3; + break; + } + + throw new Error('TriggerCollection.destroy needs a document with an _id'); + + case 3: + _context3.next = 5; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject2(), _id)); + + case 5: + return _context3.abrupt("return", { + data: normalizeTrigger(_objectSpread(_objectSpread({}, document), {}, { + _deleted: true + })) + }); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function destroy(_x2) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + /** + * + * Be warned, ATM /jobs/triggers does not return the same informations + * than /data/io.cozy.triggers (used by the super.find method). + * + * See https://github.com/cozy/cozy-stack/pull/2010 + * + * @param {object} selector - Which kind of worker {konnector,service} + * @param {object} options - Options + * @returns {{data, meta, skip, next}} The JSON API conformant response. + * @throws {FetchError} + */ + + }, { + key: "find", + value: function () { + var _find = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { + var selector, + options, + worker, + type, + rest, + hasOnlyWorkerAndType, + url, + resp, + _args4 = arguments; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + selector = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}; + options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}; + worker = selector.worker, type = selector.type, rest = (0, _objectWithoutProperties2.default)(selector, ["worker", "type"]); + hasOnlyWorkerAndType = Object.keys(rest).length === 0; + + if (!hasOnlyWorkerAndType) { + _context4.next = 18; + break; + } + + // @see https://github.com/cozy/cozy-stack/blob/master/docs/jobs.md#get-jobstriggers + url = "/jobs/triggers?".concat(buildParamsUrl(worker, type)); + _context4.prev = 6; + _context4.next = 9; + return this.stackClient.fetchJSON('GET', url); + + case 9: + resp = _context4.sent; + return _context4.abrupt("return", { + data: resp.data.map(function (row) { + return normalizeTrigger(row, TRIGGERS_DOCTYPE); + }), + meta: { + count: resp.data.length + }, + next: false, + skip: 0 + }); + + case 13: + _context4.prev = 13; + _context4.t0 = _context4["catch"](6); + return _context4.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context4.t0)); + + case 16: + _context4.next = 19; + break; + + case 18: + return _context4.abrupt("return", (0, _get3.default)((0, _getPrototypeOf2.default)(TriggerCollection.prototype), "find", this).call(this, selector, options)); + + case 19: + case "end": + return _context4.stop(); + } + } + }, _callee4, this, [[6, 13]]); + })); + + function find() { + return _find.apply(this, arguments); + } + + return find; + }() + }, { + key: "get", + value: function () { + var _get2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) { + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", _Collection.default.get(this.stackClient, (0, _utils.uri)(_templateObject3(), id), { + normalize: normalizeTrigger + })); + + case 1: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function get(_x3) { + return _get2.apply(this, arguments); + } + + return get; + }() + /** + * Force given trigger execution. + * + * @see https://docs.cozy.io/en/cozy-stack/jobs/#post-jobstriggerstrigger-idlaunch + * @param {object} trigger Trigger to launch + * @returns {object} Stack response, containing job launched by trigger, under `data` attribute. + */ + + }, { + key: "launch", + value: function () { + var _launch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(trigger) { + var path, resp; + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + path = (0, _utils.uri)(_templateObject4(), trigger._id); + _context6.next = 3; + return this.stackClient.fetchJSON('POST', path); + + case 3: + resp = _context6.sent; + return _context6.abrupt("return", { + data: (0, _JobCollection.normalizeJob)(resp.data) + }); + + case 5: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function launch(_x4) { + return _launch.apply(this, arguments); + } + + return launch; + }() + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() { + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + throw new Error('update() method is not available for triggers'); + + case 1: + case "end": + return _context7.stop(); + } + } + }, _callee7); + })); + + function update() { + return _update.apply(this, arguments); + } + + return update; + }() + }]); + return TriggerCollection; +}(_DocumentCollection2.default); + +TriggerCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = TriggerCollection; +exports.default = _default; + +/***/ }), + +/***/ "AvzS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +if (__webpack_require__("WXXH")) { + var LIBRARY = __webpack_require__("RqGj"); + var global = __webpack_require__("ETne"); + var fails = __webpack_require__("enc5"); + var $export = __webpack_require__("LRPZ"); + var $typed = __webpack_require__("Yivq"); + var $buffer = __webpack_require__("QfaY"); + var ctx = __webpack_require__("DnF+"); + var anInstance = __webpack_require__("/Ytg"); + var propertyDesc = __webpack_require__("nVWS"); + var hide = __webpack_require__("XyXA"); + var redefineAll = __webpack_require__("UDoN"); + var toInteger = __webpack_require__("HzFX"); + var toLength = __webpack_require__("yhnj"); + var toIndex = __webpack_require__("LcW+"); + var toAbsoluteIndex = __webpack_require__("I9Qy"); + var toPrimitive = __webpack_require__("Tven"); + var has = __webpack_require__("00OQ"); + var classof = __webpack_require__("MrcW"); + var isObject = __webpack_require__("pFmr"); + var toObject = __webpack_require__("05TQ"); + var isArrayIter = __webpack_require__("cdPs"); + var create = __webpack_require__("7wnO"); + var getPrototypeOf = __webpack_require__("EjI+"); + var gOPN = __webpack_require__("qeDk").f; + var getIterFn = __webpack_require__("+IUY"); + var uid = __webpack_require__("Jz0u"); + var wks = __webpack_require__("Yhpl"); + var createArrayMethod = __webpack_require__("7NDg"); + var createArrayIncludes = __webpack_require__("IHbp"); + var speciesConstructor = __webpack_require__("iyRu"); + var ArrayIterators = __webpack_require__("MHAU"); + var Iterators = __webpack_require__("Ikrg"); + var $iterDetect = __webpack_require__("V06o"); + var setSpecies = __webpack_require__("iaIa"); + var arrayFill = __webpack_require__("Axkr"); + var arrayCopyWithin = __webpack_require__("BrK0"); + var $DP = __webpack_require__("GwHQ"); + var $GOPD = __webpack_require__("Yfzq"); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + var toOffset = function (it, BYTES) { + var offset = toInteger(it); + if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function (it) { + if (isObject(it) && TYPED_ARRAY in it) return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function (C, length) { + if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) { + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function (O, list) { + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function (C, list) { + var index = 0; + var length = list.length; + var result = allocate(C, length); + while (length > index) result[index] = list[index++]; + return result; + }; + + var addGetter = function (it, key, internal) { + dP(it, key, { get: function () { return this._d[internal]; } }); + }; + + var $from = function from(source /* , mapfn, thisArg */) { + var O = toObject(source); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var i, length, values, result, step, iterator; + if (iterFn != undefined && !isArrayIter(iterFn)) { + for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) { + values.push(step.value); + } O = values; + } + if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2); + for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/* ...items */) { + var index = 0; + var length = arguments.length; + var result = allocate(this, length); + while (length > index) result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString() { + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /* , end */) { + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /* , thisArg */) { + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /* , thisArg */) { + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /* , thisArg */) { + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /* , thisArg */) { + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /* , thisArg */) { + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /* , fromIndex */) { + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /* , fromIndex */) { + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator) { // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /* , thisArg */) { + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse() { + var that = this; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /* , thisArg */) { + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn) { + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end) { + var O = validate(this); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end) { + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /* , offset */) { + validate(this); + var offset = toOffset(arguments[1], 1); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var index = 0; + if (len + offset > length) throw RangeError(WRONG_LENGTH); + while (index < len) this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries() { + return arrayEntries.call(validate(this)); + }, + keys: function keys() { + return arrayKeys.call(validate(this)); + }, + values: function values() { + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function (target, key) { + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key) { + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc) { + if (isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ) { + target[key] = desc.value; + return target; + } return dP(target, key, desc); + }; + + if (!ALL_CONSTRUCTORS) { + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if (fails(function () { arrayToString.call({}); })) { + arrayToString = arrayToLocaleString = function toString() { + return arrayJoin.call(this); + }; + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function () { /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function () { return this[TYPED_ARRAY]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function (that, index) { + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function (that, index, value) { + var data = that._d; + if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function (that, index) { + dP(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + if (FORCED) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME, '_d'); + var index = 0; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (TYPED_ARRAY in data) { + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)) { + TypedArray = wrapper(function (that, data, $offset, $length) { + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if (!isObject(data)) return new Base(toIndex(data)); + if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) { + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if (TYPED_ARRAY in data) return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) { + if (!(key in TypedArray)) hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) { + dP(TypedArrayPrototype, TAG, { + get: function () { return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + from: $from, + of: $of + }); + + if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, { set: $set }); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString; + + $export($export.P + $export.F * fails(function () { + new TypedArray(1).slice(); + }), NAME, { slice: $slice }); + + $export($export.P + $export.F * (fails(function () { + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString(); + }) || !fails(function () { + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, { toLocaleString: $toLocaleString }); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), + +/***/ "Axkr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + +var toObject = __webpack_require__("05TQ"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +var toLength = __webpack_require__("yhnj"); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), + +/***/ "AzAX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isWebApp = exports.isMobileApp = exports.isMobile = exports.isIOSApp = exports.isIOS = exports.isAndroidApp = exports.isAndroid = exports.getPlatform = void 0; + +var _cordova = __webpack_require__("dlno"); + +var ANDROID_PLATFORM = 'android'; +var IOS_PLATFORM = 'ios'; +var WEB_PLATFORM = 'web'; + +var getPlatform = function getPlatform() { + return (0, _cordova.isCordova)() ? window.cordova.platformId : WEB_PLATFORM; +}; + +exports.getPlatform = getPlatform; + +var isPlatform = function isPlatform(platform) { + return getPlatform() === platform; +}; + +var isIOSApp = function isIOSApp() { + return isPlatform(IOS_PLATFORM); +}; + +exports.isIOSApp = isIOSApp; + +var isAndroidApp = function isAndroidApp() { + return isPlatform(ANDROID_PLATFORM); +}; + +exports.isAndroidApp = isAndroidApp; + +var isWebApp = function isWebApp() { + return isPlatform(WEB_PLATFORM); +}; + +exports.isWebApp = isWebApp; + +var isMobileApp = function isMobileApp() { + return (0, _cordova.isCordova)(); +}; // return if is on an Android Device (native or browser) + + +exports.isMobileApp = isMobileApp; + +var isAndroid = function isAndroid() { + return window.navigator.userAgent && window.navigator.userAgent.indexOf('Android') >= 0; +}; // return if is on an iOS Device (native or browser) + + +exports.isAndroid = isAndroid; + +var isIOS = function isIOS() { + return window.navigator.userAgent && /iPad|iPhone|iPod/.test(window.navigator.userAgent); +}; // isMobile checks if the user is on a smartphone : native app or browser + + +exports.isIOS = isIOS; + +var isMobile = function isMobile() { + return isAndroid() || isIOS(); +}; + +exports.isMobile = isMobile; + +/***/ }), + +/***/ "B/g2": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var toIObject = __webpack_require__("764U"); +var toLength = __webpack_require__("yhnj"); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + + +/***/ }), + +/***/ "B3W8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var RequireObjectCoercible = __webpack_require__("YG3o"); +var callBound = __webpack_require__("KqZw"); +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); +var $push = callBound('Array.prototype.push'); + +module.exports = function entries(O) { + var obj = RequireObjectCoercible(O); + var entrys = []; + for (var key in obj) { + if ($isEnumerable(obj, key)) { // checks own-ness as well + $push(entrys, [key, obj[key]]); + } + } + return entrys; +}; + + +/***/ }), + +/***/ "B4A6": +/***/ (function(module, exports, __webpack_require__) { + +var Minilog = __webpack_require__("4Fsf"); + +var oldEnable = Minilog.enable, + oldDisable = Minilog.disable, + isChrome = (typeof navigator != 'undefined' && /chrome/i.test(navigator.userAgent)), + console = __webpack_require__("Jtwb"); + +// Use a more capable logging backend if on Chrome +Minilog.defaultBackend = (isChrome ? console.minilog : console); + +// apply enable inputs from localStorage and from the URL +if(typeof window != 'undefined') { + try { + Minilog.enable(JSON.parse(window.localStorage['minilogSettings'])); + } catch(e) {} + if(window.location && window.location.search) { + var match = RegExp('[?&]minilog=([^&]*)').exec(window.location.search); + match && Minilog.enable(decodeURIComponent(match[1])); + } +} + +// Make enable also add to localStorage +Minilog.enable = function() { + oldEnable.call(Minilog, true); + try { window.localStorage['minilogSettings'] = JSON.stringify(true); } catch(e) {} + return this; +}; + +Minilog.disable = function() { + oldDisable.call(Minilog); + try { delete window.localStorage.minilogSettings; } catch(e) {} + return this; +}; + +exports = module.exports = Minilog; + +exports.backends = { + array: __webpack_require__("mjUP"), + browser: Minilog.defaultBackend, + localStorage: __webpack_require__("hw9v"), + jQuery: __webpack_require__("1JyF") +}; + + +/***/ }), + +/***/ "B8YJ": +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; + + +/***/ }), + +/***/ "B95+": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.10 Reflect.isExtensible(target) +var $export = __webpack_require__("LRPZ"); +var anObject = __webpack_require__("eckd"); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + + +/***/ }), + +/***/ "BAxE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("7u78"); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__); + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + +var Banner = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Banner, _Component); + + var _super = _createSuper(Banner); + + function Banner(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Banner); + + _this = _super.call(this, props); + _this.state = { + unmounted: true + }; + _this.animate = _this.animate.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Banner, [{ + key: "animate", + value: function animate() { + var _this2 = this; + + // To animate we have to use a setTimeout to + // force a CSS class update and trigger CSS animation + return setTimeout(function () { + _this2.setState(function () { + return { + unmounted: false + }; + }); + }, 100); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.animate(); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + t = _this$props.t, + code = _this$props.code, + links = _this$props.links; + var unmounted = this.state.unmounted; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { + className: "coz-bar-banner".concat(unmounted ? ' unmounted' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("p", null, t("banner.".concat(code, ".description"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__["ButtonLink"], { + className: "coz-bar-banner-button", + size: "tiny", + href: links, + label: t("banner.".concat(code, ".CTA")) + })); + } + }]); + + return Banner; +}(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__["translate"])()(Banner)); + +/***/ }), + +/***/ "BBeL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("I4/v"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _TransitionGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("nJpz"); + + + + + + +/** + * The `<ReplaceTransition>` component is a specialized `Transition` component + * that animates between two children. + * + * ```jsx + * <ReplaceTransition in> + * <Fade><div>I appear first</div></Fade> + * <Fade><div>I replace the above</div></Fade> + * </ReplaceTransition> + * ``` + */ + +var ReplaceTransition = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(ReplaceTransition, _React$Component); + + function ReplaceTransition() { + var _this; + + for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { + _args[_key] = arguments[_key]; + } + + _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this; + + _this.handleEnter = function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + return _this.handleLifecycle('onEnter', 0, args); + }; + + _this.handleEntering = function () { + for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + args[_key3] = arguments[_key3]; + } + + return _this.handleLifecycle('onEntering', 0, args); + }; + + _this.handleEntered = function () { + for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + args[_key4] = arguments[_key4]; + } + + return _this.handleLifecycle('onEntered', 0, args); + }; + + _this.handleExit = function () { + for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + args[_key5] = arguments[_key5]; + } + + return _this.handleLifecycle('onExit', 1, args); + }; + + _this.handleExiting = function () { + for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + args[_key6] = arguments[_key6]; + } + + return _this.handleLifecycle('onExiting', 1, args); + }; + + _this.handleExited = function () { + for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { + args[_key7] = arguments[_key7]; + } + + return _this.handleLifecycle('onExited', 1, args); + }; + + return _this; + } + + var _proto = ReplaceTransition.prototype; + + _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) { + var _child$props; + + var children = this.props.children; + var child = react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.toArray(children)[idx]; + if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs); + + if (this.props[handler]) { + var maybeNode = child.props.nodeRef ? undefined : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this); + this.props[handler](maybeNode); + } + }; + + _proto.render = function render() { + var _this$props = this.props, + children = _this$props.children, + inProp = _this$props.in, + props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$props, ["children", "in"]); + + var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.toArray(children), + first = _React$Children$toArr[0], + second = _React$Children$toArr[1]; + + delete props.onEnter; + delete props.onEntering; + delete props.onEntered; + delete props.onExit; + delete props.onExiting; + delete props.onExited; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_TransitionGroup__WEBPACK_IMPORTED_MODULE_5__["default"], props, inProp ? react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(first, { + key: 'first', + onEnter: this.handleEnter, + onEntering: this.handleEntering, + onEntered: this.handleEntered + }) : react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(second, { + key: 'second', + onEnter: this.handleExit, + onEntering: this.handleExiting, + onEntered: this.handleExited + })); + }; + + return ReplaceTransition; +}(react__WEBPACK_IMPORTED_MODULE_3___default.a.Component); + +ReplaceTransition.propTypes = false ? undefined : {}; +/* harmony default export */ __webpack_exports__["default"] = (ReplaceTransition); + +/***/ }), + +/***/ "BCXA": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _dsl = __webpack_require__("v2kV"); + +var _Association2 = _interopRequireDefault(__webpack_require__("urEX")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * + * Used when related documents are stored directly under the attribute with + * only the ids. + * + * @property {Function} get + * + * @description + * + * An example document representing a TODO. See as the related + * tasks are represented via ids. + * + * ```js + * const todo = { + * label: "Protect people's privacy", + * tasks: [1, 2] + * } + * ``` + * + * Here is the `Schema` that would represent this kind of document. + * Components receiving todos via `Query`s would have an instance of `HasManyInPlace` + * as their `tasks` attribute. + * + * ```js + * const schema = { + * todos: { + * doctype: 'io.cozy.todos', + * relationships: { + * tasks: { + * doctype: 'io.cozy.tasks', + * type: 'has-many-in-place' + * } + * } + * } + * } + * + * const todo = { + * label: "Get rich", + * tasks: [1, 2] + * } + * ``` + * + */ +var HasManyInPlace = /*#__PURE__*/function (_Association) { + (0, _inherits2.default)(HasManyInPlace, _Association); + + var _super = _createSuper(HasManyInPlace); + + function HasManyInPlace() { + (0, _classCallCheck2.default)(this, HasManyInPlace); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(HasManyInPlace, [{ + key: "addById", + value: function addById(id) { + var rel = this.getRelationship(); + rel.push(id); + } + }, { + key: "removeById", + value: function removeById(id) { + var rel = this.getRelationship(); + var index = rel.indexOf(id); + + if (index !== -1) { + rel.splice(index, 1); + } + } + }, { + key: "existsById", + value: function existsById(id) { + var rel = this.getRelationship(); + return rel.indexOf(id) !== -1; + } + }, { + key: "getRelationship", + value: function getRelationship() { + this.target[this.name] = this.target[this.name] || []; + return this.target[this.name]; + } + }, { + key: "dehydrate", + value: function dehydrate(doc) { + return _objectSpread(_objectSpread({}, doc), {}, (0, _defineProperty2.default)({}, this.name, this.raw || [])); + } + }, { + key: "raw", + + /** + * Raw property + * + * @type {Array<string>} + */ + get: function get() { + return this.target[this.name]; + } + }, { + key: "data", + get: function get() { + var _this = this; + + var doctype = this.doctype; + return (this.raw || []).map(function (_id) { + return _this.get(doctype, _id); + }); + } + /** + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - The query params + * + * @returns {import("../types").CozyClientDocument | QueryDefinition} + */ + + }], [{ + key: "query", + value: function query(document, client, assoc) { + var ids = document[assoc.name]; + + if (ids && ids > 0) { + return (0, _dsl.Q)(assoc.doctype).getByIds(ids); + } else { + return null; + } + } + }]); + return HasManyInPlace; +}(_Association2.default); + +var _default = HasManyInPlace; +exports.default = _default; + +/***/ }), + +/***/ "BDc3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OJkG"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("QRhp"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'block', + transformOrigin: 'top left' + }, + + /* Pseudo-class applied to the root element if `focused={true}`. */ + focused: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Pseudo-class applied to the root element if `required={true}`. */ + required: {}, + + /* Pseudo-class applied to the asterisk element. */ + asterisk: {}, + + /* Styles applied to the root element if the component is a descendant of `FormControl`. */ + formControl: { + position: 'absolute', + left: 0, + top: 0, + // slight alteration to spec spacing to match visual spec result + transform: 'translate(0, 24px) scale(1)' + }, + + /* Styles applied to the root element if `margin="dense"`. */ + marginDense: { + // Compensation for the `Input.inputDense` style. + transform: 'translate(0, 21px) scale(1)' + }, + + /* Styles applied to the `input` element if `shrink={true}`. */ + shrink: { + transform: 'translate(0, 1.5px) scale(0.75)', + transformOrigin: 'top left' + }, + + /* Styles applied to the `input` element if `disableAnimation={false}`. */ + animated: { + transition: theme.transitions.create(['color', 'transform'], { + duration: theme.transitions.duration.shorter, + easing: theme.transitions.easing.easeOut + }) + }, + + /* Styles applied to the root element if `variant="filled"`. */ + filled: { + // Chrome's autofill feature gives the input field a yellow background. + // Since the input field is behind the label in the HTML tree, + // the input field is drawn last and hides the label with an opaque background color. + // zIndex: 1 will raise the label above opaque background-colors of input. + zIndex: 1, + pointerEvents: 'none', + transform: 'translate(12px, 20px) scale(1)', + '&$marginDense': { + transform: 'translate(12px, 17px) scale(1)' + }, + '&$shrink': { + transform: 'translate(12px, 10px) scale(0.75)', + '&$marginDense': { + transform: 'translate(12px, 7px) scale(0.75)' + } + } + }, + + /* Styles applied to the root element if `variant="outlined"`. */ + outlined: { + // see comment above on filled.zIndex + zIndex: 1, + pointerEvents: 'none', + transform: 'translate(14px, 20px) scale(1)', + '&$marginDense': { + transform: 'translate(14px, 12px) scale(1)' + }, + '&$shrink': { + transform: 'translate(14px, -6px) scale(0.75)' + } + } + }; +}; +var InputLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function InputLabel(props, ref) { + var classes = props.classes, + className = props.className, + _props$disableAnimati = props.disableAnimation, + disableAnimation = _props$disableAnimati === void 0 ? false : _props$disableAnimati, + margin = props.margin, + shrinkProp = props.shrink, + variant = props.variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "disableAnimation", "margin", "shrink", "variant"]); + + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__["default"])(); + var shrink = shrinkProp; + + if (typeof shrink === 'undefined' && muiFormControl) { + shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart; + } + + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['margin', 'variant'] + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FormLabel__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + "data-shrink": shrink, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, muiFormControl && classes.formControl, !disableAnimation && classes.animated, shrink && classes.shrink, fcs.margin === 'dense' && classes.marginDense, { + 'filled': classes.filled, + 'outlined': classes.outlined + }[fcs.variant]), + classes: { + focused: classes.focused, + disabled: classes.disabled, + error: classes.error, + required: classes.required, + asterisk: classes.asterisk + }, + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiInputLabel' +})(InputLabel)); + +/***/ }), + +/***/ "BDgH": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; + + +/***/ }), + +/***/ "BE8o": +/***/ (function(module, exports) { + +module.exports = function(originalModule) { + if (!originalModule.webpackPolyfill) { + var module = Object.create(originalModule); + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + Object.defineProperty(module, "exports", { + enumerable: true + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), + +/***/ "BO+l": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isPlainObject; }); +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; +} + +/***/ }), + +/***/ "BOQ2": +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__("b7bY"); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__("HkU0")(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ "BPq5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3N1e"); +/* harmony import */ var _internal_svg_icons_CheckBoxOutlineBlank__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("zUyx"); +/* harmony import */ var _internal_svg_icons_CheckBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("Ntkm"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("PKog"); +/* harmony import */ var _internal_svg_icons_IndeterminateCheckBox__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("eEzp"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("OY/u"); + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + color: theme.palette.text.secondary + }, + + /* Pseudo-class applied to the root element if `checked={true}`. */ + checked: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Pseudo-class applied to the root element if `indeterminate={true}`. */ + indeterminate: {}, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + '&$checked': { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.action.disabled + } + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + '&$checked': { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.action.disabled + } + } + }; +}; +var defaultCheckedIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_CheckBox__WEBPACK_IMPORTED_MODULE_8__["default"], null); +var defaultIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_CheckBoxOutlineBlank__WEBPACK_IMPORTED_MODULE_7__["default"], null); +var defaultIndeterminateIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_IndeterminateCheckBox__WEBPACK_IMPORTED_MODULE_10__["default"], null); +var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Checkbox(props, ref) { + var _props$checkedIcon = props.checkedIcon, + checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon, + classes = props.classes, + _props$color = props.color, + color = _props$color === void 0 ? 'secondary' : _props$color, + _props$icon = props.icon, + iconProp = _props$icon === void 0 ? defaultIcon : _props$icon, + _props$indeterminate = props.indeterminate, + indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate, + _props$indeterminateI = props.indeterminateIcon, + indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI, + inputProps = props.inputProps, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["checkedIcon", "classes", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"]); + + var icon = indeterminate ? indeterminateIconProp : iconProp; + var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + type: "checkbox", + classes: { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__["default"])(color))], indeterminate && classes.indeterminate), + checked: classes.checked, + disabled: classes.disabled + }, + color: color, + inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + 'data-indeterminate': indeterminate + }, inputProps), + icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](icon, { + fontSize: icon.props.fontSize === undefined && size === "small" ? size : icon.props.fontSize + }), + checkedIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](indeterminateIcon, { + fontSize: indeterminateIcon.props.fontSize === undefined && size === "small" ? size : indeterminateIcon.props.fontSize + }), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_12__["default"])(styles, { + name: 'MuiCheckbox' +})(Checkbox)); + +/***/ }), + +/***/ "BTE/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("VHzf"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("PKog"); + + + + + + + + + +var styles = function styles(theme) { + var emphasis = theme.palette.type === 'light' ? 0.8 : 0.98; + var backgroundColor = Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["emphasize"])(theme.palette.background.default, emphasis); + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.typography.body2, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({ + color: theme.palette.getContrastText(backgroundColor), + backgroundColor: backgroundColor, + display: 'flex', + alignItems: 'center', + flexWrap: 'wrap', + padding: '6px 16px', + borderRadius: theme.shape.borderRadius, + flexGrow: 1 + }, theme.breakpoints.up('sm'), { + flexGrow: 'initial', + minWidth: 288 + })), + + /* Styles applied to the message wrapper element. */ + message: { + padding: '8px 0' + }, + + /* Styles applied to the action wrapper element if `action` is provided. */ + action: { + display: 'flex', + alignItems: 'center', + marginLeft: 'auto', + paddingLeft: 16, + marginRight: -8 + } + }; +}; +var SnackbarContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function SnackbarContent(props, ref) { + var action = props.action, + classes = props.classes, + className = props.className, + message = props.message, + _props$role = props.role, + role = _props$role === void 0 ? 'alert' : _props$role, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["action", "classes", "className", "message", "role"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + role: role, + square: true, + elevation: 6, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.message + }, message), action ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.action + }, action) : null); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiSnackbarContent' +})(SnackbarContent)); + +/***/ }), + +/***/ "BUJk": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'] + var monthsFull = ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'] + var weekdays2char = ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'] + var weekdays3char = ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'] + var weekdaysFull = ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'] + var meridiemUppercase = ['صباح', 'مساء'] + var meridiemLowercase = ['ص', 'م'] + var meridiemFull = ['صباحاً', 'مساءاً'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return String(number) +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "BWW+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $filter = __webpack_require__("7NDg")(2); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "BXyO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aPjV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _OutlinedInput__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "BZRD": +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__("aumV"); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), + +/***/ "BZUc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(global) {/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1-lts + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined'; + +var timeoutDuration = function () { + var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; + for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { + if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { + return 1; + } + } + return 0; +}(); + +function microtaskDebounce(fn) { + var called = false; + return function () { + if (called) { + return; + } + called = true; + window.Promise.resolve().then(function () { + called = false; + fn(); + }); + }; +} + +function taskDebounce(fn) { + var scheduled = false; + return function () { + if (!scheduled) { + scheduled = true; + setTimeout(function () { + scheduled = false; + fn(); + }, timeoutDuration); + } + }; +} + +var supportsMicroTasks = isBrowser && window.Promise; + +/** +* Create a debounced version of a method, that's asynchronously deferred +* but called in the minimum time possible. +* +* @method +* @memberof Popper.Utils +* @argument {Function} fn +* @returns {Function} +*/ +var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; + +/** + * Check if the given variable is a function + * @method + * @memberof Popper.Utils + * @argument {Any} functionToCheck - variable to check + * @returns {Boolean} answer to: is a function? + */ +function isFunction(functionToCheck) { + var getType = {}; + return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; +} + +/** + * Get CSS computed property of the given element + * @method + * @memberof Popper.Utils + * @argument {Eement} element + * @argument {String} property + */ +function getStyleComputedProperty(element, property) { + if (element.nodeType !== 1) { + return []; + } + // NOTE: 1 DOM access here + var window = element.ownerDocument.defaultView; + var css = window.getComputedStyle(element, null); + return property ? css[property] : css; +} + +/** + * Returns the parentNode or the host of the element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} parent + */ +function getParentNode(element) { + if (element.nodeName === 'HTML') { + return element; + } + return element.parentNode || element.host; +} + +/** + * Returns the scrolling parent of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} scroll parent + */ +function getScrollParent(element) { + // Return body, `getScroll` will take care to get the correct `scrollTop` from it + if (!element) { + return document.body; + } + + switch (element.nodeName) { + case 'HTML': + case 'BODY': + return element.ownerDocument.body; + case '#document': + return element.body; + } + + // Firefox want us to check `-x` and `-y` variations as well + + var _getStyleComputedProp = getStyleComputedProperty(element), + overflow = _getStyleComputedProp.overflow, + overflowX = _getStyleComputedProp.overflowX, + overflowY = _getStyleComputedProp.overflowY; + + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { + return element; + } + + return getScrollParent(getParentNode(element)); +} + +/** + * Returns the reference node of the reference object, or the reference object itself. + * @method + * @memberof Popper.Utils + * @param {Element|Object} reference - the reference element (the popper will be relative to this) + * @returns {Element} parent + */ +function getReferenceNode(reference) { + return reference && reference.referenceNode ? reference.referenceNode : reference; +} + +var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); +var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); + +/** + * Determines if the browser is Internet Explorer + * @method + * @memberof Popper.Utils + * @param {Number} version to check + * @returns {Boolean} isIE + */ +function isIE(version) { + if (version === 11) { + return isIE11; + } + if (version === 10) { + return isIE10; + } + return isIE11 || isIE10; +} + +/** + * Returns the offset parent of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} offset parent + */ +function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + + // NOTE: 1 DOM access here + var offsetParent = element.offsetParent || null; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + + var nodeName = offsetParent && offsetParent.nodeName; + + if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { + return element ? element.ownerDocument.documentElement : document.documentElement; + } + + // .offsetParent will return the closest TH, TD or TABLE in case + // no offsetParent is present, I hate this job... + if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { + return getOffsetParent(offsetParent); + } + + return offsetParent; +} + +function isOffsetContainer(element) { + var nodeName = element.nodeName; + + if (nodeName === 'BODY') { + return false; + } + return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; +} + +/** + * Finds the root node (document, shadowDOM root) of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} node + * @returns {Element} root node + */ +function getRoot(node) { + if (node.parentNode !== null) { + return getRoot(node.parentNode); + } + + return node; +} + +/** + * Finds the offset parent common to the two provided nodes + * @method + * @memberof Popper.Utils + * @argument {Element} element1 + * @argument {Element} element2 + * @returns {Element} common offset parent + */ +function findCommonOffsetParent(element1, element2) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { + return document.documentElement; + } + + // Here we make sure to give as "start" the element that comes first in the DOM + var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; + var start = order ? element1 : element2; + var end = order ? element2 : element1; + + // Get common ancestor container + var range = document.createRange(); + range.setStart(start, 0); + range.setEnd(end, 0); + var commonAncestorContainer = range.commonAncestorContainer; + + // Both nodes are inside #document + + if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { + if (isOffsetContainer(commonAncestorContainer)) { + return commonAncestorContainer; + } + + return getOffsetParent(commonAncestorContainer); + } + + // one of the nodes is inside shadowDOM, find which one + var element1root = getRoot(element1); + if (element1root.host) { + return findCommonOffsetParent(element1root.host, element2); + } else { + return findCommonOffsetParent(element1, getRoot(element2).host); + } +} + +/** + * Gets the scroll value of the given element in the given side (top and left) + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @argument {String} side `top` or `left` + * @returns {number} amount of scrolled pixels + */ +function getScroll(element) { + var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; + + var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; + var nodeName = element.nodeName; + + if (nodeName === 'BODY' || nodeName === 'HTML') { + var html = element.ownerDocument.documentElement; + var scrollingElement = element.ownerDocument.scrollingElement || html; + return scrollingElement[upperSide]; + } + + return element[upperSide]; +} + +/* + * Sum or subtract the element scroll values (left and top) from a given rect object + * @method + * @memberof Popper.Utils + * @param {Object} rect - Rect object you want to change + * @param {HTMLElement} element - The element from the function reads the scroll values + * @param {Boolean} subtract - set to true if you want to subtract the scroll values + * @return {Object} rect - The modifier rect object + */ +function includeScroll(rect, element) { + var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var scrollTop = getScroll(element, 'top'); + var scrollLeft = getScroll(element, 'left'); + var modifier = subtract ? -1 : 1; + rect.top += scrollTop * modifier; + rect.bottom += scrollTop * modifier; + rect.left += scrollLeft * modifier; + rect.right += scrollLeft * modifier; + return rect; +} + +/* + * Helper to detect borders of a given element + * @method + * @memberof Popper.Utils + * @param {CSSStyleDeclaration} styles + * Result of `getStyleComputedProperty` on the given element + * @param {String} axis - `x` or `y` + * @return {number} borders - The borders size of the given axis + */ + +function getBordersSize(styles, axis) { + var sideA = axis === 'x' ? 'Left' : 'Top'; + var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; + + return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']); +} + +function getSize(axis, body, html, computedStyle) { + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); +} + +function getWindowSizes(document) { + var body = document.body; + var html = document.documentElement; + var computedStyle = isIE(10) && getComputedStyle(html); + + return { + height: getSize('Height', body, html, computedStyle), + width: getSize('Width', body, html, computedStyle) + }; +} + +var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + + + + + +var defineProperty = function (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; +}; + +var _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; +}; + +/** + * Given element offsets, generate an output similar to getBoundingClientRect + * @method + * @memberof Popper.Utils + * @argument {Object} offsets + * @returns {Object} ClientRect like output + */ +function getClientRect(offsets) { + return _extends({}, offsets, { + right: offsets.left + offsets.width, + bottom: offsets.top + offsets.height + }); +} + +/** + * Get bounding client rect of given element + * @method + * @memberof Popper.Utils + * @param {HTMLElement} element + * @return {Object} client rect + */ +function getBoundingClientRect(element) { + var rect = {}; + + // IE10 10 FIX: Please, don't ask, the element isn't + // considered in DOM in some circumstances... + // This isn't reproducible in IE10 compatibility mode of IE11 + try { + if (isIE(10)) { + rect = element.getBoundingClientRect(); + var scrollTop = getScroll(element, 'top'); + var scrollLeft = getScroll(element, 'left'); + rect.top += scrollTop; + rect.left += scrollLeft; + rect.bottom += scrollTop; + rect.right += scrollLeft; + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} + + var result = { + left: rect.left, + top: rect.top, + width: rect.right - rect.left, + height: rect.bottom - rect.top + }; + + // subtract scrollbar size from sizes + var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; + var width = sizes.width || element.clientWidth || result.width; + var height = sizes.height || element.clientHeight || result.height; + + var horizScrollbar = element.offsetWidth - width; + var vertScrollbar = element.offsetHeight - height; + + // if an hypothetical scrollbar is detected, we must be sure it's not a `border` + // we make this check conditional for performance reasons + if (horizScrollbar || vertScrollbar) { + var styles = getStyleComputedProperty(element); + horizScrollbar -= getBordersSize(styles, 'x'); + vertScrollbar -= getBordersSize(styles, 'y'); + + result.width -= horizScrollbar; + result.height -= vertScrollbar; + } + + return getClientRect(result); +} + +function getOffsetRectRelativeToArbitraryNode(children, parent) { + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); + var isHTML = parent.nodeName === 'HTML'; + var childrenRect = getBoundingClientRect(children); + var parentRect = getBoundingClientRect(parent); + var scrollParent = getScrollParent(children); + + var styles = getStyleComputedProperty(parent); + var borderTopWidth = parseFloat(styles.borderTopWidth); + var borderLeftWidth = parseFloat(styles.borderLeftWidth); + + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && isHTML) { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } + var offsets = getClientRect({ + top: childrenRect.top - parentRect.top - borderTopWidth, + left: childrenRect.left - parentRect.left - borderLeftWidth, + width: childrenRect.width, + height: childrenRect.height + }); + offsets.marginTop = 0; + offsets.marginLeft = 0; + + // Subtract margins of documentElement in case it's being used as parent + // we do this only on HTML because it's the only element that behaves + // differently when margins are applied to it. The margins are included in + // the box of the documentElement, in the other cases not. + if (!isIE10 && isHTML) { + var marginTop = parseFloat(styles.marginTop); + var marginLeft = parseFloat(styles.marginLeft); + + offsets.top -= borderTopWidth - marginTop; + offsets.bottom -= borderTopWidth - marginTop; + offsets.left -= borderLeftWidth - marginLeft; + offsets.right -= borderLeftWidth - marginLeft; + + // Attach marginTop and marginLeft because in some circumstances we may need them + offsets.marginTop = marginTop; + offsets.marginLeft = marginLeft; + } + + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + offsets = includeScroll(offsets, parent); + } + + return offsets; +} + +function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var html = element.ownerDocument.documentElement; + var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); + var width = Math.max(html.clientWidth, window.innerWidth || 0); + var height = Math.max(html.clientHeight, window.innerHeight || 0); + + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; + + var offset = { + top: scrollTop - relativeOffset.top + relativeOffset.marginTop, + left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, + width: width, + height: height + }; + + return getClientRect(offset); +} + +/** + * Check if the given element is fixed or is inside a fixed parent + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @argument {Element} customContainer + * @returns {Boolean} answer to "isFixed?" + */ +function isFixed(element) { + var nodeName = element.nodeName; + if (nodeName === 'BODY' || nodeName === 'HTML') { + return false; + } + if (getStyleComputedProperty(element, 'position') === 'fixed') { + return true; + } + var parentNode = getParentNode(element); + if (!parentNode) { + return false; + } + return isFixed(parentNode); +} + +/** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + +function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; +} + +/** + * Computed the boundaries limits and return them + * @method + * @memberof Popper.Utils + * @param {HTMLElement} popper + * @param {HTMLElement} reference + * @param {number} padding + * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode + * @returns {Object} Coordinates of the boundaries + */ +function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + // NOTE: 1 DOM access here + + var boundaries = { top: 0, left: 0 }; + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); + + // Handle viewport case + if (boundariesElement === 'viewport') { + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); + } else { + // Handle other cases based on DOM element used as boundaries + var boundariesNode = void 0; + if (boundariesElement === 'scrollParent') { + boundariesNode = getScrollParent(getParentNode(reference)); + if (boundariesNode.nodeName === 'BODY') { + boundariesNode = popper.ownerDocument.documentElement; + } + } else if (boundariesElement === 'window') { + boundariesNode = popper.ownerDocument.documentElement; + } else { + boundariesNode = boundariesElement; + } + + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); + + // In case of HTML, we need a different computation + if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { + var _getWindowSizes = getWindowSizes(popper.ownerDocument), + height = _getWindowSizes.height, + width = _getWindowSizes.width; + + boundaries.top += offsets.top - offsets.marginTop; + boundaries.bottom = height + offsets.top; + boundaries.left += offsets.left - offsets.marginLeft; + boundaries.right = width + offsets.left; + } else { + // for all the other DOM elements, this one is good + boundaries = offsets; + } + } + + // Add paddings + padding = padding || 0; + var isPaddingNumber = typeof padding === 'number'; + boundaries.left += isPaddingNumber ? padding : padding.left || 0; + boundaries.top += isPaddingNumber ? padding : padding.top || 0; + boundaries.right -= isPaddingNumber ? padding : padding.right || 0; + boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; + + return boundaries; +} + +function getArea(_ref) { + var width = _ref.width, + height = _ref.height; + + return width * height; +} + +/** + * Utility used to transform the `auto` placement to the placement with more + * available space. + * @method + * @memberof Popper.Utils + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { + var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + + if (placement.indexOf('auto') === -1) { + return placement; + } + + var boundaries = getBoundaries(popper, reference, padding, boundariesElement); + + var rects = { + top: { + width: boundaries.width, + height: refRect.top - boundaries.top + }, + right: { + width: boundaries.right - refRect.right, + height: boundaries.height + }, + bottom: { + width: boundaries.width, + height: boundaries.bottom - refRect.bottom + }, + left: { + width: refRect.left - boundaries.left, + height: boundaries.height + } + }; + + var sortedAreas = Object.keys(rects).map(function (key) { + return _extends({ + key: key + }, rects[key], { + area: getArea(rects[key]) + }); + }).sort(function (a, b) { + return b.area - a.area; + }); + + var filteredAreas = sortedAreas.filter(function (_ref2) { + var width = _ref2.width, + height = _ref2.height; + return width >= popper.clientWidth && height >= popper.clientHeight; + }); + + var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; + + var variation = placement.split('-')[1]; + + return computedPlacement + (variation ? '-' + variation : ''); +} + +/** + * Get offsets to the reference element + * @method + * @memberof Popper.Utils + * @param {Object} state + * @param {Element} popper - the popper element + * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode + * @returns {Object} An object containing the offsets which will be applied to the popper + */ +function getReferenceOffsets(state, popper, reference) { + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); +} + +/** + * Get the outer sizes of the given element (offset size + margins) + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Object} object containing width and height properties + */ +function getOuterSizes(element) { + var window = element.ownerDocument.defaultView; + var styles = window.getComputedStyle(element); + var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); + var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); + var result = { + width: element.offsetWidth + y, + height: element.offsetHeight + x + }; + return result; +} + +/** + * Get the opposite placement of the given one + * @method + * @memberof Popper.Utils + * @argument {String} placement + * @returns {String} flipped placement + */ +function getOppositePlacement(placement) { + var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); +} + +/** + * Get offsets to the popper + * @method + * @memberof Popper.Utils + * @param {Object} position - CSS position the Popper will get applied + * @param {HTMLElement} popper - the popper element + * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) + * @param {String} placement - one of the valid placement options + * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper + */ +function getPopperOffsets(popper, referenceOffsets, placement) { + placement = placement.split('-')[0]; + + // Get popper node sizes + var popperRect = getOuterSizes(popper); + + // Add position, width and height to our offsets object + var popperOffsets = { + width: popperRect.width, + height: popperRect.height + }; + + // depending by the popper placement we have to compute its offsets slightly differently + var isHoriz = ['right', 'left'].indexOf(placement) !== -1; + var mainSide = isHoriz ? 'top' : 'left'; + var secondarySide = isHoriz ? 'left' : 'top'; + var measurement = isHoriz ? 'height' : 'width'; + var secondaryMeasurement = !isHoriz ? 'height' : 'width'; + + popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; + if (placement === secondarySide) { + popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; + } else { + popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; + } + + return popperOffsets; +} + +/** + * Mimics the `find` method of Array + * @method + * @memberof Popper.Utils + * @argument {Array} arr + * @argument prop + * @argument value + * @returns index or -1 + */ +function find(arr, check) { + // use native find if supported + if (Array.prototype.find) { + return arr.find(check); + } + + // use `filter` to obtain the same behavior of `find` + return arr.filter(check)[0]; +} + +/** + * Return the index of the matching object + * @method + * @memberof Popper.Utils + * @argument {Array} arr + * @argument prop + * @argument value + * @returns index or -1 + */ +function findIndex(arr, prop, value) { + // use native findIndex if supported + if (Array.prototype.findIndex) { + return arr.findIndex(function (cur) { + return cur[prop] === value; + }); + } + + // use `find` + `indexOf` if `findIndex` isn't supported + var match = find(arr, function (obj) { + return obj[prop] === value; + }); + return arr.indexOf(match); +} + +/** + * Loop trough the list of modifiers and run them in order, + * each of them will then edit the data object. + * @method + * @memberof Popper.Utils + * @param {dataObject} data + * @param {Array} modifiers + * @param {String} ends - Optional modifier name used as stopper + * @returns {dataObject} + */ +function runModifiers(modifiers, data, ends) { + var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); + + modifiersToRun.forEach(function (modifier) { + if (modifier['function']) { + // eslint-disable-line dot-notation + console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); + } + var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation + if (modifier.enabled && isFunction(fn)) { + // Add properties to offsets to make them a complete clientRect object + // we do this before each modifier to make sure the previous one doesn't + // mess with these values + data.offsets.popper = getClientRect(data.offsets.popper); + data.offsets.reference = getClientRect(data.offsets.reference); + + data = fn(data, modifier); + } + }); + + return data; +} + +/** + * Updates the position of the popper, computing the new offsets and applying + * the new style.<br /> + * Prefer `scheduleUpdate` over `update` because of performance reasons. + * @method + * @memberof Popper + */ +function update() { + // if popper is destroyed, don't perform any further update + if (this.state.isDestroyed) { + return; + } + + var data = { + instance: this, + styles: {}, + arrowStyles: {}, + attributes: {}, + flipped: false, + offsets: {} + }; + + // compute reference element offsets + data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); + + // compute auto placement, store placement inside the data object, + // modifiers will be able to edit `placement` if needed + // and refer to originalPlacement to know the original value + data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); + + // store the computed placement inside `originalPlacement` + data.originalPlacement = data.placement; + + data.positionFixed = this.options.positionFixed; + + // compute the popper offsets + data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); + + data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; + + // run the modifiers + data = runModifiers(this.modifiers, data); + + // the first `update` will call `onCreate` callback + // the other ones will call `onUpdate` callback + if (!this.state.isCreated) { + this.state.isCreated = true; + this.options.onCreate(data); + } else { + this.options.onUpdate(data); + } +} + +/** + * Helper used to know if the given modifier is enabled. + * @method + * @memberof Popper.Utils + * @returns {Boolean} + */ +function isModifierEnabled(modifiers, modifierName) { + return modifiers.some(function (_ref) { + var name = _ref.name, + enabled = _ref.enabled; + return enabled && name === modifierName; + }); +} + +/** + * Get the prefixed supported property name + * @method + * @memberof Popper.Utils + * @argument {String} property (camelCase) + * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) + */ +function getSupportedPropertyName(property) { + var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; + var upperProp = property.charAt(0).toUpperCase() + property.slice(1); + + for (var i = 0; i < prefixes.length; i++) { + var prefix = prefixes[i]; + var toCheck = prefix ? '' + prefix + upperProp : property; + if (typeof document.body.style[toCheck] !== 'undefined') { + return toCheck; + } + } + return null; +} + +/** + * Destroys the popper. + * @method + * @memberof Popper + */ +function destroy() { + this.state.isDestroyed = true; + + // touch DOM only if `applyStyle` modifier is enabled + if (isModifierEnabled(this.modifiers, 'applyStyle')) { + this.popper.removeAttribute('x-placement'); + this.popper.style.position = ''; + this.popper.style.top = ''; + this.popper.style.left = ''; + this.popper.style.right = ''; + this.popper.style.bottom = ''; + this.popper.style.willChange = ''; + this.popper.style[getSupportedPropertyName('transform')] = ''; + } + + this.disableEventListeners(); + + // remove the popper if user explicitly asked for the deletion on destroy + // do not use `remove` because IE11 doesn't support it + if (this.options.removeOnDestroy) { + this.popper.parentNode.removeChild(this.popper); + } + return this; +} + +/** + * Get the window associated with the element + * @argument {Element} element + * @returns {Window} + */ +function getWindow(element) { + var ownerDocument = element.ownerDocument; + return ownerDocument ? ownerDocument.defaultView : window; +} + +function attachToScrollParents(scrollParent, event, callback, scrollParents) { + var isBody = scrollParent.nodeName === 'BODY'; + var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; + target.addEventListener(event, callback, { passive: true }); + + if (!isBody) { + attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); + } + scrollParents.push(target); +} + +/** + * Setup needed event listeners used to update the popper position + * @method + * @memberof Popper.Utils + * @private + */ +function setupEventListeners(reference, options, state, updateBound) { + // Resize event listener on window + state.updateBound = updateBound; + getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); + + // Scroll event listener on scroll parents + var scrollElement = getScrollParent(reference); + attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); + state.scrollElement = scrollElement; + state.eventsEnabled = true; + + return state; +} + +/** + * It will add resize/scroll events and start recalculating + * position of the popper element when they are triggered. + * @method + * @memberof Popper + */ +function enableEventListeners() { + if (!this.state.eventsEnabled) { + this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); + } +} + +/** + * Remove event listeners used to update the popper position + * @method + * @memberof Popper.Utils + * @private + */ +function removeEventListeners(reference, state) { + // Remove resize event listener on window + getWindow(reference).removeEventListener('resize', state.updateBound); + + // Remove scroll event listener on scroll parents + state.scrollParents.forEach(function (target) { + target.removeEventListener('scroll', state.updateBound); + }); + + // Reset state + state.updateBound = null; + state.scrollParents = []; + state.scrollElement = null; + state.eventsEnabled = false; + return state; +} + +/** + * It will remove resize/scroll events and won't recalculate popper position + * when they are triggered. It also won't trigger `onUpdate` callback anymore, + * unless you call `update` method manually. + * @method + * @memberof Popper + */ +function disableEventListeners() { + if (this.state.eventsEnabled) { + cancelAnimationFrame(this.scheduleUpdate); + this.state = removeEventListeners(this.reference, this.state); + } +} + +/** + * Tells if a given input is a number + * @method + * @memberof Popper.Utils + * @param {*} input to check + * @return {Boolean} + */ +function isNumeric(n) { + return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); +} + +/** + * Set the style to the given popper + * @method + * @memberof Popper.Utils + * @argument {Element} element - Element to apply the style to + * @argument {Object} styles + * Object with a list of properties and values which will be applied to the element + */ +function setStyles(element, styles) { + Object.keys(styles).forEach(function (prop) { + var unit = ''; + // add unit if the value is numeric and is one of the following + if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { + unit = 'px'; + } + element.style[prop] = styles[prop] + unit; + }); +} + +/** + * Set the attributes to the given popper + * @method + * @memberof Popper.Utils + * @argument {Element} element - Element to apply the attributes to + * @argument {Object} styles + * Object with a list of properties and values which will be applied to the element + */ +function setAttributes(element, attributes) { + Object.keys(attributes).forEach(function (prop) { + var value = attributes[prop]; + if (value !== false) { + element.setAttribute(prop, attributes[prop]); + } else { + element.removeAttribute(prop); + } + }); +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} data.styles - List of style properties - values to apply to popper element + * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The same data object + */ +function applyStyle(data) { + // any property present in `data.styles` will be applied to the popper, + // in this way we can make the 3rd party modifiers add custom styles to it + // Be aware, modifiers could override the properties defined in the previous + // lines of this modifier! + setStyles(data.instance.popper, data.styles); + + // any property present in `data.attributes` will be applied to the popper, + // they will be set as HTML attributes of the element + setAttributes(data.instance.popper, data.attributes); + + // if arrowElement is defined and arrowStyles has some properties + if (data.arrowElement && Object.keys(data.arrowStyles).length) { + setStyles(data.arrowElement, data.arrowStyles); + } + + return data; +} + +/** + * Set the x-placement attribute before everything else because it could be used + * to add margins to the popper margins needs to be calculated to get the + * correct popper offsets. + * @method + * @memberof Popper.modifiers + * @param {HTMLElement} reference - The reference element used to position the popper + * @param {HTMLElement} popper - The HTML element used as popper + * @param {Object} options - Popper.js options + */ +function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { + // compute reference element offsets + var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); + + // compute auto placement, store placement inside the data object, + // modifiers will be able to edit `placement` if needed + // and refer to originalPlacement to know the original value + var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); + + popper.setAttribute('x-placement', placement); + + // Apply `position` to popper before anything else because + // without the position applied we can't guarantee correct computations + setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); + + return options; +} + +/** + * @function + * @memberof Popper.Utils + * @argument {Object} data - The data object generated by `update` method + * @argument {Boolean} shouldRound - If the offsets should be rounded at all + * @returns {Object} The popper's position offsets rounded + * + * The tale of pixel-perfect positioning. It's still not 100% perfect, but as + * good as it can be within reason. + * Discussion here: https://github.com/FezVrasta/popper.js/pull/715 + * + * Low DPI screens cause a popper to be blurry if not using full pixels (Safari + * as well on High DPI screens). + * + * Firefox prefers no rounding for positioning and does not have blurriness on + * high DPI screens. + * + * Only horizontal placement and left/right values need to be considered. + */ +function getRoundedOffsets(data, shouldRound) { + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + var round = Math.round, + floor = Math.floor; + + var noRound = function noRound(v) { + return v; + }; + + var referenceWidth = round(reference.width); + var popperWidth = round(popper.width); + + var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; + var isVariation = data.placement.indexOf('-') !== -1; + var sameWidthParity = referenceWidth % 2 === popperWidth % 2; + var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; + + var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; + var verticalToInteger = !shouldRound ? noRound : round; + + return { + left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), + top: verticalToInteger(popper.top), + bottom: verticalToInteger(popper.bottom), + right: horizontalToInteger(popper.right) + }; +} + +var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function computeStyle(data, options) { + var x = options.x, + y = options.y; + var popper = data.offsets.popper; + + // Remove this legacy support in Popper.js v2 + + var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { + return modifier.name === 'applyStyle'; + }).gpuAcceleration; + if (legacyGpuAccelerationOption !== undefined) { + console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); + } + var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; + + var offsetParent = getOffsetParent(data.instance.popper); + var offsetParentRect = getBoundingClientRect(offsetParent); + + // Styles + var styles = { + position: popper.position + }; + + var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); + + var sideA = x === 'bottom' ? 'top' : 'bottom'; + var sideB = y === 'right' ? 'left' : 'right'; + + // if gpuAcceleration is set to `true` and transform is supported, + // we use `translate3d` to apply the position to the popper we + // automatically use the supported prefixed version if needed + var prefixedProperty = getSupportedPropertyName('transform'); + + // now, let's make a step back and look at this code closely (wtf?) + // If the content of the popper grows once it's been positioned, it + // may happen that the popper gets misplaced because of the new content + // overflowing its reference element + // To avoid this problem, we provide two options (x and y), which allow + // the consumer to define the offset origin. + // If we position a popper on top of a reference element, we can set + // `x` to `top` to make the popper grow towards its top instead of + // its bottom. + var left = void 0, + top = void 0; + if (sideA === 'bottom') { + // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar) + // and not the bottom of the html element + if (offsetParent.nodeName === 'HTML') { + top = -offsetParent.clientHeight + offsets.bottom; + } else { + top = -offsetParentRect.height + offsets.bottom; + } + } else { + top = offsets.top; + } + if (sideB === 'right') { + if (offsetParent.nodeName === 'HTML') { + left = -offsetParent.clientWidth + offsets.right; + } else { + left = -offsetParentRect.width + offsets.right; + } + } else { + left = offsets.left; + } + if (gpuAcceleration && prefixedProperty) { + styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; + styles[sideA] = 0; + styles[sideB] = 0; + styles.willChange = 'transform'; + } else { + // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties + var invertTop = sideA === 'bottom' ? -1 : 1; + var invertLeft = sideB === 'right' ? -1 : 1; + styles[sideA] = top * invertTop; + styles[sideB] = left * invertLeft; + styles.willChange = sideA + ', ' + sideB; + } + + // Attributes + var attributes = { + 'x-placement': data.placement + }; + + // Update `data` attributes, styles and arrowStyles + data.attributes = _extends({}, attributes, data.attributes); + data.styles = _extends({}, styles, data.styles); + data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); + + return data; +} + +/** + * Helper used to know if the given modifier depends from another one.<br /> + * It checks if the needed modifier is listed and enabled. + * @method + * @memberof Popper.Utils + * @param {Array} modifiers - list of modifiers + * @param {String} requestingName - name of requesting modifier + * @param {String} requestedName - name of requested modifier + * @returns {Boolean} + */ +function isModifierRequired(modifiers, requestingName, requestedName) { + var requesting = find(modifiers, function (_ref) { + var name = _ref.name; + return name === requestingName; + }); + + var isRequired = !!requesting && modifiers.some(function (modifier) { + return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; + }); + + if (!isRequired) { + var _requesting = '`' + requestingName + '`'; + var requested = '`' + requestedName + '`'; + console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); + } + return isRequired; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function arrow(data, options) { + var _data$offsets$arrow; + + // arrow depends on keepTogether in order to work + if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { + return data; + } + + var arrowElement = options.element; + + // if arrowElement is a string, suppose it's a CSS selector + if (typeof arrowElement === 'string') { + arrowElement = data.instance.popper.querySelector(arrowElement); + + // if arrowElement is not found, don't run the modifier + if (!arrowElement) { + return data; + } + } else { + // if the arrowElement isn't a query selector we must check that the + // provided DOM node is child of its popper node + if (!data.instance.popper.contains(arrowElement)) { + console.warn('WARNING: `arrow.element` must be child of its popper element!'); + return data; + } + } + + var placement = data.placement.split('-')[0]; + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var isVertical = ['left', 'right'].indexOf(placement) !== -1; + + var len = isVertical ? 'height' : 'width'; + var sideCapitalized = isVertical ? 'Top' : 'Left'; + var side = sideCapitalized.toLowerCase(); + var altSide = isVertical ? 'left' : 'top'; + var opSide = isVertical ? 'bottom' : 'right'; + var arrowElementSize = getOuterSizes(arrowElement)[len]; + + // + // extends keepTogether behavior making sure the popper and its + // reference have enough pixels in conjunction + // + + // top/left side + if (reference[opSide] - arrowElementSize < popper[side]) { + data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); + } + // bottom/right side + if (reference[side] + arrowElementSize > popper[opSide]) { + data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; + } + data.offsets.popper = getClientRect(data.offsets.popper); + + // compute center of the popper + var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; + + // Compute the sideValue using the updated popper offsets + // take popper margin in account because we don't have this info available + var css = getStyleComputedProperty(data.instance.popper); + var popperMarginSide = parseFloat(css['margin' + sideCapitalized]); + var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']); + var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; + + // prevent arrowElement from being placed not contiguously to its popper + sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); + + data.arrowElement = arrowElement; + data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); + + return data; +} + +/** + * Get the opposite placement variation of the given one + * @method + * @memberof Popper.Utils + * @argument {String} placement variation + * @returns {String} flipped placement variation + */ +function getOppositeVariation(variation) { + if (variation === 'end') { + return 'start'; + } else if (variation === 'start') { + return 'end'; + } + return variation; +} + +/** + * List of accepted placements to use as values of the `placement` option.<br /> + * Valid placements are: + * - `auto` + * - `top` + * - `right` + * - `bottom` + * - `left` + * + * Each placement can have a variation from this list: + * - `-start` + * - `-end` + * + * Variations are interpreted easily if you think of them as the left to right + * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` + * is right.<br /> + * Vertically (`left` and `right`), `start` is top and `end` is bottom. + * + * Some valid examples are: + * - `top-end` (on top of reference, right aligned) + * - `right-start` (on right of reference, top aligned) + * - `bottom` (on bottom, centered) + * - `auto-end` (on the side with more space available, alignment depends by placement) + * + * @static + * @type {Array} + * @enum {String} + * @readonly + * @method placements + * @memberof Popper + */ +var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; + +// Get rid of `auto` `auto-start` and `auto-end` +var validPlacements = placements.slice(3); + +/** + * Given an initial placement, returns all the subsequent placements + * clockwise (or counter-clockwise). + * + * @method + * @memberof Popper.Utils + * @argument {String} placement - A valid placement (it accepts variations) + * @argument {Boolean} counter - Set to true to walk the placements counterclockwise + * @returns {Array} placements including their variations + */ +function clockwise(placement) { + var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var index = validPlacements.indexOf(placement); + var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); + return counter ? arr.reverse() : arr; +} + +var BEHAVIORS = { + FLIP: 'flip', + CLOCKWISE: 'clockwise', + COUNTERCLOCKWISE: 'counterclockwise' +}; + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function flip(data, options) { + // if `inner` modifier is enabled, we can't use the `flip` modifier + if (isModifierEnabled(data.instance.modifiers, 'inner')) { + return data; + } + + if (data.flipped && data.placement === data.originalPlacement) { + // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides + return data; + } + + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); + + var placement = data.placement.split('-')[0]; + var placementOpposite = getOppositePlacement(placement); + var variation = data.placement.split('-')[1] || ''; + + var flipOrder = []; + + switch (options.behavior) { + case BEHAVIORS.FLIP: + flipOrder = [placement, placementOpposite]; + break; + case BEHAVIORS.CLOCKWISE: + flipOrder = clockwise(placement); + break; + case BEHAVIORS.COUNTERCLOCKWISE: + flipOrder = clockwise(placement, true); + break; + default: + flipOrder = options.behavior; + } + + flipOrder.forEach(function (step, index) { + if (placement !== step || flipOrder.length === index + 1) { + return data; + } + + placement = data.placement.split('-')[0]; + placementOpposite = getOppositePlacement(placement); + + var popperOffsets = data.offsets.popper; + var refOffsets = data.offsets.reference; + + // using floor because the reference offsets may contain decimals we are not going to consider here + var floor = Math.floor; + var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); + + var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); + var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); + var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); + var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); + + var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; + + // flip the variation if required + var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; + + // flips variation if reference element overflows boundaries + var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); + + // flips variation if popper content overflows boundaries + var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop); + + var flippedVariation = flippedVariationByRef || flippedVariationByContent; + + if (overlapsRef || overflowsBoundaries || flippedVariation) { + // this boolean to detect any flip loop + data.flipped = true; + + if (overlapsRef || overflowsBoundaries) { + placement = flipOrder[index + 1]; + } + + if (flippedVariation) { + variation = getOppositeVariation(variation); + } + + data.placement = placement + (variation ? '-' + variation : ''); + + // this object contains `position`, we want to preserve it along with + // any additional property we may add in the future + data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); + + data = runModifiers(data.instance.modifiers, data, 'flip'); + } + }); + return data; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function keepTogether(data) { + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var placement = data.placement.split('-')[0]; + var floor = Math.floor; + var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; + var side = isVertical ? 'right' : 'bottom'; + var opSide = isVertical ? 'left' : 'top'; + var measurement = isVertical ? 'width' : 'height'; + + if (popper[side] < floor(reference[opSide])) { + data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; + } + if (popper[opSide] > floor(reference[side])) { + data.offsets.popper[opSide] = floor(reference[side]); + } + + return data; +} + +/** + * Converts a string containing value + unit into a px value number + * @function + * @memberof {modifiers~offset} + * @private + * @argument {String} str - Value + unit string + * @argument {String} measurement - `height` or `width` + * @argument {Object} popperOffsets + * @argument {Object} referenceOffsets + * @returns {Number|String} + * Value in pixels, or original string if no values were extracted + */ +function toValue(str, measurement, popperOffsets, referenceOffsets) { + // separate value from unit + var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); + var value = +split[1]; + var unit = split[2]; + + // If it's not a number it's an operator, I guess + if (!value) { + return str; + } + + if (unit.indexOf('%') === 0) { + var element = void 0; + switch (unit) { + case '%p': + element = popperOffsets; + break; + case '%': + case '%r': + default: + element = referenceOffsets; + } + + var rect = getClientRect(element); + return rect[measurement] / 100 * value; + } else if (unit === 'vh' || unit === 'vw') { + // if is a vh or vw, we calculate the size based on the viewport + var size = void 0; + if (unit === 'vh') { + size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); + } else { + size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); + } + return size / 100 * value; + } else { + // if is an explicit pixel unit, we get rid of the unit and keep the value + // if is an implicit unit, it's px, and we return just the value + return value; + } +} + +/** + * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. + * @function + * @memberof {modifiers~offset} + * @private + * @argument {String} offset + * @argument {Object} popperOffsets + * @argument {Object} referenceOffsets + * @argument {String} basePlacement + * @returns {Array} a two cells array with x and y offsets in numbers + */ +function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { + var offsets = [0, 0]; + + // Use height if placement is left or right and index is 0 otherwise use width + // in this way the first offset will use an axis and the second one + // will use the other one + var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; + + // Split the offset string to obtain a list of values and operands + // The regex addresses values with the plus or minus sign in front (+10, -20, etc) + var fragments = offset.split(/(\+|\-)/).map(function (frag) { + return frag.trim(); + }); + + // Detect if the offset string contains a pair of values or a single one + // they could be separated by comma or space + var divider = fragments.indexOf(find(fragments, function (frag) { + return frag.search(/,|\s/) !== -1; + })); + + if (fragments[divider] && fragments[divider].indexOf(',') === -1) { + console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); + } + + // If divider is found, we divide the list of values and operands to divide + // them by ofset X and Y. + var splitRegex = /\s*,\s*|\s+/; + var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; + + // Convert the values with units to absolute pixels to allow our computations + ops = ops.map(function (op, index) { + // Most of the units rely on the orientation of the popper + var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; + var mergeWithPrevious = false; + return op + // This aggregates any `+` or `-` sign that aren't considered operators + // e.g.: 10 + +5 => [10, +, +5] + .reduce(function (a, b) { + if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { + a[a.length - 1] = b; + mergeWithPrevious = true; + return a; + } else if (mergeWithPrevious) { + a[a.length - 1] += b; + mergeWithPrevious = false; + return a; + } else { + return a.concat(b); + } + }, []) + // Here we convert the string values into number values (in px) + .map(function (str) { + return toValue(str, measurement, popperOffsets, referenceOffsets); + }); + }); + + // Loop trough the offsets arrays and execute the operations + ops.forEach(function (op, index) { + op.forEach(function (frag, index2) { + if (isNumeric(frag)) { + offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); + } + }); + }); + return offsets; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @argument {Number|String} options.offset=0 + * The offset value as described in the modifier description + * @returns {Object} The data object, properly modified + */ +function offset(data, _ref) { + var offset = _ref.offset; + var placement = data.placement, + _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var basePlacement = placement.split('-')[0]; + + var offsets = void 0; + if (isNumeric(+offset)) { + offsets = [+offset, 0]; + } else { + offsets = parseOffset(offset, popper, reference, basePlacement); + } + + if (basePlacement === 'left') { + popper.top += offsets[0]; + popper.left -= offsets[1]; + } else if (basePlacement === 'right') { + popper.top += offsets[0]; + popper.left += offsets[1]; + } else if (basePlacement === 'top') { + popper.left += offsets[0]; + popper.top -= offsets[1]; + } else if (basePlacement === 'bottom') { + popper.left += offsets[0]; + popper.top += offsets[1]; + } + + data.popper = popper; + return data; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function preventOverflow(data, options) { + var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); + + // If offsetParent is the reference element, we really want to + // go one step up and use the next offsetParent as reference to + // avoid to make this modifier completely useless and look like broken + if (data.instance.reference === boundariesElement) { + boundariesElement = getOffsetParent(boundariesElement); + } + + // NOTE: DOM access here + // resets the popper's position so that the document size can be calculated excluding + // the size of the popper element itself + var transformProp = getSupportedPropertyName('transform'); + var popperStyles = data.instance.popper.style; // assignment to help minification + var top = popperStyles.top, + left = popperStyles.left, + transform = popperStyles[transformProp]; + + popperStyles.top = ''; + popperStyles.left = ''; + popperStyles[transformProp] = ''; + + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); + + // NOTE: DOM access here + // restores the original style properties after the offsets have been computed + popperStyles.top = top; + popperStyles.left = left; + popperStyles[transformProp] = transform; + + options.boundaries = boundaries; + + var order = options.priority; + var popper = data.offsets.popper; + + var check = { + primary: function primary(placement) { + var value = popper[placement]; + if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { + value = Math.max(popper[placement], boundaries[placement]); + } + return defineProperty({}, placement, value); + }, + secondary: function secondary(placement) { + var mainSide = placement === 'right' ? 'left' : 'top'; + var value = popper[mainSide]; + if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { + value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); + } + return defineProperty({}, mainSide, value); + } + }; + + order.forEach(function (placement) { + var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; + popper = _extends({}, popper, check[side](placement)); + }); + + data.offsets.popper = popper; + + return data; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function shift(data) { + var placement = data.placement; + var basePlacement = placement.split('-')[0]; + var shiftvariation = placement.split('-')[1]; + + // if shift shiftvariation is specified, run the modifier + if (shiftvariation) { + var _data$offsets = data.offsets, + reference = _data$offsets.reference, + popper = _data$offsets.popper; + + var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; + var side = isVertical ? 'left' : 'top'; + var measurement = isVertical ? 'width' : 'height'; + + var shiftOffsets = { + start: defineProperty({}, side, reference[side]), + end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) + }; + + data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); + } + + return data; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function hide(data) { + if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { + return data; + } + + var refRect = data.offsets.reference; + var bound = find(data.instance.modifiers, function (modifier) { + return modifier.name === 'preventOverflow'; + }).boundaries; + + if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { + // Avoid unnecessary DOM access if visibility hasn't changed + if (data.hide === true) { + return data; + } + + data.hide = true; + data.attributes['x-out-of-boundaries'] = ''; + } else { + // Avoid unnecessary DOM access if visibility hasn't changed + if (data.hide === false) { + return data; + } + + data.hide = false; + data.attributes['x-out-of-boundaries'] = false; + } + + return data; +} + +/** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ +function inner(data) { + var placement = data.placement; + var basePlacement = placement.split('-')[0]; + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; + + var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; + + popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); + + data.placement = getOppositePlacement(placement); + data.offsets.popper = getClientRect(popper); + + return data; +} + +/** + * Modifier function, each modifier can have a function of this type assigned + * to its `fn` property.<br /> + * These functions will be called on each update, this means that you must + * make sure they are performant enough to avoid performance bottlenecks. + * + * @function ModifierFn + * @argument {dataObject} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {dataObject} The data object, properly modified + */ + +/** + * Modifiers are plugins used to alter the behavior of your poppers.<br /> + * Popper.js uses a set of 9 modifiers to provide all the basic functionalities + * needed by the library. + * + * Usually you don't want to override the `order`, `fn` and `onLoad` props. + * All the other properties are configurations that could be tweaked. + * @namespace modifiers + */ +var modifiers = { + /** + * Modifier used to shift the popper on the start or end of its reference + * element.<br /> + * It will read the variation of the `placement` property.<br /> + * It can be one either `-end` or `-start`. + * @memberof modifiers + * @inner + */ + shift: { + /** @prop {number} order=100 - Index used to define the order of execution */ + order: 100, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: shift + }, + + /** + * The `offset` modifier can shift your popper on both its axis. + * + * It accepts the following units: + * - `px` or unit-less, interpreted as pixels + * - `%` or `%r`, percentage relative to the length of the reference element + * - `%p`, percentage relative to the length of the popper element + * - `vw`, CSS viewport width unit + * - `vh`, CSS viewport height unit + * + * For length is intended the main axis relative to the placement of the popper.<br /> + * This means that if the placement is `top` or `bottom`, the length will be the + * `width`. In case of `left` or `right`, it will be the `height`. + * + * You can provide a single value (as `Number` or `String`), or a pair of values + * as `String` divided by a comma or one (or more) white spaces.<br /> + * The latter is a deprecated method because it leads to confusion and will be + * removed in v2.<br /> + * Additionally, it accepts additions and subtractions between different units. + * Note that multiplications and divisions aren't supported. + * + * Valid examples are: + * ``` + * 10 + * '10%' + * '10, 10' + * '10%, 10' + * '10 + 10%' + * '10 - 5vh + 3%' + * '-10px + 5vh, 5px - 6%' + * ``` + * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap + * > with their reference element, unfortunately, you will have to disable the `flip` modifier. + * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). + * + * @memberof modifiers + * @inner + */ + offset: { + /** @prop {number} order=200 - Index used to define the order of execution */ + order: 200, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: offset, + /** @prop {Number|String} offset=0 + * The offset value as described in the modifier description + */ + offset: 0 + }, + + /** + * Modifier used to prevent the popper from being positioned outside the boundary. + * + * A scenario exists where the reference itself is not within the boundaries.<br /> + * We can say it has "escaped the boundaries" — or just "escaped".<br /> + * In this case we need to decide whether the popper should either: + * + * - detach from the reference and remain "trapped" in the boundaries, or + * - if it should ignore the boundary and "escape with its reference" + * + * When `escapeWithReference` is set to`true` and reference is completely + * outside its boundaries, the popper will overflow (or completely leave) + * the boundaries in order to remain attached to the edge of the reference. + * + * @memberof modifiers + * @inner + */ + preventOverflow: { + /** @prop {number} order=300 - Index used to define the order of execution */ + order: 300, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: preventOverflow, + /** + * @prop {Array} [priority=['left','right','top','bottom']] + * Popper will try to prevent overflow following these priorities by default, + * then, it could overflow on the left and on top of the `boundariesElement` + */ + priority: ['left', 'right', 'top', 'bottom'], + /** + * @prop {number} padding=5 + * Amount of pixel used to define a minimum distance between the boundaries + * and the popper. This makes sure the popper always has a little padding + * between the edges of its container + */ + padding: 5, + /** + * @prop {String|HTMLElement} boundariesElement='scrollParent' + * Boundaries used by the modifier. Can be `scrollParent`, `window`, + * `viewport` or any DOM element. + */ + boundariesElement: 'scrollParent' + }, + + /** + * Modifier used to make sure the reference and its popper stay near each other + * without leaving any gap between the two. Especially useful when the arrow is + * enabled and you want to ensure that it points to its reference element. + * It cares only about the first axis. You can still have poppers with margin + * between the popper and its reference element. + * @memberof modifiers + * @inner + */ + keepTogether: { + /** @prop {number} order=400 - Index used to define the order of execution */ + order: 400, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: keepTogether + }, + + /** + * This modifier is used to move the `arrowElement` of the popper to make + * sure it is positioned between the reference element and its popper element. + * It will read the outer size of the `arrowElement` node to detect how many + * pixels of conjunction are needed. + * + * It has no effect if no `arrowElement` is provided. + * @memberof modifiers + * @inner + */ + arrow: { + /** @prop {number} order=500 - Index used to define the order of execution */ + order: 500, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: arrow, + /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ + element: '[x-arrow]' + }, + + /** + * Modifier used to flip the popper's placement when it starts to overlap its + * reference element. + * + * Requires the `preventOverflow` modifier before it in order to work. + * + * **NOTE:** this modifier will interrupt the current update cycle and will + * restart it if it detects the need to flip the placement. + * @memberof modifiers + * @inner + */ + flip: { + /** @prop {number} order=600 - Index used to define the order of execution */ + order: 600, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: flip, + /** + * @prop {String|Array} behavior='flip' + * The behavior used to change the popper's placement. It can be one of + * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid + * placements (with optional variations) + */ + behavior: 'flip', + /** + * @prop {number} padding=5 + * The popper will flip if it hits the edges of the `boundariesElement` + */ + padding: 5, + /** + * @prop {String|HTMLElement} boundariesElement='viewport' + * The element which will define the boundaries of the popper position. + * The popper will never be placed outside of the defined boundaries + * (except if `keepTogether` is enabled) + */ + boundariesElement: 'viewport', + /** + * @prop {Boolean} flipVariations=false + * The popper will switch placement variation between `-start` and `-end` when + * the reference element overlaps its boundaries. + * + * The original placement should have a set variation. + */ + flipVariations: false, + /** + * @prop {Boolean} flipVariationsByContent=false + * The popper will switch placement variation between `-start` and `-end` when + * the popper element overlaps its reference boundaries. + * + * The original placement should have a set variation. + */ + flipVariationsByContent: false + }, + + /** + * Modifier used to make the popper flow toward the inner of the reference element. + * By default, when this modifier is disabled, the popper will be placed outside + * the reference element. + * @memberof modifiers + * @inner + */ + inner: { + /** @prop {number} order=700 - Index used to define the order of execution */ + order: 700, + /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ + enabled: false, + /** @prop {ModifierFn} */ + fn: inner + }, + + /** + * Modifier used to hide the popper when its reference element is outside of the + * popper boundaries. It will set a `x-out-of-boundaries` attribute which can + * be used to hide with a CSS selector the popper when its reference is + * out of boundaries. + * + * Requires the `preventOverflow` modifier before it in order to work. + * @memberof modifiers + * @inner + */ + hide: { + /** @prop {number} order=800 - Index used to define the order of execution */ + order: 800, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: hide + }, + + /** + * Computes the style that will be applied to the popper element to gets + * properly positioned. + * + * Note that this modifier will not touch the DOM, it just prepares the styles + * so that `applyStyle` modifier can apply it. This separation is useful + * in case you need to replace `applyStyle` with a custom implementation. + * + * This modifier has `850` as `order` value to maintain backward compatibility + * with previous versions of Popper.js. Expect the modifiers ordering method + * to change in future major versions of the library. + * + * @memberof modifiers + * @inner + */ + computeStyle: { + /** @prop {number} order=850 - Index used to define the order of execution */ + order: 850, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: computeStyle, + /** + * @prop {Boolean} gpuAcceleration=true + * If true, it uses the CSS 3D transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties + */ + gpuAcceleration: true, + /** + * @prop {string} [x='bottom'] + * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. + * Change this if your popper should grow in a direction different from `bottom` + */ + x: 'bottom', + /** + * @prop {string} [x='left'] + * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. + * Change this if your popper should grow in a direction different from `right` + */ + y: 'right' + }, + + /** + * Applies the computed styles to the popper element. + * + * All the DOM manipulations are limited to this modifier. This is useful in case + * you want to integrate Popper.js inside a framework or view library and you + * want to delegate all the DOM manipulations to it. + * + * Note that if you disable this modifier, you must make sure the popper element + * has its position set to `absolute` before Popper.js can do its work! + * + * Just disable this modifier and define your own to achieve the desired effect. + * + * @memberof modifiers + * @inner + */ + applyStyle: { + /** @prop {number} order=900 - Index used to define the order of execution */ + order: 900, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: applyStyle, + /** @prop {Function} */ + onLoad: applyStyleOnLoad, + /** + * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier + * @prop {Boolean} gpuAcceleration=true + * If true, it uses the CSS 3D transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties + */ + gpuAcceleration: undefined + } +}; + +/** + * The `dataObject` is an object containing all the information used by Popper.js. + * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. + * @name dataObject + * @property {Object} data.instance The Popper.js instance + * @property {String} data.placement Placement applied to popper + * @property {String} data.originalPlacement Placement originally defined on init + * @property {Boolean} data.flipped True if popper has been flipped by flip modifier + * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper + * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier + * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.boundaries Offsets of the popper boundaries + * @property {Object} data.offsets The measurements of popper, reference and arrow elements + * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values + * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values + * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 + */ + +/** + * Default options provided to Popper.js constructor.<br /> + * These can be overridden using the `options` argument of Popper.js.<br /> + * To override an option, simply pass an object with the same + * structure of the `options` object, as the 3rd argument. For example: + * ``` + * new Popper(ref, pop, { + * modifiers: { + * preventOverflow: { enabled: false } + * } + * }) + * ``` + * @type {Object} + * @static + * @memberof Popper + */ +var Defaults = { + /** + * Popper's placement. + * @prop {Popper.placements} placement='bottom' + */ + placement: 'bottom', + + /** + * Set this to true if you want popper to position it self in 'fixed' mode + * @prop {Boolean} positionFixed=false + */ + positionFixed: false, + + /** + * Whether events (resize, scroll) are initially enabled. + * @prop {Boolean} eventsEnabled=true + */ + eventsEnabled: true, + + /** + * Set to true if you want to automatically remove the popper when + * you call the `destroy` method. + * @prop {Boolean} removeOnDestroy=false + */ + removeOnDestroy: false, + + /** + * Callback called when the popper is created.<br /> + * By default, it is set to no-op.<br /> + * Access Popper.js instance with `data.instance`. + * @prop {onCreate} + */ + onCreate: function onCreate() {}, + + /** + * Callback called when the popper is updated. This callback is not called + * on the initialization/creation of the popper, but only on subsequent + * updates.<br /> + * By default, it is set to no-op.<br /> + * Access Popper.js instance with `data.instance`. + * @prop {onUpdate} + */ + onUpdate: function onUpdate() {}, + + /** + * List of modifiers used to modify the offsets before they are applied to the popper. + * They provide most of the functionalities of Popper.js. + * @prop {modifiers} + */ + modifiers: modifiers +}; + +/** + * @callback onCreate + * @param {dataObject} data + */ + +/** + * @callback onUpdate + * @param {dataObject} data + */ + +// Utils +// Methods +var Popper = function () { + /** + * Creates a new Popper.js instance. + * @class Popper + * @param {Element|referenceObject} reference - The reference element used to position the popper + * @param {Element} popper - The HTML / XML element used as the popper + * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) + * @return {Object} instance - The generated Popper.js instance + */ + function Popper(reference, popper) { + var _this = this; + + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + classCallCheck(this, Popper); + + this.scheduleUpdate = function () { + return requestAnimationFrame(_this.update); + }; + + // make update() debounced, so that it only runs at most once-per-tick + this.update = debounce(this.update.bind(this)); + + // with {} we create a new object with the options inside it + this.options = _extends({}, Popper.Defaults, options); + + // init state + this.state = { + isDestroyed: false, + isCreated: false, + scrollParents: [] + }; + + // get reference and popper elements (allow jQuery wrappers) + this.reference = reference && reference.jquery ? reference[0] : reference; + this.popper = popper && popper.jquery ? popper[0] : popper; + + // Deep merge modifiers options + this.options.modifiers = {}; + Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { + _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); + }); + + // Refactoring modifiers' list (Object => Array) + this.modifiers = Object.keys(this.options.modifiers).map(function (name) { + return _extends({ + name: name + }, _this.options.modifiers[name]); + }) + // sort the modifiers by order + .sort(function (a, b) { + return a.order - b.order; + }); + + // modifiers have the ability to execute arbitrary code when Popper.js get inited + // such code is executed in the same order of its modifier + // they could add new properties to their options configuration + // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! + this.modifiers.forEach(function (modifierOptions) { + if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { + modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); + } + }); + + // fire the first update to position the popper in the right place + this.update(); + + var eventsEnabled = this.options.eventsEnabled; + if (eventsEnabled) { + // setup event listeners, they will take care of update the position in specific situations + this.enableEventListeners(); + } + + this.state.eventsEnabled = eventsEnabled; + } + + // We can't use class properties because they don't get listed in the + // class prototype and break stuff like Sinon stubs + + + createClass(Popper, [{ + key: 'update', + value: function update$$1() { + return update.call(this); + } + }, { + key: 'destroy', + value: function destroy$$1() { + return destroy.call(this); + } + }, { + key: 'enableEventListeners', + value: function enableEventListeners$$1() { + return enableEventListeners.call(this); + } + }, { + key: 'disableEventListeners', + value: function disableEventListeners$$1() { + return disableEventListeners.call(this); + } + + /** + * Schedules an update. It will run on the next UI update available. + * @method scheduleUpdate + * @memberof Popper + */ + + + /** + * Collection of utilities useful when writing custom modifiers. + * Starting from version 1.7, this method is available only if you + * include `popper-utils.js` before `popper.js`. + * + * **DEPRECATION**: This way to access PopperUtils is deprecated + * and will be removed in v2! Use the PopperUtils module directly instead. + * Due to the high instability of the methods contained in Utils, we can't + * guarantee them to follow semver. Use them at your own risk! + * @static + * @private + * @type {Object} + * @deprecated since version 1.8 + * @member Utils + * @memberof Popper + */ + + }]); + return Popper; +}(); + +/** + * The `referenceObject` is an object that provides an interface compatible with Popper.js + * and lets you use it as replacement of a real DOM node.<br /> + * You can use this method to position a popper relatively to a set of coordinates + * in case you don't have a DOM node to use as reference. + * + * ``` + * new Popper(referenceObject, popperNode); + * ``` + * + * NB: This feature isn't supported in Internet Explorer 10. + * @name referenceObject + * @property {Function} data.getBoundingClientRect + * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. + * @property {number} data.clientWidth + * An ES6 getter that will return the width of the virtual reference element. + * @property {number} data.clientHeight + * An ES6 getter that will return the height of the virtual reference element. + */ + + +Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; +Popper.placements = placements; +Popper.Defaults = Defaults; + +/* harmony default export */ __webpack_exports__["default"] = (Popper); +//# sourceMappingURL=popper.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "BZiP": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'minder dan een seconde', + other: 'minder dan {{count}} seconden' + }, + + xSeconds: { + one: '1 seconde', + other: '{{count}} seconden' + }, + + halfAMinute: 'een halve minuut', + + lessThanXMinutes: { + one: 'minder dan een minuut', + other: 'minder dan {{count}} minuten' + }, + + xMinutes: { + one: 'een minuut', + other: '{{count}} minuten' + }, + + aboutXHours: { + one: 'ongeveer 1 uur', + other: 'ongeveer {{count}} uur' + }, + + xHours: { + one: '1 uur', + other: '{{count}} uur' + }, + + xDays: { + one: '1 dag', + other: '{{count}} dagen' + }, + + aboutXMonths: { + one: 'ongeveer 1 maand', + other: 'ongeveer {{count}} maanden' + }, + + xMonths: { + one: '1 maand', + other: '{{count}} maanden' + }, + + aboutXYears: { + one: 'ongeveer 1 jaar', + other: 'ongeveer {{count}} jaar' + }, + + xYears: { + one: '1 jaar', + other: '{{count}} jaar' + }, + + overXYears: { + one: 'meer dan 1 jaar', + other: 'meer dan {{count}} jaar' + }, + + almostXYears: { + one: 'bijna 1 jaar', + other: 'bijna {{count}} jaar' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'over ' + result + } else { + return result + ' geleden' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "Bcp8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Mysql", function() { return Mysql; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +/** Tracing integration for node-mysql package */ +class Mysql {constructor() { Mysql.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Mysql';} + + /** + * @inheritDoc + */ + __init() {this.name = Mysql.id;} + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + const pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"])('mysql/lib/Connection.js'); + + if (!pkg) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Mysql Integration was unable to require `mysql` package.'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Mysql Integration is skipped because of instrumenter configuration.'); + return; + } + + // The original function will have one of these signatures: + // function (callback) => void + // function (options, callback) => void + // function (options, values, callback) => void + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(pkg, 'createQuery', function (orig) { + return function ( options, values, callback) { + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ + description: typeof options === 'string' ? options : (options ).sql, + op: 'db', + })]); + + if (typeof callback === 'function') { + return orig.call(this, options, values, function (err, result, fields) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); + callback(err, result, fields); + }); + } + + if (typeof values === 'function') { + return orig.call(this, options, function (err, result, fields) { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + values(err, result, fields); + }); + } + + return orig.call(this, options, values, callback); + }; + }); + } +}Mysql.__initStatic(); + + +//# sourceMappingURL=mysql.js.map + + +/***/ }), + +/***/ "BjKX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("V6W0"); +/* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("QhNL"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("UPk3"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("bH5F"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("ll/m"); +/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("hy/i"); +/* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("DhWQ"); + + + + + + + + + + + + + + + +var styles = function styles(theme) { + var top1 = { + top: 8 + }; + var bottom1 = { + bottom: 8 + }; + var right = { + justifyContent: 'flex-end' + }; + var left = { + justifyContent: 'flex-start' + }; + var top3 = { + top: 24 + }; + var bottom3 = { + bottom: 24 + }; + var right3 = { + right: 24 + }; + var left3 = { + left: 24 + }; + var center = { + left: '50%', + right: 'auto', + transform: 'translateX(-50%)' + }; + return { + /* Styles applied to the root element. */ + root: { + zIndex: theme.zIndex.snackbar, + position: 'fixed', + display: 'flex', + left: 8, + right: 8, + justifyContent: 'center', + alignItems: 'center' + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */ + anchorOriginTopCenter: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, top1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, top3, center))), + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */ + anchorOriginBottomCenter: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, bottom1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, bottom3, center))), + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */ + anchorOriginTopRight: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, top1, right, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + left: 'auto' + }, top3, right3))), + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */ + anchorOriginBottomRight: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, bottom1, right, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + left: 'auto' + }, bottom3, right3))), + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */ + anchorOriginTopLeft: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, top1, left, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + right: 'auto' + }, top3, left3))), + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */ + anchorOriginBottomLeft: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, bottom1, left, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + right: 'auto' + }, bottom3, left3))) + }; +}; +var Snackbar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Snackbar(props, ref) { + var action = props.action, + _props$anchorOrigin = props.anchorOrigin; + _props$anchorOrigin = _props$anchorOrigin === void 0 ? { + vertical: 'bottom', + horizontal: 'center' + } : _props$anchorOrigin; + + var vertical = _props$anchorOrigin.vertical, + horizontal = _props$anchorOrigin.horizontal, + _props$autoHideDurati = props.autoHideDuration, + autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati, + children = props.children, + classes = props.classes, + className = props.className, + ClickAwayListenerProps = props.ClickAwayListenerProps, + ContentProps = props.ContentProps, + _props$disableWindowB = props.disableWindowBlurListener, + disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB, + message = props.message, + onClose = props.onClose, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + onMouseEnter = props.onMouseEnter, + onMouseLeave = props.onMouseLeave, + open = props.open, + resumeHideDuration = props.resumeHideDuration, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_13__["default"] : _props$TransitionComp, + _props$transitionDura = props.transitionDuration, + transitionDuration = _props$transitionDura === void 0 ? { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_7__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_7__["duration"].leavingScreen + } : _props$transitionDura, + TransitionProps = props.TransitionProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["action", "anchorOrigin", "autoHideDuration", "children", "classes", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onClose", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"]); + + var timerAutoHide = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](true), + exited = _React$useState[0], + setExited = _React$useState[1]; + + var handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__["default"])(function () { + if (onClose) { + onClose.apply(void 0, arguments); + } + }); + var setAutoHideTimer = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__["default"])(function (autoHideDurationParam) { + if (!onClose || autoHideDurationParam == null) { + return; + } + + clearTimeout(timerAutoHide.current); + timerAutoHide.current = setTimeout(function () { + handleClose(null, 'timeout'); + }, autoHideDurationParam); + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + if (open) { + setAutoHideTimer(autoHideDuration); + } + + return function () { + clearTimeout(timerAutoHide.current); + }; + }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar + // or when the user hide the window. + + var handlePause = function handlePause() { + clearTimeout(timerAutoHide.current); + }; // Restart the timer when the user is no longer interacting with the Snackbar + // or when the window is shown back. + + + var handleResume = react__WEBPACK_IMPORTED_MODULE_3__["useCallback"](function () { + if (autoHideDuration != null) { + setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5); + } + }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]); + + var handleMouseEnter = function handleMouseEnter(event) { + if (onMouseEnter) { + onMouseEnter(event); + } + + handlePause(); + }; + + var handleMouseLeave = function handleMouseLeave(event) { + if (onMouseLeave) { + onMouseLeave(event); + } + + handleResume(); + }; + + var handleClickAway = function handleClickAway(event) { + if (onClose) { + onClose(event, 'clickaway'); + } + }; + + var handleExited = function handleExited() { + setExited(true); + }; + + var handleEnter = function handleEnter() { + setExited(false); + }; + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + if (!disableWindowBlurListener && open) { + window.addEventListener('focus', handleResume); + window.addEventListener('blur', handlePause); + return function () { + window.removeEventListener('focus', handleResume); + window.removeEventListener('blur', handlePause); + }; + } + + return undefined; + }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars. + + if (!open && exited) { + return null; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ClickAwayListener__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + onClickAway: handleClickAway + }, ClickAwayListenerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes["anchorOrigin".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(vertical)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(horizontal))], className), + onMouseEnter: handleMouseEnter, + onMouseLeave: handleMouseLeave, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + appear: true, + in: open, + onEnter: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__["default"])(handleEnter, onEnter), + onEntered: onEntered, + onEntering: onEntering, + onExit: onExit, + onExited: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__["default"])(handleExited, onExited), + onExiting: onExiting, + timeout: transitionDuration, + direction: vertical === 'top' ? 'down' : 'up' + }, TransitionProps), children || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_SnackbarContent__WEBPACK_IMPORTED_MODULE_14__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + message: message, + action: action + }, ContentProps))))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + flip: false, + name: 'MuiSnackbar' +})(Snackbar)); + +/***/ }), + +/***/ "BjNV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("ETne"); +var $export = __webpack_require__("LRPZ"); +var redefine = __webpack_require__("iNsi"); +var redefineAll = __webpack_require__("UDoN"); +var meta = __webpack_require__("h/ey"); +var forOf = __webpack_require__("QTPW"); +var anInstance = __webpack_require__("/Ytg"); +var isObject = __webpack_require__("pFmr"); +var fails = __webpack_require__("enc5"); +var $iterDetect = __webpack_require__("V06o"); +var setToStringTag = __webpack_require__("YoKN"); +var inheritIfRequired = __webpack_require__("z41q"); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + + +/***/ }), + +/***/ "Bp2Q": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromError", function() { return eventFromError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromException", function() { return eventFromException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromMessage", function() { return eventFromMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromPlainObject", function() { return eventFromPlainObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromString", function() { return eventFromString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eventFromUnknownInput", function() { return eventFromUnknownInput; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exceptionFromError", function() { return exceptionFromError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseStackFrames", function() { return parseStackFrames; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); + + + +/** + * This function creates an exception from a JavaScript Error + */ +function exceptionFromError(stackParser, ex) { + // Get the frames first since Opera can lose the stack if we touch anything else first + const frames = parseStackFrames(stackParser, ex); + + const exception = { + type: ex && ex.name, + value: extractMessage(ex), + }; + + if (frames.length) { + exception.stacktrace = { frames }; + } + + if (exception.type === undefined && exception.value === '') { + exception.value = 'Unrecoverable error caught'; + } + + return exception; +} + +/** + * @hidden + */ +function eventFromPlainObject( + stackParser, + exception, + syntheticException, + isUnhandledRejection, +) { + const hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])(); + const client = hub.getClient(); + const normalizeDepth = client && client.getOptions().normalizeDepth; + + const event = { + exception: { + values: [ + { + type: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isEvent"])(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error', + value: `Non-Error ${ + isUnhandledRejection ? 'promise rejection' : 'exception' + } captured with keys: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["extractExceptionKeysForMessage"])(exception)}`, + }, + ], + }, + extra: { + __serialized__: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["normalizeToSize"])(exception, normalizeDepth), + }, + }; + + if (syntheticException) { + const frames = parseStackFrames(stackParser, syntheticException); + if (frames.length) { + // event.exception.values[0] has been set above + (event.exception ).values[0].stacktrace = { frames }; + } + } + + return event; +} + +/** + * @hidden + */ +function eventFromError(stackParser, ex) { + return { + exception: { + values: [exceptionFromError(stackParser, ex)], + }, + }; +} + +/** Parses stack frames from an error */ +function parseStackFrames( + stackParser, + ex, +) { + // Access and store the stacktrace property before doing ANYTHING + // else to it because Opera is not very good at providing it + // reliably in other circumstances. + const stacktrace = ex.stacktrace || ex.stack || ''; + + const popSize = getPopSize(ex); + + try { + return stackParser(stacktrace, popSize); + } catch (e) { + // no-empty + } + + return []; +} + +// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108 +const reactMinifiedRegexp = /Minified React error #\d+;/i; + +function getPopSize(ex) { + if (ex) { + if (typeof ex.framesToPop === 'number') { + return ex.framesToPop; + } + + if (reactMinifiedRegexp.test(ex.message)) { + return 1; + } + } + + return 0; +} + +/** + * There are cases where stacktrace.message is an Event object + * https://github.com/getsentry/sentry-javascript/issues/1949 + * In this specific case we try to extract stacktrace.message.error.message + */ +function extractMessage(ex) { + const message = ex && ex.message; + if (!message) { + return 'No error message'; + } + if (message.error && typeof message.error.message === 'string') { + return message.error.message; + } + return message; +} + +/** + * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`. + * @hidden + */ +function eventFromException( + stackParser, + exception, + hint, + attachStacktrace, +) { + const syntheticException = (hint && hint.syntheticException) || undefined; + const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionMechanism"])(event); // defaults to { type: 'generic', handled: true } + event.level = 'error'; + if (hint && hint.event_id) { + event.event_id = hint.event_id; + } + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["resolvedSyncPromise"])(event); +} + +/** + * Builds and Event from a Message + * @hidden + */ +function eventFromMessage( + stackParser, + message, + // eslint-disable-next-line deprecation/deprecation + level = 'info', + hint, + attachStacktrace, +) { + const syntheticException = (hint && hint.syntheticException) || undefined; + const event = eventFromString(stackParser, message, syntheticException, attachStacktrace); + event.level = level; + if (hint && hint.event_id) { + event.event_id = hint.event_id; + } + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["resolvedSyncPromise"])(event); +} + +/** + * @hidden + */ +function eventFromUnknownInput( + stackParser, + exception, + syntheticException, + attachStacktrace, + isUnhandledRejection, +) { + let event; + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isErrorEvent"])(exception ) && (exception ).error) { + // If it is an ErrorEvent with `error` property, extract it to get actual Error + const errorEvent = exception ; + return eventFromError(stackParser, errorEvent.error ); + } + + // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name + // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be + // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`. + // + // https://developer.mozilla.org/en-US/docs/Web/API/DOMError + // https://developer.mozilla.org/en-US/docs/Web/API/DOMException + // https://webidl.spec.whatwg.org/#es-DOMException-specialness + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isDOMError"])(exception ) || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isDOMException"])(exception )) { + const domException = exception ; + + if ('stack' in (exception )) { + event = eventFromError(stackParser, exception ); + } else { + const name = domException.name || (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isDOMError"])(domException) ? 'DOMError' : 'DOMException'); + const message = domException.message ? `${name}: ${domException.message}` : name; + event = eventFromString(stackParser, message, syntheticException, attachStacktrace); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionTypeValue"])(event, message); + } + if ('code' in domException) { + event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` }; + } + + return event; + } + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isError"])(exception)) { + // we have a real Error object, do nothing + return eventFromError(stackParser, exception); + } + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isPlainObject"])(exception) || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isEvent"])(exception)) { + // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize + // it manually. This will allow us to group events based on top-level keys which is much better than creating a new + // group on any key/value change. + const objectException = exception ; + event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionMechanism"])(event, { + synthetic: true, + }); + return event; + } + + // If none of previous checks were valid, then it means that it's not: + // - an instance of DOMError + // - an instance of DOMException + // - an instance of Event + // - an instance of Error + // - a valid ErrorEvent (one with an error property) + // - a plain Object + // + // So bail out and capture it as a simple message: + event = eventFromString(stackParser, exception , syntheticException, attachStacktrace); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionTypeValue"])(event, `${exception}`, undefined); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionMechanism"])(event, { + synthetic: true, + }); + + return event; +} + +/** + * @hidden + */ +function eventFromString( + stackParser, + input, + syntheticException, + attachStacktrace, +) { + const event = { + message: input, + }; + + if (attachStacktrace && syntheticException) { + const frames = parseStackFrames(stackParser, syntheticException); + if (frames.length) { + event.exception = { + values: [{ value: input, stacktrace: { frames } }], + }; + } + } + + return event; +} + + +//# sourceMappingURL=eventbuilder.js.map + + +/***/ }), + +/***/ "BqmN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sheetsManager", function() { return sheetsManager; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StylesContext", function() { return StylesContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return StylesProvider; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rDuK"); +/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("pqMe"); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("b0ha"); +/* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("q4sm"); + + + + + + + + // Default JSS instance. + +var jss = Object(jss__WEBPACK_IMPORTED_MODULE_6__["create"])(Object(_jssPreset__WEBPACK_IMPORTED_MODULE_7__["default"])()); // Use a singleton or the provided one by the context. +// +// The counter-based approach doesn't tolerate any mistake. +// It's much safer to use the same counter everywhere. + +var generateClassName = Object(_createGenerateClassName__WEBPACK_IMPORTED_MODULE_5__["default"])(); // Exported for test purposes + +var sheetsManager = new Map(); +var defaultOptions = { + disableGeneration: false, + generateClassName: generateClassName, + jss: jss, + sheetsCache: null, + sheetsManager: sheetsManager, + sheetsRegistry: null +}; +var StylesContext = react__WEBPACK_IMPORTED_MODULE_2___default.a.createContext(defaultOptions); + +if (false) {} + +var injectFirstNode; +function StylesProvider(props) { + var children = props.children, + _props$injectFirst = props.injectFirst, + injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst, + _props$disableGenerat = props.disableGeneration, + disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat, + localOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "injectFirst", "disableGeneration"]); + + var outerOptions = react__WEBPACK_IMPORTED_MODULE_2___default.a.useContext(StylesContext); + + var context = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, outerOptions, { + disableGeneration: disableGeneration + }, localOptions); + + if (false) {} + + if (false) {} + + if (false) {} + + if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') { + if (!injectFirstNode) { + var head = document.head; + injectFirstNode = document.createComment('mui-inject-first'); + head.insertBefore(injectFirstNode, head.firstChild); + } + + context.jss = Object(jss__WEBPACK_IMPORTED_MODULE_6__["create"])({ + plugins: Object(_jssPreset__WEBPACK_IMPORTED_MODULE_7__["default"])().plugins, + insertionPoint: injectFirstNode + }); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(StylesContext.Provider, { + value: context + }, children); +} + false ? undefined : void 0; + +if (false) {} + +/***/ }), + +/***/ "BrK0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__("05TQ"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +var toLength = __webpack_require__("yhnj"); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), + +/***/ "BtRI": +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__("ETne").parseInt; +var $trim = __webpack_require__("V+ek").trim; +var ws = __webpack_require__("870Y"); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + + +/***/ }), + +/***/ "Bvlq": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseIntersection = __webpack_require__("Rs/3"), + baseIteratee = __webpack_require__("JF7T"), + baseRest = __webpack_require__("Ce+n"), + castArrayLikeObject = __webpack_require__("aP7c"), + last = __webpack_require__("w7+A"); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; + + +/***/ }), + +/***/ "BwJO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return memoize; }); +function memoize(fn) { + var cache = {}; + return function (arg) { + if (cache[arg] === undefined) { + cache[arg] = fn(arg); + } + + return cache[arg]; + }; +} + +/***/ }), + +/***/ "BxMJ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fY06"); +/* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("nI8M"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + '&$alternativeLabel': { + flexDirection: 'column' + }, + '&$disabled': { + cursor: 'default' + } + }, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + horizontal: {}, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: {}, + + /* Styles applied to the `Typography` component which wraps `children`. */ + label: { + color: theme.palette.text.secondary, + '&$active': { + color: theme.palette.text.primary, + fontWeight: 500 + }, + '&$completed': { + color: theme.palette.text.primary, + fontWeight: 500 + }, + '&$alternativeLabel': { + textAlign: 'center', + marginTop: 16 + }, + '&$error': { + color: theme.palette.error.main + } + }, + + /* Pseudo-class applied to the `Typography` component if `active={true}`. */ + active: {}, + + /* Pseudo-class applied to the `Typography` component if `completed={true}`. */ + completed: {}, + + /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */ + error: {}, + + /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the `icon` container element. */ + iconContainer: { + flexShrink: 0, + // Fix IE 11 issue + display: 'flex', + paddingRight: 8, + '&$alternativeLabel': { + paddingRight: 0 + } + }, + + /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */ + alternativeLabel: {}, + + /* Styles applied to the container element which wraps `Typography` and `optional`. */ + labelContainer: { + width: '100%' + } + }; +}; +var StepLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function StepLabel(props, ref) { + var _props$active = props.active, + active = _props$active === void 0 ? false : _props$active, + _props$alternativeLab = props.alternativeLabel, + alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab, + children = props.children, + classes = props.classes, + className = props.className, + _props$completed = props.completed, + completed = _props$completed === void 0 ? false : _props$completed, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$error = props.error, + error = _props$error === void 0 ? false : _props$error, + expanded = props.expanded, + icon = props.icon, + last = props.last, + optional = props.optional, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + StepIconComponentProp = props.StepIconComponent, + StepIconProps = props.StepIconProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "disabled", "error", "expanded", "icon", "last", "optional", "orientation", "StepIconComponent", "StepIconProps"]); + + var StepIconComponent = StepIconComponentProp; + + if (icon && !StepIconComponent) { + StepIconComponent = _StepIcon__WEBPACK_IMPORTED_MODULE_7__["default"]; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error), + ref: ref + }, other), icon || StepIconComponent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.iconContainer, alternativeLabel && classes.alternativeLabel) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](StepIconComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + completed: completed, + active: active, + error: error, + icon: icon + }, StepIconProps))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.labelContainer + }, children ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], { + variant: "body2", + component: "span", + display: "block", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error) + }, children) : null, optional)); +}); + false ? undefined : void 0; +StepLabel.muiName = 'StepLabel'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiStepLabel' +})(StepLabel)); + +/***/ }), + +/***/ "C+aL": +/***/ (function(module, exports) { + +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; + + +/***/ }), + +/***/ "C/f8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return chainPropTypes; }); +function chainPropTypes(propType1, propType2) { + if (true) { + return function () { + return null; + }; + } + + return function validate() { + return propType1.apply(void 0, arguments) || propType2.apply(void 0, arguments); + }; +} + +/***/ }), + +/***/ "C2kf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// var modulo = require('./modulo'); +var $floor = Math.floor; + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function floor(x) { + // return x - modulo(x, 1); + return $floor(x); +}; + + +/***/ }), + +/***/ "C6U7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UsageEventProperties = void 0; +var UsageEventProperties; +exports.UsageEventProperties = UsageEventProperties; +(function (UsageEventProperties) { + UsageEventProperties[UsageEventProperties["TARGET"] = 1] = "TARGET"; + UsageEventProperties[UsageEventProperties["RESULT"] = 2] = "RESULT"; + UsageEventProperties[UsageEventProperties["CONTEXT"] = 3] = "CONTEXT"; +})(UsageEventProperties || (exports.UsageEventProperties = UsageEventProperties = {})); + +/***/ }), + +/***/ "C9CY": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.17 Object.seal(O) +var isObject = __webpack_require__("pFmr"); +var meta = __webpack_require__("h/ey").onFreeze; + +__webpack_require__("80eX")('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "CE71": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.AppLinker = void 0; +Object.defineProperty(exports, "NATIVE_APP_INFOS", { + enumerable: true, + get: function get() { + return _native2.NATIVE_APP_INFOS; + } +}); +exports.default = void 0; +Object.defineProperty(exports, "generateUniversalLink", { + enumerable: true, + get: function get() { + return _native.generateUniversalLink; + } +}); +Object.defineProperty(exports, "generateWebLink", { + enumerable: true, + get: function get() { + return _native.generateWebLink; + } +}); +Object.defineProperty(exports, "getUniversalLinkDomain", { + enumerable: true, + get: function get() { + return _native.getUniversalLinkDomain; + } +}); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _cozyClient = __webpack_require__("xEu0"); +var _cozyDeviceHelper = __webpack_require__("Kv7L"); +var _cozyIntent = __webpack_require__("HROS"); +var _cozyLogger = _interopRequireDefault(__webpack_require__("rUPj")); +var _native = __webpack_require__("TAqK"); +var _native2 = __webpack_require__("RPc2"); +var _expiringMemoize = _interopRequireDefault(__webpack_require__("eP5l")); +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; +} +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) { + (0, _defineProperty2.default)(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; +} +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} +var expirationDelay = 10 * 1000; +var memoizedCheckApp = (0, _expiringMemoize.default)(function (appInfo) { + return (0, _cozyDeviceHelper.checkApp)(appInfo).catch(function () { + return false; + }); +}, expirationDelay, function (appInfo) { + return appInfo.appId; +}); +var AppLinker = /*#__PURE__*/function (_React$Component) { + (0, _inherits2.default)(AppLinker, _React$Component); + var _super = _createSuper(AppLinker); + function AppLinker(props) { + var _this; + (0, _classCallCheck2.default)(this, AppLinker); + _this = _super.call(this, props); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", { + nativeAppIsAvailable: null, + isFetchingAppInfo: false + }); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setImgRef", function (img) { + _this.imgRef = img; + _this.setState({ + imgRef: _this.imgRef + }); + }); + _this.imgRef = null; + return _this; + } + (0, _createClass2.default)(AppLinker, [{ + key: "componentDidMount", + value: function componentDidMount() { + if ((0, _cozyDeviceHelper.isMobileApp)()) { + this.checkAppAvailability(); + } + } + }, { + key: "checkAppAvailability", + value: function () { + var _checkAppAvailability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var slug, appInfo, nativeAppIsAvailable; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + slug = AppLinker.getSlug(this.props); + appInfo = _native2.NATIVE_APP_INFOS[slug]; + if (!appInfo) { + _context.next = 9; + break; + } + _context.t0 = Boolean; + _context.next = 6; + return memoizedCheckApp(appInfo); + case 6: + _context.t1 = _context.sent; + nativeAppIsAvailable = (0, _context.t0)(_context.t1); + this.setState({ + nativeAppIsAvailable: nativeAppIsAvailable + }); + case 9: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + function checkAppAvailability() { + return _checkAppAvailability.apply(this, arguments); + } + return checkAppAvailability; + }() + }, { + key: "render", + value: function render() { + var children = this.props.children; + AppLinker.deprecateSlug(this.props); + var slug = AppLinker.getSlug(this.props); + var nativeAppIsAvailable = this.state.nativeAppIsAvailable; + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + var _AppLinker$getOnClick = AppLinker.getOnClickHref(this.props, nativeAppIsAvailable, this.context, this.state.imgRef), + href = _AppLinker$getOnClick.href, + onClick = _AppLinker$getOnClick.onClick; + return children(_objectSpread(_objectSpread({}, appInfo), {}, { + iconRef: this.setImgRef, + onClick: onClick, + href: href + })); + } + }], [{ + key: "getSlug", + value: function getSlug(props) { + if (props.app && props.app.slug) { + return props.app.slug; + } + return props.slug; + } + }, { + key: "deprecateSlug", + value: function deprecateSlug(props) { + if (props.slug) { + console.warn("AppLinker's 'slug' prop is deprecated, please use 'app.slug' instead"); + } + } + }, { + key: "getOnClickHref", + value: function getOnClickHref(props, nativeAppIsAvailable, context, imgRef) { + var app = props.app, + client = props.client, + nativePath = props.nativePath; + var slug = AppLinker.getSlug(props); + var href = props.href; + var onClick = null; + var usingNativeApp = (0, _cozyDeviceHelper.isMobileApp)(); + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + if ((0, _cozyDeviceHelper.isFlagshipApp)()) { + var _ref = client ? client.getInstanceOptions() : undefined, + currentApp = _ref.app; + if (currentApp === undefined || app.slug !== currentApp.slug) { + var imgPayload = imgRef && JSON.stringify(_objectSpread({}, imgRef.getBoundingClientRect().toJSON())); + return { + onClick: function onClick(event) { + event.preventDefault(); + context ? context.call('openApp', href, app, imgPayload) : _cozyLogger.default.error("Failed to \"openApp(".concat(app, ")\". WebviewService has the following falsy value \"").concat(context, "\" in AppLinker's context.")); + }, + href: '#' + }; + } + } + if (usingNativeApp) { + if (nativeAppIsAvailable) { + // If we are on the native app and the other native app is available, + // we open the native app + onClick = AppLinker.openNativeFromNative.bind(this, props); + href = '#'; + } else { + // If we are on a native app, but the other native app is not available + // we open the web link, this is done by the href prop. We still + // have to call the prop callback + onClick = AppLinker.openWeb.bind(this, props); + } + } else if ((0, _cozyDeviceHelper.isMobile)() && appInfo) { + // If we are on the "mobile web version", we try to open the native app + // if it exists with an universal links. If it fails, we redirect to the web + // version of the requested app + // Only on iOS ATM + if ((0, _cozyDeviceHelper.isAndroid)()) { + onClick = AppLinker.openNativeFromWeb.bind(this, props); + } else { + // Since generateUniversalLink can rise an error, let's catch it to not crash + // all the page. + try { + href = (0, _native.generateUniversalLink)({ + slug: slug, + nativePath: nativePath, + fallbackUrl: href + }); + } catch (err) { + console.error(err); + href = '#'; + } + } + } + return { + href: href, + onClick: onClick + }; + } + }, { + key: "openNativeFromWeb", + value: function openNativeFromWeb(props, ev) { + var href = props.href, + nativePath = props.nativePath, + onAppSwitch = props.onAppSwitch; + var slug = AppLinker.getSlug(props); + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + if (ev) { + ev.preventDefault(); + } + AppLinker.onAppSwitch(onAppSwitch); + (0, _cozyDeviceHelper.openDeeplinkOrRedirect)(appInfo.uri + (nativePath === '/' ? '' : nativePath), function () { + window.location.href = href; + }); + } + }, { + key: "onAppSwitch", + value: function onAppSwitch(onAppSwitchFn) { + if (typeof onAppSwitchFn === 'function') { + onAppSwitchFn(); + } + } + }, { + key: "openNativeFromNative", + value: function openNativeFromNative(props, ev) { + var onAppSwitch = props.onAppSwitch; + var slug = AppLinker.getSlug(props); + if (ev) { + ev.preventDefault(); + } + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + AppLinker.onAppSwitch(onAppSwitch); + (0, _cozyDeviceHelper.startApp)(appInfo).catch(function (err) { + console.error('AppLinker: Could not open native app', err); + }); + } + }, { + key: "openWeb", + value: function openWeb(props) { + AppLinker.onAppSwitch(props.onAppSwitch); + } + }]); + return AppLinker; +}(_react.default.Component); +exports.AppLinker = AppLinker; +(0, _defineProperty2.default)(AppLinker, "contextType", _cozyIntent.WebviewContext); +AppLinker.defaultProps = { + nativePath: '/' +}; +AppLinker.propTypes = { + /** DEPRECATED: please use app.slug prop */ + slug: _propTypes.default.string, + /* + Full web url : Used by default on desktop browser + Used as a fallback_uri on mobile web + */ + href: _propTypes.default.string, + /* + Path used for "native link" + */ + nativePath: _propTypes.default.string, + onAppSwitch: _propTypes.default.func, + app: _propTypes.default.shape({ + // Slug of the app : drive / banks ... + slug: _propTypes.default.string.isRequired, + // Information about mobile native app + mobile: _propTypes.default.shape({ + schema: _propTypes.default.string, + id_playstore: _propTypes.default.string, + id_appstore: _propTypes.default.string + }) + }).isRequired +}; +var _default = (0, _cozyClient.withClient)(AppLinker); +exports.default = _default; + +/***/ }), + +/***/ "CG0c": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("+LkS") +var buildFormatLocale = __webpack_require__("+W4M") + +/** + * @category Locales + * @summary Esperanto locale. + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "CGpO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVisibilityWatcher", function() { return getVisibilityWatcher; }); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+2Xp"); +/* harmony import */ var _onHidden_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("t3J8"); + + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +let firstHiddenTime = -1; + +const initHiddenTime = () => { + // If the document is hidden and not prerendering, assume it was always + // hidden and the page was loaded in the background. + return _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].document.visibilityState === 'hidden' && !_types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].document.prerendering ? 0 : Infinity; +}; + +const trackChanges = () => { + // Update the time if/when the document becomes hidden. + Object(_onHidden_js__WEBPACK_IMPORTED_MODULE_1__["onHidden"])(({ timeStamp }) => { + firstHiddenTime = timeStamp; + }, true); +}; + +const getVisibilityWatcher = ( + +) => { + if (firstHiddenTime < 0) { + // If the document is hidden when this code runs, assume it was hidden + // since navigation start. This isn't a perfect heuristic, but it's the + // best we can do until an API is available to support querying past + // visibilityState. + firstHiddenTime = initHiddenTime(); + trackChanges(); + } + return { + get firstHiddenTime() { + return firstHiddenTime; + }, + }; +}; + + +//# sourceMappingURL=getVisibilityWatcher.js.map + + +/***/ }), + +/***/ "CHAu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// We use the same empty object to ref count the styles that don't need a theme object. +var noopTheme = {}; +/* harmony default export */ __webpack_exports__["default"] = (noopTheme); + +/***/ }), + +/***/ "CHEd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * Sort props by length. + */ +function jssPropsSort() { + var sort = function sort(prop0, prop1) { + if (prop0.length === prop1.length) { + return prop0 > prop1 ? 1 : -1; + } + + return prop0.length - prop1.length; + }; + + return { + onProcessStyle: function onProcessStyle(style, rule) { + if (rule.type !== 'style') return style; + var newStyle = {}; + var props = Object.keys(style).sort(sort); + + for (var i = 0; i < props.length; i++) { + newStyle[props[i]] = style[props[i]]; + } + + return newStyle; + } + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (jssPropsSort); + + +/***/ }), + +/***/ "CHrb": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _react = __webpack_require__("ivGQ"); + +var _context = _interopRequireDefault(__webpack_require__("eDV5")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +/** + * Returns the cozy client from the context + * + * @returns {CozyClient|null} - Current cozy client + */ +var useClient = function useClient() { + var _useContext = (0, _react.useContext)(_context.default), + client = _useContext.client; + + return client; +}; + +var _default = useClient; +exports.default = _default; + +/***/ }), + +/***/ "CJ9k": +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; + + +/***/ }), + +/***/ "CJbV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hasClass; }); +/** + * Checks if a given element has a CSS class. + * + * @param element the element + * @param className the CSS class name + */ +function hasClass(element, className) { + if (element.classList) return !!className && element.classList.contains(className); + return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1; +} + +/***/ }), + +/***/ "CUab": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return toInteger; }); +function toInteger(dirtyNumber) { + if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) { + return NaN; + } + + var number = Number(dirtyNumber); + + if (isNaN(number)) { + return number; + } + + return number < 0 ? Math.ceil(number) : Math.floor(number); +} + +/***/ }), + +/***/ "CZlL": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); + +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * @typedef {Component} Wrapper + * @returns {Function} + */ +var withMutation = function withMutation(mutation) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return function (WrappedComponent) { + var wrappedDisplayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + + var Wrapper = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(Wrapper, _Component); + + var _super = _createSuper(Wrapper); + + function Wrapper(props, context) { + var _this; + + (0, _classCallCheck2.default)(this, Wrapper); + _this = _super.call(this, props, context); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mutate", function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _this.client.mutate(mutation.apply(null, args), options); + }); + _this.client = props.client || context.client; + + if (!_this.client) { + throw new Error("Could not find \"client\" in either the context or props of ".concat(wrappedDisplayName)); + } + + return _this; + } + + (0, _createClass2.default)(Wrapper, [{ + key: "render", + value: function render() { + var mutationProps = (0, _defineProperty2.default)({}, options.name || 'mutate', this.mutate); + return /*#__PURE__*/_react.default.createElement(WrappedComponent, (0, _extends2.default)({}, mutationProps, this.props)); + } + }]); + return Wrapper; + }(_react.Component); + + (0, _defineProperty2.default)(Wrapper, "contextTypes", { + client: _propTypes.default.object + }); + Wrapper.displayName = "WithMutation(".concat(wrappedDisplayName, ")"); + return Wrapper; + }; +}; + +var _default = withMutation; +exports.default = _default; + +/***/ }), + +/***/ "Caof": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("FaeQ") +var buildFormatLocale = __webpack_require__("sIRx") + +/** + * @category Locales + * @summary Macedonian locale. + * @author Petar Vlahu [@vlahupetar]{@link https://github.com/vlahupetar} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "Ce+n": +/***/ (function(module, exports, __webpack_require__) { + +var identity = __webpack_require__("Q7kj"), + overRest = __webpack_require__("WW2/"), + setToString = __webpack_require__("p3SN"); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; + + +/***/ }), + +/***/ "CeX8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CssBaseline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eqjb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CssBaseline__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "CehB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var green = { + 50: '#e8f5e9', + 100: '#c8e6c9', + 200: '#a5d6a7', + 300: '#81c784', + 400: '#66bb6a', + 500: '#4caf50', + 600: '#43a047', + 700: '#388e3c', + 800: '#2e7d32', + 900: '#1b5e20', + A100: '#b9f6ca', + A200: '#69f0ae', + A400: '#00e676', + A700: '#00c853' +}; +/* harmony default export */ __webpack_exports__["default"] = (green); + +/***/ }), + +/***/ "Cf+5": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var regexpFlags = __webpack_require__("+TZB"); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), + +/***/ "CfF8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasExtensionInstalledAttribute = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _dsl = __webpack_require__("v2kV"); + +/** + * Checks the value of the extension_installed attribute + * + * @param {import("../CozyClient").default} client - The CozyClient instance + * @returns {Promise<boolean>} - Returns the value of the extension_installed attribute + */ +var hasExtensionInstalledAttribute = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var _yield$client$fetchQu, extension_installed; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return client.fetchQueryAndGetFromState({ + definition: (0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.bitwarden'), + options: { + as: 'io.cozy.settings/io.cozy.settings.bitwarden', + singleDocData: true + } + }); + + case 3: + _yield$client$fetchQu = _context.sent; + extension_installed = _yield$client$fetchQu.data.extension_installed; + return _context.abrupt("return", Boolean(extension_installed)); + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](0); + return _context.abrupt("return", false); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 8]]); + })); + + return function hasExtensionInstalledAttribute(_x) { + return _ref.apply(this, arguments); + }; +}(); + +exports.hasExtensionInstalledAttribute = hasExtensionInstalledAttribute; + +/***/ }), + +/***/ "Cg3G": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CardActionArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Zs9j"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CardActionArea__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "CjtL": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("rAU7"); +module.exports = __webpack_require__("WSXa").String.padStart; + + +/***/ }), + +/***/ "ClGT": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var ctx = __webpack_require__("DnF+"); +var $export = __webpack_require__("LRPZ"); +var toObject = __webpack_require__("05TQ"); +var call = __webpack_require__("Q1cj"); +var isArrayIter = __webpack_require__("cdPs"); +var toLength = __webpack_require__("yhnj"); +var createProperty = __webpack_require__("jeSS"); +var getIterFn = __webpack_require__("+IUY"); + +$export($export.S + $export.F * !__webpack_require__("V06o")(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + + +/***/ }), + +/***/ "CqxI": +/***/ (function(module, exports) { + + +/** + * When source maps are enabled, `style-loader` uses a link element with a data-uri to + * embed the css on the page. This breaks all relative urls because now they are relative to a + * bundle instead of the current page. + * + * One solution is to only use full urls, but that may be impossible. + * + * Instead, this function "fixes" the relative urls to be absolute according to the current page location. + * + * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command. + * + */ + +module.exports = function (css) { + // get current location + var location = typeof window !== "undefined" && window.location; + + if (!location) { + throw new Error("fixUrls requires window.location"); + } + + // blank or null? + if (!css || typeof css !== "string") { + return css; + } + + var baseUrl = location.protocol + "//" + location.host; + var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/"); + + // convert each url(...) + /* + This regular expression is just a way to recursively match brackets within + a string. + + /url\s*\( = Match on the word "url" with any whitespace after it and then a parens + ( = Start a capturing group + (?: = Start a non-capturing group + [^)(] = Match anything that isn't a parentheses + | = OR + \( = Match a start parentheses + (?: = Start another non-capturing groups + [^)(]+ = Match anything that isn't a parentheses + | = OR + \( = Match a start parentheses + [^)(]* = Match anything that isn't a parentheses + \) = Match a end parentheses + ) = End Group + *\) = Match anything and then a close parens + ) = Close non-capturing group + * = Match anything + ) = Close capturing group + \) = Match a close parens + + /gi = Get all matches, not the first. Be case insensitive. + */ + var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) { + // strip quotes (if they exist) + var unquotedOrigUrl = origUrl + .trim() + .replace(/^"(.*)"$/, function(o, $1){ return $1; }) + .replace(/^'(.*)'$/, function(o, $1){ return $1; }); + + // already a full url? no change + if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) { + return fullMatch; + } + + // convert the url to a full url + var newUrl; + + if (unquotedOrigUrl.indexOf("//") === 0) { + //TODO: should we add protocol? + newUrl = unquotedOrigUrl; + } else if (unquotedOrigUrl.indexOf("/") === 0) { + // path should be relative to the base url + newUrl = baseUrl + unquotedOrigUrl; // already starts with '/' + } else { + // path should be relative to current directory + newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './' + } + + // send back the fixed url(...) + return "url(" + JSON.stringify(newUrl) + ")"; + }); + + // send back the fixed css + return fixedCss; +}; + + +/***/ }), + +/***/ "Cw3s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("FXPY"); +/* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("bMjX"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("88Tv"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("kjpz"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("ll/m"); + + + + + + + + + + + + + + +var RTL_ORIGIN = { + vertical: 'top', + horizontal: 'right' +}; +var LTR_ORIGIN = { + vertical: 'top', + horizontal: 'left' +}; +var styles = { + /* Styles applied to the `Paper` component. */ + paper: { + // specZ: The maximum height of a simple menu should be one or more rows less than the view + // height. This ensures a tapable area outside of the simple menu with which to dismiss + // the menu. + maxHeight: 'calc(100% - 96px)', + // Add iOS momentum scrolling. + WebkitOverflowScrolling: 'touch' + }, + + /* Styles applied to the `List` component via `MenuList`. */ + list: { + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0 + } +}; +var Menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Menu(props, ref) { + var _props$autoFocus = props.autoFocus, + autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus, + children = props.children, + classes = props.classes, + _props$disableAutoFoc = props.disableAutoFocusItem, + disableAutoFocusItem = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc, + _props$MenuListProps = props.MenuListProps, + MenuListProps = _props$MenuListProps === void 0 ? {} : _props$MenuListProps, + onClose = props.onClose, + onEnteringProp = props.onEntering, + open = props.open, + _props$PaperProps = props.PaperProps, + PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps, + PopoverClasses = props.PopoverClasses, + _props$transitionDura = props.transitionDuration, + transitionDuration = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura, + _props$TransitionProp = props.TransitionProps; + _props$TransitionProp = _props$TransitionProp === void 0 ? {} : _props$TransitionProp; + + var onEntering = _props$TransitionProp.onEntering, + TransitionProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_props$TransitionProp, ["onEntering"]), + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["autoFocus", "children", "classes", "disableAutoFocusItem", "MenuListProps", "onClose", "onEntering", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_12__["default"])(); + var autoFocusItem = autoFocus && !disableAutoFocusItem && open; + var menuListActionsRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var contentAnchorRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + + var getContentAnchorEl = function getContentAnchorEl() { + return contentAnchorRef.current; + }; + + var handleEntering = function handleEntering(element, isAppearing) { + if (menuListActionsRef.current) { + menuListActionsRef.current.adjustStyleForScrollbar(element, theme); + } + + if (onEnteringProp) { + onEnteringProp(element, isAppearing); + } + + if (onEntering) { + onEntering(element, isAppearing); + } + }; + + var handleListKeyDown = function handleListKeyDown(event) { + if (event.key === 'Tab') { + event.preventDefault(); + + if (onClose) { + onClose(event, 'tabKeyDown'); + } + } + }; + /** + * the index of the item should receive focus + * in a `variant="selectedMenu"` it's the first `selected` item + * otherwise it's the very first item. + */ + + + var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead + // to check if there is a `selected` item. We're looking for the last `selected` + // item and use the first valid item as a fallback + + react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child, index) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return; + } + + if (false) {} + + if (!child.props.disabled) { + if (variant !== "menu" && child.props.selected) { + activeItemIndex = index; + } else if (activeItemIndex === -1) { + activeItemIndex = index; + } + } + }); + var items = react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child, index) { + if (index === activeItemIndex) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, { + ref: function ref(instance) { + // #StrictMode ready + contentAnchorRef.current = react_dom__WEBPACK_IMPORTED_MODULE_10__["findDOMNode"](instance); + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_11__["default"])(child.ref, instance); + } + }); + } + + return child; + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Popover__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + getContentAnchorEl: getContentAnchorEl, + classes: PopoverClasses, + onClose: onClose, + TransitionProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + onEntering: handleEntering + }, TransitionProps), + anchorOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN, + transformOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN, + PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, PaperProps, { + classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, PaperProps.classes, { + root: classes.paper + }) + }), + open: open, + ref: ref, + transitionDuration: transitionDuration + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_MenuList__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + onKeyDown: handleListKeyDown, + actions: menuListActionsRef, + autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem), + autoFocusItem: autoFocusItem, + variant: variant + }, MenuListProps, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.list, MenuListProps.className) + }), items)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiMenu' +})(Menu)); + +/***/ }), + +/***/ "CwYD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerErrorInstrumentation", function() { return registerErrorInstrumentation; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("VjOD"); + + + +/** + * Configures global error listeners + */ +function registerErrorInstrumentation() { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('error', errorCallback); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('unhandledrejection', errorCallback); +} + +/** + * If an error or unhandled promise occurs, we mark the active transaction as failed + */ +function errorCallback() { + const activeTransaction = Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["getActiveTransaction"])(); + if (activeTransaction) { + const status = 'internal_error'; + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] Transaction: ${status} -> Global error occured`); + activeTransaction.setStatus(status); + } +} + + +//# sourceMappingURL=errors.js.map + + +/***/ }), + +/***/ "CyXu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("jlvQ"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("V6W0"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("ll/m"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("xOGQ"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("kjpz"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("DGfl"); + + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + height: 0, + overflow: 'hidden', + transition: theme.transitions.create('height') + }, + + /* Styles applied to the root element when the transition has entered. */ + entered: { + height: 'auto', + overflow: 'visible' + }, + + /* Styles applied to the root element when the transition has exited and `collapsedSize` != 0px. */ + hidden: { + visibility: 'hidden' + }, + + /* Styles applied to the outer wrapper element. */ + wrapper: { + // Hack to get children with a negative margin to not falsify the height computation. + display: 'flex' + }, + + /* Styles applied to the inner wrapper element. */ + wrapperInner: { + width: '100%' + } + }; +}; +/** + * The Collapse transition is used by the + * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ + +var Collapse = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Collapse(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + collapsedHeight = props.collapsedHeight, + _props$collapsedSize = props.collapsedSize, + collapsedSizeProp = _props$collapsedSize === void 0 ? '0px' : _props$collapsedSize, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disableStrictM = props.disableStrictModeCompat, + disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? _styles_transitions__WEBPACK_IMPORTED_MODULE_9__["duration"].standard : _props$timeout, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_7__["Transition"] : _props$TransitionComp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "classes", "className", "collapsedHeight", "collapsedSize", "component", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_12__["default"])(); + var timer = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + var wrapperRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var autoTransitionDuration = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + var collapsedSize = typeof (collapsedHeight || collapsedSizeProp) === 'number' ? "".concat(collapsedHeight || collapsedSizeProp, "px") : collapsedHeight || collapsedSizeProp; + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + return function () { + clearTimeout(timer.current); + }; + }, []); + var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; + var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var handleRef = Object(_utils__WEBPACK_IMPORTED_MODULE_13__["useForkRef"])(ref, enableStrictModeCompat ? nodeRef : undefined); + + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (nodeOrAppearing, maybeAppearing) { + if (callback) { + var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], + _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), + node = _ref2[0], + isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. + + + if (isAppearing === undefined) { + callback(node); + } else { + callback(node, isAppearing); + } + } + }; + }; + + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + node.style.height = collapsedSize; + + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntering = normalizedTransitionCallback(function (node, isAppearing) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + + var _getTransitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'enter' + }), + transitionDuration = _getTransitionProps.duration; + + if (timeout === 'auto') { + var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); + node.style.transitionDuration = "".concat(duration2, "ms"); + autoTransitionDuration.current = duration2; + } else { + node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); + } + + node.style.height = "".concat(wrapperHeight, "px"); + + if (onEntering) { + onEntering(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(function (node, isAppearing) { + node.style.height = 'auto'; + + if (onEntered) { + onEntered(node, isAppearing); + } + }); + var handleExit = normalizedTransitionCallback(function (node) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + node.style.height = "".concat(wrapperHeight, "px"); + + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(onExited); + var handleExiting = normalizedTransitionCallback(function (node) { + var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0; + + var _getTransitionProps2 = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'exit' + }), + transitionDuration = _getTransitionProps2.duration; + + if (timeout === 'auto') { + var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight); + node.style.transitionDuration = "".concat(duration2, "ms"); + autoTransitionDuration.current = duration2; + } else { + node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : "".concat(transitionDuration, "ms"); + } + + node.style.height = collapsedSize; + + if (onExiting) { + onExiting(node); + } + }); + + var addEndListener = function addEndListener(nodeOrNext, maybeNext) { + var next = enableStrictModeCompat ? nodeOrNext : maybeNext; + + if (timeout === 'auto') { + timer.current = setTimeout(next, autoTransitionDuration.current || 0); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: inProp, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + addEndListener: addEndListener, + nodeRef: enableStrictModeCompat ? nodeRef : undefined, + timeout: timeout === 'auto' ? null : timeout + }, other), function (state, childProps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.container, className, { + 'entered': classes.entered, + 'exited': !inProp && collapsedSize === '0px' && classes.hidden + }[state]), + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + minHeight: collapsedSize + }, style), + ref: handleRef + }, childProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.wrapper, + ref: wrapperRef + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.wrapperInner + }, children))); + }); +}); + false ? undefined : void 0; +Collapse.muiSupportAuto = true; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiCollapse' +})(Collapse)); + +/***/ }), + +/***/ "Cz+H": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.7 Math.atanh(x) +var $export = __webpack_require__("LRPZ"); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + + +/***/ }), + +/***/ "Cz70": +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__("v64C"), + equalArrays = __webpack_require__("0/NE"), + equalByTag = __webpack_require__("xlIW"), + equalObjects = __webpack_require__("DeF7"), + getTag = __webpack_require__("FqJm"), + isArray = __webpack_require__("8u9v"), + isBuffer = __webpack_require__("cjAe"), + isTypedArray = __webpack_require__("HvXq"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; + + +/***/ }), + +/***/ "D++w": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifyPlainObject; }); +/* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bk6B"); +/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Qvly"); + + +function verifyPlainObject(value, displayName, methodName) { + if (!Object(_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { + Object(_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} + +/***/ }), + +/***/ "D+v4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("VHzf"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); +/* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("UQCX"); + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + background: theme.palette.background.default, + padding: 8 + }, + + /* Styles applied to the root element if `position="bottom"`. */ + positionBottom: { + position: 'fixed', + bottom: 0, + left: 0, + right: 0, + zIndex: theme.zIndex.mobileStepper + }, + + /* Styles applied to the root element if `position="top"`. */ + positionTop: { + position: 'fixed', + top: 0, + left: 0, + right: 0, + zIndex: theme.zIndex.mobileStepper + }, + + /* Styles applied to the root element if `position="static"`. */ + positionStatic: {}, + + /* Styles applied to the dots container if `variant="dots"`. */ + dots: { + display: 'flex', + flexDirection: 'row' + }, + + /* Styles applied to each dot if `variant="dots"`. */ + dot: { + backgroundColor: theme.palette.action.disabled, + borderRadius: '50%', + width: 8, + height: 8, + margin: '0 2px' + }, + + /* Styles applied to a dot if `variant="dots"` and this is the active step. */ + dotActive: { + backgroundColor: theme.palette.primary.main + }, + + /* Styles applied to the Linear Progress component if `variant="progress"`. */ + progress: { + width: '50%' + } + }; +}; +var MobileStepper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function MobileStepper(props, ref) { + var _props$activeStep = props.activeStep, + activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep, + backButton = props.backButton, + classes = props.classes, + className = props.className, + LinearProgressProps = props.LinearProgressProps, + nextButton = props.nextButton, + _props$position = props.position, + position = _props$position === void 0 ? 'bottom' : _props$position, + steps = props.steps, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'dots' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["activeStep", "backButton", "classes", "className", "LinearProgressProps", "nextButton", "position", "steps", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + square: true, + elevation: 0, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes["position".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(position))], className), + ref: ref + }, other), backButton, variant === 'text' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](react__WEBPACK_IMPORTED_MODULE_3__["Fragment"], null, activeStep + 1, " / ", steps), variant === 'dots' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.dots + }, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(new Array(steps)).map(function (_, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + key: index, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.dot, index === activeStep && classes.dotActive) + }); + })), variant === 'progress' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_LinearProgress__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: classes.progress, + variant: "determinate", + value: Math.ceil(activeStep / (steps - 1) * 100) + }, LinearProgressProps)), nextButton); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiMobileStepper' +})(MobileStepper)); + +/***/ }), + +/***/ "D244": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? +Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; +function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; +exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; +exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; +exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; + + +/***/ }), + +/***/ "D2nQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SgeStep = void 0; +var SgeStep; +exports.SgeStep = SgeStep; +(function (SgeStep) { + SgeStep[SgeStep["IdentityAndPDL"] = 0] = "IdentityAndPDL"; + SgeStep[SgeStep["Address"] = 1] = "Address"; + SgeStep[SgeStep["Consent"] = 2] = "Consent"; +})(SgeStep || (exports.SgeStep = SgeStep = {})); + +/***/ }), + +/***/ "D81i": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__("TQc+"); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), + +/***/ "D8Vt": +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__("mKCr"), + eq = __webpack_require__("lBlV"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; + + +/***/ }), + +/***/ "DEgo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultMergeProps", function() { return defaultMergeProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMergePropsFunc", function() { return wrapMergePropsFunc; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsFunction", function() { return whenMergePropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsOmitted", function() { return whenMergePropsIsOmitted; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("D++w"); + + +function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps); +} +function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (false) {} + } + + return mergedProps; + }; + }; +} +function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; +} +function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps ? function () { + return defaultMergeProps; + } : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); + +/***/ }), + +/***/ "DG1p": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ "DGfl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fWYq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "capitalize", function() { return _capitalize__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _createChainedFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("bH5F"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createChainedFunction", function() { return _createChainedFunction__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _createSvgIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("RyfF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvgIcon", function() { return _createSvgIcon__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("NFPV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _debounce__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _deprecatedPropType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ll/m"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deprecatedPropType", function() { return _deprecatedPropType__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _isMuiElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("/iOI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMuiElement", function() { return _isMuiElement__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("sbbm"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ownerDocument", function() { return _ownerDocument__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _ownerWindow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("JGNw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ownerWindow", function() { return _ownerWindow__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("9a3J"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "requirePropFactory", function() { return _requirePropFactory__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("88Tv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setRef", function() { return _setRef__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _unsupportedProp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("qSOI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unsupportedProp", function() { return _unsupportedProp__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("9sWd"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useControlled", function() { return _useControlled__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _useEventCallback__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("UPk3"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useEventCallback", function() { return _useEventCallback__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _useForkRef__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("IU9S"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useForkRef", function() { return _useForkRef__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony import */ var _unstable_useId__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("VPKY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstable_useId", function() { return _unstable_useId__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _useIsFocusVisible__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("y78O"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useIsFocusVisible", function() { return _useIsFocusVisible__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + + + + + + + + + + + + + + + // eslint-disable-next-line camelcase + + + + +/***/ }), + +/***/ "DNGy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FkRJ"); +/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("j3u0"); +/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("gFOj"); +/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("19et"); +/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("08sj"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("88Tv"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + +var warnedOnce = false; +/** + * ⚠️⚠️⚠️ + * If you want the DOM element of a Material-UI component check out + * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element) + * first. + * + * This component uses `findDOMNode` which is deprecated in React.StrictMode. + * + * Helper component to allow attaching a ref to a + * wrapped element to access the underlying DOM element. + * + * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801. + * For example: + * ```jsx + * import React from 'react'; + * import RootRef from '@material-ui/core/RootRef'; + * + * function MyComponent() { + * const domRef = React.useRef(); + * + * React.useEffect(() => { + * console.log(domRef.current); // DOM node + * }, []); + * + * return ( + * <RootRef rootRef={domRef}> + * <SomeChildComponent /> + * </RootRef> + * ); + * } + * ``` + * + * @deprecated + */ + +var RootRef = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(RootRef, _React$Component); + + var _super = _createSuper(RootRef); + + function RootRef() { + Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, RootRef); + + return _super.apply(this, arguments); + } + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(RootRef, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.ref = react_dom__WEBPACK_IMPORTED_MODULE_6__["findDOMNode"](this); + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__["default"])(this.props.rootRef, this.ref); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + var ref = react_dom__WEBPACK_IMPORTED_MODULE_6__["findDOMNode"](this); + + if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) { + if (prevProps.rootRef !== this.props.rootRef) { + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__["default"])(prevProps.rootRef, null); + } + + this.ref = ref; + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__["default"])(this.props.rootRef, this.ref); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.ref = null; + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__["default"])(this.props.rootRef, null); + } + }, { + key: "render", + value: function render() { + if (false) {} + + return this.props.children; + } + }]); + + return RootRef; +}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (RootRef); + +/***/ }), + +/***/ "DP4q": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "DPwE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _minilog = _interopRequireDefault(__webpack_require__("B4A6")); +var inBrowser = typeof window !== 'undefined'; + +// eslint-disable-next-line no-undef +var minilog = inBrowser && window.minilog || _minilog.default; +var logApp = minilog('ecolyo'); +var _default = logApp; +exports.default = _default; + +/***/ }), + +/***/ "DRJ+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getQualification = exports.setQualification = exports.Qualification = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _lodash = __webpack_require__("nHcj"); + +var qualificationModel = _interopRequireWildcard(__webpack_require__("h/ya")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef {object} QualificationAttributes + * @property {string} [label] - The qualification label. + * @property {string} [purpose] - The document purpose. + * @property {string} [sourceCategory] - The activity field of the document source. + * @property {string} [sourceSubCategory] - The sub-activity field of the document source. + * @property {Array<string>} [subjects] - On what is about the document. + */ + +/** + * This class is used to create document Qualification, i.e. metadata + * attributes used to describe the document. + * The qualifications model is stored in the assets, associating + * labels to attributes, namely: purpose, sourceCategory, sourceSubCategory + * and subjects. + * A qualification can be customized accordingly to rules detailed in + * the checkValueAttributes method. + */ +var Qualification = /*#__PURE__*/function () { + /** + * @param {string} label - The qualification label + * @param {QualificationAttributes} attributes - Qualification's attributes + */ + function Qualification(label) { + var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _classCallCheck2.default)(this, Qualification); + var qualification = qualificationModel.qualifications.find(function (qualif) { + return qualif.label === label; + }); + + if (qualification) { + /** + * @type {string?} + */ + this.label = qualification.label; + /** + * @type {string?} + */ + + this.purpose = attributes.purpose || qualification.purpose; + this.sourceCategory = attributes.sourceCategory || qualification.sourceCategory; + this.sourceSubCategory = attributes.sourceSubCategory || qualification.sourceSubCategory; + this.subjects = attributes.subjects || qualification.subjects; + } else { + throw new Error("No qualification found for the label ".concat(label)); + } + } + /** + * Check the given qualification attributes respects the following rules: + * - For the given label, if a purpose, sourceCategory or sourceSubCategory + * attribute is defined in the model, it must match the given qualification. + * - If not defined in the model for the label, a custom purpose, sourceCategory or + * sourceSubCategory value can be defined, if it exist in their respective + * known values list. + * - For the given label, if subjects are defined in the model, they must be included + * in the given qualification. + * - If extra subjects are set, they should exist in the known values. + * + * @param {object} attributes - The qualification attributes to check + */ + + + (0, _createClass2.default)(Qualification, [{ + key: "checkAttributes", + value: function checkAttributes(attributes) { + if (this.purpose !== attributes.purpose) { + if (!this.purpose) { + var isKnownValue = qualificationModel.purposeKnownValues.includes(attributes.purpose); + + if (!isKnownValue) { + _logger.default.info("This purpose is not listed among the known values: ".concat(attributes.purpose, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The purpose for the label ".concat(this.label, " should be ").concat(this.purpose, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + + if (this.sourceCategory !== attributes.sourceCategory) { + if (!this.sourceCategory) { + var _isKnownValue = qualificationModel.sourceCategoryKnownValues.includes(attributes.sourceCategory); + + if (!_isKnownValue) { + _logger.default.info("This sourceCategory is not listed among the known values: ".concat(attributes.sourceCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The sourceCategory for the label ".concat(this.label, " should be ").concat(this.sourceCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + + if (this.sourceSubCategory !== attributes.sourceSubCategory) { + if (!this.sourceSubCategory) { + var _isKnownValue2 = qualificationModel.sourceSubCategoryKnownValues.includes(attributes.sourceSubCategory); + + if (!_isKnownValue2) { + _logger.default.info("This sourceSubCategory is not listed among the known values: ".concat(attributes.sourceSubCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The sourceSubCategory for the label ".concat(this.label, " should be ").concat(this.sourceSubCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + + var missingSubjects = (0, _lodash.difference)(this.subjects, attributes.subjects); + + if (missingSubjects.length > 0) { + throw new Error("The subjects for the label ".concat(this.label, " should include ").concat(this.subjects, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + + var extraSubjects = (0, _lodash.difference)(attributes.subjects, this.subjects); + + if (extraSubjects.length > 0) { + var unknownSubjects = (0, _lodash.difference)(extraSubjects, qualificationModel.subjectsKnownValues); + if (unknownSubjects.length > 0) _logger.default.info("These subjects are not listed among the known values: ".concat(unknownSubjects, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + /** + * Set purpose to the qualification. + * + * @param {Array} purpose - The purpose to set. + * @returns {Qualification} The Qualification object. + */ + + }, { + key: "setPurpose", + value: function setPurpose(purpose) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + purpose: purpose + })); + } + /** + * Set sourceCategory to the qualification. + * + * @param {Array} sourceCategory - The sourceCategory to set. + * @returns {Qualification} The Qualification object. + */ + + }, { + key: "setSourceCategory", + value: function setSourceCategory(sourceCategory) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + sourceCategory: sourceCategory + })); + } + /** + * Set sourceSubCategory to the qualification. + * + * @param {Array} sourceSubCategory - The sourceSubCategory to set. + * @returns {Qualification} The Qualification object. + */ + + }, { + key: "setSourceSubCategory", + value: function setSourceSubCategory(sourceSubCategory) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + sourceSubCategory: sourceSubCategory + })); + } + /** + * Set subjects to the qualification. + * + * @param {Array} subjects - The subjects to set. + * @returns {Qualification} The Qualification object. + */ + + }, { + key: "setSubjects", + value: function setSubjects(subjects) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + subjects: subjects + })); + } + /** + * Returns the qualification attributes + * + * @returns {object} The qualification attributes + */ + + }, { + key: "toQualification", + value: function toQualification() { + return { + label: this.label, + purpose: this.purpose, + sourceCategory: this.sourceCategory, + sourceSubCategory: this.sourceSubCategory, + subjects: this.subjects + }; + } + }]); + return Qualification; +}(); +/** + * Returns the qualification associated to a label. + * + * @param {string} label - The label to qualify + * @returns {Qualification} - The qualification + */ + + +exports.Qualification = Qualification; + +Qualification.getByLabel = function (label) { + return new Qualification(label); +}; +/** + * Set the qualification to the document metadata + * + * @param {object} document - The document to set the qualification + * @param {Qualification} qualification - The qualification to set + * @returns {object} - The qualified document + */ + + +var setQualification = function setQualification(document, qualification) { + if (qualification.label) { + new Qualification(qualification.label).checkAttributes(qualification); + } else { + throw new Error('You must set a label to qualify'); + } + + return (0, _lodash.set)(document, 'metadata.qualification', qualification); +}; +/** + * Helper to get the qualification from a document + * + * @param {object} document - The document + * @returns {Qualification} - The document qualification + * + */ + + +exports.setQualification = setQualification; + +var getQualification = function getQualification(document) { + var docQualification = (0, _lodash.get)(document, 'metadata.qualification'); + var qualification = new Qualification(docQualification.label, docQualification.qualification); + return qualification.toQualification(); +}; + +exports.getQualification = getQualification; + +/***/ }), + +/***/ "DWlN": +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__("pFmr"); +var anObject = __webpack_require__("eckd"); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__("DnF+")(Function.call, __webpack_require__("Yfzq").f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), + +/***/ "DWnN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isContact = exports.getIndexByFamilyNameGivenNameEmailCozyUrl = exports.getDefaultSortIndexValue = exports.makeDefaultSortIndexValue = exports.getDisplayName = exports.makeDisplayName = exports.getFullname = exports.makeFullname = exports.getPrimaryAddress = exports.getPrimaryPhone = exports.getPrimaryCozyDomain = exports.getPrimaryCozy = exports.getPrimaryEmail = exports.getInitials = exports.getPrimaryOrFirst = exports.CONTACTS_DOCTYPE = void 0; + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _isEmpty = _interopRequireDefault(__webpack_require__("oc9d")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +var CONTACTS_DOCTYPE = 'io.cozy.contacts'; +exports.CONTACTS_DOCTYPE = CONTACTS_DOCTYPE; + +var getPrimaryOrFirst = function getPrimaryOrFirst(property) { + return function (obj) { + return !obj[property] || obj[property].length === 0 ? '' : obj[property].find(function (property) { + return property.primary; + }) || obj[property][0]; + }; +}; +/** + * Returns the initials of the contact. + * + * @param {object} contact - A contact + * @returns {string} - the contact's initials + */ + + +exports.getPrimaryOrFirst = getPrimaryOrFirst; + +var getInitials = function getInitials(contact) { + if (contact.name && !(0, _isEmpty.default)(contact.name)) { + return ['givenName', 'familyName'].map(function (part) { + return (0, _get.default)(contact, ['name', part, 0], ''); + }).join('').toUpperCase(); + } + + var email = getPrimaryEmail(contact); + + if (email) { + return email[0].toUpperCase(); + } + + var cozy = getPrimaryCozyDomain(contact); + + if (cozy) { + return cozy[0].toUpperCase(); + } + + return ''; +}; +/** + * Returns the contact's main email + * + * @param {object} contact - A contact + * @returns {string} - The contact's main email + */ + + +exports.getInitials = getInitials; + +var getPrimaryEmail = function getPrimaryEmail(contact) { + return Array.isArray(contact.email) ? getPrimaryOrFirst('email')(contact).address || '' : contact.email; +}; +/** + * Returns the contact's main cozy + * + * @param {object} contact - A contact + * @returns {string} - The contact's main cozy + */ + + +exports.getPrimaryEmail = getPrimaryEmail; + +var getPrimaryCozy = function getPrimaryCozy(contact) { + return Array.isArray(contact.cozy) ? getPrimaryOrFirst('cozy')(contact).url || '' : contact.url; +}; +/** + * Returns the contact's main cozy url without protocol + * + * @param {object} contact - A contact + * @returns {string} - The contact's main cozy url + */ + + +exports.getPrimaryCozy = getPrimaryCozy; + +var getPrimaryCozyDomain = function getPrimaryCozyDomain(contact) { + try { + var url = new URL(getPrimaryCozy(contact)); + return url.hostname.replace(/^(www.)/g, ''); + } catch (_unused) { + return getPrimaryCozy(contact); + } +}; +/** + * Returns the contact's main phone number + * + * @param {object} contact - A contact + * @returns {string} - The contact's main phone number + */ + + +exports.getPrimaryCozyDomain = getPrimaryCozyDomain; + +var getPrimaryPhone = function getPrimaryPhone(contact) { + return getPrimaryOrFirst('phone')(contact).number || ''; +}; +/** + * Returns the contact's main address + * + * @param {object} contact - A contact + * @returns {string} - The contact's main address + */ + + +exports.getPrimaryPhone = getPrimaryPhone; + +var getPrimaryAddress = function getPrimaryAddress(contact) { + return getPrimaryOrFirst('address')(contact).formattedAddress || ''; +}; +/** + * Makes fullname from contact name + * + * @param {*} contact - A contact + * @returns {string} - The contact's fullname + */ + + +exports.getPrimaryAddress = getPrimaryAddress; + +var makeFullname = function makeFullname(contact) { + if (contact.name) { + return ['namePrefix', 'givenName', 'additionalName', 'familyName', 'nameSuffix'].map(function (part) { + return contact.name[part]; + }).filter(function (part) { + return part !== undefined; + }).join(' ').trim(); + } + + return ''; +}; +/** + * Returns the contact's fullname + * + * @param {object} contact - A contact + * @returns {string} - The contact's fullname + */ + + +exports.makeFullname = makeFullname; + +var getFullname = function getFullname(contact) { + if ((0, _get.default)(contact, 'fullname')) { + return contact.fullname; + } + + return makeFullname(contact); +}; +/** + * Makes displayName from contact data + * + * @param {*} contact - A contact + * @returns {string} - The contact's displayName + */ + + +exports.getFullname = getFullname; + +var makeDisplayName = function makeDisplayName(contact) { + var fullname = makeFullname(contact); + var primaryEmail = getPrimaryEmail(contact); + var primaryCozyDomain = getPrimaryCozyDomain(contact); + + if (fullname && fullname.length > 0) { + return fullname; + } + + if (primaryEmail && primaryEmail.length > 0) { + return primaryEmail; + } + + if (primaryCozyDomain && primaryCozyDomain.length > 0) { + return primaryCozyDomain; + } + + return ''; +}; +/** + * Returns a display name for the contact + * + * @param {object} contact - A contact + * @returns {string} - the contact's display name + **/ + + +exports.makeDisplayName = makeDisplayName; + +var getDisplayName = function getDisplayName(contact) { + if ((0, _get.default)(contact, 'displayName')) { + return contact.displayName; + } + + return makeDisplayName(contact); +}; +/** + * Makes 'byFamilyNameGivenNameEmailCozyUrl' index of a contact + * + * @param {object} contact - A contact + * @returns {string} - the contact's 'byFamilyNameGivenNameEmailCozyUrl' index + */ + + +exports.getDisplayName = getDisplayName; + +var makeDefaultSortIndexValue = function makeDefaultSortIndexValue(contact) { + var defaultSortIndexValue = [(0, _get.default)(contact, 'name.familyName', ''), (0, _get.default)(contact, 'name.givenName', ''), getPrimaryEmail(contact), getPrimaryCozyDomain(contact)].join('').trim().toLowerCase(); + + if (defaultSortIndexValue.length === 0) { + return null; + } + + return defaultSortIndexValue; +}; +/** + * Returns 'byFamilyNameGivenNameEmailCozyUrl' index of a contact + * + * @param {object} contact - A contact + * @returns {string} - the contact's 'byFamilyNameGivenNameEmailCozyUrl' index + */ + + +exports.makeDefaultSortIndexValue = makeDefaultSortIndexValue; + +var getDefaultSortIndexValue = function getDefaultSortIndexValue(contact) { + var defaultSortIndexValue = (0, _get.default)(contact, 'indexes.byFamilyNameGivenNameEmailCozyUrl', null); + + if (defaultSortIndexValue !== null) { + return (0, _isEmpty.default)(defaultSortIndexValue) ? null : defaultSortIndexValue; + } + + return makeDefaultSortIndexValue(contact); +}; +/** + * Returns 'byFamilyNameGivenNameEmailCozyUrl' index of a contact + * + * @deprecated Prefer to use getDefaultSortIndexValue. + * @param {object} contact - A contact + * @returns {string} - the contact's 'byFamilyNameGivenNameEmailCozyUrl' index + */ + + +exports.getDefaultSortIndexValue = getDefaultSortIndexValue; + +var getIndexByFamilyNameGivenNameEmailCozyUrl = function getIndexByFamilyNameGivenNameEmailCozyUrl(contact) { + _logger.default.warn('Deprecation: `getIndexByFamilyNameGivenNameEmailCozyUrl` is deprecated, please use `getDefaultSortIndexValue` instead'); + + return getDefaultSortIndexValue(contact); +}; +/** + * Whether the document is a contact + * + * @param {object} doc - A document (from io.cozy.something, or com.bitwarden or anything else) + * @returns {boolean} + */ + + +exports.getIndexByFamilyNameGivenNameEmailCozyUrl = getIndexByFamilyNameGivenNameEmailCozyUrl; + +var isContact = function isContact(doc) { + return doc._type === CONTACTS_DOCTYPE; +}; + +exports.isContact = isContact; + +/***/ }), + +/***/ "DaKy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + padding: 16, + '&:last-child': { + paddingBottom: 24 + } + } +}; +var CardContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CardContent(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiCardContent' +})(CardContent)); + +/***/ }), + +/***/ "Dcxy": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqual = __webpack_require__("kSPP"), + get = __webpack_require__("/yh+"), + hasIn = __webpack_require__("QlLD"), + isKey = __webpack_require__("sMdj"), + isStrictComparable = __webpack_require__("74bI"), + matchesStrictComparable = __webpack_require__("PBFE"), + toKey = __webpack_require__("Iv0v"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; + + +/***/ }), + +/***/ "DeF7": +/***/ (function(module, exports, __webpack_require__) { + +var getAllKeys = __webpack_require__("sAcZ"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; + + +/***/ }), + +/***/ "Dg7S": +/***/ (function(module, exports, __webpack_require__) { + +var createCaseFirst = __webpack_require__("yPbt"); + +/** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ +var upperFirst = createCaseFirst('toUpperCase'); + +module.exports = upperFirst; + + +/***/ }), + +/***/ "DhWQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BTE/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _SnackbarContent__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "DhlH": +/***/ (function(module, exports, __webpack_require__) { + +// default filter +var Transform = __webpack_require__("prJK"); + +var levelMap = { debug: 1, info: 2, warn: 3, error: 4 }; + +function Filter() { + this.enabled = true; + this.defaultResult = true; + this.clear(); +} + +Transform.mixin(Filter); + +// allow all matching, with level >= given level +Filter.prototype.allow = function(name, level) { + this._white.push({ n: name, l: levelMap[level] }); + return this; +}; + +// deny all matching, with level <= given level +Filter.prototype.deny = function(name, level) { + this._black.push({ n: name, l: levelMap[level] }); + return this; +}; + +Filter.prototype.clear = function() { + this._white = []; + this._black = []; + return this; +}; + +function test(rule, name) { + // use .test for RegExps + return (rule.n.test ? rule.n.test(name) : rule.n == name); +}; + +Filter.prototype.test = function(name, level) { + var i, len = Math.max(this._white.length, this._black.length); + for(i = 0; i < len; i++) { + if(this._white[i] && test(this._white[i], name) && levelMap[level] >= this._white[i].l) { + return true; + } + if(this._black[i] && test(this._black[i], name) && levelMap[level] <= this._black[i].l) { + return false; + } + } + return this.defaultResult; +}; + +Filter.prototype.write = function(name, level, args) { + if(!this.enabled || this.test(name, level)) { + return this.emit('item', name, level, args); + } +}; + +module.exports = Filter; + + +/***/ }), + +/***/ "DjJv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function (useSourceMap) { + var list = []; // return the list of modules as css string + + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item, useSourceMap); + + if (item[2]) { + return '@media ' + item[2] + '{' + content + '}'; + } else { + return content; + } + }).join(''); + }; // import a list of modules into the list + + + list.i = function (modules, mediaQuery) { + if (typeof modules === 'string') { + modules = [[null, modules, '']]; + } + + var alreadyImportedModules = {}; + + for (var i = 0; i < this.length; i++) { + var id = this[i][0]; + + if (id != null) { + alreadyImportedModules[id] = true; + } + } + + for (i = 0; i < modules.length; i++) { + var item = modules[i]; // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + + if (item[0] == null || !alreadyImportedModules[item[0]]) { + if (mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if (mediaQuery) { + item[2] = '(' + item[2] + ') and (' + mediaQuery + ')'; + } + + list.push(item); + } + } + }; + + return list; +}; + +function cssWithMappingToString(item, useSourceMap) { + var content = item[1] || ''; + var cssMapping = item[3]; + + if (!cssMapping) { + return content; + } + + if (useSourceMap && typeof btoa === 'function') { + var sourceMapping = toComment(cssMapping); + var sourceURLs = cssMapping.sources.map(function (source) { + return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'; + }); + return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + } + + return [content].join('\n'); +} // Adapted from convert-source-map (MIT) + + +function toComment(sourceMap) { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + return '/*# ' + data + ' */'; +} + +/***/ }), + +/***/ "DkL9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CircularProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lTBH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CircularProgress__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "Dktw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.getFileDatetime = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _get3 = _interopRequireDefault(__webpack_require__("RNXH")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _get4 = _interopRequireDefault(__webpack_require__("/yh+")); + +var _omit = _interopRequireDefault(__webpack_require__("RjO1")); + +var _uniq = _interopRequireDefault(__webpack_require__("efAt")); + +var _dsl = __webpack_require__("v2kV"); + +var _store = __webpack_require__("6mdx"); + +var _const = __webpack_require__("P3Kl"); + +var _Association = _interopRequireDefault(__webpack_require__("urEX")); + +var _HasMany2 = _interopRequireDefault(__webpack_require__("Jm63")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * newCursor - Returns a CouchDB view Cursor for cursor-based pagination + * + * @param {import("../types").ViewKey} key - The CouchDB key of the view which will be requested + * @param {import("../types").DocId} startDocId - The first doc _id to return from the view + * + * @returns {import("../types").CouchDBViewCursor} + */ +var newCursor = function newCursor(_ref, startDocId) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 3), + doctype = _ref2[0], + id = _ref2[1], + lastDatetime = _ref2[2]; + + var cursorKey = lastDatetime ? [doctype, id, lastDatetime] : [doctype, id]; + return [cursorKey, startDocId]; +}; +/** + * Get the file datetime + * + * @param {import('../types').IOCozyFile} file - io.cozy.files document + * @returns {string} The file datetime + */ + + +var getFileDatetime = function getFileDatetime(file) { + var _file$metadata; + + // Some files do not have any metadata, e.g. bitmap files. + return ((_file$metadata = file.metadata) === null || _file$metadata === void 0 ? void 0 : _file$metadata.datetime) || file.created_at; +}; +/** + * This class is only used for photos albums relationships. + * Behind the hood, the queries uses a view returning the files sorted + * by datetime, with a cursor-based pagination. + */ + + +exports.getFileDatetime = getFileDatetime; + +var HasManyFiles = /*#__PURE__*/function (_HasMany) { + (0, _inherits2.default)(HasManyFiles, _HasMany); + + var _super = _createSuper(HasManyFiles); + + function HasManyFiles() { + (0, _classCallCheck2.default)(this, HasManyFiles); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(HasManyFiles, [{ + key: "fetchMore", + value: function () { + var _fetchMore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var _this = this; + + var queryDef, relationships, lastRelationship; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + queryDef = new _dsl.QueryDefinition({ + doctype: _const.DOCTYPE_FILES + }); + relationships = this.getRelationship().data; // Get last datetime for cursor + + lastRelationship = relationships[relationships.length - 1]; + _context2.next = 5; + return this.dispatch( /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dispatch, getState) { + var lastRelDoc, lastDatetime, cursor, response; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + lastRelDoc = (0, _store.getDocumentFromState)(getState(), lastRelationship._type, lastRelationship._id); + lastDatetime = getFileDatetime(lastRelDoc.attributes); // cursor-based pagination + + cursor = newCursor([_this.target._type, _this.target._id, lastDatetime], relationships[relationships.length - 1]._id); + _context.next = 5; + return _this.query(queryDef.referencedBy(_this.target).offsetCursor(cursor)); + + case 5: + response = _context.sent; + // Remove first returned element, used as starting point for the query + response.data.shift(); + _context.next = 9; + return _this.dispatch(_this.updateRelationshipData(function (previousRelationshipData) { + return _objectSpread(_objectSpread({}, previousRelationshipData), {}, { + data: [].concat((0, _toConsumableArray2.default)(previousRelationshipData.data), (0, _toConsumableArray2.default)(response.data)), + next: response.next + }); + })); + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x, _x2) { + return _ref3.apply(this, arguments); + }; + }()); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function fetchMore() { + return _fetchMore.apply(this, arguments); + } + + return fetchMore; + }() + }, { + key: "addById", + value: function () { + var _addById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(idsArg) { + var _this2 = this; + + var ids, relations; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + ids = Array.isArray(idsArg) ? idsArg : [idsArg]; + this.addTargetRelationships(ids); + relations = ids.map(function (id) { + return { + _id: id, + _type: _this2.doctype + }; + }); + _context3.next = 5; + return this.mutate(this.addReferences(relations)); + + case 5: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function addById(_x3) { + return _addById.apply(this, arguments); + } + + return addById; + }() + }, { + key: "removeById", + value: function () { + var _removeById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(idsArg) { + var _this3 = this; + + var ids, references; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + ids = Array.isArray(idsArg) ? idsArg : [idsArg]; + this.removeTargetRelationships(idsArg); + references = ids.map(function (id) { + return { + _id: id, + _type: _this3.doctype + }; + }); + _context4.next = 5; + return this.mutate(this.removeReferences(references)); + + case 5: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function removeById(_x4) { + return _removeById.apply(this, arguments); + } + + return removeById; + }() + }, { + key: "addReferences", + value: function addReferences(referencedDocs) { + if (this.target._type === _const.DOCTYPE_FILES) { + return _dsl.Mutations.addReferencedBy(this.target, referencedDocs); + } else if (referencedDocs[0]._type === _const.DOCTYPE_FILES) { + return _dsl.Mutations.addReferencesTo(this.target, referencedDocs); + } else { + throw new Error('Either the document or the references should be io.cozy.files'); + } + } + }, { + key: "removeReferences", + value: function removeReferences(referencedDocs) { + if (this.target._type === _const.DOCTYPE_FILES) { + return _dsl.Mutations.removeReferencedBy(this.target, referencedDocs); + } else if (referencedDocs[0]._type === _const.DOCTYPE_FILES) { + return _dsl.Mutations.removeReferencesTo(this.target, referencedDocs); + } else { + throw new Error('Either the document or the references should be io.cozy.files'); + } + } + }, { + key: "dehydrate", + value: function dehydrate(doc) { + // HasManyFiles relationships are stored on the file doctype, not the document the files are related to + return (0, _omit.default)(doc, [this.name, "relationships.".concat(this.name)]); + } + /** + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - The query params + * + * @returns {import("../types").CozyClientDocument | QueryDefinition} + */ + + }, { + key: "data", + get: function get() { + var _this4 = this; + + if (this.target._type === _const.DOCTYPE_FILES) { + var refs = (0, _get4.default)(this.target, 'referenced_by', []); + return refs.map(function (_ref4) { + var id = _ref4.id, + type = _ref4.type; + return _this4.get(type, id); + }).filter(Boolean); + } else { + return (0, _get3.default)((0, _getPrototypeOf2.default)(HasManyFiles.prototype), "data", this); + } + } + }], [{ + key: "query", + value: function query(document, client, assoc) { + if (document._type === _const.DOCTYPE_FILES) { + var refs = (0, _get4.default)(document, "relationships.referenced_by.data", []); + var ids = (0, _uniq.default)(refs.filter(function (ref) { + return ref.type === assoc.doctype; + }).map(function (ref) { + return ref.id; + })); + return ids.length > 0 ? (0, _dsl.Q)(assoc.doctype).getByIds(ids) : null; + } else { + var cursor = newCursor([document._type, document._id], ''); + return (0, _dsl.Q)(assoc.doctype).referencedBy(document).offsetCursor(cursor); + } + } + }]); + return HasManyFiles; +}(_HasMany2.default); + +exports.default = HasManyFiles; + +/***/ }), + +/***/ "Dl8V": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebviewContext = void 0; + +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); + +var WebviewContext = /*#__PURE__*/_react.default.createContext(undefined); + +exports.WebviewContext = WebviewContext; + +/***/ }), + +/***/ "DmM/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fx5b"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _MenuItem__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "DnF+": +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__("TQc+"); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ "Ds3E": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("NFPV"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ll/m"); + + + + + + + + +function getStyleValue(computedStyle, property) { + return parseInt(computedStyle[property], 10) || 0; +} + +var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useEffect"]; +var styles = { + /* Styles applied to the shadow textarea element. */ + shadow: { + // Visibility needed to hide the extra text area on iPads + visibility: 'hidden', + // Remove from the content flow + position: 'absolute', + // Ignore the scrollbar width + overflow: 'hidden', + height: 0, + top: 0, + left: 0, + // Create a new layer, increase the isolation of the computed values + transform: 'translateZ(0)' + } +}; +var TextareaAutosize = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TextareaAutosize(props, ref) { + var onChange = props.onChange, + rows = props.rows, + rowsMax = props.rowsMax, + rowsMinProp = props.rowsMin, + maxRowsProp = props.maxRows, + _props$minRows = props.minRows, + minRowsProp = _props$minRows === void 0 ? 1 : _props$minRows, + style = props.style, + value = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["onChange", "rows", "rowsMax", "rowsMin", "maxRows", "minRows", "style", "value"]); + + var maxRows = maxRowsProp || rowsMax; + var minRows = rows || rowsMinProp || minRowsProp; + + var _React$useRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](value != null), + isControlled = _React$useRef.current; + + var inputRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__["default"])(ref, inputRef); + var shadowRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var renders = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](0); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]({}), + state = _React$useState[0], + setState = _React$useState[1]; + + var syncHeight = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + var input = inputRef.current; + var computedStyle = window.getComputedStyle(input); + var inputShallow = shadowRef.current; + inputShallow.style.width = computedStyle.width; + inputShallow.value = input.value || props.placeholder || 'x'; + + if (inputShallow.value.slice(-1) === '\n') { + // Certain fonts which overflow the line height will cause the textarea + // to report a different scrollHeight depending on whether the last line + // is empty. Make it non-empty to avoid this issue. + inputShallow.value += ' '; + } + + var boxSizing = computedStyle['box-sizing']; + var padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top'); + var border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content + + var innerHeight = inputShallow.scrollHeight - padding; // Measure height of a textarea with a single row + + inputShallow.value = 'x'; + var singleRowHeight = inputShallow.scrollHeight - padding; // The height of the outer content + + var outerHeight = innerHeight; + + if (minRows) { + outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight); + } + + if (maxRows) { + outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight); + } + + outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style. + + var outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0); + var overflow = Math.abs(outerHeight - innerHeight) <= 1; + setState(function (prevState) { + // Need a large enough difference to update the height. + // This prevents infinite rendering loop. + if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) { + renders.current += 1; + return { + overflow: overflow, + outerHeightStyle: outerHeightStyle + }; + } + + if (false) {} + + return prevState; + }); + }, [maxRows, minRows, props.placeholder]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_4__["default"])(function () { + renders.current = 0; + syncHeight(); + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [syncHeight]); + useEnhancedEffect(function () { + syncHeight(); + }); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + renders.current = 0; + }, [value]); + + var handleChange = function handleChange(event) { + renders.current = 0; + + if (!isControlled) { + syncHeight(); + } + + if (onChange) { + onChange(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("textarea", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + value: value, + onChange: handleChange, + ref: handleRef // Apply the rows prop to get a "correct" first SSR paint + , + rows: minRows, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + height: state.outerHeightStyle, + // Need a large enough difference to allow scrolling. + // This prevents infinite rendering loop. + overflow: state.overflow ? 'hidden' : null + }, style) + }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("textarea", { + "aria-hidden": true, + className: props.className, + readOnly: true, + ref: shadowRef, + tabIndex: -1, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, styles.shadow, style) + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (TextareaAutosize); + +/***/ }), + +/***/ "DsH6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createConnect", function() { return createConnect; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6vz+"); +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("UQKm"); +/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("0GfA"); +/* harmony import */ var _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3yS1"); +/* harmony import */ var _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("SbG8"); +/* harmony import */ var _mergeProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("DEgo"); +/* harmony import */ var _selectorFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("GFvo"); + + + + + + + + +/* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + +function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); + }; +} + +function strictEqual(a, b) { + return a === b; +} // createConnect with default args builds the 'official' connect behavior. Calling it with +// different options opens up some testing and extensibility scenarios + + +function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__["default"] : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__["default"] : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areMergedPropsE, + extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return "Connect(" + name + ")"; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual + }, extraOptions)); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (createConnect()); + +/***/ }), + +/***/ "Dsef": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addDays; }); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CUab"); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("WZRr"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bKmd"); + + + +/** + * @name addDays + * @category Day Helpers + * @summary Add the specified number of days to the given date. + * + * @description + * Add the specified number of days to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} - the new date with the days added + * @throws {TypeError} - 2 arguments required + * + * @example + * // Add 10 days to 1 September 2014: + * const result = addDays(new Date(2014, 8, 1), 10) + * //=> Thu Sep 11 2014 00:00:00 + */ + +function addDays(dirtyDate, dirtyAmount) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(2, arguments); + var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyAmount); + + if (isNaN(amount)) { + return new Date(NaN); + } + + if (!amount) { + // If 0 days, no-op to avoid changing times in the hour before end of DST + return date; + } + + date.setDate(date.getDate() + amount); + return date; +} + +/***/ }), + +/***/ "DuFP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_interopNamespace", function() { return _interopNamespace; }); +/** + * Adds a self-referential `default` property to CJS modules which aren't the result of transpilation from ESM modules. + * + * Adapted from Rollup (https://github.com/rollup/rollup) + * + * @param requireResult The result of calling `require` on a module + * @returns Either `requireResult` or a copy of `requireResult` with an added self-referential `default` property + */ +function _interopNamespace(requireResult) { + return requireResult.__esModule ? requireResult : { ...requireResult, default: requireResult }; +} + +// Rollup version (with `output.externalLiveBindings` and `output.freeze` both set to false) +// function _interopNamespace(e) { +// if (e && e.__esModule) return e; +// var n = Object.create(null); +// if (e) { +// for (var k in e) { +// n[k] = e[k]; +// } +// } +// n["default"] = e; +// return n; +// } + + +//# sourceMappingURL=_interopNamespace.js.map + + +/***/ }), + +/***/ "Dv7O": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__("gsPm"); +} else {} + + +/***/ }), + +/***/ "DwJc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $forEach = __webpack_require__("7NDg")(0); +var STRICT = __webpack_require__("QLBk")([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "Dy1F": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "Dz5r": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 Object.getOwnPropertyNames(O) +__webpack_require__("80eX")('getOwnPropertyNames', function () { + return __webpack_require__("ku/n").f; +}); + + +/***/ }), + +/***/ "E8//": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + */ + +var Tablelvl2Context = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Tablelvl2Context); + +/***/ }), + +/***/ "EDbf": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] + var monthsFull = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] + var weekdays2char = ['日', '一', '二', '三', '四', '五', '六'] + var weekdays3char = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] + var weekdaysFull = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] + var meridiemFull = ['上午', '下午'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + } + } + + // AM, PM / am, pm / a.m., p.m. all translates to 上午, 下午 + formatters.a = formatters.aa = formatters.A = function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number.toString() +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "EEoB": +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), + +/***/ "EEw8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cdL5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Divider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "EQre": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("OY/u"); + + + + + +var styles = function styles(theme) { + return { + thumb: { + '&$open': { + '& $offset': { + transform: 'scale(1) translateY(-10px)' + } + } + }, + open: {}, + offset: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + zIndex: 1 + }, theme.typography.body2, { + fontSize: theme.typography.pxToRem(12), + lineHeight: 1.2, + transition: theme.transitions.create(['transform'], { + duration: theme.transitions.duration.shortest + }), + top: -34, + transformOrigin: 'bottom center', + transform: 'scale(0)', + position: 'absolute' + }), + circle: { + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + width: 32, + height: 32, + borderRadius: '50% 50% 50% 0', + backgroundColor: 'currentColor', + transform: 'rotate(-45deg)' + }, + label: { + color: theme.palette.primary.contrastText, + transform: 'rotate(45deg)' + } + }; +}; +/** + * @ignore - internal component. + */ + + +function ValueLabel(props) { + var children = props.children, + classes = props.classes, + className = props.className, + open = props.open, + value = props.value, + valueLabelDisplay = props.valueLabelDisplay; + + if (valueLabelDisplay === 'off') { + return children; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["cloneElement"](children, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.offset, className) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { + className: classes.circle + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", { + className: classes.label + }, value)))); +} + +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__["default"])(styles, { + name: 'PrivateValueLabel' +})(ValueLabel)); + +/***/ }), + +/***/ "ES0e": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__("7wnO") }); + + +/***/ }), + +/***/ "ESWp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_FINAL_TIMEOUT", function() { return DEFAULT_FINAL_TIMEOUT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_HEARTBEAT_INTERVAL", function() { return DEFAULT_HEARTBEAT_INTERVAL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_IDLE_TIMEOUT", function() { return DEFAULT_IDLE_TIMEOUT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdleTransaction", function() { return IdleTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IdleTransactionSpanRecorder", function() { return IdleTransactionSpanRecorder; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _span_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("tH0f"); +/* harmony import */ var _transaction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ik7V"); + + + + +const DEFAULT_IDLE_TIMEOUT = 1000; +const DEFAULT_FINAL_TIMEOUT = 30000; +const DEFAULT_HEARTBEAT_INTERVAL = 5000; + +/** + * @inheritDoc + */ +class IdleTransactionSpanRecorder extends _span_js__WEBPACK_IMPORTED_MODULE_1__["SpanRecorder"] { + constructor( + _pushActivity, + _popActivity, + transactionSpanId, + maxlen, + ) { + super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId;; + } + + /** + * @inheritDoc + */ + add(span) { + // We should make sure we do not push and pop activities for + // the transaction that this span recorder belongs to. + if (span.spanId !== this.transactionSpanId) { + // We patch span.finish() to pop an activity after setting an endTimestamp. + span.finish = (endTimestamp) => { + span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["timestampWithMs"])(); + this._popActivity(span.spanId); + }; + + // We should only push new activities if the span does not have an end timestamp. + if (span.endTimestamp === undefined) { + this._pushActivity(span.spanId); + } + } + + super.add(span); + } +} + +/** + * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities. + * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will + * put itself on the scope on creation. + */ +class IdleTransaction extends _transaction_js__WEBPACK_IMPORTED_MODULE_2__["Transaction"] { + // Activities store a list of active spans + __init() {this.activities = {};} + + // Track state of activities in previous heartbeat + + // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats. + __init2() {this._heartbeatCounter = 0;} + + // We should not use heartbeat if we finished a transaction + __init3() {this._finished = false;} + + __init4() {this._beforeFinishCallbacks = [];} + + /** + * Timer that tracks Transaction idleTimeout + */ + + constructor( + transactionContext, + _idleHub, + /** + * The time to wait in ms until the idle transaction will be finished. This timer is started each time + * there are no active spans on this transaction. + */ + _idleTimeout = DEFAULT_IDLE_TIMEOUT, + /** + * The final value in ms that a transaction cannot exceed + */ + _finalTimeout = DEFAULT_FINAL_TIMEOUT, + _heartbeatInterval = DEFAULT_HEARTBEAT_INTERVAL, + // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends + _onScope = false, + ) { + super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;IdleTransaction.prototype.__init.call(this);IdleTransaction.prototype.__init2.call(this);IdleTransaction.prototype.__init3.call(this);IdleTransaction.prototype.__init4.call(this);; + + if (_onScope) { + // There should only be one active transaction on the scope + clearActiveTransaction(_idleHub); + + // We set the transaction here on the scope so error events pick up the trace + // context and attach it to the error. + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`Setting idle transaction on scope. Span ID: ${this.spanId}`); + _idleHub.configureScope(scope => scope.setSpan(this)); + } + + this._startIdleTimeout(); + setTimeout(() => { + if (!this._finished) { + this.setStatus('deadline_exceeded'); + this.finish(); + } + }, this._finalTimeout); + } + + /** {@inheritDoc} */ + finish(endTimestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["timestampWithMs"])()) { + this._finished = true; + this.activities = {}; + + if (this.spanRecorder) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op); + + for (const callback of this._beforeFinishCallbacks) { + callback(this, endTimestamp); + } + + this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => { + // If we are dealing with the transaction itself, we just return it + if (span.spanId === this.spanId) { + return true; + } + + // We cancel all pending spans with status "cancelled" to indicate the idle transaction was finished early + if (!span.endTimestamp) { + span.endTimestamp = endTimestamp; + span.setStatus('cancelled'); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2)); + } + + const keepSpan = span.startTimestamp < endTimestamp; + if (!keepSpan) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log( + '[Tracing] discarding Span since it happened after Transaction was finished', + JSON.stringify(span, undefined, 2), + ); + } + return keepSpan; + }); + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] flushing IdleTransaction'); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] No active IdleTransaction'); + } + + // if `this._onScope` is `true`, the transaction put itself on the scope when it started + if (this._onScope) { + clearActiveTransaction(this._idleHub); + } + + return super.finish(endTimestamp); + } + + /** + * Register a callback function that gets excecuted before the transaction finishes. + * Useful for cleanup or if you want to add any additional spans based on current context. + * + * This is exposed because users have no other way of running something before an idle transaction + * finishes. + */ + registerBeforeFinishCallback(callback) { + this._beforeFinishCallbacks.push(callback); + } + + /** + * @inheritDoc + */ + initSpanRecorder(maxlen) { + if (!this.spanRecorder) { + const pushActivity = (id) => { + if (this._finished) { + return; + } + this._pushActivity(id); + }; + const popActivity = (id) => { + if (this._finished) { + return; + } + this._popActivity(id); + }; + + this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen); + + // Start heartbeat so that transactions do not run forever. + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('Starting heartbeat'); + this._pingHeartbeat(); + } + this.spanRecorder.add(this); + } + + /** + * Cancels the existing idletimeout, if there is one + */ + _cancelIdleTimeout() { + if (this._idleTimeoutID) { + clearTimeout(this._idleTimeoutID); + this._idleTimeoutID = undefined; + } + } + + /** + * Creates an idletimeout + */ + _startIdleTimeout(endTimestamp) { + this._cancelIdleTimeout(); + this._idleTimeoutID = setTimeout(() => { + if (!this._finished && Object.keys(this.activities).length === 0) { + this.finish(endTimestamp); + } + }, this._idleTimeout); + } + + /** + * Start tracking a specific activity. + * @param spanId The span id that represents the activity + */ + _pushActivity(spanId) { + this._cancelIdleTimeout(); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] pushActivity: ${spanId}`); + this.activities[spanId] = true; + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] new activities count', Object.keys(this.activities).length); + } + + /** + * Remove an activity from usage + * @param spanId The span id that represents the activity + */ + _popActivity(spanId) { + if (this.activities[spanId]) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] popActivity ${spanId}`); + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this.activities[spanId]; + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] new activities count', Object.keys(this.activities).length); + } + + if (Object.keys(this.activities).length === 0) { + // We need to add the timeout here to have the real endtimestamp of the transaction + // Remember timestampWithMs is in seconds, timeout is in ms + const endTimestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["timestampWithMs"])() + this._idleTimeout / 1000; + this._startIdleTimeout(endTimestamp); + } + } + + /** + * Checks when entries of this.activities are not changing for 3 beats. + * If this occurs we finish the transaction. + */ + _beat() { + // We should not be running heartbeat if the idle transaction is finished. + if (this._finished) { + return; + } + + const heartbeatString = Object.keys(this.activities).join(''); + + if (heartbeatString === this._prevHeartbeatString) { + this._heartbeatCounter += 1; + } else { + this._heartbeatCounter = 1; + } + + this._prevHeartbeatString = heartbeatString; + + if (this._heartbeatCounter >= 3) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log('[Tracing] Transaction finished because of no change for 3 heart beats'); + this.setStatus('deadline_exceeded'); + this.finish(); + } else { + this._pingHeartbeat(); + } + } + + /** + * Pings the heartbeat + */ + _pingHeartbeat() { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`); + setTimeout(() => { + this._beat(); + }, this._heartbeatInterval); + } +} + +/** + * Reset transaction on scope to `undefined` + */ +function clearActiveTransaction(hub) { + const scope = hub.getScope(); + if (scope) { + const transaction = scope.getTransaction(); + if (transaction) { + scope.setSpan(undefined); + } + } +} + + +//# sourceMappingURL=idletransaction.js.map + + +/***/ }), + +/***/ "ETne": +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "EW1W": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("3qHZ"); +var document = __webpack_require__("4ESo").document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ "EYYg": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addItemToEnvelope", function() { return addItemToEnvelope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createAttachmentEnvelopeItem", function() { return createAttachmentEnvelopeItem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEnvelope", function() { return createEnvelope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "envelopeItemTypeToDataCategory", function() { return envelopeItemTypeToDataCategory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEachEnvelopeItem", function() { return forEachEnvelopeItem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeEnvelope", function() { return serializeEnvelope; }); +/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7myG"); +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pt+A"); + + + +/** + * Creates an envelope. + * Make sure to always explicitly provide the generic to this function + * so that the envelope types resolve correctly. + */ +function createEnvelope(headers, items = []) { + return [headers, items] ; +} + +/** + * Add an item to an envelope. + * Make sure to always explicitly provide the generic to this function + * so that the envelope types resolve correctly. + */ +function addItemToEnvelope(envelope, newItem) { + const [headers, items] = envelope; + return [headers, [...items, newItem]] ; +} + +/** + * Convenience function to loop through the items and item types of an envelope. + * (This function was mostly created because working with envelope types is painful at the moment) + */ +function forEachEnvelopeItem( + envelope, + callback, +) { + const envelopeItems = envelope[1]; + envelopeItems.forEach((envelopeItem) => { + const envelopeItemType = envelopeItem[0].type; + callback(envelopeItem, envelopeItemType); + }); +} + +function encodeUTF8(input, textEncoder) { + const utf8 = textEncoder || new TextEncoder(); + return utf8.encode(input); +} + +/** + * Serializes an envelope. + */ +function serializeEnvelope(envelope, textEncoder) { + const [envHeaders, items] = envelope; + + // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data + let parts = JSON.stringify(envHeaders); + + function append(next) { + if (typeof parts === 'string') { + parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next]; + } else { + parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next); + } + } + + for (const item of items) { + const [itemHeaders, payload] = item; + + append(`\n${JSON.stringify(itemHeaders)}\n`); + + if (typeof payload === 'string' || payload instanceof Uint8Array) { + append(payload); + } else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch (e) { + // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still + // fails, we try again after normalizing it again with infinite normalization depth. This of course has a + // performance impact but in this case a performance hit is better than throwing. + stringifiedPayload = JSON.stringify(Object(_normalize_js__WEBPACK_IMPORTED_MODULE_0__["normalize"])(payload)); + } + append(stringifiedPayload); + } + } + + return typeof parts === 'string' ? parts : concatBuffers(parts); +} + +function concatBuffers(buffers) { + const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0); + + const merged = new Uint8Array(totalLength); + let offset = 0; + for (const buffer of buffers) { + merged.set(buffer, offset); + offset += buffer.length; + } + + return merged; +} + +/** + * Creates attachment envelope items + */ +function createAttachmentEnvelopeItem( + attachment, + textEncoder, +) { + const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data; + + return [ + Object(_object_js__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({ + type: 'attachment', + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType, + }), + buffer, + ]; +} + +const ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: 'session', + sessions: 'session', + attachment: 'attachment', + transaction: 'transaction', + event: 'error', + client_report: 'internal', + user_report: 'default', +}; + +/** + * Maps the type of an envelope item to a data category. + */ +function envelopeItemTypeToDataCategory(type) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; +} + + +//# sourceMappingURL=envelope.js.map + + +/***/ }), + +/***/ "EftX": +/***/ (function(module, exports) { + +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; + + +/***/ }), + +/***/ "Eg6m": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "deconstructCozyWebLinkWithSlug", { + enumerable: true, + get: function get() { + return _urlHelper.deconstructCozyWebLinkWithSlug; + } +}); +Object.defineProperty(exports, "deconstructRedirectLink", { + enumerable: true, + get: function get() { + return _urlHelper.deconstructRedirectLink; + } +}); +Object.defineProperty(exports, "generateWebLink", { + enumerable: true, + get: function get() { + return _urlHelper.generateWebLink; + } +}); +Object.defineProperty(exports, "ensureFirstSlash", { + enumerable: true, + get: function get() { + return _urlHelper.ensureFirstSlash; + } +}); +Object.defineProperty(exports, "rootCozyUrl", { + enumerable: true, + get: function get() { + return _urlHelper.rootCozyUrl; + } +}); +Object.defineProperty(exports, "InvalidRedirectLinkError", { + enumerable: true, + get: function get() { + return _urlHelper.InvalidRedirectLinkError; + } +}); +Object.defineProperty(exports, "InvalidCozyUrlError", { + enumerable: true, + get: function get() { + return _urlHelper.InvalidCozyUrlError; + } +}); +Object.defineProperty(exports, "InvalidProtocolError", { + enumerable: true, + get: function get() { + return _urlHelper.InvalidProtocolError; + } +}); +Object.defineProperty(exports, "BlockedCozyError", { + enumerable: true, + get: function get() { + return _urlHelper.BlockedCozyError; + } +}); +Object.defineProperty(exports, "dehydrate", { + enumerable: true, + get: function get() { + return _dehydrateHelper.dehydrate; + } +}); + +var _urlHelper = __webpack_require__("GObe"); + +var _dehydrateHelper = __webpack_require__("I3Nk"); + +/***/ }), + +/***/ "EjI+": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__("00OQ"); +var toObject = __webpack_require__("05TQ"); +var IE_PROTO = __webpack_require__("X27e")('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), + +/***/ "El7e": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + padding: 8, + justifyContent: 'flex-end' + }, + + /* Styles applied to the root element if `disableSpacing={false}`. */ + spacing: { + '& > :not(:first-child)': { + marginLeft: 8 + } + } +}; +var AccordionActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function AccordionActions(props, ref) { + var classes = props.classes, + className = props.className, + _props$disableSpacing = props.disableSpacing, + disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "disableSpacing"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, !disableSpacing && classes.spacing), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiAccordionActions' +})(AccordionActions)); + +/***/ }), + +/***/ "EnG4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("AEpG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Avatar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "Ep7C": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportedKeyframes", function() { return supportedKeyframes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportedProperty", function() { return supportedProperty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportedValue", function() { return supportedValue; }); +/* harmony import */ var is_in_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wjhL"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Im6z"); + + + +// Export javascript style and css style vendor prefixes. +var js = ''; +var css = ''; +var vendor = ''; +var browser = ''; +var isTouch = is_in_browser__WEBPACK_IMPORTED_MODULE_0__["default"] && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside. + +if (is_in_browser__WEBPACK_IMPORTED_MODULE_0__["default"]) { + // Order matters. We need to check Webkit the last one because + // other vendors use to add Webkit prefixes to some properties + var jsCssMap = { + Moz: '-moz-', + ms: '-ms-', + O: '-o-', + Webkit: '-webkit-' + }; + + var _document$createEleme = document.createElement('p'), + style = _document$createEleme.style; + + var testProp = 'Transform'; + + for (var key in jsCssMap) { + if (key + testProp in style) { + js = key; + css = jsCssMap[key]; + break; + } + } // Correctly detect the Edge browser. + + + if (js === 'Webkit' && 'msHyphens' in style) { + js = 'ms'; + css = jsCssMap.ms; + browser = 'edge'; + } // Correctly detect the Safari browser. + + + if (js === 'Webkit' && '-apple-trailing-word' in style) { + vendor = 'apple'; + } +} +/** + * Vendor prefix string for the current browser. + * + * @type {{js: String, css: String, vendor: String, browser: String}} + * @api public + */ + + +var prefix = { + js: js, + css: css, + vendor: vendor, + browser: browser, + isTouch: isTouch +}; + +/** + * Test if a keyframe at-rule should be prefixed or not + * + * @param {String} vendor prefix string for the current browser. + * @return {String} + * @api public + */ + +function supportedKeyframes(key) { + // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a' + if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules. + // https://caniuse.com/#search=keyframes + + if (prefix.js === 'ms') return key; + return "@" + prefix.css + "keyframes" + key.substr(10); +} + +// https://caniuse.com/#search=appearance + +var appearence = { + noPrefill: ['appearance'], + supportedProperty: function supportedProperty(prop) { + if (prop !== 'appearance') return false; + if (prefix.js === 'ms') return "-webkit-" + prop; + return prefix.css + prop; + } +}; + +// https://caniuse.com/#search=color-adjust + +var colorAdjust = { + noPrefill: ['color-adjust'], + supportedProperty: function supportedProperty(prop) { + if (prop !== 'color-adjust') return false; + if (prefix.js === 'Webkit') return prefix.css + "print-" + prop; + return prop; + } +}; + +var regExp = /[-\s]+(.)?/g; +/** + * Replaces the letter with the capital letter + * + * @param {String} match + * @param {String} c + * @return {String} + * @api private + */ + +function toUpper(match, c) { + return c ? c.toUpperCase() : ''; +} +/** + * Convert dash separated strings to camel-cased. + * + * @param {String} str + * @return {String} + * @api private + */ + + +function camelize(str) { + return str.replace(regExp, toUpper); +} + +/** + * Convert dash separated strings to pascal cased. + * + * @param {String} str + * @return {String} + * @api private + */ + +function pascalize(str) { + return camelize("-" + str); +} + +// but we can use a longhand property instead. +// https://caniuse.com/#search=mask + +var mask = { + noPrefill: ['mask'], + supportedProperty: function supportedProperty(prop, style) { + if (!/^mask/.test(prop)) return false; + + if (prefix.js === 'Webkit') { + var longhand = 'mask-image'; + + if (camelize(longhand) in style) { + return prop; + } + + if (prefix.js + pascalize(longhand) in style) { + return prefix.css + prop; + } + } + + return prop; + } +}; + +// https://caniuse.com/#search=text-orientation + +var textOrientation = { + noPrefill: ['text-orientation'], + supportedProperty: function supportedProperty(prop) { + if (prop !== 'text-orientation') return false; + + if (prefix.vendor === 'apple' && !prefix.isTouch) { + return prefix.css + prop; + } + + return prop; + } +}; + +// https://caniuse.com/#search=transform + +var transform = { + noPrefill: ['transform'], + supportedProperty: function supportedProperty(prop, style, options) { + if (prop !== 'transform') return false; + + if (options.transform) { + return prop; + } + + return prefix.css + prop; + } +}; + +// https://caniuse.com/#search=transition + +var transition = { + noPrefill: ['transition'], + supportedProperty: function supportedProperty(prop, style, options) { + if (prop !== 'transition') return false; + + if (options.transition) { + return prop; + } + + return prefix.css + prop; + } +}; + +// https://caniuse.com/#search=writing-mode + +var writingMode = { + noPrefill: ['writing-mode'], + supportedProperty: function supportedProperty(prop) { + if (prop !== 'writing-mode') return false; + + if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') { + return prefix.css + prop; + } + + return prop; + } +}; + +// https://caniuse.com/#search=user-select + +var userSelect = { + noPrefill: ['user-select'], + supportedProperty: function supportedProperty(prop) { + if (prop !== 'user-select') return false; + + if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') { + return prefix.css + prop; + } + + return prop; + } +}; + +// https://caniuse.com/#search=multicolumn +// https://github.com/postcss/autoprefixer/issues/491 +// https://github.com/postcss/autoprefixer/issues/177 + +var breakPropsOld = { + supportedProperty: function supportedProperty(prop, style) { + if (!/^break-/.test(prop)) return false; + + if (prefix.js === 'Webkit') { + var jsProp = "WebkitColumn" + pascalize(prop); + return jsProp in style ? prefix.css + "column-" + prop : false; + } + + if (prefix.js === 'Moz') { + var _jsProp = "page" + pascalize(prop); + + return _jsProp in style ? "page-" + prop : false; + } + + return false; + } +}; + +// See https://github.com/postcss/autoprefixer/issues/324. + +var inlineLogicalOld = { + supportedProperty: function supportedProperty(prop, style) { + if (!/^(border|margin|padding)-inline/.test(prop)) return false; + if (prefix.js === 'Moz') return prop; + var newProp = prop.replace('-inline', ''); + return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false; + } +}; + +// Camelization is required because we can't test using. +// CSS syntax for e.g. in FF. + +var unprefixed = { + supportedProperty: function supportedProperty(prop, style) { + return camelize(prop) in style ? prop : false; + } +}; + +var prefixed = { + supportedProperty: function supportedProperty(prop, style) { + var pascalized = pascalize(prop); // Return custom CSS variable without prefixing. + + if (prop[0] === '-') return prop; // Return already prefixed value without prefixing. + + if (prop[0] === '-' && prop[1] === '-') return prop; + if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback. + + if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop; + return false; + } +}; + +// https://caniuse.com/#search=scroll-snap + +var scrollSnap = { + supportedProperty: function supportedProperty(prop) { + if (prop.substring(0, 11) !== 'scroll-snap') return false; + + if (prefix.js === 'ms') { + return "" + prefix.css + prop; + } + + return prop; + } +}; + +// https://caniuse.com/#search=overscroll-behavior + +var overscrollBehavior = { + supportedProperty: function supportedProperty(prop) { + if (prop !== 'overscroll-behavior') return false; + + if (prefix.js === 'ms') { + return prefix.css + "scroll-chaining"; + } + + return prop; + } +}; + +var propMap = { + 'flex-grow': 'flex-positive', + 'flex-shrink': 'flex-negative', + 'flex-basis': 'flex-preferred-size', + 'justify-content': 'flex-pack', + order: 'flex-order', + 'align-items': 'flex-align', + 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin. + +}; // Support old flex spec from 2012. + +var flex2012 = { + supportedProperty: function supportedProperty(prop, style) { + var newProp = propMap[prop]; + if (!newProp) return false; + return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false; + } +}; + +var propMap$1 = { + flex: 'box-flex', + 'flex-grow': 'box-flex', + 'flex-direction': ['box-orient', 'box-direction'], + order: 'box-ordinal-group', + 'align-items': 'box-align', + 'flex-flow': ['box-orient', 'box-direction'], + 'justify-content': 'box-pack' +}; +var propKeys = Object.keys(propMap$1); + +var prefixCss = function prefixCss(p) { + return prefix.css + p; +}; // Support old flex spec from 2009. + + +var flex2009 = { + supportedProperty: function supportedProperty(prop, style, _ref) { + var multiple = _ref.multiple; + + if (propKeys.indexOf(prop) > -1) { + var newProp = propMap$1[prop]; + + if (!Array.isArray(newProp)) { + return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false; + } + + if (!multiple) return false; + + for (var i = 0; i < newProp.length; i++) { + if (!(prefix.js + pascalize(newProp[0]) in style)) { + return false; + } + } + + return newProp.map(prefixCss); + } + + return false; + } +}; + +// plugins = [ +// ...plugins, +// breakPropsOld, +// inlineLogicalOld, +// unprefixed, +// prefixed, +// scrollSnap, +// flex2012, +// flex2009 +// ] +// Plugins without 'noPrefill' value, going last. +// 'flex-*' plugins should be at the bottom. +// 'flex2009' going after 'flex2012'. +// 'prefixed' going after 'unprefixed' + +var plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009]; +var propertyDetectors = plugins.filter(function (p) { + return p.supportedProperty; +}).map(function (p) { + return p.supportedProperty; +}); +var noPrefill = plugins.filter(function (p) { + return p.noPrefill; +}).reduce(function (a, p) { + a.push.apply(a, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(p.noPrefill)); + return a; +}, []); + +var el; +var cache = {}; + +if (is_in_browser__WEBPACK_IMPORTED_MODULE_0__["default"]) { + el = document.createElement('p'); // We test every property on vendor prefix requirement. + // Once tested, result is cached. It gives us up to 70% perf boost. + // http://jsperf.com/element-style-object-access-vs-plain-object + // + // Prefill cache with known css properties to reduce amount of + // properties we need to feature test at runtime. + // http://davidwalsh.name/vendor-prefix + + var computed = window.getComputedStyle(document.documentElement, ''); + + for (var key$1 in computed) { + // eslint-disable-next-line no-restricted-globals + if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1]; + } // Properties that cannot be correctly detected using the + // cache prefill method. + + + noPrefill.forEach(function (x) { + return delete cache[x]; + }); +} +/** + * Test if a property is supported, returns supported property with vendor + * prefix if required. Returns `false` if not supported. + * + * @param {String} prop dash separated + * @param {Object} [options] + * @return {String|Boolean} + * @api public + */ + + +function supportedProperty(prop, options) { + if (options === void 0) { + options = {}; + } + + // For server-side rendering. + if (!el) return prop; // Remove cache for benchmark tests or return property from the cache. + + if ( true && cache[prop] != null) { + return cache[prop]; + } // Check if 'transition' or 'transform' natively supported in browser. + + + if (prop === 'transition' || prop === 'transform') { + options[prop] = prop in el.style; + } // Find a plugin for current prefix property. + + + for (var i = 0; i < propertyDetectors.length; i++) { + cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found. + + if (cache[prop]) break; + } // Reset styles for current property. + // Firefox can even throw an error for invalid properties, e.g., "0". + + + try { + el.style[prop] = ''; + } catch (err) { + return false; + } + + return cache[prop]; +} + +var cache$1 = {}; +var transitionProperties = { + transition: 1, + 'transition-property': 1, + '-webkit-transition': 1, + '-webkit-transition-property': 1 +}; +var transPropsRegExp = /(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g; +var el$1; +/** + * Returns prefixed value transition/transform if needed. + * + * @param {String} match + * @param {String} p1 + * @param {String} p2 + * @return {String} + * @api private + */ + +function prefixTransitionCallback(match, p1, p2) { + if (p1 === 'var') return 'var'; + if (p1 === 'all') return 'all'; + if (p2 === 'all') return ', all'; + var prefixedValue = p1 ? supportedProperty(p1) : ", " + supportedProperty(p2); + if (!prefixedValue) return p1 || p2; + return prefixedValue; +} + +if (is_in_browser__WEBPACK_IMPORTED_MODULE_0__["default"]) el$1 = document.createElement('p'); +/** + * Returns prefixed value if needed. Returns `false` if value is not supported. + * + * @param {String} property + * @param {String} value + * @return {String|Boolean} + * @api public + */ + +function supportedValue(property, value) { + // For server-side rendering. + var prefixedValue = value; + if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'. + // We want only prefixable values here. + // eslint-disable-next-line no-restricted-globals + + if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) { + return prefixedValue; + } // Create cache key for current value. + + + var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache. + + if ( true && cache$1[cacheKey] != null) { + return cache$1[cacheKey]; + } // IE can even throw an error in some cases, for e.g. style.content = 'bar'. + + + try { + // Test value as it is. + el$1.style[property] = prefixedValue; + } catch (err) { + // Return false if value not supported. + cache$1[cacheKey] = false; + return false; + } // If 'transition' or 'transition-property' property. + + + if (transitionProperties[property]) { + prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback); + } else if (el$1.style[property] === '') { + // Value with a vendor prefix. + prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert "flex" to "-ms-flexbox" for IE10. + + if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value. + + el$1.style[property] = prefixedValue; // Return false if value not supported. + + if (el$1.style[property] === '') { + cache$1[cacheKey] = false; + return false; + } + } // Reset styles for current property. + + + el$1.style[property] = ''; // Write current value to cache. + + cache$1[cacheKey] = prefixedValue; + return cache$1[cacheKey]; +} + + + + +/***/ }), + +/***/ "EqEG": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__("05TQ"); +var $keys = __webpack_require__("FFxP"); + +__webpack_require__("80eX")('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), + +/***/ "EzKc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +var Sentry = _interopRequireWildcard(__webpack_require__("5QCN")); +var _tracing = __webpack_require__("zN4E"); +var _Unsubscribe = _interopRequireDefault(__webpack_require__("hHTF")); +var _cozyClient = _interopRequireWildcard(__webpack_require__("xEu0")); +var _cozyDeviceHelper = __webpack_require__("Kv7L"); +var _cozyIntent = __webpack_require__("HROS"); +var _I18n = __webpack_require__("nUfk"); +var _doctypes = _interopRequireDefault(__webpack_require__("rVhO")); +var _lodash = __webpack_require__("nHcj"); +var _react2 = _interopRequireDefault(__webpack_require__("ivGQ")); +var _client = __webpack_require__("iOQm"); +var _environment = _interopRequireDefault(__webpack_require__("/VA8")); +var _cozyBar = _interopRequireDefault(__webpack_require__("JpD3")); +var _logger = _interopRequireDefault(__webpack_require__("DPwE")); +var _manifest = _interopRequireDefault(__webpack_require__("5z4W")); +__webpack_require__("NRdE"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-var-requires */ + +var getToken = function getToken() { + var search = new URLSearchParams(window.location.search); + return search.get('token') || ''; +}; +var setupApp = (0, _lodash.memoize)(function () { + var publicToken = getToken(); + var container = document.querySelector('[role=application]'); + var data = JSON.parse(container.dataset.cozy); + var protocol = window.location.protocol; + var cozyUrl = "".concat(protocol, "//").concat(data.domain); + var locale = 'fr'; + var polyglot = (0, _I18n.initTranslation)(locale, function (lang) { + return __webpack_require__("eUFy")("./".concat(lang)); + }); + var client = new _cozyClient.default({ + uri: cozyUrl, + token: publicToken, + appMetadata: { + slug: _manifest.default.name, + version: _manifest.default.version + }, + schema: _doctypes.default + }); + var envService = new _environment.default(); + var isLocal = envService.isLocal(); + var development = envService.isDev(); + _cozyBar.default.init({ + appName: data.app.name, + appEditor: data.app.editor, + cozyClient: client, + iconPath: data.app.icon, + lang: data.locale, + replaceTitleOnMobile: false, + appSlug: data.app.slug, + appNamePrefix: data.app.prefix, + isInvertedTheme: (0, _cozyDeviceHelper.isFlagshipApp)() + }); + !isLocal && Sentry.init({ + dsn: "https://c868f6010f3f431d95be8f70d7f37666@grandlyon.errors.cozycloud.cc/6", + integrations: [new _tracing.BrowserTracing()], + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for performance monitoring. + // We recommend adjusting this value in production + // Set to 0 for local development + tracesSampleRate: 1.0, + // Custom settings below + release: client.appMetadata.version, + environment: development ? 'development' : 'production' + // cast because init is somehow missing dsn property + }); + + return { + container: container, + client: client, + locale: locale, + polyglot: polyglot + }; +}); +var init = function init() { + var _setupApp = setupApp(), + container = _setupApp.container, + client = _setupApp.client, + locale = _setupApp.locale, + polyglot = _setupApp.polyglot; + var root = (0, _client.createRoot)(container); + root.render( /*#__PURE__*/_react2.default.createElement(_cozyIntent.WebviewIntentProvider, { + setBarContext: _cozyBar.default.setWebviewContext + }, /*#__PURE__*/_react2.default.createElement(_cozyClient.CozyProvider, { + client: client + }, /*#__PURE__*/_react2.default.createElement(_I18n.I18n, { + lang: locale, + polyglot: polyglot + }, /*#__PURE__*/_react2.default.createElement(_Unsubscribe.default, null))))); +}; + +// initial rendering of the application +document.addEventListener('DOMContentLoaded', function () { + return init(); +}); +// excludes Chrome, Edge, and all Android browsers that include the Safari name in their user agent +var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); +if (!isSafari && 'serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker.register('/serviceWorker.js').then(function (reg) { + return console.log('service worker registered', reg.scope); + }).catch(function (error) { + var errorMessage = "service worker not registered: ".concat(JSON.stringify(error)); + _logger.default.error(errorMessage); + Sentry.captureException(errorMessage); + }); + }); +} +if (false) {} + +/***/ }), + +/***/ "F+uF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + display: 'flex', + alignItems: 'center' + }, + + /* Styles applied to the root element if `disableGutters={false}`. */ + gutters: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({ + paddingLeft: theme.spacing(2), + paddingRight: theme.spacing(2) + }, theme.breakpoints.up('sm'), { + paddingLeft: theme.spacing(3), + paddingRight: theme.spacing(3) + }), + + /* Styles applied to the root element if `variant="regular"`. */ + regular: theme.mixins.toolbar, + + /* Styles applied to the root element if `variant="dense"`. */ + dense: { + minHeight: 48 + } + }; +}; +var Toolbar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Toolbar(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disableGutters = props.disableGutters, + disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'regular' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component", "disableGutters", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes[variant], className, !disableGutters && classes.gutters), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiToolbar' +})(Toolbar)); + +/***/ }), + +/***/ "F0EY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("G0lH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _useFormControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("OJkG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useFormControl", function() { return _useFormControl__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + + + + +/***/ }), + +/***/ "F5K7": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.3 Math.acosh(x) +var $export = __webpack_require__("LRPZ"); +var log1p = __webpack_require__("f9kN"); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + + +/***/ }), + +/***/ "FDHv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var inspect = __webpack_require__("6O9A"); + +var IsPropertyKey = __webpack_require__("90jO"); +var Type = __webpack_require__("6qXu"); + +// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p + +module.exports = function Get(O, P) { + // 7.3.1.1 + if (Type(O) !== 'Object') { + throw new $TypeError('Assertion failed: Type(O) is not Object'); + } + // 7.3.1.2 + if (!IsPropertyKey(P)) { + throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); + } + // 7.3.1.3 + return O[P]; +}; + + +/***/ }), + +/***/ "FDZL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q3uU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FilledInput__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "FEoC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var hasSymbols = __webpack_require__("npFJ")(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && false; + }; +} + + +/***/ }), + +/***/ "FFHH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.5 String.prototype.bold() +__webpack_require__("A7oe")('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + + +/***/ }), + +/***/ "FFKy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Q32n"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Link__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "FFd5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_interopNamespaceDefaultOnly", function() { return _interopNamespaceDefaultOnly; }); +/** + * Wrap a module in an object, as the value under the key `default`. + * + * Adapted from Rollup (https://github.com/rollup/rollup) + * + * @param requireResult The result of calling `require` on a module + * @returns An object containing the key-value pair (`default`, `requireResult`) + */ +function _interopNamespaceDefaultOnly(requireResult) { + return { + __proto__: null, + default: requireResult, + }; +} + +// Rollup version +// function _interopNamespaceDefaultOnly(e) { +// return { +// __proto__: null, +// 'default': e +// }; +// } + + +//# sourceMappingURL=_interopNamespaceDefaultOnly.js.map + + +/***/ }), + +/***/ "FFxP": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__("4xNu"); +var enumBugKeys = __webpack_require__("OAwH"); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ "FGj1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var toIObject = __webpack_require__("764U"); +var toInteger = __webpack_require__("HzFX"); +var toLength = __webpack_require__("yhnj"); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__("QLBk")($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + + +/***/ }), + +/***/ "FK5q": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var purple = { + 50: '#f3e5f5', + 100: '#e1bee7', + 200: '#ce93d8', + 300: '#ba68c8', + 400: '#ab47bc', + 500: '#9c27b0', + 600: '#8e24aa', + 700: '#7b1fa2', + 800: '#6a1b9a', + 900: '#4a148c', + A100: '#ea80fc', + A200: '#e040fb', + A400: '#d500f9', + A700: '#aa00ff' +}; +/* harmony default export */ __webpack_exports__["default"] = (purple); + +/***/ }), + +/***/ "FOzr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), + +/***/ "FSf8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SentryError", function() { return SentryError; }); +/** An error emitted by Sentry SDKs and related utilities. */ +class SentryError extends Error { + /** Display name of this error instance. */ + + constructor( message, logLevel = 'warn') { + super(message);this.message = message;; + + this.name = new.target.prototype.constructor.name; + // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line + // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes + // instances of `SentryError` fail `obj instanceof SentryError` checks. + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = logLevel; + } +} + + +//# sourceMappingURL=error.js.map + + +/***/ }), + +/***/ "FWjy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("UPk3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); + + + + + + + + +function mapEventPropToEvent(eventProp) { + return eventProp.substring(2).toLowerCase(); +} + +function clickedRootScrollbar(event) { + return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY; +} +/** + * Listen for click events that occur somewhere in the document, outside of the element itself. + * For instance, if you need to hide a menu when people click anywhere else on your page. + */ + + +function ClickAwayListener(props) { + var children = props.children, + _props$disableReactTr = props.disableReactTree, + disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr, + _props$mouseEvent = props.mouseEvent, + mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent, + onClickAway = props.onClickAway, + _props$touchEvent = props.touchEvent, + touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent; + var movedRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](false); + var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null); + var activatedRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](false); + var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](false); + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + // Ensure that this component is not "activated" synchronously. + // https://github.com/facebook/react/issues/20074 + setTimeout(function () { + activatedRef.current = true; + }, 0); + return function () { + activatedRef.current = false; + }; + }, []); // can be removed once we drop support for non ref forwarding class components + + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (instance) { + // #StrictMode ready + nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"](instance); + }, []); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__["default"])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account: + // + // event.preventDefault() is meant to stop default behaviours like + // clicking a checkbox to check it, hitting a button to submit a form, + // and hitting left arrow to move the cursor in a text input etc. + // Only special HTML elements have these default behaviors. + + var handleClickAway = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__["default"])(function (event) { + // Given developers can stop the propagation of the synthetic event, + // we can only be confident with a positive value. + var insideReactTree = syntheticEventRef.current; + syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind + // 2. The child might render null. + // 3. Behave like a blur listener. + + if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) { + return; + } // Do not act if user performed touchmove + + + if (movedRef.current) { + movedRef.current = false; + return; + } + + var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js + + if (event.composedPath) { + insideDOM = event.composedPath().indexOf(nodeRef.current) > -1; + } else { + // TODO v6 remove dead logic https://caniuse.com/#search=composedPath. + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__["default"])(nodeRef.current); + insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target); + } + + if (!insideDOM && (disableReactTree || !insideReactTree)) { + onClickAway(event); + } + }); // Keep track of mouse/touch events that bubbled up through the portal. + + var createHandleSynthetic = function createHandleSynthetic(handlerName) { + return function (event) { + syntheticEventRef.current = true; + var childrenPropsHandler = children.props[handlerName]; + + if (childrenPropsHandler) { + childrenPropsHandler(event); + } + }; + }; + + var childrenProps = { + ref: handleRef + }; + + if (touchEvent !== false) { + childrenProps[touchEvent] = createHandleSynthetic(touchEvent); + } + + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (touchEvent !== false) { + var mappedTouchEvent = mapEventPropToEvent(touchEvent); + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__["default"])(nodeRef.current); + + var handleTouchMove = function handleTouchMove() { + movedRef.current = true; + }; + + doc.addEventListener(mappedTouchEvent, handleClickAway); + doc.addEventListener('touchmove', handleTouchMove); + return function () { + doc.removeEventListener(mappedTouchEvent, handleClickAway); + doc.removeEventListener('touchmove', handleTouchMove); + }; + } + + return undefined; + }, [handleClickAway, touchEvent]); + + if (mouseEvent !== false) { + childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent); + } + + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (mouseEvent !== false) { + var mappedMouseEvent = mapEventPropToEvent(mouseEvent); + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__["default"])(nodeRef.current); + doc.addEventListener(mappedMouseEvent, handleClickAway); + return function () { + doc.removeEventListener(mappedMouseEvent, handleClickAway); + }; + } + + return undefined; + }, [handleClickAway, mouseEvent]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](children, childrenProps)); +} + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ClickAwayListener); + +/***/ }), + +/***/ "FXPY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("i5Eg"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Popover__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "FXwW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initMetric", function() { return initMetric; }); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+2Xp"); +/* harmony import */ var _generateUniqueID_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOVM"); +/* harmony import */ var _getActivationStart_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pjZ0"); +/* harmony import */ var _getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2UmT"); + + + + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const initMetric = (name, value) => { + const navEntry = Object(_getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_3__["getNavigationEntry"])(); + let navigationType = 'navigate'; + + if (navEntry) { + if (_types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].document.prerendering || Object(_getActivationStart_js__WEBPACK_IMPORTED_MODULE_2__["getActivationStart"])() > 0) { + navigationType = 'prerender'; + } else { + navigationType = navEntry.type.replace(/_/g, '-') ; + } + } + + return { + name, + value: typeof value === 'undefined' ? -1 : value, + rating: 'good', // Will be updated if the value changes. + delta: 0, + entries: [], + id: Object(_generateUniqueID_js__WEBPACK_IMPORTED_MODULE_1__["generateUniqueID"])(), + navigationType, + }; +}; + + +//# sourceMappingURL=initMetric.js.map + + +/***/ }), + +/***/ "FYJV": +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.8 IsRegExp(argument) +var isObject = __webpack_require__("pFmr"); +var cof = __webpack_require__("ARbH"); +var MATCH = __webpack_require__("Yhpl")('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + + +/***/ }), + +/***/ "FZG5": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $map = __webpack_require__("7NDg")(1); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "Fa1r": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__("lFqA") +}); + + +/***/ }), + +/***/ "FaeQ": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'помалку од секунда', + other: 'помалку од {{count}} секунди' + }, + + xSeconds: { + one: '1 секунда', + other: '{{count}} секунди' + }, + + halfAMinute: 'половина минута', + + lessThanXMinutes: { + one: 'помалку од минута', + other: 'помалку од {{count}} минути' + }, + + xMinutes: { + one: '1 минута', + other: '{{count}} минути' + }, + + aboutXHours: { + one: 'околу 1 час', + other: 'околу {{count}} часа' + }, + + xHours: { + one: '1 час', + other: '{{count}} часа' + }, + + xDays: { + one: '1 ден', + other: '{{count}} дена' + }, + + aboutXMonths: { + one: 'околу 1 месец', + other: 'околу {{count}} месеци' + }, + + xMonths: { + one: '1 месец', + other: '{{count}} месеци' + }, + + aboutXYears: { + one: 'околу 1 година', + other: 'околу {{count}} години' + }, + + xYears: { + one: '1 година', + other: '{{count}} години' + }, + + overXYears: { + one: 'повеќе од 1 година', + other: 'повеќе од {{count}} години' + }, + + almostXYears: { + one: 'безмалку 1 година', + other: 'безмалку {{count}} години' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'за ' + result + } else { + return 'пред ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "FiJW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var isProduction = "production" === 'production'; +function warning(condition, message) { + if (!isProduction) { + if (condition) { + return; + } + + var text = "Warning: " + message; + + if (typeof console !== 'undefined') { + console.warn(text); + } + + try { + throw Error(text); + } catch (x) {} + } +} + +/* harmony default export */ __webpack_exports__["default"] = (warning); + + +/***/ }), + +/***/ "Fifr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.12 String.prototype.strike() +__webpack_require__("A7oe")('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + + +/***/ }), + +/***/ "FkRJ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; }); +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +/***/ }), + +/***/ "FlWo": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.9 Math.cbrt(x) +var $export = __webpack_require__("LRPZ"); +var sign = __webpack_require__("7bGD"); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + + +/***/ }), + +/***/ "FoqH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifySubselectors; }); +/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Qvly"); + + +function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + } + } +} + +function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); +} + +/***/ }), + +/***/ "FpGR": +/***/ (function(module, exports) { + +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; + + +/***/ }), + +/***/ "FqJm": +/***/ (function(module, exports, __webpack_require__) { + +var DataView = __webpack_require__("xWNZ"), + Map = __webpack_require__("8CAL"), + Promise = __webpack_require__("hIBh"), + Set = __webpack_require__("rYRw"), + WeakMap = __webpack_require__("Q92J"), + baseGetTag = __webpack_require__("ZwQu"), + toSource = __webpack_require__("zvTh"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; + + +/***/ }), + +/***/ "Frtr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.USERCHALLENGE_DOCTYPE = void 0; +var USERCHALLENGE_DOCTYPE = 'com.grandlyon.ecolyo.userchallenge'; +exports.USERCHALLENGE_DOCTYPE = USERCHALLENGE_DOCTYPE; + +/***/ }), + +/***/ "FsUY": +/***/ (function(module, exports, __webpack_require__) { + +var metaMap = __webpack_require__("kkqC"), + noop = __webpack_require__("JNQl"); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; + + +/***/ }), + +/***/ "Fu1e": +/***/ (function(module, exports, __webpack_require__) { + +var _typeof = __webpack_require__("euUg")["default"]; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { + return { + "default": obj + }; + } + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj["default"] = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; +} + +module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "FyNJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $Array = GetIntrinsic('%Array%'); + +// eslint-disable-next-line global-require +var toStr = !$Array.isArray && __webpack_require__("KqZw")('Object.prototype.toString'); + +module.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === '[object Array]'; +}; + + +/***/ }), + +/***/ "Fyqn": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in English, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] + var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'] + var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] + var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var rem100 = number % 100 + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + 'st' + case 2: + return number + 'nd' + case 3: + return number + 'rd' + } + } + return number + 'th' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "G/0L": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.30 Math.sinh(x) +var $export = __webpack_require__("LRPZ"); +var expm1 = __webpack_require__("2uU8"); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * __webpack_require__("enc5")(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + + +/***/ }), + +/***/ "G/Dp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "light", function() { return light; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dark", function() { return dark; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createPalette; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); +/* harmony import */ var _colors_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("MFz2"); +/* harmony import */ var _colors_grey__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("8Ax9"); +/* harmony import */ var _colors_indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5wjq"); +/* harmony import */ var _colors_pink__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("kobI"); +/* harmony import */ var _colors_red__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("UX0t"); +/* harmony import */ var _colors_orange__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("WOYA"); +/* harmony import */ var _colors_blue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3EGO"); +/* harmony import */ var _colors_green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("CehB"); +/* harmony import */ var _colorManipulator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("PKog"); + + + + + + + + + + + + + +var light = { + // The colors used to style the text. + text: { + // The most important text. + primary: 'rgba(0, 0, 0, 0.87)', + // Secondary text. + secondary: 'rgba(0, 0, 0, 0.54)', + // Disabled text have even lower visual prominence. + disabled: 'rgba(0, 0, 0, 0.38)', + // Text hints. + hint: 'rgba(0, 0, 0, 0.38)' + }, + // The color used to divide different elements. + divider: 'rgba(0, 0, 0, 0.12)', + // The background colors used to style the surfaces. + // Consistency between these values is important. + background: { + paper: _colors_common__WEBPACK_IMPORTED_MODULE_3__["default"].white, + default: _colors_grey__WEBPACK_IMPORTED_MODULE_4__["default"][50] + }, + // The colors used to style the action elements. + action: { + // The color of an active action like an icon button. + active: 'rgba(0, 0, 0, 0.54)', + // The color of an hovered action. + hover: 'rgba(0, 0, 0, 0.04)', + hoverOpacity: 0.04, + // The color of a selected action. + selected: 'rgba(0, 0, 0, 0.08)', + selectedOpacity: 0.08, + // The color of a disabled action. + disabled: 'rgba(0, 0, 0, 0.26)', + // The background color of a disabled action. + disabledBackground: 'rgba(0, 0, 0, 0.12)', + disabledOpacity: 0.38, + focus: 'rgba(0, 0, 0, 0.12)', + focusOpacity: 0.12, + activatedOpacity: 0.12 + } +}; +var dark = { + text: { + primary: _colors_common__WEBPACK_IMPORTED_MODULE_3__["default"].white, + secondary: 'rgba(255, 255, 255, 0.7)', + disabled: 'rgba(255, 255, 255, 0.5)', + hint: 'rgba(255, 255, 255, 0.5)', + icon: 'rgba(255, 255, 255, 0.5)' + }, + divider: 'rgba(255, 255, 255, 0.12)', + background: { + paper: _colors_grey__WEBPACK_IMPORTED_MODULE_4__["default"][800], + default: '#303030' + }, + action: { + active: _colors_common__WEBPACK_IMPORTED_MODULE_3__["default"].white, + hover: 'rgba(255, 255, 255, 0.08)', + hoverOpacity: 0.08, + selected: 'rgba(255, 255, 255, 0.16)', + selectedOpacity: 0.16, + disabled: 'rgba(255, 255, 255, 0.3)', + disabledBackground: 'rgba(255, 255, 255, 0.12)', + disabledOpacity: 0.38, + focus: 'rgba(255, 255, 255, 0.12)', + focusOpacity: 0.12, + activatedOpacity: 0.24 + } +}; + +function addLightOrDark(intent, direction, shade, tonalOffset) { + var tonalOffsetLight = tonalOffset.light || tonalOffset; + var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5; + + if (!intent[direction]) { + if (intent.hasOwnProperty(shade)) { + intent[direction] = intent[shade]; + } else if (direction === 'light') { + intent.light = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__["lighten"])(intent.main, tonalOffsetLight); + } else if (direction === 'dark') { + intent.dark = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__["darken"])(intent.main, tonalOffsetDark); + } + } +} + +function createPalette(palette) { + var _palette$primary = palette.primary, + primary = _palette$primary === void 0 ? { + light: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__["default"][300], + main: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__["default"][500], + dark: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__["default"][700] + } : _palette$primary, + _palette$secondary = palette.secondary, + secondary = _palette$secondary === void 0 ? { + light: _colors_pink__WEBPACK_IMPORTED_MODULE_6__["default"].A200, + main: _colors_pink__WEBPACK_IMPORTED_MODULE_6__["default"].A400, + dark: _colors_pink__WEBPACK_IMPORTED_MODULE_6__["default"].A700 + } : _palette$secondary, + _palette$error = palette.error, + error = _palette$error === void 0 ? { + light: _colors_red__WEBPACK_IMPORTED_MODULE_7__["default"][300], + main: _colors_red__WEBPACK_IMPORTED_MODULE_7__["default"][500], + dark: _colors_red__WEBPACK_IMPORTED_MODULE_7__["default"][700] + } : _palette$error, + _palette$warning = palette.warning, + warning = _palette$warning === void 0 ? { + light: _colors_orange__WEBPACK_IMPORTED_MODULE_8__["default"][300], + main: _colors_orange__WEBPACK_IMPORTED_MODULE_8__["default"][500], + dark: _colors_orange__WEBPACK_IMPORTED_MODULE_8__["default"][700] + } : _palette$warning, + _palette$info = palette.info, + info = _palette$info === void 0 ? { + light: _colors_blue__WEBPACK_IMPORTED_MODULE_9__["default"][300], + main: _colors_blue__WEBPACK_IMPORTED_MODULE_9__["default"][500], + dark: _colors_blue__WEBPACK_IMPORTED_MODULE_9__["default"][700] + } : _palette$info, + _palette$success = palette.success, + success = _palette$success === void 0 ? { + light: _colors_green__WEBPACK_IMPORTED_MODULE_10__["default"][300], + main: _colors_green__WEBPACK_IMPORTED_MODULE_10__["default"][500], + dark: _colors_green__WEBPACK_IMPORTED_MODULE_10__["default"][700] + } : _palette$success, + _palette$type = palette.type, + type = _palette$type === void 0 ? 'light' : _palette$type, + _palette$contrastThre = palette.contrastThreshold, + contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre, + _palette$tonalOffset = palette.tonalOffset, + tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(palette, ["primary", "secondary", "error", "warning", "info", "success", "type", "contrastThreshold", "tonalOffset"]); // Use the same logic as + // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59 + // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54 + + + function getContrastText(background) { + var contrastText = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__["getContrastRatio"])(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary; + + if (false) { var contrast; } + + return contrastText; + } + + var augmentColor = function augmentColor(color) { + var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500; + var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300; + var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700; + color = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, color); + + if (!color.main && color[mainShade]) { + color.main = color[mainShade]; + } + + if (!color.main) { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["formatMuiErrorMessage"])(4, mainShade)); + } + + if (typeof color.main !== 'string') { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["formatMuiErrorMessage"])(5, JSON.stringify(color.main))); + } + + addLightOrDark(color, 'light', lightShade, tonalOffset); + addLightOrDark(color, 'dark', darkShade, tonalOffset); + + if (!color.contrastText) { + color.contrastText = getContrastText(color.main); + } + + return color; + }; + + var types = { + dark: dark, + light: light + }; + + if (false) {} + + var paletteOutput = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["deepmerge"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // A collection of common colors. + common: _colors_common__WEBPACK_IMPORTED_MODULE_3__["default"], + // The palette type, can be light or dark. + type: type, + // The colors used to represent primary interface elements for a user. + primary: augmentColor(primary), + // The colors used to represent secondary interface elements for a user. + secondary: augmentColor(secondary, 'A400', 'A200', 'A700'), + // The colors used to represent interface elements that the user should be made aware of. + error: augmentColor(error), + // The colors used to represent potentially dangerous actions or important messages. + warning: augmentColor(warning), + // The colors used to present information to the user that is neutral and not necessarily important. + info: augmentColor(info), + // The colors used to indicate the successful completion of an action that user triggered. + success: augmentColor(success), + // The grey colors. + grey: _colors_grey__WEBPACK_IMPORTED_MODULE_4__["default"], + // Used by `getContrastText()` to maximize the contrast between + // the background and the text. + contrastThreshold: contrastThreshold, + // Takes a background color and returns the text color that maximizes the contrast. + getContrastText: getContrastText, + // Generate a rich color object. + augmentColor: augmentColor, + // Used by the functions below to shift a color's luminance by approximately + // two indexes within its tonal palette. + // E.g., shift from Red 500 to Red 300 or Red 700. + tonalOffset: tonalOffset + }, types[type]), other); + return paletteOutput; +} + +/***/ }), + +/***/ "G0lH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _InputBase_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("MIMv"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("/iOI"); +/* harmony import */ var _FormControlContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ZrPw"); + + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + flexDirection: 'column', + position: 'relative', + // Reset fieldset default style. + minWidth: 0, + padding: 0, + margin: 0, + border: 0, + verticalAlign: 'top' // Fix alignment issue on Safari. + + }, + + /* Styles applied to the root element if `margin="normal"`. */ + marginNormal: { + marginTop: 16, + marginBottom: 8 + }, + + /* Styles applied to the root element if `margin="dense"`. */ + marginDense: { + marginTop: 8, + marginBottom: 4 + }, + + /* Styles applied to the root element if `fullWidth={true}`. */ + fullWidth: { + width: '100%' + } +}; +/** + * Provides context such as filled/focused/error/required for form inputs. + * Relying on the context provides high flexibility and ensures that the state always stays + * consistent across the children of the `FormControl`. + * This context is used by the following components: + * + * - FormLabel + * - FormHelperText + * - Input + * - InputLabel + * + * You can find one composition example below and more going to [the demos](/components/text-fields/#components). + * + * ```jsx + * <FormControl> + * <InputLabel htmlFor="my-input">Email address</InputLabel> + * <Input id="my-input" aria-describedby="my-helper-text" /> + * <FormHelperText id="my-helper-text">We'll never share your email.</FormHelperText> + * </FormControl> + * ``` + * + * ⚠️Only one input can be used within a FormControl. + */ + +var FormControl = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FormControl(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$error = props.error, + error = _props$error === void 0 ? false : _props$error, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + visuallyFocused = props.focused, + _props$hiddenLabel = props.hiddenLabel, + hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel, + _props$margin = props.margin, + margin = _props$margin === void 0 ? 'none' : _props$margin, + _props$required = props.required, + required = _props$required === void 0 ? false : _props$required, + size = props.size, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "color", "component", "disabled", "error", "fullWidth", "focused", "hiddenLabel", "margin", "required", "size", "variant"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](function () { + // We need to iterate through the children and find the Input in order + // to fully support server-side rendering. + var initialAdornedStart = false; + + if (children) { + react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(children, function (child) { + if (!Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Input', 'Select'])) { + return; + } + + var input = Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Select']) ? child.props.input : child; + + if (input && Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_5__["isAdornedStart"])(input.props)) { + initialAdornedStart = true; + } + }); + } + + return initialAdornedStart; + }), + adornedStart = _React$useState[0], + setAdornedStart = _React$useState[1]; + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](function () { + // We need to iterate through the children and find the Input in order + // to fully support server-side rendering. + var initialFilled = false; + + if (children) { + react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(children, function (child) { + if (!Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Input', 'Select'])) { + return; + } + + if (Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_5__["isFilled"])(child.props, true)) { + initialFilled = true; + } + }); + } + + return initialFilled; + }), + filled = _React$useState2[0], + setFilled = _React$useState2[1]; + + var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + _focused = _React$useState3[0], + setFocused = _React$useState3[1]; + + var focused = visuallyFocused !== undefined ? visuallyFocused : _focused; + + if (disabled && focused) { + setFocused(false); + } + + var registerEffect; + + if (false) { var registeredInput; } + + var onFilled = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + setFilled(true); + }, []); + var onEmpty = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + setFilled(false); + }, []); + var childContext = { + adornedStart: adornedStart, + setAdornedStart: setAdornedStart, + color: color, + disabled: disabled, + error: error, + filled: filled, + focused: focused, + fullWidth: fullWidth, + hiddenLabel: hiddenLabel, + margin: (size === 'small' ? 'dense' : undefined) || margin, + onBlur: function onBlur() { + setFocused(false); + }, + onEmpty: onEmpty, + onFilled: onFilled, + onFocus: function onFocus() { + setFocused(true); + }, + registerEffect: registerEffect, + required: required, + variant: variant + }; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FormControlContext__WEBPACK_IMPORTED_MODULE_9__["default"].Provider, { + value: childContext + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, margin !== 'none' && classes["margin".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(margin))], fullWidth && classes.fullWidth), + ref: ref + }, other), children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiFormControl' +})(FormControl)); + +/***/ }), + +/***/ "G1be": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); + +var _flag = _interopRequireDefault(__webpack_require__("7hLD")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +/** + * Connects a component to the flags. The wrapped component + * will be refreshed when a flag changes. + */ +var connect = function connect(Component) { + var Wrapped = /*#__PURE__*/function (_React$Component) { + (0, _inherits2.default)(Wrapped, _React$Component); + + var _super = _createSuper(Wrapped); + + function Wrapped(props) { + var _this; + + (0, _classCallCheck2.default)(this, Wrapped); + _this = _super.call(this, props); + _this.handleChange = _this.handleChange.bind((0, _assertThisInitialized2.default)(_this)); + return _this; + } + + (0, _createClass2.default)(Wrapped, [{ + key: "componentDidMount", + value: function componentDidMount() { + _flag.default.store.on('change', this.handleChange); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + _flag.default.store.removeListener('change', this.handleChange); + } + }, { + key: "handleChange", + value: function handleChange() { + this.forceUpdate(); + } + }, { + key: "render", + value: function render() { + return /*#__PURE__*/_react.default.createElement(Component, this.props); + } + }]); + return Wrapped; + }(_react.default.Component); + + Wrapped.displayName = "withFlags(".concat(Component.displayName || Component.name, ")"); + return Wrapped; +}; + +var _default = connect; +exports.default = _default; + +/***/ }), + +/***/ "G3H1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var html = __webpack_require__("W53A"); +var cof = __webpack_require__("ARbH"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +var toLength = __webpack_require__("yhnj"); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * __webpack_require__("enc5")(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + + +/***/ }), + +/***/ "G9Pb": +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__("RLfQ"), + cloneDataView = __webpack_require__("Qw2K"), + cloneRegExp = __webpack_require__("jIgY"), + cloneSymbol = __webpack_require__("hzy8"), + cloneTypedArray = __webpack_require__("oAY9"); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; + + +/***/ }), + +/***/ "GA40": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isWebApp = exports.isMobileApp = exports.isMobile = exports.isIOSApp = exports.isIOS = exports.isAndroidApp = exports.isAndroid = exports.getPlatform = void 0; + +var _cordova = __webpack_require__("I/47"); + +var ANDROID_PLATFORM = 'android'; +var IOS_PLATFORM = 'ios'; +var WEB_PLATFORM = 'web'; + +var getPlatform = function getPlatform() { + return (0, _cordova.isCordova)() ? window.cordova.platformId : WEB_PLATFORM; +}; + +exports.getPlatform = getPlatform; + +var isPlatform = function isPlatform(platform) { + return getPlatform() === platform; +}; + +var isIOSApp = function isIOSApp() { + return isPlatform(IOS_PLATFORM); +}; + +exports.isIOSApp = isIOSApp; + +var isAndroidApp = function isAndroidApp() { + return isPlatform(ANDROID_PLATFORM); +}; + +exports.isAndroidApp = isAndroidApp; + +var isWebApp = function isWebApp() { + return isPlatform(WEB_PLATFORM); +}; + +exports.isWebApp = isWebApp; + +var isMobileApp = function isMobileApp() { + return (0, _cordova.isCordova)(); +}; // return if is on an Android Device (native or browser) + + +exports.isMobileApp = isMobileApp; + +var isAndroid = function isAndroid() { + return window.navigator.userAgent && window.navigator.userAgent.indexOf('Android') >= 0; +}; // return if is on an iOS Device (native or browser) + + +exports.isAndroid = isAndroid; + +var isIOS = function isIOS() { + return window.navigator.userAgent && /iPad|iPhone|iPod/.test(window.navigator.userAgent); +}; // isMobile checks if the user is on a smartphone : native app or browser + + +exports.isIOS = isIOS; + +var isMobile = function isMobile() { + return isAndroid() || isIOS(); +}; + +exports.isMobile = isMobile; + +/***/ }), + +/***/ "GCWF": +/***/ (function(module, exports, __webpack_require__) { + +var baseToString = __webpack_require__("xl7M"); + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +module.exports = toString; + + +/***/ }), + +/***/ "GDt/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_TRACE_PROPAGATION_TARGETS", function() { return DEFAULT_TRACE_PROPAGATION_TARGETS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function() { return defaultRequestInstrumentationOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchCallback", function() { return fetchCallback; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instrumentOutgoingRequests", function() { return instrumentOutgoingRequests; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldAttachHeaders", function() { return shouldAttachHeaders; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhrCallback", function() { return xhrCallback; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("VjOD"); + + + +const DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\//]; + +/** Options for Request Instrumentation */ + +const defaultRequestInstrumentationOptions = { + traceFetch: true, + traceXHR: true, + // TODO (v8): Remove this property + tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS, + tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS, +}; + +/** Registers span creators for xhr and fetch requests */ +function instrumentOutgoingRequests(_options) { + // eslint-disable-next-line deprecation/deprecation + const { traceFetch, traceXHR, tracePropagationTargets, tracingOrigins, shouldCreateSpanForRequest } = { + traceFetch: defaultRequestInstrumentationOptions.traceFetch, + traceXHR: defaultRequestInstrumentationOptions.traceXHR, + ..._options, + }; + + const shouldCreateSpan = + typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true; + + // TODO(v8) Remove tracingOrigins here + // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported + // and we don't want to break the API. We can remove it in v8. + const shouldAttachHeadersWithTargets = (url) => + shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins); + + const spans = {}; + + if (traceFetch) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('fetch', (handlerData) => { + fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); + }); + } + + if (traceXHR) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('xhr', (handlerData) => { + xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); + }); + } +} + +/** + * A function that determines whether to attach tracing headers to a request. + * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders. + * We only export this fuction for testing purposes. + */ +function shouldAttachHeaders(url, tracePropagationTargets) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["stringMatchesSomePattern"])(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS); +} + +/** + * Create and track fetch request spans + */ +function fetchCallback( + handlerData, + shouldCreateSpan, + shouldAttachHeaders, + spans, +) { + if (!Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["hasTracingEnabled"])() || !(handlerData.fetchData && shouldCreateSpan(handlerData.fetchData.url))) { + return; + } + + if (handlerData.endTimestamp) { + const spanId = handlerData.fetchData.__span; + if (!spanId) return; + + const span = spans[spanId]; + if (span) { + if (handlerData.response) { + // TODO (kmclb) remove this once types PR goes through + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + span.setHttpStatus(handlerData.response.status); + } else if (handlerData.error) { + span.setStatus('internal_error'); + } + span.finish(); + + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete spans[spanId]; + } + return; + } + + const activeTransaction = Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["getActiveTransaction"])(); + if (activeTransaction) { + const span = activeTransaction.startChild({ + data: { + ...handlerData.fetchData, + type: 'fetch', + }, + description: `${handlerData.fetchData.method} ${handlerData.fetchData.url}`, + op: 'http.client', + }); + + handlerData.fetchData.__span = span.spanId; + spans[span.spanId] = span; + + const request = handlerData.args[0]; + + // In case the user hasn't set the second argument of a fetch call we default it to `{}`. + handlerData.args[1] = handlerData.args[1] || {}; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options = handlerData.args[1]; + + if (shouldAttachHeaders(handlerData.fetchData.url)) { + options.headers = addTracingHeadersToFetchRequest( + request, + activeTransaction.getDynamicSamplingContext(), + span, + options, + ); + + activeTransaction.metadata.propagations += 1; + } + } +} + +function addTracingHeadersToFetchRequest( + request, + dynamicSamplingContext, + span, + options + +, +) { + const sentryBaggageHeader = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dynamicSamplingContextToSentryBaggageHeader"])(dynamicSamplingContext); + const sentryTraceHeader = span.toTraceparent(); + + const headers = + typeof Request !== 'undefined' && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isInstanceOf"])(request, Request) ? (request ).headers : options.headers; + + if (!headers) { + return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader }; + } else if (typeof Headers !== 'undefined' && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isInstanceOf"])(headers, Headers)) { + const newHeaders = new Headers(headers ); + + newHeaders.append('sentry-trace', sentryTraceHeader); + + if (sentryBaggageHeader) { + // If the same header is appended miultiple times the browser will merge the values into a single request header. + // Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. + newHeaders.append(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["BAGGAGE_HEADER_NAME"], sentryBaggageHeader); + } + + return newHeaders ; + } else if (Array.isArray(headers)) { + const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]]; + + if (sentryBaggageHeader) { + // If there are multiple entries with the same key, the browser will merge the values into a single request header. + // Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. + newHeaders.push([_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["BAGGAGE_HEADER_NAME"], sentryBaggageHeader]); + } + + return newHeaders; + } else { + const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined; + const newBaggageHeaders = []; + + if (Array.isArray(existingBaggageHeader)) { + newBaggageHeaders.push(...existingBaggageHeader); + } else if (existingBaggageHeader) { + newBaggageHeaders.push(existingBaggageHeader); + } + + if (sentryBaggageHeader) { + newBaggageHeaders.push(sentryBaggageHeader); + } + + return { + ...(headers ), + 'sentry-trace': sentryTraceHeader, + baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined, + }; + } +} + +/** + * Create and track xhr request spans + */ +function xhrCallback( + handlerData, + shouldCreateSpan, + shouldAttachHeaders, + spans, +) { + if ( + !Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["hasTracingEnabled"])() || + (handlerData.xhr && handlerData.xhr.__sentry_own_request__) || + !(handlerData.xhr && handlerData.xhr.__sentry_xhr__ && shouldCreateSpan(handlerData.xhr.__sentry_xhr__.url)) + ) { + return; + } + + const xhr = handlerData.xhr.__sentry_xhr__; + + // check first if the request has finished and is tracked by an existing span which should now end + if (handlerData.endTimestamp) { + const spanId = handlerData.xhr.__sentry_xhr_span_id__; + if (!spanId) return; + + const span = spans[spanId]; + if (span) { + span.setHttpStatus(xhr.status_code); + span.finish(); + + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete spans[spanId]; + } + return; + } + + // if not, create a new span to track it + const activeTransaction = Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["getActiveTransaction"])(); + if (activeTransaction) { + const span = activeTransaction.startChild({ + data: { + ...xhr.data, + type: 'xhr', + method: xhr.method, + url: xhr.url, + }, + description: `${xhr.method} ${xhr.url}`, + op: 'http.client', + }); + + handlerData.xhr.__sentry_xhr_span_id__ = span.spanId; + spans[handlerData.xhr.__sentry_xhr_span_id__] = span; + + if (handlerData.xhr.setRequestHeader && shouldAttachHeaders(handlerData.xhr.__sentry_xhr__.url)) { + try { + handlerData.xhr.setRequestHeader('sentry-trace', span.toTraceparent()); + + const dynamicSamplingContext = activeTransaction.getDynamicSamplingContext(); + const sentryBaggageHeader = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dynamicSamplingContextToSentryBaggageHeader"])(dynamicSamplingContext); + + if (sentryBaggageHeader) { + // From MDN: "If this method is called several times with the same header, the values are merged into one single request header." + // We can therefore simply set a baggage header without checking what was there before + // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader + handlerData.xhr.setRequestHeader(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["BAGGAGE_HEADER_NAME"], sentryBaggageHeader); + } + + activeTransaction.metadata.propagations += 1; + } catch (_) { + // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED. + } + } + } +} + + +//# sourceMappingURL=request.js.map + + +/***/ }), + +/***/ "GFvo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "impureFinalPropsSelectorFactory", function() { return impureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pureFinalPropsSelectorFactory", function() { return pureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return finalPropsSelectorFactory; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); +/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("FoqH"); + + +function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + }; +} +function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + }; +} // TODO: Add more comments +// If pure is true, the selector returned by selectorFactory will memoize its results, +// allowing connectAdvanced's shouldComponentUpdate to return false if final +// props have not changed. If false, the selector will always return a new +// object and shouldComponentUpdate will always return true. + +function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (false) {} + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); +} + +/***/ }), + +/***/ "GGD2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.14 String.prototype.sup() +__webpack_require__("A7oe")('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + + +/***/ }), + +/***/ "GGtO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return animate; }); +function easeInOutSin(time) { + return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2; +} + +function animate(property, element, to) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {}; + var _options$ease = options.ease, + ease = _options$ease === void 0 ? easeInOutSin : _options$ease, + _options$duration = options.duration, + duration = _options$duration === void 0 ? 300 : _options$duration; + var start = null; + var from = element[property]; + var cancelled = false; + + var cancel = function cancel() { + cancelled = true; + }; + + var step = function step(timestamp) { + if (cancelled) { + cb(new Error('Animation cancelled')); + return; + } + + if (start === null) { + start = timestamp; + } + + var time = Math.min(1, (timestamp - start) / duration); + element[property] = ease(time) * (to - from) + from; + + if (time >= 1) { + requestAnimationFrame(function () { + cb(null); + }); + return; + } + + requestAnimationFrame(step); + }; + + if (from === to) { + cb(new Error('Element already at target position')); + return cancel; + } + + requestAnimationFrame(step); + return cancel; +} + +/***/ }), + +/***/ "GIvT": +/***/ (function(module, exports) { + +function M() { this._events = {}; } +M.prototype = { + on: function(ev, cb) { + this._events || (this._events = {}); + var e = this._events; + (e[ev] || (e[ev] = [])).push(cb); + return this; + }, + removeListener: function(ev, cb) { + var e = this._events[ev] || [], i; + for(i = e.length-1; i >= 0 && e[i]; i--){ + if(e[i] === cb || e[i].cb === cb) { e.splice(i, 1); } + } + }, + removeAllListeners: function(ev) { + if(!ev) { this._events = {}; } + else { this._events[ev] && (this._events[ev] = []); } + }, + listeners: function(ev) { + return (this._events ? this._events[ev] || [] : []); + }, + emit: function(ev) { + this._events || (this._events = {}); + var args = Array.prototype.slice.call(arguments, 1), i, e = this._events[ev] || []; + for(i = e.length-1; i >= 0 && e[i]; i--){ + e[i].apply(this, args); + } + return this; + }, + when: function(ev, cb) { + return this.once(ev, cb, true); + }, + once: function(ev, cb, when) { + if(!cb) return this; + function c() { + if(!when) this.removeListener(ev, c); + if(cb.apply(this, arguments) && when) this.removeListener(ev, c); + } + c.cb = cb; + this.on(ev, c); + return this; + } +}; +M.mixin = function(dest) { + var o = M.prototype, k; + for (k in o) { + o.hasOwnProperty(k) && (dest.prototype[k] = o[k]); + } +}; +module.exports = M; + + +/***/ }), + +/***/ "GMq6": +/***/ (function(module, exports, __webpack_require__) { + +var freeGlobal = __webpack_require__("XeXG"); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; + + +/***/ }), + +/***/ "GObe": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.rootCozyUrl = exports.InvalidCozyUrlError = exports.BlockedCozyError = exports.InvalidProtocolError = exports.InvalidRedirectLinkError = exports.deconstructRedirectLink = exports.deconstructCozyWebLinkWithSlug = exports.generateWebLink = exports.ensureFirstSlash = void 0; + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _toArray2 = _interopRequireDefault(__webpack_require__("X8hs")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__("2y6E")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +var ensureFirstSlash = function ensureFirstSlash(path) { + if (!path) { + return '/'; + } else { + return path.startsWith('/') ? path : '/' + path; + } +}; +/** + * generateWebLink - Construct a link to a web app + * + * This function does not get its cozy url from a CozyClient instance so it can + * be used to build urls that point to other Cozies than the user's own Cozy. + * This is useful when pointing to the Cozy of the owner of a shared note for + * example. + * + * @param {object} options Object of options + * @param {string} options.cozyUrl Base URL of the cozy, eg. cozy.tools or test.mycozy.cloud + * @param {Array} [options.searchParams] Array of search parameters as [key, value] arrays, eg. ['username', 'bob'] + * @param {string} [options.pathname] Path to a specific part of the app, eg. /public + * @param {string} [options.hash] Path inside the app, eg. /files/test.jpg + * @param {string} [options.slug] Slug of the app + * @param {string} [options.subDomainType] Whether the cozy is using flat or nested subdomains. Defaults to flat. + * + * @returns {string} Generated URL + */ + + +exports.ensureFirstSlash = ensureFirstSlash; + +var generateWebLink = function generateWebLink(_ref) { + var cozyUrl = _ref.cozyUrl, + searchParamsOption = _ref.searchParams, + pathname = _ref.pathname, + hash = _ref.hash, + slug = _ref.slug, + subDomainType = _ref.subDomainType; + var searchParams = searchParamsOption || []; + var url = new URL(cozyUrl); + url.host = subDomainType === 'nested' ? "".concat(slug, ".").concat(url.host) : url.host.split('.').map(function (x, i) { + return i === 0 ? x + '-' + slug : x; + }).join('.'); + url.pathname = ensureFirstSlash(pathname); + url.hash = ensureFirstSlash(hash); + + var _iterator = _createForOfIteratorHelper(searchParams), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = (0, _slicedToArray2.default)(_step.value, 2), + param = _step$value[0], + value = _step$value[1]; + + url.searchParams.set(param, value); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return url.toString(); +}; +/** + * Deconstruct the given link in order to retrieve useful data like Cozy's name, domain, or slug + * + * The given link MUST contain a slug + * + * @param {string} webLink - link to deconstruct. It should be a link from a Cozy and containing a slug + * @param {import("../types").SubdomainType} [subDomainType=flat] - whether the cozy is using flat or nested subdomains. + * @returns {import("../types").CozyLinkData} Deconstructed link + */ + + +exports.generateWebLink = generateWebLink; + +var deconstructCozyWebLinkWithSlug = function deconstructCozyWebLinkWithSlug(webLink) { + var subDomainType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flat'; + var url = new URL(webLink); + var slug = subDomainType === 'nested' ? url.host.split('.')[0] : url.host.split('.')[0].split('-')[1]; + var cozyName = subDomainType === 'nested' ? url.host.split('.')[1] : url.host.split('.')[0].split('-')[0]; + var cozyBaseDomain = url.host.split('.').slice(subDomainType === 'nested' ? 2 : 1).join('.'); + return { + cozyBaseDomain: cozyBaseDomain, + cozyName: cozyName, + pathname: url.pathname, + hash: url.hash, + protocol: url.protocol, + searchParams: url.searchParams.toString(), + slug: slug + }; +}; + +exports.deconstructCozyWebLinkWithSlug = deconstructCozyWebLinkWithSlug; + +var isValidSlug = function isValidSlug(slug) { + return slug.match(/^[a-z0-9]+$/); +}; +/** + * Deconstruct the given redirect link in order to retrieve slug, pathname and hash + * + * @param {string} redirectLink - redirect link to deconstruct (i.e. 'drive/public/#/folder/SOME_ID') + * @returns {import("../types").RedirectLinkData} Deconstructed link + * @throws {InvalidRedirectLinkError} Thrown when redirect link is invalid + */ + + +var deconstructRedirectLink = function deconstructRedirectLink(redirectLink) { + var _redirectLink$split = redirectLink.split('#'), + _redirectLink$split2 = (0, _slicedToArray2.default)(_redirectLink$split, 2), + splits = _redirectLink$split2[0], + hash = _redirectLink$split2[1]; + + var _splits$split = splits.split(/\/(.*)/), + _splits$split2 = (0, _slicedToArray2.default)(_splits$split, 2), + slug = _splits$split2[0], + pathname = _splits$split2[1]; + + if (!isValidSlug(slug)) { + throw new InvalidRedirectLinkError(redirectLink); + } + + return { + slug: slug, + pathname: pathname, + hash: hash + }; +}; + +exports.deconstructRedirectLink = deconstructRedirectLink; + +var InvalidRedirectLinkError = /*#__PURE__*/function (_Error) { + (0, _inherits2.default)(InvalidRedirectLinkError, _Error); + + var _super = _createSuper(InvalidRedirectLinkError); + + function InvalidRedirectLinkError(redirectLink) { + var _this; + + (0, _classCallCheck2.default)(this, InvalidRedirectLinkError); + _this = _super.call(this, "Invalid redirect link ".concat(redirectLink)); + _this.redirectLink = redirectLink; + return _this; + } + + return InvalidRedirectLinkError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +exports.InvalidRedirectLinkError = InvalidRedirectLinkError; + +var InvalidProtocolError = /*#__PURE__*/function (_Error2) { + (0, _inherits2.default)(InvalidProtocolError, _Error2); + + var _super2 = _createSuper(InvalidProtocolError); + + function InvalidProtocolError(url) { + var _this2; + + (0, _classCallCheck2.default)(this, InvalidProtocolError); + _this2 = _super2.call(this, "Invalid URL protocol ".concat(url.protocol)); + _this2.url = url; + return _this2; + } + + return InvalidProtocolError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +exports.InvalidProtocolError = InvalidProtocolError; + +var BlockedCozyError = /*#__PURE__*/function (_Error3) { + (0, _inherits2.default)(BlockedCozyError, _Error3); + + var _super3 = _createSuper(BlockedCozyError); + + function BlockedCozyError(url) { + var _this3; + + (0, _classCallCheck2.default)(this, BlockedCozyError); + _this3 = _super3.call(this, "Blocked cozy ".concat(url.toString())); + _this3.url = url; + return _this3; + } + + return BlockedCozyError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +exports.BlockedCozyError = BlockedCozyError; + +var InvalidCozyUrlError = /*#__PURE__*/function (_Error4) { + (0, _inherits2.default)(InvalidCozyUrlError, _Error4); + + var _super4 = _createSuper(InvalidCozyUrlError); + + function InvalidCozyUrlError(url) { + var _this4; + + (0, _classCallCheck2.default)(this, InvalidCozyUrlError); + _this4 = _super4.call(this, "URL ".concat(url.toString(), " does not seem to be a valid Cozy URL")); + _this4.url = url; + return _this4; + } + + return InvalidCozyUrlError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); +/* uri - Returns a well formed URL origin from a protocol, a hostname and a port + * + * If the protocol and/or port are omitted from the argument, the function will + * default to HTTPS and omit the port in the returned origin. + * + * @param {object} url Object of URL elements + * @param {string} url.protocol Protocol to use in the origin (e.g. http) + * @param {string} url.hostname Hostname to use in the origin (e.g. claude.mycozy.cloud) + * @param {string} url.port Port to use in the origin (e.g. 8080) + * + * @returns {string} Generated URL origin + */ + + +exports.InvalidCozyUrlError = InvalidCozyUrlError; + +var uri = function uri(_ref2) { + var protocol = _ref2.protocol, + hostname = _ref2.hostname, + port = _ref2.port; + return (protocol !== '' ? "".concat(protocol, "//") : 'https://') + hostname + (port !== '' ? ":".concat(port) : ''); +}; +/* wellKnownUrl - Returns a valid URL string to a Well Known password change page + * + * The built URL will point to the origin generated from the given protocol, + * hostname and port. + * + * @param {object} url Object of URL elements + * @param {string} url.protocol Protocol to use in the origin (e.g. http) + * @param {string} url.hostname Hostname to use in the origin (e.g. claude.mycozy.cloud) + * @param {string} url.port Port to use in the origin (e.g. 8080) + * + * @returns {string} Generated Well Known password change URL string + */ + + +var wellKnownUrl = function wellKnownUrl(url) { + return uri(url) + '/.well-known/change-password'; +}; +/* isValidOrigin - Checks whether a given URL is a valid Cozy origin + * + * This method tries to fetch the Well Known change password page of the Cozy + * supposedly at the given origin. This allows us to determine whether the given + * origin is the root URL of a Cozy or not via the status of the response: + * - a 200 response status means there's an actual Well Known password change + * page accessible from the given origin so we suppose it's a valid Cozy + * origin (i.e. it could be another site altogether though) + * - a 401 response status means the pointed page requires authentication so the + * origin is probably pointing to a cozy-app. In that case we should consider this + * URL to be invalid + * - a 503 response status with a "Blocked" reason means the pointed page is a Cozy + * but it is blocked. In that case we consider that the url is a valid Cozy origin + * but we want the method to throw as we cannot verify if the URL points to the + * Cozy's root or to a specifc slug. The caller is responsible to handle that exception + * - another status means there aren't any Cozy behind to the given origin + * + * @param {object} url Object of URL elements + * @param {string} url.protocol Protocol to use in the origin (e.g. http) + * @param {string} url.hostname Hostname to use in the origin (e.g. claude.mycozy.cloud) + * @param {string} url.port Port to use in the origin (e.g. 8080) + * + * @returns {Promise<boolean>} True if we believe there's a Cozy behind the given origin + * @throws {InvalidCozyUrlError} Thrown when we know for sure there aren't any Cozy behind the given origin + * @throws {BlockedCozyError} Thrown when we know for sure there is Cozy behind the given origin but it is in a "Blocked" state + */ + + +var isValidOrigin = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) { + var response, status; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return fetch(wellKnownUrl(url)); + + case 2: + response = _context.sent; + status = response.status; + + if (!(status === 404)) { + _context.next = 6; + break; + } + + throw new InvalidCozyUrlError(url); + + case 6: + _context.next = 8; + return isResponseAboutBlockedCozy(response); + + case 8: + if (!_context.sent) { + _context.next = 10; + break; + } + + throw new BlockedCozyError(url); + + case 10: + return _context.abrupt("return", status === 200); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function isValidOrigin(_x) { + return _ref3.apply(this, arguments); + }; +}(); +/** + * rootCozyUrl - Get the root URL of a Cozy from more precise ones + * + * The goal is to allow users to use any URL copied from their browser as their + * Cozy URL rather than trying to explain to them what we expect (e.g. when + * requesting the Cozy URL to connect an app). + * If we can't get the root URL either because there's no Cozy or the domain + * does not exist or anything else, we'll throw an InvalidCozyUrlError. + * Also, since we communicate only via HTTP or HTTPS, we'll throw an + * InvalidProtocolError if any other protocol is used. + * + * This function expects a fully qualified URL thus with a protocol and a valid + * hostname. If your application accepts Cozy intances as input (e.g. `claude` + * when the Cozy can be found at `https://claude.mycozy.cloud`), it is your + * responsibility to add the appropriate domain to the hostname before calling + * this function. + * + * Examples: + * + * 1. getting the root URL when your user gives you its instance name + * + * const userInput = 'claude' + * const rootUrl = await rootCozyUrl(new URL(`https://${userInput}.mycozy.cloud`)) + * // → returns new URL('https://claude.mycozy.cloud') + * + * 2. getting the root URL when your user gives you a Cozy Drive URL + * + * const userInput = 'https://claude-drive.mycozy.cloud/#/folder/io.cozy.files.root-dir' + * const rootUrl = await rootCozyUrl(new URL(userInput)) + * // → returns new URL('https://claude.mycozy.cloud') + * + * 3. getting the root URL when the Cozy uses nested sub-domains + * + * const userInput = 'http://photos.camille.nimbus.com:8080/#/album/1234567890' + * const rootCozyUrl = await rootCozyUrl(new URL(userInput)) + * // → returns new URL('http://camille.nimbus.com:8080') + * + * @param {URL} url The URL from which we'll try to get the root Cozy URL + * + * @returns {Promise<URL>} The root Cozy URL + */ + + +var rootCozyUrl = /*#__PURE__*/function () { + var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(url) { + var _url$hostname$split, _url$hostname$split2, subDomain, domain, _hostname, hostname; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (['http:', 'https:'].includes(url.protocol)) { + _context2.next = 2; + break; + } + + throw new InvalidProtocolError(url); + + case 2: + _context2.next = 4; + return isValidOrigin(url); + + case 4: + if (!_context2.sent) { + _context2.next = 6; + break; + } + + return _context2.abrupt("return", url); + + case 6: + if (!/^[^.-][^.]+-[^.-]+\./.test(url.hostname)) { + _context2.next = 13; + break; + } + + _url$hostname$split = url.hostname.split('.'), _url$hostname$split2 = (0, _toArray2.default)(_url$hostname$split), subDomain = _url$hostname$split2[0], domain = _url$hostname$split2.slice(1); + _hostname = [subDomain.replace(/-.+/, '')].concat((0, _toConsumableArray2.default)(domain)).join('.'); + _context2.next = 11; + return isValidOrigin({ + protocol: url.protocol, + hostname: _hostname, + port: url.port + }); + + case 11: + if (!_context2.sent) { + _context2.next = 13; + break; + } + + return _context2.abrupt("return", new URL(uri({ + protocol: url.protocol, + hostname: _hostname, + port: url.port + }))); + + case 13: + // Try to remove the first sub-domain in case its a nested app name + // eslint-disable-next-line no-unused-vars + hostname = url.hostname.split('.').splice(1).join('.'); + _context2.next = 16; + return isValidOrigin({ + protocol: url.protocol, + hostname: hostname, + port: url.port + }); + + case 16: + if (!_context2.sent) { + _context2.next = 18; + break; + } + + return _context2.abrupt("return", new URL(uri({ + protocol: url.protocol, + hostname: hostname, + port: url.port + }))); + + case 18: + throw new InvalidCozyUrlError(url); + + case 19: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function rootCozyUrl(_x2) { + return _ref4.apply(this, arguments); + }; +}(); +/** + * Check if the given response is about a Cozy being blocked + * + * @param {Response} response - Fetch API response + * @returns {Promise<boolean>} true if the response is about a Cozy being blocked, false otherwize + */ + + +exports.rootCozyUrl = rootCozyUrl; + +var isResponseAboutBlockedCozy = /*#__PURE__*/function () { + var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(response) { + var _data$some; + + var contentType, isJson, data; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (!(response.status !== 503)) { + _context3.next = 2; + break; + } + + return _context3.abrupt("return", false); + + case 2: + contentType = response.headers.get('content-type'); + isJson = contentType && contentType.indexOf('json') >= 0; + _context3.next = 6; + return isJson ? response.json() : response.text(); + + case 6: + data = _context3.sent; + + if (!(data !== null && data !== void 0 && (_data$some = data.some) !== null && _data$some !== void 0 && _data$some.call(data, function (reason) { + return reason.title === 'Blocked'; + }))) { + _context3.next = 9; + break; + } + + return _context3.abrupt("return", true); + + case 9: + return _context3.abrupt("return", false); + + case 10: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function isResponseAboutBlockedCozy(_x3) { + return _ref5.apply(this, arguments); + }; +}(); + +/***/ }), + +/***/ "GOo0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Fab__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("j9ud"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Fab__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "GRrc": +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__("GMq6"); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; + + +/***/ }), + +/***/ "GSeB": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalizeDoc = normalizeDoc; +exports.normalizeDoctype = exports.default = void 0; + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _cozyFlags = _interopRequireDefault(__webpack_require__("8ZpT")); + +var _utils = __webpack_require__("YJcZ"); + +var _uniq = _interopRequireDefault(__webpack_require__("efAt")); + +var _omit = _interopRequireDefault(__webpack_require__("RjO1")); + +var _head = _interopRequireDefault(__webpack_require__("2WYM")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _startsWith = _interopRequireDefault(__webpack_require__("44qC")); + +var _qs = _interopRequireDefault(__webpack_require__("pjsN")); + +var _mangoIndex = __webpack_require__("boOw"); + +var _Collection = _interopRequireWildcard(__webpack_require__("XXj1")); + +var querystring = _interopRequireWildcard(__webpack_require__("uagS")); + +var _errors = __webpack_require__("twUa"); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function _templateObject10() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_design/", "/copy?rev=", ""]); + + _templateObject10 = function _templateObject10() { + return data; + }; + + return data; +} + +function _templateObject9() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_design/", "?rev=", ""]); + + _templateObject9 = function _templateObject9() { + return data; + }; + + return data; +} + +function _templateObject8() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_design_docs?include_docs=true"]); + + _templateObject8 = function _templateObject8() { + return data; + }; + + return data; +} + +function _templateObject7() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_index"]); + + _templateObject7 = function _templateObject7() { + return data; + }; + + return data; +} + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function _templateObject6() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "?rev=", ""]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; +} + +function _templateObject5() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", ""]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; +} + +function _templateObject4() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", ""]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_all_docs?include_docs=true"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_find"]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var DATABASE_DOES_NOT_EXIST = 'Database does not exist.'; +/** + * Normalize a document, adding its doctype if needed + * + * @param {object} doc - Document to normalize + * @param {string} doctype - Document doctype + * @returns {object} normalized document + * @private + */ + +function normalizeDoc() { + var doc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var doctype = arguments.length > 1 ? arguments[1] : undefined; + var id = doc._id || doc.id; + return _objectSpread({ + id: id, + _id: id, + _type: doctype + }, doc); +} + +var prepareForDeletion = function prepareForDeletion(x) { + return Object.assign({}, (0, _omit.default)(x, '_type'), { + _deleted: true + }); +}; +/** + * Abstracts a collection of documents of the same doctype, providing CRUD methods and other helpers. + */ + + +var DocumentCollection = /*#__PURE__*/function () { + function DocumentCollection(doctype, stackClient) { + (0, _classCallCheck2.default)(this, DocumentCollection); + this.doctype = doctype; + this.stackClient = stackClient; + this.indexes = {}; + this.endpoint = "/data/".concat(this.doctype, "/"); + } + /** + * Provides a callback for `Collection.get` + * + * @param {string} doctype - Document doctype + * @returns {Function} (data, response) => normalizedDocument + * using `normalizeDoc` + */ + + + (0, _createClass2.default)(DocumentCollection, [{ + key: "all", + + /** + * Lists all documents of the collection, without filters. + * + * The returned documents are paginated by the stack. + * + * @param {object} options The fetch options: pagination & fetch of specific docs. + * @param {number} [options.limit=100] - Pagination limit + * @param {number} [options.skip=0] - Pagination Skip + * @param {string} [options.bookmark] - Pagination bookmark + * @param {Array<string>} [options.keys] - Keys to query + * @returns {Promise<{data, meta, skip, bookmark, next}>} The JSON API conformant response. + * @throws {FetchError} + */ + value: function () { + var _all = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var _this = this; + + var _ref, + _ref$limit, + limit, + _ref$skip, + skip, + bookmark, + keys, + isUsingAllDocsRoute, + route, + url, + params, + path, + resp, + data, + next, + _args = arguments; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$limit = _ref.limit, limit = _ref$limit === void 0 ? 100 : _ref$limit, _ref$skip = _ref.skip, skip = _ref$skip === void 0 ? 0 : _ref$skip, bookmark = _ref.bookmark, keys = _ref.keys; + // If the limit is intentionnally null, we need to use _all_docs, since + // _normal_docs uses _find and has a hard limit of 1000 + isUsingAllDocsRoute = !!keys || limit === null; + route = isUsingAllDocsRoute ? '_all_docs' : '_normal_docs'; + url = (0, _utils.uri)(_templateObject(), this.doctype, route); + params = { + include_docs: true, + limit: limit, + skip: skip, + keys: keys, + bookmark: bookmark + }; + path = querystring.buildURL(url, params); // If no document of this doctype exist, this route will return a 404, + // so we need to try/catch and return an empty response object in case of a 404 + + _context.prev = 6; + _context.next = 9; + return this.stackClient.fetchJSON('GET', path); + + case 9: + resp = _context.sent; + _context.next = 15; + break; + + case 12: + _context.prev = 12; + _context.t0 = _context["catch"](6); + return _context.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context.t0)); + + case 15: + /* If using `all_docs` we need to filter our design documents and check if + the document is not null. If we use `normal_doc` we can't have any design doc + */ + if (isUsingAllDocsRoute) { + data = resp.rows.filter(function (doc) { + return doc && doc.doc !== null && !doc.error && !(0, _startsWith.default)(doc.id, '_design'); + }).map(function (row) { + return normalizeDoc(row.doc, _this.doctype); + }); + } else { + data = resp.rows.map(function (row) { + return normalizeDoc(row, _this.doctype); + }); + } // The presence of a bookmark doesn’t guarantee that there are more results. + // See https://docs.couchdb.org/en/2.2.0/api/database/find.html#pagination + + + next = bookmark ? resp.rows.length >= limit : skip + resp.rows.length < resp.total_rows; + return _context.abrupt("return", { + data: data, + meta: { + count: isUsingAllDocsRoute ? data.length : resp.total_rows + }, + skip: skip, + bookmark: resp.bookmark, + next: next + }); + + case 18: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[6, 12]]); + })); + + function all() { + return _all.apply(this, arguments); + } + + return all; + }() + /** + * Fetch Documents with Mango + * + * @param {string} path - path to fetch + * @param {MangoSelector} selector - selector + * @param {MangoQueryOptions} options - request options + */ + + }, { + key: "fetchDocumentsWithMango", + value: function () { + var _fetchDocumentsWithMango = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(path, selector) { + var options, + _args2 = arguments; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {}; + return _context2.abrupt("return", this.stackClient.fetchJSON('POST', path, this.toMangoOptions(selector, options))); + + case 2: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function fetchDocumentsWithMango(_x, _x2) { + return _fetchDocumentsWithMango.apply(this, arguments); + } + + return fetchDocumentsWithMango; + }() + /** + * Migrate an existing unamed index to a named one. + * + * Index migration became necessary for optimistic index, because + * we started to use named index while we used to have unamed index, + * i.e. indexes with CouchDB-generated ID. + * + * @param {object} sourceIndex - The index to migrate + * @param {string} targetIndexName - The new index name + * @private + */ + + }, { + key: "migrateUnamedIndex", + value: function () { + var _migrateUnamedIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(sourceIndex, targetIndexName) { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return this.copyIndex(sourceIndex, targetIndexName); + + case 3: + _context3.next = 5; + return this.destroyIndex(sourceIndex); + + case 5: + _context3.next = 16; + break; + + case 7: + _context3.prev = 7; + _context3.t0 = _context3["catch"](0); + + if ((0, _Collection.isDocumentUpdateConflict)(_context3.t0)) { + _context3.next = 11; + break; + } + + throw _context3.t0; + + case 11: + (0, _utils.sleep)(1000); + _context3.next = 14; + return this.copyIndex(sourceIndex, targetIndexName); + + case 14: + _context3.next = 16; + return this.destroyIndex(sourceIndex); + + case 16: + case "end": + return _context3.stop(); + } + } + }, _callee3, this, [[0, 7]]); + })); + + function migrateUnamedIndex(_x3, _x4) { + return _migrateUnamedIndex.apply(this, arguments); + } + + return migrateUnamedIndex; + }() + /** + * Handle index creation if it is missing. + * + * When an index is missing, we first check if there is one with a different + * name but the same definition. If yes, it means we found an old unamed + * index, so we migrate it. If there is none, we create the new index. + * + * @param {object} selector The mango selector + * @param {MangoQueryOptions} options The find options + * @private + */ + + }, { + key: "handleMissingIndex", + value: function () { + var _handleMissingIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(selector, options) { + var indexedFields, partialFilter, partialFilterFields, existingIndex, indexName; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + indexedFields = options.indexedFields, partialFilter = options.partialFilter; + + if (!indexedFields) { + indexedFields = (0, _mangoIndex.getIndexFields)({ + sort: options.sort, + selector: selector + }); + } + + partialFilterFields = partialFilter ? (0, _mangoIndex.getIndexFields)({ + partialFilter: partialFilter + }) : null; + _context4.next = 5; + return this.findExistingIndex(selector, options); + + case 5: + existingIndex = _context4.sent; + indexName = (0, _mangoIndex.getIndexNameFromFields)(indexedFields, { + partialFilterFields: partialFilterFields + }); + + if (existingIndex) { + _context4.next = 12; + break; + } + + _context4.next = 10; + return this.createIndex(indexedFields, { + partialFilter: partialFilter, + indexName: indexName + }); + + case 10: + _context4.next = 18; + break; + + case 12: + if (!(existingIndex._id !== "_design/".concat(indexName))) { + _context4.next = 17; + break; + } + + _context4.next = 15; + return this.migrateUnamedIndex(existingIndex, indexName); + + case 15: + _context4.next = 18; + break; + + case 17: + throw new Error("Index unusable for query, index used: ".concat(indexName)); + + case 18: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function handleMissingIndex(_x5, _x6) { + return _handleMissingIndex.apply(this, arguments); + } + + return handleMissingIndex; + }() + /** + * Find documents with the mango selector and create index + * if missing. + * + * We adopt an optimistic approach for index creation: + * we run the query first, and only if an index missing + * error is returned, the index is created and + * the query run again. + * + * @param {string} path The route path + * @param {MangoSelector} selector The mango selector + * @param {MangoQueryOptions} options The find options + * + * @returns {Promise<object>} - The find response + * @protected + */ + + }, { + key: "findWithMango", + value: function () { + var _findWithMango = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(path, selector) { + var options, + resp, + _resp$meta, + warning, + _args5 = arguments; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {}; + _context5.prev = 1; + _context5.next = 4; + return this.fetchDocumentsWithMango(path, selector, options); + + case 4: + resp = _context5.sent; + warning = resp.warning || ((_resp$meta = resp.meta) === null || _resp$meta === void 0 ? void 0 : _resp$meta.warning); + + if (!(warning && options.partialFilter && (0, _Collection.isIndexNotUsedWarning)(warning))) { + _context5.next = 8; + break; + } + + throw new Error('no_index'); + + case 8: + _context5.next = 21; + break; + + case 10: + _context5.prev = 10; + _context5.t0 = _context5["catch"](1); + + if (!(!(0, _Collection.isIndexNotFoundError)(_context5.t0) && !(0, _Collection.isNoUsableIndexError)(_context5.t0))) { + _context5.next = 16; + break; + } + + throw _context5.t0; + + case 16: + _context5.next = 18; + return this.handleMissingIndex(selector, options); + + case 18: + _context5.next = 20; + return this.fetchDocumentsWithMango(path, selector, options); + + case 20: + resp = _context5.sent; + + case 21: + return _context5.abrupt("return", resp); + + case 22: + case "end": + return _context5.stop(); + } + } + }, _callee5, this, [[1, 10]]); + })); + + function findWithMango(_x7, _x8) { + return _findWithMango.apply(this, arguments); + } + + return findWithMango; + }() + /** + * Returns a filtered list of documents using a Mango selector. + + The returned documents are paginated by the stack. + * + * @param {MangoSelector} selector The Mango selector. + * @param {MangoQueryOptions} options MangoQueryOptions + * @returns {Promise<{data, skip, bookmark, next, execution_stats}>} The JSON API conformant response. + * @throws {FetchError} + */ + + }, { + key: "find", + value: function () { + var _find = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(selector) { + var _this2 = this; + + var options, + _options$skip, + skip, + resp, + path, + _args6 = arguments; + + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {}; + _options$skip = options.skip, skip = _options$skip === void 0 ? 0 : _options$skip; + _context6.prev = 2; + path = (0, _utils.uri)(_templateObject2(), this.doctype); + _context6.next = 6; + return this.findWithMango(path, selector, options); + + case 6: + resp = _context6.sent; + _context6.next = 12; + break; + + case 9: + _context6.prev = 9; + _context6.t0 = _context6["catch"](2); + return _context6.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context6.t0)); + + case 12: + return _context6.abrupt("return", { + data: resp.docs.map(function (doc) { + return normalizeDoc(doc, _this2.doctype); + }), + next: resp.next, + skip: skip, + bookmark: resp.bookmark, + execution_stats: resp.execution_stats + }); + + case 13: + case "end": + return _context6.stop(); + } + } + }, _callee6, this, [[2, 9]]); + })); + + function find(_x9) { + return _find.apply(this, arguments); + } + + return find; + }() + /** + * Returns a filtered list with all documents using a Mango selector, + * automatically fetching more documents if the total of documents is + * superior to the pagination limit. + * Can result in a lot of network requests. + * + The returned documents are paginated by the stack. + * + * @param {MangoSelector} selector The Mango selector. + * @param {MangoQueryOptions} options MangoQueryOptions + * @returns {Promise<Array<{data}>>} Documents fetched + * @throws {FetchError} + */ + + }, { + key: "findAll", + value: function () { + var _findAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(selector) { + var options, + next, + documents, + bookmark, + resp, + _args7 = arguments; + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {}; + next = true; + documents = []; + bookmark = options.bookmark || undefined; + + case 4: + if (!next) { + _context7.next = 13; + break; + } + + _context7.next = 7; + return this.find(selector, _objectSpread(_objectSpread({}, options), {}, { + bookmark: bookmark + })); + + case 7: + resp = _context7.sent; + documents.push.apply(documents, (0, _toConsumableArray2.default)(resp.data)); + bookmark = resp.bookmark; + next = resp.next; + _context7.next = 4; + break; + + case 13: + return _context7.abrupt("return", documents); + + case 14: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function findAll(_x10) { + return _findAll.apply(this, arguments); + } + + return findAll; + }() + /** + * Get a document by id + * + * @param {string} id The document id. + * @returns {Promise<object>} JsonAPI response containing normalized document as data attribute + */ + + }, { + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(id) { + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", _Collection.default.get(this.stackClient, "".concat(this.endpoint).concat(encodeURIComponent(id)), { + normalize: this.constructor.normalizeDoctype(this.doctype) + })); + + case 1: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function get(_x11) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * Get many documents by id + */ + + }, { + key: "getAll", + value: function () { + var _getAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(ids) { + var _this3 = this; + + var resp, rows; + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.prev = 0; + _context9.next = 3; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject3(), this.doctype), { + keys: ids + }); + + case 3: + resp = _context9.sent; + _context9.next = 9; + break; + + case 6: + _context9.prev = 6; + _context9.t0 = _context9["catch"](0); + return _context9.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context9.t0)); + + case 9: + rows = resp.rows.filter(function (row) { + return row.doc; + }); + return _context9.abrupt("return", { + data: rows.map(function (row) { + return normalizeDoc(row.doc, _this3.doctype); + }), + meta: { + count: rows.length + } + }); + + case 11: + case "end": + return _context9.stop(); + } + } + }, _callee9, this, [[0, 6]]); + })); + + function getAll(_x12) { + return _getAll.apply(this, arguments); + } + + return getAll; + }() + /** + * Creates a document + * + * @param {object} doc - Document to create. Optional: you can force the id with the _id attribute + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(_ref2) { + var _id, _type, document, hasFixedId, method, endpoint, resp; + + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _id = _ref2._id, _type = _ref2._type, document = (0, _objectWithoutProperties2.default)(_ref2, ["_id", "_type"]); + // In case of a fixed id, let's use the dedicated creation endpoint + // https://github.com/cozy/cozy-stack/blob/master/docs/data-system.md#create-a-document-with-a-fixed-id + hasFixedId = !!_id; + method = hasFixedId ? 'PUT' : 'POST'; + endpoint = (0, _utils.uri)(_templateObject4(), this.doctype, hasFixedId ? _id : ''); + _context10.next = 6; + return this.stackClient.fetchJSON(method, endpoint, document); + + case 6: + resp = _context10.sent; + return _context10.abrupt("return", { + data: normalizeDoc(resp.data, this.doctype) + }); + + case 8: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function create(_x13) { + return _create.apply(this, arguments); + } + + return create; + }() + /** + * Updates a document + * + * @param {object} document - Document to update. Do not forget the _id attribute + */ + + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(document) { + var resp; + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return this.stackClient.fetchJSON('PUT', (0, _utils.uri)(_templateObject5(), this.doctype, document._id), document); + + case 2: + resp = _context11.sent; + return _context11.abrupt("return", { + data: normalizeDoc(resp.data, this.doctype) + }); + + case 4: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function update(_x14) { + return _update.apply(this, arguments); + } + + return update; + }() + /** + * Destroys a document + * + * @param {object} doc - Document to destroy. Do not forget _id and _rev attributes + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(_ref3) { + var _id, _rev, document, resp; + + return _regenerator.default.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + _id = _ref3._id, _rev = _ref3._rev, document = (0, _objectWithoutProperties2.default)(_ref3, ["_id", "_rev"]); + _context12.next = 3; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject6(), this.doctype, _id, _rev)); + + case 3: + resp = _context12.sent; + return _context12.abrupt("return", { + data: normalizeDoc(_objectSpread(_objectSpread({}, document), {}, { + _id: _id, + _rev: resp.rev, + _deleted: true + }), this.doctype) + }); + + case 5: + case "end": + return _context12.stop(); + } + } + }, _callee12, this); + })); + + function destroy(_x15) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + /** + * Updates several documents in one batch + * + * @param {Document[]} rawDocs Documents to be updated + */ + + }, { + key: "updateAll", + value: function () { + var _updateAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(rawDocs) { + var stackClient, docs, update, firstDoc, resp; + return _regenerator.default.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + stackClient = this.stackClient; + docs = rawDocs ? rawDocs.map(function (d) { + return (0, _omit.default)(d, '_type'); + }) : rawDocs; + + if (!(!docs || !docs.length)) { + _context13.next = 4; + break; + } + + return _context13.abrupt("return", Promise.resolve([])); + + case 4: + _context13.prev = 4; + _context13.next = 7; + return stackClient.fetchJSON('POST', "/data/".concat(this.doctype, "/_bulk_docs"), { + docs: docs + }); + + case 7: + update = _context13.sent; + return _context13.abrupt("return", update); + + case 11: + _context13.prev = 11; + _context13.t0 = _context13["catch"](4); + + if (!(_context13.t0.reason && _context13.t0.reason.reason && _context13.t0.reason.reason === DATABASE_DOES_NOT_EXIST)) { + _context13.next = 24; + break; + } + + _context13.next = 16; + return this.create(docs[0]); + + case 16: + firstDoc = _context13.sent; + _context13.next = 19; + return this.updateAll(docs.slice(1)); + + case 19: + resp = _context13.sent; + resp.unshift({ + ok: true, + id: firstDoc._id, + rev: firstDoc._rev + }); + return _context13.abrupt("return", resp); + + case 24: + throw _context13.t0; + + case 25: + case "end": + return _context13.stop(); + } + } + }, _callee13, this, [[4, 11]]); + })); + + function updateAll(_x16) { + return _updateAll.apply(this, arguments); + } + + return updateAll; + }() + /** + * Deletes several documents in one batch + * + * @param {Document[]} docs - Documents to delete + */ + + }, { + key: "destroyAll", + value: function destroyAll(docs) { + return this.updateAll(docs.map(prepareForDeletion)); + } + /** + * Returns Mango Options from Selector and Options + * + * @param {MangoSelector} selector - Mango selector + * @param {MangoQueryOptions} options - Mango Options + * @returns {MangoQueryOptions} Mango options + */ + + }, { + key: "toMangoOptions", + value: function toMangoOptions(selector) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var sort = options.sort, + indexedFields = options.indexedFields, + partialFilter = options.partialFilter; + var fields = options.fields, + _options$skip2 = options.skip, + skip = _options$skip2 === void 0 ? 0 : _options$skip2, + limit = options.limit, + bookmark = options.bookmark; + sort = (0, _mangoIndex.transformSort)(sort); + + if (!indexedFields && selector) { + _logger.default.warn('Selector fields should be manually indexed to prevent unexpected behaviour'); + } + + indexedFields = indexedFields ? indexedFields : (0, _mangoIndex.getIndexFields)({ + sort: sort, + selector: selector + }); + var partialFilterFields = partialFilter ? (0, _mangoIndex.getIndexFields)({ + partialFilter: partialFilter + }) : null; + var indexName = options.indexId || "_design/".concat((0, _mangoIndex.getIndexNameFromFields)(indexedFields, { + partialFilterFields: partialFilterFields + })); + + if (sort) { + var sortOrders = (0, _uniq.default)(sort.map(function (sortOption) { + return (0, _head.default)(Object.values(sortOption)); + })); + if (sortOrders.length > 1) throw new Error('Mango sort can only use a single order (asc or desc).'); + var sortOrder = sortOrders.length > 0 ? (0, _head.default)(sortOrders) : 'asc'; + + var _iterator = _createForOfIteratorHelper(indexedFields), + _step; + + try { + var _loop = function _loop() { + var field = _step.value; + if (!sort.find(function (sortOption) { + return (0, _head.default)(Object.keys(sortOption)) === field; + })) sort.push((0, _defineProperty2.default)({}, field, sortOrder)); + }; + + for (_iterator.s(); !(_step = _iterator.n()).done;) { + _loop(); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } // We need to pass the partialFilter in the selector, otherwise CouchDB might + // fallback on another index if it does not exist yet + + + var mergedSelector = partialFilter ? (0, _merge.default)(_objectSpread({}, selector), partialFilter) : selector; + return { + selector: mergedSelector, + use_index: indexName, + // TODO: type and class should not be necessary, it's just a temp fix for a stack bug + fields: fields ? [].concat((0, _toConsumableArray2.default)(fields), ['_id', '_type', 'class']) : undefined, + limit: limit, + skip: skip, + bookmark: options.bookmark || bookmark, + sort: sort, + execution_stats: (0, _cozyFlags.default)('debug') ? true : undefined + }; + } + }, { + key: "checkUniquenessOf", + value: function () { + var _checkUniquenessOf = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(property, value) { + var indexId, existingDocs; + return _regenerator.default.wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + _context14.next = 2; + return this.getUniqueIndexId(property); + + case 2: + indexId = _context14.sent; + _context14.next = 5; + return this.find((0, _defineProperty2.default)({}, property, value), { + indexId: indexId, + fields: ['_id'] + }); + + case 5: + existingDocs = _context14.sent; + return _context14.abrupt("return", existingDocs.data.length === 0); + + case 7: + case "end": + return _context14.stop(); + } + } + }, _callee14, this); + })); + + function checkUniquenessOf(_x17, _x18) { + return _checkUniquenessOf.apply(this, arguments); + } + + return checkUniquenessOf; + }() + }, { + key: "getUniqueIndexId", + value: function getUniqueIndexId(property) { + return this.getIndexId([property], { + indexName: "".concat(this.doctype, "/").concat(property) + }); + } + }, { + key: "getIndexId", + value: function () { + var _getIndexId = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(fields, _ref4) { + var _ref4$partialFilter, partialFilter, _ref4$indexName, indexName, index; + + return _regenerator.default.wrap(function _callee15$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + _ref4$partialFilter = _ref4.partialFilter, partialFilter = _ref4$partialFilter === void 0 ? '' : _ref4$partialFilter, _ref4$indexName = _ref4.indexName, indexName = _ref4$indexName === void 0 ? (0, _mangoIndex.getIndexNameFromFields)(fields) : _ref4$indexName; + + if (this.indexes[indexName]) { + _context15.next = 20; + break; + } + + _context15.prev = 2; + _context15.next = 5; + return this.createIndex(fields, { + partialFilter: partialFilter + }); + + case 5: + index = _context15.sent; + _context15.next = 19; + break; + + case 8: + _context15.prev = 8; + _context15.t0 = _context15["catch"](2); + + if ((0, _Collection.isIndexConflictError)(_context15.t0)) { + _context15.next = 14; + break; + } + + throw _context15.t0; + + case 14: + _context15.next = 16; + return (0, _utils.sleep)(1000); + + case 16: + _context15.next = 18; + return this.createIndex(fields, { + partialFilter: partialFilter + }); + + case 18: + index = _context15.sent; + + case 19: + this.indexes[indexName] = index; + + case 20: + return _context15.abrupt("return", this.indexes[indexName].id); + + case 21: + case "end": + return _context15.stop(); + } + } + }, _callee15, this, [[2, 8]]); + })); + + function getIndexId(_x19, _x20) { + return _getIndexId.apply(this, arguments); + } + + return getIndexId; + }() + /** + * + * @param {Array} fields - Fields to index + * @param {object} indexOption - Options for the index + * @param {MangoPartialFilter} [indexOption.partialFilter] - partialFilter + * @param {string} [indexOption.indexName] - indexName + * @returns {Promise<{id, fields}>} + */ + + }, { + key: "createIndex", + value: function () { + var _createIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(fields) { + var _ref5, + partialFilter, + indexName, + indexDef, + resp, + indexResp, + selector, + options, + _args16 = arguments; + + return _regenerator.default.wrap(function _callee16$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + _ref5 = _args16.length > 1 && _args16[1] !== undefined ? _args16[1] : {}, partialFilter = _ref5.partialFilter, indexName = _ref5.indexName; + indexDef = { + index: { + fields: fields + } + }; + + if (indexName) { + indexDef.ddoc = indexName; + } + + if (partialFilter) { + indexDef.index.partial_filter_selector = partialFilter; + } + + _context16.prev = 4; + _context16.next = 7; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject7(), this.doctype), indexDef); + + case 7: + resp = _context16.sent; + _context16.next = 17; + break; + + case 10: + _context16.prev = 10; + _context16.t0 = _context16["catch"](4); + + if ((0, _Collection.isIndexConflictError)(_context16.t0)) { + _context16.next = 16; + break; + } + + throw _context16.t0; + + case 16: + return _context16.abrupt("return"); + + case 17: + indexResp = { + id: resp.id, + fields: fields + }; + + if (!(resp.result === 'exists')) { + _context16.next = 20; + break; + } + + return _context16.abrupt("return", indexResp); + + case 20: + // indexes might not be usable right after being created; so we delay the resolving until they are + selector = {}; + fields.forEach(function (f) { + return selector[f] = { + $gt: null + }; + }); + options = { + indexId: indexResp.id, + limit: 1, + partialFilterFields: partialFilter ? (0, _mangoIndex.getIndexFields)({ + partialFilter: partialFilter + }) : null + }; + _context16.next = 25; + return (0, _utils.attempt)(this.find(selector, options)); + + case 25: + if (!_context16.sent) { + _context16.next = 27; + break; + } + + return _context16.abrupt("return", indexResp); + + case 27: + _context16.next = 29; + return (0, _utils.sleep)(1000); + + case 29: + _context16.next = 31; + return (0, _utils.attempt)(this.find(selector, options)); + + case 31: + if (!_context16.sent) { + _context16.next = 33; + break; + } + + return _context16.abrupt("return", indexResp); + + case 33: + _context16.next = 35; + return (0, _utils.sleep)(500); + + case 35: + return _context16.abrupt("return", indexResp); + + case 36: + case "end": + return _context16.stop(); + } + } + }, _callee16, this, [[4, 10]]); + })); + + function createIndex(_x21) { + return _createIndex.apply(this, arguments); + } + + return createIndex; + }() + /** + * Retrieve all design docs of mango indexes + * + * @returns {Promise<DesignDoc[]>} The design docs + */ + + }, { + key: "fetchAllMangoIndexes", + value: function () { + var _fetchAllMangoIndexes = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() { + var path, indexes; + return _regenerator.default.wrap(function _callee17$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + path = (0, _utils.uri)(_templateObject8(), this.doctype); + _context17.next = 3; + return this.stackClient.fetchJSON('GET', path); + + case 3: + indexes = _context17.sent; + return _context17.abrupt("return", indexes.rows.filter(function (index) { + return index.doc.language === 'query'; + }).map(function (doc) { + return (0, _mangoIndex.normalizeDesignDoc)(doc); + })); + + case 5: + case "end": + return _context17.stop(); + } + } + }, _callee17, this); + })); + + function fetchAllMangoIndexes() { + return _fetchAllMangoIndexes.apply(this, arguments); + } + + return fetchAllMangoIndexes; + }() + /** + * Delete the specified design doc + * + * @param {DesignDoc} index - The design doc to remove + * @returns {Promise<object>} The delete response + */ + + }, { + key: "destroyIndex", + value: function () { + var _destroyIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(index) { + var ddoc, rev, path; + return _regenerator.default.wrap(function _callee18$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + ddoc = index._id.split('/')[1]; + rev = index._rev; + path = (0, _utils.uri)(_templateObject9(), this.doctype, ddoc, rev); + return _context18.abrupt("return", this.stackClient.fetchJSON('DELETE', path)); + + case 4: + case "end": + return _context18.stop(); + } + } + }, _callee18, this); + })); + + function destroyIndex(_x22) { + return _destroyIndex.apply(this, arguments); + } + + return destroyIndex; + }() + /** + * Copy an existing design doc. + * + * This is useful to create a new design doc without + * having to recompute the existing index. + * + * @param {DesignDoc} existingIndex - The design doc to copy + * @param {string} newIndexName - The name of the copy + * @returns {Promise<DesignDoc>} The copy response + */ + + }, { + key: "copyIndex", + value: function () { + var _copyIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(existingIndex, newIndexName) { + var ddoc, rev, path, options; + return _regenerator.default.wrap(function _callee19$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + ddoc = existingIndex._id.split('/')[1]; + rev = existingIndex._rev; + path = (0, _utils.uri)(_templateObject10(), this.doctype, ddoc, rev); + options = { + headers: { + Destination: "_design/".concat(newIndexName) + } + }; + return _context19.abrupt("return", this.stackClient.fetchJSON('POST', path, null, options)); + + case 5: + case "end": + return _context19.stop(); + } + } + }, _callee19, this); + })); + + function copyIndex(_x23, _x24) { + return _copyIndex.apply(this, arguments); + } + + return copyIndex; + }() + /** + * Find an existing mango index based on the query definition + * + * This is useful to avoid creating new indexes having the + * same definition of an existing one. + * + * @param {MangoSelector} selector The query selector + * @param {MangoQueryOptions} options The find options + * + * @returns {Promise<DesignDoc>} A matching index if it exists + * @private + */ + + }, { + key: "findExistingIndex", + value: function () { + var _findExistingIndex = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(selector, options) { + var sort, indexedFields, partialFilter, indexes, fieldsToIndex, existingIndex; + return _regenerator.default.wrap(function _callee20$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + sort = options.sort, indexedFields = options.indexedFields, partialFilter = options.partialFilter; + _context20.next = 3; + return this.fetchAllMangoIndexes(); + + case 3: + indexes = _context20.sent; + + if (!(indexes.length < 1)) { + _context20.next = 6; + break; + } + + return _context20.abrupt("return", null); + + case 6: + sort = (0, _mangoIndex.transformSort)(sort); + fieldsToIndex = indexedFields ? indexedFields : (0, _mangoIndex.getIndexFields)({ + sort: sort, + selector: selector + }); + existingIndex = indexes.find(function (index) { + return (0, _mangoIndex.isMatchingIndex)(index, fieldsToIndex, partialFilter); + }); + return _context20.abrupt("return", existingIndex); + + case 10: + case "end": + return _context20.stop(); + } + } + }, _callee20, this); + })); + + function findExistingIndex(_x25, _x26) { + return _findExistingIndex.apply(this, arguments); + } + + return findExistingIndex; + }() + /** + * Calls _changes route from CouchDB + * No further treatment is done contrary to fetchchanges + * + * @param {object} couchOptions - Couch options for changes https://kutt.it/5r7MNQ + * @param {string} [couchOptions.since] - Bookmark telling CouchDB from which point in time should changes be returned + * @param {Array<string>} [couchOptions.doc_ids] - Only return changes for a subset of documents + * @param {boolean} [couchOptions.includeDocs] - Includes full documents as part of results + * @param {string} [couchOptions.filter] - Filter + * @see https://docs.couchdb.org/en/stable/api/database/changes.html + */ + + }, { + key: "fetchChangesRaw", + value: function () { + var _fetchChangesRaw = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(couchOptions) { + var hasDocIds, urlParams, method, endpoint, params, result; + return _regenerator.default.wrap(function _callee21$(_context21) { + while (1) { + switch (_context21.prev = _context21.next) { + case 0: + hasDocIds = couchOptions.doc_ids && couchOptions.doc_ids.length > 0; + urlParams = "?".concat([_qs.default.stringify(_objectSpread(_objectSpread({}, (0, _omit.default)(couchOptions, ['doc_ids', 'includeDocs'])), {}, { + include_docs: couchOptions.includeDocs + })), hasDocIds && couchOptions.filter === undefined ? 'filter=_doc_ids' : undefined].filter(Boolean).join('&')); + method = hasDocIds ? 'POST' : 'GET'; + endpoint = "/data/".concat(this.doctype, "/_changes").concat(urlParams); + params = hasDocIds ? { + doc_ids: couchOptions.doc_ids + } : undefined; + _context21.next = 7; + return this.stackClient.fetchJSON(method, endpoint, params); + + case 7: + result = _context21.sent; + return _context21.abrupt("return", result); + + case 9: + case "end": + return _context21.stop(); + } + } + }, _callee21, this); + })); + + function fetchChangesRaw(_x27) { + return _fetchChangesRaw.apply(this, arguments); + } + + return fetchChangesRaw; + }() + /** + * Use Couch _changes API + * Deleted and design docs are filtered by default, thus documents are retrieved in the response + * (include_docs is set to true in the parameters of _changes). + * + * You should use fetchChangesRaw to have low level control on _changes parameters. + * + * @param {object} couchOptions - Couch options for changes + * @param {string} [couchOptions.since] - Bookmark telling CouchDB from which point in time should changes be returned + * @param {Array<string>} [couchOptions.doc_ids] - Only return changes for a subset of documents + * + * @param {object} options - Further options on the returned documents. By default, it is set to { includeDesign: false, includeDeleted: false } + * @param {boolean} [options.includeDesign] - Whether to include changes from design docs (needs include_docs to be true) + * @param {boolean} [options.includeDeleted] - Whether to include changes for deleted documents (needs include_docs to be true) + * + * @typedef {object} FetchChangesReturnValue + * @property {string} newLastSeq + * @property {Array<object>} documents + * @returns {Promise<FetchChangesReturnValue>} + */ + + }, { + key: "fetchChanges", + value: function () { + var _fetchChanges = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() { + var _this4 = this; + + var couchOptions, + options, + opts, + result, + newLastSeq, + docs, + _args22 = arguments; + return _regenerator.default.wrap(function _callee22$(_context22) { + while (1) { + switch (_context22.prev = _context22.next) { + case 0: + couchOptions = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {}; + options = _args22.length > 1 && _args22[1] !== undefined ? _args22[1] : {}; + opts = { + // Necessary since we deal with deleted and design docs later + includeDocs: true + }; + + if (typeof couchOptions !== 'object') { + opts.since = couchOptions; + + _logger.default.warn("fetchChanges use couchOptions as Object not a string, since is deprecated, please use fetchChanges({since: \"".concat(couchOptions, "\"}).")); + } else if (Object.keys(couchOptions).length > 0) { + Object.assign(opts, couchOptions); + } + + _context22.next = 6; + return this.fetchChangesRaw(opts); + + case 6: + result = _context22.sent; + newLastSeq = result.last_seq; + docs = result.results.map(function (x) { + return x.doc; + }).filter(Boolean); + + if (!options.includeDesign) { + docs = docs.filter(function (doc) { + return doc._id.indexOf('_design') !== 0; + }); + } + + if (!options.includeDeleted) { + docs = docs.filter(function (doc) { + return !doc._deleted; + }); + } + + return _context22.abrupt("return", { + newLastSeq: newLastSeq, + documents: docs.map(function (doc) { + return normalizeDoc(doc, _this4.doctype); + }) + }); + + case 12: + case "end": + return _context22.stop(); + } + } + }, _callee22, this); + })); + + function fetchChanges() { + return _fetchChanges.apply(this, arguments); + } + + return fetchChanges; + }() + }], [{ + key: "normalizeDoctype", + value: function normalizeDoctype(doctype) { + return this.normalizeDoctypeRawApi(doctype); + } + /** + * `normalizeDoctype` for api end points returning json api responses + * + * @private + * @param {string} doctype - Document doctype + * @returns {Function} (data, response) => normalizedDocument + * using `normalizeDoc` + */ + + }, { + key: "normalizeDoctypeJsonApi", + value: function normalizeDoctypeJsonApi(doctype) { + return function (data, response) { + // use the "data" attribute of the response + return normalizeDoc(data, doctype); + }; + } + /** + * `normalizeDoctype` for api end points returning raw documents + * + * @private + * @param {string} doctype - Document doctype + * @returns {Function} (data, response) => normalizedDocument + * using `normalizeDoc` + */ + + }, { + key: "normalizeDoctypeRawApi", + value: function normalizeDoctypeRawApi(doctype) { + return function (data, response) { + // use the response directly + return normalizeDoc(response, doctype); + }; + } + }]); + return DocumentCollection; +}(); + +var _default = DocumentCollection; +exports.default = _default; +var normalizeDoctype = DocumentCollection.normalizeDoctype; +exports.normalizeDoctype = normalizeDoctype; + +/***/ }), + +/***/ "GV8L": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifyPlainObject; }); +/* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BO+l"); +/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("uEAC"); + + +function verifyPlainObject(value, displayName, methodName) { + if (!Object(_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { + Object(_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} + +/***/ }), + +/***/ "GX2+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__("fyVG"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bigint: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), + +/***/ "GXOL": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro'] + var monthsFull = ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'] + var monthsGenitive = ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenog', 'prosinca'] + var weekdays2char = ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'] + var weekdays3char = ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'] + var weekdaysFull = ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'] + var meridiemUppercase = ['ujutro', 'popodne'] + var meridiemLowercase = ['ujutro', 'popodne'] + var meridiemFull = ['ujutro', 'popodne'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + // Generate formatters like 'D MMMM', where the month is in the genitive case + var monthsGenitiveFormatters = ['D', 'Do', 'DD'] + monthsGenitiveFormatters.forEach(function (formatterToken) { + formatters[formatterToken + ' MMM'] = function (date, commonFormatters) { + var formatter = formatters[formatterToken] || commonFormatters[formatterToken] + return formatter(date, commonFormatters) + ' ' + monthsGenitive[date.getMonth()] + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "GXf6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("qSOI"); + + + + + + + + + + +var styles = function styles(theme) { + var _extends2; + + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.typography.button, (_extends2 = { + maxWidth: 264, + minWidth: 72, + position: 'relative', + boxSizing: 'border-box', + minHeight: 48, + flexShrink: 0, + padding: '6px 12px' + }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_extends2, theme.breakpoints.up('sm'), { + padding: '6px 24px' + }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_extends2, "overflow", 'hidden'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_extends2, "whiteSpace", 'normal'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_extends2, "textAlign", 'center'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(_extends2, theme.breakpoints.up('sm'), { + minWidth: 160 + }), _extends2)), + + /* Styles applied to the root element if both `icon` and `label` are provided. */ + labelIcon: { + minHeight: 72, + paddingTop: 9, + '& $wrapper > *:first-child': { + marginBottom: 6 + } + }, + + /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="inherit"`. */ + textColorInherit: { + color: 'inherit', + opacity: 0.7, + '&$selected': { + opacity: 1 + }, + '&$disabled': { + opacity: 0.5 + } + }, + + /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="primary"`. */ + textColorPrimary: { + color: theme.palette.text.secondary, + '&$selected': { + color: theme.palette.primary.main + }, + '&$disabled': { + color: theme.palette.text.disabled + } + }, + + /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor="secondary"`. */ + textColorSecondary: { + color: theme.palette.text.secondary, + '&$selected': { + color: theme.palette.secondary.main + }, + '&$disabled': { + color: theme.palette.text.disabled + } + }, + + /* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */ + selected: {}, + + /* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */ + disabled: {}, + + /* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */ + fullWidth: { + flexShrink: 1, + flexGrow: 1, + flexBasis: 0, + maxWidth: 'none' + }, + + /* Styles applied to the root element if `wrapped={true}`. */ + wrapped: { + fontSize: theme.typography.pxToRem(12), + lineHeight: 1.5 + }, + + /* Styles applied to the `icon` and `label`'s wrapper element. */ + wrapper: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + width: '100%', + flexDirection: 'column' + } + }; +}; +var Tab = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Tab(props, ref) { + var classes = props.classes, + className = props.className, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableFocusRi = props.disableFocusRipple, + disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, + fullWidth = props.fullWidth, + icon = props.icon, + indicator = props.indicator, + label = props.label, + onChange = props.onChange, + onClick = props.onClick, + onFocus = props.onFocus, + selected = props.selected, + selectionFollowsFocus = props.selectionFollowsFocus, + _props$textColor = props.textColor, + textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor, + value = props.value, + _props$wrapped = props.wrapped, + wrapped = _props$wrapped === void 0 ? false : _props$wrapped, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["classes", "className", "disabled", "disableFocusRipple", "fullWidth", "icon", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"]); + + var handleClick = function handleClick(event) { + if (onChange) { + onChange(event, value); + } + + if (onClick) { + onClick(event); + } + }; + + var handleFocus = function handleFocus(event) { + if (selectionFollowsFocus && !selected && onChange) { + onChange(event, value); + } + + if (onFocus) { + onFocus(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + focusRipple: !disableFocusRipple, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes["textColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped), + ref: ref, + role: "tab", + "aria-selected": selected, + disabled: disabled, + onClick: handleClick, + onFocus: handleFocus, + tabIndex: selected ? 0 : -1 + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { + className: classes.wrapper + }, icon, label), indicator); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiTab' +})(Tab)); + +/***/ }), + +/***/ "GZTL": +/***/ (function(module, exports, __webpack_require__) { + +var setPrototypeOf = __webpack_require__("4dPT"); + +var isNativeReflectConstruct = __webpack_require__("8eMP"); + +function _construct(Parent, args, Class) { + if (isNativeReflectConstruct()) { + module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; + } else { + module.exports = _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) setPrototypeOf(instance, Class.prototype); + return instance; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + } + + return _construct.apply(null, arguments); +} + +module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "GeFe": +/***/ (function(module, exports) { + +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "GlOB": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__("GwHQ").f; +var create = __webpack_require__("7wnO"); +var redefineAll = __webpack_require__("UDoN"); +var ctx = __webpack_require__("DnF+"); +var anInstance = __webpack_require__("/Ytg"); +var forOf = __webpack_require__("QTPW"); +var $iterDefine = __webpack_require__("Qpz8"); +var step = __webpack_require__("2rqr"); +var setSpecies = __webpack_require__("iaIa"); +var DESCRIPTORS = __webpack_require__("WXXH"); +var fastKey = __webpack_require__("h/ey").fastKey; +var validate = __webpack_require__("LEB8"); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), + +/***/ "GmYb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("F0EY"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fY06"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("fWYq"); + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + alignItems: 'center', + cursor: 'pointer', + // For correct alignment with the text. + verticalAlign: 'middle', + WebkitTapHighlightColor: 'transparent', + marginLeft: -11, + marginRight: 16, + // used for row presentation of radio/checkbox + '&$disabled': { + cursor: 'default' + } + }, + + /* Styles applied to the root element if `labelPlacement="start"`. */ + labelPlacementStart: { + flexDirection: 'row-reverse', + marginLeft: 16, + // used for row presentation of radio/checkbox + marginRight: -11 + }, + + /* Styles applied to the root element if `labelPlacement="top"`. */ + labelPlacementTop: { + flexDirection: 'column-reverse', + marginLeft: 16 + }, + + /* Styles applied to the root element if `labelPlacement="bottom"`. */ + labelPlacementBottom: { + flexDirection: 'column', + marginLeft: 16 + }, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the label's Typography component. */ + label: { + '&$disabled': { + color: theme.palette.text.disabled + } + } + }; +}; +/** + * Drop in replacement of the `Radio`, `Switch` and `Checkbox` component. + * Use this component if you want to display an extra label. + */ + +var FormControlLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FormControlLabel(props, ref) { + var checked = props.checked, + classes = props.classes, + className = props.className, + control = props.control, + disabledProp = props.disabled, + inputRef = props.inputRef, + label = props.label, + _props$labelPlacement = props.labelPlacement, + labelPlacement = _props$labelPlacement === void 0 ? 'end' : _props$labelPlacement, + name = props.name, + onChange = props.onChange, + value = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["checked", "classes", "className", "control", "disabled", "inputRef", "label", "labelPlacement", "name", "onChange", "value"]); + + var muiFormControl = Object(_FormControl__WEBPACK_IMPORTED_MODULE_6__["useFormControl"])(); + var disabled = disabledProp; + + if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') { + disabled = control.props.disabled; + } + + if (typeof disabled === 'undefined' && muiFormControl) { + disabled = muiFormControl.disabled; + } + + var controlProps = { + disabled: disabled + }; + ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(function (key) { + if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') { + controlProps[key] = props[key]; + } + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("label", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, labelPlacement !== 'end' && classes["labelPlacement".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__["default"])(labelPlacement))], disabled && classes.disabled), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](control, controlProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_8__["default"], { + component: "span", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.label, disabled && classes.disabled) + }, label)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiFormControlLabel' +})(FormControlLabel)); + +/***/ }), + +/***/ "Gn8h": +/***/ (function(module, exports) { + +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; + + +/***/ }), + +/***/ "GndU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/***/ }), + +/***/ "GsEq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Usage = exports.Season = exports.Room = exports.EquipmentType = exports.EcogestureTab = void 0; +var Usage; +exports.Usage = Usage; +(function (Usage) { + Usage[Usage["ALL"] = 0] = "ALL"; + Usage[Usage["HEATING"] = 1] = "HEATING"; + Usage[Usage["AIR_CONDITIONING"] = 2] = "AIR_CONDITIONING"; + Usage[Usage["ECS"] = 3] = "ECS"; + Usage[Usage["COLD_WATER"] = 4] = "COLD_WATER"; + Usage[Usage["ELECTRICITY_SPECIFIC"] = 5] = "ELECTRICITY_SPECIFIC"; + Usage[Usage["COOKING"] = 6] = "COOKING"; +})(Usage || (exports.Usage = Usage = {})); +var Room; +exports.Room = Room; +(function (Room) { + Room[Room["ALL"] = 0] = "ALL"; + Room[Room["BATHROOM"] = 1] = "BATHROOM"; + Room[Room["KITCHEN"] = 2] = "KITCHEN"; + Room[Room["LAUNDRY"] = 3] = "LAUNDRY"; + Room[Room["TOILET"] = 4] = "TOILET"; +})(Room || (exports.Room = Room = {})); +var Season; +exports.Season = Season; +(function (Season) { + Season["NONE"] = "Sans saison"; + Season["WINTER"] = "Hiver"; + Season["SUMMER"] = "Et\xE9"; +})(Season || (exports.Season = Season = {})); +var EquipmentType; +exports.EquipmentType = EquipmentType; +(function (EquipmentType) { + EquipmentType["AIR_CONDITIONING"] = "AIR_CONDITIONING"; + EquipmentType["COMPUTER"] = "COMPUTER"; + EquipmentType["MICROWAVE"] = "MICROWAVE"; + EquipmentType["WASHING_MACHINE"] = "WASHING_MACHINE"; + EquipmentType["DISHWASHER"] = "DISHWASHER"; + EquipmentType["COOKING_PLATES"] = "COOKING_PLATES"; + EquipmentType["DRYER"] = "DRYER"; + EquipmentType["REFREGIRATOR"] = "REFREGIRATOR"; + EquipmentType["FAN"] = "FAN"; + EquipmentType["CURTAIN"] = "CURTAIN"; + EquipmentType["INTERNET_BOX"] = "INTERNET_BOX"; + EquipmentType["VENTILATION"] = "VENTILATION"; + EquipmentType["FREEZER"] = "FREEZER"; + EquipmentType["BOILER"] = "BOILER"; + EquipmentType["HYDRAULIC_HEATING"] = "HYDRAULIC_HEATING"; +})(EquipmentType || (exports.EquipmentType = EquipmentType = {})); +var EcogestureTab; +exports.EcogestureTab = EcogestureTab; +(function (EcogestureTab) { + EcogestureTab[EcogestureTab["OBJECTIVE"] = 0] = "OBJECTIVE"; + EcogestureTab[EcogestureTab["DOING"] = 1] = "DOING"; + EcogestureTab[EcogestureTab["ALL"] = 2] = "ALL"; +})(EcogestureTab || (exports.EcogestureTab = EcogestureTab = {})); + +/***/ }), + +/***/ "GuUT": +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__("DnF+"); +var invoke = __webpack_require__("WjuR"); +var html = __webpack_require__("W53A"); +var cel = __webpack_require__("aKmJ"); +var global = __webpack_require__("ETne"); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__("ARbH")(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + + +/***/ }), + +/***/ "Guny": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ButtonGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+6w6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ButtonGroup__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "GwHQ": +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__("eckd"); +var IE8_DOM_DEFINE = __webpack_require__("vBoz"); +var toPrimitive = __webpack_require__("Tven"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__("WXXH") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "H1Bs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M7 10l5 5 5-5z" +}), 'ArrowDropDown')); + +/***/ }), + +/***/ "H34K": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jaz0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "H360": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "legacy_createStore", function() { return legacy_createStore; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6ORS"); + + +/** + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js + * + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes + * during build. + * @param {number} code + */ +function formatProdErrorMessage(code) { + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; +} + +// Inlined version of the `symbol-observable` polyfill +var $$observable = (function () { + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; +})(); + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var randomString = function randomString() { + return Math.random().toString(36).substring(7).split('').join('.'); +}; + +var ActionTypes = { + INIT: "@@redux/INIT" + randomString(), + REPLACE: "@@redux/REPLACE" + randomString(), + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); + } +}; + +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = obj; + + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(obj) === proto; +} + +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of +function miniKindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + var type = typeof val; + + switch (type) { + case 'boolean': + case 'string': + case 'number': + case 'symbol': + case 'function': + { + return type; + } + } + + if (Array.isArray(val)) return 'array'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + var constructorName = ctorName(val); + + switch (constructorName) { + case 'Symbol': + case 'Promise': + case 'WeakMap': + case 'WeakSet': + case 'Map': + case 'Set': + return constructorName; + } // other + + + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +} + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isError(val) { + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; +} + +function kindOf(val) { + var typeOfVal = typeof val; + + if (false) {} + + return typeOfVal; +} + +/** + * @deprecated + * + * **We recommend using the `configureStore` method + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. + * + * Redux Toolkit is our recommended approach for writing Redux logic today, + * including store setup, reducers, data fetching, and more. + * + * **For more details, please read this Redux docs page:** + * **https://redux.js.org/introduction/why-rtk-is-redux-today** + * + * `configureStore` from Redux Toolkit is an improved version of `createStore` that + * simplifies setup and helps avoid common bugs. + * + * You should not be using the `redux` core package by itself today, except for learning purposes. + * The `createStore` method from the core `redux` package will not be removed, but we encourage + * all users to migrate to using Redux Toolkit for all Redux code. + * + * If you want to use `createStore` without this visual deprecation warning, use + * the `legacy_createStore` import instead: + * + * `import { legacy_createStore as createStore} from 'redux'` + * + */ + +function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { + throw new Error( true ? formatProdErrorMessage(0) : undefined); + } + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error( true ? formatProdErrorMessage(1) : undefined); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(2) : undefined); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + /** + * This makes a shallow copy of currentListeners so we can use + * nextListeners as a temporary list while dispatching. + * + * This prevents any bugs around consumers calling + * subscribe/unsubscribe in the middle of a dispatch. + */ + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + + + function getState() { + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(3) : undefined); + } + + return currentState; + } + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + + + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error( true ? formatProdErrorMessage(4) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(5) : undefined); + } + + var isSubscribed = true; + ensureCanMutateNextListeners(); + nextListeners.push(listener); + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(6) : undefined); + } + + isSubscribed = false; + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + currentListeners = null; + }; + } + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + + + function dispatch(action) { + if (!isPlainObject(action)) { + throw new Error( true ? formatProdErrorMessage(7) : undefined); + } + + if (typeof action.type === 'undefined') { + throw new Error( true ? formatProdErrorMessage(8) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(9) : undefined); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + + + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(10) : undefined); + } + + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. + // Any reducers that existed in both the new and old rootReducer + // will receive the previous state. This effectively populates + // the new state tree with any relevant data from the old one. + + dispatch({ + type: ActionTypes.REPLACE + }); + } + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + + + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object' || observer === null) { + throw new Error( true ? formatProdErrorMessage(11) : undefined); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { + unsubscribe: unsubscribe + }; + } + }, _ref[$$observable] = function () { + return this; + }, _ref; + } // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + + + dispatch({ + type: ActionTypes.INIT + }); + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[$$observable] = observable, _ref2; +} +/** + * Creates a Redux store that holds the state tree. + * + * **We recommend using `configureStore` from the + * `@reduxjs/toolkit` package**, which replaces `createStore`: + * **https://redux.js.org/introduction/why-rtk-is-redux-today** + * + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + +var legacy_createStore = createStore; + +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + } catch (e) {} // eslint-disable-line no-empty + +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!isPlainObject(inputState)) { + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + if (action && action.type === ActionTypes.REPLACE) return; + + if (unexpectedKeys.length > 0) { + return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); + } +} + +function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: ActionTypes.INIT + }); + + if (typeof initialState === 'undefined') { + throw new Error( true ? formatProdErrorMessage(12) : undefined); + } + + if (typeof reducer(undefined, { + type: ActionTypes.PROBE_UNKNOWN_ACTION() + }) === 'undefined') { + throw new Error( true ? formatProdErrorMessage(13) : undefined); + } + }); +} +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + + +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) {} + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same + // keys multiple times. + + var unexpectedKeyCache; + + if (false) {} + + var shapeAssertionError; + + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination(state, action) { + if (state === void 0) { + state = {}; + } + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (false) { var warningMessage; } + + var hasChanged = false; + var nextState = {}; + + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + + if (typeof nextStateForKey === 'undefined') { + var actionType = action && action.type; + throw new Error( true ? formatProdErrorMessage(14) : undefined); + } + + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; + return hasChanged ? nextState : state; + }; +} + +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(this, arguments)); + }; +} +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass an action creator as the first argument, + * and get a dispatch wrapped function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + + +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( true ? formatProdErrorMessage(16) : undefined); + } + + var boundActionCreators = {}; + + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + + return boundActionCreators; +} + +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ +function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(void 0, arguments)); + }; + }); +} + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + +function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function () { + var store = createStore.apply(void 0, arguments); + + var _dispatch = function dispatch() { + throw new Error( true ? formatProdErrorMessage(15) : undefined); + }; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = compose.apply(void 0, chain)(store.dispatch); + return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { + dispatch: _dispatch + }); + }; + }; +} + +/* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + +function isCrushed() {} + +if (false) {} + + + + +/***/ }), + +/***/ "H3jZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("QK3+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Slider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "H7FL": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.isDirectory = exports.isFile = void 0; + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _lite = _interopRequireDefault(__webpack_require__("xWW7")); + +var _has = _interopRequireDefault(__webpack_require__("sFVN")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _omit = _interopRequireDefault(__webpack_require__("RjO1")); + +var _pick = _interopRequireDefault(__webpack_require__("LF8A")); + +var _mangoIndex = __webpack_require__("boOw"); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _utils = __webpack_require__("YJcZ"); + +var _errors = __webpack_require__("twUa"); + +var _Collection = __webpack_require__("XXj1"); + +var _getIllegalCharacter = __webpack_require__("TlHu"); + +var querystring = _interopRequireWildcard(__webpack_require__("uagS")); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function _templateObject24() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/_changes"]); + + _templateObject24 = function _templateObject24() { + return data; + }; + + return data; +} + +function _templateObject23() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/not_synchronizing"]); + + _templateObject23 = function _templateObject23() { + return data; + }; + + return data; +} + +function _templateObject22() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/not_synchronizing"]); + + _templateObject22 = function _templateObject22() { + return data; + }; + + return data; +} + +function _templateObject21() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/not_synchronizing"]); + + _templateObject21 = function _templateObject21() { + return data; + }; + + return data; +} + +function _templateObject20() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "/versions"]); + + _templateObject20 = function _templateObject20() { + return data; + }; + + return data; +} + +function _templateObject19() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/upload/metadata"]); + + _templateObject19 = function _templateObject19() { + return data; + }; + + return data; +} + +function _templateObject18() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", ""]); + + _templateObject18 = function _templateObject18() { + return data; + }; + + return data; +} + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function _templateObject17() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "?Name=", "&Type=directory&MetadataID=", ""]); + + _templateObject17 = function _templateObject17() { + return data; + }; + + return data; +} + +function _templateObject16() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/metadata?Path=", ""]); + + _templateObject16 = function _templateObject16() { + return data; + }; + + return data; +} + +function _templateObject15() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", ""]); + + _templateObject15 = function _templateObject15() { + return data; + }; + + return data; +} + +function _templateObject14() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/downloads?Path=", ""]); + + _templateObject14 = function _templateObject14() { + return data; + }; + + return data; +} + +function _templateObject13() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/downloads?VersionId=", "&Filename=", ""]); + + _templateObject13 = function _templateObject13() { + return data; + }; + + return data; +} + +function _templateObject12() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/downloads?Id=", "&Filename=", ""]); + + _templateObject12 = function _templateObject12() { + return data; + }; + + return data; +} + +function _templateObject11() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "?Name=", "&Type=file&Executable=", "&Encrypted=", ""]); + + _templateObject11 = function _templateObject11() { + return data; + }; + + return data; +} + +function _templateObject10() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "?Name=", "&Type=file&Executable=", "&Encrypted=", "&MetadataID=", "&Size=", "&SourceAccount=", "&SourceAccountIdentifier=", ""]); + + _templateObject10 = function _templateObject10() { + return data; + }; + + return data; +} + +function _templateObject9() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", ""]); + + _templateObject9 = function _templateObject9() { + return data; + }; + + return data; +} + +function _templateObject8() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "/copy"]); + + _templateObject8 = function _templateObject8() { + return data; + }; + + return data; +} + +function _templateObject7() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/trash/", ""]); + + _templateObject7 = function _templateObject7() { + return data; + }; + + return data; +} + +function _templateObject6() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", ""]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; +} + +function _templateObject5() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/references"]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; +} + +function _templateObject4() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/references"]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "/relationships/referenced_by"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", "/relationships/referenced_by"]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/references"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef {object} IOCozyFolder Folder + */ + +/** + * @typedef {object} SpecificFileAttributesForKonnector Specific file attributes for creation for konnector + * @property {string} sourceAccount the id of the source account used by a konnector + * @property {string} sourceAccountIdentifier the unique identifier of the account targeted by the connector + */ + +/** + * Cursor used for Mango queries pagination + * + * @typedef {Array<string>|string} ViewKey + * @typedef {string} DocId + * @typedef {Array<*> & {0: ViewKey, 1: DocId}} CouchDBViewCursor + */ + +/** + * Attributes used for directory creation + * + * @typedef {object} DirectoryAttributes + * @property {string} dirId - Id of the parent directory. + * @property {boolean} name - Name of the created directory. + * @property {boolean} executable - Indicates whether the file will be executable. + * @property {object} [metadata] io.cozy.files.metadata to attach to the directory + */ + +/** + * Attributes used for file creation + * + * @typedef {object} FileAttributes + * @property {string} id - Id of the document + * @property {string} _id - Id of the document + * @property {string} dirId - Id of the parent directory. + * @property {string} name - Name of the created file. + * @property {Date} lastModifiedDate - Can be used to set the last modified date of a file. + * @property {boolean} executable - Whether or not the file is executable + * @property {boolean} encrypted - Whether or not the file is client-side encrypted + * @property {object} metadata io.cozy.files.metadata to attach to the file + */ + +/** + * Document representing a io.cozy.files + * + * @typedef {object} FileDocument + * @property {string} _id - Id of the file + * @property {FileAttributes} attributes - Attributes of the file + * @property {object} meta - Meta + * @property {object} relationships - Relationships + * @property {object} referenced_by - Referenced by + */ + +/** + * Stream is not defined in a browser, but is on NodeJS environment + * + * @typedef {object} Stream + */ + +/** + * Document representing a io.cozy.oauth.clients + * + * @typedef {object} OAuthClient + * @property {string} _id - Id of the client + * @property {string} _type - Doctype of the client (i.e. io.cozy.oauth.clients) + */ +var ROOT_DIR_ID = 'io.cozy.files.root-dir'; +var CONTENT_TYPE_OCTET_STREAM = 'application/octet-stream'; +/** + * Normalize a file, adding document's doctype if needed + * + * @param {FileDocument} file - File to normalize + * @returns {FileDocument} normalized file + * @private + */ + +var normalizeFile = function normalizeFile(file) { + var _file$meta; + + return _objectSpread(_objectSpread(_objectSpread({}, (0, _DocumentCollection2.normalizeDoc)(file, 'io.cozy.files')), file.attributes), {}, { + _rev: file === null || file === void 0 ? void 0 : (_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta.rev // Beware of JSON-API + + }); +}; +/** + * Normalize references, expliciting _type and _id — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/ + * + * @param {Array<object>} references - The list of files referenced by a document to normalize + * @returns {Array<object>} the data attribute of the normalized references + * @private + */ + + +var normalizeReferences = function normalizeReferences(references) { + return references ? references.map(function (ref) { + return { + _type: ref.type, + _id: ref.id + }; + }) : []; +}; +/** + * Sanitize the file name by trimming spaces + * + * @param {string} name - The file name to trim + * @returns {string} the trimmed file name + * @private + */ + + +var sanitizeFileName = function sanitizeFileName(name) { + return name && name.trim(); +}; +/** + * Sanitize and validate the file name - throw errors according to case + * + * @param {string} name - The file name + * @returns {string} the trimmed safe file name + * @throws {Error} - explaining reason why file name is not valid + * @private + */ + + +var sanitizeAndValidateFileName = function sanitizeAndValidateFileName(name) { + var safeName = sanitizeFileName(name); + + if (typeof safeName !== 'string' || safeName === '') { + throw new Error('Missing name argument'); + } + + if (name === '.' || name === '..') { + throw new Error("Invalid filename: ".concat(name)); + } + + var illegalCharacters = (0, _getIllegalCharacter.getIllegalCharacters)(safeName); + + if (illegalCharacters.length) { + throw new Error("Invalid filename containing illegal character(s): ".concat(illegalCharacters)); + } + + return safeName; +}; +/** + * Returns true when parameter has type directory, file or has _type io.cozy.files + * + * @param {object} doc - The document whose type is checked + * @param {string} [doc._type] - The document's doctype + * @param {'directory'|'file'} [doc.type] - The io.cozy-files document type + * + * @returns {boolean} true when objects has type directory, file or has _type io.cozy.files or false + */ + + +var isFile = function isFile(_ref) { + var _type = _ref._type, + type = _ref.type; + return _type === 'io.cozy.files' || type === 'directory' || type === 'file'; +}; +/** + * Returns true when parameters has type directory + * + * @param {object} args File + * @param {string} args.type - The type of the file + * @returns {boolean} true when parameters has type directory or false + */ + + +exports.isFile = isFile; + +var isDirectory = function isDirectory(_ref2) { + var type = _ref2.type; + return type === 'directory'; +}; + +exports.isDirectory = isDirectory; + +var raceWithCondition = function raceWithCondition(promises, predicate) { + return new Promise(function (resolve) { + promises.forEach(function (p) { + return p.then(function (res) { + if (predicate(res)) { + resolve(true); + } + }); + }); + Promise.all(promises).then(function () { + return resolve(false); + }); + }); +}; + +var dirName = function dirName(path) { + var lastIndex = path.lastIndexOf('/'); + return path.substring(0, lastIndex); +}; +/** + * Implements `DocumentCollection` API along with specific methods for + * `io.cozy.files`. + * + * Files are a special type of documents and are handled differently by the stack: + * special routes are to be used, and there is a notion of referenced files, aka + * files associated to a specific document + */ + + +var FileCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(FileCollection, _DocumentCollection); + + var _super = _createSuper(FileCollection); + + function FileCollection(doctype, stackClient) { + var _this; + + (0, _classCallCheck2.default)(this, FileCollection); + _this = _super.call(this, doctype, stackClient); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "extractResponseLinkRelated", function (res) { + var href = res.links && res.links.related; + if (!href) throw new Error('No related link in server response'); + return _this.stackClient.fullpath(href); + }); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "forceFileDownload", function (href, filename) { + var element = document.createElement('a'); + element.setAttribute('href', href); + element.setAttribute('download', filename); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + }); + _this.specialDirectories = {}; + return _this; + } + /** + * Fetches the file's data + * + * @param {string} id File id + * @returns {{data, included}} Information about the file or folder and it's descendents + */ + + + (0, _createClass2.default)(FileCollection, [{ + key: "get", + value: function get(id) { + return this.statById(id); + } + }, { + key: "fetchFindFiles", + value: function () { + var _fetchFindFiles = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(selector, options) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.stackClient.fetchJSON('POST', '/files/_find', this.toMangoOptions(selector, options))); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function fetchFindFiles(_x, _x2) { + return _fetchFindFiles.apply(this, arguments); + } + + return fetchFindFiles; + }() + /** + * Returns a filtered list of documents using a Mango selector. + * + * The returned documents are paginated by the stack. + * + * @param {object} selector The Mango selector. + * @param {MangoQueryOptions} options The query options + * @returns {Promise<{data, meta, skip, next, bookmark, execution_stats}>} The JSON API conformant response. + * @throws {FetchError} + */ + + }, { + key: "find", + value: function () { + var _find = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(selector) { + var options, + _options$skip, + skip, + resp, + path, + nextLink, + nextLinkURL, + nextBookmark, + _args2 = arguments; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {}; + _options$skip = options.skip, skip = _options$skip === void 0 ? 0 : _options$skip; + _context2.prev = 2; + path = '/files/_find'; + _context2.next = 6; + return this.findWithMango(path, selector, options); + + case 6: + resp = _context2.sent; + _context2.next = 12; + break; + + case 9: + _context2.prev = 9; + _context2.t0 = _context2["catch"](2); + return _context2.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context2.t0)); + + case 12: + nextLink = (0, _get.default)(resp, 'links.next', ''); + nextLinkURL = new URL("".concat(this.stackClient.uri).concat(nextLink)); + nextBookmark = nextLinkURL.searchParams.get('page[cursor]'); + return _context2.abrupt("return", { + data: resp.data.map(function (f) { + return normalizeFile(f); + }), + meta: resp.meta, + next: resp.meta.count > skip + resp.data.length, + skip: skip, + bookmark: nextBookmark || undefined, + execution_stats: resp.meta.execution_stats + }); + + case 16: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[2, 9]]); + })); + + function find(_x3) { + return _find.apply(this, arguments); + } + + return find; + }() + /** + * async findReferencedBy - Returns the list of files referenced by a document — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/ + * + * @param {object} document A JSON representing a document, with at least a `_type` and `_id` field. + * @param {object} options Additional options + * @param {number|null} [options.skip] For skip-based pagination, the number of referenced files to skip. + * @param {number|null} [options.limit] For pagination, the number of results to return. + * @param {CouchDBViewCursor|null} [options.cursor] For cursor-based pagination, the index cursor. + * @returns {Promise<{data, included, meta, skip, next}>} The JSON API conformant response. + */ + + }, { + key: "findReferencedBy", + value: function () { + var _findReferencedBy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(document) { + var _ref3, + _ref3$skip, + skip, + limit, + cursor, + params, + path, + url, + resp, + _args3 = arguments; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _ref3 = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}, _ref3$skip = _ref3.skip, skip = _ref3$skip === void 0 ? 0 : _ref3$skip, limit = _ref3.limit, cursor = _ref3.cursor; + params = { + include: 'files', + 'page[limit]': limit, + 'page[cursor]': cursor, + sort: 'datetime' + }; + path = (0, _utils.uri)(_templateObject(), document._type, document._id); + url = querystring.buildURL(path, params); + _context3.next = 6; + return this.stackClient.fetchJSON('GET', url); + + case 6: + resp = _context3.sent; + return _context3.abrupt("return", { + data: normalizeReferences(resp.data), + included: resp.included ? resp.included.map(function (f) { + return normalizeFile(f); + }) : [], + next: (0, _has.default)(resp, 'links.next'), + meta: resp.meta, + skip: skip + }); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function findReferencedBy(_x4) { + return _findReferencedBy.apply(this, arguments); + } + + return findReferencedBy; + }() + /** + * Add referenced_by documents to a file — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/#post-filesfile-idrelationshipsreferenced_by + * + * For example, to have an album referenced by a file: + * ``` + * addReferencedBy({_id: 123, _type: "io.cozy.files", name: "cozy.jpg"}, [{_id: 456, _type: "io.cozy.photos.albums", name: "Happy Cloud"}]) + * ``` + * + * @param {FileDocument} document A JSON representing the file + * @param {Array} documents An array of JSON documents having a `_type` and `_id` field. + * @returns {Promise<{data, meta}>} The JSON API conformant response. + */ + + }, { + key: "addReferencedBy", + value: function () { + var _addReferencedBy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(document, documents) { + var refs, resp; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + refs = documents.map(function (d) { + return { + id: d._id, + type: d._type + }; + }); + _context4.next = 3; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject2(), document._id), { + data: refs + }); + + case 3: + resp = _context4.sent; + return _context4.abrupt("return", { + data: normalizeReferences(resp.data), + meta: resp.meta + }); + + case 5: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function addReferencedBy(_x5, _x6) { + return _addReferencedBy.apply(this, arguments); + } + + return addReferencedBy; + }() + /** + * Remove referenced_by documents from a file — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/#delete-filesfile-idrelationshipsreferenced_by + * + * For example, to remove an album reference from a file: + * ``` + * removeReferencedBy({_id: 123, _type: "io.cozy.files", name: "cozy.jpg"}, [{_id: 456, _type: "io.cozy.photos.albums", name: "Happy Cloud"}]) + * ``` + * + * @param {object} document A JSON representing the file + * @param {Array} documents An array of JSON documents having a `_type` and `_id` field. + * @returns {Promise<{data, meta}>} The JSON API conformant response. + */ + + }, { + key: "removeReferencedBy", + value: function () { + var _removeReferencedBy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(document, documents) { + var refs, resp; + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + refs = documents.map(function (d) { + return { + id: d._id || d.id, + type: d._type || d.type + }; + }); + _context5.next = 3; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject3(), document._id || document.id), { + data: refs + }); + + case 3: + resp = _context5.sent; + return _context5.abrupt("return", { + data: normalizeReferences(resp.data), + meta: resp.meta + }); + + case 5: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function removeReferencedBy(_x7, _x8) { + return _removeReferencedBy.apply(this, arguments); + } + + return removeReferencedBy; + }() + /** + * Add files references to a document — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/#post-datatypedoc-idrelationshipsreferences + * + * For example, to add a photo to an album: + * ``` + * addReferencesTo({_id: 456, _type: "io.cozy.photos.albums", name: "Happy Cloud"}, [{_id: 123, _type: "io.cozy.files", name: "cozy.jpg"}]) + * ``` + * + * @param {object} document A JSON representing a document, with at least a `_type` and `_id` field. + * @param {Array} documents An array of JSON files having an `_id` field. + * + * Returns 204 No Content + */ + + }, { + key: "addReferencesTo", + value: function () { + var _addReferencesTo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(document, documents) { + var refs; + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + refs = documents.map(function (d) { + return { + id: d._id, + type: 'io.cozy.files' + }; + }); + return _context6.abrupt("return", this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject4(), document._type, document._id), { + data: refs + })); + + case 2: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function addReferencesTo(_x9, _x10) { + return _addReferencesTo.apply(this, arguments); + } + + return addReferencesTo; + }() + /** + * Remove files references to a document — see https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/#delete-datatypedoc-idrelationshipsreferences + * + * For example, to remove a photo from an album: + * ``` + * removeReferencesTo({_id: 456, _type: "io.cozy.photos.albums", name: "Happy Cloud"}, [{_id: 123, _type: "io.cozy.files", name: "cozy.jpg"}]) + * ``` + * + * @param {object} document A JSON representing a document, with at least a `_type` and `_id` field. + * @param {Array} documents An array of JSON files having an `_id` field. + * + * Returns 204 No Content + */ + + }, { + key: "removeReferencesTo", + value: function () { + var _removeReferencesTo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(document, documents) { + var refs; + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + refs = documents.map(function (d) { + return { + id: d._id, + type: 'io.cozy.files' + }; + }); + return _context7.abrupt("return", this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject5(), document._type, document._id), { + data: refs + })); + + case 2: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function removeReferencesTo(_x11, _x12) { + return _removeReferencesTo.apply(this, arguments); + } + + return removeReferencesTo; + }() + /** + * Sends file to trash and removes references to it + * + * @param {FileDocument} file - File that will be sent to trash + * @returns {Promise} - Resolves when references have been removed + * and file has been sent to trash + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(file) { + var _ref4, + _ref4$ifMatch, + ifMatch, + _id, + relationships, + resp, + references, + _args8 = arguments; + + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _ref4 = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {}, _ref4$ifMatch = _ref4.ifMatch, ifMatch = _ref4$ifMatch === void 0 ? '' : _ref4$ifMatch; + _id = file._id, relationships = file.relationships; + _context8.next = 4; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject6(), _id), undefined, { + headers: { + 'If-Match': ifMatch + } + }); + + case 4: + resp = _context8.sent; + // needed because we had a bug in cozy-stack https://github.com/cozy/cozy-stack/pull/3566 + // to remove once the code is deployed everywhere + references = (0, _get.default)(relationships, 'referenced_by.data', file.referenced_by); + + if (!Array.isArray(references)) { + _context8.next = 9; + break; + } + + _context8.next = 9; + return this.removeReferencedBy(file, references); + + case 9: + return _context8.abrupt("return", { + data: normalizeFile(resp.data) + }); + + case 10: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function destroy(_x13) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + /** + * Empty the Trash + */ + + }, { + key: "emptyTrash", + value: function emptyTrash() { + return this.stackClient.fetchJSON('DELETE', '/files/trash'); + } + /** + * Restores a trashed file. + * + * @param {string} id - The file's id + * @returns {Promise} - A promise that returns the restored file if resolved. + * @throws {FetchError} + * + */ + + }, { + key: "restore", + value: function restore(id) { + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject7(), id)); + } + /** + * Copy a file. + * + * @param {string} id - The file's id + * @param {string} [name] - The file copy name + * @param {string} [dirId] - The destination directory id + * @returns {Promise<object>} - A promise that returns the copied file if resolved. + * @throws {FetchError} + * + */ + + }, { + key: "copy", + value: function () { + var _copy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(id, name, dirId) { + var params, path, url, resp; + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + params = { + name: name === undefined ? undefined : sanitizeAndValidateFileName(name), + dirId: dirId + }; + path = (0, _utils.uri)(_templateObject8(), id); + url = querystring.buildURL(path, params); + _context9.next = 5; + return this.stackClient.fetchJSON('POST', url); + + case 5: + resp = _context9.sent; + return _context9.abrupt("return", { + data: normalizeFile(resp.data) + }); + + case 7: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + function copy(_x14, _x15, _x16) { + return _copy.apply(this, arguments); + } + + return copy; + }() + /** + * async deleteFilePermanently - Definitely delete a file + * + * @param {string} id - The id of the file to delete + * @returns {Promise<object>} The deleted file object + */ + + }, { + key: "deleteFilePermanently", + value: function () { + var _deleteFilePermanently = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(id) { + var resp; + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return this.stackClient.fetchJSON('PATCH', (0, _utils.uri)(_templateObject9(), id), { + data: { + type: 'io.cozy.files', + id: id, + attributes: { + permanent_delete: true + } + } + }); + + case 2: + resp = _context10.sent; + return _context10.abrupt("return", resp.data); + + case 4: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function deleteFilePermanently(_x17) { + return _deleteFilePermanently.apply(this, arguments); + } + + return deleteFilePermanently; + }() + /** + * @param {File|Blob|Stream|string|ArrayBuffer} data file to be uploaded + * @param {string} dirPath Path to upload the file to. ie : /Administative/XXX/ + * @returns {Promise<object>} Created io.cozy.files + */ + + }, { + key: "upload", + value: function () { + var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(data, dirPath) { + var dirId; + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return this.ensureDirectoryExists(dirPath); + + case 2: + dirId = _context11.sent; + return _context11.abrupt("return", this.createFile(data, { + dirId: dirId + })); + + case 4: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function upload(_x18, _x19) { + return _upload.apply(this, arguments); + } + + return upload; + }() + /** + * Creates directory or file. + * - Used by StackLink to support CozyClient.create('io.cozy.files', options) + * + * @param {FileAttributes|DirectoryAttributes} attributes - Attributes of the created file/directory + * @param {File|Blob|string|ArrayBuffer} attributes.data Will be used as content of the created file + * @throws {Error} - explaining reason why creation failed + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(attributes) { + var data, createFileOptions; + return _regenerator.default.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + if (!(attributes.type === 'directory')) { + _context12.next = 4; + break; + } + + return _context12.abrupt("return", this.createDirectory(attributes)); + + case 4: + data = attributes.data, createFileOptions = (0, _objectWithoutProperties2.default)(attributes, ["data"]); + return _context12.abrupt("return", this.createFile(data, createFileOptions)); + + case 6: + case "end": + return _context12.stop(); + } + } + }, _callee12, this); + })); + + function create(_x20) { + return _create.apply(this, arguments); + } + + return create; + }() + /*** + * Updates an existing file or directory + * + * Used by StackLink to support CozyClient.save({file}). + * Update the binary file if a `data` param is passed. Only updates + * attributes otherwise. + * @param {object} attributes + * @param {FileAttributes} attributes.file - The file with its new content + * @param {File|Blob|string|ArrayBuffer} attributes.data Will be used as content of the updated file + * @returns {Promise<FileAttributes>} Updated document + * @throws {Error} - explaining reason why update failed + */ + + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(attributes) { + var data, updateFileOptions, fileId; + return _regenerator.default.wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + data = attributes.data, updateFileOptions = (0, _objectWithoutProperties2.default)(attributes, ["data"]); + fileId = attributes.id || attributes._id; + + if (!data) { + _context13.next = 7; + break; + } + + if (!(attributes.type === 'directory')) { + _context13.next = 5; + break; + } + + throw new Error('You cannot pass a data object for a directory'); + + case 5: + updateFileOptions.fileId = fileId; + return _context13.abrupt("return", this.updateFile(data, updateFileOptions)); + + case 7: + return _context13.abrupt("return", this.updateAttributes(fileId, attributes)); + + case 8: + case "end": + return _context13.stop(); + } + } + }, _callee13, this); + })); + + function update(_x21) { + return _update.apply(this, arguments); + } + + return update; + }() + /** + * Creates a file + * + * + * @private + * @param {File|Blob|Stream|string|ArrayBuffer} data file to be uploaded + * @param {FileAttributes & SpecificFileAttributesForKonnector} params Additional parameters + * @param {object} params.options Options to pass to doUpload method (additional headers) + * @throws {Error} - explaining reason why creation failed + */ + + }, { + key: "createFile", + value: function () { + var _createFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(data) { + var _ref5, + nameOption, + _ref5$dirId, + dirId, + _ref5$executable, + executable, + _ref5$encrypted, + encrypted, + metadata, + _ref5$sourceAccount, + sourceAccount, + _ref5$sourceAccountId, + sourceAccountIdentifier, + options, + name, + metadataId, + meta, + size, + path, + _args14 = arguments; + + return _regenerator.default.wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + _ref5 = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {}; + nameOption = _ref5.name, _ref5$dirId = _ref5.dirId, dirId = _ref5$dirId === void 0 ? '' : _ref5$dirId, _ref5$executable = _ref5.executable, executable = _ref5$executable === void 0 ? false : _ref5$executable, _ref5$encrypted = _ref5.encrypted, encrypted = _ref5$encrypted === void 0 ? false : _ref5$encrypted, metadata = _ref5.metadata, _ref5$sourceAccount = _ref5.sourceAccount, sourceAccount = _ref5$sourceAccount === void 0 ? '' : _ref5$sourceAccount, _ref5$sourceAccountId = _ref5.sourceAccountIdentifier, sourceAccountIdentifier = _ref5$sourceAccountId === void 0 ? '' : _ref5$sourceAccountId, options = (0, _objectWithoutProperties2.default)(_ref5, ["name", "dirId", "executable", "encrypted", "metadata", "sourceAccount", "sourceAccountIdentifier"]); + name = nameOption; // handle case where data is a file and contains the name + + if (!name && typeof data.name === 'string') { + name = data.name; + } + + name = sanitizeAndValidateFileName(name); + metadataId = ''; + + if (!metadata) { + _context14.next = 11; + break; + } + + _context14.next = 9; + return this.createFileMetadata(metadata); + + case 9: + meta = _context14.sent; + metadataId = meta.data.id; + + case 11: + size = ''; + + if (options.contentLength) { + size = String(options.contentLength); + } + + path = (0, _utils.uri)(_templateObject10(), dirId, name, executable, encrypted, metadataId, size, sourceAccount, sourceAccountIdentifier); + return _context14.abrupt("return", this.doUpload(data, path, options)); + + case 15: + case "end": + return _context14.stop(); + } + } + }, _callee14, this); + })); + + function createFile(_x22) { + return _createFile.apply(this, arguments); + } + + return createFile; + }() + /** + * updateFile - Updates a file's data + * + * @param {File|Blob|Stream|string|ArrayBuffer} data file to be uploaded + * @param {FileAttributes} params Additional parameters + * @param {object} params.options Options to pass to doUpload method (additional headers) + * @returns {object} Updated document + * @throws {Error} - explaining reason why update failed + */ + + }, { + key: "updateFile", + value: function () { + var _updateFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(data) { + var _ref6, + _ref6$executable, + executable, + _ref6$encrypted, + encrypted, + fileId, + _ref6$name, + name, + metadata, + options, + fileName, + sanitizedName, + metadataId, + path, + meta, + size, + _args15 = arguments; + + return _regenerator.default.wrap(function _callee15$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + _ref6 = _args15.length > 1 && _args15[1] !== undefined ? _args15[1] : {}; + _ref6$executable = _ref6.executable, executable = _ref6$executable === void 0 ? false : _ref6$executable, _ref6$encrypted = _ref6.encrypted, encrypted = _ref6$encrypted === void 0 ? false : _ref6$encrypted, fileId = _ref6.fileId, _ref6$name = _ref6.name, name = _ref6$name === void 0 ? '' : _ref6$name, metadata = _ref6.metadata, options = (0, _objectWithoutProperties2.default)(_ref6, ["executable", "encrypted", "fileId", "name", "metadata"]); + + if (!(!fileId || typeof fileId !== 'string')) { + _context15.next = 4; + break; + } + + throw new Error('missing fileId argument'); + + case 4: + // name might be set in a File object + fileName = name || data.name; + + if (!(!fileName || typeof fileName !== 'string')) { + _context15.next = 7; + break; + } + + throw new Error('missing name in data argument'); + + case 7: + sanitizedName = sanitizeAndValidateFileName(fileName); + /** + * We already use the body to send the content of the file. So we have 2 choices : + * Use an object in a query string to send the metadata + * create a new header http + * In both case, we have a size limitation depending of the browser. + * + * So we had this current workaround where we create the metadata before + * (no size limit since we can use the body for that) and after we use the ID. + */ + + path = (0, _utils.uri)(_templateObject11(), fileId, sanitizedName, executable, encrypted); + + if (!metadata) { + _context15.next = 15; + break; + } + + _context15.next = 12; + return this.createFileMetadata(metadata); + + case 12: + meta = _context15.sent; + metadataId = meta.data.id; + path = path + "&MetadataID=".concat(metadataId); + + case 15: + size = ''; + + if (options.contentLength) { + size = String(options.contentLength); + path = path + "&Size=".concat(size); + } + + return _context15.abrupt("return", this.doUpload(data, path, options, 'PUT')); + + case 18: + case "end": + return _context15.stop(); + } + } + }, _callee15, this); + })); + + function updateFile(_x23) { + return _updateFile.apply(this, arguments); + } + + return updateFile; + }() + }, { + key: "getDownloadLinkById", + value: function getDownloadLinkById(id, filename) { + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject12(), id, encodeURIComponent(filename))).then(this.extractResponseLinkRelated); + } + }, { + key: "getDownloadLinkByRevision", + value: function getDownloadLinkByRevision(versionId, filename) { + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject13(), versionId, encodeURIComponent(filename))).then(this.extractResponseLinkRelated); + } + }, { + key: "getDownloadLinkByPath", + value: function getDownloadLinkByPath(path) { + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject14(), path)).then(this.extractResponseLinkRelated); + } + }, { + key: "download", + + /** + * Download a file or a specific version of the file + * + * @param {object} file io.cozy.files object + * @param {string} versionId Id of the io.cozy.files.version + * @param {string} filename The name you want for the downloaded file + * (by default the same as the file) + */ + value: function () { + var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(file) { + var versionId, + filename, + href, + filenameToUse, + _args16 = arguments; + return _regenerator.default.wrap(function _callee16$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + versionId = _args16.length > 1 && _args16[1] !== undefined ? _args16[1] : null; + filename = _args16.length > 2 && _args16[2] !== undefined ? _args16[2] : undefined; + filenameToUse = filename ? filename : file.name; + /** + * Passing a filename to forceFileDownload is not enough + * for a few browsers since the stack's response header will + * not contain that name. Passing the filename to + * getDownloadLinkBy{Id,Revision} will ask the stack to + * return this filename in its content-disposition + * header response + */ + + if (versionId) { + _context16.next = 9; + break; + } + + _context16.next = 6; + return this.getDownloadLinkById(file._id, filenameToUse); + + case 6: + href = _context16.sent; + _context16.next = 12; + break; + + case 9: + _context16.next = 11; + return this.getDownloadLinkByRevision(versionId, filenameToUse); + + case 11: + href = _context16.sent; + + case 12: + this.forceFileDownload("".concat(href, "?Dl=1"), filenameToUse); + + case 13: + case "end": + return _context16.stop(); + } + } + }, _callee16, this); + })); + + function download(_x24) { + return _download.apply(this, arguments); + } + + return download; + }() + }, { + key: "fetchFileContent", + value: function () { + var _fetchFileContent = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(id) { + return _regenerator.default.wrap(function _callee17$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + _logger.default.warn('FileCollection.fetchFileContent() is deprecated. Use FileCollection.fetchFileContentById() instead'); + + return _context17.abrupt("return", this.fetchFileContentById(id)); + + case 2: + case "end": + return _context17.stop(); + } + } + }, _callee17, this); + })); + + function fetchFileContent(_x25) { + return _fetchFileContent.apply(this, arguments); + } + + return fetchFileContent; + }() + /** + * Fetch the binary of a file or a specific version of a file + * Useful for instance when you can't download the file directly + * (via a content-disposition attachement header) and need to store + * it before doing an operation. + * + * @param {string} id Id of the io.cozy.files or io.cozy.files.version + * + */ + + }, { + key: "fetchFileContentById", + value: function () { + var _fetchFileContentById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(id) { + return _regenerator.default.wrap(function _callee18$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + return _context18.abrupt("return", this.stackClient.fetch('GET', "/files/download/".concat(id))); + + case 1: + case "end": + return _context18.stop(); + } + } + }, _callee18, this); + })); + + function fetchFileContentById(_x26) { + return _fetchFileContentById.apply(this, arguments); + } + + return fetchFileContentById; + }() + /** + * Get a beautified size for a given file + * 1024B => 1KB + * 102404500404B => 95.37 GB + * + * @param {object} file io.cozy.files object + * @param {number} decimal number of decimal + */ + + }, { + key: "getBeautifulSize", + value: function getBeautifulSize(file, decimal) { + return (0, _utils.formatBytes)(parseInt(file.size), decimal); + } + }, { + key: "downloadArchive", + value: function () { + var _downloadArchive = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(fileIds) { + var notSecureFilename, + filename, + href, + fullpath, + _args19 = arguments; + return _regenerator.default.wrap(function _callee19$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + notSecureFilename = _args19.length > 1 && _args19[1] !== undefined ? _args19[1] : 'files'; + filename = (0, _utils.slugify)(notSecureFilename); + _context19.next = 4; + return this.getArchiveLinkByIds(fileIds, filename); + + case 4: + href = _context19.sent; + fullpath = this.stackClient.fullpath(href); + this.forceFileDownload(fullpath, filename + '.zip'); + + case 7: + case "end": + return _context19.stop(); + } + } + }, _callee19, this); + })); + + function downloadArchive(_x27) { + return _downloadArchive.apply(this, arguments); + } + + return downloadArchive; + }() + }, { + key: "getArchiveLinkByIds", + value: function () { + var _getArchiveLinkByIds = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(ids) { + var name, + resp, + _args20 = arguments; + return _regenerator.default.wrap(function _callee20$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + name = _args20.length > 1 && _args20[1] !== undefined ? _args20[1] : 'files'; + _context20.next = 3; + return this.stackClient.fetchJSON('POST', '/files/archive', { + data: { + type: 'io.cozy.archives', + attributes: { + name: name, + ids: ids + } + } + }); + + case 3: + resp = _context20.sent; + return _context20.abrupt("return", resp.links.related); + + case 5: + case "end": + return _context20.stop(); + } + } + }, _callee20, this); + })); + + function getArchiveLinkByIds(_x28) { + return _getArchiveLinkByIds.apply(this, arguments); + } + + return getArchiveLinkByIds; + }() + /** + * Checks if the file belongs to the parent's hierarchy. + * + * @param {string|object} child The file which can either be an id or an object + * @param {string|object} parent The parent target which can either be an id or an object + * @returns {boolean} Whether the file is a parent's child + */ + + }, { + key: "isChildOf", + value: function () { + var _isChildOf = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(child, parent) { + var _this2 = this; + + var _ref7, childID, childDirID, childPath, _ref8, parentID, childDoc, currPath, targetsPath, newPath; + + return _regenerator.default.wrap(function _callee21$(_context21) { + while (1) { + switch (_context21.prev = _context21.next) { + case 0: + _ref7 = typeof child === 'object' ? child : { + _id: child + }, childID = _ref7._id, childDirID = _ref7.dirID, childPath = _ref7.path; + _ref8 = typeof parent === 'object' ? parent : { + _id: parent + }, parentID = _ref8._id; + + if (!(childID === parentID || childDirID === parentID)) { + _context21.next = 4; + break; + } + + return _context21.abrupt("return", true); + + case 4: + if (childPath) { + _context21.next = 10; + break; + } + + _context21.next = 7; + return this.statById(childID); + + case 7: + childDoc = _context21.sent; + childPath = childDoc.data.path; + childDirID = childDoc.data.dirID; + + case 10: + // Build hierarchy paths + currPath = childPath; + targetsPath = [childPath]; + + while (currPath != '') { + newPath = dirName(currPath); + + if (newPath != '') { + targetsPath.push(newPath); + } + + currPath = newPath; + } + + targetsPath.reverse(); // Look for all hierarchy in parallel and return true as soon as a dir is the searched parent + + return _context21.abrupt("return", raceWithCondition(targetsPath.map(function (path) { + return _this2.statByPath(path); + }), function (stat) { + return stat.data._id == parentID; + })); + + case 15: + case "end": + return _context21.stop(); + } + } + }, _callee21, this); + })); + + function isChildOf(_x29, _x30) { + return _isChildOf.apply(this, arguments); + } + + return isChildOf; + }() + /** + * statById - Fetches the metadata about a document. For folders, the results include the list of child files and folders. + * + * @param {string} id ID of the document + * @param {object|null} options Pagination options + * @param {number|null} [options.page[limit]] For pagination, the number of results to return. + * @param {number|null} [options.page[skip]] For skip-based pagination, the number of referenced files to skip. + * @param {CouchDBViewCursor|null} [options.page[cursor]] For cursor-based pagination, the index cursor. + * + * @returns {object} A promise resolving to an object containing "data" (the document metadata), "included" (the child documents) and "links" (pagination informations) + */ + + }, { + key: "statById", + value: function () { + var _statById = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(id) { + var options, + params, + path, + url, + resp, + _args22 = arguments; + return _regenerator.default.wrap(function _callee22$(_context22) { + while (1) { + switch (_context22.prev = _context22.next) { + case 0: + options = _args22.length > 1 && _args22[1] !== undefined ? _args22[1] : {}; + params = (0, _pick.default)(options, ['page[limit]', 'page[skip]', 'page[cursor]']); + path = (0, _utils.uri)(_templateObject15(), id); + url = querystring.buildURL(path, params); + _context22.next = 6; + return this.stackClient.fetchJSON('GET', url); + + case 6: + resp = _context22.sent; + return _context22.abrupt("return", { + data: normalizeFile(resp.data), + included: resp.included && resp.included.map(function (f) { + return normalizeFile(f); + }), + links: resp.links + }); + + case 8: + case "end": + return _context22.stop(); + } + } + }, _callee22, this); + })); + + function statById(_x31) { + return _statById.apply(this, arguments); + } + + return statById; + }() + }, { + key: "statByPath", + value: function () { + var _statByPath = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(path) { + var resp; + return _regenerator.default.wrap(function _callee23$(_context23) { + while (1) { + switch (_context23.prev = _context23.next) { + case 0: + _context23.next = 2; + return this.stackClient.fetchJSON('GET', (0, _utils.uri)(_templateObject16(), path)); + + case 2: + resp = _context23.sent; + return _context23.abrupt("return", { + data: normalizeFile(resp.data), + included: resp.included && resp.included.map(function (f) { + return normalizeFile(f); + }) + }); + + case 4: + case "end": + return _context23.stop(); + } + } + }, _callee23, this); + })); + + function statByPath(_x32) { + return _statByPath.apply(this, arguments); + } + + return statByPath; + }() + /** + * Create directory + * + * @private + * @param {DirectoryAttributes} attributes - Attributes of the directory + * @returns {Promise} + * @throws {Error} - explaining reason why creation failed + */ + + }, { + key: "createDirectory", + value: function () { + var _createDirectory = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() { + var attributes, + name, + dirId, + lastModifiedDate, + metadata, + metadataId, + meta, + safeName, + lastModified, + resp, + _args24 = arguments; + return _regenerator.default.wrap(function _callee24$(_context24) { + while (1) { + switch (_context24.prev = _context24.next) { + case 0: + attributes = _args24.length > 0 && _args24[0] !== undefined ? _args24[0] : {}; + name = attributes.name, dirId = attributes.dirId, lastModifiedDate = attributes.lastModifiedDate, metadata = attributes.metadata; + metadataId = ''; + + if (!metadata) { + _context24.next = 8; + break; + } + + _context24.next = 6; + return this.createFileMetadata(metadata); + + case 6: + meta = _context24.sent; + metadataId = meta.data.id; + + case 8: + safeName = sanitizeAndValidateFileName(name); + lastModified = lastModifiedDate && (typeof lastModifiedDate === 'string' ? new Date(lastModifiedDate) : lastModifiedDate); + _context24.next = 12; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject17(), dirId, safeName, metadataId), undefined, { + headers: { + Date: lastModified ? lastModified.toGMTString() : '' + } + }); + + case 12: + resp = _context24.sent; + return _context24.abrupt("return", { + data: normalizeFile(resp.data) + }); + + case 14: + case "end": + return _context24.stop(); + } + } + }, _callee24, this); + })); + + function createDirectory() { + return _createDirectory.apply(this, arguments); + } + + return createDirectory; + }() + }, { + key: "ensureDirectoryExists", + value: function () { + var _ensureDirectoryExists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(path) { + var resp; + return _regenerator.default.wrap(function _callee25$(_context25) { + while (1) { + switch (_context25.prev = _context25.next) { + case 0: + if (this.specialDirectories[path]) { + _context25.next = 5; + break; + } + + _context25.next = 3; + return this.createDirectoryByPath(path); + + case 3: + resp = _context25.sent; + this.specialDirectories[path] = resp.data._id; + + case 5: + return _context25.abrupt("return", this.specialDirectories[path]); + + case 6: + case "end": + return _context25.stop(); + } + } + }, _callee25, this); + })); + + function ensureDirectoryExists(_x33) { + return _ensureDirectoryExists.apply(this, arguments); + } + + return ensureDirectoryExists; + }() + /** + * Get a directory or create it + * + * @private + * @param {string} name - Name of the directory we want to get or create + * @param {FileDocument} parentDirectory - Parent directory of the directory we want to get or create + * @returns {Promise} + * @throws {Error} - explaining reason why creation failed + */ + + }, { + key: "getDirectoryOrCreate", + value: function () { + var _getDirectoryOrCreate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(name, parentDirectory) { + var safeName, path, stat, parsedError, errors; + return _regenerator.default.wrap(function _callee26$(_context26) { + while (1) { + switch (_context26.prev = _context26.next) { + case 0: + if (!(parentDirectory && !parentDirectory.attributes)) { + _context26.next = 2; + break; + } + + throw new Error('Malformed parent directory'); + + case 2: + safeName = sanitizeFileName(name); + path = "".concat(parentDirectory._id === ROOT_DIR_ID ? '' : parentDirectory.attributes.path, "/").concat(safeName); + _context26.prev = 4; + _context26.next = 7; + return this.statByPath(path || '/'); + + case 7: + stat = _context26.sent; + return _context26.abrupt("return", stat); + + case 11: + _context26.prev = 11; + _context26.t0 = _context26["catch"](4); + parsedError = JSON.parse(_context26.t0.message); + errors = parsedError.errors; + + if (!(errors && errors.length && errors[0].status === '404')) { + _context26.next = 17; + break; + } + + return _context26.abrupt("return", this.createDirectory({ + name: safeName, + dirId: parentDirectory && parentDirectory._id + })); + + case 17: + throw errors; + + case 18: + case "end": + return _context26.stop(); + } + } + }, _callee26, this, [[4, 11]]); + })); + + function getDirectoryOrCreate(_x34, _x35) { + return _getDirectoryOrCreate.apply(this, arguments); + } + + return getDirectoryOrCreate; + }() + /** + * async createDirectoryByPath - Creates one or more folders until the given path exists + * + * @param {string} path - Path of the created directory + * @returns {object} The document corresponding to the last segment of the path + */ + + }, { + key: "createDirectoryByPath", + value: function () { + var _createDirectoryByPath = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(path) { + var parts, root, parentDir, _iterator, _step, part; + + return _regenerator.default.wrap(function _callee27$(_context27) { + while (1) { + switch (_context27.prev = _context27.next) { + case 0: + parts = path.split('/').filter(function (part) { + return part !== ''; + }); + _context27.next = 3; + return this.statById(ROOT_DIR_ID); + + case 3: + root = _context27.sent; + + if (parts.length) { + _context27.next = 6; + break; + } + + return _context27.abrupt("return", root); + + case 6: + parentDir = root; + _iterator = _createForOfIteratorHelper(parts); + _context27.prev = 8; + + _iterator.s(); + + case 10: + if ((_step = _iterator.n()).done) { + _context27.next = 17; + break; + } + + part = _step.value; + _context27.next = 14; + return this.getDirectoryOrCreate(part, parentDir.data); + + case 14: + parentDir = _context27.sent; + + case 15: + _context27.next = 10; + break; + + case 17: + _context27.next = 22; + break; + + case 19: + _context27.prev = 19; + _context27.t0 = _context27["catch"](8); + + _iterator.e(_context27.t0); + + case 22: + _context27.prev = 22; + + _iterator.f(); + + return _context27.finish(22); + + case 25: + return _context27.abrupt("return", parentDir); + + case 26: + case "end": + return _context27.stop(); + } + } + }, _callee27, this, [[8, 19, 22, 25]]); + })); + + function createDirectoryByPath(_x36) { + return _createDirectoryByPath.apply(this, arguments); + } + + return createDirectoryByPath; + }() + /** + * + * async updateAttributes - Updates a file / folder's attributes except + * the metadata attribute. If you want to update its metadata attribute, + * then use `updateFileMetadataAttribute` since `metadata` is a specific + * doctype. + * + * For instance, if you want to update the name of a file, you can pass + * attributes = { name: 'newName'} + * + * You can see the attributes for both Folder and File (as they share the + * same doctype they have a few in common) here : + * https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.files/#iocozyfiles + * + * @private You shoud use update() directly. + * @param {string} id File id + * @param {object} attributes New file attributes + * @returns {object} Updated document + * @throws {Error} - explaining reason why update failed + */ + + }, { + key: "updateAttributes", + value: function () { + var _updateAttributes = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(id, attributes) { + var sanitizedAttributes, resp; + return _regenerator.default.wrap(function _callee28$(_context28) { + while (1) { + switch (_context28.prev = _context28.next) { + case 0: + sanitizedAttributes = _objectSpread({}, attributes); + + if (attributes.name) { + sanitizedAttributes.name = sanitizeAndValidateFileName(attributes.name); + } + + _context28.next = 4; + return this.stackClient.fetchJSON('PATCH', (0, _utils.uri)(_templateObject18(), id), { + data: { + type: 'io.cozy.files', + id: id, + attributes: sanitizedAttributes + } + }); + + case 4: + resp = _context28.sent; + return _context28.abrupt("return", { + data: normalizeFile(resp.data) + }); + + case 6: + case "end": + return _context28.stop(); + } + } + }, _callee28, this); + })); + + function updateAttributes(_x37, _x38) { + return _updateAttributes.apply(this, arguments); + } + + return updateAttributes; + }() + }, { + key: "updateFileMetadata", + value: function () { + var _updateFileMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(id, attributes) { + return _regenerator.default.wrap(function _callee29$(_context29) { + while (1) { + switch (_context29.prev = _context29.next) { + case 0: + _logger.default.warn('CozyClient FileCollection updateFileMetadata method is deprecated. Use updateAttributes instead'); + + return _context29.abrupt("return", this.updateAttributes(id, attributes)); + + case 2: + case "end": + return _context29.stop(); + } + } + }, _callee29, this); + })); + + function updateFileMetadata(_x39, _x40) { + return _updateFileMetadata.apply(this, arguments); + } + + return updateFileMetadata; + }() + /** + * Send a metadata object that can be associated to a file uploaded after that, + * via the MetadataID query parameter. + * See https://github.com/cozy/cozy-stack/blob/master/docs/files.md#post-filesuploadmetadata + * + * @param {object} attributes The file's metadata + * @returns {Promise<object>} The Metadata object + */ + + }, { + key: "createFileMetadata", + value: function () { + var _createFileMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(attributes) { + var resp; + return _regenerator.default.wrap(function _callee30$(_context30) { + while (1) { + switch (_context30.prev = _context30.next) { + case 0: + _context30.next = 2; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject19()), { + data: { + type: 'io.cozy.files.metadata', + attributes: attributes + } + }); + + case 2: + resp = _context30.sent; + return _context30.abrupt("return", { + data: resp.data + }); + + case 4: + case "end": + return _context30.stop(); + } + } + }, _callee30, this); + })); + + function createFileMetadata(_x41) { + return _createFileMetadata.apply(this, arguments); + } + + return createFileMetadata; + }() + /** + * + * Updates the metadata attribute of a io.cozy.files + * Creates a new version of the file without having + * to upload again the file's content + * + * To see available content of the metadata attribute + * see : https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.files_metadata/ + * + * @param {string} id File id + * @param {object} metadata io.cozy.files.metadata attributes + * @returns {Promise<object>} io.cozy.files updated + */ + + }, { + key: "updateMetadataAttribute", + value: function () { + var _updateMetadataAttribute = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(id, metadata) { + var resp; + return _regenerator.default.wrap(function _callee31$(_context31) { + while (1) { + switch (_context31.prev = _context31.next) { + case 0: + _context31.next = 2; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject20(), id), { + data: { + type: 'io.cozy.files.metadata', + attributes: metadata + } + }); + + case 2: + resp = _context31.sent; + return _context31.abrupt("return", { + data: resp.data + }); + + case 4: + case "end": + return _context31.stop(); + } + } + }, _callee31, this); + })); + + function updateMetadataAttribute(_x42, _x43) { + return _updateMetadataAttribute.apply(this, arguments); + } + + return updateMetadataAttribute; + }() + /** + * Get the file mime-type based on its name + * + * @param {string} name - The file name + * @returns {string} the inferred file mime-type + */ + + }, { + key: "getFileTypeFromName", + value: function getFileTypeFromName(name) { + return _lite.default.getType(name) || CONTENT_TYPE_OCTET_STREAM; + } + /** + * + * This method should not be called directly to upload a file. + * You should use `createFile` + * + * @param {File|Blob|Stream|string|ArrayBuffer} dataArg file to be uploaded + * @param {string} path Uri to call the stack from. Something like + * `/files/${dirId}?Name=${name}&Type=file&Executable=${executable}&MetadataID=${metadataId}` + * @param {object} options Additional headers + * @param {string} method POST / PUT / PATCH + */ + + }, { + key: "doUpload", + value: function () { + var _doUpload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(dataArg, path, options) { + var method, + correctPath, + data, + isBuffer, + isFile, + isBlob, + isStream, + isString, + _ref9, + contentType, + contentLength, + checksum, + lastModifiedDate, + ifMatch, + sPath, + params, + name, + headers, + date, + resp, + _args32 = arguments; + + return _regenerator.default.wrap(function _callee32$(_context32) { + while (1) { + switch (_context32.prev = _context32.next) { + case 0: + method = _args32.length > 3 && _args32[3] !== undefined ? _args32[3] : 'POST'; + correctPath = path; + data = dataArg; + + if (data) { + _context32.next = 5; + break; + } + + throw new Error('missing data argument'); + + case 5: + // transform any ArrayBufferView to ArrayBuffer + if (data.buffer && data.buffer instanceof ArrayBuffer) { + data = data.buffer; + } + + isBuffer = typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer; + isFile = typeof File !== 'undefined' && data instanceof File; + isBlob = typeof Blob !== 'undefined' && data instanceof Blob; + isStream = data.readable === true && typeof data.pipe === 'function'; + isString = typeof data === 'string'; + + if (!(!isBuffer && !isFile && !isBlob && !isStream && !isString)) { + _context32.next = 13; + break; + } + + throw new Error('invalid data type'); + + case 13: + _ref9 = options || {}, contentType = _ref9.contentType, contentLength = _ref9.contentLength, checksum = _ref9.checksum, lastModifiedDate = _ref9.lastModifiedDate, ifMatch = _ref9.ifMatch; + + if (!contentType) { + if (typeof data === 'string') { + contentType = 'text/plain'; + } else { + if (data.type) { + // The type is specified in the file object + contentType = data.type; + } else { + // Extract the name from the correctPath and infer the type + sPath = correctPath.split('?'); + params = sPath.length > 1 ? sPath[1] : ''; + name = new URLSearchParams(params).get('Name'); + contentType = this.getFileTypeFromName(name.toLowerCase()); + } + } + } + + lastModifiedDate = lastModifiedDate || data.lastModified; + + if (lastModifiedDate) { + lastModifiedDate = new Date(lastModifiedDate); + } + + headers = { + 'Content-Type': contentType + }; + if (contentLength) headers['Content-Length'] = String(contentLength); + if (checksum) headers['Content-MD5'] = checksum; + + if (lastModifiedDate) { + date = lastModifiedDate.toISOString(); + correctPath = "".concat(correctPath, "&UpdatedAt=").concat(date, "&CreatedAt=").concat(date); + } + + if (ifMatch) headers['If-Match'] = ifMatch; + _context32.next = 24; + return this.stackClient.fetchJSON(method, correctPath, data, { + headers: headers, + onUploadProgress: options.onUploadProgress + }); + + case 24: + resp = _context32.sent; + return _context32.abrupt("return", { + data: normalizeFile(resp.data) + }); + + case 26: + case "end": + return _context32.stop(); + } + } + }, _callee32, this); + })); + + function doUpload(_x44, _x45, _x46) { + return _doUpload.apply(this, arguments); + } + + return doUpload; + }() + /** + * async findNotSynchronizedDirectories - Returns the list of directories not synchronized on the given OAuth client (mainly Cozy Desktop clients) — see https://docs.cozy.io/en/cozy-stack/not-synchronized-vfs/#get-datatypedoc-idrelationshipsnot_synchronizing + * + * @param {OAuthClient} oauthClient A JSON representing an OAuth client, with at least a `_type` and `_id` field. + * @param {object|null} options Pagination options + * @param {number|null} options.skip For skip-based pagination, the number of referenced files to skip. + * @param {number|null} options.limit For pagination, the number of results to return. + * @param {CouchDBViewCursor|null} options.cursor For cursor-based pagination, the index cursor. + * @param {boolean} options.includeFiles Include the whole file documents in the results list + * + * @returns {Array<object|IOCozyFolder>} The JSON API conformant response. + */ + + }, { + key: "findNotSynchronizedDirectories", + value: function () { + var _findNotSynchronizedDirectories = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(oauthClient) { + var _ref10, + _ref10$skip, + skip, + limit, + cursor, + _ref10$includeFiles, + includeFiles, + params, + path, + url, + resp, + _args33 = arguments; + + return _regenerator.default.wrap(function _callee33$(_context33) { + while (1) { + switch (_context33.prev = _context33.next) { + case 0: + _ref10 = _args33.length > 1 && _args33[1] !== undefined ? _args33[1] : {}, _ref10$skip = _ref10.skip, skip = _ref10$skip === void 0 ? 0 : _ref10$skip, limit = _ref10.limit, cursor = _ref10.cursor, _ref10$includeFiles = _ref10.includeFiles, includeFiles = _ref10$includeFiles === void 0 ? false : _ref10$includeFiles; + params = { + include: includeFiles ? 'files' : undefined, + 'page[limit]': limit, + 'page[cursor]': cursor, + sort: 'id' + }; + path = (0, _utils.uri)(_templateObject21(), oauthClient._type, oauthClient._id); + url = querystring.buildURL(path, params); + _context33.next = 6; + return this.stackClient.fetchJSON('GET', url); + + case 6: + resp = _context33.sent; + return _context33.abrupt("return", { + data: resp.data.map(function (f) { + return normalizeFile(f); + }), + included: resp.included ? resp.included.map(function (f) { + return normalizeFile(f); + }) : [], + next: (0, _has.default)(resp, 'links.next'), + meta: resp.meta, + skip: skip + }); + + case 8: + case "end": + return _context33.stop(); + } + } + }, _callee33, this); + })); + + function findNotSynchronizedDirectories(_x47) { + return _findNotSynchronizedDirectories.apply(this, arguments); + } + + return findNotSynchronizedDirectories; + }() + /** + * Add directory synchronization exclusions to an OAuth client — see https://docs.cozy.io/en/cozy-stack/not-synchronized-vfs/#post-datatypedoc-idrelationshipsnot_synchronizing + * + * For example, to exclude directory `/Photos` from `My Computer`'s desktop synchronization: + * ``` + * addNotSynchronizedDirectories({_id: 123, _type: "io.cozy.oauth.clients", clientName: "Cozy Drive (My Computer)", clientKind: "desktop"}, [{_id: 456, _type: "io.cozy.files", name: "Photos", path: "/Photos"}]) + * ``` + * + * @param {OAuthClient} oauthClient A JSON representing the OAuth client + * @param {Array} directories An array of JSON documents having a `_type` and `_id` fields and representing directories. + * + * Returns 204 No Content + */ + + }, { + key: "addNotSynchronizedDirectories", + value: function addNotSynchronizedDirectories(oauthClient, directories) { + var refs = directories.map(function (d) { + return { + id: d._id, + type: d._type + }; + }); + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject22(), oauthClient._type, oauthClient._id), { + data: refs + }); + } + /** + * Remove directory synchronization exclusions from an OAuth client — see https://docs.cozy.io/en/cozy-stack/not-synchronized-vfs/#delete-datatypedoc-idrelationshipsnot_synchronizing + * + * For example, to re-include directory `/Photos` into `My Computer`'s desktop synchronization: + * ``` + * removeNotSynchronizedDirectories({_id: 123, _type: "io.cozy.oauth.clients", clientName: "Cozy Drive (My Computer)", clientKind: "desktop"}, [{_id: 456, _type: "io.cozy.files", name: "Photos", path: "/Photos"}]) + * ``` + * + * @param {OAuthClient} oauthClient A JSON representing the OAuth client + * @param {Array} directories An array of JSON documents having a `_type` and `_id` field and representing directories. + * + * Returns 204 No Content + */ + + }, { + key: "removeNotSynchronizedDirectories", + value: function removeNotSynchronizedDirectories(oauthClient, directories) { + var refs = directories.map(function (d) { + return { + id: d._id, + type: d._type + }; + }); + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject23(), oauthClient._type, oauthClient._id), { + data: refs + }); + } + /** + * Use cozy-stack's _changes API for io.cozy.files + * Design docs are filtered by default, thus documents are retrieved in the + * response (includeDocs is set to true in the parameters of _changes). + * Deleted and trashed documents can be filtered on demand and files' paths + * can be requested as well. + * + * Since deleted and trashed documents are skipped by cozy-stack rather than + * CouchDB, when either option is set to true, the response can contain less + * documents than the defined limit. Thus one should rely solely on the + * `pending` result attribute to determine if more documents can be fetched or + * not. + * + * You should use fetchChangesRaw to call CouchDB's _changes API. + * + * @typedef {object} CouchOptions + * @property {string} since - Bookmark telling CouchDB from which point in time should changes be returned + * @property {number} limit - The maximum number of returned documents for one call + * @property {boolean} includeDocs - Whether or not complete documents should be returned + * + * @typedef {object} FetchChangesOptions + * @property {Array<string>} fields - The list of fields that should be returned for each document + * @property {boolean} includeFilePath - Whether to include the path of file changes (needs includeDocs to be true) + * @property {boolean} skipDeleted - Whether to skip changes for deleted documents + * @property {boolean} skipTrashed - Whether to skip changes for trashed documents (needs includeDocs to be true) + * + * @param {CouchOptions} couchOptions - Couch options for changes + * @param {FetchChangesOptions} options - Further options on the returned documents. By default, it is set to + * { includeFilePath: false, skipDeleted: false, skipTrashed: false } + * + * @typedef {object} FetchChangesReturnValue + * @property {string} newLastSeq + * @property {boolean} pending + * @property {Array<object>} documents + * @returns {FetchChangesReturnValue} + */ + + }, { + key: "fetchChanges", + value: function () { + var _fetchChanges = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() { + var couchOptions, + options, + opts, + params, + path, + url, + _yield$this$stackClie, + newLastSeq, + pending, + results, + _args34 = arguments; + + return _regenerator.default.wrap(function _callee34$(_context34) { + while (1) { + switch (_context34.prev = _context34.next) { + case 0: + couchOptions = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : {}; + options = _args34.length > 1 && _args34[1] !== undefined ? _args34[1] : {}; + opts = {}; + + if (typeof couchOptions !== 'object') { + opts.since = couchOptions; + + _logger.default.warn("fetchChanges use couchOptions as Object not a string, since is deprecated, please use fetchChanges({since: \"".concat(couchOptions, "\"}).")); + } else if (Object.keys(couchOptions).length > 0) { + Object.assign(opts, couchOptions); + } + + if (Object.keys(options).length > 0) { + Object.assign(opts, options); + + if (options.skipTrashed || options.includeFilePath) { + opts.includeDocs = true; + } + } + + params = _objectSpread(_objectSpread({}, (0, _omit.default)(opts, ['fields', 'includeDocs', 'includeFilePath', 'skipDeleted', 'skipTrashed'])), {}, { + fields: opts.fields ? opts.fields.join(',') : null, + include_docs: opts.includeDocs, + include_file_path: opts.includeFilePath, + skip_deleted: opts.skipDeleted, + skip_trashed: opts.skipTrashed + }); + path = (0, _utils.uri)(_templateObject24()); + url = querystring.buildURL(path, params); + _context34.next = 10; + return this.stackClient.fetchJSON('GET', url); + + case 10: + _yield$this$stackClie = _context34.sent; + newLastSeq = _yield$this$stackClie.last_seq; + pending = _yield$this$stackClie.pending; + results = _yield$this$stackClie.results; + return _context34.abrupt("return", { + newLastSeq: newLastSeq, + pending: pending, + results: results + }); + + case 15: + case "end": + return _context34.stop(); + } + } + }, _callee34, this); + })); + + function fetchChanges() { + return _fetchChanges.apply(this, arguments); + } + + return fetchChanges; + }() + }]); + return FileCollection; +}(_DocumentCollection2.default); + +var _default = FileCollection; +exports.default = _default; + +/***/ }), + +/***/ "H8OS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__("sVxE"); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + + +/***/ }), + +/***/ "HFC8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("kjpz"); + + + + + + + + + +var TRANSITION_DURATION = 4; // seconds + +var styles = function styles(theme) { + var getColor = function getColor(color) { + return theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["lighten"])(color, 0.62) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["darken"])(color, 0.5); + }; + + var backgroundPrimary = getColor(theme.palette.primary.main); + var backgroundSecondary = getColor(theme.palette.secondary.main); + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + overflow: 'hidden', + height: 4, + '@media print': { + colorAdjust: 'exact' + } + }, + + /* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */ + colorPrimary: { + backgroundColor: backgroundPrimary + }, + + /* Styles applied to the root and bar2 elements if `color="secondary"`; bar2 if `variant="buffer"`. */ + colorSecondary: { + backgroundColor: backgroundSecondary + }, + + /* Styles applied to the root element if `variant="determinate"`. */ + determinate: {}, + + /* Styles applied to the root element if `variant="indeterminate"`. */ + indeterminate: {}, + + /* Styles applied to the root element if `variant="buffer"`. */ + buffer: { + backgroundColor: 'transparent' + }, + + /* Styles applied to the root element if `variant="query"`. */ + query: { + transform: 'rotate(180deg)' + }, + + /* Styles applied to the additional bar element if `variant="buffer"`. */ + dashed: { + position: 'absolute', + marginTop: 0, + height: '100%', + width: '100%', + animation: '$buffer 3s infinite linear' + }, + + /* Styles applied to the additional bar element if `variant="buffer"` and `color="primary"`. */ + dashedColorPrimary: { + backgroundImage: "radial-gradient(".concat(backgroundPrimary, " 0%, ").concat(backgroundPrimary, " 16%, transparent 42%)"), + backgroundSize: '10px 10px', + backgroundPosition: '0 -23px' + }, + + /* Styles applied to the additional bar element if `variant="buffer"` and `color="secondary"`. */ + dashedColorSecondary: { + backgroundImage: "radial-gradient(".concat(backgroundSecondary, " 0%, ").concat(backgroundSecondary, " 16%, transparent 42%)"), + backgroundSize: '10px 10px', + backgroundPosition: '0 -23px' + }, + + /* Styles applied to the layered bar1 and bar2 elements. */ + bar: { + width: '100%', + position: 'absolute', + left: 0, + bottom: 0, + top: 0, + transition: 'transform 0.2s linear', + transformOrigin: 'left' + }, + + /* Styles applied to the bar elements if `color="primary"`; bar2 if `variant` not "buffer". */ + barColorPrimary: { + backgroundColor: theme.palette.primary.main + }, + + /* Styles applied to the bar elements if `color="secondary"`; bar2 if `variant` not "buffer". */ + barColorSecondary: { + backgroundColor: theme.palette.secondary.main + }, + + /* Styles applied to the bar1 element if `variant="indeterminate or query"`. */ + bar1Indeterminate: { + width: 'auto', + animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite' + }, + + /* Styles applied to the bar1 element if `variant="determinate"`. */ + bar1Determinate: { + transition: "transform .".concat(TRANSITION_DURATION, "s linear") + }, + + /* Styles applied to the bar1 element if `variant="buffer"`. */ + bar1Buffer: { + zIndex: 1, + transition: "transform .".concat(TRANSITION_DURATION, "s linear") + }, + + /* Styles applied to the bar2 element if `variant="indeterminate or query"`. */ + bar2Indeterminate: { + width: 'auto', + animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite' + }, + + /* Styles applied to the bar2 element if `variant="buffer"`. */ + bar2Buffer: { + transition: "transform .".concat(TRANSITION_DURATION, "s linear") + }, + // Legends: + // || represents the viewport + // - represents a light background + // x represents a dark background + '@keyframes indeterminate1': { + // |-----|---x-||-----||-----| + '0%': { + left: '-35%', + right: '100%' + }, + // |-----|-----||-----||xxxx-| + '60%': { + left: '100%', + right: '-90%' + }, + '100%': { + left: '100%', + right: '-90%' + } + }, + '@keyframes indeterminate2': { + // |xxxxx|xxxxx||-----||-----| + '0%': { + left: '-200%', + right: '100%' + }, + // |-----|-----||-----||-x----| + '60%': { + left: '107%', + right: '-8%' + }, + '100%': { + left: '107%', + right: '-8%' + } + }, + '@keyframes buffer': { + '0%': { + opacity: 1, + backgroundPosition: '0 -23px' + }, + '50%': { + opacity: 0, + backgroundPosition: '0 -23px' + }, + '100%': { + opacity: 1, + backgroundPosition: '-200px -23px' + } + } + }; +}; +/** + * ## ARIA + * + * If the progress bar is describing the loading progress of a particular region of a page, + * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy` + * attribute to `true` on that region until it has finished loading. + */ + +var LinearProgress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function LinearProgress(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + value = props.value, + valueBuffer = props.valueBuffer, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'indeterminate' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "value", "valueBuffer", "variant"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_8__["default"])(); + var rootProps = {}; + var inlineStyles = { + bar1: {}, + bar2: {} + }; + + if (variant === 'determinate' || variant === 'buffer') { + if (value !== undefined) { + rootProps['aria-valuenow'] = Math.round(value); + rootProps['aria-valuemin'] = 0; + rootProps['aria-valuemax'] = 100; + var transform = value - 100; + + if (theme.direction === 'rtl') { + transform = -transform; + } + + inlineStyles.bar1.transform = "translateX(".concat(transform, "%)"); + } else if (false) {} + } + + if (variant === 'buffer') { + if (valueBuffer !== undefined) { + var _transform = (valueBuffer || 0) - 100; + + if (theme.direction === 'rtl') { + _transform = -_transform; + } + + inlineStyles.bar2.transform = "translateX(".concat(_transform, "%)"); + } else if (false) {} + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(color))], className, { + 'determinate': classes.determinate, + 'indeterminate': classes.indeterminate, + 'buffer': classes.buffer, + 'query': classes.query + }[variant]), + role: "progressbar" + }, rootProps, { + ref: ref + }, other), variant === 'buffer' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.dashed, classes["dashedColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(color))]) + }) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.bar, classes["barColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, { + 'determinate': classes.bar1Determinate, + 'buffer': classes.bar1Buffer + }[variant]), + style: inlineStyles.bar1 + }), variant === 'determinate' ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(color))], classes.bar2Buffer] : classes["barColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(color))]), + style: inlineStyles.bar2 + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiLinearProgress' +})(LinearProgress)); + +/***/ }), + +/***/ "HHUO": +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = __webpack_require__("LRPZ"); +var ownKeys = __webpack_require__("f8cG"); +var toIObject = __webpack_require__("764U"); +var gOPD = __webpack_require__("Yfzq"); +var createProperty = __webpack_require__("jeSS"); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + + +/***/ }), + +/***/ "HIHn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("csMb"); +/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6Wbw"); + + +var withTheme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__["withThemeCreator"])({ + defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__["default"] +}); +/* harmony default export */ __webpack_exports__["default"] = (withTheme); + +/***/ }), + +/***/ "HIuA": +/***/ (function(module, exports, __webpack_require__) { + +var baseEach = __webpack_require__("67e+"); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; + + +/***/ }), + +/***/ "HKTt": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: '少於 1 秒', + other: '少於 {{count}} 秒' + }, + + xSeconds: { + one: '1 秒', + other: '{{count}} 秒' + }, + + halfAMinute: '半分鐘', + + lessThanXMinutes: { + one: '少於 1 分鐘', + other: '少於 {{count}} 分鐘' + }, + + xMinutes: { + one: '1 分鐘', + other: '{{count}} 分鐘' + }, + + xHours: { + one: '1 小時', + other: '{{count}} 小時' + }, + + aboutXHours: { + one: '大約 1 小時', + other: '大約 {{count}} 小時' + }, + + xDays: { + one: '1 天', + other: '{{count}} 天' + }, + + aboutXMonths: { + one: '大約 1 個月', + other: '大約 {{count}} 個月' + }, + + xMonths: { + one: '1 個月', + other: '{{count}} 個月' + }, + + aboutXYears: { + one: '大約 1 年', + other: '大約 {{count}} 年' + }, + + xYears: { + one: '1 年', + other: '{{count}} 年' + }, + + overXYears: { + one: '超過 1 年', + other: '超過 {{count}} 年' + }, + + almostXYears: { + one: '將近 1 年', + other: '將近 {{count}} 年' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return result + '內' + } else { + return result + '前' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "HROS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _api = __webpack_require__("VXXh"); + +Object.keys(_api).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _api[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _api[key]; + } + }); +}); + +var _utils = __webpack_require__("Lv97"); + +Object.keys(_utils).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _utils[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _utils[key]; + } + }); +}); + +var _view = __webpack_require__("7zRI"); + +Object.keys(_view).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _view[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _view[key]; + } + }); +}); + +/***/ }), + +/***/ "HWXE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _cloneDeep = _interopRequireDefault(__webpack_require__("IW7p")); + +var _AppCollection = _interopRequireWildcard(__webpack_require__("aXTZ")); + +var _AppToken = _interopRequireDefault(__webpack_require__("uJOE")); + +var _AccessToken = _interopRequireDefault(__webpack_require__("cPxT")); + +var _DocumentCollection = _interopRequireDefault(__webpack_require__("GSeB")); + +var _FileCollection = _interopRequireDefault(__webpack_require__("H7FL")); + +var _JobCollection = _interopRequireWildcard(__webpack_require__("mcp6")); + +var _KonnectorCollection = _interopRequireWildcard(__webpack_require__("9zvY")); + +var _SharingCollection = _interopRequireDefault(__webpack_require__("lVzG")); + +var _PermissionCollection = _interopRequireDefault(__webpack_require__("bhKv")); + +var _TriggerCollection = _interopRequireWildcard(__webpack_require__("Aqqx")); + +var _SettingsCollection = _interopRequireWildcard(__webpack_require__("l2/n")); + +var _NotesCollection = _interopRequireWildcard(__webpack_require__("RXc6")); + +var _OAuthClientsCollection = _interopRequireWildcard(__webpack_require__("vlkE")); + +var _ShortcutsCollection = _interopRequireWildcard(__webpack_require__("uxlv")); + +var _ContactsCollection = _interopRequireWildcard(__webpack_require__("+Yo8")); + +var _AppsRegistryCollection = _interopRequireWildcard(__webpack_require__("TBKv")); + +var _getIconURL2 = _interopRequireDefault(__webpack_require__("xxXf")); + +var _logDeprecate = _interopRequireDefault(__webpack_require__("TDQG")); + +var _xhrFetch = __webpack_require__("xHCa"); + +var _microee = _interopRequireDefault(__webpack_require__("GIvT")); + +var _errors = _interopRequireWildcard(__webpack_require__("twUa")); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +var _promiseCache = _interopRequireDefault(__webpack_require__("8Sc7")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var normalizeUri = function normalizeUri(uriArg) { + var uri = uriArg; + if (uri === null) return null; + + while (uri[uri.length - 1] === '/') { + uri = uri.slice(0, -1); + } + + return uri; +}; +/** + * Main API against the `cozy-stack` server. + */ + + +var CozyStackClient = /*#__PURE__*/function () { + function CozyStackClient(options) { + (0, _classCallCheck2.default)(this, CozyStackClient); + + var opts = _objectSpread({}, options); + + var token = opts.token, + _opts$uri = opts.uri, + uri = _opts$uri === void 0 ? '' : _opts$uri; + this.options = opts; + this.setUri(uri); + this.setToken(token); + this.konnectors = new _KonnectorCollection.default(this); + this.jobs = new _JobCollection.default(this); + this._promiseCache = new _promiseCache.default(); + } + + (0, _createClass2.default)(CozyStackClient, [{ + key: "isRevocationError", + value: function isRevocationError(err) { + var message = err === null || err === void 0 ? void 0 : err.message; + if (!message) return false; + if (_errors.default.CLIENT_NOT_FOUND.test(err.message) || _errors.default.UNREGISTERED_CLIENT.test(err.message)) return true; + } + /** + * Creates a {@link DocumentCollection} instance. + * + * @param {string} doctype The collection doctype. + * @returns {DocumentCollection} + */ + + }, { + key: "collection", + value: function collection(doctype) { + if (!doctype) { + throw new Error('CozyStackClient.collection() called without a doctype'); + } + + switch (doctype) { + case _AppCollection.APPS_DOCTYPE: + return new _AppCollection.default(this); + + case _KonnectorCollection.KONNECTORS_DOCTYPE: + return new _KonnectorCollection.default(this); + + case 'io.cozy.files': + return new _FileCollection.default(doctype, this); + + case 'io.cozy.sharings': + return new _SharingCollection.default(doctype, this); + + case 'io.cozy.permissions': + return new _PermissionCollection.default(doctype, this); + + case _ContactsCollection.CONTACTS_DOCTYPE: + return new _ContactsCollection.default(doctype, this); + + case _TriggerCollection.TRIGGERS_DOCTYPE: + return new _TriggerCollection.default(this); + + case _JobCollection.JOBS_DOCTYPE: + return new _JobCollection.default(this); + + case _SettingsCollection.SETTINGS_DOCTYPE: + return new _SettingsCollection.default(this); + + case _NotesCollection.NOTES_DOCTYPE: + return new _NotesCollection.default(this); + + case _OAuthClientsCollection.OAUTH_CLIENTS_DOCTYPE: + return new _OAuthClientsCollection.default(this); + + case _ShortcutsCollection.SHORTCUTS_DOCTYPE: + return new _ShortcutsCollection.default(this); + + case _AppsRegistryCollection.APPS_REGISTRY_DOCTYPE: + return new _AppsRegistryCollection.default(this); + + default: + return new _DocumentCollection.default(doctype, this); + } + } + /** + * Fetches an endpoint in an authorized way. + * + * @param {string} method The HTTP method. + * @param {string} path The URI. + * @param {object} [body] The payload. + * @param {object} [opts={}] Options for fetch + * @returns {object} + * @throws {FetchError} + */ + + }, { + key: "fetch", + value: function (_fetch) { + function fetch(_x, _x2, _x3) { + return _fetch.apply(this, arguments); + } + + fetch.toString = function () { + return _fetch.toString(); + }; + + return fetch; + }( /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(method, path, body) { + var opts, + options, + headers, + fullPath, + fetcher, + response, + _args = arguments; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + opts = _args.length > 3 && _args[3] !== undefined ? _args[3] : {}; + options = _objectSpread({}, opts); + options.method = method; + headers = options.headers = _objectSpread({}, opts.headers); + + if (method !== 'GET' && method !== 'HEAD' && body !== undefined) { + if (headers['Content-Type']) { + options.body = body; + } + } + + if (!headers.Authorization) { + headers.Authorization = this.getAuthorizationHeader(); + } // the option credentials:include tells fetch to include the cookies in the + // request even for cross-origin requests + // it is still prossible to enforce `credentials` value by providing one in the `opts` prop + + + options.credentials = options.credentials || 'include'; + fullPath = this.fullpath(path); + fetcher = (0, _xhrFetch.shouldXMLHTTPRequestBeUsed)(method, path, options) ? _xhrFetch.fetchWithXMLHttpRequest : fetch; + _context.prev = 9; + _context.next = 12; + return fetcher(fullPath, options); + + case 12: + response = _context.sent; + + if (!response.ok) { + this.emit('error', new _errors.FetchError(response, "".concat(response.status, " ").concat(response.statusText))); + } + + return _context.abrupt("return", response); + + case 17: + _context.prev = 17; + _context.t0 = _context["catch"](9); + + if (this.isRevocationError(_context.t0)) { + this.onRevocationChange(true); + } + + throw _context.t0; + + case 21: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[9, 17]]); + })); + + return function (_x4, _x5, _x6) { + return _ref.apply(this, arguments); + }; + }()) + }, { + key: "onTokenRefresh", + value: function onTokenRefresh(token) { + if (this.options && this.options.onTokenRefresh) { + this.options.onTokenRefresh(token); + } + } + }, { + key: "onRevocationChange", + value: function onRevocationChange(state) { + if (this.options && this.options.onRevocationChange) { + this.options.onRevocationChange(state); + } + } + /** + * Retrieves a new app token by refreshing the currently used token. + * + * @throws {Error} The client should already have an access token to use this function + * @throws {Error} The client couldn't fetch a new token + * @returns {Promise} A promise that resolves with a new AccessToken object + */ + + }, { + key: "refreshToken", + value: function () { + var _refreshToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var options, response, html, parser, doc, appNode, data, token, newToken; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (this.token) { + _context2.next = 2; + break; + } + + throw new Error('Cannot refresh an empty token'); + + case 2: + options = { + method: 'GET', + credentials: 'include' + }; + + if (global.document) { + _context2.next = 5; + break; + } + + throw new Error('Not in a web context, cannot refresh token'); + + case 5: + _context2.next = 7; + return fetch('/?refreshToken', options); + + case 7: + response = _context2.sent; + + if (response.ok) { + _context2.next = 10; + break; + } + + throw new Error("couldn't fetch a new token - response " + response.statusCode); + + case 10: + _context2.next = 12; + return response.text(); + + case 12: + html = _context2.sent; + parser = new DOMParser(); + doc = parser.parseFromString(html, 'text/html'); + + if (doc) { + _context2.next = 17; + break; + } + + throw Error("couldn't fetch a new token - doc is not html"); + + case 17: + appNode = doc.querySelector('div[role="application"]'); + + if (appNode) { + _context2.next = 20; + break; + } + + throw Error("couldn't fetch a new token - no div[role=application]"); + + case 20: + data = appNode.dataset.cozy ? JSON.parse(appNode.dataset.cozy) : _objectSpread({}, appNode.dataset); + token = data.token; + + if (token) { + token = token || data.cozyToken; + } + + if (token) { + _context2.next = 25; + break; + } + + throw Error("couldn't fetch a new token -- missing data-cozy or data-cozy-token attribute"); + + case 25: + newToken = new _AppToken.default(token); + this.setToken(newToken); + this.onTokenRefresh(newToken); + return _context2.abrupt("return", newToken); + + case 29: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function refreshToken() { + return _refreshToken.apply(this, arguments); + } + + return refreshToken; + }() + /** + * Fetches JSON in an authorized way. + * + * @param {string} method The HTTP method. + * @param {string} path The URI. + * @param {object} body The payload. + * @param {object} options Options + * @returns {object} + * @throws {FetchError} + */ + + }, { + key: "fetchJSON", + value: function () { + var _fetchJSON = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(method, path, body) { + var _this = this; + + var options, + _args3 = arguments; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + options = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {}; + _context3.prev = 1; + _context3.next = 4; + return this.fetchJSONWithCurrentToken(method, path, body, options); + + case 4: + return _context3.abrupt("return", _context3.sent); + + case 7: + _context3.prev = 7; + _context3.t0 = _context3["catch"](1); + + if (!(_errors.default.EXPIRED_TOKEN.test(_context3.t0.message) || _errors.default.INVALID_TOKEN.test(_context3.t0.message) || _errors.default.INVALID_TOKEN_ALT.test(_context3.t0.message))) { + _context3.next = 23; + break; + } + + _context3.prev = 10; + _context3.next = 13; + return this._promiseCache.exec(function () { + return _this.refreshToken(); + }, function () { + return 'refreshToken'; + }); + + case 13: + _context3.next = 18; + break; + + case 15: + _context3.prev = 15; + _context3.t1 = _context3["catch"](10); + throw _context3.t0; + + case 18: + _context3.next = 20; + return this.fetchJSONWithCurrentToken(method, path, body, options); + + case 20: + return _context3.abrupt("return", _context3.sent); + + case 23: + throw _context3.t0; + + case 24: + case "end": + return _context3.stop(); + } + } + }, _callee3, this, [[1, 7], [10, 15]]); + })); + + function fetchJSON(_x7, _x8, _x9) { + return _fetchJSON.apply(this, arguments); + } + + return fetchJSON; + }() + }, { + key: "fetchJSONWithCurrentToken", + value: function () { + var _fetchJSONWithCurrentToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(method, path, bodyArg) { + var options, + clonedOptions, + headers, + body, + resp, + contentType, + isJson, + data, + _args4 = arguments; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + options = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : {}; + //Since we modify the object later by adding in some case a + //content-type, let's clone this object to scope the modification + clonedOptions = (0, _cloneDeep.default)(options); + headers = clonedOptions.headers = clonedOptions.headers || {}; + headers['Accept'] = 'application/json'; + body = bodyArg; + + if (method !== 'GET' && method !== 'HEAD' && body !== undefined) { + if (!headers['Content-Type']) { + headers['Content-Type'] = 'application/json'; + body = JSON.stringify(body); + } + } + + _context4.next = 8; + return this.fetch(method, path, body, clonedOptions); + + case 8: + resp = _context4.sent; + contentType = resp.headers.get('content-type'); + isJson = contentType && contentType.indexOf('json') >= 0; + _context4.next = 13; + return isJson ? resp.json() : resp.text(); + + case 13: + data = _context4.sent; + + if (!resp.ok) { + _context4.next = 16; + break; + } + + return _context4.abrupt("return", data); + + case 16: + throw new _errors.FetchError(resp, data); + + case 17: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function fetchJSONWithCurrentToken(_x10, _x11, _x12) { + return _fetchJSONWithCurrentToken.apply(this, arguments); + } + + return fetchJSONWithCurrentToken; + }() + }, { + key: "fullpath", + value: function fullpath(path) { + if (path.startsWith('http')) { + return path; + } else { + return this.uri + path; + } + } + }, { + key: "getAuthorizationHeader", + value: function getAuthorizationHeader() { + return this.token ? this.token.toAuthHeader() : null; + } + }, { + key: "setCredentials", + value: function setCredentials(token) { + (0, _logDeprecate.default)('CozyStackClient::setCredentials is deprecated, use CozyStackClient::setToken'); + return this.setToken(token); + } + }, { + key: "getCredentials", + value: function getCredentials() { + (0, _logDeprecate.default)('CozyStackClient::getCredentials is deprecated, use CozyStackClient::getAuthorizationHeader'); + return this.getAuthorizationHeader(); + } + /** + * Change or set the API token + * + * @param {string|AppToken|AccessToken} token - Stack API token + */ + + }, { + key: "setToken", + value: function setToken(token) { + if (!token) { + this.token = null; + } else { + if (token.toAuthHeader) { + // AppToken or AccessToken + this.token = token; + } else if (typeof token === 'string') { + // jwt string + this.token = new _AppToken.default(token); + } else { + _logger.default.warn('Cozy-Client: Unknown token format', token); + + throw new Error('Cozy-Client: Unknown token format'); + } + + this.onRevocationChange(false); + } + } + /** + * Get the access token string, being an oauth token or an app token + * + * @returns {string} token + */ + + }, { + key: "getAccessToken", + value: function getAccessToken() { + return this.token && this.token.getAccessToken(); + } + }, { + key: "setUri", + value: function setUri(uri) { + this.uri = normalizeUri(uri); + } + }, { + key: "getIconURL", + value: function getIconURL(opts) { + return (0, _getIconURL2.default)(this, opts); + } + }]); + return CozyStackClient; +}(); + +_microee.default.mixin(CozyStackClient); + +var _default = CozyStackClient; +exports.default = _default; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "HZZ/": +/***/ (function(module, exports) { + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} + +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + + _next(undefined); + }); + }; +} + +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "HbL2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getReferencedFolder = exports.createFolderWithReference = exports.ensureMagicFolder = exports.MAGIC_FOLDERS = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _sortBy = _interopRequireDefault(__webpack_require__("PpCK")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _const = __webpack_require__("P3Kl"); + +var APP_DOCTYPE = 'io.cozy.apps'; +var administrative = 'administrative'; +var photos = 'photos'; +var MAGIC_FOLDERS = { + ADMINISTRATIVE: "".concat(APP_DOCTYPE, "/").concat(administrative), + PHOTOS: "".concat(APP_DOCTYPE, "/").concat(photos), + PHOTOS_BACKUP: "".concat(APP_DOCTYPE, "/").concat(photos, "/mobile"), + PHOTOS_UPLOAD: "".concat(APP_DOCTYPE, "/").concat(photos, "/upload"), + NOTES: "".concat(APP_DOCTYPE, "/notes"), + HOME: "".concat(APP_DOCTYPE, "/home"), + PAPERS: "".concat(APP_DOCTYPE, "/").concat(administrative, "/papers"), + COACH_CO2: "".concat(APP_DOCTYPE, "/").concat(administrative, "/coachco2") +}; +/** + * Returns a "Magic Folder", given its id. See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/#special-iocozyapps-doctypes + * + * @param {CozyClient} client cozy-client instance + * @param {string} id Magic Folder id. `CozyFolder.magicFolders` contains the + * ids of folders that can be magic folders. + * @param {string} path Default path to use if magic folder does not exist + * @returns {Promise<import("../types").IOCozyFolder>} Folder document + */ + +exports.MAGIC_FOLDERS = MAGIC_FOLDERS; + +var ensureMagicFolder = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, id, path) { + var magicFolderDocument, existingMagicFolder, magicFoldersValues; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + magicFolderDocument = { + _type: APP_DOCTYPE, + _id: id + }; + _context.next = 3; + return getReferencedFolder(client, magicFolderDocument); + + case 3: + existingMagicFolder = _context.sent; + + if (!existingMagicFolder) { + _context.next = 6; + break; + } + + return _context.abrupt("return", existingMagicFolder); + + case 6: + magicFoldersValues = Object.values(MAGIC_FOLDERS); + + if (magicFoldersValues.includes(id)) { + _context.next = 9; + break; + } + + throw new Error("Cannot create Magic folder with id ".concat(id, ". Allowed values are ").concat(magicFoldersValues.join(', '), ".")); + + case 9: + if (path) { + _context.next = 11; + break; + } + + throw new Error('Magic folder default path must be defined'); + + case 11: + return _context.abrupt("return", createFolderWithReference(client, path, magicFolderDocument)); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function ensureMagicFolder(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); +/** + * The next functions are considered private and only exported for unit tests + */ + +/** + * Create a folder with a reference to the given document + * + * @param {CozyClient} client - cozy-client instance + * @param {string} path - Folder path + * @param {import("../types").CozyClientDocument} document - Document to make reference to. Any doctype. + * @returns {Promise<import("../types").IOCozyFolder>} Folder document + */ + + +exports.ensureMagicFolder = ensureMagicFolder; + +var createFolderWithReference = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, path, document) { + var collection, dirId, _yield$collection$get, dirInfos; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + collection = client.collection(_const.DOCTYPE_FILES); + _context2.next = 3; + return collection.ensureDirectoryExists(path); + + case 3: + dirId = _context2.sent; + _context2.next = 6; + return collection.addReferencesTo(document, [{ + _id: dirId + }]); + + case 6: + _context2.next = 8; + return collection.get(dirId); + + case 8: + _yield$collection$get = _context2.sent; + dirInfos = _yield$collection$get.data; + return _context2.abrupt("return", dirInfos); + + case 11: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function createFolderWithReference(_x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Returns the most recent folder referenced by the given document + * + * @param {CozyClient} client cozy-client instance + * @param {import("../types").CozyClientDocument} document Document to get references from + * @returns {Promise<import("../types").IOCozyFolder>} Folder referenced by the given document + */ + + +exports.createFolderWithReference = createFolderWithReference; + +var getReferencedFolder = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client, document) { + var _yield$client$collect, included, foldersOutsideTrash; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return client.collection(_const.DOCTYPE_FILES).findReferencedBy(document); + + case 2: + _yield$client$collect = _context3.sent; + included = _yield$client$collect.included; + foldersOutsideTrash = included.filter(function (folder) { + return !/^\/\.cozy_trash/.test(folder.attributes.path); + }); // there can be multiple folders with the same reference in some edge cases + // when this happens we return the most recent one + + return _context3.abrupt("return", foldersOutsideTrash.length > 0 ? (0, _sortBy.default)(foldersOutsideTrash, 'created_at').pop() : null); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function getReferencedFolder(_x7, _x8) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.getReferencedFolder = getReferencedFolder; + +/***/ }), + +/***/ "Hbvh": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: '1초 미만', + other: '{{count}}초 미만' + }, + + xSeconds: { + one: '1초', + other: '{{count}}초' + }, + + halfAMinute: '30초', + + lessThanXMinutes: { + one: '1분 미만', + other: '{{count}}분 미만' + }, + + xMinutes: { + one: '1분', + other: '{{count}}분' + }, + + aboutXHours: { + one: '약 1시간', + other: '약 {{count}}시간' + }, + + xHours: { + one: '1시간', + other: '{{count}}시간' + }, + + xDays: { + one: '1일', + other: '{{count}}일' + }, + + aboutXMonths: { + one: '약 1개월', + other: '약 {{count}}개월' + }, + + xMonths: { + one: '1개월', + other: '{{count}}개월' + }, + + aboutXYears: { + one: '약 1년', + other: '약 {{count}}년' + }, + + xYears: { + one: '1년', + other: '{{count}}년' + }, + + overXYears: { + one: '1년 이상', + other: '{{count}}년 이상' + }, + + almostXYears: { + one: '거의 1년', + other: '거의 {{count}}년' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return result + ' 후' + } else { + return result + ' 전' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "HcOy": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("yta+") +var buildFormatLocale = __webpack_require__("A/Ua") + +/** + * @category Locales + * @summary Filipino locale. + * @author Ian De La Cruz [@RIanDeLaCruz]{@link https://github.com/RIanDeLaCruz} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "HdNd": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'] + var weekdays2char = ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'] + var weekdays3char = ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'] + var weekdaysFull = ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + 'e' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "Hf6u": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createBreakpoints; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); + + +// Sorted ASC by size. That's important. +// It can't be configured as it's used statically for propTypes. +var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification. + +function createBreakpoints(breakpoints) { + var _breakpoints$values = breakpoints.values, + values = _breakpoints$values === void 0 ? { + xs: 0, + sm: 600, + md: 960, + lg: 1280, + xl: 1920 + } : _breakpoints$values, + _breakpoints$unit = breakpoints.unit, + unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit, + _breakpoints$step = breakpoints.step, + step = _breakpoints$step === void 0 ? 5 : _breakpoints$step, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(breakpoints, ["values", "unit", "step"]); + + function up(key) { + var value = typeof values[key] === 'number' ? values[key] : key; + return "@media (min-width:".concat(value).concat(unit, ")"); + } + + function down(key) { + var endIndex = keys.indexOf(key) + 1; + var upperbound = values[keys[endIndex]]; + + if (endIndex === keys.length) { + // xl down applies to all sizes + return up('xs'); + } + + var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key; + return "@media (max-width:".concat(value - step / 100).concat(unit, ")"); + } + + function between(start, end) { + var endIndex = keys.indexOf(end); + + if (endIndex === keys.length - 1) { + return up(start); + } + + return "@media (min-width:".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")"); + } + + function only(key) { + return between(key, key); + } + + var warnedOnce = false; + + function width(key) { + if (false) {} + + return values[key]; + } + + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + keys: keys, + values: values, + up: up, + down: down, + between: between, + only: only, + width: width + }, other); +} + +/***/ }), + +/***/ "Hg8A": +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__("TQc+"); +var toObject = __webpack_require__("05TQ"); +var IObject = __webpack_require__("pTfQ"); +var toLength = __webpack_require__("yhnj"); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), + +/***/ "Hjxl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.USAGEEVENT_DOCTYPE = void 0; +var USAGEEVENT_DOCTYPE = 'com.grandlyon.ecolyo.usageevent'; +exports.USAGEEVENT_DOCTYPE = USAGEEVENT_DOCTYPE; + +/***/ }), + +/***/ "Hk8K": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return Scope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function() { return addGlobalEventProcessor; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("xTjI"); + + + +/** + * Default value for maximum number of breadcrumbs added to an event. + */ +const DEFAULT_MAX_BREADCRUMBS = 100; + +/** + * Holds additional event information. {@link Scope.applyToEvent} will be + * called by the client before an event will be sent. + */ +class Scope { + /** Flag if notifying is happening. */ + + /** Callback for client to receive scope changes. */ + + /** Callback list that will be called after {@link applyToEvent}. */ + + /** Array of breadcrumbs. */ + + /** User */ + + /** Tags */ + + /** Extra */ + + /** Contexts */ + + /** Attachments */ + + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + + /** Fingerprint */ + + /** Severity */ + // eslint-disable-next-line deprecation/deprecation + + /** Transaction Name */ + + /** Span */ + + /** Session */ + + /** Request Mode Session Status */ + + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + + constructor() { + this._notifyingListeners = false; + this._scopeListeners = []; + this._eventProcessors = []; + this._breadcrumbs = []; + this._attachments = []; + this._user = {}; + this._tags = {}; + this._extra = {}; + this._contexts = {}; + this._sdkProcessingMetadata = {}; + } + + /** + * Inherit values from the parent scope. + * @param scope to clone. + */ + static clone(scope) { + const newScope = new Scope(); + if (scope) { + newScope._breadcrumbs = [...scope._breadcrumbs]; + newScope._tags = { ...scope._tags }; + newScope._extra = { ...scope._extra }; + newScope._contexts = { ...scope._contexts }; + newScope._user = scope._user; + newScope._level = scope._level; + newScope._span = scope._span; + newScope._session = scope._session; + newScope._transactionName = scope._transactionName; + newScope._fingerprint = scope._fingerprint; + newScope._eventProcessors = [...scope._eventProcessors]; + newScope._requestSession = scope._requestSession; + newScope._attachments = [...scope._attachments]; + newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata }; + } + return newScope; + } + + /** + * Add internal on change listener. Used for sub SDKs that need to store the scope. + * @hidden + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + + /** + * @inheritDoc + */ + addEventProcessor(callback) { + this._eventProcessors.push(callback); + return this; + } + + /** + * @inheritDoc + */ + setUser(user) { + this._user = user || {}; + if (this._session) { + Object(_session_js__WEBPACK_IMPORTED_MODULE_1__["updateSession"])(this._session, { user }); + } + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + this._requestSession = requestSession; + return this; + } + + /** + * @inheritDoc + */ + setTags(tags) { + this._tags = { + ...this._tags, + ...tags, + }; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setTag(key, value) { + this._tags = { ...this._tags, [key]: value }; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setExtras(extras) { + this._extra = { + ...this._extra, + ...extras, + }; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setExtra(key, extra) { + this._extra = { ...this._extra, [key]: extra }; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + this._fingerprint = fingerprint; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setLevel( + // eslint-disable-next-line deprecation/deprecation + level, + ) { + this._level = level; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setTransactionName(name) { + this._transactionName = name; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setContext(key, context) { + if (context === null) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this._contexts[key]; + } else { + this._contexts[key] = context; + } + + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + setSpan(span) { + this._span = span; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + getSpan() { + return this._span; + } + + /** + * @inheritDoc + */ + getTransaction() { + // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will + // have a pointer to the currently-active transaction. + const span = this.getSpan(); + return span && span.transaction; + } + + /** + * @inheritDoc + */ + setSession(session) { + if (!session) { + delete this._session; + } else { + this._session = session; + } + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) { + return this; + } + + if (typeof captureContext === 'function') { + const updatedScope = (captureContext )(this); + return updatedScope instanceof Scope ? updatedScope : this; + } + + if (captureContext instanceof Scope) { + this._tags = { ...this._tags, ...captureContext._tags }; + this._extra = { ...this._extra, ...captureContext._extra }; + this._contexts = { ...this._contexts, ...captureContext._contexts }; + if (captureContext._user && Object.keys(captureContext._user).length) { + this._user = captureContext._user; + } + if (captureContext._level) { + this._level = captureContext._level; + } + if (captureContext._fingerprint) { + this._fingerprint = captureContext._fingerprint; + } + if (captureContext._requestSession) { + this._requestSession = captureContext._requestSession; + } + } else if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(captureContext)) { + // eslint-disable-next-line no-param-reassign + captureContext = captureContext ; + this._tags = { ...this._tags, ...captureContext.tags }; + this._extra = { ...this._extra, ...captureContext.extra }; + this._contexts = { ...this._contexts, ...captureContext.contexts }; + if (captureContext.user) { + this._user = captureContext.user; + } + if (captureContext.level) { + this._level = captureContext.level; + } + if (captureContext.fingerprint) { + this._fingerprint = captureContext.fingerprint; + } + if (captureContext.requestSession) { + this._requestSession = captureContext.requestSession; + } + } + + return this; + } + + /** + * @inheritDoc + */ + clear() { + this._breadcrumbs = []; + this._tags = {}; + this._extra = {}; + this._user = {}; + this._contexts = {}; + this._level = undefined; + this._transactionName = undefined; + this._fingerprint = undefined; + this._requestSession = undefined; + this._span = undefined; + this._session = undefined; + this._notifyScopeListeners(); + this._attachments = []; + return this; + } + + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + + // No data has been changed, so don't notify scope listeners + if (maxCrumbs <= 0) { + return this; + } + + const mergedBreadcrumb = { + timestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dateTimestampInSeconds"])(), + ...breadcrumb, + }; + this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs); + this._notifyScopeListeners(); + + return this; + } + + /** + * @inheritDoc + */ + clearBreadcrumbs() { + this._breadcrumbs = []; + this._notifyScopeListeners(); + return this; + } + + /** + * @inheritDoc + */ + addAttachment(attachment) { + this._attachments.push(attachment); + return this; + } + + /** + * @inheritDoc + */ + getAttachments() { + return this._attachments; + } + + /** + * @inheritDoc + */ + clearAttachments() { + this._attachments = []; + return this; + } + + /** + * Applies data from the scope to the event and runs all event processors on it. + * + * @param event Event + * @param hint Object containing additional information about the original exception, for use by the event processors. + * @hidden + */ + applyToEvent(event, hint = {}) { + if (this._extra && Object.keys(this._extra).length) { + event.extra = { ...this._extra, ...event.extra }; + } + if (this._tags && Object.keys(this._tags).length) { + event.tags = { ...this._tags, ...event.tags }; + } + if (this._user && Object.keys(this._user).length) { + event.user = { ...this._user, ...event.user }; + } + if (this._contexts && Object.keys(this._contexts).length) { + event.contexts = { ...this._contexts, ...event.contexts }; + } + if (this._level) { + event.level = this._level; + } + if (this._transactionName) { + event.transaction = this._transactionName; + } + + // We want to set the trace context for normal events only if there isn't already + // a trace context on the event. There is a product feature in place where we link + // errors with transaction and it relies on that. + if (this._span) { + event.contexts = { trace: this._span.getTraceContext(), ...event.contexts }; + const transactionName = this._span.transaction && this._span.transaction.name; + if (transactionName) { + event.tags = { transaction: transactionName, ...event.tags }; + } + } + + this._applyFingerprint(event); + + event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs]; + event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined; + + event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata }; + + return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint); + } + + /** + * Add data which will be accessible during event processing but won't get sent to Sentry + */ + setSDKProcessingMetadata(newData) { + this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }; + + return this; + } + + /** + * This will be called after {@link applyToEvent} is finished. + */ + _notifyEventProcessors( + processors, + event, + hint, + index = 0, + ) { + return new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SyncPromise"]((resolve, reject) => { + const processor = processors[index]; + if (event === null || typeof processor !== 'function') { + resolve(event); + } else { + const result = processor({ ...event }, hint) ; + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + processor.id && + result === null && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`Event processor "${processor.id}" dropped event`); + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isThenable"])(result)) { + void result + .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve)) + .then(null, reject); + } else { + void this._notifyEventProcessors(processors, result, hint, index + 1) + .then(resolve) + .then(null, reject); + } + } + }); + } + + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + // We need this check for this._notifyingListeners to be able to work on scope during updates + // If this check is not here we'll produce endless recursion when something is done with the scope + // during the callback. + if (!this._notifyingListeners) { + this._notifyingListeners = true; + this._scopeListeners.forEach(callback => { + callback(this); + }); + this._notifyingListeners = false; + } + } + + /** + * Applies fingerprint from the scope to the event if there's one, + * uses message if there's one instead or get rid of empty fingerprint + */ + _applyFingerprint(event) { + // Make sure it's an array first and we actually have something in place + event.fingerprint = event.fingerprint ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["arrayify"])(event.fingerprint) : []; + + // If we have something on the scope, then merge it with event + if (this._fingerprint) { + event.fingerprint = event.fingerprint.concat(this._fingerprint); + } + + // If we have no data at all, remove empty array default + if (event.fingerprint && !event.fingerprint.length) { + delete event.fingerprint; + } + } +} + +/** + * Returns the global event processors. + */ +function getGlobalEventProcessors() { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalSingleton"])('globalEventProcessors', () => []); +} + +/** + * Add a EventProcessor to be kept globally. + * @param callback EventProcessor to add + */ +function addGlobalEventProcessor(callback) { + getGlobalEventProcessors().push(callback); +} + + +//# sourceMappingURL=scope.js.map + + +/***/ }), + +/***/ "HkQ0": +/***/ (function(module, exports) { + +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."); +} + +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "HkU0": +/***/ (function(module, exports, __webpack_require__) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var stylesInDom = {}; + +var memoize = function (fn) { + var memo; + + return function () { + if (typeof memo === "undefined") memo = fn.apply(this, arguments); + return memo; + }; +}; + +var isOldIE = memoize(function () { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + return window && document && document.all && !window.atob; +}); + +var getTarget = function (target, parent) { + if (parent){ + return parent.querySelector(target); + } + return document.querySelector(target); +}; + +var getElement = (function (fn) { + var memo = {}; + + return function(target, parent) { + // If passing function in options, then use it for resolve "head" element. + // Useful for Shadow Root style i.e + // { + // insertInto: function () { return document.querySelector("#foo").shadowRoot } + // } + if (typeof target === 'function') { + return target(); + } + if (typeof memo[target] === "undefined") { + var styleTarget = getTarget.call(this, target, parent); + // Special case to return head of iframe instead of iframe itself + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch(e) { + styleTarget = null; + } + } + memo[target] = styleTarget; + } + return memo[target] + }; +})(); + +var singleton = null; +var singletonCounter = 0; +var stylesInsertedAtTop = []; + +var fixUrls = __webpack_require__("CqxI"); + +module.exports = function(list, options) { + if (typeof DEBUG !== "undefined" && DEBUG) { + if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); + } + + options = options || {}; + + options.attrs = typeof options.attrs === "object" ? options.attrs : {}; + + // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> + // tags it will allow on a page + if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE(); + + // By default, add <style> tags to the <head> element + if (!options.insertInto) options.insertInto = "head"; + + // By default, add <style> tags to the bottom of the target + if (!options.insertAt) options.insertAt = "bottom"; + + var styles = listToStyles(list, options); + + addStylesToDom(styles, options); + + return function update (newList) { + var mayRemove = []; + + for (var i = 0; i < styles.length; i++) { + var item = styles[i]; + var domStyle = stylesInDom[item.id]; + + domStyle.refs--; + mayRemove.push(domStyle); + } + + if(newList) { + var newStyles = listToStyles(newList, options); + addStylesToDom(newStyles, options); + } + + for (var i = 0; i < mayRemove.length; i++) { + var domStyle = mayRemove[i]; + + if(domStyle.refs === 0) { + for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); + + delete stylesInDom[domStyle.id]; + } + } + }; +}; + +function addStylesToDom (styles, options) { + for (var i = 0; i < styles.length; i++) { + var item = styles[i]; + var domStyle = stylesInDom[item.id]; + + if(domStyle) { + domStyle.refs++; + + for(var j = 0; j < domStyle.parts.length; j++) { + domStyle.parts[j](item.parts[j]); + } + + for(; j < item.parts.length; j++) { + domStyle.parts.push(addStyle(item.parts[j], options)); + } + } else { + var parts = []; + + for(var j = 0; j < item.parts.length; j++) { + parts.push(addStyle(item.parts[j], options)); + } + + stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; + } + } +} + +function listToStyles (list, options) { + var styles = []; + var newStyles = {}; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var css = item[1]; + var media = item[2]; + var sourceMap = item[3]; + var part = {css: css, media: media, sourceMap: sourceMap}; + + if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); + else newStyles[id].parts.push(part); + } + + return styles; +} + +function insertStyleElement (options, style) { + var target = getElement(options.insertInto) + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid."); + } + + var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1]; + + if (options.insertAt === "top") { + if (!lastStyleElementInsertedAtTop) { + target.insertBefore(style, target.firstChild); + } else if (lastStyleElementInsertedAtTop.nextSibling) { + target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling); + } else { + target.appendChild(style); + } + stylesInsertedAtTop.push(style); + } else if (options.insertAt === "bottom") { + target.appendChild(style); + } else if (typeof options.insertAt === "object" && options.insertAt.before) { + var nextSibling = getElement(options.insertAt.before, target); + target.insertBefore(style, nextSibling); + } else { + throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n"); + } +} + +function removeStyleElement (style) { + if (style.parentNode === null) return false; + style.parentNode.removeChild(style); + + var idx = stylesInsertedAtTop.indexOf(style); + if(idx >= 0) { + stylesInsertedAtTop.splice(idx, 1); + } +} + +function createStyleElement (options) { + var style = document.createElement("style"); + + if(options.attrs.type === undefined) { + options.attrs.type = "text/css"; + } + + if(options.attrs.nonce === undefined) { + var nonce = getNonce(); + if (nonce) { + options.attrs.nonce = nonce; + } + } + + addAttrs(style, options.attrs); + insertStyleElement(options, style); + + return style; +} + +function createLinkElement (options) { + var link = document.createElement("link"); + + if(options.attrs.type === undefined) { + options.attrs.type = "text/css"; + } + options.attrs.rel = "stylesheet"; + + addAttrs(link, options.attrs); + insertStyleElement(options, link); + + return link; +} + +function addAttrs (el, attrs) { + Object.keys(attrs).forEach(function (key) { + el.setAttribute(key, attrs[key]); + }); +} + +function getNonce() { + if (false) {} + + return __webpack_require__.nc; +} + +function addStyle (obj, options) { + var style, update, remove, result; + + // If a transform function was defined, run it on the css + if (options.transform && obj.css) { + result = typeof options.transform === 'function' + ? options.transform(obj.css) + : options.transform.default(obj.css); + + if (result) { + // If transform returns a value, use that instead of the original css. + // This allows running runtime transformations on the css. + obj.css = result; + } else { + // If the transform function returns a falsy value, don't add this css. + // This allows conditional loading of css + return function() { + // noop + }; + } + } + + if (options.singleton) { + var styleIndex = singletonCounter++; + + style = singleton || (singleton = createStyleElement(options)); + + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + + } else if ( + obj.sourceMap && + typeof URL === "function" && + typeof URL.createObjectURL === "function" && + typeof URL.revokeObjectURL === "function" && + typeof Blob === "function" && + typeof btoa === "function" + ) { + style = createLinkElement(options); + update = updateLink.bind(null, style, options); + remove = function () { + removeStyleElement(style); + + if(style.href) URL.revokeObjectURL(style.href); + }; + } else { + style = createStyleElement(options); + update = applyToTag.bind(null, style); + remove = function () { + removeStyleElement(style); + }; + } + + update(obj); + + return function updateStyle (newObj) { + if (newObj) { + if ( + newObj.css === obj.css && + newObj.media === obj.media && + newObj.sourceMap === obj.sourceMap + ) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +var replaceText = (function () { + var textStore = []; + + return function (index, replacement) { + textStore[index] = replacement; + + return textStore.filter(Boolean).join('\n'); + }; +})(); + +function applyToSingletonTag (style, index, remove, obj) { + var css = remove ? "" : obj.css; + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) style.removeChild(childNodes[index]); + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag (style, obj) { + var css = obj.css; + var media = obj.media; + + if(media) { + style.setAttribute("media", media) + } + + if(style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while(style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +function updateLink (link, options, obj) { + var css = obj.css; + var sourceMap = obj.sourceMap; + + /* + If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled + and there is no publicPath defined then lets turn convertToAbsoluteUrls + on by default. Otherwise default to the convertToAbsoluteUrls option + directly + */ + var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap; + + if (options.convertToAbsoluteUrls || autoFixUrls) { + css = fixUrls(css); + } + + if (sourceMap) { + // http://stackoverflow.com/a/26603875 + css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; + } + + var blob = new Blob([css], { type: "text/css" }); + + var oldSrc = link.href; + + link.href = URL.createObjectURL(blob); + + if(oldSrc) URL.revokeObjectURL(oldSrc); +} + + +/***/ }), + +/***/ "Hnrj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_createStarExport", function() { return _createStarExport; }); +/** + * Copy properties from an object into `exports`. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param obj The object containing the properties to copy. + */ +function _createStarExport(obj) { + Object.keys(obj) + .filter(key => key !== 'default' && key !== '__esModule' && !(key in exports)) + .forEach(key => (exports[key] = obj[key])); +} + +// Sucrase version: +// function _createStarExport(obj) { +// Object.keys(obj) +// .filter(key => key !== 'default' && key !== '__esModule') +// .forEach(key => { +// if (exports.hasOwnProperty(key)) { +// return; +// } +// Object.defineProperty(exports, key, { enumerable: true, get: () => obj[key] }); +// }); +// } + + +//# sourceMappingURL=_createStarExport.js.map + + +/***/ }), + +/***/ "HoPF": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("7ale") +var buildFormatLocale = __webpack_require__("BUJk") + +/** + * @category Locales + * @summary Arabic locale (Modern Standard Arabic - Al-fussha). + * @author Abdallah Hassan [@AbdallahAHO]{@link https://github.com/AbdallahAHO} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "HoPn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("asPl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Chip__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "HrfE": +/***/ (function(module, exports, __webpack_require__) { + +exports.parse = __webpack_require__("/Zih"); +exports.stringify = __webpack_require__("8P/a"); + + +/***/ }), + +/***/ "Hs6Q": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ECOGESTURE_DOCTYPE = void 0; +var ECOGESTURE_DOCTYPE = 'com.grandlyon.ecolyo.ecogesture'; +exports.ECOGESTURE_DOCTYPE = ECOGESTURE_DOCTYPE; + +/***/ }), + +/***/ "Hssr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var shadowKeyUmbraOpacity = 0.2; +var shadowKeyPenumbraOpacity = 0.14; +var shadowAmbientShadowOpacity = 0.12; + +function createShadow() { + return ["".concat(arguments.length <= 0 ? undefined : arguments[0], "px ").concat(arguments.length <= 1 ? undefined : arguments[1], "px ").concat(arguments.length <= 2 ? undefined : arguments[2], "px ").concat(arguments.length <= 3 ? undefined : arguments[3], "px rgba(0,0,0,").concat(shadowKeyUmbraOpacity, ")"), "".concat(arguments.length <= 4 ? undefined : arguments[4], "px ").concat(arguments.length <= 5 ? undefined : arguments[5], "px ").concat(arguments.length <= 6 ? undefined : arguments[6], "px ").concat(arguments.length <= 7 ? undefined : arguments[7], "px rgba(0,0,0,").concat(shadowKeyPenumbraOpacity, ")"), "".concat(arguments.length <= 8 ? undefined : arguments[8], "px ").concat(arguments.length <= 9 ? undefined : arguments[9], "px ").concat(arguments.length <= 10 ? undefined : arguments[10], "px ").concat(arguments.length <= 11 ? undefined : arguments[11], "px rgba(0,0,0,").concat(shadowAmbientShadowOpacity, ")")].join(','); +} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss + + +var shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)]; +/* harmony default export */ __webpack_exports__["default"] = (shadows); + +/***/ }), + +/***/ "Hsuv": +/***/ (function(module) { + +module.exports = JSON.parse("{\"common\":{\"title_app\":\"Ecolyo\",\"title_consumption\":\"Conso\",\"title_challenge\":\"Défis\",\"title_quiz\":\"Quiz\",\"title_exploration\":\"Exploration\",\"title_action\":\"Action\",\"title_duel\":\"Duel final\",\"title_ecogesture\":\"Astuce\",\"title_ecogestures\":\"Astuces\",\"title_ecogestures_choice\":\"Sélection des astuces\",\"title_options\":\"Options\",\"title_analysis\":\"Analyse\",\"title_profiletype\":\"Ajuster mon profil\",\"title_legal_notice\":\"Mentions légales\",\"title_gcu\":\"Conditions générales d’utilisation\",\"title_accessibility\":\"Accessibilité : non conforme\",\"title_sge_connect\":\"Connexion à l'électricité\",\"accessibility\":{\"loading\":\"Chargement\"}},\"navigation\":{\"consumption\":\"Conso\",\"challenges\":\"Défis\",\"ecogestures\":\"Astuces\",\"options\":\"Options\",\"analysis\":\"Analyse\"},\"FLUID\":{\"ELECTRICITY\":{\"NAME\":\"Électricité\",\"LABEL\":\"Électricité\",\"LABEL_PREPOSITION\":\"d'électricité\",\"UNIT\":\"kWh\",\"ADD\":\"Ajouter l'électricité\",\"MEGAUNIT\":\"MWh\",\"provider\":\"Enedis\"},\"WATER\":{\"NAME\":\"Eau\",\"LABEL\":\"Eau\",\"LABEL_PREPOSITION\":\"d'eau\",\"ADD\":\"Ajouter l'eau\",\"UNIT\":\"L\",\"MEGAUNIT\":\"m³\",\"provider\":\"Eau Publique du Grand Lyon\"},\"GAS\":{\"NAME\":\"Gaz\",\"LABEL\":\"Gaz\",\"LABEL_PREPOSITION\":\"de gaz\",\"ADD\":\"Ajouter le gaz\",\"UNIT\":\"kWh\",\"MEGAUNIT\":\"MWh\",\"provider\":\"GRDF\"},\"MULTIFLUID\":{\"NAME\":\"Multi fluide\",\"LABEL\":\"Multi\",\"UNIT\":\"€\"}},\"action\":{\"duration\":\"Durée : %{smartCount} jours\",\"result\":\"Résultat\",\"finished\":\"Défi terminé !\",\"details\":\"Détail de l'astuce\",\"apply\":\"J'applique cette action\",\"other\":\"Je choisis une autre action\",\"resultText1\":\"Cela n'a pas été trop difficile ?\",\"resultText2\":\"Jetez un coup d'œil dans la page conso dans 1 à 3 jours, le temps que vos données arrivent, pour voir l'impact de votre action.\",\"resultText3\":\"Pas de baisse de significative ? Pas de panique, en maintenant cette pratique dans le temps, les économies d'énergies et d'eau seront davantage visibles.\",\"resultText4\":\"Dans tous les cas, bravo, vous remportez...\",\"ok\":\"Ok\"},\"action_modal\":{\"accept\":\"Je relève le défi\",\"refuse\":\"Je me défile\",\"accessibility\":{\"window_title\":\"Fenêtre de confirmation\",\"button_accept\":\"Accepter\",\"button_refuse\":\"Refuser\"}},\"analysis\":{\"viewTitle\":\"Analyse\",\"warning_title\":\"Analyse incomplète\",\"warning_text\":\"Ecolyo n'a pas encore reçu toutes les données %{fluidList} pour ce mois\",\"comparison\":\"Comparatif\",\"analysis_date\":\"Conso totale\",\"challenge\":\"Défis terminés en\",\"user_consumption\":\"Votre conso\",\"average_home\":\"Conso moyenne d'un profil similaire\",\"average_home_description\":\"Le comparatif ici présenté est calculé sur la base d'un profil similaire au vôtre. Il s'agit d'un calcul et non d'une comparaison avec les autres utilisateurs de l'application. Sont pris en compte l'ensemble des informations entrées dans votre profil : mode de chauffage, âge du logement et éventuels travaux de rénovation, etc. Ce modèle a été créé avec l'Agence Locale de l'Energie sur la base de chiffres issues du Schéma Directeur des Energies de la Métropole de Lyon et de Chiffres-clé publiés par l'ADEME (l'Agence de l'Environnement et de la Maîtrise de l'Energie).\",\"approximative_description\":\"Pour comparer votre consommation avec un foyer similaire ou avec une conso idéale, veuillez détailler votre profil\",\"no_data\":\"Pas de données\",\"accessibility\":{\"button_go_to_profil\":\"Détailler mon profil\"},\"max_day\":\"Jour où vous avez le plus consommé\",\"compare\":{\"title\":\"Comparateur\",\"month_tab\":\"Comparer au mois dernier\",\"year_tab\":\"Comparer à l'année dernière\"}},\"analysis_error_modal\":{\"title\":\"Aucune analyse\",\"message\":\"Pour profiter d’une analyse de vos consommations, connectez au moins un de vos compteurs.\",\"go_to_conso\":\"Je connecte mes compteurs\",\"understood\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_understood\":\"J'ai compris\",\"button_goto_konnector\":\"Aller aux connecteurs\"}},\"analysis_pie\":{\"total\":\"Conso totale\",\"month\":\"Au mois \",\"estimation\":\"Comment sont estimés<br>les prix ?\"},\"special_elec\":{\"title\":\"Spécial Électricité\",\"average\":\"Conso moyenne\",\"weektype\":\"un jour de \",\"week\":\"semaine\",\"weekend\":\"week-end\",\"min\":\"Conso minimum\",\"percentage\":\"Part dans la facture\",\"price\":\"Soit\",\"maxPower\":\"Puissance maximum atteinte\",\"showModal\":\"Plus d'infos\"},\"elec_info_modal\":{\"accessibility\":{\"window_title\":\"electricity-info-modal\",\"button_close\":\"close-modal\"},\"title1\":\"Qu’est-ce que la consommation minimum ?\",\"title2\":\"Qu’est-ce que la puissance maximum ?\",\"text1\":\"Elle correspond à votre plus petite consommation du mois sur un créneau d'une demi-heure.\",\"text2\":\"Nous extrapolons cette consommation sur 1 mois afin vous donner un aperçu de la consommation de vos consommations électriques en veille (box, télé, chargeurs, ...) ou encore de celle, incompressible, de vos appareils de froid (frigo, congélateur).\",\"text3\":\"C’est la puissance maximum délivrée par tous les appareils fonctionnant au même moment dans votre logement.\",\"text4\":\"Vous avez choisi une puissance maximum dans votre offre d’électricité (3, 6 ou 9 kVA...) que vous ne devez pas dépasser pour ne pas faire sauter votre compteur. \",\"text5\":\"Cette puissance varie d'un mois à l'autre, regardez cette valeur sur l'ensemble de l'année pour vérifier si votre puissance souscrite correspond bien à votre usage.\"},\"auth\":{\"enedissgegrandlyon\":{\"title\":\"Ecolyo doit se connecter à l’électricité\",\"bill\":\"Munissez-vous d’une <span>facture d’électricité</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'électricité\",\"accessibility\":{\"connect\":\"Se connecter\"},\"identityTitle\":\"Nom inscrit sur la facture\",\"firstName\":\"Prénom\",\"lastName\":\"Nom\",\"pdlTitle\":\"Numéro de votre compteur électrique (PDL)\",\"pdlLabel\":\"N° (14 chiffres)\",\"pdlHint\":\"Où trouver le n° de PDL ?\",\"pdlModal\":{\"txt1\":\"Où trouver le n° de PDL ou PRM ?\",\"txt2\":\"Le numéro de PDL ou PRM se compose de 14 chiffres.\",\"txt3\":\"Votre numéro de PDL ou PRM se trouve sur votre facture d’électricité.\",\"txt4\":\"Si vous avez un compteur Linky, appuyez sur le bouton “+” et faites défiler l’affichage jusqu’à obtenir l’affichage suivant :\"},\"addressTitle\":\"Adresse du titulaire\",\"address\":\"Numéro et voie\",\"zipCode\":\"Code postal\",\"city\":\"Ville\",\"headConsent\":\"En acceptant de partager vos données, celles-ci seront directement transférées à Ecolyo à l’intérieur de votre cloud personnel, sans que la Métropole n’y accède ni ne les visualise.\",\"textConsent\":\"Afin de vous offrir des fonctionnalités de visualisation et d'analyse, Ecolyo a besoin des données suivantes : \",\"consentLi1\":\"L'historique et le relevé de vos consommations quotidiennes en kWh\",\"consentLi2\":\"L'historique et le relevé de vos consommations au pas de temps 30 minutes\",\"consentLi3\":\"Les puissances maximales atteintes quotidiennement\",\"consentLi4\":\"Les données contractuelles (début de contrat et puissance souscrite)\",\"consentCheck1\":\"Je consens à partager les données personnelles ci-dessus pour une durée d'<span>un an</span>\",\"consentCheck2\":\"J’atteste être le titulaire du point de livraison (PDL) renseigné à l’étape précédente\",\"modalHint\":{\"accessibility\":\"Titre de la modale\",\"title\":\"Où trouver le n° de PDL ?\",\"button\":\"J'ai compris\",\"button-accessibility\":\"Bouton valider\"}},\"grdfgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture de gaz</span> pour valider la connexion\",\"connect\":\"Je me connecte au gaz\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"label\":\"Je donne mon accord via mon compte GRDF\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter au gaz\"},\"with_account\":{\"title\":\"Votre compte GRDF a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur de gaz et Ecolyo !\"},\"step1\":{\"info1\":\"Un <span>compte chez GRDF</span> est nécessaire pour vous connecter au gaz <span>quelque soit votre fournisseur de gaz</span>.\",\"info2\":\"<p>GRDF est le gestionnaire de réseau. C'est lui qui est responsable de votre compteur Gazpar et de la collecte des données de consommation.</p>\",\"info3\":\"Possédez-vous un <span>compte GRDF</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"step3\":{\"info1\":\"La visualisation de vos données sur Ecolyo demande l'activation du <span>partage de toutes les données.</span>\",\"info2\":\"Pour une expérience optimale, <span>une période de consentement de 1 an</span> est recommandée à partir d’aujourd’hui.\",\"info3\":\"<p>Veillez également à indiquer une date antérieure pour l'historique (1er calendrier) afin de pouvoir récupérer jusqu'à 3 ans d'historique.</p>\"},\"button_go_to_partner_site\":\"Aller sur GRDF\"},\"eglgrandlyon\":{\"bill\":\"Munissez-vous d’une <span>facture d'eau</span> pour valider la connexion\",\"connect\":\"Je me connecte à l'eau\",\"accessibility\":{\"connect\":\"Se connecter\"},\"connect_form\":{\"login\":\"Identifiant (7 chiffres)\",\"password\":\"Mot de passe\",\"label\":\"Je connecte Ecolyo à mon compte Eau Publique du Grand Lyon\"},\"no_account\":{\"title\":\"Ecolyo doit se connecter à l'eau\"},\"with_account\":{\"title\":\"Votre compte Eau Publique du Grand Lyon a bien été créé ?\",\"subtitle1\":\"Plus qu’à donner votre accord pour connecter votre compteur d'eau et Ecolyo !\"},\"step1\":{\"info1\":\"La connexion se fait via <span>votre compte Eau Publique du Grand Lyon</span>.\",\"info2\":\"Possédez-vous un <span>compte Eau Publique du Grand Lyon</span> ?\"},\"step2\":{\"info1\":\"Une fois votre compte créé, <span>n'oubliez pas de revenir sur Ecolyo</span> pour finaliser la connexion.\"},\"button_go_to_partner_site\":\"Aller sur EPGL\"},\"connect_oauth\":{\"loading\":\"Chargement...\"},\"accessibility\":{\"button_reveal_password\":\"Afficher le mot de passe\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"window_title\":\"Fenêtre d'information sur la création de compte.\",\"button_close\":\"Fermer la fenêtre.\"},\"button_previous\":\"Précédent\",\"button_connect\":\"Se connecter\",\"button_create_account\":\"Se créer un compte\",\"button_has_account\":\"J'ai déjà un compte\",\"button_validate\":\"J'ai compris\",\"button_showOfflineData\":\"Voir mes anciennes données\",\"warningOfflineData\":\"Attention, vous visualisez d’anciennes données. Pour actualiser vos données, connectez votre compteur\"},\"challenge\":{\"card\":{\"ongoing\":{\"quiz\":\"Quiz\",\"exploration\":\"Explorations\",\"action\":\"Actions\",\"duel\":\"Duel Final\",\"result\":\"Résultat\",\"duelDone\":\"du duel final\"},\"locked\":{\"desc\":\"À débloquer en terminant le défi précédent\"}},\"card_done\":{\"saving\":\"Économie de\",\"depense\":\"Dépense de\",\"win\":\"Gagné\",\"lost\":\"Perdu\",\"final_defi\":\"sur le duel final\",\"final_defi_view\":\"Revoir le duel final\",\"reset_defi\":\"Relancer le défi\"},\"card_last\":{\"title\":\"Tous les défis sont terminés\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"button\":\"Suggérer une idée de défi\"},\"card_unlocked\":{\"button_launch\":\"Lancer le défi\"},\"accessibility\":{\"button_launch\":\"Lancer le défi\",\"button_goto_konnector\":\"Aller aux connecteurs\",\"button_slider_previous\":\"Précédent\",\"button_slider_next\":\"Suivant\"}},\"challenge_no_fluid_modal\":{\"title\":\"Oups !\",\"content\":\"Connectez au moins 1 fluide pour pouvoir jouer\",\"button_validate\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Valider\"}},\"consumption\":{\"display_last_data\":\"Voir mes dernières consos\",\"accessibility\":{\"button_previous_period\":\"Afficher la période précédente\",\"button_next_period\":\"Afficher la période suivante\",\"button_previous_value\":\"Sélectionner la valeur précédente\",\"button_next_value\":\"Sélectionner la valeur suivante\",\"checkbox_compare\":\"Afficher ou cacher la comparaison\"},\"partner_issue_modal\":{\"title\":\"Attention !\",\"error_connect_gaz\":\"La connexion à vos données de <span class='gaz'>gaz</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='gaz'>GRDF</span> ou dans notre service)\",\"error_connect_elec\":\"La connexion à vos données d'<span class='elec'>électricité</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='elec'>Enedis</span> ou dans notre service)\",\"error_connect_water\":\"La connexion à vos données d'<span class='water'>eau</span> est actuellement dysfonctionnelle (Maintenance chez notre partenaire <span class='water'>Eau Publique du Grand Lyon</span> ou dans notre service)\",\"additional_text\":\"La visualisation et/ou la connexion à vos données de consommation peut s'en trouver affectée.<br /><br /><i>Merci pour votre patience en attendant un retour à la normale :)</i>\",\"ok\":\"Ok\"},\"compared\":\"Comparé\"},\"consumption_details\":{\"detail\":\"Détail par fluide\",\"connect\":\"Connecter d'autres fluides\",\"mini_cards_label\":\"AUTRES ENERGIES\"},\"consumption_visualizer\":{\"missing_data\":\"Données manquantes\",\"no_data\":\"Pas de données\",\"why_no_data\":\"Pourquoi n'ai-je pas de données ?\",\"last_valid_data\":\"Dernières données valides : %{date}\",\"last_available_data\":\"Dernières données disponibles : %{date}\",\"last_valid_data_multi\":\"Dernières données complètes : %{date}\",\"data_to_come\":\"À venir\",\"aie\":\"Aïe !\",\"data_empty\":\"Vide\",\"estimated\":\"estimés\",\"dataModal\":{\"list_title\":\"3 raisons possibles :\",\"item1\":\"le lien entre Ecolyo et le fournisseur de données est rompu : une mise à jour de ce lien (en bas de la page) peut résoudre ce problème.\",\"item2\":\"un problème technique chez votre gestionnaire : se connecter directement chez ce gestionnaire pour vérifier que cette donnée apparaît.\",\"item3\":\"pour le gaz : vous n'avez pas autorisé Ecolyo à accéder aux données de consommation de cette période.\",\"item4\":\"vous n'aviez tout simplement pas de compteur communicant à l'époque !\"},\"modal\":{\"window_title\":\"info estimation des prix\",\"title\":\"Comment sont estimés les prix ?\",\"close\":\"Fermer la fenêtre\",\"part1\":\"Le prix de votre électricité ou de votre gaz dépend de l'offre choisie auprès de votre fournisseur. N’ayant pas accès à cette information, Ecolyo affiche un prix moyen par fluide. \",\"part2\":\"Tarifs moyens retenus :\",\"list1\":\" : 1 kWh = %{elecPrice} €TTC (il correspond au tarif réglementé d’EDF au %{elecPriceStartDate} pour une puissance souscrite de 3 ou 6 kVA et hors offre heure pleine/heure creuse)\",\"list2\":\" : 1 kWh = %{gasPrice} €TTC (tarif réglementé de vente au %{gasPriceStartDate} pour un consommateur soutirant moins de 6 MWh par an)\",\"list3\":\" : 1 litre d’eau = %{waterPrice} € TTC (prix constaté au %{waterPriceStartDate} pour un abonnement et une consommation de 120 m3/an sur la Métropole de Lyon)\",\"part3\":\"Le coût de votre abonnement n'est pas pris en compte dans Ecolyo.\"},\"release_notes_modal\":{\"title\":\"Du nouveau sur Ecolyo !\",\"message\":\"Les mises à jour suivantes ont été effectuées sur votre application :\",\"go_back\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre de notifications\",\"button_go_back\":\"J'ai compris\"}}},\"ecogestures\":{\"loading\":\"Chargement des astuces\"},\"duel\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"average_info\":\"%{average} euros étant votre moyenne actuelle, relevez-vous le défi ?\",\"button_start\":\"Allons-y !\",\"goal1\":\"Faites moins que votre moyenne actuelle sur %{durationInDays} jours\",\"goal2\":\"pour gagner le badge %{title}\",\"goal_done\":\"Duel remporté\",\"goal_failed\":\"Duel perdu\",\"caption_average\":\"Votre moyenne à titre indicatif\",\"caption_consumption\":\"Votre consommation\",\"caption_incoming\":\"Données à venir\",\"accessibility\":{\"button_go_back\":\"Retour\",\"button_start_duel\":\"Lancer le duel\",\"button_start_quiz\":\"Lancer le quiz\"}},\"duel_result_modal\":{\"success\":{\"title\":\"Félicitations\",\"message1\":\"Vous avez économisé %{value} €\",\"message2\":\"et gagné le badge %{title} !\",\"button_validate\":\"Youpi\"},\"lost\":{\"title\":\"Presque\",\"message1\":\"Vous avez dépassé de %{value} €\",\"message2\":\"et manqué le badge %{title}\",\"button_validate\":\"Zut alors\"},\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_validate\":\"Valider\"}},\"last_duel_modal\":{\"title\":\"Félicitations !\",\"subtitle\":\"Vous avez terminé tous les défis !\",\"message1\":\"Nous travaillons actuellement à vous proposer de nouveaux défis.\",\"message2\":\"Vous pouvez donner votre avis sur ce que vous aimeriez en cliquant sur la bulle d'aide.\"},\"duel_empty_value_modal\":{\"title\":\"Oups !\",\"message\":\"Impossible de lancer le duel. Il nous manque en effet certaines de vos données de consommation pour vous proposer un duel à votre hauteur.\",\"button\":\"Je retourne au menu des défis\",\"accessibility\":{\"window_title\":\"Fenêtre d'erreur\",\"button_validate\":\"Retourner au menu des défis\"}},\"ecogesture\":{\"title_tab_0\":\"Objectifs\",\"title_tab_1\":\"Je fais déjà\",\"title_tab_2\":\"Toutes\",\"MENU_TITLE\":\"Filtrer\",\"ALL\":\"Tous les usages\",\"HEATING\":\"Chauffage\",\"AIR_CONDITIONING\":\"Climatisation\",\"ECS\":\"Eau chaude\",\"COLD_WATER\":\"Eau froide\",\"ELECTRICITY_SPECIFIC\":\"Électricité courante\",\"COOKING\":\"Cuisson\",\"selection\":\"Sélectionner les astuces les plus adaptées à votre consommation\",\"selection_2\":\"vues sur\",\"button_selection\":\"Continuer ma sélection\",\"no_ecogesture\":\"Aucune astuce ne correspond à votre filtrage\",\"no_ecogesture_filter\":{\"text1\":\"Nous n'avons pas trouvé d'astuces adaptées à votre profil dans cette catégorie.\",\"text2\":\"En effet, de par votre profil et vos modes de chauffage, d'eau ou d'eau chaude sanitaire, nous n'avons pas identifié d’astuces vous permettant de diminuer vos factures à titre individuel. Toutefois, vous pouvez toujours agir pour préserver les ressources en appliquant et diffusant autour de vous les autres bonnes pratiques présentées dans la partie \\\"Toutes les astuces\\\".\"},\"adjust_profil\":{\"description\":\"Pour une sélection d’astuces adaptée à votre consommation, vous pouvez ajuster votre profil.\",\"button_go_to_profil\":\"Ajuster mon profil\"},\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_selection\":\"Aller à la page de sélection\"},\"doing\":\"Je fais déjà\",\"objective\":\"Objectif\",\"emptyList\":{\"obj1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes.\",\"obj1_done\":\"Aucune astuce n’a été sélectionnée comme objectif actuellement.\",\"obj2\":\"Vous pouvez sélectionner ceux à mettre en objectifs et ceux que vous appliquez déjà.\",\"obj2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous souhaitez garder en objectif dans cette section.\",\"doing1\":\"Aucune astuce n’a été sélectionnée dans la catégorie appliquée actuellement.\",\"doing1_done\":\"Aucune astuce n’est indiquée comme déjà appliquée actuellement.\",\"doing2\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"doing2_done\":\"Vous pouvez consulter toutes les astuces et ajouter celles que vous mettez déjà en pratique dans cette section.\",\"btn1\":\"Voir toutes les astuces\",\"btn2\":\"Sélectionner\"},\"initModal\":{\"title\":\"Sélectionner mes astuces\",\"text1\":\"Les astuces présentées sont des actions qui vous permettent de réduire vos consommations et donc vos factures. On parle parfois d’écogestes \",\"text2\":\"Vous pouvez sélectionner celles à mettre en objectifs et celles que vous appliquez déjà.\",\"text3\":\"Afin de pré-sélectionner les astuces correspondant à votre consommation, merci de répondre à quelques rapides questions.\",\"btn1\":\"Plus tard\",\"btn2\":\"C'est parti !\"},\"reinit\":\"Réinitialiser ma sélection\",\"reinitModal\":{\"title_part1\":\"Cette action\",\"title_part2\":\"supprimera votre liste d’astuces\",\"title_part3\":\"sélectionnées dans\",\"title_part4\":\"“Objectifs”\",\"title_part5\":\"et\",\"title_part6\":\"“Je fais déjà”\",\"text1\":\"Vous pourrez ensuite faire une nouvelle sélection adaptée à votre consommation.\",\"text2\":\"Souhaitez-vous réinitialiser votre sélection d’astuces ?\",\"btn1\":\"Non\",\"btn2\":\"Réinitialiser\"}},\"ecogesture_modal\":{\"title_ecogesture\":\"Astuce\",\"title_action\":\"Action\",\"efficiency\":\"Efficacité\",\"show_less\":\"Voir moins\",\"show_more\":\"Voir plus\",\"select_action\":\"Je choisis cette action\",\"accessibility\":{\"window_title_ecogesture\":\"Fenêtre astuce\",\"window_title_action\":\"Fenêtre action\",\"button_close\":\"Fermer la fenêtre\",\"button_select_action\":\"Sélectionner cette action\",\"button_see_more_detail\":\"Afficher plus de détails\"}},\"ecogesture_info_modal\":{\"header\":\"Comment sont choisis les astuces adaptées à mon profil ?\",\"text\":\"Les astuces adaptés à votre profil sont aujourd’hui choisies en fonction des compteurs individuels que vous possédez (communicants ou non). Ceux présentés ici vous permettent d'agir sur vos consommations individuelles. Des modes de tri plus personnalisables seront proposés à l'avenir.\",\"button_close\":\"J'ai compris\",\"accessibility\":{\"window_title\":\"Fenêtre d'information\",\"button_close\":\"Fermer la fenêtre\"}},\"ecogesture_form\":{\"heating_type\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"}},\"ecogesture_profile\":{\"equipments\":{\"question\":\"Quels équipements possédez-vous ?\",\"hint\":\"Plusieurs réponses possibles\",\"air_conditioning\":\"Climatisation\",\"computer\":\"Ordinateur\",\"microwave\":\"Micro-ondes\",\"oven\":\"Four\",\"washing_machine\":\"Lave-linge\",\"dishwasher\":\"Lave-vaisselle\",\"cooking_plates\":\"Plaques électriques\",\"garden\":\"Jardin\",\"dryer\":\"Sèche-linge\",\"refregirator\":\"Réfrigérateur\",\"fan\":\"Ventilateur\",\"water_heater\":\"Chauffe-eau\",\"curtain\":\"Rideaux\",\"internet_box\":\"Box internet\",\"ventilation\":\"VMC\",\"freezer\":\"Congélateur\",\"boiler\":\"Chaudière\",\"hydraulic_heating\":\"Chauffage hydraulique\",\"accessible_label\":\"Sélection d'équipement\"}},\"ecogesture_selection\":{\"header\":\"Sélection des astuces\",\"title\":\"Vous avez parcouru un groupe de %{smartCount} astuces\",\"text\":\"Voulez-vous continuer sur votre lancée ou remettre cette sélection à plus tard ?\",\"title_final\":\"Félicitations !\",\"text_final_1\":\"Vous avez terminé la sélection des astuces adaptées à votre consommation.\",\"text_final_2\":\"Vous pouvez les retrouver dans les sections “Objectifs” et “Je fais déjà” selon que vous les pratiquiez déjà ou non.\",\"button_go_to_ecogesture\":\"Plus tard\",\"button_ok\":\"J'ai compris\",\"button_continue\":\"Poursuivre\",\"button_objective\":\"Objectif\",\"button_doing\":\"Je fais déjà\",\"button_skip\":\"Pas intéressé\",\"accessibility\":{\"window_title\":\"Fenêtre d'information'\",\"button_close\":\"Fermer la fenêtre\",\"button_go_to_ecogesture\":\"Retourner aux astuces\",\"button_continue\":\"Poursuivre\",\"button_ok\":\"Fermer la sélection\"},\"selectionModal\":{\"title\":\"Des astuces correspondant à votre profil ont été trouvées !\",\"text\":\"À vous de choisir celles que vous souhaitez mettre en objectif et celles que vous faites déjà.\",\"button_close\":\"C'est parti !\"}},\"exploration\":{\"global_error\":\"Oups. Une erreur est survenue. Veuillez retourner à l'écran d’accueil des défis\",\"button_go_back\":\"Retour\",\"button_already_done\":\"C’est déjà fait !\",\"button_come_back\":\"Je reviens quand cela sera fait\",\"button_start\":\"C'est parti !\",\"watch_consumption\":\"Je fonce\",\"congratulation\":\"Bravo !\",\"earn\":\"Vous remportez\",\"button_confirm\":\"Ok\",\"interval\":{\"explanation\":\"Vous pouvez vérifier cette informations sur l'écran Conso.\"},\"accessibility\":{\"button_already_done\":\"Marquer l'exploration comme déjà réalisée\",\"button_confirm\":\"Valider\",\"button_come_back\":\"Fermer l'exploration\",\"button_go_back\":\"Retour\",\"button_start\":\"Lancer l'exploration\"}},\"error_page\":{\"main\":\"Erreur\",\"back\":\"Retour\",\"no_ecogesture\":\"Oups ! Nous n'avons pas trouvé l'astuce demandée.\"},\"help\":{\"title_help\":\"une question ? un problème ? une suggestion ?\",\"read_help\":\"Nous écrire via le Service d'Assistance Utilisateur\"},\"feedback\":{\"title\":\"Vous allez contacter le Service Assistance Utilisateur du Grand Lyon.\",\"text1\":\"Vous pourrez nous remonter un problème, chercher de l'aide pour vous connecter plus facilement, ou encore nous partager une bonne idée d'évolution.\",\"text2\":\"N'hésitez pas à nous écrire ! L'équipe Ecolyo vous répondra avec plaisir :)\",\"later\":\"Plus tard\",\"lets_go\":\"J'y vais\",\"accessibility\":{\"window_title\":\"Fenêtre de partage de retours\",\"button_close\":\"Fermer la fenêtre de partage de retours\"}},\"dataShare\":{\"title1\":\"Bienvenue !\",\"title1Update\":\"Ecolyo évolue !\",\"title2Update\":\"Pour continuer à utiliser Ecolyo, merci d’accepter les modalités de traitement des données ci-dessous.\",\"part1\":\"Nous avons besoin de l’adresse email utilisée lors de la création de votre Cozy Métropole de Lyon, ci-après nommé cloud personnel.\",\"part2\":\"Cette donnée de compte est conservée dans Ecolyo le temps de l’utilisation de ce service.\",\"part3\":\"La Métropole de Lyon utilisera cet email afin de vous tenir informé·e :\",\"item1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter.\",\"item2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"item3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part4\":\"Vos données privées de consommation d’énergie et d’eau sont récupérées, sauvegardées et stockées dans votre cloud personnel à votre initiative sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part5\":\"Il en est de même pour les données privées de composition du logement et du foyer, fournies par vos soins. Elles restent également sans visibilité de la Métropole de Lyon sur leur contenu.\\nLes données d’identification entrées lors de la connexion aux données de consommations d’électricité sont quant à elles conservées dans un espace sécurisé de la Métropole de Lyon et sont utilisées uniquement à des fins de contrôle du consentement par des organismes extérieurs.\",\"part6\":\"Dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées et pseudonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation, d’évaluer globalement l’usage de l’application via des mesures d’audience ainsi que d’évaluer à terme l’impact global en termes de baisse des consommations énergétiques de notre service.\",\"part7\":\"Au sein de votre cloud personnel, vous pouvez à tout moment exercer vos droits d’accès, de rectification, de portabilité, de limitation et d’opposition en consultant notamment la page Options.\",\"part8\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part9\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 \",\"part10\":\"ou en ligne, au moyen du formulaire disponible à l'adresse suivante : \",\"link1\":\"<a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/</a>\",\"validDataConsent\":\"Je consens au traitement de mes données tel que décrit ci-dessus.\",\"validCGU\":\"Je valide les \",\"validCGU_button\":\"Conditions Générales d’Utilisation\",\"validLegal\":\" du service et ai pris connaissance des \",\"validLegal_button\":\"Mentions Légales\",\"validLegal2\":\"de celui-ci.\",\"button_accept\":\"C'est parti !\",\"accessibility\":{\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"minorUpdate\":{\"title\":\"Ecolyo évolue !\",\"button\":\"J'ai compris\"},\"gcu\":{\"title\":\"Conditions générales d’utilisation du service\",\"version\":\"Version du 12.12.2022\",\"content\":{\"title1\":\"Ecolyo, késako ?\",\"part1_1\":\"Ecolyo est un service proposé par la Métropole de Lyon vous permettant de suivre au même endroit vos consommations d’électricité, de gaz et d’eau, en kWh, en litres, en euros et à différentes échelles de temps. Ce service vous permet également de participer à des défis individuels et vous offre une analyse de vos consommations. Des astuces vous sont aussi proposées afin de vous permettre de réduire vos consommations.\",\"part1_2\":\"C’est un service gratuit qui prend la forme d’un site web dit « responsive », c’est-à-dire qu’il peut être consulté sur ordinateur ou sur mobile. Sur mobile, c’est une application que l’on a souhaitée ergonomique, réactive et esthétique pour votre plaisir de navigation et d’utilisation au quotidien.\",\"part1_3\":\"Tous les termes « techniques » sont définis en bas de page.\",\"title2\":\"Quelles fonctionnalités le service propose-t-il ?\",\"part2_1\":\"La fonctionnalité principale d’Ecolyo est la visualisation, au même endroit, de vos consommations d’électricité, de gaz et d’eau et ce, à différents pas de temps (de la demi-heure – uniquement pour l’électricité, à plusieurs années, en passant par les pas de temps journaliers et mensuels). La visualisation des consommations se fait en kWh pour l’énergie et en L pour l’eau ainsi qu’en euros (euros résultant d’un prix moyenné).\",\"part2_2\":\"Au-delà de la visualisation de vos consommations et parce que nous souhaitons vous aider à diminuer ces consommations vous retrouverez plusieurs autres pages : \",\"part2_2_list1\":\"Défis : Des quiz, et actions à mettre en place vous seront proposés pour vous pousser à réduire vos consommations.\",\"part2_2_list2\":\"Astuces : Une liste d’astuces pour maîtriser ses consommations d’énergie et d’eau à trier par usage, et avec une possibilité de les adapter plus précisément à votre profil.\",\"part2_2_list3\":\"Analyse : Une analyse de vos consommations réelles en comparaison à celle d’un foyer étant proche d’une vôtre.\",\"part2_3\":\"Pour la page Analyse ainsi que pour la partie personnalisation des astuces, des éléments supplémentaires sur votre profil vous seront demandés. L’ensemble de ces informations récoltées à l’aide du formulaire peuvent être modifiées par la suite.\",\"part2_4\":\"Dernière page : la page Options dans laquelle vous pourrez vous abonner à un service d’alerte sur vos consommations d’eau, de quoi ajuster votre profil ou encore vous désabonner de la lettre mensuelle.\",\"title3\":\"Comment ai-je accès à mes données d’électricité, de gaz et d’eau ?\",\"part3_1\":\"Pour visualiser vos consommations réelles et profiter pleinement du potentiel de notre service, il vous faut au minimum un des trois compteurs communicants suivants : Linky (pour l’électricité), Gazpar (pour le gaz), Téléo (pour l’eau).\",\"part3_2\":\"Ces compteurs sont opérés par les gestionnaires de réseaux. Pour Linky, c’est Enedis, le gestionnaire de réseau de distribution d’électricité. Pour Gazpar, GRDF est responsable de cette gestion. Et pour Téléo, c’est Eau Publique du Grand Lyon.\",\"part3_3\":\"Ces acteurs sont responsables de la relève de vos données. Ces données servent notamment à votre fournisseur d’électricité, de gaz ou d’eau pour permettre la facturation de vos consommations d’énergie. Des fournisseurs d’électricité ou de gaz il y en a des dizaines. Les gestionnaires de réseaux (… et de votre compteur) ne sont qu’au nombre de trois. Nous avons donc décidé de travailler avec eux, au plus près de la donnée brute issue de vos compteurs.\",\"part3_4\":\"Il vous faudra donc avoir un compte chez GRDF et Eau Publique du Grand Lyon pour accéder à vos données. Si vous n’en avez pas, il suffira de vous en créer un. Ceci ne sera à faire qu’une fois, au début.\",\"title4\":\"Ecolyo se trouve dans un cloud personnel Métropole de Lyon, qu’est-ce que cela signifie ?\",\"part4_1\":\"Comme vous avez dû le remarquer, lors de votre première connexion à Ecolyo vous avez dû vous créer un compte Cozy Métropole de Lyon. Ce cloud personnel est un espace sécurisé porté par l’ambition de vous apporter visibilité, transparence et maîtrise sur l’usage de vos données personnelles, et dont les fonctionnalités vous permettant de récupérer, synchroniser, stocker et partager vos données avec les destinataires de votre choix. Le service Ecolyo se déploie à l’intérieur de cet espace protégé. Dans ce cloud personnel, vous pourrez accéder également à d’autres services. Toutes les données traitées par Ecolyo, mais aussi les autres services que vous seriez amenés à utiliser dans ce cloud personnel restent dans ce Cloud Personnel Grand Lyon et n’en sortent pas, sauf si vous décidez vous-même de partager vos données avec des tiers.\",\"part4_2\":\"Pour en savoir plus sur ce cloud et son utilisation, ainsi que la durée de conservation de vos données, vous pouvez lire les conditions générales d’utilisation du service <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">ici</a>.\",\"title5\":\"Et donc concrètement pour Ecolyo, quelles données sont collectées et qui y a accès ?\",\"part5_1\":\"Pour qu’Ecolyo ait accès à vos données de consommations, vous devrez activer vos différents connecteurs. À ce moment-là, pour la connexion aux données de gaz et d’eau à travers un parcours qui vous conduira de manière intuitive sur le site de chacun des gestionnaires de réseaux concerné, vous pourrez donner votre consentement à partager ces données avec le Service Ecolyo, et ce pour une durée limitée dans le temps. Pour l’électricité, le don du consentement et la connexion aux données se fait directement dans notre service. Quid de la durée de ce consentement ? Pour les données électriques, elle est par défaut d'un an. Pour les données gaz, cela sera à vous de la définir (nous vous recommandons 1 an pour une expérience optimale). Les données utilisées pour vérifier la bonne connexion de vos données d’électricité sont stockées du côté de la Métropole de Lyon sur des serveurs sécurisés.\",\"part5_2\":\"Vos connecteurs, une fois configurés, permettent le transfert de vos données de consommations au service Ecolyo. Le transfert de ces données de consommation se fait sans que personne n’accède à leur contenu, pas même la Métropole de Lyon. En effet, ces données sont stockées et traitées directement dans votre cloud personnel qui en assure la protection. Tous les calculs, analyses et traitements sur ces données sont faites DANS votre espace personnel sans visibilité sur le contenu des données par la Métropole de Lyon.\",\"part5_3\":\"Vous pouvez bien sûr mettre fin à la récupération/ au transfert de vos données de consommation sur votre espace cloud personnel à tout moment et à plusieurs niveaux : \",\"part5_3_list1\":\"Vous pouvez supprimer le transfert quotidien de vos données en supprimant tout simplement le connecteur dans la page Consos (en bas).\",\"part5_3_list2\":\"Pour supprimer l’ensemble de vos données ainsi que votre cloud personnel Métropole de Lyon, vous devez demander la suppression de votre cloud. Pour faire cela, rendez-vous dans les paramètres de votre cloud personnel via la barre blanche en haut d’Ecolyo et appuyez sur le bouton « Supprimer mon compte » dans la partie paramètres.\",\"part5_4\":\"Des données sur le profil de votre foyer peuvent être également remplies au sein de l’application. Ces données s’enrichiront au fur et à mesure de votre utilisation du service avec d’autres informations : défis réalisés, étoiles gagnées, etc. L’ensemble de ces données restent à l’intérieur de votre cloud personnel, sans que personne n’y ait accès.\",\"part5_5\":\"Enfin, afin de permettre une mise à jour quotidienne de vos données de consommations, vos identifiants Eau Publique du Grand Lyon, un jeton d’identification GRDF ainsi que vos numéros de compteurs sont stockés.\",\"title6\":\"Personne n’a donc accès à mes données, pas même la Métropole de Lyon, vraiment ?\",\"part6_1\":\"Conformément aux indications du paragraphe précédent, la Métropole de Lyon n’accède ni à vos données de consommations ni aux données utilisées via certaines fonctionnalités du service comme le formulaire (celui-là même qui permet l’analyse de vos consommations personnalisée ainsi qu’une sélection d’éco-gestes personnalisés). Toutes ces informations sont bien gardées au chaud dans votre cloud personnel Métropole de Lyon\",\"part6_2\":\"Seul vous pouvez accepter de partager vos données, documents ou fichiers privés avec la Métropole de Lyon, ses partenaires ou d’autres utilisateurs ou acteurs (publics ou privés) après recueil de votre consentement éclairé et par une action expresse de votre part.\",\"part6_3\":\"La Métropole de Lyon n'a cependant accès qu’à l’adresse email utilisée lors la création de votre cloud personnel Métropole de Lyon. Elle utilise cet email afin de vous tenir informé·e :\",\"part6_3_list1\":\"En réponse à vos demandes, si vous avez pris l’initiative de nous contacter. \",\"part6_3_list2\":\"En cas de problème majeur avec la gestion de votre compte.\",\"part6_3_list3\":\"De l’évolution de vos consommations, des nouveautés et de la qualité du service via une lettre mensuelle. Vous pouvez à tout moment vous désinscrire de cette lettre via la page Options du service.\",\"part6_4\":\"Elle stocke également les informations transmises lors de la connexion à l’électricité (nom, adresse postale). Ces informations doivent être stockées car la Métropole de Lyon est régulièrement contrôlée par Enedis et doit prouver détenir le consentement des personnes pour lesquelles elle va chercher la donnée.\",\"part6_5\":\"Par ailleurs, et dans le cadre de l’évaluation et de l’amélioration du service, des données d’utilisation anonymisées seront remontées à des fins d’exploitation statistiques. La récupération de ces statistiques anonymisées nous permettra de s’assurer du bon fonctionnement technique de la connexion à vos données de consommation ainsi que d’évaluer l’impact global en termes de baisse des consommations énergétiques de notre service. Parmi ces statistiques, des mesures d’audience de la fréquentation des différentes pages du service sont réalisées. Vous pouvez, via la page Options, à tout instant, décider de vous opposer à la récupération de ces données d’utilisation.\",\"title8\":\"Encore des questions ?\",\"part8_1\":\"N’hésitez pas à consulter la FAQ ou à nous contacter via le formulaire de contact présente sur l’ensemble des pages.\",\"part8_2\":\"Dernière option, contactez-nous directement à <a href=\\\"mailto:ecolyo@grandlyon.com\\\">ecolyo(at)grandlyon.com</a>.\",\"title9\":\"LEXIQUE\",\"part9_1_title\":\"Cloud personnel Métropole de Lyon : \",\"part9_1_content\":\"Cloud personnel : appelé aussi le « domicile numérique », le cloud personnel est souvent réduit à un simple espace de stockage de documents mais il est bien plus que ça. C'est un espace individuel et sécurisé où vous pouvez accéder à des services sans exposer aucune donnée à l’extérieur. Vous seul pouvez y accéder, personne d'autre.\",\"part9_2_title\":\"Connecteur : \",\"part9_2_content\":\"Un connecteur est un service, installé dans votre cloud personnel également, qui a pour but uniquement d’aller récupérer les données auprès de différents partenaires/sources de données. Dans le cadre d’Ecolyo, trois connecteurs sont pré-installés dans votre cloud personnel : celui d’Enedis, celui de GRDF et celui d’Eau Publique du Grand Lyon.\",\"part9_3_title\":\"Compteur communicant : \",\"part9_3_content\":\"Un compteur communicant est un compteur qui mesure de manière précise et détaillée vos consommations et peut transmettre ces données au gestionnaire de réseau via une technologie radio (c'est le cas pour Gazpar et Téléo par exemple) ou via les réseaux électriques (via Courant Porteur en ligne, c'est le cas pour Linky par exemple).\",\"part9_4_title\":\"Fournisseur : \",\"part9_4_content\":\"Votre fournisseur d’électricité, de gaz ou d’eau est l’entreprise qui vous facture votre électricité, gaz ou eau. Côté électricité il en existe <a href=\\\"https://www.enedis.fr/liste-des-fournisseurs-delectricite\\\">aujourd’hui plus de 50</a>, chacun proposant des tarifs différents.\",\"part9_5_title\":\"Gestionnaire de réseau de distribution : \",\"part9_5_content\":\"Appelé aussi parfois distributeur, il est en charge de la livraison de votre électricité, gaz ou eau jusqu’à votre domicile. Il est aussi en charge du compteur qui relève vos consommations. Il transmet vos données de consommations à votre fournisseur afin qu’il effectue la facturation de vos consommations d’énergie. Il peut également les transmettre à tout acteur avec qui vous avez décidé de partager ces données.\"}},\"gcu_modal\":{\"button_accept\":\"J'accepte\",\"accessibility\":{\"window_title\":\"Conditions générales d’utilisation\",\"button_accept\":\"Accepter les conditions générales d'utilisation\"}},\"matomo\":{\"matomo_title\":\"Suivi statistiques d'usage Matomo\"},\"header\":{\"accessibility\":{\"button_back\":\"Retour à la page précédente\",\"button_open_feedbacks\":\"Ouvrir le partage de retours\"}},\"konnector_form\":{\"label_updated_at\":\"Dernière mise-à-jour le\",\"button_update\":\"Mettre à jour\",\"loading\":\"Chargement...\",\"wait_end_issue\":\"Attendre la fin de la maintenance avant de mettre à jour.\",\"button_disconnect\":\"Déconnecter\",\"issue\":\"Le problème semble venir de \",\"resolve\":\"Une mise à jour peut résoudre ce problème.\",\"login_failed\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"not_installed\":\"Le connecteur n'est pas installé. Veuillez l'installer en cliquant sur le bouton ci-dessous.\",\"button_install\":\"Installer\",\"error_account_creation\":\"Une erreur est survenue, veuillez essayer de nouveau.\",\"error_no_login_password\":\"Identifiant et mot de passe requis\",\"error_login_failed\":\"Identifiants invalides\",\"error_update\":\"Un problème est survenu lors du rapatriement de vos données.\",\"error_update_oauth\":\"Votre autorisation pour afficher vos données %{fluid} a expiré.\",\"error_consent_form_gas\":\"Vos données ne peuvent être récupérées car vous n'avez pas coché l'autorisation d'accès aux données informatives lors de votre partage de consentement.\",\"button_oauth_reload\":\"Redonner mon consentement\",\"OK\":\"Ok\",\"konnector_delta\":{\"ELECTRICITY\":\"La donnée de consommation électrique arrive normalement à J+1. Un retard d'un ou deux jours est parfois constaté.\",\"GAS\":\"La donnée de consommation de gaz arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\",\"WATER\":\"La donnée de consommation d'eau arrive normalement à J+3. Un retard d'un ou deux jours est parfois constaté.\"},\"accessibility\":{\"button_install\":\"Installer le connecteur\",\"button_update\":\"Mettre à jour votre connexion\",\"button_disconnect\":\"Déconnecter votre connecteur\"}},\"konnector_options\":{\"label_connect_to_electricity\":\"Se connecter à l'électricité\",\"label_connect_to_water\":\"Se connecter à l'eau\",\"label_connect_to_gas\":\"Se connecter au gaz\",\"label_offline_electricity\":\"Électricité déconnectée\",\"label_offline_water\":\"Eau déconnectée\",\"label_offline_gas\":\"Gaz déconnecté\",\"partner_issue\":\"En maintenance\",\"outdated\":\"Données manquantes depuis %{isOutdatedData} jours\",\"accessibility\":{\"label_ko_status\":\"Connecteur en erreur\",\"button_toggle_detail_electricity\":\"Afficher ou masquer le détail de la connexion à l'électricité\",\"button_toggle_detail_water\":\"Afficher ou masquer le détail de la connexion à l'eau\",\"button_toggle_detail_gas\":\"Afficher ou masquer le détail de la connexion au gaz\"}},\"konnector_modal\":{\"loading_data\":\"Veuillez patienter, vos données sont en cours de chargement.\",\"loading_data_update\":\"Veuillez patienter, vos données sont en cours de mise à jour.\",\"logging_txt\":\"Nous vérifions vos informations d'identité\",\"success_txt\":\"Félicitations !\",\"success_data_electricity\":\"Vos données de consommation d'électricité sont maintenant connectées à Ecolyo.\",\"success_data_water\":\"Vos données de consommation d'eau sont maintenant connectées à Ecolyo.\",\"success_data_gas\":\"Vos données de consommation de gaz sont maintenant connectées à Ecolyo.\",\"success_data_additional_electricity\":\"Les données de consommations mettent entre un et deux jours pour arriver.\",\"success_data_additional_water\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_data_additional_gas\":\"Les données de consommations mettent entre trois et cinq jours pour arriver.\",\"success_update_txt\":\"Connexion réussie !\",\"success_data_update_electricity\":\"Ecolyo est bien connecté à votre compteur d'électricité.\",\"success_data_update_water\":\"Ecolyo est bien connecté à votre compteur d'eau.\",\"success_data_update_gas\":\"Ecolyo est bien connecté à votre compteur de gaz.\",\"success_data_additional_update_electricity\":\"Sachez que la donnée de consommation d'électricité arrive entre J+1 et J+2.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_water\":\"Sachez que la donnée de consommation d'eau arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"success_data_additional_update_gas\":\"Sachez que la donnée de consommation de gaz arrive entre J+3 et J+5.<br /><br />S'il vous manque encore des données, c'est qu'elles n'ont pas encore été mises à disposition par le gestionnaire de votre compteur. Merci pour votre patience !\",\"error_txt\":\"Aïe !\",\"mismatch\":{\"title\":\"Vos données n'ont pas pu être récupérées.\",\"text1\":\"Vos nom et numéro de compteur ne correspondent plus. Merci de reconfigurer votre connecteur.\",\"text2\":\"Reconfigurer mon connecteur ?\",\"text3\":\"La reconfiguration de votre connecteur passe par sa suppression et sa nouvelle installation. Vos données seront conservées.\"},\"error_data_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité ne seront pas chargées.\",\"error_data_water\":\"Un problème est survenu. Vos données de consommation d’eau ne seront pas chargées.\",\"error_credentials_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter. L'identifiant est un numéro à 7 chiffres (différent de votre numéro de contrat).\",\"error_credentials_electricity\":\"Il semblerait que les nom(s) et adresse ne concordent pas avec le numéro de votre compteur.\",\"error_credentials_electricity_2\":\"Nous ne pouvons vous donner accès aux données de consommation.\",\"error_credentials_update_water\":\"Une erreur s'est glissée dans vos identifiants de connexion. Veuillez vérifier ces éléments et tenter de vous reconnecter.\",\"error_credentials_update_electricity\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_credentials_update_gas\":\"Un problème a lieu lors de la récupération de vos données. Merci de supprimer votre connecteur et vous reconnecter.\",\"error_data_gas\":\"Un problème est survenu. Vos données de consommation de gaz ne seront pas chargées.\",\"error_consent_form_gas_title\":\"Nous n'avons pas pu connecter vos données de consommation de gaz à Ecolyo.\",\"error_consent_form_gas_content\":\"En effet, le partage de vos données de consommation de gaz \\\"informatives\\\" doit être accepté.\",\"error_consent_form_gas_content_2\":\"Merci de cocher \\\"OUI\\\" au partage de vos données de consommation de gaz, et à \\\"Autoriser l'accès à mes données informatives\\\".\",\"error_data_update_electricity\":\"Un problème est survenu. Vos données de consommation d’électricité n’ont pas été mises à jour.\",\"error_data_update_water\":\"Un problème est survenu. Vos données de consommation d’eau n’ont pas été mises à jour.\",\"error_data_update_gas\":\"Un problème est survenu. Vos données de consommation de gaz n’ont pas été mises à jour.\",\"error_data_2\":\"Merci de réessayer plus tard.\",\"button_validate\":\"Ok\",\"button_understood\":\"J'ai compris\",\"button_try_again\":\"Réessayer\",\"button_check_info\":\"Vérifier les infos\",\"button_go\":\"J'y vais\",\"button_later\":\"Plus tard\",\"show_common_error\":\"Voir les erreurs récurrentes\",\"show_common_error_list\":\"<span>Le problème peut provenir des cas suivants :</span><ul><li>Vous avez un co-titulaire sur votre contrat. Veillez à bien entrer le nom du <span class=\\\"gold\\\">titulaire du contrat</span> et non le co-titulaire.</li><li> Votre nom comporte un tiret ? Tentez sans le tiret.</li><li>Entrez bien le nom de votre commune de résidence en entier (tirets et accents inclus)</li><li>Avez-vous bien entré le <span class=\\\"gold\\\">numéro de votre compteur</span> (PDL) ? Tout autre numéro (de contrat, de client) ne fonctionne pas.</li></ul><p>Si vous rencontrez toujours des difficultés, contactez notre service d'aide </p><div class=\\\"center\\\">Avez-vous pensez à vérifier ces informations ?</div>\",\"accessibility\":{\"window_title\":\"Fenêtre d'attente de connexion\",\"button_close\":\"Fermer la fenêtre\"}},\"consent_outdated\":{\"title\":{\"0\":\"Votre autorisation pour afficher vos données d’électricité a expiré\",\"2\":\"Votre autorisation pour afficher vos données de gaz a expiré\"},\"text1\":{\"0\":\"Veuillez re-donner votre consentement pour la transmission et la reconnexion de vos données ENEDIS à Ecolyo.\",\"2\":\"Veuillez re-donner votre accord pour que GRDF nous transmette vos données de consommation.\"},\"text2\":{\"0\":\"Souhaitez-vous renouveler votre accord dès maintenant pour un an ?\",\"2\":\"Voulez-vous donner votre accord sur votre compte GRDF maintenant ?\"},\"later\":\"Plus tard\",\"go\":\"J'y vais\",\"no\":\"Non\",\"yes\":\"Oui\"},\"delete_grdf_modal\":{\"text1\":\"La suppression de la connexion avec GRDF s’accompagne de la suppression de votre consentement à partager vos données gaz avec Ecolyo.\",\"text2\":\"Si vous souhaitez vous reconnecter, il vous faudra re-donner votre accord pour que GRDF nous transmette vos données de consommation.\",\"text3\":\"Voulez-vous supprimer votre connexion et votre consentement à GRDF ?\",\"cancel\":\"Plus tard\",\"go\":\"Oui\"},\"legal\":{\"read_legal\":\"Lire les mentions légales\",\"title_legal\":\"Mentions légales & CGU\",\"version\":\"Version du 12.12.2022\",\"site\":\"Site du service Ecolyo : <a href=\\\"https://ecolyo.com/\\\"> https://ecolyo.com/</a>\",\"adress\":\"Métropole de Lyon - 20, rue du Lac – CS 33569 - 69505 Lyon cedex 03\",\"phone\":\"Tél : (33) 4 78 63 40 40\",\"mail\":\"<a href=\\\"mailto:ecolyo@grandlyon.com\\\"> ecolyo(at)grandlyon.com</a>\",\"p1b\":\"Directrice de publication : \",\"p1\":\"Blandine MELAY, Responsable du Service Transition Énergétique\",\"p2b\":\"Animation éditoriale, gestion et mise à jour : \",\"p2\":\"Marion BERTHOLON, Chargée de services numériques pour la transition énergétique\",\"p3b\":\"Photographies : \",\"p3\":\"sauf mention contraire, les photos sont la propriété de la Métropole de Lyon\",\"p4b\":\"Conception et Charte graphique : \",\"p4\":\"Florent Dufier\",\"p5b\":\"Réalisation technique : \",\"p5\":\"Métropole de Lyon, Sopra Steria\",\"p6b\":\"Maintenance technique : \",\"p6\":\"Délégation Développement économique, emploi & savoirs - Innovation numérique & systèmes d’information - Usages et services numériques - Développement des services numériques\",\"title1\":\"Crédits\",\"part1\":\"Ce site est le résultat de développements spécifiques réalisés dans les langages Go, TypeScript, HTML et Sass. Les développements s’appuient sur plusieurs bibliothèques et frameworks libres : axios, cozy-bar, cozy-client, cozy-harvest-lib, cozy-scripts, cozy-ui, d3, detect-browser, global, lodash, luxon, moment, moment-timezone, node-sass, object-hash, react, react-dom, react-redux, react-router-dom, react-swipeable-views, redux-devtools-extension, sass-loader. Les tests de l’application s’appuient sur les bibliothèques et frameworks libres suivants: jest-junit, react-test-renderer, redux-mock-store. La pile technique intègre également les applications Cozy stack, Yarn, Docker, ACH. Les déploiements sont réalisés sur le registre hébergé chez Cozy. L’équipe de réalisation utilise au quotidien les applications GitLab, IceScrum, RocketChat, SonarQube.\",\"title2\":\"Traitement des données personnelles et droit d’accès, de modification et de suppression\",\"part2\":\"Conformément à la réglementation en vigueur en matière de protection des données personnelles, le service Ecolyo a fait l’objet d’une inscription au registre des traitements de la Métropole de Lyon. Ecolyo fait partie de l’écosystème de services orientés « self data » déployés par la Métropole de Lyon avec l’ambition d’offrir aux usagers métropolitains les outils et les services leur permettant d’exercer directement leur droit à la portabilité, dans un cadre apte à garantir aussi bien la transparence et le contrôle sur l’usage de leurs données personnelles que l’exploitation directe du contenu de ces données selon leurs libres choix. Le self data est en effet selon la Fondation Internet Nouvelle Génération (FING) « la production, l’exploitation et le partage de données personnelles par les individus, sous leur contrôle et à leurs propres fins ». Au sein de cet environnement self data, la gestion des données s’appuie sur l’organisation suivante des rôles et responsabilités associées : \",\"part2-1\":\"Les partenaires du service GRDF et Eau Publique du Grand Lyon sont responsables exclusivement des seuls traitements de Données Personnelles relatifs à la collecte des données de consommation de gaz et d’eau de l’utilisateur et à leur transmission sur la plateforme de cloud personnel, après consentement de l’utilisateur.\",\"part2-2\":\"Enedis est responsable de la collecte des données de consommation d’électricité et de leur mise à disposition à la Métropole de Lyon qui, elle en gère la transmission sur la plateforme du cloud personnel de l’utilisateur, après avoir récupéré le consentement de l’utilisateur.\",\"part2-3\":\"La Métropole de Lyon est responsable de traitement sur le périmètre du service Ecolyo qu’elle propose à l’usager, ainsi que des traitements nécessaires à la fourniture de la plateforme de cloud personnel qu’elle met à disposition de l’usager pour accéder au service Ecolyo. En sa qualité de responsable de ces traitements, elle collecte et traite : \",\"part2-3-1\":\"Les données de compte de l’usager renseignées par l’usager au sein de son espace de cloud personnel Grand Lyon à des fins de gestion du compte et de communication avec l’usager ;\",\"part2-3-2\":\"Les données de compte de l’utilisateur lui permettant de connecter ses données d’électricité à Ecolyo ;\",\"part2-3-3\":\"Les données privées de consommation d’énergie et d’eau dont la récupération, la sauvegarde, le stockage, la synchronisation et le partage sur la plateforme de cloud personnel sont initiés par l’usager sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-4\":\"Les données privées sur la composition du logement et du foyer de l’utilisateur, fournies par l’utilisateur lui-même au sein du service, sont traitées par le service sans visibilité de la Métropole de Lyon sur leur contenu.\",\"part2-3-5\":\"Des métriques d’usage du service anonymisées et remontées périodiquement afin d’améliorer la qualité du service et d’évaluer son impact (Plus d’informations sur la manière dont votre anonymat est bien préservé dans ce processus <a href=\\\"https://ecolyo.com/cloud_statistiques.html\\\">ici</a>).\",\"part2-4\":\"La Métropole réalise également des mesures d’audience à l’aide de la solution Matomo. Afin de vous fournir un meilleur service et d’améliorer votre expérience d'utilisateur, nous utilisons des solutions de mesure d’audience qui utilisent la technologie des « cookies », des fichiers texte qui sont enregistrés sur votre ordinateur et qui permettent de générer des informations envoyées aux serveurs de mesure d’audience. Sur ces serveurs, l’adresse IP est anonymisée. Les données recueillies ont uniquement pour finalité de permettre d'analyser la fréquentation de nos pages afin d'en améliorer le contenu. Il s'agit de statistiques agrégées permettant de connaître le nombre de visites et de visiteurs différents, les pages les plus populaires, les chemins préférés, les niveaux d'activité par jour de la semaine et par heure de la journée, les principales erreurs etc. Vous avez cependant le droit de vous opposer à l’utilisation de ces cookies, et donc au traitement de vos données personnelles de navigation, en vous rendant dans la page Options de notre service.\",\"part2-5\":\"L’usager est seul décisionnaire des finalités d’utilisation qu’il souhaite définir pour le traitement de ses données personnelles de consommation, à la suite de leur transmission par les partenaires du service Ecolyo sur son cloud personnel. Ainsi, dans le cadre de l’utilisation d’Ecolyo, l’usager ne recevra les données des partenaires du service : Enedis, GRDF et Eau Publique du Grand Lyon seulement qu’à sa demande expresse après la saisie de ses identifiants.\",\"part2-6\":\"L’utilisateur est donc le seul à accéder :\",\"part2-6-1\":\"À ses données de consommation d’électricité horaires, journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-2\":\"À ses données de consommation de gaz journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-6-3\":\"À ses données de consommation eau journalières, hebdomadaires, mensuelles et annuelles.\",\"part2-7\":\"Les engagements et responsabilités de la Métropole de Lyon concernant la protection des données et la confidentialité des données Ecolyo sont précisés dans les Mentions légales et les conditions d’utilisation du cloud personnel Grand Lyon qui accueille aujourd’hui le service Ecolyo et sans lequel le service ne peut pas fonctionner. Pour plus d’informations sur les engagements et responsabilités de la Métropole de Lyon concernant la protection et la confidentialité dans le cloud personnel, nous vous invitons à vous référer <a href=\\\"https://manager.cozygrandlyon.cloud/tos/266b4226-8417-42fb-b911-41e86dae8581.pdf?locale=fr\\\">aux mentions légales et CGU du cloud personnel métropolitain.</a> \",\"part2-8\":\"Conformément à la loi 78-17 du 6 janvier 1978 modifiée relative à l’information, aux fichiers et aux libertés, vous disposez d’un droit d’accès, de rectification et d’opposition au traitement de vos données à caractère personnel. Votre cloud personnel vous permet d’exercer ces droits directement dans cet espace sur vos données de compte. S’agissant des données de consommations d’électricité et de gaz, l’utilisateur peut supprimer son consentement à partager ses données en supprimant son connecteur dans la page Consos.\",\"part2-9\":\"Vous pouvez également exercer vos droits d’accès, de rectification, de limitation, d’opposition et d’effacement de vos données personnelles en contactant directement le Délégué à la Protection des Données par courrier en écrivant à l’adresse :\",\"part2-10\":\"Métropole de Lyon – Délégué à la Protection des Données - Direction des Assemblées, des Affaires Juridiques et des Assurances - 20, rue du Lac - BP 33569 - 69505 Lyon Cedex 03 ou en ligne, au moyen du formulaire disponible à l'adresse suivante : <a href=\\\"https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/\\\">https://demarches.toodego.com/sve/proteger-mes-donnees-personnelles/.</a>\",\"part2-11\":\"L’exercice de ces droits sur vos données personnelles auprès de la Métropole de Lyon concerne exclusivement les données traitées dans le cadre du service « Ecolyo ».\",\"title3\":\"Dispositions légales\",\"part3-1\":\"Les divers éléments du site web (la forme, la mise en page, le fonds, la structure …) sont protégés par le droit des dessins et modèles, le droit d’auteur, le droit des marques ainsi que le droit à l’image et ils ne peuvent être copiés ou imités en tout ou partie sauf autorisation expresse de la Métropole de Lyon.\",\"part3-2\":\"Toute personne ne respectant pas les dispositions légales applicables se rend coupable du délit de contrefaçon et est passible des sanctions pénales prévues par la loi.\",\"title4\":\"Droits d’auteurs\",\"part4-1\":\"Les photographies, textes, logos, pictogrammes, ainsi que toutes œuvres intégrées dans le site sont la propriété de la \\\"Métropole de Lyon\\\" ou de tiers ayant autorisé la \\\"Métropole de Lyon\\\" à les utiliser.\",\"part4-2\":\"Les reproductions, les transmissions, les modifications, les réutilisations, sur un support papier ou informatique, dudit site et des œuvres qui y sont reproduites ne sont autorisées que pour un usage personnel et privé conforme aux dispositions de l’article L 122-5 du Code de la Propriété Intellectuelle. Ces reproductions devront ainsi notamment indiquer clairement la source et l’auteur du site et/ou de ces œuvres multimédias. En aucun cas ces reproductions ne sauraient porter préjudice aux droits des tiers. Les reproductions, les transmissions, les modifications, les réutilisations à des fins publicitaires, commerciales ou d’information, de tout ou partie du site, sont totalement interdites.\",\"title5\":\"Logo de la Métropole de Lyon et d’Ecolyo\",\"part5\":\"Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent pas être modifiés – proportions, couleurs, éléments, constituants – et ne peuvent pas être sujet à aucune transformation, animation ou tout autre processus. Les logos de la Métropole de Lyon et d’Ecolyo ne peuvent être utilisés et associés qu’aux seules informations vérifiables. Ils ne peuvent être notamment utilisés que pour illustrer des relations avec la Métropole de Lyon ou des actions de sponsorings dûment établies. Quel que soit le cas d’espèce, la Métropole de Lyon se réserve le droit d’approuver ou de désapprouver toute utilisation des logos de la Métropole de Lyon et d’Ecolyo, pour assurer son utilisation correcte, conformément à l’éthique, la morale et aux intérêts de la Métropole de Lyon. Les conditions susmentionnées s’appliquent dans le cadre de pages web, elles ne font pas référence à l’utilisation des logos dans tout autre document. La Métropole de Lyon se réserve le droit de modifier les conditions d’utilisation des logos de la Métropole de Lyon et d’Ecolyo à tout moment et sans préavis.\",\"title6\":\"Droit des bases de données\",\"part6\":\"Les bases de données sont protégées par la loi du 1er juillet 1998 et le régime français du droit d’auteur.\",\"title7\":\"Établissements de liens vers le site Ecolyo\",\"part7-1\":\"La Métropole de Lyon autorise la mise en place d’un lien hypertexte vers son service Ecolyo pour tous les sites internet, à l’exclusion de ceux diffusant des informations à caractère polémique, pornographique, xénophobe ou pouvant, dans une plus large mesure porter atteinte à la sensibilité du plus grand nombre.\",\"part7-2\":\"Le lien doit aboutir à la page d’accueil du service (<a href=\\\"https://ecolyo.com\\\">https://ecolyo.com</a>), cette page devant apparaître dans une nouvelle fenêtre. Les pages du service Ecolyo ne doivent en aucun cas être intégrées à l’intérieur des pages d’un autre site (iframe).\",\"part7-3\":\"Dans tous les cas d’espèce, La Métropole de Lyon se réserve le droit de demander la suppression d’un lien si elle estime que le site cible ne respecte pas les règles ainsi définies.\",\"title8\":\"Liens vers des sites tiers depuis le site Ecolyo\",\"part8\":\"Les liens hypertextes mis en œuvre au sein du site en direction d’autres sites et/ou de pages personnelles et d’une manière générale vers toutes ressources existantes sur internet ne sauraient engager la responsabilité de la Métropole de Lyon quant aux liens qu’ils contiennent ou aux changements ou mises à jour qui leur sont apportés.\",\"title9\":\"Mise en garde générale\",\"part9-1\":\"Nos services mettent tout en œuvre pour offrir aux visiteurs de ce site web des informations fiables et vérifiées. Cependant, malgré tous les soins apportés, le site peut comporter des inexactitudes, des défauts de mise à jour ou des erreurs.\",\"part9-2\":\"Nous remercions les utilisateurs du site de nous faire part d’éventuelles omissions, erreurs ou corrections par mail sur la boite aux lettres du webmestre ou directement via le formulaire proposé dans le service.\",\"accessibility\":{\"button_close\":\"Fermer la fenêtre\"}},\"oauth\":{\"window\":{\"title\":\"OAuth\"}},\"onboarding\":{\"welcomeModal\":{\"title\":\"Vous êtes à mi-chemin !\",\"part1\":\"Votre cloud personnel a bien été créé.\",\"part2\":\"Il vous faut maintenant donner votre accord pour connecter vos compteurs au service.\",\"button_valid\":\"Ok\",\"accessibility\":{\"window_title\":\"Fenêtre de bienvenue\",\"button_valid\":\"Valider\"}}},\"performance_indicator\":{\"bilan\":{\"text1\":\"Par rapport à \",\"text2\":\"soit une différence de : \"},\"error_no_compare\":\"comparaison impossible\",\"error_no_compare_reason\":\"(manque de données)\",\"error_no_compare_no_data\":\"Vos consommations pour cette période sont incomplètes à cause d’un problème technique concernant :\",\"fpi\":{\"no_data\":\"Données non disponibles\",\"no_comparison\":\"Pas de comparaison possible\"}},\"profile\":{\"report\":{\"title_alert\":\"Alerte Consommation Excessive d'Eau\",\"title_bilan\":\"Notification par mail\",\"switch_label_bilan\":\"Je reçois la lettre mensuelle contenant un bilan et des conseils sur ma consommation.\",\"switch_label_alert\":\"Être prévenu d’un dépassement anormal de ma consommation d’eau\",\"input_label_alert\":\"Si ma consommation d’eau quotidienne dépasse :\",\"input_label_subtext_alert\":\"Votre consommation quotidienne maximum sur les 6 derniers mois : \",\"activate\":\"Activer\",\"deactivate\":\"Désactiver\"},\"accessibility\":{\"button_toggle_mail_report\":\"Recevoir mon bilan mensuel par mail\",\"button_toggle_consumption_alert\":\"Recevoir des alertes sur mes consommations journalières\",\"input_water_alert_report\":\"Indiquer une limite de consommation d'eau journalière\"}},\"profile_type\":{\"title_profile\":\"Mes données\",\"read_profile\":\"Ajuster mon profil\",\"button_update_profile\":\"J'ajuste mon profil\",\"your_profile\":\"Mon profil\",\"multi_choices\":\"Plusieurs réponses possibles\",\"housing_type\":{\"title\":\"Logement\",\"question\":\"De quel type de logement disposez-vous ?\",\"individual_house\":\"Maison individuelle\",\"apartment\":\"Appartement\"},\"construction_year\":{\"title\":\"Construction\",\"question\":\"Quelle est son année de construction ?\",\"text_before_1948\":\"Construit avant 1948\",\"text_between_1948_and_1974\":\"Construit entre 1948 et 1974\",\"text_between_1975_and_1989\":\"Construit entre 1975 et 1989\",\"text_between_1990_and_1998\":\"Construit entre 1990 et 1998\",\"text_after_1998\":\"Construit après 1998\",\"text_unknown\":\"Construit après 1998\",\"before_1948\":\"Avant 1948\",\"between_1948_and_1974\":\"Entre 1948 et 1974\",\"between_1975_and_1989\":\"Entre 1975 et 1989\",\"between_1990_and_1998\":\"Entre 1990 et 1998\",\"after_1998\":\"Après 1998\",\"unknown\":\"Je ne sais pas\"},\"occupantsNumber\":{\"single\":\" occupant\",\"multi\":\" occupants\"},\"area\":{\"title\":\"Surface\",\"question\":\"Quelle est sa surface en m² ?\",\"name\":\" m²\"},\"occupants_number\":{\"title\":\"Nombre d'occupants\",\"question\":\"Combien il y a-t-il d'occupants ?\"},\"outside_facing_walls\":{\"1\":\"1 façade\",\"2\":\"2 façades\",\"3\":\"3 façades\",\"4\":\"4 façades\",\"title\":\"Murs extérieurs\",\"question\":\"Combien de façades donnent sur l'extérieur ?\",\"text\":{\"single\":\" façade donne sur l'extérieur\",\"multi\":\" façades donnent sur l'extérieur\"}},\"floor\":{\"title\":\"Étage\",\"question\":\"À quel étage est votre appartement ?\",\"ground_floor\":\"Au rez-de-chaussée\",\"intermediate_floor\":\"Étage intermédiaire\",\"last_floor\":\"Dernier étage\",\"not_applicable\":\"Sans objet\"},\"heating\":{\"title\":\"Chauffage\",\"question\":\"Quel est votre type de chauffage ?\",\"individual\":\"Individuel\",\"collective\":\"Collectif\"},\"individual_insulation_work\":{\"title\":\"Travaux de rénovation\",\"question\":\"Quels travaux de rénovation avez-vous réalisés ces 10 dernières années ?\",\"none\":\"Aucun\",\"roof_insulation\":\"Isolation toiture\",\"window_replacement\":\"Remplacement fenêtres\",\"wall_insulation\":\"Isolation des murs\",\"window_replacement_and_wall_insulation\":\"Remplacement fenêtres et isolation des murs\",\"window_replacement_and_roof_insulation\":\"Remplacement fenêtres et isolation toiture\",\"roof_and_wall_insulation\":\"Isolation toiture et murs\",\"window_replacement_and_roof_and_wall_insulation\":\"Remplacement fenêtre et isolation des murs et isolation toiture\",\"built_after_1998\":\"construit après 1998\"},\"facilities_installation\":{\"title\":\"Équipement\"},\"ventilation\":{\"title\":\"Ventilation double flux\",\"question\":\"Êtes-vous équipé d'une ventilation double flux ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une ventilation double flux\"},\"heater_replacement\":{\"title\":\"Pompe à chaleur ou poêle à bois\",\"question\":\"Au cours de ces 10 dernières années, avez-vous remplacé votre chaudière ou vous êtes-vous équipé d'une pompe à chaleur ou d'un poêle à bois ?\",\"yes\":\"Oui\",\"no\":\"Non\",\"unknown\":\"Je ne sais pas\",\"text\":\"Équipé d'une pompe à chaleur ou poêle à bois\"},\"cold_water\":{\"title\":\"Eau\",\"question\":\"Votre eau est-elle comprise dans vos charges collectives ?\",\"individual\":\"Non\",\"collective\":\"Oui\",\"individual_text\":\"Individuelle\",\"collective_text\":\"Collective\"},\"hot_water\":{\"title\":\"Eau chaude\",\"question\":\"Quel est votre type de production d’eau chaude ?\",\"individual\":\"Individuelle\",\"collective\":\"Collective\"},\"hot_water_equipment\":{\"title\":\"Eau chaude\",\"question\":\"Utilisez-vous l’un de ces équipements pour produire votre eau chaude ?\",\"solar\":\"Chauffe-eau solaire\",\"thermodynamic\":\"Chauffe-eau thermodynamique\",\"other\":\"Aucun des deux\"},\"warming_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Bois\",\"4\":\"Fioul\",\"5\":\"Autre\",\"title\":\"Source chauffage\",\"question\":\"Quelle source d’énergie principale utilisez-vous pour vous chauffer ?\",\"no_fluid_text\":\"Produit ni par de l'électricité, ni par du gaz, ni par du bois ou du fuel\",\"0_text\":\"Produit grâce à de l'électricité\",\"2_text\":\"Produit grâce au gaz\",\"3_text\":\"Produit grâce au bois\",\"4_text\":\"Produit grâce au fioul\",\"5_text\":\"Produit grâce à un autre moyen\"},\"hot_water_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"3\":\"Autre (Fioul, Bois)\",\"title\":\"Source eau chaude\",\"question\":\"Avec quelle source d’énergie votre eau chaude est-elle produite ?\",\"no_fluid_text\":\"Produite ni par de l'électricité, ni par du gaz\",\"0_text\":\"Produite grâce à de l'électricité\",\"2_text\":\"Produite grâce au gaz\",\"3_text\":\"Produite à partir d'un autre moyen que l'électricité ou le gaz\"},\"cooking_fluid\":{\"0\":\"Électricité\",\"2\":\"Gaz\",\"title\":\"Source cuisson\",\"question\":\"Quel mode de cuisson principal utilisez-vous ?\"},\"update_date\":{\"title\":\"Date de prise d'effet\",\"question\":\"A partir de quelle date souhaitez-vous que ce nouveau profil soit pris en compte dans l'analyse de vos données ?\"},\"fluidType\":{\"0\":\"Électricité\",\"1\":\"Eau\",\"2\":\"Gaz\"},\"form\":{\"button_previous\":\"Précédent\",\"button_next\":\"Suivant\",\"button_end\":\"Terminer\",\"button_loading\":\"Chargement...\"},\"finished\":{\"title\":\"Terminé !\",\"label1\":\"Grâce à ces informations, vous pourrez comparer votre consommation avec celle d'un foyer vous ressemblant davantage !\",\"label2\":\"Nous pourrons aussi vous proposer des astuces pour maîtriser vos consommations adaptées à votre profil.\",\"button_validate\":\"OK\"},\"accessibility\":{\"button_end\":\"Terminer la mise à jour du profil\",\"button_next\":\"Aller à la section suivante\",\"button_previous\":\"Retour à la section précédente\",\"button_update_profile\":\"Ouvrir la page de mise à jour du profil\",\"button_toggle_detail_profile\":\"Afficher ou masquer le détail du profil\",\"button_toggle_export\":\"Afficher ou masquer l'export des données'\",\"button_toggle_average_home\":\"Afficher ou masquer les informations sur le comparatif'\",\"button_validate\":\"Valider\"}},\"export\":{\"title_export\":\"Télécharger mes données\",\"text1\":\"Vous allez télécharger l'historique mensuel de vos fluides sélectionnés\",\"fluid_select\":\"Pour quel(s) fluide(s) souhaitez vous exporter vos données ?\",\"no_data\":\"Vous n'avez aucune donnée de fluide...\",\"button_download\":\"Télécharger\",\"month\":\"Mois\",\"year\":\"Année\",\"consumption\":\"Consommation\",\"maxpower\":\"Puissance max (kVA)\",\"button_close\":\"Fermer la fenêtre\",\"modal_start\":{\"accessibility_title\":\"Commencer le téléchargement\",\"text1\":\"Vous allez télécharger des données personnelles, Ecolyo n’est plus responsable de celles-ci une fois téléchargées\",\"text2\":\"Les données seront téléchargées sous forme de document excel (.xls)\",\"text3\":\"Lancer le téléchargement ?\",\"button_cancel\":\"Annuler\"},\"modal_loading\":{\"accessibility_title\":\"Téléchargement en cours\",\"text1\":\"Données en cours de téléchargement\",\"text2\":\"Veuillez ne pas quitter l’application pendant la récupération et le téléchargement de vos données\",\"button_cancel\":\"Annuler le téléchargement\"},\"modal_done\":{\"accessibility_title\":\"Téléchargement terminé\",\"text1\":\"Vos données ont bien été téléchargées !\",\"text2\":\"Vous pouvez maintenant retrouver l’historique de vos données sur votre appareil\",\"error1\":\"Aïe !\",\"error2\":\"Il semblerait qu’une erreur se soit produite lors du téléchargement de vos données.\",\"button_close\":\"Fermer\",\"button_close_error\":\"Revenir plus tard\"}},\"quiz\":{\"explanation\":\"Répondez correctement aux 5 questions et remportez 5 des 15 étoiles nécessaires pour débloquer le duel final\",\"score_final\":\"SCORE FINAL\",\"correct\":\"Bravo !\",\"wrong\":\"Raté !\",\"rightAnswer\":\"Bonne réponse :\",\"earn\":\"Vous remportez\",\"button_go_back\":\"Retour\",\"button_end_quiz\":\"Youpi !\",\"button_try_again\":\"Réessayer\",\"button_validate\":\"Valider\",\"next\":\"Suivant\",\"consumption_question\":\"Question sur votre consommation\",\"accessibility\":{\"window_title\":\"Fenêtre de résultat\",\"button_end_quiz\":\"Terminer le quiz\",\"button_go_back\":\"Retour\",\"button_go_next\":\"Suivant\",\"button_try_again\":\"Relancer le quiz\",\"button_validate\":\"Valider\"}},\"splashscreen\":{\"error_loading\":\"Une erreur est survenue\",\"button_reload\":\"Réessayer\",\"accessibility\":{\"button_reload\":\"Recharger la page\"},\"migration_error\":\"Mise à jour de l'application\",\"consent_error\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"profile_error\":\"Chargement de votre profil utilisateur\",\"profileType_error\":\"Chargement de votre profil de consommation.\",\"challenges_error\":\"Actualisation de votre progression dans les défis\",\"analysis_error\":\"Chargement de votre analyse mensuelle\",\"index_error\":\"Chargement des index\",\"prices_error\":\"Mise à jour des prix\",\"consos_error\":\"Connexion à vos données de consommation\",\"partners_error\":\"Récupération de l'état des services partenaires\",\"unknown_error\":\"Veuillez vérifier votre connexion internet\",\"network_error\":\"Erreur de réseau\",\"step\":{\"0\":\"Mise à jour de l'application\",\"1\":\"Vérification de vos consentements pour partager vos données avec Ecolyo\",\"2\":\"Chargement de votre profil\",\"3\":\"Actualisation de votre progression dans les défis\",\"4\":\"Mise à jour des prix\",\"5\":\"Connexion à vos données de consommation\"}},\"timestep\":{\"today\":\"Aujourd'hui\",\"year\":{\"period\":\"5 ans\",\"comparelabel\":\"Comparer à l'année précédente\"},\"month\":{\"period\":\"Année\",\"comparelabel\":\"Comparer à l'année précédente\",\"current\":\"année actuelle\",\"last\":\"année précédente\"},\"day\":{\"period\":\"Mois\",\"comparelabel\":\"Comparer au mois précédent\",\"current\":\"mois actuel\",\"last\":\"mois précédent\"},\"week\":{\"period\":\"Semaine\",\"comparelabel\":\"Comparer à la semaine précédente\",\"current\":\"semaine actuelle\",\"last\":\"semaine précédente\"},\"half_an_hour\":{\"period\":\"Jour\",\"comparelabel\":\"Comparer à la journée précédente\",\"gather_data_title\":\"La récupération de vos données demi-horaires prend environ 24h.\",\"current\":\"jour actuel\",\"last\":\"jour précédent\",\"gather_data_subtitle\":\"Votre connexion a bien été prise en compte mais un délai de 24h est en général nécessaire à l’obtention de vos données.\\nÀ demain !\",\"analysis_waiting_data\":\"Pour bénéficier d'une analyse approfondie de votre consommation électrique, il nous faut récupérer vos données de consommation horaires. La récupération de ces données prend environ 24h. A bientôt !\"},\"accessibility\":{\"button_zoom_in\":\"Sélectionner le pas de temps précédent\",\"button_zoom_out\":\"Sélectionner le pas de temps suivant\"}},\"unsubscribe\":{\"error\":\"Une erreur est survenue lors de votre désinscription, merci de ré-essayer plus tard.\",\"unsubscribed\":\"Vous êtes désormais désabonné\",\"subscribed\":\"Vous allez recevoir les prochaines newsletters\",\"content\":\"Vous ne recevrez plus la notification de votre bilan ainsi que les conseils associés au mois en cours.\",\"button_subscribe\":\"Je souhaite me ré-abonner à la newsletter\",\"button_home\":\"Me connecter\"},\"welcome_modal\":{\"title\":\"Félicitations\",\"perso\":\"Votre espace personnel a bien été créé.\",\"connect\":\"Vous pouvez maintenant connecter vos compteurs d’énergie à Ecolyo en toute sécurité.\",\"button_valid\":\"Ok\",\"accessibility\":{\"title\":\"Fenêtre de félicitations\",\"button_valid\":\"Valider\"}}}"); + +/***/ }), + +/***/ "Hv8/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_DAY_DOCTYPE = void 0; +var ENEDIS_DAY_DOCTYPE = 'com.grandlyon.enedis.day'; +exports.ENEDIS_DAY_DOCTYPE = ENEDIS_DAY_DOCTYPE; + +/***/ }), + +/***/ "HvLD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CardActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("k/LV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CardActions__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "HvLc": +/***/ (function(module, exports) { + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; + + +/***/ }), + +/***/ "HvXq": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsTypedArray = __webpack_require__("KOVl"), + baseUnary = __webpack_require__("Ijh8"), + nodeUtil = __webpack_require__("7tyZ"); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; + + +/***/ }), + +/***/ "HyJZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _getStylesCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7ZTE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getStylesCreator__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "HzFX": +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), + +/***/ "I/47": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isCordova = void 0; + +// cordova +var isCordova = function isCordova() { + return typeof window !== 'undefined' && window.cordova !== undefined; +}; + +exports.isCordova = isCordova; + +/***/ }), + +/***/ "I2rS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withThemeCreator", function() { return withThemeCreator; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NFku"); + + + + + + + +function withThemeCreator() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaultTheme = options.defaultTheme; + + var withTheme = function withTheme(Component) { + if (false) {} + + var WithTheme = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function WithTheme(props, ref) { + var innerRef = props.innerRef, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["innerRef"]); + + var theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_6__["default"])() || defaultTheme; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + theme: theme, + ref: innerRef || ref + }, other)); + }); + false ? undefined : void 0; + + if (false) {} + + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(WithTheme, Component); + + if (false) {} + + return WithTheme; + }; + + return withTheme; +} // Provide the theme object as a prop to the input component. +// It's an alternative API to useTheme(). +// We encourage the usage of useTheme() where possible. + +var withTheme = withThemeCreator(); +/* harmony default export */ __webpack_exports__["default"] = (withTheme); + +/***/ }), + +/***/ "I3Nk": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.dehydrate = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _associations = __webpack_require__("Suxc"); + +var dehydrate = function dehydrate(document) { + var dehydrated = Object.entries(document).reduce(function (documentArg, _ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + key = _ref2[0], + value = _ref2[1]; + + var document = documentArg; + + if (!(value instanceof _associations.Association)) { + document[key] = value; // @ts-ignore + } else if (value.dehydrate) { + // @ts-ignore + document = value.dehydrate(document); + } else { + throw new Error("Association on key ".concat(key, " should have a dehydrate method")); + } + + return document; + }, {}); + return dehydrated; +}; + +exports.dehydrate = dehydrate; + +/***/ }), + +/***/ "I4/v": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inheritsLoose; }); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MLyG"); + +function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); +} + +/***/ }), + +/***/ "I6w8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Prisma", function() { return Prisma; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +function isValidPrismaClient(possibleClient) { + return possibleClient && !!(possibleClient )['$use']; +} + +/** Tracing integration for @prisma/client package */ +class Prisma { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Prisma';} + + /** + * @inheritDoc + */ + __init() {this.name = Prisma.id;} + + /** + * Prisma ORM Client Instance + */ + + /** + * @inheritDoc + */ + constructor(options = {}) {;Prisma.prototype.__init.call(this); + if (isValidPrismaClient(options.client)) { + this._client = options.client; + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + `Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(options.client)}`, + ); + } + } + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + if (!this._client) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('PrismaIntegration is missing a Prisma Client Instance'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Prisma Integration is skipped because of instrumenter configuration.'); + return; + } + + this._client.$use((params, next) => { + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); + + const action = params.action; + const model = params.model; + + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ + description: model ? `${model} ${action}` : action, + op: 'db.sql.prisma', + })]); + + const rv = next(params); + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(rv)) { + return rv.then((res) => { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); + return res; + }); + } + + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + return rv; + }); + } +}Prisma.__initStatic(); + + +//# sourceMappingURL=prisma.js.map + + +/***/ }), + +/***/ "I9Qy": +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__("HzFX"); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), + +/***/ "IAQC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Oxgs"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistReducer", function() { return _persistReducer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _persistCombineReducers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("LVjP"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistCombineReducers", function() { return _persistCombineReducers__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _persistStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9AMN"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistStore", function() { return _persistStore__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _createMigrate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("4gX9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMigrate", function() { return _createMigrate__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _createTransform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("oKzK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransform", function() { return _createTransform__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _getStoredState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("yoUh"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStoredState", function() { return _getStoredState__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _createPersistoid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("mpL6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPersistoid", function() { return _createPersistoid__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _purgeStoredState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("NLnG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "purgeStoredState", function() { return _purgeStoredState__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ph6I"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KEY_PREFIX", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["KEY_PREFIX"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FLUSH", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["FLUSH"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REHYDRATE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["REHYDRATE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PAUSE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PERSIST", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PERSIST"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PURGE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PURGE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["REGISTER"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_VERSION", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_VERSION"]; }); + + + + + + + + + + + + +/***/ }), + +/***/ "IGOm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Snl0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["createProvider"]; }); + +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("UQKm"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _connect_connect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("DsH6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _connect_connect__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + +/***/ }), + +/***/ "IHbp": +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__("764U"); +var toLength = __webpack_require__("yhnj"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), + +/***/ "ILGm": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'] + var weekdays2char = ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'] + var weekdays3char = ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'] + var weekdaysFull = ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "IMM0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("FiJW"); + + + +var separatorRegExp = /\s*,\s*/g; +var parentRegExp = /&/g; +var refRegExp = /\$([\w-]+)/g; +/** + * Convert nested rules to separate, remove them from original styles. + */ + +function jssNested() { + // Get a function to be used for $ref replacement. + function getReplaceRef(container, sheet) { + return function (match, key) { + var rule = container.getRule(key) || sheet && sheet.getRule(key); + + if (rule) { + return rule.selector; + } + + false ? undefined : void 0; + return key; + }; + } + + function replaceParentRefs(nestedProp, parentProp) { + var parentSelectors = parentProp.split(separatorRegExp); + var nestedSelectors = nestedProp.split(separatorRegExp); + var result = ''; + + for (var i = 0; i < parentSelectors.length; i++) { + var parent = parentSelectors[i]; + + for (var j = 0; j < nestedSelectors.length; j++) { + var nested = nestedSelectors[j]; + if (result) result += ', '; // Replace all & by the parent or prefix & with the parent. + + result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + " " + nested; + } + } + + return result; + } + + function getOptions(rule, container, prevOptions) { + // Options has been already created, now we only increase index. + if (prevOptions) return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, prevOptions, { + index: prevOptions.index + 1 + }); + var nestingLevel = rule.options.nestingLevel; + nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1; + + var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, rule.options, { + nestingLevel: nestingLevel, + index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid. + + }); + + delete options.name; + return options; + } + + function onProcessStyle(style, rule, sheet) { + if (rule.type !== 'style') return style; + var styleRule = rule; + var container = styleRule.options.parent; + var options; + var replaceRef; + + for (var prop in style) { + var isNested = prop.indexOf('&') !== -1; + var isNestedConditional = prop[0] === '@'; + if (!isNested && !isNestedConditional) continue; + options = getOptions(styleRule, container, options); + + if (isNested) { + var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for + // all nested rules within the sheet. + + if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs. + + selector = selector.replace(refRegExp, replaceRef); + var name = styleRule.key + "-" + prop; + + if ('replaceRule' in container) { + // for backward compatibility + container.replaceRule(name, style[prop], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + selector: selector + })); + } else { + container.addRule(name, style[prop], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + selector: selector + })); + } + } else if (isNestedConditional) { + // Place conditional right after the parent rule to ensure right ordering. + container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], { + selector: styleRule.selector + }); + } + + delete style[prop]; + } + + return style; + } + + return { + onProcessStyle: onProcessStyle + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (jssNested); + + +/***/ }), + +/***/ "IQ1l": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sub; }); +/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MwOV"); +/* harmony import */ var _subMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("vjoj"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bKmd"); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("CUab"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + + + + +/** + * @name sub + * @category Common Helpers + * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. + * + * @description + * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be subtracted + * + * | Key | Description | + * |---------|------------------------------------| + * | years | Amount of years to be subtracted | + * | months | Amount of months to be subtracted | + * | weeks | Amount of weeks to be subtracted | + * | days | Amount of days to be subtracted | + * | hours | Amount of hours to be subtracted | + * | minutes | Amount of minutes to be subtracted | + * | seconds | Amount of seconds to be subtracted | + * + * All values default to 0 + * + * @returns {Date} the new date with the seconds subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract the following duration from 15 June 2017 15:29:20 + * const result = sub(new Date(2017, 5, 15, 15, 29, 20), { + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30 + * }) + * //=> Mon Sep 1 2014 10:19:50 + */ + +function sub(date, duration) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(2, arguments); + if (!duration || _typeof(duration) !== 'object') return new Date(NaN); + var years = duration.years ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.years) : 0; + var months = duration.months ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.months) : 0; + var weeks = duration.weeks ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.weeks) : 0; + var days = duration.days ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.days) : 0; + var hours = duration.hours ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.hours) : 0; + var minutes = duration.minutes ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.minutes) : 0; + var seconds = duration.seconds ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(duration.seconds) : 0; // Subtract years and months + + var dateWithoutMonths = Object(_subMonths_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(date, months + years * 12); // Subtract weeks and days + + var dateWithoutDays = Object(_subDays_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dateWithoutMonths, days + weeks * 7); // Subtract hours, minutes and seconds + + var minutestoSub = minutes + hours * 60; + var secondstoSub = seconds + minutestoSub * 60; + var mstoSub = secondstoSub * 1000; + var finalDate = new Date(dateWithoutDays.getTime() - mstoSub); + return finalDate; +} + +/***/ }), + +/***/ "IU9S": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useForkRef; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("88Tv"); + + +function useForkRef(refA, refB) { + /** + * This will create a new function if the ref props change and are defined. + * This means react will call the old forkRef with `null` and the new forkRef + * with the ref. Cleanup naturally emerges from this behavior + */ + return react__WEBPACK_IMPORTED_MODULE_0__["useMemo"](function () { + if (refA == null && refB == null) { + return null; + } + + return function (refValue) { + Object(_setRef__WEBPACK_IMPORTED_MODULE_1__["default"])(refA, refValue); + Object(_setRef__WEBPACK_IMPORTED_MODULE_1__["default"])(refB, refValue); + }; + }, [refA, refB]); +} + +/***/ }), + +/***/ "IW7p": +/***/ (function(module, exports, __webpack_require__) { + +var baseClone = __webpack_require__("8U3o"); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; + + +/***/ }), + +/***/ "IZ9b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ll/m"); + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + flexWrap: 'wrap', + overflowY: 'auto', + listStyle: 'none', + padding: 0, + WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling. + + } +}; +var ImageList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ImageList(props, ref) { + var cellHeight = props.cellHeight, + children = props.children, + classes = props.classes, + className = props.className, + _props$cols = props.cols, + cols = _props$cols === void 0 ? 2 : _props$cols, + _props$component = props.component, + Component = _props$component === void 0 ? 'ul' : _props$component, + _props$gap = props.gap, + gapProp = _props$gap === void 0 ? 4 : _props$gap, + _props$rowHeight = props.rowHeight, + rowHeightProp = _props$rowHeight === void 0 ? 180 : _props$rowHeight, + spacing = props.spacing, + style = props.style, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["cellHeight", "children", "classes", "className", "cols", "component", "gap", "rowHeight", "spacing", "style"]); + + var gap = spacing || gapProp; + var rowHeight = cellHeight || rowHeightProp; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + margin: -gap / 2 + }, style) + }, other), react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return null; + } + + if (false) {} + + var childCols = child.props.cols || 1; + var childRows = child.props.rows || 1; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + width: "".concat(100 / cols * childCols, "%"), + height: rowHeight === 'auto' ? 'auto' : rowHeight * childRows + gap, + padding: gap / 2 + }, child.props.style) + }); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiImageList' +})(ImageList)); + +/***/ }), + +/***/ "IcUP": +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__("1del"), + isFlattenable = __webpack_require__("nFQy"); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; + + +/***/ }), + +/***/ "IfZr": +/***/ (function(module, exports) { + +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +module.exports = safeGet; + + +/***/ }), + +/***/ "Ijh8": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; + + +/***/ }), + +/***/ "Ikrg": +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), + +/***/ "Im6z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toConsumableArray; }); +/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rD74"); +/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Q+Sd"); +/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("LBaW"); +/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("yYZC"); + + + + +function _toConsumableArray(arr) { + return Object(_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr) || Object(_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); +} + +/***/ }), + +/***/ "ImID": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/spinner.svg` to regenerate; + +function SvgSpinner(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 32 32" + }, props, { + role: "progressbar", + "aria-busy": "true" + }), /*#__PURE__*/_react.default.createElement("path", { + opacity: 0.25, + d: "M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24" + }), /*#__PURE__*/_react.default.createElement("path", { + d: "M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z" + })); +} +var _default = SvgSpinner; +exports.default = _default; + +/***/ }), + +/***/ "IoxZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _DialogContentText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b/Th"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _DialogContentText__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "Itbq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Dedupe", function() { return Dedupe; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +/** Deduplication filter */ +class Dedupe {constructor() { Dedupe.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Dedupe';} + + /** + * @inheritDoc + */ + __init() {this.name = Dedupe.id;} + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + setupOnce(addGlobalEventProcessor, getCurrentHub) { + const eventProcessor = currentEvent => { + const self = getCurrentHub().getIntegration(Dedupe); + if (self) { + // Juuust in case something goes wrong + try { + if (_shouldDropEvent(currentEvent, self._previousEvent)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Event dropped due to being a duplicate of previously captured event.'); + return null; + } + } catch (_oO) { + return (self._previousEvent = currentEvent); + } + + return (self._previousEvent = currentEvent); + } + return currentEvent; + }; + + eventProcessor.id = this.name; + addGlobalEventProcessor(eventProcessor); + } +} Dedupe.__initStatic(); + +/** JSDoc */ +function _shouldDropEvent(currentEvent, previousEvent) { + if (!previousEvent) { + return false; + } + + if (_isSameMessageEvent(currentEvent, previousEvent)) { + return true; + } + + if (_isSameExceptionEvent(currentEvent, previousEvent)) { + return true; + } + + return false; +} + +/** JSDoc */ +function _isSameMessageEvent(currentEvent, previousEvent) { + const currentMessage = currentEvent.message; + const previousMessage = previousEvent.message; + + // If neither event has a message property, they were both exceptions, so bail out + if (!currentMessage && !previousMessage) { + return false; + } + + // If only one event has a stacktrace, but not the other one, they are not the same + if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) { + return false; + } + + if (currentMessage !== previousMessage) { + return false; + } + + if (!_isSameFingerprint(currentEvent, previousEvent)) { + return false; + } + + if (!_isSameStacktrace(currentEvent, previousEvent)) { + return false; + } + + return true; +} + +/** JSDoc */ +function _isSameExceptionEvent(currentEvent, previousEvent) { + const previousException = _getExceptionFromEvent(previousEvent); + const currentException = _getExceptionFromEvent(currentEvent); + + if (!previousException || !currentException) { + return false; + } + + if (previousException.type !== currentException.type || previousException.value !== currentException.value) { + return false; + } + + if (!_isSameFingerprint(currentEvent, previousEvent)) { + return false; + } + + if (!_isSameStacktrace(currentEvent, previousEvent)) { + return false; + } + + return true; +} + +/** JSDoc */ +function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = _getFramesFromEvent(currentEvent); + let previousFrames = _getFramesFromEvent(previousEvent); + + // If neither event has a stacktrace, they are assumed to be the same + if (!currentFrames && !previousFrames) { + return true; + } + + // If only one event has a stacktrace, but not the other one, they are not the same + if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) { + return false; + } + + currentFrames = currentFrames ; + previousFrames = previousFrames ; + + // If number of frames differ, they are not the same + if (previousFrames.length !== currentFrames.length) { + return false; + } + + // Otherwise, compare the two + for (let i = 0; i < previousFrames.length; i++) { + const frameA = previousFrames[i]; + const frameB = currentFrames[i]; + + if ( + frameA.filename !== frameB.filename || + frameA.lineno !== frameB.lineno || + frameA.colno !== frameB.colno || + frameA.function !== frameB.function + ) { + return false; + } + } + + return true; +} + +/** JSDoc */ +function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint; + let previousFingerprint = previousEvent.fingerprint; + + // If neither event has a fingerprint, they are assumed to be the same + if (!currentFingerprint && !previousFingerprint) { + return true; + } + + // If only one event has a fingerprint, but not the other one, they are not the same + if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) { + return false; + } + + currentFingerprint = currentFingerprint ; + previousFingerprint = previousFingerprint ; + + // Otherwise, compare the two + try { + return !!(currentFingerprint.join('') === previousFingerprint.join('')); + } catch (_oO) { + return false; + } +} + +/** JSDoc */ +function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; +} + +/** JSDoc */ +function _getFramesFromEvent(event) { + const exception = event.exception; + + if (exception) { + try { + // @ts-ignore Object could be undefined + return exception.values[0].stacktrace.frames; + } catch (_oO) { + return undefined; + } + } + return undefined; +} + + +//# sourceMappingURL=dedupe.js.map + + +/***/ }), + +/***/ "Iv0v": +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__("+IXE"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; + + +/***/ }), + +/***/ "Ix7K": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("jlvQ"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("V6W0"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("kjpz"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("xOGQ"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("IU9S"); + + + + + + + + + + +var styles = { + entering: { + transform: 'none' + }, + entered: { + transform: 'none' + } +}; +var defaultTimeout = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__["duration"].leavingScreen +}; +/** + * The Zoom transition can be used for the floating variant of the + * [Button](/components/buttons/#floating-action-buttons) component. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ + +var Zoom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Zoom(props, ref) { + var children = props.children, + _props$disableStrictM = props.disableStrictModeCompat, + disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__["Transition"] : _props$TransitionComp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; + var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(children.ref, ref); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef); + + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (nodeOrAppearing, maybeAppearing) { + if (callback) { + var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], + _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), + node = _ref2[0], + isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. + + + if (isAppearing === undefined) { + callback(node); + } else { + callback(node, isAppearing); + } + } + }; + }; + + var handleEntering = normalizedTransitionCallback(onEntering); + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["reflow"])(node); // So the animation always start from the start. + + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'enter' + }); + node.style.webkitTransition = theme.transitions.create('transform', transitionProps); + node.style.transition = theme.transitions.create('transform', transitionProps); + + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(onEntered); + var handleExiting = normalizedTransitionCallback(onExiting); + var handleExit = normalizedTransitionCallback(function (node) { + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'exit' + }); + node.style.webkitTransition = theme.transitions.create('transform', transitionProps); + node.style.transition = theme.transitions.create('transform', transitionProps); + + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(onExited); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + appear: true, + in: inProp, + nodeRef: enableStrictModeCompat ? nodeRef : undefined, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + timeout: timeout + }, other), function (state, childProps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + transform: 'scale(0)', + visibility: state === 'exited' && !inProp ? 'hidden' : undefined + }, styles[state], style, children.props.style), + ref: handleRef + }, childProps)); + }); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Zoom); + +/***/ }), + +/***/ "IzOX": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__("764U"); +var $getOwnPropertyDescriptor = __webpack_require__("Yfzq").f; + +__webpack_require__("80eX")('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + + +/***/ }), + +/***/ "J+GK": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("BZiP") +var buildFormatLocale = __webpack_require__("HdNd") + +/** + * @category Locales + * @summary Dutch locale. + * @author Jorik Tangelder [@jtangelder]{@link https://github.com/jtangelder} + * @author Ruben Stolk [@rubenstolk]{@link https://github.com/rubenstolk} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "J/YY": +/***/ (function(module, exports) { + +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "J19X": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableRest; }); +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."); +} + +/***/ }), + +/***/ "J3p3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.registryEndpoint = exports.transformRegistryFormatToStackFormat = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +__webpack_require__("wlqn"); + +var _terms = _interopRequireDefault(__webpack_require__("O44F")); + +var _constants = __webpack_require__("Umsc"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var transformRegistryFormatToStackFormat = function transformRegistryFormatToStackFormat(doc) { + return _objectSpread({ + id: (0, _get.default)(doc, 'latest_version.manifest.source'), + attributes: (0, _get.default)(doc, 'latest_version.manifest') + }, doc); +}; + +exports.transformRegistryFormatToStackFormat = transformRegistryFormatToStackFormat; +var registryEndpoint = '/registry/'; +exports.registryEndpoint = registryEndpoint; + +var queryPartFromOptions = function queryPartFromOptions(options) { + var query = new URLSearchParams(options).toString(); + return query ? "?".concat(query) : ''; +}; + +var getBaseRoute = function getBaseRoute(app) { + var type = app.type; // TODO node is an historic type, it should be `konnector`, check with the back + + var route = type === _constants.APP_TYPE.KONNECTOR || type === 'node' ? 'konnectors' : 'apps'; + return "/".concat(route); +}; +/** + * @typedef {object} RegistryApp + * @property {string} slug + * @property {object} terms + * @property {boolean} installed + * @property {string} type + */ + +/** + * @typedef {"dev"|"beta"|"stable"} RegistryAppChannel + */ + + +var Registry = /*#__PURE__*/function () { + function Registry(options) { + (0, _classCallCheck2.default)(this, Registry); + + if (!options.client) { + throw new Error('Need to pass a client to instantiate a Registry API.'); + } + + this.client = options.client; + } + /** + * Installs or updates an app from a source. + * + * Accepts the terms if the app has them. + * + * @param {RegistryApp} app - App to be installed + * @param {string} source - String (ex: registry://drive/stable) + * @returns {Promise} + */ + + + (0, _createClass2.default)(Registry, [{ + key: "installApp", + value: function () { + var _installApp = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(app, source) { + var slug, terms, searchParams, isUpdate, querypart, verb, baseRoute; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + slug = app.slug, terms = app.terms; + searchParams = {}; + isUpdate = app.installed; + if (isUpdate) searchParams.PermissionsAcked = isUpdate; + if (source) searchParams.Source = source; + querypart = queryPartFromOptions(searchParams); + + if (!terms) { + _context.next = 9; + break; + } + + _context.next = 9; + return _terms.default.save(this.client, terms); + + case 9: + verb = app.installed ? 'PUT' : 'POST'; + baseRoute = getBaseRoute(app); + return _context.abrupt("return", this.client.stackClient.fetchJSON(verb, "".concat(baseRoute, "/").concat(slug).concat(querypart))); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function installApp(_x, _x2) { + return _installApp.apply(this, arguments); + } + + return installApp; + }() + /** + * Uninstalls an app. + * + * @param {RegistryApp} app - App to be installed + * @returns {Promise} + */ + + }, { + key: "uninstallApp", + value: function () { + var _uninstallApp = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(app) { + var slug, baseRoute; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + slug = app.slug; + baseRoute = getBaseRoute(app); + return _context2.abrupt("return", this.client.stackClient.fetchJSON('DELETE', "".concat(baseRoute, "/").concat(slug))); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function uninstallApp(_x3) { + return _uninstallApp.apply(this, arguments); + } + + return uninstallApp; + }() + /** + * Fetch at most 200 apps from the channel + * + * @param {object} params - Fetching parameters + * @param {string} params.type - "webapp" or "konnector" + * @param {RegistryAppChannel} params.channel - The channel of the apps to fetch + * @param {string} params.limit - maximum number of fetched apps - defaults to 200 + * + * @returns {Promise<Array<RegistryApp>>} + */ + + }, { + key: "fetchApps", + value: function () { + var _fetchApps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(params) { + var channel, type, _params$limit, limit, searchParams, querypart, _yield$this$client$st, apps; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + channel = params.channel, type = params.type, _params$limit = params.limit, limit = _params$limit === void 0 ? '200' : _params$limit; + searchParams = { + limit: limit, + versionsChannel: channel, + latestChannelVersion: channel + }; + querypart = new URLSearchParams(searchParams).toString(); + + if (type) { + // Unfortunately, URLSearchParams encodes brackets so we have to do + // the querypart handling manually + querypart = querypart + "&filter[type]=".concat(type); + } + + _context3.next = 6; + return this.client.stackClient.fetchJSON('GET', "/registry?".concat(querypart)); + + case 6: + _yield$this$client$st = _context3.sent; + apps = _yield$this$client$st.data; + return _context3.abrupt("return", apps); + + case 9: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function fetchApps(_x4) { + return _fetchApps.apply(this, arguments); + } + + return fetchApps; + }() + /** + * Fetch the list of apps that are in maintenance mode + * + * @returns {Promise<Array<RegistryApp>>} + */ + + }, { + key: "fetchAppsInMaintenance", + value: function fetchAppsInMaintenance() { + return this.client.stackClient.fetchJSON('GET', '/registry/maintenance'); + } + /** + * Fetch the status of a single app on the registry + * + * @param {string} slug - The slug of the app to fetch + * + * @returns {Promise<RegistryApp>} + */ + + }, { + key: "fetchApp", + value: function fetchApp(slug) { + return this.client.stackClient.fetchJSON('GET', "/registry/".concat(slug)); + } + /** + * Fetch the latest version of an app for the given channel and slug + * + * @param {object} params - Fetching parameters + * @param {string} params.slug - The slug of the app to fetch + * @param {RegistryAppChannel} params.channel - The channel of the app to fetch + * @param {string} params.version - The version of the app to fetch. Can also be "latest" + * + * @returns {Promise<RegistryApp>} + */ + + }, { + key: "fetchAppVersion", + value: function fetchAppVersion(params) { + if (!params.slug) { + throw new Error('Need to pass a slug to use fetchAppVersion'); + } + + var slug = params.slug, + channel = params.channel, + version = params.version; + var finalChannel = !channel && (!version || version === 'latest') ? 'stable' : channel; + var url = "/registry/".concat(slug, "/"); + + if (finalChannel) { + url += "".concat(finalChannel, "/").concat(version || 'latest'); + } else { + url += "".concat(version); + } + + return this.client.stackClient.fetchJSON('GET', url); + } + }]); + return Registry; +}(); + +var _default = Registry; +exports.default = _default; + +/***/ }), + +/***/ "J4Lj": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("wVGO") +var buildFormatLocale = __webpack_require__("qOJT") + +/** + * @category Locales + * @summary Catalan locale. + * @author Guillermo Grau [@guigrpa]{@link https://github.com/guigrpa} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "J58c": +/***/ (function(module, exports) { + +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; +} + +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "J7Me": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("npFJ")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("sVxE"); +var hasOwn = __webpack_require__("H8OS"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "JAuI": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'mai puțin de o secundă', + other: 'mai puțin de {{count}} secunde' + }, + + xSeconds: { + one: '1 secundă', + other: '{{count}} secunde' + }, + + halfAMinute: 'jumătate de minut', + + lessThanXMinutes: { + one: 'mai puțin de un minut', + other: 'mai puțin de {{count}} minute' + }, + + xMinutes: { + one: '1 minut', + other: '{{count}} minute' + }, + + aboutXHours: { + one: 'circa 1 oră', + other: 'circa {{count}} ore' + }, + + xHours: { + one: '1 oră', + other: '{{count}} ore' + }, + + xDays: { + one: '1 zi', + other: '{{count}} zile' + }, + + aboutXMonths: { + one: 'circa 1 lună', + other: 'circa {{count}} luni' + }, + + xMonths: { + one: '1 lună', + other: '{{count}} luni' + }, + + aboutXYears: { + one: 'circa 1 an', + other: 'circa {{count}} ani' + }, + + xYears: { + one: '1 an', + other: '{{count}} ani' + }, + + overXYears: { + one: 'peste 1 an', + other: 'peste {{count}} ani' + }, + + almostXYears: { + one: 'aproape 1 an', + other: 'aproape {{count}} ani' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'în ' + result + } else { + return result + ' în urmă' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "JF7T": +/***/ (function(module, exports, __webpack_require__) { + +var baseMatches = __webpack_require__("O905"), + baseMatchesProperty = __webpack_require__("Dcxy"), + identity = __webpack_require__("Q7kj"), + isArray = __webpack_require__("8u9v"), + property = __webpack_require__("z578"); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; + + +/***/ }), + +/***/ "JGNw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ownerWindow; }); +/* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("sbbm"); + +function ownerWindow(node) { + var doc = Object(_ownerDocument__WEBPACK_IMPORTED_MODULE_0__["default"])(node); + return doc.defaultView || window; +} + +/***/ }), + +/***/ "JJnO": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var $parseFloat = __webpack_require__("euRm"); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + + +/***/ }), + +/***/ "JNO2": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in Turkish, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + var months3char = ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'] + var monthsFull = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'] + var weekdays2char = ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'] + var weekdays3char = ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'] + var weekdaysFull = ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'] + var meridiemUppercase = ['ÖÖ', 'ÖS'] + var meridiemLowercase = ['öö', 'ös'] + var meridiemFull = ['ö.ö.', 'ö.s.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var suffixes = { + 1: '\'inci', + 2: '\'inci', + 3: '\'üncü', + 4: '\'üncü', + 5: '\'inci', + 6: '\'ıncı', + 7: '\'inci', + 8: '\'inci', + 9: '\'uncu', + 10: '\'uncu', + 20: '\'inci', + 30: '\'uncu', + 50: '\'inci', + 60: '\'ıncı', + 70: '\'inci', + 80: '\'inci', + 90: '\'ıncı', + 100: '\'üncü' + } + + if (number === 0) { + return '0\'ıncı' + } + + var x = number % 10 + var y = number % 100 - x + var z = number >= 100 ? 100 : null + + return number + (suffixes[x] || suffixes[y] || suffixes[z]) +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "JNQl": +/***/ (function(module, exports) { + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = noop; + + +/***/ }), + +/***/ "JNaP": +/***/ (function(module, exports, __webpack_require__) { + +var baseProperty = __webpack_require__("XrMh"); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; + + +/***/ }), + +/***/ "JSg/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); + +var _flag = _interopRequireDefault(__webpack_require__("7hLD")); + +var _connect = _interopRequireDefault(__webpack_require__("G1be")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +var FlagInput = function FlagInput(_ref) { + var name = _ref.name, + _onChange = _ref.onChange; + return /*#__PURE__*/_react.default.createElement("input", { + type: "checkbox", + checked: (0, _flag.default)(name), + onChange: function onChange(ev) { + return (0, _flag.default)(name, JSON.parse(ev.target.checked)) && _onChange && _onChange(); + } + }); +}; + +var FoldButton = function FoldButton(_ref2) { + var children = _ref2.children, + onClick = _ref2.onClick; + return /*#__PURE__*/_react.default.createElement("button", { + type: "button", + onClick: onClick, + style: { + position: 'absolute', + top: '100%', + left: '0' + } + }, children); +}; + +var getStyle = function getStyle(state) { + return { + borderBottomLeftRadius: '.5rem', + padding: '.5rem', + position: 'absolute', + zIndex: 1000, + color: 'white', + background: 'rgba(74,68,90,0.85)', + top: 0, + right: 0, + transform: "translateY(".concat(state.folded ? '-100%' : '0', ")") + }; +}; + +var human = function human(name) { + return name.replace(/[a-z][A-Z]/g, function (str) { + return str[0] + ' ' + str[1].toLowerCase(); + }); +}; + +var FlagList = (0, _connect.default)(function () { + var allFlags = _flag.default.list(); + + return /*#__PURE__*/_react.default.createElement("div", null, allFlags.map(function (name) { + return /*#__PURE__*/_react.default.createElement("div", { + key: name + }, human(name), " : ", /*#__PURE__*/_react.default.createElement(FlagInput, { + onChange: function onChange() {}, + name: name + })); + })); +}); + +var FlagSwitcher = /*#__PURE__*/function (_React$Component) { + (0, _inherits2.default)(FlagSwitcher, _React$Component); + + var _super = _createSuper(FlagSwitcher); + + function FlagSwitcher(props) { + var _this; + + (0, _classCallCheck2.default)(this, FlagSwitcher); + _this = _super.call(this, props); + _this.state = { + folded: true + }; + return _this; + } + + (0, _createClass2.default)(FlagSwitcher, [{ + key: "render", + value: function render() { + var _this2 = this; + + return (0, _flag.default)('switcher') && /*#__PURE__*/_react.default.createElement("div", { + className: "flag-switcher", + style: getStyle(this.state) + }, /*#__PURE__*/_react.default.createElement(FoldButton, { + onClick: function onClick() { + return _this2.setState(function (prevState) { + return { + folded: !prevState.folded + }; + }); + } + }, this.state.folded ? 'Show' : 'Hide', " flags"), /*#__PURE__*/_react.default.createElement("button", { + onClick: function onClick() { + return _this2.setState({ + date: Date.now() + }); + } + }, "refresh"), "\xA0", /*#__PURE__*/_react.default.createElement("button", { + onClick: function onClick() { + return _flag.default.reset() && (0, _flag.default)('switcher', true) && _this2.forceUpdate(); + } + }, "reset"), /*#__PURE__*/_react.default.createElement(FlagList, null)); + } + }]); + return FlagSwitcher; +}(_react.default.Component); + +exports.default = FlagSwitcher; +FlagSwitcher.List = FlagList; + +/***/ }), + +/***/ "JTVy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Profiler", function() { return Profiler; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNKNOWN_COMPONENT", function() { return UNKNOWN_COMPONENT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function() { return getActiveTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useProfiler", function() { return useProfiler; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withProfiler", function() { return withProfiler; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("icJ4"); + + + + + + +const _jsxFileName = "/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";/* eslint-disable @typescript-eslint/no-unsafe-member-access */ + +const UNKNOWN_COMPONENT = 'unknown'; + +/** + * The Profiler component leverages Sentry's Tracing integration to generate + * spans based on component lifecycles. + */ +class Profiler extends react__WEBPACK_IMPORTED_MODULE_3__["Component"] { + /** + * The span of the mount activity + * Made protected for the React Native SDK to access + */ + __init() {this._mountSpan = undefined;} + /** + * The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate + */ + __init2() {this._updateSpan = undefined;} + + // eslint-disable-next-line @typescript-eslint/member-ordering + static __initStatic() {this.defaultProps = { + disabled: false, + includeRender: true, + includeUpdates: true, + };} + + constructor(props) { + super(props);Profiler.prototype.__init.call(this);Profiler.prototype.__init2.call(this);; + const { name, disabled = false } = this.props; + + if (disabled) { + return; + } + + const activeTransaction = getActiveTransaction(); + if (activeTransaction) { + this._mountSpan = activeTransaction.startChild({ + description: `<${name}>`, + op: _constants_js__WEBPACK_IMPORTED_MODULE_4__["REACT_MOUNT_OP"], + }); + } + } + + // If a component mounted, we can finish the mount activity. + componentDidMount() { + if (this._mountSpan) { + this._mountSpan.finish(); + } + } + + shouldComponentUpdate({ updateProps, includeUpdates = true }) { + // Only generate an update span if includeUpdates is true, if there is a valid mountSpan, + // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive. + // We are just trying to give baseline clues for further investigation. + if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) { + // See what props haved changed between the previous props, and the current props. This is + // set as data on the span. We just store the prop keys as the values could be potenially very large. + const changedProps = Object.keys(updateProps).filter(k => updateProps[k] !== this.props.updateProps[k]); + if (changedProps.length > 0) { + const now = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])(); + this._updateSpan = this._mountSpan.startChild({ + data: { + changedProps, + }, + description: `<${this.props.name}>`, + op: _constants_js__WEBPACK_IMPORTED_MODULE_4__["REACT_UPDATE_OP"], + startTimestamp: now, + }); + } + } + + return true; + } + + componentDidUpdate() { + if (this._updateSpan) { + this._updateSpan.finish(); + this._updateSpan = undefined; + } + } + + // If a component is unmounted, we can say it is no longer on the screen. + // This means we can finish the span representing the component render. + componentWillUnmount() { + const { name, includeRender = true } = this.props; + + if (this._mountSpan && includeRender) { + // If we were able to obtain the spanId of the mount activity, we should set the + // next activity as a child to the component mount activity. + this._mountSpan.startChild({ + description: `<${name}>`, + endTimestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])(), + op: _constants_js__WEBPACK_IMPORTED_MODULE_4__["REACT_RENDER_OP"], + startTimestamp: this._mountSpan.endTimestamp, + }); + } + } + + render() { + return this.props.children; + } +} Profiler.__initStatic(); + +/** + * withProfiler is a higher order component that wraps a + * component in a {@link Profiler} component. It is recommended that + * the higher order component be used over the regular {@link Profiler} component. + * + * @param WrappedComponent component that is wrapped by Profiler + * @param options the {@link ProfilerProps} you can pass into the Profiler + */ +function withProfiler( + WrappedComponent, + // We do not want to have `updateProps` given in options, it is instead filled through the HOC. + options, +) { + const componentDisplayName = + (options && options.name) || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT; + + const Wrapped = (props) => ( + react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Profiler, { ...options, name: componentDisplayName, updateProps: props, __self: this, __source: {fileName: _jsxFileName, lineNumber: 143}} + , react__WEBPACK_IMPORTED_MODULE_3__["createElement"](WrappedComponent, { ...props, __self: this, __source: {fileName: _jsxFileName, lineNumber: 144}} ) + ) + ); + + Wrapped.displayName = `profiler(${componentDisplayName})`; + + // Copy over static methods from Wrapped component to Profiler HOC + // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Wrapped, WrappedComponent); + return Wrapped; +} + +/** + * + * `useProfiler` is a React hook that profiles a React component. + * + * Requires React 16.8 or above. + * @param name displayName of component being profiled + */ +function useProfiler( + name, + options = { + disabled: false, + hasRenderSpan: true, + }, +) { + const [mountSpan] = react__WEBPACK_IMPORTED_MODULE_3__["useState"](() => { + if (options && options.disabled) { + return undefined; + } + + const activeTransaction = getActiveTransaction(); + if (activeTransaction) { + return activeTransaction.startChild({ + description: `<${name}>`, + op: _constants_js__WEBPACK_IMPORTED_MODULE_4__["REACT_MOUNT_OP"], + }); + } + + return undefined; + }); + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](() => { + if (mountSpan) { + mountSpan.finish(); + } + + return () => { + if (mountSpan && options.hasRenderSpan) { + mountSpan.startChild({ + description: `<${name}>`, + endTimestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])(), + op: _constants_js__WEBPACK_IMPORTED_MODULE_4__["REACT_RENDER_OP"], + startTimestamp: mountSpan.endTimestamp, + }); + } + }; + // We only want this to run once. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); +} + +/** Grabs active transaction off scope */ +function getActiveTransaction(hub = Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])()) { + if (hub) { + const scope = hub.getScope(); + if (scope) { + return scope.getTransaction() ; + } + } + + return undefined; +} + + +//# sourceMappingURL=profiler.js.map + + +/***/ }), + +/***/ "JWki": +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__("v64C"), + assignMergeValue = __webpack_require__("LmJ2"), + baseFor = __webpack_require__("rlNI"), + baseMergeDeep = __webpack_require__("l5wl"), + isObject = __webpack_require__("06hQ"), + keysIn = __webpack_require__("+aIf"), + safeGet = __webpack_require__("IfZr"); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; + + +/***/ }), + +/***/ "JZOQ": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + getPrototype = __webpack_require__("pgeU"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; + + +/***/ }), + +/***/ "JZgi": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.12 Reflect.preventExtensions(target) +var $export = __webpack_require__("LRPZ"); +var anObject = __webpack_require__("eckd"); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "Jb16": +/***/ (function(module, exports, __webpack_require__) { + +var baseIteratee = __webpack_require__("JF7T"), + basePullAt = __webpack_require__("ePT4"); + +/** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ +function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = baseIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; +} + +module.exports = remove; + + +/***/ }), + +/***/ "JiXS": +/***/ (function(module, exports, __webpack_require__) { + +var createFlow = __webpack_require__("RF/d"); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; + + +/***/ }), + +/***/ "JiiU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rDuK"); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ll/m"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("jiof"); +/* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("DmM/"); +/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("pzK5"); +/* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("sp9s"); +/* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("tL2i"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("fY06"); +/* harmony import */ var _TablePaginationActions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("lmZr"); +/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("VPKY"); + + + + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + color: theme.palette.text.primary, + fontSize: theme.typography.pxToRem(14), + overflow: 'auto', + // Increase the specificity to override TableCell. + '&:last-child': { + padding: 0 + } + }, + + /* Styles applied to the Toolbar component. */ + toolbar: { + minHeight: 52, + paddingRight: 2 + }, + + /* Styles applied to the spacer element. */ + spacer: { + flex: '1 1 100%' + }, + + /* Styles applied to the caption Typography components if `variant="caption"`. */ + caption: { + flexShrink: 0 + }, + // TODO v5: `.selectRoot` should be merged with `.input` + + /* Styles applied to the Select component root element. */ + selectRoot: { + marginRight: 32, + marginLeft: 8 + }, + + /* Styles applied to the Select component `select` class. */ + select: { + paddingLeft: 8, + paddingRight: 24, + textAlign: 'right', + textAlignLast: 'right' // Align <select> on Chrome. + + }, + // TODO v5: remove + + /* Styles applied to the Select component `icon` class. */ + selectIcon: {}, + + /* Styles applied to the `InputBase` component. */ + input: { + color: 'inherit', + fontSize: 'inherit', + flexShrink: 0 + }, + + /* Styles applied to the MenuItem component. */ + menuItem: {}, + + /* Styles applied to the internal `TablePaginationActions` component. */ + actions: { + flexShrink: 0, + marginLeft: 20 + } + }; +}; + +var defaultLabelDisplayedRows = function defaultLabelDisplayedRows(_ref) { + var from = _ref.from, + to = _ref.to, + count = _ref.count; + return "".concat(from, "-").concat(to, " of ").concat(count !== -1 ? count : "more than ".concat(to)); +}; + +var defaultRowsPerPageOptions = [10, 25, 50, 100]; +/** + * A `TableCell` based component for placing inside `TableFooter` for pagination. + */ + +var TablePagination = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TablePagination(props, ref) { + var _props$ActionsCompone = props.ActionsComponent, + ActionsComponent = _props$ActionsCompone === void 0 ? _TablePaginationActions__WEBPACK_IMPORTED_MODULE_14__["default"] : _props$ActionsCompone, + backIconButtonProps = props.backIconButtonProps, + _props$backIconButton = props.backIconButtonText, + backIconButtonText = _props$backIconButton === void 0 ? 'Previous page' : _props$backIconButton, + classes = props.classes, + className = props.className, + colSpanProp = props.colSpan, + _props$component = props.component, + Component = _props$component === void 0 ? _TableCell__WEBPACK_IMPORTED_MODULE_11__["default"] : _props$component, + count = props.count, + _props$labelDisplayed = props.labelDisplayedRows, + labelDisplayedRows = _props$labelDisplayed === void 0 ? defaultLabelDisplayedRows : _props$labelDisplayed, + _props$labelRowsPerPa = props.labelRowsPerPage, + labelRowsPerPage = _props$labelRowsPerPa === void 0 ? 'Rows per page:' : _props$labelRowsPerPa, + nextIconButtonProps = props.nextIconButtonProps, + _props$nextIconButton = props.nextIconButtonText, + nextIconButtonText = _props$nextIconButton === void 0 ? 'Next page' : _props$nextIconButton, + onChangePage = props.onChangePage, + onPageChange = props.onPageChange, + onChangeRowsPerPageProp = props.onChangeRowsPerPage, + onRowsPerPageChangeProp = props.onRowsPerPageChange, + page = props.page, + rowsPerPage = props.rowsPerPage, + _props$rowsPerPageOpt = props.rowsPerPageOptions, + rowsPerPageOptions = _props$rowsPerPageOpt === void 0 ? defaultRowsPerPageOptions : _props$rowsPerPageOpt, + _props$SelectProps = props.SelectProps, + SelectProps = _props$SelectProps === void 0 ? {} : _props$SelectProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["ActionsComponent", "backIconButtonProps", "backIconButtonText", "classes", "className", "colSpan", "component", "count", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "nextIconButtonText", "onChangePage", "onPageChange", "onChangeRowsPerPage", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps"]); + + var onChangeRowsPerPage = onChangeRowsPerPageProp || onRowsPerPageChangeProp; + var colSpan; + + if (Component === _TableCell__WEBPACK_IMPORTED_MODULE_11__["default"] || Component === 'td') { + colSpan = colSpanProp || 1000; // col-span over everything + } + + var selectId = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__["default"])(); + var labelId = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__["default"])(); + var MenuItemComponent = SelectProps.native ? 'option' : _MenuItem__WEBPACK_IMPORTED_MODULE_9__["default"]; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + colSpan: colSpan, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Toolbar__WEBPACK_IMPORTED_MODULE_12__["default"], { + className: classes.toolbar + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.spacer + }), rowsPerPageOptions.length > 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_13__["default"], { + color: "inherit", + variant: "body2", + className: classes.caption, + id: labelId + }, labelRowsPerPage), rowsPerPageOptions.length > 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Select__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + classes: { + select: classes.select, + icon: classes.selectIcon + }, + input: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_InputBase__WEBPACK_IMPORTED_MODULE_8__["default"], { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.input, classes.selectRoot) + }), + value: rowsPerPage, + onChange: onChangeRowsPerPage, + id: selectId, + labelId: labelId + }, SelectProps), rowsPerPageOptions.map(function (rowsPerPageOption) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](MenuItemComponent, { + className: classes.menuItem, + key: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption, + value: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption + }, rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption); + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_13__["default"], { + color: "inherit", + variant: "body2", + className: classes.caption + }, labelDisplayedRows({ + from: count === 0 ? 0 : page * rowsPerPage + 1, + to: count !== -1 ? Math.min(count, (page + 1) * rowsPerPage) : (page + 1) * rowsPerPage, + count: count === -1 ? -1 : count, + page: page + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ActionsComponent, { + className: classes.actions, + backIconButtonProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + title: backIconButtonText, + 'aria-label': backIconButtonText + }, backIconButtonProps), + count: count, + nextIconButtonProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + title: nextIconButtonText, + 'aria-label': nextIconButtonText + }, nextIconButtonProps), + onChangePage: onChangePage, + onPageChange: onPageChange, + page: page, + rowsPerPage: rowsPerPage + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiTablePagination' +})(TablePagination)); + +/***/ }), + +/***/ "Jk6u": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var blueGrey = { + 50: '#eceff1', + 100: '#cfd8dc', + 200: '#b0bec5', + 300: '#90a4ae', + 400: '#78909c', + 500: '#607d8b', + 600: '#546e7a', + 700: '#455a64', + 800: '#37474f', + 900: '#263238', + A100: '#cfd8dc', + A200: '#b0bec5', + A400: '#78909c', + A700: '#455a64' +}; +/* harmony default export */ __webpack_exports__["default"] = (blueGrey); + +/***/ }), + +/***/ "Jm63": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.updateRelationship = exports.updateHasManyItem = exports.removeHasManyItem = exports.setHasManyItem = exports.getHasManyItems = exports.getHasManyItem = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _dsl = __webpack_require__("v2kV"); + +var _store = __webpack_require__("6mdx"); + +var _Association2 = _interopRequireDefault(__webpack_require__("urEX")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * @typedef {object} Relationship + * @property {string} relName - name of the relationship + * @property {string} relItemId - id of the relation + * @property {Relation} relItemAttrs - Attributes to be set (at least _id and _type) + */ + +/** + * @typedef {object} Relation + * @property {string} _id - id of the relation + * @property {string} _type - doctype of the relation + */ +var empty = function empty() { + return { + data: [], + next: true, + meta: { + count: 0 + } + }; +}; + +var updateArray = function updateArray(array, indexArg, el) { + var index = indexArg === -1 ? array.length : indexArg; + return [].concat((0, _toConsumableArray2.default)(array.slice(0, index)), [el], (0, _toConsumableArray2.default)(array.slice(index + 1))); +}; +/** + * Related documents are stored in the relationships attribute of the object, + * following the JSON API spec. + * + * Responsible for + * + * - Creating relationships + * - Removing relationships + * + * @description + * + * ``` + * const schema = { + * todos: { + * doctype: 'io.cozy.todos', + * relationships: { + * tasks: { + * doctype: 'io.cozy.tasks', + * type: 'has-many' + * } + * } + * } + * } + * + * const todo = { + * label: "Protect people's privacy", + * relationships: { + * tasks: { + * data: [ + * {_id: 1, _type: 'io.cozy.tasks'}, + * {_id: 2, _type: 'io.cozy.tasks'} + * ] + * } + * } + * } + * ``` + */ + + +var HasMany = /*#__PURE__*/function (_Association) { + (0, _inherits2.default)(HasMany, _Association); + + var _super = _createSuper(HasMany); + + function HasMany() { + var _this; + + (0, _classCallCheck2.default)(this, HasMany); + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _super.call.apply(_super, [this].concat(args)); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateRelationshipData", function (getUpdatedRelationshipData) { + return function (dispatch, getState) { + var previousRelationship = (0, _store.getDocumentFromState)(getState(), _this.target._type, _this.target._id); + dispatch((0, _store.receiveQueryResult)(null, { + data: _objectSpread(_objectSpread({}, previousRelationship), {}, { + relationships: _objectSpread(_objectSpread({}, previousRelationship.relationships), {}, (0, _defineProperty2.default)({}, _this.name, getUpdatedRelationshipData(previousRelationship.relationships[_this.name]))) + }) + })); + }; + }); + return _this; + } + + (0, _createClass2.default)(HasMany, [{ + key: "fetchMore", + value: function fetchMore() { + throw 'Not implemented'; + } + }, { + key: "exists", + value: function exists(document) { + return this.existsById(document._id); + } + }, { + key: "containsById", + value: function containsById(id) { + return this.getRelationship().data.find(function (_ref) { + var _id = _ref._id; + return id === _id; + }) !== undefined; + } + }, { + key: "existsById", + value: function existsById(id) { + return Boolean(this.containsById(id) && this.get(this.doctype, id)); + } + /** + * Add the relationships to the target document + * + * @param {import("../types").CozyClientDocument[]} docsArg - Documents to add as relationships + * @returns {import("../types").CozyClientDocument} The saved target document + */ + + }, { + key: "add", + value: function add(docsArg) { + var docs = Array.isArray(docsArg) ? docsArg : [docsArg]; + var ids = docs.map(function (doc) { + return doc._id; + }); + return this.addById(ids); + } + /** + * Remove the relationships from the target document + * + * @param {import("../types").CozyClientDocument[]} docsArg - Documents to remove as relationships + * @returns {import("../types").CozyClientDocument} The saved target document + */ + + }, { + key: "remove", + value: function remove(docsArg) { + var docs = Array.isArray(docsArg) ? docsArg : [docsArg]; + var ids = docs.map(function (doc) { + return doc._id; + }); + return this.removeById(ids); + } + /** + * Update target document with relationships + * + * @param {string[]} idsArg - The ids to add as a relationship + */ + + }, { + key: "addTargetRelationships", + value: function addTargetRelationships(idsArg) { + var _this2 = this, + _this$target$relation; + + if (!this.target.relationships) this.target.relationships = {}; + + if (!this.target.relationships[this.name]) { + this.target.relationships[this.name] = { + data: [] + }; + } + + var ids = Array.isArray(idsArg) ? idsArg : [idsArg]; + var newRelations = ids.filter(function (id) { + return !_this2.existsById(id); + }).map(function (id) { + return { + _id: id, + _type: _this2.doctype + }; + }); + + (_this$target$relation = this.target.relationships[this.name].data).push.apply(_this$target$relation, (0, _toConsumableArray2.default)(newRelations)); + + this.updateMetaCount(); + } + /** + * Add a referenced document by id. You need to call save() + * in order to synchronize your document with the store. + * + * @todo We shouldn't create the array of relationship manually since + * it'll not be present in the store as well. + * We certainly should use something like `updateRelationship` + * + */ + + }, { + key: "addById", + value: function addById(idsArg) { + this.addTargetRelationships(idsArg); + return this.save(this.target); + } + /** + * Remove relationships from target document + * + * @param {string[]} idsArg - The ids to remove from the target relationships + */ + + }, { + key: "removeTargetRelationships", + value: function removeTargetRelationships(idsArg) { + var ids = Array.isArray(idsArg) ? idsArg : [idsArg]; + this.target.relationships[this.name].data = this.target.relationships[this.name].data.filter(function (_ref2) { + var _id = _ref2._id; + return !ids.includes(_id); + }); + this.updateMetaCount(); + } + }, { + key: "removeById", + value: function removeById(idsArg) { + this.removeTargetRelationships(idsArg); + return this.save(this.target); + } + }, { + key: "updateMetaCount", + value: function updateMetaCount() { + if ((0, _get.default)(this.target.relationships[this.name], 'meta.count') !== undefined) { + this.target.relationships[this.name].meta = _objectSpread(_objectSpread({}, this.target.relationships[this.name].meta), {}, { + count: this.target.relationships[this.name].data.length + }); + } + } + }, { + key: "getRelationship", + value: function getRelationship() { + var rawData = this.target[this.name]; + var relationship = (0, _get.default)(this.target, "relationships.".concat(this.name)); + + if (!relationship) { + if (rawData && rawData.length) { + _logger.default.warn("You're trying to access data on a relationship that appear to not be loaded yet. You may want to use 'include()' on your query"); + } + + return empty(); + } + + return relationship; + } + }, { + key: "updateTargetRelationship", + value: function updateTargetRelationship(store, updateFn) { + // TODO See if updateTargetRelationship is still used, removing it would enable us + // to remove store.readDocument and store.writeDocument and the StoreProxy + var prevTarget = store.readDocument(this.target._type, this.target._id); + store.writeDocument(this.updateRelationship(prevTarget, updateFn)); + } + }, { + key: "updateRelationship", + value: function updateRelationship(target, updateFn) { + return HasMany.updateRelationship(target, this.name, updateFn); + } + }, { + key: "dehydrate", + value: function dehydrate(doc) { + return _objectSpread(_objectSpread({}, doc), {}, { + relationships: _objectSpread(_objectSpread({}, doc.relationships), {}, (0, _defineProperty2.default)({}, this.name, { + data: this.raw + })) + }); + } + /** + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - The query params + * + * @returns {import("../types").CozyClientDocument | QueryDefinition} + */ + + }, { + key: "raw", + get: function get() { + return this.getRelationship().data; + } + /** + * Returns store documents + */ + + }, { + key: "data", + get: function get() { + var _this3 = this; + + return this.getRelationship().data.map(function (_ref3) { + var _id = _ref3._id, + _type = _ref3._type; + return _this3.get(_type, _id); + }).filter(Boolean); + } + }, { + key: "hasMore", + get: function get() { + return this.getRelationship().next; + } + /** + * Returns the total number of documents in the relationship. + * Does not handle documents absent from the store. If you want + * to do that, you can use .data.length. + * + * @returns {number} - Total number of documents in the relationships + */ + + }, { + key: "count", + get: function get() { + var relationship = this.getRelationship(); + return relationship.meta ? relationship.meta.count : relationship.data.length; + } + }], [{ + key: "query", + value: function query(document, client, assoc) { + var relationships = (0, _get.default)(document, "relationships.".concat(assoc.name, ".data"), []); + var ids = relationships.map(function (assoc) { + return assoc._id; + }); + return new _dsl.QueryDefinition({ + doctype: assoc.doctype, + ids: ids + }); + } + }]); + return HasMany; +}(_Association2.default); +/** + * Gets a relationship item with the relationship name and id + * + * @param {object} doc - Document to be updated + * @param {string} relName - Name of the relationship + * @param {string} relItemId - Id of the relationship item + */ + + +var getHasManyItem = HasMany.getHasManyItem = function (doc, relName, relItemId) { + var relData = (0, _get.default)(doc, "relationships.".concat(relName, ".data"), []); + return relData.find(function (rel) { + return rel._id == relItemId; + }); +}; + +exports.getHasManyItem = getHasManyItem; + +var getHasManyItems = HasMany.getHasManyItems = function (doc, relName) { + return (0, _get.default)(doc, "relationships.".concat(relName, ".data"), []); +}; +/** + * Sets a relationship item with the relationship name and id + * + * @param {object} doc - Document to be updated + * @param {string} relName - Name of the relationship + * @param {string} relItemId - Id of the relationship item + * @param {object} relItemAttrs - Attributes to be set (at least _id and _type) + */ + + +exports.getHasManyItems = getHasManyItems; + +var setHasManyItem = HasMany.setHasManyItem = function (doc, relName, relItemId, relItemAttrs) { + var relData = HasMany.getHasManyItems(doc, relName); + var relIndex = relData.findIndex(function (rel) { + return rel._id === relItemId; + }); + var updatedRelItem = (0, _merge.default)({}, relData[relIndex], relItemAttrs); + var updatedRelData = updateArray(relData, relIndex, updatedRelItem); + var updatedDocument = HasMany.updateRelationship(doc, relName, function (relationship) { + return (0, _merge.default)({}, relationship, { + data: updatedRelData + }); + }); + return updatedDocument; +}; +/** + * Remove one relationship item + * + * @param {object} doc - Document to be updated + * @param {string} relName - Name of the relationship + * @param {string} relItemId - Id of the relationship item + */ + + +exports.setHasManyItem = setHasManyItem; + +var removeHasManyItem = HasMany.removeHasManyItem = function (doc, relName, relItemId) { + var relData = HasMany.getHasManyItems(doc, relName); + var updatedRelData = relData.filter(function (rel) { + return rel._id !== relItemId; + }); + var updatedDocument = HasMany.updateRelationship(doc, relName, function () { + return { + data: updatedRelData + }; + }); + return updatedDocument; +}; +/** + * Updates a relationship item with the relationship name and id + * + * @param {object} doc - Document to be updated + * @param {string} relName - Name of the relationship + * @param {string} relItemId - Id of the relationship item + * @param {Function} updater - receives the current relationship item and should + * return an updated version. Merge should be used in the updater + * if previous relationship item fields are to be kept. + */ + + +exports.removeHasManyItem = removeHasManyItem; + +var updateHasManyItem = HasMany.updateHasManyItem = function (doc, relName, relItemId, updater) { + var relItem = HasMany.getHasManyItem(doc, relName, relItemId); + var updatedRelItem = updater(relItem); + return HasMany.setHasManyItem(doc, relName, relItemId, updatedRelItem); +}; + +exports.updateHasManyItem = updateHasManyItem; + +var updateRelationship = HasMany.updateRelationship = function (doc, relName, updateFn) { + return _objectSpread(_objectSpread({}, doc), {}, { + relationships: _objectSpread(_objectSpread({}, doc.relationships), {}, (0, _defineProperty2.default)({}, relName, _objectSpread(_objectSpread({}, doc.relationships ? doc.relationships[relName] : {}), updateFn(doc.relationships ? doc.relationships[relName] : {})))) + }); +}; + +exports.updateRelationship = updateRelationship; +var _default = HasMany; +exports.default = _default; + +/***/ }), + +/***/ "JmEN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b0ha"); + + +var px = jss__WEBPACK_IMPORTED_MODULE_0__["hasCSSTOMSupport"] && CSS ? CSS.px : 'px'; +var ms = jss__WEBPACK_IMPORTED_MODULE_0__["hasCSSTOMSupport"] && CSS ? CSS.ms : 'ms'; +var percent = jss__WEBPACK_IMPORTED_MODULE_0__["hasCSSTOMSupport"] && CSS ? CSS.percent : '%'; +/** + * Generated jss-plugin-default-unit CSS property units + */ + +var defaultUnits = { + // Animation properties + 'animation-delay': ms, + 'animation-duration': ms, + // Background properties + 'background-position': px, + 'background-position-x': px, + 'background-position-y': px, + 'background-size': px, + // Border Properties + border: px, + 'border-bottom': px, + 'border-bottom-left-radius': px, + 'border-bottom-right-radius': px, + 'border-bottom-width': px, + 'border-left': px, + 'border-left-width': px, + 'border-radius': px, + 'border-right': px, + 'border-right-width': px, + 'border-top': px, + 'border-top-left-radius': px, + 'border-top-right-radius': px, + 'border-top-width': px, + 'border-width': px, + 'border-block': px, + 'border-block-end': px, + 'border-block-end-width': px, + 'border-block-start': px, + 'border-block-start-width': px, + 'border-block-width': px, + 'border-inline': px, + 'border-inline-end': px, + 'border-inline-end-width': px, + 'border-inline-start': px, + 'border-inline-start-width': px, + 'border-inline-width': px, + 'border-start-start-radius': px, + 'border-start-end-radius': px, + 'border-end-start-radius': px, + 'border-end-end-radius': px, + // Margin properties + margin: px, + 'margin-bottom': px, + 'margin-left': px, + 'margin-right': px, + 'margin-top': px, + 'margin-block': px, + 'margin-block-end': px, + 'margin-block-start': px, + 'margin-inline': px, + 'margin-inline-end': px, + 'margin-inline-start': px, + // Padding properties + padding: px, + 'padding-bottom': px, + 'padding-left': px, + 'padding-right': px, + 'padding-top': px, + 'padding-block': px, + 'padding-block-end': px, + 'padding-block-start': px, + 'padding-inline': px, + 'padding-inline-end': px, + 'padding-inline-start': px, + // Mask properties + 'mask-position-x': px, + 'mask-position-y': px, + 'mask-size': px, + // Width and height properties + height: px, + width: px, + 'min-height': px, + 'max-height': px, + 'min-width': px, + 'max-width': px, + // Position properties + bottom: px, + left: px, + top: px, + right: px, + inset: px, + 'inset-block': px, + 'inset-block-end': px, + 'inset-block-start': px, + 'inset-inline': px, + 'inset-inline-end': px, + 'inset-inline-start': px, + // Shadow properties + 'box-shadow': px, + 'text-shadow': px, + // Column properties + 'column-gap': px, + 'column-rule': px, + 'column-rule-width': px, + 'column-width': px, + // Font and text properties + 'font-size': px, + 'font-size-delta': px, + 'letter-spacing': px, + 'text-decoration-thickness': px, + 'text-indent': px, + 'text-stroke': px, + 'text-stroke-width': px, + 'word-spacing': px, + // Motion properties + motion: px, + 'motion-offset': px, + // Outline properties + outline: px, + 'outline-offset': px, + 'outline-width': px, + // Perspective properties + perspective: px, + 'perspective-origin-x': percent, + 'perspective-origin-y': percent, + // Transform properties + 'transform-origin': percent, + 'transform-origin-x': percent, + 'transform-origin-y': percent, + 'transform-origin-z': percent, + // Transition properties + 'transition-delay': ms, + 'transition-duration': ms, + // Alignment properties + 'vertical-align': px, + 'flex-basis': px, + // Some random properties + 'shape-margin': px, + size: px, + gap: px, + // Grid properties + grid: px, + 'grid-gap': px, + 'row-gap': px, + 'grid-row-gap': px, + 'grid-column-gap': px, + 'grid-template-rows': px, + 'grid-template-columns': px, + 'grid-auto-rows': px, + 'grid-auto-columns': px, + // Not existing properties. + // Used to avoid issues with jss-plugin-expand integration. + 'box-shadow-x': px, + 'box-shadow-y': px, + 'box-shadow-blur': px, + 'box-shadow-spread': px, + 'font-line-height': px, + 'text-shadow-x': px, + 'text-shadow-y': px, + 'text-shadow-blur': px +}; + +/** + * Clones the object and adds a camel cased property version. + */ + +function addCamelCasedVersion(obj) { + var regExp = /(-[a-z])/g; + + var replace = function replace(str) { + return str[1].toUpperCase(); + }; + + var newObj = {}; + + for (var key in obj) { + newObj[key] = obj[key]; + newObj[key.replace(regExp, replace)] = obj[key]; + } + + return newObj; +} + +var units = addCamelCasedVersion(defaultUnits); +/** + * Recursive deep style passing function + */ + +function iterate(prop, value, options) { + if (value == null) return value; + + if (Array.isArray(value)) { + for (var i = 0; i < value.length; i++) { + value[i] = iterate(prop, value[i], options); + } + } else if (typeof value === 'object') { + if (prop === 'fallbacks') { + for (var innerProp in value) { + value[innerProp] = iterate(innerProp, value[innerProp], options); + } + } else { + for (var _innerProp in value) { + value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options); + } + } // eslint-disable-next-line no-restricted-globals + + } else if (typeof value === 'number' && isNaN(value) === false) { + var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px. + + if (unit && !(value === 0 && unit === px)) { + return typeof unit === 'function' ? unit(value).toString() : "" + value + unit; + } + + return value.toString(); + } + + return value; +} +/** + * Add unit to numeric values. + */ + + +function defaultUnit(options) { + if (options === void 0) { + options = {}; + } + + var camelCasedOptions = addCamelCasedVersion(options); + + function onProcessStyle(style, rule) { + if (rule.type !== 'style') return style; + + for (var prop in style) { + style[prop] = iterate(prop, style[prop], camelCasedOptions); + } + + return style; + } + + function onChangeValue(value, prop) { + return iterate(prop, value, camelCasedOptions); + } + + return { + onProcessStyle: onProcessStyle, + onChangeValue: onChangeValue + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (defaultUnit); + + +/***/ }), + +/***/ "Jnpc": +/***/ (function(module, exports, __webpack_require__) { + +var isArrayLike = __webpack_require__("yTJ1"); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; + + +/***/ }), + +/***/ "JpD3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +__webpack_require__("BOQ2"); +var cozyBar = _interopRequireWildcard(__webpack_require__("831c")); +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) { + return cache.get(obj); + } + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + newObj.default = obj; + if (cache) { + cache.set(obj, newObj); + } + return newObj; +} +var _default = cozyBar; +exports.default = _default; + +/***/ }), + +/***/ "JsRB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + */ + +var TableContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (TableContext); + +/***/ }), + +/***/ "JtWf": +/***/ (function(module, exports) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), + +/***/ "Jtwb": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"); + +var newlines = /\n+$/, + logger = new Transform(); + +logger.write = function(name, level, args) { + var i = args.length-1; + if (typeof console === 'undefined' || !console.log) { + return; + } + if(console.log.apply) { + return console.log.apply(console, [name, level].concat(args)); + } else if(JSON && JSON.stringify) { + // console.log.apply is undefined in IE8 and IE9 + // for IE8/9: make console.log at least a bit less awful + if(args[i] && typeof args[i] == 'string') { + args[i] = args[i].replace(newlines, ''); + } + try { + for(i = 0; i < args.length; i++) { + args[i] = JSON.stringify(args[i]); + } + } catch(e) {} + console.log(args.join(' ')); + } +}; + +logger.formatters = ['color', 'minilog']; +logger.color = __webpack_require__("tZs2"); +logger.minilog = __webpack_require__("9xia"); + +module.exports = logger; + + +/***/ }), + +/***/ "Jy5R": +/***/ (function(module, exports, __webpack_require__) { + +var baseFlatten = __webpack_require__("IcUP"); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; + + +/***/ }), + +/***/ "JyrR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REMOTE_ORG_ECOLYO_AGENT_PRICES_REC = exports.REMOTE_ORG_ECOLYO_AGENT_PRICES = void 0; +var REMOTE_ORG_ECOLYO_AGENT_PRICES = '/remote/org.ecolyo.agent.prices'; +exports.REMOTE_ORG_ECOLYO_AGENT_PRICES = REMOTE_ORG_ECOLYO_AGENT_PRICES; +var REMOTE_ORG_ECOLYO_AGENT_PRICES_REC = '/remote/org.ecolyo.agent.prices.rec'; +exports.REMOTE_ORG_ECOLYO_AGENT_PRICES_REC = REMOTE_ORG_ECOLYO_AGENT_PRICES_REC; + +/***/ }), + +/***/ "Jz0u": +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), + +/***/ "K0pO": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "K7Xa": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectScrollType", function() { return detectScrollType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNormalizedScrollLeft", function() { return getNormalizedScrollLeft; }); +// Source from https://github.com/alitaheri/normalize-scroll-left +var cachedType; +/** + * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type + * + * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl. + * + * Type | <- Most Left | Most Right -> | Initial + * ---------------- | ------------ | ------------- | ------- + * default | 0 | 100 | 100 + * negative (spec*) | -100 | 0 | 0 + * reverse | 100 | 0 | 0 + * + * Edge 85: default + * Safari 14: negative + * Chrome 85: negative + * Firefox 81: negative + * IE 11: reverse + * + * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll + */ + +function detectScrollType() { + if (cachedType) { + return cachedType; + } + + var dummy = document.createElement('div'); + var container = document.createElement('div'); + container.style.width = '10px'; + container.style.height = '1px'; + dummy.appendChild(container); + dummy.dir = 'rtl'; + dummy.style.fontSize = '14px'; + dummy.style.width = '4px'; + dummy.style.height = '1px'; + dummy.style.position = 'absolute'; + dummy.style.top = '-1000px'; + dummy.style.overflow = 'scroll'; + document.body.appendChild(dummy); + cachedType = 'reverse'; + + if (dummy.scrollLeft > 0) { + cachedType = 'default'; + } else { + dummy.scrollLeft = 1; + + if (dummy.scrollLeft === 0) { + cachedType = 'negative'; + } + } + + document.body.removeChild(dummy); + return cachedType; +} // Based on https://stackoverflow.com/a/24394376 + +function getNormalizedScrollLeft(element, direction) { + var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior + + if (direction !== 'rtl') { + return scrollLeft; + } + + var type = detectScrollType(); + + switch (type) { + case 'negative': + return element.scrollWidth - element.clientWidth + scrollLeft; + + case 'reverse': + return element.scrollWidth - element.clientWidth - scrollLeft; + + default: + return scrollLeft; + } +} + +/***/ }), + +/***/ "KOVl": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + isLength = __webpack_require__("hGls"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; + + +/***/ }), + +/***/ "KRQd": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + +var $export = __webpack_require__("LRPZ"); +var toLength = __webpack_require__("yhnj"); +var context = __webpack_require__("OdrC"); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * __webpack_require__("5cT/")(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + + +/***/ }), + +/***/ "KYtb": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var $parseInt = __webpack_require__("BtRI"); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + + +/***/ }), + +/***/ "KdLj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ariaHidden", function() { return ariaHidden; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ModalManager; }); +/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FkRJ"); +/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("j3u0"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Im6z"); +/* harmony import */ var _utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("9Jz5"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("JGNw"); + + + + + + // Is a vertical scrollbar displayed? + +function isOverflowing(container) { + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__["default"])(container); + + if (doc.body === container) { + return Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_5__["default"])(doc).innerWidth > doc.documentElement.clientWidth; + } + + return container.scrollHeight > container.clientHeight; +} + +function ariaHidden(node, show) { + if (show) { + node.setAttribute('aria-hidden', 'true'); + } else { + node.removeAttribute('aria-hidden'); + } +} + +function getPaddingRight(node) { + return parseInt(window.getComputedStyle(node)['padding-right'], 10) || 0; +} + +function ariaHiddenSiblings(container, mountNode, currentNode) { + var nodesToExclude = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + var show = arguments.length > 4 ? arguments[4] : undefined; + var blacklist = [mountNode, currentNode].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(nodesToExclude)); + var blacklistTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE']; + [].forEach.call(container.children, function (node) { + if (node.nodeType === 1 && blacklist.indexOf(node) === -1 && blacklistTagNames.indexOf(node.tagName) === -1) { + ariaHidden(node, show); + } + }); +} + +function findIndexOf(containerInfo, callback) { + var idx = -1; + containerInfo.some(function (item, index) { + if (callback(item)) { + idx = index; + return true; + } + + return false; + }); + return idx; +} + +function handleContainer(containerInfo, props) { + var restoreStyle = []; + var restorePaddings = []; + var container = containerInfo.container; + var fixedNodes; + + if (!props.disableScrollLock) { + if (isOverflowing(container)) { + // Compute the size before applying overflow hidden to avoid any scroll jumps. + var scrollbarSize = Object(_utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_3__["default"])(); + restoreStyle.push({ + value: container.style.paddingRight, + key: 'padding-right', + el: container + }); // Use computed style, here to get the real padding to add our scrollbar width. + + container.style['padding-right'] = "".concat(getPaddingRight(container) + scrollbarSize, "px"); // .mui-fixed is a global helper. + + fixedNodes = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__["default"])(container).querySelectorAll('.mui-fixed'); + [].forEach.call(fixedNodes, function (node) { + restorePaddings.push(node.style.paddingRight); + node.style.paddingRight = "".concat(getPaddingRight(node) + scrollbarSize, "px"); + }); + } // Improve Gatsby support + // https://css-tricks.com/snippets/css/force-vertical-scrollbar/ + + + var parent = container.parentElement; + var scrollContainer = parent.nodeName === 'HTML' && window.getComputedStyle(parent)['overflow-y'] === 'scroll' ? parent : container; // Block the scroll even if no scrollbar is visible to account for mobile keyboard + // screensize shrink. + + restoreStyle.push({ + value: scrollContainer.style.overflow, + key: 'overflow', + el: scrollContainer + }); + scrollContainer.style.overflow = 'hidden'; + } + + var restore = function restore() { + if (fixedNodes) { + [].forEach.call(fixedNodes, function (node, i) { + if (restorePaddings[i]) { + node.style.paddingRight = restorePaddings[i]; + } else { + node.style.removeProperty('padding-right'); + } + }); + } + + restoreStyle.forEach(function (_ref) { + var value = _ref.value, + el = _ref.el, + key = _ref.key; + + if (value) { + el.style.setProperty(key, value); + } else { + el.style.removeProperty(key); + } + }); + }; + + return restore; +} + +function getHiddenSiblings(container) { + var hiddenSiblings = []; + [].forEach.call(container.children, function (node) { + if (node.getAttribute && node.getAttribute('aria-hidden') === 'true') { + hiddenSiblings.push(node); + } + }); + return hiddenSiblings; +} +/** + * @ignore - do not document. + * + * Proper state management for containers and the modals in those containers. + * Simplified, but inspired by react-overlay's ModalManager class. + * Used by the Modal to ensure proper styling of containers. + */ + + +var ModalManager = /*#__PURE__*/function () { + function ModalManager() { + Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, ModalManager); + + // this.modals[modalIndex] = modal + this.modals = []; // this.containers[containerIndex] = { + // modals: [], + // container, + // restore: null, + // } + + this.containers = []; + } + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(ModalManager, [{ + key: "add", + value: function add(modal, container) { + var modalIndex = this.modals.indexOf(modal); + + if (modalIndex !== -1) { + return modalIndex; + } + + modalIndex = this.modals.length; + this.modals.push(modal); // If the modal we are adding is already in the DOM. + + if (modal.modalRef) { + ariaHidden(modal.modalRef, false); + } + + var hiddenSiblingNodes = getHiddenSiblings(container); + ariaHiddenSiblings(container, modal.mountNode, modal.modalRef, hiddenSiblingNodes, true); + var containerIndex = findIndexOf(this.containers, function (item) { + return item.container === container; + }); + + if (containerIndex !== -1) { + this.containers[containerIndex].modals.push(modal); + return modalIndex; + } + + this.containers.push({ + modals: [modal], + container: container, + restore: null, + hiddenSiblingNodes: hiddenSiblingNodes + }); + return modalIndex; + } + }, { + key: "mount", + value: function mount(modal, props) { + var containerIndex = findIndexOf(this.containers, function (item) { + return item.modals.indexOf(modal) !== -1; + }); + var containerInfo = this.containers[containerIndex]; + + if (!containerInfo.restore) { + containerInfo.restore = handleContainer(containerInfo, props); + } + } + }, { + key: "remove", + value: function remove(modal) { + var modalIndex = this.modals.indexOf(modal); + + if (modalIndex === -1) { + return modalIndex; + } + + var containerIndex = findIndexOf(this.containers, function (item) { + return item.modals.indexOf(modal) !== -1; + }); + var containerInfo = this.containers[containerIndex]; + containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1); + this.modals.splice(modalIndex, 1); // If that was the last modal in a container, clean up the container. + + if (containerInfo.modals.length === 0) { + // The modal might be closed before it had the chance to be mounted in the DOM. + if (containerInfo.restore) { + containerInfo.restore(); + } + + if (modal.modalRef) { + // In case the modal wasn't in the DOM yet. + ariaHidden(modal.modalRef, true); + } + + ariaHiddenSiblings(containerInfo.container, modal.mountNode, modal.modalRef, containerInfo.hiddenSiblingNodes, false); + this.containers.splice(containerIndex, 1); + } else { + // Otherwise make sure the next top modal is visible to a screen reader. + var nextTop = containerInfo.modals[containerInfo.modals.length - 1]; // as soon as a modal is adding its modalRef is undefined. it can't set + // aria-hidden because the dom element doesn't exist either + // when modal was unmounted before modalRef gets null + + if (nextTop.modalRef) { + ariaHidden(nextTop.modalRef, false); + } + } + + return modalIndex; + } + }, { + key: "isTopModal", + value: function isTopModal(modal) { + return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal; + } + }]); + + return ModalManager; +}(); + + + +/***/ }), + +/***/ "KhCG": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DUEL_DOCTYPE = void 0; +var DUEL_DOCTYPE = 'com.grandlyon.ecolyo.duel'; +exports.DUEL_DOCTYPE = DUEL_DOCTYPE; + +/***/ }), + +/***/ "KhxF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ImageListItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MbzV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ImageListItem__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "Kju7": +/***/ (function(module, exports, __webpack_require__) { + +var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__("HrfE"); + +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return json.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || json.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return json.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = json.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; + + +/***/ }), + +/***/ "Kl0M": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), + +/***/ "KnO/": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("ROjY") +var buildFormatLocale = __webpack_require__("qi1n") + +/** + * @category Locales + * @summary Icelandic locale. + * @author Derek Blank [@derekblank]{@link https://github.com/derekblank} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "KqZw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("RmWH"); + +var callBind = __webpack_require__("lrTv"); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ "KqmD": +/***/ (function(module, exports) { + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; + + +/***/ }), + +/***/ "KstQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultMergeProps", function() { return defaultMergeProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMergePropsFunc", function() { return wrapMergePropsFunc; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsFunction", function() { return whenMergePropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsOmitted", function() { return whenMergePropsIsOmitted; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("GV8L"); + + +function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps); +} +function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (false) {} + } + + return mergedProps; + }; + }; +} +function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; +} +function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps ? function () { + return defaultMergeProps; + } : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); + +/***/ }), + +/***/ "Kv7L": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "checkApp", { + enumerable: true, + get: function get() { + return _apps.checkApp; + } +}); +Object.defineProperty(exports, "getDeviceName", { + enumerable: true, + get: function get() { + return _device.getDeviceName; + } +}); +Object.defineProperty(exports, "getFlagshipMetadata", { + enumerable: true, + get: function get() { + return _flagship.getFlagshipMetadata; + } +}); +Object.defineProperty(exports, "getPlatform", { + enumerable: true, + get: function get() { + return _platform.getPlatform; + } +}); +Object.defineProperty(exports, "hasDevicePlugin", { + enumerable: true, + get: function get() { + return _plugins.hasDevicePlugin; + } +}); +Object.defineProperty(exports, "hasInAppBrowserPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasInAppBrowserPlugin; + } +}); +Object.defineProperty(exports, "hasNetworkInformationPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasNetworkInformationPlugin; + } +}); +Object.defineProperty(exports, "hasSafariPlugin", { + enumerable: true, + get: function get() { + return _plugins.hasSafariPlugin; + } +}); +Object.defineProperty(exports, "isAndroid", { + enumerable: true, + get: function get() { + return _platform.isAndroid; + } +}); +Object.defineProperty(exports, "isAndroidApp", { + enumerable: true, + get: function get() { + return _platform.isAndroidApp; + } +}); +Object.defineProperty(exports, "isCordova", { + enumerable: true, + get: function get() { + return _cordova.isCordova; + } +}); +Object.defineProperty(exports, "isFlagshipApp", { + enumerable: true, + get: function get() { + return _flagship.isFlagshipApp; + } +}); +Object.defineProperty(exports, "isIOS", { + enumerable: true, + get: function get() { + return _platform.isIOS; + } +}); +Object.defineProperty(exports, "isIOSApp", { + enumerable: true, + get: function get() { + return _platform.isIOSApp; + } +}); +Object.defineProperty(exports, "isMobile", { + enumerable: true, + get: function get() { + return _platform.isMobile; + } +}); +Object.defineProperty(exports, "isMobileApp", { + enumerable: true, + get: function get() { + return _platform.isMobileApp; + } +}); +Object.defineProperty(exports, "isWebApp", { + enumerable: true, + get: function get() { + return _platform.isWebApp; + } +}); +Object.defineProperty(exports, "nativeLinkOpen", { + enumerable: true, + get: function get() { + return _link.nativeLinkOpen; + } +}); +Object.defineProperty(exports, "openDeeplinkOrRedirect", { + enumerable: true, + get: function get() { + return _deeplink.openDeeplinkOrRedirect; + } +}); +Object.defineProperty(exports, "startApp", { + enumerable: true, + get: function get() { + return _apps.startApp; + } +}); + +var _platform = __webpack_require__("GA40"); + +var _device = __webpack_require__("3rVP"); + +var _apps = __webpack_require__("lyB6"); + +var _plugins = __webpack_require__("e7+3"); + +var _cordova = __webpack_require__("I/47"); + +var _link = __webpack_require__("gal2"); + +var _deeplink = __webpack_require__("oJAa"); + +var _flagship = __webpack_require__("7K1O"); + +/***/ }), + +/***/ "Kwqu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareClientVersion", function() { return compareClientVersion; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bvMo"); +/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(semver_compare__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_interapp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("MvM1"); +/* harmony import */ var cozy_interapp__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_interapp__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ocZI"); +/* harmony import */ var _realtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7Is5"); +/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Ap1d"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Kv7L"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__); + + + +/* eslint-env browser */ + + + + + + +var errorStatuses = { + '401': _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnauthorizedStackException"], + '403': _exceptions__WEBPACK_IMPORTED_MODULE_6__["ForbiddenException"], + '404': _exceptions__WEBPACK_IMPORTED_MODULE_6__["NotFoundException"], + '405': _exceptions__WEBPACK_IMPORTED_MODULE_6__["MethodNotAllowedException"], + '500': _exceptions__WEBPACK_IMPORTED_MODULE_6__["ServerErrorException"] +}; +/** + * Cozy client instance + * @private + */ + +var cozyClient; +/** + * Get the client instance + * + * @private + * @function + * @returns {Object} cozy-client instance + */ + +var getIntents = function getIntents() { + return new cozy_interapp__WEBPACK_IMPORTED_MODULE_3__["Intents"]({ + client: cozyClient + }); +}; +/** + * Get the stackClient from the cozy-client instance + * + * @private + * @function + * @returns {Object} cozy-stack-client instance + */ + + +var getStackClient = function getStackClient() { + return cozyClient.getStackClient(); +}; +/** + * Logout and disconnect the user + * @function + * @TODO move this to cozy-stack-client + * @returns {Promise} + */ + + +var logout = function logout() { + return getStackClient().fetch('DELETE', '/auth/login').then(function (resp) { + if (resp.status === 401) { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnauthorizedStackException"](); + } else if (resp.status === 204) { + window.location.reload(); + } + + return true; + }).catch(function () { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableStackException"](); + }); +}; +/** + * Get a cozy URL object + * + * @function + * @returns {URL} + */ + + +var getCozyURL = function getCozyURL() { + return new URL(getStackClient().uri); +}; +/** + * Get a the cozy origin as an URL string + * + * @function + * @returns {string} + */ + + +var getCozyURLOrigin = function getCozyURLOrigin() { + return getCozyURL().origin; +}; +/** + * @deprecated + * @private + */ + + +var updateAccessToken = function updateAccessToken() { + throw new Error('updateAccessToken should not be used with a cozy-client instance initialization'); +}; +/** + * Fetch a resource with cozy-client + * + * Utility to maintain the compatibility with the legacy + * standalone cozy-bar client + * + * @function + * @private + * @returns {Promise} the full raw JSON payload + */ + + +var fetchJSON = function fetchJSON(method, path, body) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + // We mirror here a few lines from cozy-stack-client + // because we want a customized fetchJSON + var headers = options.headers = options.headers || {}; + headers['Accept'] = 'application/json'; + + if (method !== 'GET' && method !== 'HEAD' && body !== undefined) { + if (!headers['Content-Type']) { + headers['Content-Type'] = 'application/json'; + body = JSON.stringify(body); + } + } + + return getStackClient().fetch(method, path, body, options).then(function (resp) { + if (typeof errorStatuses[resp.status] === 'function') { + throw new errorStatuses[resp.status](); + } + + var contentType = resp.headers.get('content-type'); + var isJson = contentType.includes('json'); + + if (!isJson) { + throw new Error('Server response not in JSON'); + } + + return resp.json(); + }); +}; +/** + * Test if an error is from an HTTP 404 + * + * @function + * @private + * @param {Function} error - received from a fetch + * @returns {boolean} + */ + + +var is404 = function is404(error) { + return ['NotFoundException', 'NotFound', 'FetchError'].includes(error.name) && error.status && error.status === 404; +}; +/** + * Memoize the result of a function which does an HTTP fetch + * + * If a call throws an error because the + * underlying HTTP request returned a 404 + * then this function returns a default value + * + * In the absence of any other error, the result is + * cached and reused in the next call to the function. + * + * + * @function + * @param {Function} fn - the function to memoize. It will be + * called without any parameter + * @param {Object} defaultValue - returned in case of 404 + * @returns {Function} async function + */ + + +var withCache = function withCache(fn, defaultValue) { + var cache = undefined; + return /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(cache === undefined)) { + _context.next = 10; + break; + } + + _context.prev = 1; + _context.next = 4; + return fn(); + + case 4: + cache = _context.sent; + _context.next = 10; + break; + + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](1); + cache = is404(_context.t0) ? defaultValue : undefined; + + case 10: + return _context.abrupt("return", cache); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 7]]); + })); +}; +/** + * List all installed applications + * + * Returns only the `data` key of the + * whole JSON payload from the server + * + * @function + * @returns {Promise} + */ + + +var getApps = function getApps() { + return fetchJSON('GET', '/apps/').then(function (json) { + if (json.error) { + throw new Error(json.error); + } + + return json.data; + }); +}; +/** + * Detail of an installed application by its slug + * + * Returns only the `data` key of the + * whole JSON payload from the server + * + * @function + * @param {string} slug + * @returns {Promise} + */ + + +var getApp = function getApp(slug) { + if (!slug) { + throw new Error('Missing slug'); + } + + return fetchJSON('GET', "/apps/".concat(slug)).then(function (json) { + if (json.error) { + throw new Error(json.error); + } + + return json.data; + }); +}; +/** + * default value when no quota is provided + * @private + */ + + +var defaultQuota = Math.pow(10, 12); // 1 Tera + +/** + * Get storage and quota usage + * + * When no quota is returned by the server + * the quota used is the larger between + * `defaultQuota` and 10 * usage + * + * @function + * @returns {Object} {usage, quota, isLimited} + */ + +var getStorageData = function getStorageData() { + return fetchJSON('GET', '/settings/disk-usage').then(function (json) { + // parseInt because responses from the server are in text + var usage = parseInt(json.data.attributes.used, 10); + var realQuota = parseInt(json.data.attributes.quota, 10); // @TODO this is a workaround, we should certainly do smarter + // and either not requiring this attribute + // or set it to something more real + + var quota = realQuota || Math.max(defaultQuota, 10 * usage); + var isLimited = json.data.attributes.is_limited; + return { + usage: usage, + quota: quota, + isLimited: isLimited + }; + }).catch(function () { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableStackException"](); + }); +}; +/** + * Fetch an icon data from its path + * + * The purpose of this function is to be sent + * to AppIcon components for mobile devices. + * + * @private + * @function + * @param {string} iconPath - path of the icon in the stack + * @returns {Blob} + */ + + +var iconFetcher = function iconFetcher(iconPath) { + return getStackClient().fetch('GET', iconPath); +}; +/** + * Get a props object that can be sent to an AppIcon component + * + * Mobile devices and web browsers need different props + * + * @function + * @returns {Object} + */ + + +var getAppIconProps = function getAppIconProps() { + var mobileAppIconProps = { + fetchIcon: function fetchIcon(app) { + return Object(_icon__WEBPACK_IMPORTED_MODULE_4__["default"])(iconFetcher, app, true); + } + }; + var browserAppIconProps = { + // we mustn't give the protocol here + domain: getCozyURL().host, + secure: getCozyURL().protocol === 'https:' + }; + return Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__["isMobileApp"])() ? mobileAppIconProps : browserAppIconProps; +}; +/** + * Get settings context + * + * @function + * @return {Promise} + * @see https://docs.cozy.io/en/cozy-stack/settings/#get-settingscontext + */ + + +var getContext = function getContext() { + return fetchJSON('GET', '/settings/context'); +}; +/** + * Fetch a resource on the cozy stack + * with a prototype compatible with the legacy cozy-client-js + * + * @function + * @param {object} cozy - cozy-client-js + * @param {string} method - HTTP method + * @param {string} path + * @param {object} body + * @returns {Promise} + */ + + +var cozyFetchJSON = function cozyFetchJSON(cozy, method, path, body) { + return fetchJSON(method, path, body).then(function (json) { + var responseData = Object.assign({}, json.data); + + if (responseData.id) { + responseData._id = responseData.id; + } + + return responseData; + }); +}; + +var getSettingsAppURL = function getSettingsAppURL() { + return getApp('settings').then(function (settings) { + if (!settings) { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableSettingsException"](); + } + + return settings.links.related; + }); +}; +/** + * + * @param {cozyClient} forcedCozyClient only used to test purpose + * + * We can not read `version` from `import CozyClient from cozy-client` + * since in that case, we'll read version from the cozy-bar node modules + * and not from the app one. + * + * In order to avoid this issue, we get the instance passed by the app to the bar), + * then read the constructor and then read the version from it + */ + + +var compareClientVersion = function compareClientVersion(targetVersion) { + var forcedCozyClient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var usedClient = cozyClient ? cozyClient.constructor : {}; + var cozyClientToUse = forcedCozyClient !== null ? forcedCozyClient : usedClient; + if (!cozyClientToUse.version) return false; + var result = semver_compare__WEBPACK_IMPORTED_MODULE_2___default()(cozyClientToUse.version, targetVersion); + return result >= 0; +}; +/** + * Initializes the functions to call the cozy stack + * + * @function + * @param {Object} arg + * @param {Object} arg.cozyClient - a cozy client instance + * @param {Function} arg.onCreate + * @param {Function} arg.onDelete + * @returns {Promise} + */ + + +var init = function init(_ref2) { + var client = _ref2.cozyClient, + onCreate = _ref2.onCreate, + onDelete = _ref2.onDelete; + cozyClient = client; + if (!cozyClient.isLogged) return; + Object(_realtime__WEBPACK_IMPORTED_MODULE_5__["default"])({ + getApp: getApp, + onCreate: onCreate, + onDelete: onDelete, + cozyClient: cozyClient + }); +}; + + +/* harmony default export */ __webpack_exports__["default"] = ({ + get: { + app: getApp, + apps: getApps, + context: withCache(getContext, {}), + storageData: getStorageData, + iconProps: getAppIconProps, + cozyURL: getCozyURLOrigin, + intents: getIntents, + settingsAppURL: getSettingsAppURL + }, + updateAccessToken: updateAccessToken, + cozyFetchJSON: cozyFetchJSON, + logout: logout, + init: init +}); + +/***/ }), + +/***/ "Ky9W": +/***/ (function(module, exports) { + +function declensionGroup (scheme, count) { + if (count === 1) { + return scheme.one + } + + var rem100 = count % 100 + + // ends with 11-20 + if (rem100 <= 20 && rem100 > 10) { + return scheme.other + } + + var rem10 = rem100 % 10 + + // ends with 2, 3, 4 + if (rem10 >= 2 && rem10 <= 4) { + return scheme.twoFour + } + + return scheme.other +} + +function declension (scheme, count, time) { + time = time || 'regular' + var group = declensionGroup(scheme, count) + var finalText = group[time] || group + return finalText.replace('{{count}}', count) +} + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: { + regular: 'mniej niż sekunda', + past: 'mniej niż sekundę', + future: 'mniej niż sekundę' + }, + twoFour: 'mniej niż {{count}} sekundy', + other: 'mniej niż {{count}} sekund' + }, + + xSeconds: { + one: { + regular: 'sekunda', + past: 'sekundę', + future: 'sekundę' + }, + twoFour: '{{count}} sekundy', + other: '{{count}} sekund' + }, + + halfAMinute: { + one: 'pół minuty', + twoFour: 'pół minuty', + other: 'pół minuty' + }, + + lessThanXMinutes: { + one: { + regular: 'mniej niż minuta', + past: 'mniej niż minutę', + future: 'mniej niż minutę' + }, + twoFour: 'mniej niż {{count}} minuty', + other: 'mniej niż {{count}} minut' + }, + + xMinutes: { + one: { + regular: 'minuta', + past: 'minutę', + future: 'minutę' + }, + twoFour: '{{count}} minuty', + other: '{{count}} minut' + }, + + aboutXHours: { + one: { + regular: 'około godzina', + past: 'około godziny', + future: 'około godzinę' + }, + twoFour: 'około {{count}} godziny', + other: 'około {{count}} godzin' + }, + + xHours: { + one: { + regular: 'godzina', + past: 'godzinę', + future: 'godzinę' + }, + twoFour: '{{count}} godziny', + other: '{{count}} godzin' + }, + + xDays: { + one: { + regular: 'dzień', + past: 'dzień', + future: '1 dzień' + }, + twoFour: '{{count}} dni', + other: '{{count}} dni' + }, + + aboutXMonths: { + one: 'około miesiąc', + twoFour: 'około {{count}} miesiące', + other: 'około {{count}} miesięcy' + }, + + xMonths: { + one: 'miesiąc', + twoFour: '{{count}} miesiące', + other: '{{count}} miesięcy' + }, + + aboutXYears: { + one: 'około rok', + twoFour: 'około {{count}} lata', + other: 'około {{count}} lat' + }, + + xYears: { + one: 'rok', + twoFour: '{{count}} lata', + other: '{{count}} lat' + }, + + overXYears: { + one: 'ponad rok', + twoFour: 'ponad {{count}} lata', + other: 'ponad {{count}} lat' + }, + + almostXYears: { + one: 'prawie rok', + twoFour: 'prawie {{count}} lata', + other: 'prawie {{count}} lat' + } + } + + function localize (token, count, options) { + options = options || {} + + var scheme = distanceInWordsLocale[token] + if (!options.addSuffix) { + return declension(scheme, count) + } + + if (options.comparison > 0) { + return 'za ' + declension(scheme, count, 'future') + } else { + return declension(scheme, count, 'past') + ' temu' + } + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "L+oB": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.2 String.prototype.anchor(name) +__webpack_require__("A7oe")('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + + +/***/ }), + +/***/ "L/1U": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("k31y"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Dialog__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "L/yQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useIsomorphicLayoutEffect", function() { return useIsomorphicLayoutEffect; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + // React currently throws a warning when using useLayoutEffect on the server. +// To get around it, we can conditionally useEffect on the server (no-op) and +// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store +// subscription callback always has the selector from the latest render commit +// available, otherwise a store update may happen between render and the effect, +// which may cause missed updates; we also must ensure the store subscription +// is created synchronously, otherwise a store update may occur before the +// subscription is created and an inconsistent state may be observed + +var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"]; + +/***/ }), + +/***/ "L1Oa": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] + var monthsFull = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] + var weekdays2char = ['日', '一', '二', '三', '四', '五', '六'] + var weekdays3char = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] + var weekdaysFull = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['上午', '下午'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number.toString() +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "L3Nm": +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__("WnzN"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; + + +/***/ }), + +/***/ "L3Ye": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTranslateValue", function() { return setTranslateValue; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("NFPV"); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("jlvQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("IU9S"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("kjpz"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("V6W0"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("xOGQ"); + + + + + + + + + + + + // Translate the node so he can't be seen on the screen. +// Later, we gonna translate back the node to his original location +// with `none`.` + +function getTranslateValue(direction, node) { + var rect = node.getBoundingClientRect(); + var transform; + + if (node.fakeTransform) { + transform = node.fakeTransform; + } else { + var computedStyle = window.getComputedStyle(node); + transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform'); + } + + var offsetX = 0; + var offsetY = 0; + + if (transform && transform !== 'none' && typeof transform === 'string') { + var transformValues = transform.split('(')[1].split(')')[0].split(','); + offsetX = parseInt(transformValues[4], 10); + offsetY = parseInt(transformValues[5], 10); + } + + if (direction === 'left') { + return "translateX(".concat(window.innerWidth, "px) translateX(").concat(offsetX - rect.left, "px)"); + } + + if (direction === 'right') { + return "translateX(-".concat(rect.left + rect.width - offsetX, "px)"); + } + + if (direction === 'up') { + return "translateY(".concat(window.innerHeight, "px) translateY(").concat(offsetY - rect.top, "px)"); + } // direction === 'down' + + + return "translateY(-".concat(rect.top + rect.height - offsetY, "px)"); +} + +function setTranslateValue(direction, node) { + var transform = getTranslateValue(direction, node); + + if (transform) { + node.style.webkitTransform = transform; + node.style.transform = transform; + } +} +var defaultTimeout = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__["duration"].leavingScreen +}; +/** + * The Slide transition is used by the [Drawer](/components/drawers/) component. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ + +var Slide = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Slide(props, ref) { + var children = props.children, + _props$direction = props.direction, + direction = _props$direction === void 0 ? 'down' : _props$direction, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_6__["Transition"] : _props$TransitionComp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "direction", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__["default"])(); + var childrenRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + /** + * used in cloneElement(children, { ref: handleRef }) + */ + + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (instance) { + // #StrictMode ready + childrenRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__["findDOMNode"](instance); + }, []); + var handleRefIntermediary = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__["default"])(children.ref, handleOwnRef); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__["default"])(handleRefIntermediary, ref); + + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (isAppearing) { + if (callback) { + // onEnterXxx and onExitXxx callbacks have a different arguments.length value. + if (isAppearing === undefined) { + callback(childrenRef.current); + } else { + callback(childrenRef.current, isAppearing); + } + } + }; + }; + + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + setTranslateValue(direction, node); + Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__["reflow"])(node); + + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntering = normalizedTransitionCallback(function (node, isAppearing) { + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__["getTransitionProps"])({ + timeout: timeout, + style: style + }, { + mode: 'enter' + }); + node.style.webkitTransition = theme.transitions.create('-webkit-transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, transitionProps, { + easing: theme.transitions.easing.easeOut + })); + node.style.transition = theme.transitions.create('transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, transitionProps, { + easing: theme.transitions.easing.easeOut + })); + node.style.webkitTransform = 'none'; + node.style.transform = 'none'; + + if (onEntering) { + onEntering(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(onEntered); + var handleExiting = normalizedTransitionCallback(onExiting); + var handleExit = normalizedTransitionCallback(function (node) { + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__["getTransitionProps"])({ + timeout: timeout, + style: style + }, { + mode: 'exit' + }); + node.style.webkitTransition = theme.transitions.create('-webkit-transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, transitionProps, { + easing: theme.transitions.easing.sharp + })); + node.style.transition = theme.transitions.create('transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, transitionProps, { + easing: theme.transitions.easing.sharp + })); + setTranslateValue(direction, node); + + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(function (node) { + // No need for transitions when the component is hidden + node.style.webkitTransition = ''; + node.style.transition = ''; + + if (onExited) { + onExited(node); + } + }); + var updatePosition = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + if (childrenRef.current) { + setTranslateValue(direction, childrenRef.current); + } + }, [direction]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + // Skip configuration where the position is screen size invariant. + if (inProp || direction === 'down' || direction === 'right') { + return undefined; + } + + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_5__["default"])(function () { + if (childrenRef.current) { + setTranslateValue(direction, childrenRef.current); + } + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [direction, inProp]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (!inProp) { + // We need to update the position of the drawer when the direction change and + // when it's hidden. + updatePosition(); + } + }, [inProp, updatePosition]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + nodeRef: childrenRef, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + appear: true, + in: inProp, + timeout: timeout + }, other), function (state, childProps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: handleRef, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + visibility: state === 'exited' && !inProp ? 'hidden' : undefined + }, style, children.props.style) + }, childProps)); + }); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Slide); + +/***/ }), + +/***/ "L5KM": +/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BareMessenger", function() { return BareMessenger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildHandshake", function() { return ChildHandshake; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConcreteEmitter", function() { return ConcreteEmitter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugMessenger", function() { return DebugMessenger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParentHandshake", function() { return ParentHandshake; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PortMessenger", function() { return PortMessenger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WindowMessenger", function() { return WindowMessenger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkerMessenger", function() { return WorkerMessenger; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debug", function() { return debug; }); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +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."); } + +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); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +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; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var MARKER = '@post-me'; + +function createUniqueIdFn() { + var __id = 0; + return function () { + var id = __id; + __id += 1; + return id; + }; +} +/** + * A concrete implementation of the {@link Emitter} interface + * + * @public + */ + + +var ConcreteEmitter = /*#__PURE__*/function () { + function ConcreteEmitter() { + _classCallCheck(this, ConcreteEmitter); + + this._listeners = {}; + } + /** {@inheritDoc Emitter.addEventListener} */ + + + _createClass(ConcreteEmitter, [{ + key: "addEventListener", + value: function addEventListener(eventName, listener) { + var listeners = this._listeners[eventName]; + + if (!listeners) { + listeners = new Set(); + this._listeners[eventName] = listeners; + } + + listeners.add(listener); + } + /** {@inheritDoc Emitter.removeEventListener} */ + + }, { + key: "removeEventListener", + value: function removeEventListener(eventName, listener) { + var listeners = this._listeners[eventName]; + + if (!listeners) { + return; + } + + listeners["delete"](listener); + } + /** {@inheritDoc Emitter.once} */ + + }, { + key: "once", + value: function once(eventName) { + var _this = this; + + return new Promise(function (resolve) { + var listener = function listener(data) { + _this.removeEventListener(eventName, listener); + + resolve(data); + }; + + _this.addEventListener(eventName, listener); + }); + } + /** @internal */ + + }, { + key: "emit", + value: function emit(eventName, data) { + var listeners = this._listeners[eventName]; + + if (!listeners) { + return; + } + + listeners.forEach(function (listener) { + listener(data); + }); + } + /** @internal */ + + }, { + key: "removeAllListeners", + value: function removeAllListeners() { + Object.values(this._listeners).forEach(function (listeners) { + if (listeners) { + listeners.clear(); + } + }); + } + }]); + + return ConcreteEmitter; +}(); + +var MessageType; + +(function (MessageType) { + MessageType["HandshakeRequest"] = "handshake-request"; + MessageType["HandshakeResponse"] = "handshake-response"; + MessageType["Call"] = "call"; + MessageType["Response"] = "response"; + MessageType["Error"] = "error"; + MessageType["Event"] = "event"; + MessageType["Callback"] = "callback"; +})(MessageType || (MessageType = {})); // Message Creators + + +function createHandshakeRequestMessage(sessionId) { + return { + type: MARKER, + action: MessageType.HandshakeRequest, + sessionId: sessionId + }; +} + +function createHandshakeResponseMessage(sessionId) { + return { + type: MARKER, + action: MessageType.HandshakeResponse, + sessionId: sessionId + }; +} + +function createCallMessage(sessionId, requestId, methodName, args) { + return { + type: MARKER, + action: MessageType.Call, + sessionId: sessionId, + requestId: requestId, + methodName: methodName, + args: args + }; +} + +function createResponsMessage(sessionId, requestId, result, error) { + var message = { + type: MARKER, + action: MessageType.Response, + sessionId: sessionId, + requestId: requestId + }; + + if (result !== undefined) { + message.result = result; + } + + if (error !== undefined) { + message.error = error; + } + + return message; +} + +function createCallbackMessage(sessionId, requestId, callbackId, args) { + return { + type: MARKER, + action: MessageType.Callback, + sessionId: sessionId, + requestId: requestId, + callbackId: callbackId, + args: args + }; +} + +function createEventMessage(sessionId, eventName, payload) { + return { + type: MARKER, + action: MessageType.Event, + sessionId: sessionId, + eventName: eventName, + payload: payload + }; +} // Type Guards + + +function isMessage(m) { + return m && m.type === MARKER; +} + +function isHandshakeRequestMessage(m) { + return isMessage(m) && m.action === MessageType.HandshakeRequest; +} + +function isHandshakeResponseMessage(m) { + return isMessage(m) && m.action === MessageType.HandshakeResponse; +} + +function isCallMessage(m) { + return isMessage(m) && m.action === MessageType.Call; +} + +function isResponseMessage(m) { + return isMessage(m) && m.action === MessageType.Response; +} + +function isCallbackMessage(m) { + return isMessage(m) && m.action === MessageType.Callback; +} + +function isEventMessage(m) { + return isMessage(m) && m.action === MessageType.Event; +} + +function makeCallbackEvent(requestId) { + return "callback_".concat(requestId); +} + +function makeResponseEvent(requestId) { + return "response_".concat(requestId); +} + +var Dispatcher = /*#__PURE__*/function (_ConcreteEmitter) { + _inherits(Dispatcher, _ConcreteEmitter); + + var _super = _createSuper(Dispatcher); + + function Dispatcher(messenger, sessionId) { + var _this2; + + _classCallCheck(this, Dispatcher); + + _this2 = _super.call(this); + _this2.uniqueId = createUniqueIdFn(); + _this2.messenger = messenger; + _this2.sessionId = sessionId; + _this2.removeMessengerListener = _this2.messenger.addMessageListener(_this2.messengerListener.bind(_assertThisInitialized(_this2))); + return _this2; + } + + _createClass(Dispatcher, [{ + key: "messengerListener", + value: function messengerListener(event) { + var data = event.data; + + if (!isMessage(data)) { + return; + } + + if (this.sessionId !== data.sessionId) { + return; + } + + if (isCallMessage(data)) { + this.emit(MessageType.Call, data); + } else if (isResponseMessage(data)) { + this.emit(makeResponseEvent(data.requestId), data); + } else if (isEventMessage(data)) { + this.emit(MessageType.Event, data); + } else if (isCallbackMessage(data)) { + this.emit(makeCallbackEvent(data.requestId), data); + } + } + }, { + key: "callOnRemote", + value: function callOnRemote(methodName, args, transfer) { + var requestId = this.uniqueId(); + var callbackEvent = makeCallbackEvent(requestId); + var responseEvent = makeResponseEvent(requestId); + var message = createCallMessage(this.sessionId, requestId, methodName, args); + this.messenger.postMessage(message, transfer); + return { + callbackEvent: callbackEvent, + responseEvent: responseEvent + }; + } + }, { + key: "respondToRemote", + value: function respondToRemote(requestId, value, error, transfer) { + if (error instanceof Error) { + error = { + name: error.name, + message: error.message + }; + } + + var message = createResponsMessage(this.sessionId, requestId, value, error); + this.messenger.postMessage(message, transfer); + } + }, { + key: "callbackToRemote", + value: function callbackToRemote(requestId, callbackId, args) { + var message = createCallbackMessage(this.sessionId, requestId, callbackId, args); + this.messenger.postMessage(message); + } + }, { + key: "emitToRemote", + value: function emitToRemote(eventName, payload, transfer) { + var message = createEventMessage(this.sessionId, eventName, payload); + this.messenger.postMessage(message, transfer); + } + }, { + key: "close", + value: function close() { + this.removeMessengerListener(); + this.removeAllListeners(); + } + }]); + + return Dispatcher; +}(ConcreteEmitter); + +var ParentHandshakeDispatcher = /*#__PURE__*/function (_ConcreteEmitter2) { + _inherits(ParentHandshakeDispatcher, _ConcreteEmitter2); + + var _super2 = _createSuper(ParentHandshakeDispatcher); + + function ParentHandshakeDispatcher(messenger, sessionId) { + var _this3; + + _classCallCheck(this, ParentHandshakeDispatcher); + + _this3 = _super2.call(this); + _this3.messenger = messenger; + _this3.sessionId = sessionId; + _this3.removeMessengerListener = _this3.messenger.addMessageListener(_this3.messengerListener.bind(_assertThisInitialized(_this3))); + return _this3; + } + + _createClass(ParentHandshakeDispatcher, [{ + key: "messengerListener", + value: function messengerListener(event) { + var data = event.data; + + if (!isMessage(data)) { + return; + } + + if (this.sessionId !== data.sessionId) { + return; + } + + if (isHandshakeResponseMessage(data)) { + this.emit(data.sessionId, data); + } + } + }, { + key: "initiateHandshake", + value: function initiateHandshake() { + var message = createHandshakeRequestMessage(this.sessionId); + this.messenger.postMessage(message); + return this.sessionId; + } + }, { + key: "close", + value: function close() { + this.removeMessengerListener(); + this.removeAllListeners(); + } + }]); + + return ParentHandshakeDispatcher; +}(ConcreteEmitter); + +var ChildHandshakeDispatcher = /*#__PURE__*/function (_ConcreteEmitter3) { + _inherits(ChildHandshakeDispatcher, _ConcreteEmitter3); + + var _super3 = _createSuper(ChildHandshakeDispatcher); + + function ChildHandshakeDispatcher(messenger) { + var _this4; + + _classCallCheck(this, ChildHandshakeDispatcher); + + _this4 = _super3.call(this); + _this4.messenger = messenger; + _this4.removeMessengerListener = _this4.messenger.addMessageListener(_this4.messengerListener.bind(_assertThisInitialized(_this4))); + return _this4; + } + + _createClass(ChildHandshakeDispatcher, [{ + key: "messengerListener", + value: function messengerListener(event) { + var data = event.data; + + if (isHandshakeRequestMessage(data)) { + this.emit(MessageType.HandshakeRequest, data); + } + } + }, { + key: "acceptHandshake", + value: function acceptHandshake(sessionId) { + var message = createHandshakeResponseMessage(sessionId); + this.messenger.postMessage(message); + } + }, { + key: "close", + value: function close() { + this.removeMessengerListener(); + this.removeAllListeners(); + } + }]); + + return ChildHandshakeDispatcher; +}(ConcreteEmitter); + +var ProxyType; + +(function (ProxyType) { + ProxyType["Callback"] = "callback"; +})(ProxyType || (ProxyType = {})); + +function createCallbackProxy(callbackId) { + return { + type: MARKER, + proxy: ProxyType.Callback, + callbackId: callbackId + }; +} + +function isCallbackProxy(p) { + return p && p.type === MARKER && p.proxy === ProxyType.Callback; +} + +var ConcreteRemoteHandle = /*#__PURE__*/function (_ConcreteEmitter4) { + _inherits(ConcreteRemoteHandle, _ConcreteEmitter4); + + var _super4 = _createSuper(ConcreteRemoteHandle); + + function ConcreteRemoteHandle(dispatcher) { + var _this5; + + _classCallCheck(this, ConcreteRemoteHandle); + + _this5 = _super4.call(this); + _this5._dispatcher = dispatcher; + _this5._callTransfer = {}; + + _this5._dispatcher.addEventListener(MessageType.Event, _this5._handleEvent.bind(_assertThisInitialized(_this5))); + + return _this5; + } + + _createClass(ConcreteRemoteHandle, [{ + key: "close", + value: function close() { + this.removeAllListeners(); + } + }, { + key: "setCallTransfer", + value: function setCallTransfer(methodName, transfer) { + this._callTransfer[methodName] = transfer; + } + }, { + key: "call", + value: function call(methodName) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return this.customCall(methodName, args); + } + }, { + key: "customCall", + value: function customCall(methodName, args) { + var _this6 = this; + + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + return new Promise(function (resolve, reject) { + var sanitizedArgs = []; + var callbacks = []; + var callbackId = 0; + args.forEach(function (arg) { + if (typeof arg === 'function') { + callbacks.push(arg); + sanitizedArgs.push(createCallbackProxy(callbackId)); + callbackId += 1; + } else { + sanitizedArgs.push(arg); + } + }); + var hasCallbacks = callbacks.length > 0; + var callbackListener = undefined; + + if (hasCallbacks) { + callbackListener = function callbackListener(data) { + var callbackId = data.callbackId, + args = data.args; + callbacks[callbackId].apply(callbacks, _toConsumableArray(args)); + }; + } + + var transfer = options.transfer; + + if (transfer === undefined && _this6._callTransfer[methodName]) { + var _this6$_callTransfer; + + transfer = (_this6$_callTransfer = _this6._callTransfer)[methodName].apply(_this6$_callTransfer, sanitizedArgs); + } + + var _this6$_dispatcher$ca = _this6._dispatcher.callOnRemote(methodName, sanitizedArgs, transfer), + callbackEvent = _this6$_dispatcher$ca.callbackEvent, + responseEvent = _this6$_dispatcher$ca.responseEvent; + + if (hasCallbacks) { + _this6._dispatcher.addEventListener(callbackEvent, callbackListener); + } + + _this6._dispatcher.once(responseEvent).then(function (response) { + if (callbackListener) { + _this6._dispatcher.removeEventListener(callbackEvent, callbackListener); + } + + var result = response.result, + error = response.error; + + if (error !== undefined) { + reject(error); + } else { + resolve(result); + } + }); + }); + } + }, { + key: "_handleEvent", + value: function _handleEvent(data) { + var eventName = data.eventName, + payload = data.payload; + this.emit(eventName, payload); + } + }]); + + return ConcreteRemoteHandle; +}(ConcreteEmitter); + +var ConcreteLocalHandle = /*#__PURE__*/function () { + function ConcreteLocalHandle(dispatcher, localMethods) { + _classCallCheck(this, ConcreteLocalHandle); + + this._dispatcher = dispatcher; + this._methods = localMethods; + this._returnTransfer = {}; + this._emitTransfer = {}; + + this._dispatcher.addEventListener(MessageType.Call, this._handleCall.bind(this)); + } + + _createClass(ConcreteLocalHandle, [{ + key: "emit", + value: function emit(eventName, payload) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var transfer = options.transfer; + + if (transfer === undefined && this._emitTransfer[eventName]) { + transfer = this._emitTransfer[eventName](payload); + } + + this._dispatcher.emitToRemote(eventName, payload, transfer); + } + }, { + key: "setMethods", + value: function setMethods(methods) { + this._methods = methods; + } + }, { + key: "setMethod", + value: function setMethod(methodName, method) { + this._methods[methodName] = method; + } + }, { + key: "setReturnTransfer", + value: function setReturnTransfer(methodName, transfer) { + this._returnTransfer[methodName] = transfer; + } + }, { + key: "setEmitTransfer", + value: function setEmitTransfer(eventName, transfer) { + this._emitTransfer[eventName] = transfer; + } + }, { + key: "_handleCall", + value: function _handleCall(data) { + var _this7 = this; + + var requestId = data.requestId, + methodName = data.methodName, + args = data.args; + var callMethod = new Promise(function (resolve, reject) { + var _this7$_methods; + + var method = _this7._methods[methodName]; + + if (typeof method !== 'function') { + reject(new Error("The method \"".concat(methodName, "\" has not been implemented."))); + return; + } + + var desanitizedArgs = args.map(function (arg) { + if (isCallbackProxy(arg)) { + var callbackId = arg.callbackId; + return function () { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + _this7._dispatcher.callbackToRemote(requestId, callbackId, args); + }; + } else { + return arg; + } + }); + Promise.resolve((_this7$_methods = _this7._methods)[methodName].apply(_this7$_methods, _toConsumableArray(desanitizedArgs))).then(resolve)["catch"](reject); + }); + callMethod.then(function (result) { + var transfer; + + if (_this7._returnTransfer[methodName]) { + transfer = _this7._returnTransfer[methodName](result); + } + + _this7._dispatcher.respondToRemote(requestId, result, undefined, transfer); + })["catch"](function (error) { + _this7._dispatcher.respondToRemote(requestId, undefined, error); + }); + } + }]); + + return ConcreteLocalHandle; +}(); + +var ConcreteConnection = /*#__PURE__*/function () { + function ConcreteConnection(dispatcher, localMethods) { + _classCallCheck(this, ConcreteConnection); + + this._dispatcher = dispatcher; + this._localHandle = new ConcreteLocalHandle(dispatcher, localMethods); + this._remoteHandle = new ConcreteRemoteHandle(dispatcher); + } + + _createClass(ConcreteConnection, [{ + key: "close", + value: function close() { + this._dispatcher.close(); + + this.remoteHandle().close(); + } + }, { + key: "localHandle", + value: function localHandle() { + return this._localHandle; + } + }, { + key: "remoteHandle", + value: function remoteHandle() { + return this._remoteHandle; + } + }]); + + return ConcreteConnection; +}(); + +var uniqueSessionId = createUniqueIdFn(); + +var runUntil = function runUntil(worker, condition, unfulfilled, maxAttempts, attemptInterval) { + var attempt = 0; + + var fn = function fn() { + if (!condition() && (attempt < maxAttempts || maxAttempts < 1)) { + worker(); + attempt += 1; + setTimeout(fn, attemptInterval); + } else if (!condition() && attempt >= maxAttempts && maxAttempts >= 1) { + unfulfilled(); + } + }; + + fn(); +}; +/** + * Initiate the handshake from the Parent side + * + * @param messenger - The Messenger used to send and receive messages from the other end + * @param localMethods - The methods that will be exposed to the other end + * @param maxAttempts - The maximum number of handshake attempts + * @param attemptsInterval - The interval between handshake attempts + * @returns A Promise to an active {@link Connection} to the other end + * + * @public + */ + + +function ParentHandshake(messenger) { + var localMethods = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var maxAttempts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5; + var attemptsInterval = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 100; + var thisSessionId = uniqueSessionId(); + var connected = false; + return new Promise(function (resolve, reject) { + var handshakeDispatcher = new ParentHandshakeDispatcher(messenger, thisSessionId); + handshakeDispatcher.once(thisSessionId).then(function (response) { + connected = true; + handshakeDispatcher.close(); + var sessionId = response.sessionId; + var dispatcher = new Dispatcher(messenger, sessionId); + var connection = new ConcreteConnection(dispatcher, localMethods); + resolve(connection); + }); + runUntil(function () { + return handshakeDispatcher.initiateHandshake(); + }, function () { + return connected; + }, function () { + return reject(new Error("Handshake failed, reached maximum number of attempts")); + }, maxAttempts, attemptsInterval); + }); +} +/** + * Initiate the handshake from the Child side + * + * @param messenger - The Messenger used to send and receive messages from the other end + * @param localMethods - The methods that will be exposed to the other end + * @returns A Promise to an active {@link Connection} to the other end + * + * @public + */ + + +function ChildHandshake(messenger) { + var localMethods = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return new Promise(function (resolve, reject) { + var handshakeDispatcher = new ChildHandshakeDispatcher(messenger); + handshakeDispatcher.once(MessageType.HandshakeRequest).then(function (response) { + var sessionId = response.sessionId; + handshakeDispatcher.acceptHandshake(sessionId); + handshakeDispatcher.close(); + var dispatcher = new Dispatcher(messenger, sessionId); + var connection = new ConcreteConnection(dispatcher, localMethods); + resolve(connection); + }); + }); +} + +var acceptableMessageEvent = function acceptableMessageEvent(event, remoteWindow, acceptedOrigin) { + var source = event.source, + origin = event.origin; + + if (source !== remoteWindow) { + return false; + } + + if (origin !== acceptedOrigin && acceptedOrigin !== '*') { + return false; + } + + return true; +}; +/** + * A concrete implementation of {@link Messenger} used to communicate with another Window. + * + * @public + * + */ + + +var WindowMessenger = function WindowMessenger(_ref) { + var localWindow = _ref.localWindow, + remoteWindow = _ref.remoteWindow, + remoteOrigin = _ref.remoteOrigin; + + _classCallCheck(this, WindowMessenger); + + localWindow = localWindow || window; + + this.postMessage = function (message, transfer) { + remoteWindow.postMessage(message, remoteOrigin, transfer); + }; + + this.addMessageListener = function (listener) { + var outerListener = function outerListener(event) { + if (acceptableMessageEvent(event, remoteWindow, remoteOrigin)) { + listener(event); + } + }; + + localWindow.addEventListener('message', outerListener); + + var removeListener = function removeListener() { + localWindow.removeEventListener('message', outerListener); + }; + + return removeListener; + }; +}; +/** @public */ + + +var BareMessenger = function BareMessenger(postable) { + _classCallCheck(this, BareMessenger); + + this.postMessage = function (message) { + var transfer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + postable.postMessage(message, transfer); + }; + + this.addMessageListener = function (listener) { + var outerListener = function outerListener(event) { + listener(event); + }; + + postable.addEventListener('message', outerListener); + + var removeListener = function removeListener() { + postable.removeEventListener('message', outerListener); + }; + + return removeListener; + }; +}; +/** + * A concrete implementation of {@link Messenger} used to communicate with a Worker. + * + * Takes a {@link Postable} representing the `Worker` (when calling from + * the parent context) or the `self` `DedicatedWorkerGlobalScope` object + * (when calling from the child context). + * + * @public + * + */ + + +var WorkerMessenger = /*#__PURE__*/function (_BareMessenger) { + _inherits(WorkerMessenger, _BareMessenger); + + var _super5 = _createSuper(WorkerMessenger); + + function WorkerMessenger(_ref2) { + var worker = _ref2.worker; + + _classCallCheck(this, WorkerMessenger); + + return _super5.call(this, worker); + } + + return WorkerMessenger; +}(BareMessenger); +/** + * A concrete implementation of {@link Messenger} used to communicate with a MessagePort. + * + * @public + * + */ + + +var PortMessenger = /*#__PURE__*/function (_BareMessenger2) { + _inherits(PortMessenger, _BareMessenger2); + + var _super6 = _createSuper(PortMessenger); + + function PortMessenger(_ref3) { + var port = _ref3.port; + + _classCallCheck(this, PortMessenger); + + port.start(); + return _super6.call(this, port); + } + + return PortMessenger; +}(BareMessenger); +/** + * Create a logger function with a specific namespace + * + * @param namespace - The namespace will be prepended to all the arguments passed to the logger function + * @param log - The underlying logger (`console.log` by default) + * + * @public + * + */ + + +function debug(namespace, log) { + log = log || console.debug || console.log || function () {}; + + return function () { + for (var _len3 = arguments.length, data = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + data[_key3] = arguments[_key3]; + } + + log.apply(void 0, [namespace].concat(data)); + }; +} +/** + * Decorate a {@link Messenger} so that it will log any message exchanged + * @param messenger - The Messenger that will be decorated + * @param log - The logger function that will receive each message + * @returns A decorated Messenger + * + * @public + * + */ + + +function DebugMessenger(messenger, log) { + log = log || debug('post-me'); + + var debugListener = function debugListener(event) { + var data = event.data; + log('⬅️ received message', data); + }; + + messenger.addMessageListener(debugListener); + return { + postMessage: function postMessage(message, transfer) { + log('➡️ sending message', message); + messenger.postMessage(message, transfer); + }, + addMessageListener: function addMessageListener(listener) { + return messenger.addMessageListener(listener); + } + }; +} + + + + +/***/ }), + +/***/ "L5XS": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: '1秒以下', + other: '{{count}}秒以下' + }, + + xSeconds: { + one: '1秒', + other: '{{count}}秒' + }, + + halfAMinute: '30秒ぐらい', + + lessThanXMinutes: { + one: '1分以下', + other: '{{count}}分以下' + }, + + xMinutes: { + one: '1分', + other: '{{count}}分' + }, + + aboutXHours: { + one: '1時間ぐらい', + other: '{{count}}時間ぐらい' + }, + + xHours: { + one: '1時間', + other: '{{count}}時間' + }, + + xDays: { + one: '1日', + other: '{{count}}日' + }, + + aboutXMonths: { + one: '1ヶ月ぐらい', + other: '{{count}}ヶ月ぐらい' + }, + + xMonths: { + one: '1ヶ月', + other: '{{count}}ヶ月' + }, + + aboutXYears: { + one: '1年ぐらい', + other: '{{count}}年ぐらい' + }, + + xYears: { + one: '1年', + other: '{{count}}年' + }, + + overXYears: { + one: '1年以上', + other: '{{count}}年以上' + }, + + almostXYears: { + one: '1年以下', + other: '{{count}}年以下', + oneWithSuffix: '1年ぐらい', + otherWithSuffix: '{{count}}年ぐらい' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + if (options.addSuffix && distanceInWordsLocale[token].oneWithSuffix) { + result = distanceInWordsLocale[token].oneWithSuffix + } else { + result = distanceInWordsLocale[token].one + } + } else { + if (options.addSuffix && distanceInWordsLocale[token].otherWithSuffix) { + result = distanceInWordsLocale[token].otherWithSuffix.replace('{{count}}', count) + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return result + '後' + } else { + return result + '前' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "LAmv": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +var runtime = (function (exports) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function define(obj, key, value) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + return obj[key]; + } + try { + // IE 8 has a broken Object.defineProperty that only works on DOM objects. + define({}, ""); + } catch (err) { + define = function(obj, key, value) { + return obj[key] = value; + }; + } + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + exports.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + define(IteratorPrototype, iteratorSymbol, function () { + return this; + }); + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = GeneratorFunctionPrototype; + define(Gp, "constructor", GeneratorFunctionPrototype); + define(GeneratorFunctionPrototype, "constructor", GeneratorFunction); + GeneratorFunction.displayName = define( + GeneratorFunctionPrototype, + toStringTagSymbol, + "GeneratorFunction" + ); + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + define(prototype, method, function(arg) { + return this._invoke(method, arg); + }); + }); + } + + exports.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + exports.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + define(genFun, toStringTagSymbol, "GeneratorFunction"); + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + exports.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator, PromiseImpl) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return PromiseImpl.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return PromiseImpl.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function(error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + return this; + }); + exports.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { + if (PromiseImpl === void 0) PromiseImpl = Promise; + + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList), + PromiseImpl + ); + + return exports.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + define(Gp, toStringTagSymbol, "Generator"); + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + define(Gp, iteratorSymbol, function() { + return this; + }); + + define(Gp, "toString", function() { + return "[object Generator]"; + }); + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + exports.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; + + // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + return exports; + +}( + // If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + true ? module.exports : undefined +)); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, in modern engines + // we can explicitly access globalThis. In older engines we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + if (typeof globalThis === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} + + +/***/ }), + +/***/ "LBaW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _unsupportedIterableToArray; }); +/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jUvS"); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(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 Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); +} + +/***/ }), + +/***/ "LEB8": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("pFmr"); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), + +/***/ "LF8A": +/***/ (function(module, exports, __webpack_require__) { + +var basePick = __webpack_require__("cqny"), + flatRest = __webpack_require__("vjlx"); + +/** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); +}); + +module.exports = pick; + + +/***/ }), + +/***/ "LFRV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__("LRPZ"); +var $pad = __webpack_require__("mOnz"); +var userAgent = __webpack_require__("Wr43"); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + + +/***/ }), + +/***/ "LGLP": +/***/ (function(module, exports) { + +function _extends() { + module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _extends.apply(this, arguments); +} + +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "LGU+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PROFILE_DOCTYPE = void 0; +var PROFILE_DOCTYPE = 'com.grandlyon.ecolyo.profile'; +exports.PROFILE_DOCTYPE = PROFILE_DOCTYPE; + +/***/ }), + +/***/ "LPvn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("umgW"); +/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ZhqA"); +/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("L/yQ"); + + + + + + +function Provider(_ref) { + var store = _ref.store, + context = _ref.context, + children = _ref.children; + var contextValue = Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () { + var subscription = Object(_utils_Subscription__WEBPACK_IMPORTED_MODULE_3__["createSubscription"])(store); + return { + store: store, + subscription: subscription + }; + }, [store]); + var previousState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () { + return store.getState(); + }, [store]); + Object(_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_4__["useIsomorphicLayoutEffect"])(function () { + var subscription = contextValue.subscription; + subscription.onStateChange = subscription.notifyNestedSubs; + subscription.trySubscribe(); + + if (previousState !== store.getState()) { + subscription.notifyNestedSubs(); + } + + return function () { + subscription.tryUnsubscribe(); + subscription.onStateChange = null; + }; + }, [contextValue, previousState]); + var Context = context || _Context__WEBPACK_IMPORTED_MODULE_2__["ReactReduxContext"]; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Context.Provider, { + value: contextValue + }, children); +} + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Provider); + +/***/ }), + +/***/ "LRPZ": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var core = __webpack_require__("WSXa"); +var hide = __webpack_require__("XyXA"); +var redefine = __webpack_require__("iNsi"); +var ctx = __webpack_require__("DnF+"); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), + +/***/ "LRUT": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'] + var weekdays2char = ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'] + var weekdays3char = ['sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör'] + var weekdaysFull = ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'] + var meridiemFull = ['f.m.', 'e.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + formatters.A = formatters.aa + formatters.a = formatters.aa + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var rem100 = number % 100 + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + case 2: + return number + ':a' + } + } + return number + ':e' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "LRcO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/* harmony default export */ __webpack_exports__["default"] = (react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null)); + +/***/ }), + +/***/ "LVeX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.default = getStorage; + + +function noop() {} + +var noopStorage = { + getItem: noop, + setItem: noop, + removeItem: noop +}; + +function hasStorage(storageType) { + if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) !== 'object' || !(storageType in self)) { + return false; + } + + try { + var storage = self[storageType]; + var testKey = 'redux-persist ' + storageType + ' test'; + storage.setItem(testKey, 'test'); + storage.getItem(testKey); + storage.removeItem(testKey); + } catch (e) { + if (false) {} + return false; + } + return true; +} + +function getStorage(type) { + var storageType = type + 'Storage'; + if (hasStorage(storageType)) return self[storageType];else { + if (false) {} + return noopStorage; + } +} + +/***/ }), + +/***/ "LVjP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistCombineReducers; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iNHL"); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Oxgs"); +/* harmony import */ var _stateReconciler_autoMergeLevel2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("/bBx"); + + + + +// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 +function persistCombineReducers(config, reducers) { + config.stateReconciler = config.stateReconciler === undefined ? _stateReconciler_autoMergeLevel2__WEBPACK_IMPORTED_MODULE_2__["default"] : config.stateReconciler; + return Object(_persistReducer__WEBPACK_IMPORTED_MODULE_1__["default"])(config, Object(redux__WEBPACK_IMPORTED_MODULE_0__["combineReducers"])(reducers)); +} + +/***/ }), + +/***/ "LWym": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.11 Math.clz32(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + + +/***/ }), + +/***/ "LYR+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_nullishCoalesce", function() { return _nullishCoalesce; }); +/** + * Polyfill for the nullish coalescing operator (`??`). + * + * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the + * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param lhs The value of the expression to the left of the `??` + * @param rhsFn A function returning the value of the expression to the right of the `??` + * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value + */ +function _nullishCoalesce(lhs, rhsFn) { + // by checking for loose equality to `null`, we catch both `null` and `undefined` + return lhs != null ? lhs : rhsFn(); +} + +// Sucrase version: +// function _nullishCoalesce(lhs, rhsFn) { +// if (lhs != null) { +// return lhs; +// } else { +// return rhsFn(); +// } +// } + + +//# sourceMappingURL=_nullishCoalesce.js.map + + +/***/ }), + +/***/ "LahF": +/***/ (function(module, exports) { + +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; + + +/***/ }), + +/***/ "Lbe8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var arrayMethodBoxesProperly = __webpack_require__("Mr+I"); + +var implementation = __webpack_require__("7CCE"); + +module.exports = function getPolyfill() { + var method = Array.prototype.forEach; + return arrayMethodBoxesProperly(method) ? method : implementation; +}; + + +/***/ }), + +/***/ "LcW+": +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__("HzFX"); +var toLength = __webpack_require__("yhnj"); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), + +/***/ "LegK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultStackURL", function() { return getDefaultStackURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultToken", function() { return getDefaultToken; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultIcon", function() { return getDefaultIcon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppNamePrefix", function() { return getAppNamePrefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppSlug", function() { return getAppSlug; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserActionRequired", function() { return getUserActionRequired; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_SELECTOR", function() { return APP_SELECTOR; }); +var APP_SELECTOR = '[role=application]'; // return an empty object by default to avoid checking existance + +var getAppNodeDataSet = function getAppNodeDataSet() { + var appNode = document.querySelector(APP_SELECTOR); + if (!appNode || !appNode.dataset) return {}; + return appNode.dataset; +}; + +var getDefaultStackURL = function getDefaultStackURL(isPublic) { + var data = getAppNodeDataSet(); + + if (!data.cozyDomain) { + if (!isPublic) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar can't discover the cozy's URL, and will probably fail to initialize the connection with the stack."); + } + + return ''; + } + + var protocol = window.location.protocol; + return "".concat(protocol, "//").concat(data.cozyDomain); +}; + +var getDefaultToken = function getDefaultToken(isPublic) { + var data = getAppNodeDataSet(); + + if (!data.cozyToken) { + if (!isPublic) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar can't discover the app's token, and will probably fail to initialize the connection with the stack."); + } + + return ''; + } + + return data.cozyToken; +}; + +var getDefaultIcon = function getDefaultIcon() { + var linkNode = document.querySelector('link[rel="icon"][sizes^="32"]'); + + if (linkNode !== null) { + return linkNode.getAttribute('href'); + } else { + return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + } +}; + +var getAppNamePrefix = function getAppNamePrefix() { + var data = getAppNodeDataSet(); + return data.cozyAppNamePrefix || null; +}; + +var getAppSlug = function getAppSlug() { + var data = getAppNodeDataSet(); + return data.cozyAppSlug || null; +}; + +var getUserActionRequired = function getUserActionRequired() { + var meta = document.querySelector('meta[name=user-action-required]'); + var data = meta && meta.dataset; + + if (data) { + var title = data.title, + code = data.code, + detail = data.detail, + links = data.links; + + if (code) { + // we suppose that at least code will always exist + return { + title: title, + code: code, + detail: detail, + links: links + }; + } + } + + return undefined; +}; + + + +/***/ }), + +/***/ "LjWU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return responsiveFontSizes; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rDuK"); +/* harmony import */ var _cssUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dxoH"); + + + +function responsiveFontSizes(themeInput) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$breakpoints = options.breakpoints, + breakpoints = _options$breakpoints === void 0 ? ['sm', 'md', 'lg'] : _options$breakpoints, + _options$disableAlign = options.disableAlign, + disableAlign = _options$disableAlign === void 0 ? false : _options$disableAlign, + _options$factor = options.factor, + factor = _options$factor === void 0 ? 2 : _options$factor, + _options$variants = options.variants, + variants = _options$variants === void 0 ? ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline'] : _options$variants; + + var theme = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, themeInput); + + theme.typography = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, theme.typography); + var typography = theme.typography; // Convert between css lengths e.g. em->px or px->rem + // Set the baseFontSize for your project. Defaults to 16px (also the browser default). + + var convert = Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["convertLength"])(typography.htmlFontSize); + var breakpointValues = breakpoints.map(function (x) { + return theme.breakpoints.values[x]; + }); + variants.forEach(function (variant) { + var style = typography[variant]; + var remFontSize = parseFloat(convert(style.fontSize, 'rem')); + + if (remFontSize <= 1) { + return; + } + + var maxFontSize = remFontSize; + var minFontSize = 1 + (maxFontSize - 1) / factor; + var lineHeight = style.lineHeight; + + if (!Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["isUnitless"])(lineHeight) && !disableAlign) { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_1__["formatMuiErrorMessage"])(6)); + } + + if (!Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["isUnitless"])(lineHeight)) { + // make it unitless + lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize); + } + + var transform = null; + + if (!disableAlign) { + transform = function transform(value) { + return Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["alignProperty"])({ + size: value, + grid: Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["fontGrid"])({ + pixels: 4, + lineHeight: lineHeight, + htmlFontSize: typography.htmlFontSize + }) + }); + }; + } + + typography[variant] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, style, Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__["responsiveProperty"])({ + cssProperty: 'fontSize', + min: minFontSize, + max: maxFontSize, + unit: 'rem', + breakpoints: breakpointValues, + transform: transform + })); + }); + return theme; +} + +/***/ }), + +/***/ "LjkH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO_REC = exports.REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO = void 0; +var REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO = '/remote/org.ecolyo.agent.partners.info'; +exports.REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO = REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO; +var REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO_REC = '/remote/org.ecolyo.agent.partners.info.rec'; +exports.REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO_REC = REMOTE_ORG_ECOLYO_AGENT_PARTNERS_INFO_REC; + +/***/ }), + +/***/ "LmJ2": +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__("mKCr"), + eq = __webpack_require__("lBlV"); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; + + +/***/ }), + +/***/ "Lpe+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $Object = GetIntrinsic('%Object%'); + +var RequireObjectCoercible = __webpack_require__("YG3o"); + +// https://ecma-international.org/ecma-262/6.0/#sec-toobject + +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; + + +/***/ }), + +/***/ "Ls2Z": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.21 Math.log10(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + + +/***/ }), + +/***/ "Lv97": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isWebDevMode = exports.isNativeDevMode = exports.interpolate = exports.getErrorMessage = void 0; + +var _construct2 = _interopRequireDefault(__webpack_require__("GZTL")); + +var interpolate = function interpolate(str, params) { + if (!params) return str; + var names = Object.keys(params); + var vals = Object.values(params); // I do not see security risks here, we're not executing user input + // eslint-disable-next-line @typescript-eslint/no-implied-eval + + var makeInterpolate = (0, _construct2.default)(Function, names.concat(["return `".concat(str, "`;")])); + + try { + return makeInterpolate.apply(void 0, vals); + } catch (error) { + // String template and params did not match + return str; + } +}; + +exports.interpolate = interpolate; + +var isNativeDevMode = function isNativeDevMode() { + try { + return !!__DEV__; + } catch (_unused) { + return false; + } +}; + +exports.isNativeDevMode = isNativeDevMode; + +var isWebDevMode = function isWebDevMode() { + try { + return !!false; + } catch (_unused2) { + return false; + } +}; + +exports.isWebDevMode = isWebDevMode; + +var getErrorMessage = function getErrorMessage(error) { + if (error instanceof Error) return error.message; + return String(error); +}; + +exports.getErrorMessage = getErrorMessage; + +/***/ }), + +/***/ "M+cw": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; + + +/***/ }), + +/***/ "M2yu": +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__("WXXH"); +var getKeys = __webpack_require__("FFxP"); +var toIObject = __webpack_require__("764U"); +var isEnum = __webpack_require__("AJH6").f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), + +/***/ "M348": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var deepOrange = { + 50: '#fbe9e7', + 100: '#ffccbc', + 200: '#ffab91', + 300: '#ff8a65', + 400: '#ff7043', + 500: '#ff5722', + 600: '#f4511e', + 700: '#e64a19', + 800: '#d84315', + 900: '#bf360c', + A100: '#ff9e80', + A200: '#ff6e40', + A400: '#ff3d00', + A700: '#dd2c00' +}; +/* harmony default export */ __webpack_exports__["default"] = (deepOrange); + +/***/ }), + +/***/ "M3Gw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("auXt"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _NoSsr__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "M3cl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FluidSlugType = void 0; +var FluidSlugType; +exports.FluidSlugType = FluidSlugType; +(function (FluidSlugType) { + FluidSlugType["ELECTRICITY"] = "enedissgegrandlyon"; + FluidSlugType["WATER"] = "eglgrandlyon"; + FluidSlugType["GAS"] = "grdfgrandlyon"; +})(FluidSlugType || (exports.FluidSlugType = FluidSlugType = {})); + +/***/ }), + +/***/ "M8jC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var Request = +/*#__PURE__*/ +function () { + function Request(cozyClient) { + (0, _classCallCheck2.default)(this, Request); + this.stackClient = cozyClient.stackClient; + } + + (0, _createClass2.default)(Request, [{ + key: "get", + value: function get(id) { + return this.stackClient.fetchJSON('GET', "/intents/".concat(id)).then(function (resp) { + var data = resp.data; + if (!data._id) data._id = data.id; + return data; + }); + } + }, { + key: "post", + value: function post(action, type, data, permissions) { + return this.stackClient.fetchJSON('POST', '/intents', { + data: { + type: 'io.cozy.intents', + attributes: { + action: action, + type: type, + data: data, + permissions: permissions + } + } + }).then(function (resp) { + return resp.data; + }); + } + }]); + return Request; +}(); + +var _default = Request; +exports.default = _default; + +/***/ }), + +/***/ "MCx/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("I2rS"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withThemeCreator", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_0__["withThemeCreator"]; }); + + + + +/***/ }), + +/***/ "MFz2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var common = { + black: '#000', + white: '#fff' +}; +/* harmony default export */ __webpack_exports__["default"] = (common); + +/***/ }), + +/***/ "MGrj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LinkedErrors", function() { return LinkedErrors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_handler", function() { return _handler; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_walkErrorTree", function() { return _walkErrorTree; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Bp2Q"); + + + + +const DEFAULT_KEY = 'cause'; +const DEFAULT_LIMIT = 5; + +/** Adds SDK info to an event. */ +class LinkedErrors { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'LinkedErrors';} + + /** + * @inheritDoc + */ + __init() {this.name = LinkedErrors.id;} + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + constructor(options = {}) {;LinkedErrors.prototype.__init.call(this); + this._key = options.key || DEFAULT_KEY; + this._limit = options.limit || DEFAULT_LIMIT; + } + + /** + * @inheritDoc + */ + setupOnce() { + const client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getClient(); + if (!client) { + return; + } + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"])((event, hint) => { + const self = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getIntegration(LinkedErrors); + return self ? _handler(client.getOptions().stackParser, self._key, self._limit, event, hint) : event; + }); + } +} LinkedErrors.__initStatic(); + +/** + * @inheritDoc + */ +function _handler( + parser, + key, + limit, + event, + hint, +) { + if (!event.exception || !event.exception.values || !hint || !Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isInstanceOf"])(hint.originalException, Error)) { + return event; + } + const linkedErrors = _walkErrorTree(parser, limit, hint.originalException , key); + event.exception.values = [...linkedErrors, ...event.exception.values]; + return event; +} + +/** + * JSDOC + */ +function _walkErrorTree( + parser, + limit, + error, + key, + stack = [], +) { + if (!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isInstanceOf"])(error[key], Error) || stack.length + 1 >= limit) { + return stack; + } + const exception = Object(_eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__["exceptionFromError"])(parser, error[key]); + return _walkErrorTree(parser, limit, error[key], key, [exception, ...stack]); +} + + +//# sourceMappingURL=linkederrors.js.map + + +/***/ }), + +/***/ "MHAU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__("pebw"); +var step = __webpack_require__("2rqr"); +var Iterators = __webpack_require__("Ikrg"); +var toIObject = __webpack_require__("764U"); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__("Qpz8")(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), + +/***/ "MIMv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasValue", function() { return hasValue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFilled", function() { return isFilled; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAdornedStart", function() { return isAdornedStart; }); +// Supports determination of isControlled(). +// Controlled input accepts its current value as a prop. +// +// @see https://facebook.github.io/react/docs/forms.html#controlled-components +// @param value +// @returns {boolean} true if string (including '') or number (including zero) +function hasValue(value) { + return value != null && !(Array.isArray(value) && value.length === 0); +} // Determine if field is empty or filled. +// Response determines if label is presented above field or as placeholder. +// +// @param obj +// @param SSR +// @returns {boolean} False when not present or empty string. +// True when any number or string with length. + +function isFilled(obj) { + var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== ''); +} // Determine if an Input is adorned on start. +// It's corresponding to the left with LTR. +// +// @param obj +// @returns {boolean} False when no adornments. +// True when adorned at the start. + +function isAdornedStart(obj) { + return obj.startAdornment; +} + +/***/ }), + +/***/ "MIo3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ "MJlQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _NativeSelect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("r4+2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _NativeSelect__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "MKBq": +/***/ (function(module, exports, __webpack_require__) { + +var startOfWeek = __webpack_require__("/HvP") + +/** + * @category ISO Week Helpers + * @summary Return the start of an ISO week for the given date. + * + * @description + * Return the start of an ISO week for the given date. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|String|Number} date - the original date + * @returns {Date} the start of an ISO week + * + * @example + * // The start of an ISO week for 2 September 2014 11:55:00: + * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Mon Sep 01 2014 00:00:00 + */ +function startOfISOWeek (dirtyDate) { + return startOfWeek(dirtyDate, {weekStartsOn: 1}) +} + +module.exports = startOfISOWeek + + +/***/ }), + +/***/ "MLyG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _setPrototypeOf; }); +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} + +/***/ }), + +/***/ "MXVp": +/***/ (function(module, exports, __webpack_require__) { + +var baseEach = __webpack_require__("67e+"), + isArrayLike = __webpack_require__("yTJ1"); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; + + +/***/ }), + +/***/ "MYNY": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.28 Math.sign(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { sign: __webpack_require__("7bGD") }); + + +/***/ }), + +/***/ "MZDC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _withMobileDialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("az50"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _withMobileDialog__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "MaEZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Stepper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pFWb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Stepper__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "MazV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__("eckd"); +var toPrimitive = __webpack_require__("Tven"); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + + +/***/ }), + +/***/ "MbtP": +/***/ (function(module, exports) { + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; + + +/***/ }), + +/***/ "MbzV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Im6z"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NFPV"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("/iOI"); + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + boxSizing: 'border-box', + flexShrink: 0 + }, + + /* Styles applied to the `div` element that wraps the children. */ + item: { + position: 'relative', + display: 'block', + // In case it's not rendered with a div. + height: '100%', + overflow: 'hidden' + }, + + /* Styles applied to an `img` element child, if needed to ensure it covers the item. */ + imgFullHeight: { + height: '100%', + transform: 'translateX(-50%)', + position: 'relative', + left: '50%' + }, + + /* Styles applied to an `img` element child, if needed to ensure it covers the item. */ + imgFullWidth: { + width: '100%', + position: 'relative', + transform: 'translateY(-50%)', + top: '50%' + } +}; + +var fit = function fit(imgEl, classes) { + if (!imgEl || !imgEl.complete) { + return; + } + + if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) { + var _imgEl$classList, _imgEl$classList2; + + (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + + (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + } else { + var _imgEl$classList3, _imgEl$classList4; + + (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + + (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + } +}; + +function ensureImageCover(imgEl, classes) { + if (!imgEl) { + return; + } + + if (imgEl.complete) { + fit(imgEl, classes); + } else { + imgEl.addEventListener('load', function () { + fit(imgEl, classes); + }); + } +} + +var ImageListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function ImageListItem(props, ref) { + // cols rows default values are for docs only + var children = props.children, + classes = props.classes, + className = props.className, + _props$cols = props.cols, + cols = _props$cols === void 0 ? 1 : _props$cols, + _props$component = props.component, + Component = _props$component === void 0 ? 'li' : _props$component, + _props$rows = props.rows, + rows = _props$rows === void 0 ? 1 : _props$rows, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "cols", "component", "rows"]); + + var imgRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + ensureImageCover(imgRef.current, classes); + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__["default"])(function () { + fit(imgRef.current, classes); + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [classes]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.item + }, react__WEBPACK_IMPORTED_MODULE_3__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child)) { + return null; + } + + if (child.type === 'img' || Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Image'])) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](child, { + ref: imgRef + }); + } + + return child; + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiImageListItem' +})(ImageListItem)); + +/***/ }), + +/***/ "Mf+g": +/***/ (function(module, exports) { + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "Mgsu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/graph-circle.svg` to regenerate; + +function SvgGraphCircle(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M7 16A7 7 0 017 2v7h7a7 7 0 01-7 7zm2-9V0a7 7 0 017 7H9z" + })); +} +var _default = SvgGraphCircle; +exports.default = _default; + +/***/ }), + +/***/ "Mql4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _dsl = __webpack_require__("v2kV"); + +var _useQuery = _interopRequireDefault(__webpack_require__("Q2MS")); + +var _useSafeState3 = _interopRequireDefault(__webpack_require__("ulUA")); + +/** + * Fetches a queryDefinition and run fetchMore on the query until the query is fully loaded + * + * @param {QueryDefinition} queryDefinition - Definition created with Q() + * @param {import("../types").QueryOptions} options - Options created with Q() + * @returns {import("../types").UseQueryReturnValue} + */ +var useQueryAll = function useQueryAll(queryDefinition, options) { + var _useSafeState = (0, _useSafeState3.default)(false), + _useSafeState2 = (0, _slicedToArray2.default)(_useSafeState, 2), + fetching = _useSafeState2[0], + setFetching = _useSafeState2[1]; + + var res = (0, _useQuery.default)(queryDefinition, options); + (0, _react.useEffect)(function () { + var checkToFetchMore = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(res.fetchStatus === 'loaded' && res.hasMore && !fetching)) { + _context.next = 5; + break; + } + + setFetching(true); + _context.next = 4; + return res.fetchMore(); + + case 4: + setFetching(false); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function checkToFetchMore() { + return _ref.apply(this, arguments); + }; + }(); + + checkToFetchMore(); // eslint-disable-next-line react-hooks/exhaustive-deps + }, [res.hasMore, res.fetchStatus, fetching]); + return res; +}; + +var _default = useQueryAll; +exports.default = _default; + +/***/ }), + +/***/ "Mr+I": +/***/ (function(module, exports) { + +module.exports = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + var threwException = false; + if (typeof method === 'function') { + try { + // eslint-disable-next-line max-params + method.call('f', function (_, __, O) { + if (typeof O !== 'object') { + properlyBoxesNonStrict = false; + } + }); + + method.call( + [null], + function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; // eslint-disable-line no-invalid-this + }, + 'x' + ); + } catch (e) { + threwException = true; + } + return !threwException && properlyBoxesNonStrict && properlyBoxesStrict; + } + return false; +}; + + +/***/ }), + +/***/ "MrcW": +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__("ARbH"); +var TAG = __webpack_require__("Yhpl")('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), + +/***/ "Mshc": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__("LRPZ"); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__("lPsH") }); + + +/***/ }), + +/***/ "MvM1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _intents.default; + } +}); +Object.defineProperty(exports, "Intents", { + enumerable: true, + get: function get() { + return _intents.default; + } +}); + +var _intents = _interopRequireDefault(__webpack_require__("u6ow")); + +/***/ }), + +/***/ "MvNj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getDefaultSchema = exports.marks = exports.nodes = void 0; +// taken from a debug of @atlakit/editor/editor-core/create-editor/create-editor +// L139 (new Schema({nodes ,marks})) +// static because the @atlaskit code base requires a real navigator +// TODO: either find and exclude plugins requiring interaction +// or running a JSDOM faking a navigator +var nodes = [['doc', { + content: '(block)+', + marks: 'link' +}], ['paragraph', { + content: 'inline*', + group: 'block', + marks: 'strong code em link strike subsup textColor typeAheadQuery underline', + parseDOM: [{ + tag: 'p' + }] +}], ['text', { + group: 'inline' +}], ['bulletList', { + group: 'block', + content: 'listItem+', + parseDOM: [{ + tag: 'ul' + }] +}], ['orderedList', { + group: 'block', + content: 'listItem+', + parseDOM: [{ + tag: 'ol' + }] +}], ['listItem', { + content: '(paragraph ) (paragraph | bulletList | orderedList )*', + defining: true, + parseDOM: [{ + tag: 'li' + }] +}], ['heading', { + attrs: { + level: { + default: 1 + } + }, + content: 'inline*', + group: 'block', + defining: true, + parseDOM: [{ + tag: 'h1', + attrs: { + level: 1 + } + }, { + tag: 'h2', + attrs: { + level: 2 + } + }, { + tag: 'h3', + attrs: { + level: 3 + } + }, { + tag: 'h4', + attrs: { + level: 4 + } + }, { + tag: 'h5', + attrs: { + level: 5 + } + }, { + tag: 'h6', + attrs: { + level: 6 + } + }] +}], ['blockquote', { + content: 'paragraph+', + group: 'block', + defining: true, + selectable: false, + parseDOM: [{ + tag: 'blockquote' + }] +}], ['rule', { + group: 'block', + parseDOM: [{ + tag: 'hr' + }] +}], ['panel', { + group: 'block', + content: '(paragraph | heading | bulletList | orderedList)+', + attrs: { + panelType: { + default: 'info' + } + }, + parseDOM: [{ + tag: 'div[data-panel-type]' + }] +}], ['confluenceUnsupportedBlock', { + group: 'block', + attrs: { + cxhtml: { + default: null + } + }, + parseDOM: [{ + tag: 'div[data-node-type="confluenceUnsupportedBlock"]' + }] +}], ['confluenceUnsupportedInline', { + group: 'inline', + inline: true, + atom: true, + attrs: { + cxhtml: { + default: null + } + }, + parseDOM: [{ + tag: 'div[data-node-type="confluenceUnsupportedInline"]' + }] +}], ['unsupportedBlock', { + inline: false, + group: 'block', + atom: true, + selectable: true, + attrs: { + originalValue: { + default: {} + } + }, + parseDOM: [{ + tag: '[data-node-type="unsupportedBlock"]' + }] +}], ['unsupportedInline', { + inline: true, + group: 'inline', + selectable: true, + attrs: { + originalValue: { + default: {} + } + }, + parseDOM: [{ + tag: '[data-node-type="unsupportedInline"]' + }] +}], ['hardBreak', { + inline: true, + group: 'inline', + selectable: false, + parseDOM: [{ + tag: 'br' + }] +}], ['table', { + content: 'tableRow+', + attrs: { + isNumberColumnEnabled: { + default: false + }, + layout: { + default: 'default' + }, + __autoSize: { + default: false + } + }, + tableRole: 'table', + isolating: true, + selectable: false, + group: 'block', + parseDOM: [{ + tag: 'table' + }] +}], ['tableHeader', { + content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading )+', + attrs: { + colspan: { + default: 1 + }, + rowspan: { + default: 1 + }, + colwidth: { + default: null + }, + background: { + default: null + } + }, + tableRole: 'header_cell', + isolating: true, + marks: '', + parseDOM: [{ + tag: 'th' + }] +}], ['tableRow', { + content: '(tableCell | tableHeader)+', + tableRole: 'row', + parseDOM: [{ + tag: 'tr' + }] +}], ['tableCell', { + content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | unsupportedBlock)+', + attrs: { + colspan: { + default: 1 + }, + rowspan: { + default: 1 + }, + colwidth: { + default: null + }, + background: { + default: null + } + }, + tableRole: 'cell', + marks: '', + isolating: true, + parseDOM: [{ + tag: '.ak-renderer-table-number-column', + ignore: true + }, { + tag: 'td' + }] +}]]; +exports.nodes = nodes; +var marks = [['link', { + excludes: 'color', + group: 'link', + attrs: { + href: {}, + __confluenceMetadata: { + default: null + } + }, + inclusive: false, + parseDOM: [{ + tag: 'a[href]' + }] +}], ['em', { + inclusive: true, + group: 'fontStyle', + parseDOM: [{ + tag: 'i' + }, { + tag: 'em' + }, { + style: 'font-style=italic' + }] +}], ['strong', { + inclusive: true, + group: 'fontStyle', + parseDOM: [{ + tag: 'strong' + }, { + tag: 'b' + }, { + style: 'font-weight' + }] +}], ['textColor', { + attrs: { + color: {} + }, + inclusive: true, + group: 'color', + parseDOM: [{ + style: 'color' + }] +}], ['strike', { + inclusive: true, + group: 'fontStyle', + parseDOM: [{ + tag: 'strike' + }, { + tag: 's' + }, { + tag: 'del' + }, { + style: 'text-decoration' + }] +}], ['subsup', { + inclusive: true, + group: 'fontStyle', + attrs: { + type: { + default: 'sub' + } + }, + parseDOM: [{ + tag: 'sub', + attrs: { + type: 'sub' + } + }, { + tag: 'sup', + attrs: { + type: 'sup' + } + }] +}], ['underline', { + inclusive: true, + group: 'fontStyle', + parseDOM: [{ + tag: 'u' + }, { + style: 'text-decoration' + }] +}], ['code', { + excludes: 'fontStyle link searchQuery color', + inclusive: true, + parseDOM: [{ + tag: 'span.code', + preserveWhitespace: true + }, { + tag: 'code', + preserveWhitespace: true + }, { + tag: 'tt', + preserveWhitespace: true + }, { + tag: 'span', + preserveWhitespace: true + }] +}], ['typeAheadQuery', { + excludes: 'searchQuery', + inclusive: true, + group: 'searchQuery', + parseDOM: [{ + tag: 'span[data-type-ahead-query]' + }], + attrs: { + trigger: { + default: '' + } + } +}]]; +exports.marks = marks; + +var getDefaultSchema = function getDefaultSchema() { + return { + nodes: nodes, + marks: marks + }; +}; + +exports.getDefaultSchema = getDefaultSchema; + +/***/ }), + +/***/ "Mw38": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsMap = __webpack_require__("+ABJ"), + baseUnary = __webpack_require__("Ijh8"), + nodeUtil = __webpack_require__("7tyZ"); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; + + +/***/ }), + +/***/ "MwOV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subDays; }); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Dsef"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("bKmd"); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("CUab"); + + + +/** + * @name subDays + * @category Day Helpers + * @summary Subtract the specified number of days from the given date. + * + * @description + * Subtract the specified number of days from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the days subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 10 days from 1 September 2014: + * const result = subDays(new Date(2014, 8, 1), 10) + * //=> Fri Aug 22 2014 00:00:00 + */ + +function subDays(dirtyDate, dirtyAmount) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(2, arguments); + var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyAmount); + return Object(_addDays_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyDate, -amount); +} + +/***/ }), + +/***/ "Mx+G": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("06hQ"), + now = __webpack_require__("0gG/"), + toNumber = __webpack_require__("ueJl"); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; + + +/***/ }), + +/***/ "N/CO": +/***/ (function(module, exports) { + +var hex = { + black: '#000', + red: '#c23621', + green: '#25bc26', + yellow: '#bbbb00', + blue: '#492ee1', + magenta: '#d338d3', + cyan: '#33bbc8', + gray: '#808080', + purple: '#708' +}; +function color(fg, isInverse) { + if(isInverse) { + return 'color: #fff; background: '+hex[fg]+';'; + } else { + return 'color: '+hex[fg]+';'; + } +} + +module.exports = color; + + +/***/ }), + +/***/ "NA29": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__("dw92")(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__("Qpz8")(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), + +/***/ "NDDz": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = __webpack_require__("LRPZ"); +var gOPD = __webpack_require__("Yfzq").f; +var anObject = __webpack_require__("eckd"); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + + +/***/ }), + +/***/ "NEcK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontFamily", function() { return fontFamily; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontSize", function() { return fontSize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontStyle", function() { return fontStyle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontWeight", function() { return fontWeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "letterSpacing", function() { return letterSpacing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineHeight", function() { return lineHeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textAlign", function() { return textAlign; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var fontFamily = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'fontFamily', + themeKey: 'typography' +}); +var fontSize = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'fontSize', + themeKey: 'typography' +}); +var fontStyle = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'fontStyle', + themeKey: 'typography' +}); +var fontWeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'fontWeight', + themeKey: 'typography' +}); +var letterSpacing = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'letterSpacing' +}); +var lineHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'lineHeight' +}); +var textAlign = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'textAlign' +}); +var typography = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign); +/* harmony default export */ __webpack_exports__["default"] = (typography); + +/***/ }), + +/***/ "NFPV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return debounce; }); +// Corresponds to 10 frames at 60 Hz. +// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B. +function debounce(func) { + var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166; + var timeout; + + function debounced() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // eslint-disable-next-line consistent-this + var that = this; + + var later = function later() { + func.apply(that, args); + }; + + clearTimeout(timeout); + timeout = setTimeout(later, wait); + } + + debounced.clear = function () { + clearTimeout(timeout); + }; + + return debounced; +} + +/***/ }), + +/***/ "NFku": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("gJ74"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "NHjt": +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__("mOXy"), + baseKeys = __webpack_require__("qzN0"), + isArrayLike = __webpack_require__("yTJ1"); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; + + +/***/ }), + +/***/ "NLnG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return purgeStoredState; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ph6I"); + + + + +function purgeStoredState(config) { + var storage = config.storage; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + return storage.removeItem(storageKey, warnIfRemoveError); +} + +function warnIfRemoveError(err) { + if (err && "production" !== 'production') { + console.error('redux-persist/purgeStoredState: Error purging data stored state', err); + } +} + +/***/ }), + +/***/ "NMJ8": +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), + +/***/ "NMhh": +/***/ (function(module, exports) { + +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; +} + +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "NRdE": +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__("4Soe"); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__("HkU0")(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ "NWak": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasQueryBeenLoaded = exports.isQueryLoading = exports.cancelable = void 0; + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +/** + * @typedef {Promise} CancelablePromise + * @property {Function} cancel - Cancel the promise + */ + +/** + * Wraps a promise so that it can be canceled + * + * Rejects with canceled: true as soon as cancel is called + * + * @param {Promise} promise - Promise + * @returns {CancelablePromise} - Promise with .cancel method + */ +var cancelable = function cancelable(promise) { + var _reject; + + var wrapped = new Promise(function (resolve, reject) { + _reject = reject; + promise.then(resolve); + promise.catch(reject); + }); // @ts-ignore + + wrapped.cancel = function () { + _reject({ + canceled: true + }); + }; + + return wrapped; +}; + +exports.cancelable = cancelable; + +/** + * Returns whether the result of a query (given via queryConnect or Query) + * is loading. + */ +var isQueryLoading = function isQueryLoading(col) { + if (!col) { + _logger.default.warn('isQueryLoading called on falsy value.'); + + return false; + } + + return col.fetchStatus === 'loading' || col.fetchStatus === 'pending'; +}; +/** + * Returns whether a query has been loaded at least once + */ + + +exports.isQueryLoading = isQueryLoading; + +var hasQueryBeenLoaded = function hasQueryBeenLoaded(col) { + return col.lastFetch; +}; + +exports.hasQueryBeenLoaded = hasQueryBeenLoaded; + +/***/ }), + +/***/ "NZQu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CardHeader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rJpz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CardHeader__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "NeVb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iQWc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Fade__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "NhJu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpanStatus", function() { return SpanStatus; }); +/** The status of an Span. + * + * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type + */ +// eslint-disable-next-line import/export +var SpanStatus; (function (SpanStatus) { + /** The operation completed successfully. */ + const Ok = 'ok'; SpanStatus["Ok"] = Ok; + /** Deadline expired before operation could complete. */ + const DeadlineExceeded = 'deadline_exceeded'; SpanStatus["DeadlineExceeded"] = DeadlineExceeded; + /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ + const Unauthenticated = 'unauthenticated'; SpanStatus["Unauthenticated"] = Unauthenticated; + /** 403 Forbidden */ + const PermissionDenied = 'permission_denied'; SpanStatus["PermissionDenied"] = PermissionDenied; + /** 404 Not Found. Some requested entity (file or directory) was not found. */ + const NotFound = 'not_found'; SpanStatus["NotFound"] = NotFound; + /** 429 Too Many Requests */ + const ResourceExhausted = 'resource_exhausted'; SpanStatus["ResourceExhausted"] = ResourceExhausted; + /** Client specified an invalid argument. 4xx. */ + const InvalidArgument = 'invalid_argument'; SpanStatus["InvalidArgument"] = InvalidArgument; + /** 501 Not Implemented */ + const Unimplemented = 'unimplemented'; SpanStatus["Unimplemented"] = Unimplemented; + /** 503 Service Unavailable */ + const Unavailable = 'unavailable'; SpanStatus["Unavailable"] = Unavailable; + /** Other/generic 5xx. */ + const InternalError = 'internal_error'; SpanStatus["InternalError"] = InternalError; + /** Unknown. Any non-standard HTTP status code. */ + const UnknownError = 'unknown_error'; SpanStatus["UnknownError"] = UnknownError; + /** The operation was cancelled (typically by the user). */ + const Cancelled = 'cancelled'; SpanStatus["Cancelled"] = Cancelled; + /** Already exists (409) */ + const AlreadyExists = 'already_exists'; SpanStatus["AlreadyExists"] = AlreadyExists; + /** Operation was rejected because the system is not in a state required for the operation's */ + const FailedPrecondition = 'failed_precondition'; SpanStatus["FailedPrecondition"] = FailedPrecondition; + /** The operation was aborted, typically due to a concurrency issue. */ + const Aborted = 'aborted'; SpanStatus["Aborted"] = Aborted; + /** Operation was attempted past the valid range. */ + const OutOfRange = 'out_of_range'; SpanStatus["OutOfRange"] = OutOfRange; + /** Unrecoverable data loss or corruption */ + const DataLoss = 'data_loss'; SpanStatus["DataLoss"] = DataLoss; +})(SpanStatus || (SpanStatus = {})); + + +//# sourceMappingURL=spanstatus.js.map + + +/***/ }), + +/***/ "Nm31": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + */ + +var ListContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({}); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ListContext); + +/***/ }), + +/***/ "NmSH": +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__("wWEB"); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; + + +/***/ }), + +/***/ "Np9S": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var css_vendor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Ep7C"); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b0ha"); + + + +/** + * Add vendor prefix to a property name when needed. + */ + +function jssVendorPrefixer() { + function onProcessRule(rule) { + if (rule.type === 'keyframes') { + var atRule = rule; + atRule.at = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__["supportedKeyframes"])(atRule.at); + } + } + + function prefixStyle(style) { + for (var prop in style) { + var value = style[prop]; + + if (prop === 'fallbacks' && Array.isArray(value)) { + style[prop] = value.map(prefixStyle); + continue; + } + + var changeProp = false; + var supportedProp = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__["supportedProperty"])(prop); + if (supportedProp && supportedProp !== prop) changeProp = true; + var changeValue = false; + var supportedValue$1 = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__["supportedValue"])(supportedProp, Object(jss__WEBPACK_IMPORTED_MODULE_1__["toCssValue"])(value)); + if (supportedValue$1 && supportedValue$1 !== value) changeValue = true; + + if (changeProp || changeValue) { + if (changeProp) delete style[prop]; + style[supportedProp || prop] = supportedValue$1 || value; + } + } + + return style; + } + + function onProcessStyle(style, rule) { + if (rule.type !== 'style') return style; + return prefixStyle(style); + } + + function onChangeValue(value, prop) { + return Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__["supportedValue"])(prop, Object(jss__WEBPACK_IMPORTED_MODULE_1__["toCssValue"])(value)) || value; + } + + return { + onProcessRule: onProcessRule, + onProcessStyle: onProcessStyle, + onChangeValue: onChangeValue + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (jssVendorPrefixer); + + +/***/ }), + +/***/ "NrmK": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'mindre enn ett sekund', + other: 'mindre enn {{count}} sekunder' + }, + + xSeconds: { + one: 'ett sekund', + other: '{{count}} sekunder' + }, + + halfAMinute: 'et halvt minutt', + + lessThanXMinutes: { + one: 'mindre enn ett minutt', + other: 'mindre enn {{count}} minutter' + }, + + xMinutes: { + one: 'ett minutt', + other: '{{count}} minutter' + }, + + aboutXHours: { + one: 'rundt en time', + other: 'rundt {{count}} timer' + }, + + xHours: { + one: 'en time', + other: '{{count}} timer' + }, + + xDays: { + one: 'en dag', + other: '{{count}} dager' + }, + + aboutXMonths: { + one: 'rundt en måned', + other: 'rundt {{count}} måneder' + }, + + xMonths: { + one: 'en måned', + other: '{{count}} måneder' + }, + + aboutXYears: { + one: 'rundt ett år', + other: 'rundt {{count}} år' + }, + + xYears: { + one: 'ett år', + other: '{{count}} år' + }, + + overXYears: { + one: 'over ett år', + other: 'over {{count}} år' + }, + + almostXYears: { + one: 'nesten ett år', + other: 'nesten {{count}} år' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'om ' + result + } else { + return result + ' siden' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "Ntkm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" +}), 'CheckBox')); + +/***/ }), + +/***/ "Nutn": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("42PH") +var buildFormatLocale = __webpack_require__("wtRR") + +/** + * @category Locales + * @summary Greek locale. + * @author Theodoros Orfanidis [@teoulas]{@link https://github.com/teoulas} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "Nvtw": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "O/3r": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("E8//"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'table-header-group' + } +}; +var tablelvl2 = { + variant: 'head' +}; +var defaultComponent = 'thead'; +var TableHead = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableHead(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? defaultComponent : _props$component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: tablelvl2 + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref, + role: Component === defaultComponent ? null : 'rowgroup' + }, other))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTableHead' +})(TableHead)); + +/***/ }), + +/***/ "O2+V": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useScrollTrigger; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); + + + + +function defaultTrigger(store, options) { + var _options$disableHyste = options.disableHysteresis, + disableHysteresis = _options$disableHyste === void 0 ? false : _options$disableHyste, + _options$threshold = options.threshold, + threshold = _options$threshold === void 0 ? 100 : _options$threshold, + target = options.target; + var previous = store.current; + + if (target) { + // Get vertical scroll + store.current = target.pageYOffset !== undefined ? target.pageYOffset : target.scrollTop; + } + + if (!disableHysteresis && previous !== undefined) { + if (store.current < previous) { + return false; + } + } + + return store.current > threshold; +} + +var defaultTarget = typeof window !== 'undefined' ? window : null; +function useScrollTrigger() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var _options$getTrigger = options.getTrigger, + getTrigger = _options$getTrigger === void 0 ? defaultTrigger : _options$getTrigger, + _options$target = options.target, + target = _options$target === void 0 ? defaultTarget : _options$target, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["getTrigger", "target"]); + + var store = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](function () { + return getTrigger(store, other); + }), + trigger = _React$useState[0], + setTrigger = _React$useState[1]; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + var handleScroll = function handleScroll() { + setTrigger(getTrigger(store, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + target: target + }, other))); + }; + + handleScroll(); // Re-evaluate trigger when dependencies change + + target.addEventListener('scroll', handleScroll); + return function () { + target.removeEventListener('scroll', handleScroll); + }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055 + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [target, getTrigger, JSON.stringify(other)]); + return trigger; +} + +/***/ }), + +/***/ "O44F": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var TERMS_DOCTYPE = 'io.cozy.terms'; +/* TODO Use collection terms */ + +function save(_x, _x2) { + return _save.apply(this, arguments); +} + +function _save() { + _save = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, terms) { + var id, termsAttributes, _yield$client$query, savedTermsDocs, savedTerms, termsToSave, _termsToSave; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + id = terms.id, termsAttributes = (0, _objectWithoutProperties2.default)(terms, ["id"]); + _context.next = 3; + return client.query({ + doctype: TERMS_DOCTYPE, + selector: { + termsId: id, + version: termsAttributes.version + }, + limit: 1 + }); + + case 3: + _yield$client$query = _context.sent; + savedTermsDocs = _yield$client$query.data; + + if (!(savedTermsDocs && savedTermsDocs.length)) { + _context.next = 13; + break; + } + + // we just update the url if this is the same id and same version + // but the url changed + savedTerms = savedTermsDocs[0]; + + if (!(savedTerms.termsId == id && savedTerms.version == termsAttributes.version && savedTerms.url != termsAttributes.url)) { + _context.next = 11; + break; + } + + termsToSave = _objectSpread(_objectSpread({ + _type: TERMS_DOCTYPE + }, savedTerms), {}, { + url: termsAttributes.url + }); + _context.next = 11; + return client.save(termsToSave); + + case 11: + _context.next = 16; + break; + + case 13: + _termsToSave = _objectSpread(_objectSpread({ + _type: TERMS_DOCTYPE + }, termsAttributes), {}, { + termsId: id, + accepted: true, + acceptedAt: new Date() + }); + _context.next = 16; + return client.save(_termsToSave); + + case 16: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + return _save.apply(this, arguments); +} + +var _default = { + save: save +}; +exports.default = _default; + +/***/ }), + +/***/ "O71y": +/***/ (function(module, exports, __webpack_require__) { + +var getPrototypeOf = __webpack_require__("wDGE"); + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "O905": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsMatch = __webpack_require__("mFIo"), + getMatchData = __webpack_require__("8xrp"), + matchesStrictComparable = __webpack_require__("PBFE"); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; + + +/***/ }), + +/***/ "O9UP": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Number', { isInteger: __webpack_require__("9d30") }); + + +/***/ }), + +/***/ "OAwH": +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), + +/***/ "OH/G": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Year Helpers + * @summary Return the start of a year for the given date. + * + * @description + * Return the start of a year for the given date. + * The result will be in the local timezone. + * + * @param {Date|String|Number} date - the original date + * @returns {Date} the start of a year + * + * @example + * // The start of a year for 2 September 2014 11:55:00: + * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) + * //=> Wed Jan 01 2014 00:00:00 + */ +function startOfYear (dirtyDate) { + var cleanDate = parse(dirtyDate) + var date = new Date(0) + date.setFullYear(cleanDate.getFullYear(), 0, 1) + date.setHours(0, 0, 0, 0) + return date +} + +module.exports = startOfYear + + +/***/ }), + +/***/ "OJkG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useFormControl; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _FormControlContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZrPw"); + + +function useFormControl() { + return react__WEBPACK_IMPORTED_MODULE_0__["useContext"](_FormControlContext__WEBPACK_IMPORTED_MODULE_1__["default"]); +} + +/***/ }), + +/***/ "OL02": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsFunction", function() { return whenMapDispatchToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsMissing", function() { return whenMapDispatchToPropsIsMissing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsObject", function() { return whenMapDispatchToPropsIsObject; }); +/* harmony import */ var _utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("09Xu"); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4P2O"); + + +function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsFunc"])(mapDispatchToProps, 'mapDispatchToProps') : undefined; +} +function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return { + dispatch: dispatch + }; + }) : undefined; +} +function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return Object(_utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__["default"])(mapDispatchToProps, dispatch); + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); + +/***/ }), + +/***/ "OQB6": +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__("+ERu"), + last = __webpack_require__("w7+A"), + parent = __webpack_require__("PUad"), + toKey = __webpack_require__("Iv0v"); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; + + +/***/ }), + +/***/ "OTIx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = __webpack_require__("LRPZ"); +var $find = __webpack_require__("7NDg")(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__("pebw")(KEY); + + +/***/ }), + +/***/ "OY/u": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("csMb"); +/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6Wbw"); + + + + +function withStyles(stylesOrCreator, options) { + return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__["withStyles"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__["default"] + }, options)); +} + +/* harmony default export */ __webpack_exports__["default"] = (withStyles); + +/***/ }), + +/***/ "OYXJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__("r0Co"); +var callBind = __webpack_require__("lrTv"); +var callBound = __webpack_require__("KqZw"); +var RequireObjectCoercible = __webpack_require__("YG3o"); + +var implementation = __webpack_require__("7CCE"); +var getPolyfill = __webpack_require__("Lbe8"); +var polyfill = getPolyfill(); +var shim = __webpack_require__("4vqY"); + +var $slice = callBound('Array.prototype.slice'); + +var bound = callBind.apply(polyfill); +// eslint-disable-next-line no-unused-vars +var boundCoercible = function forEach(array, callbackfn) { + RequireObjectCoercible(array); + return bound(array, $slice(arguments, 1)); +}; + +define(boundCoercible, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundCoercible; + + +/***/ }), + +/***/ "Od+F": +/***/ (function(module, exports) { + +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; + + +/***/ }), + +/***/ "OdrC": +/***/ (function(module, exports, __webpack_require__) { + +// helper for String#{startsWith, endsWith, includes} +var isRegExp = __webpack_require__("FYJV"); +var defined = __webpack_require__("etLA"); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + + +/***/ }), + +/***/ "OdwB": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.5 Math.asinh(x) +var $export = __webpack_require__("LRPZ"); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + + +/***/ }), + +/***/ "OedU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_interopRequireWildcard", function() { return _interopRequireWildcard; }); +/** + * Adds a `default` property to CJS modules which aren't the result of transpilation from ESM modules. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param requireResult The result of calling `require` on a module + * @returns Either `requireResult` or a copy of `requireResult` with an added self-referential `default` property + */ +function _interopRequireWildcard(requireResult) { + return requireResult.__esModule ? requireResult : { ...requireResult, default: requireResult }; +} + +// Sucrase version +// function _interopRequireWildcard(obj) { +// if (obj && obj.__esModule) { +// return obj; +// } else { +// var newObj = {}; +// if (obj != null) { +// for (var key in obj) { +// if (Object.prototype.hasOwnProperty.call(obj, key)) { +// newObj[key] = obj[key]; +// } +// } +// } +// newObj.default = obj; +// return newObj; +// } +// } + + +//# sourceMappingURL=_interopRequireWildcard.js.map + + +/***/ }), + +/***/ "OeeG": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.15 Object.preventExtensions(O) +var isObject = __webpack_require__("pFmr"); +var meta = __webpack_require__("h/ey").onFreeze; + +__webpack_require__("80eX")('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "Oh9W": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("VHzf"); + + + + + + + + +var styles = function styles(theme) { + var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900]; + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + flexDirection: 'column', + width: '100%', + boxSizing: 'border-box', + // Prevent padding issue with the Modal and fixed positioned AppBar. + zIndex: theme.zIndex.appBar, + flexShrink: 0 + }, + + /* Styles applied to the root element if `position="fixed"`. */ + positionFixed: { + position: 'fixed', + top: 0, + left: 'auto', + right: 0, + '@media print': { + // Prevent the app bar to be visible on each printed page. + position: 'absolute' + } + }, + + /* Styles applied to the root element if `position="absolute"`. */ + positionAbsolute: { + position: 'absolute', + top: 0, + left: 'auto', + right: 0 + }, + + /* Styles applied to the root element if `position="sticky"`. */ + positionSticky: { + // ⚠️ sticky is not supported by IE 11. + position: 'sticky', + top: 0, + left: 'auto', + right: 0 + }, + + /* Styles applied to the root element if `position="static"`. */ + positionStatic: { + position: 'static' + }, + + /* Styles applied to the root element if `position="relative"`. */ + positionRelative: { + position: 'relative' + }, + + /* Styles applied to the root element if `color="default"`. */ + colorDefault: { + backgroundColor: backgroundColorDefault, + color: theme.palette.getContrastText(backgroundColorDefault) + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + backgroundColor: theme.palette.primary.main, + color: theme.palette.primary.contrastText + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + backgroundColor: theme.palette.secondary.main, + color: theme.palette.secondary.contrastText + }, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit' + }, + + /* Styles applied to the root element if `color="transparent"`. */ + colorTransparent: { + backgroundColor: 'transparent', + color: 'inherit' + } + }; +}; +var AppBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function AppBar(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$position = props.position, + position = _props$position === void 0 ? 'fixed' : _props$position, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "position"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + square: true, + component: "header", + elevation: 4, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["position".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(position))], classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(color))], className, position === 'fixed' && 'mui-fixed'), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiAppBar' +})(AppBar)); + +/***/ }), + +/***/ "OqZc": +/***/ (function(module, exports, __webpack_require__) { + +var compareDesc = __webpack_require__("cozM") +var parse = __webpack_require__("soLG") +var differenceInSeconds = __webpack_require__("oapZ") +var differenceInMonths = __webpack_require__("tGMg") +var enLocale = __webpack_require__("mnDI") + +var MINUTES_IN_DAY = 1440 +var MINUTES_IN_ALMOST_TWO_DAYS = 2520 +var MINUTES_IN_MONTH = 43200 +var MINUTES_IN_TWO_MONTHS = 86400 + +/** + * @category Common Helpers + * @summary Return the distance between the given dates in words. + * + * @description + * Return the distance between the given dates in words. + * + * | Distance between dates | Result | + * |-------------------------------------------------------------------|---------------------| + * | 0 ... 30 secs | less than a minute | + * | 30 secs ... 1 min 30 secs | 1 minute | + * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | + * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | + * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | + * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | + * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | + * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | + * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | + * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | + * | 1 yr ... 1 yr 3 months | about 1 year | + * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | + * | 1 yr 9 months ... 2 yrs | almost 2 years | + * | N yrs ... N yrs 3 months | about N years | + * | N yrs 3 months ... N yrs 9 months | over N years | + * | N yrs 9 months ... N+1 yrs | almost N+1 years | + * + * With `options.includeSeconds == true`: + * | Distance between dates | Result | + * |------------------------|----------------------| + * | 0 secs ... 5 secs | less than 5 seconds | + * | 5 secs ... 10 secs | less than 10 seconds | + * | 10 secs ... 20 secs | less than 20 seconds | + * | 20 secs ... 40 secs | half a minute | + * | 40 secs ... 60 secs | less than a minute | + * | 60 secs ... 90 secs | 1 minute | + * + * @param {Date|String|Number} dateToCompare - the date to compare with + * @param {Date|String|Number} date - the other date + * @param {Object} [options] - the object with options + * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed + * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first + * @param {Object} [options.locale=enLocale] - the locale object + * @returns {String} the distance in words + * + * @example + * // What is the distance between 2 July 2014 and 1 January 2015? + * var result = distanceInWords( + * new Date(2014, 6, 2), + * new Date(2015, 0, 1) + * ) + * //=> '6 months' + * + * @example + * // What is the distance between 1 January 2015 00:00:15 + * // and 1 January 2015 00:00:00, including seconds? + * var result = distanceInWords( + * new Date(2015, 0, 1, 0, 0, 15), + * new Date(2015, 0, 1, 0, 0, 0), + * {includeSeconds: true} + * ) + * //=> 'less than 20 seconds' + * + * @example + * // What is the distance from 1 January 2016 + * // to 1 January 2015, with a suffix? + * var result = distanceInWords( + * new Date(2016, 0, 1), + * new Date(2015, 0, 1), + * {addSuffix: true} + * ) + * //=> 'about 1 year ago' + * + * @example + * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? + * var eoLocale = require('date-fns/locale/eo') + * var result = distanceInWords( + * new Date(2016, 7, 1), + * new Date(2015, 0, 1), + * {locale: eoLocale} + * ) + * //=> 'pli ol 1 jaro' + */ +function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { + var options = dirtyOptions || {} + + var comparison = compareDesc(dirtyDateToCompare, dirtyDate) + + var locale = options.locale + var localize = enLocale.distanceInWords.localize + if (locale && locale.distanceInWords && locale.distanceInWords.localize) { + localize = locale.distanceInWords.localize + } + + var localizeOptions = { + addSuffix: Boolean(options.addSuffix), + comparison: comparison + } + + var dateLeft, dateRight + if (comparison > 0) { + dateLeft = parse(dirtyDateToCompare) + dateRight = parse(dirtyDate) + } else { + dateLeft = parse(dirtyDate) + dateRight = parse(dirtyDateToCompare) + } + + var seconds = differenceInSeconds(dateRight, dateLeft) + var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset() + var minutes = Math.round(seconds / 60) - offset + var months + + // 0 up to 2 mins + if (minutes < 2) { + if (options.includeSeconds) { + if (seconds < 5) { + return localize('lessThanXSeconds', 5, localizeOptions) + } else if (seconds < 10) { + return localize('lessThanXSeconds', 10, localizeOptions) + } else if (seconds < 20) { + return localize('lessThanXSeconds', 20, localizeOptions) + } else if (seconds < 40) { + return localize('halfAMinute', null, localizeOptions) + } else if (seconds < 60) { + return localize('lessThanXMinutes', 1, localizeOptions) + } else { + return localize('xMinutes', 1, localizeOptions) + } + } else { + if (minutes === 0) { + return localize('lessThanXMinutes', 1, localizeOptions) + } else { + return localize('xMinutes', minutes, localizeOptions) + } + } + + // 2 mins up to 0.75 hrs + } else if (minutes < 45) { + return localize('xMinutes', minutes, localizeOptions) + + // 0.75 hrs up to 1.5 hrs + } else if (minutes < 90) { + return localize('aboutXHours', 1, localizeOptions) + + // 1.5 hrs up to 24 hrs + } else if (minutes < MINUTES_IN_DAY) { + var hours = Math.round(minutes / 60) + return localize('aboutXHours', hours, localizeOptions) + + // 1 day up to 1.75 days + } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) { + return localize('xDays', 1, localizeOptions) + + // 1.75 days up to 30 days + } else if (minutes < MINUTES_IN_MONTH) { + var days = Math.round(minutes / MINUTES_IN_DAY) + return localize('xDays', days, localizeOptions) + + // 1 month up to 2 months + } else if (minutes < MINUTES_IN_TWO_MONTHS) { + months = Math.round(minutes / MINUTES_IN_MONTH) + return localize('aboutXMonths', months, localizeOptions) + } + + months = differenceInMonths(dateRight, dateLeft) + + // 2 months up to 12 months + if (months < 12) { + var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH) + return localize('xMonths', nearestMonth, localizeOptions) + + // 1 year up to max Date + } else { + var monthsSinceStartOfYear = months % 12 + var years = Math.floor(months / 12) + + // N years up to 1 years 3 months + if (monthsSinceStartOfYear < 3) { + return localize('aboutXYears', years, localizeOptions) + + // N years 3 months up to N years 9 months + } else if (monthsSinceStartOfYear < 9) { + return localize('overXYears', years, localizeOptions) + + // N years 9 months up to N year 12 months + } else { + return localize('almostXYears', years + 1, localizeOptions) + } + } +} + +module.exports = distanceInWords + + +/***/ }), + +/***/ "OuGR": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscriptionShape", function() { return subscriptionShape; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "storeShape", function() { return storeShape; }); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wdBx"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var subscriptionShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + trySubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + tryUnsubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + notifyNestedSubs: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + isSubscribed: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired +}); +var storeShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + subscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + dispatch: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + getState: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired +}); + +/***/ }), + +/***/ "OvQD": +/***/ (function(module, exports, __webpack_require__) { + +var Hash = __webpack_require__("Tu0e"), + ListCache = __webpack_require__("rZ9V"), + Map = __webpack_require__("8CAL"); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; + + +/***/ }), + +/***/ "Oxgs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistReducer; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ph6I"); +/* harmony import */ var _stateReconciler_autoMergeLevel1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4KdM"); +/* harmony import */ var _createPersistoid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("mpL6"); +/* harmony import */ var _getStoredState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("yoUh"); +/* harmony import */ var _purgeStoredState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("NLnG"); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + +var DEFAULT_TIMEOUT = 5000; +/* + @TODO add validation / handling for: + - persisting a reducer which has nested _persist + - handling actions that fire before reydrate is called +*/ +function persistReducer(config, baseReducer) { + if (false) {} + + var version = config.version !== undefined ? config.version : _constants__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_VERSION"]; + var debug = config.debug || false; + var stateReconciler = config.stateReconciler === undefined ? _stateReconciler_autoMergeLevel1__WEBPACK_IMPORTED_MODULE_1__["default"] : config.stateReconciler; + var getStoredState = config.getStoredState || _getStoredState__WEBPACK_IMPORTED_MODULE_3__["default"]; + var timeout = config.timeout !== undefined ? config.timeout : DEFAULT_TIMEOUT; + var _persistoid = null; + var _purge = false; + var _paused = true; + var conditionalUpdate = function conditionalUpdate(state) { + // update the persistoid only if we are rehydrated and not paused + state._persist.rehydrated && _persistoid && !_paused && _persistoid.update(state); + return state; + }; + + return function (state, action) { + var _ref = state || {}, + _persist = _ref._persist, + rest = _objectWithoutProperties(_ref, ['_persist']); + + var restState = rest; + + if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PERSIST"]) { + var _sealed = false; + var _rehydrate = function _rehydrate(payload, err) { + // dev warning if we are already sealed + if (false) {} + + // only rehydrate if we are not already sealed + if (!_sealed) { + action.rehydrate(config.key, payload, err); + _sealed = true; + } + }; + timeout && setTimeout(function () { + !_sealed && _rehydrate(undefined, new Error('redux-persist: persist timed out for persist key "' + config.key + '"')); + }, timeout); + + // @NOTE PERSIST resumes if paused. + _paused = false; + + // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set + if (!_persistoid) _persistoid = Object(_createPersistoid__WEBPACK_IMPORTED_MODULE_2__["default"])(config); + + // @NOTE PERSIST can be called multiple times, noop after the first + if (_persist) return state; + if (typeof action.rehydrate !== 'function' || typeof action.register !== 'function') throw new Error('redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.'); + + action.register(config.key); + + getStoredState(config).then(function (restoredState) { + var migrate = config.migrate || function (s, v) { + return Promise.resolve(s); + }; + migrate(restoredState, version).then(function (migratedState) { + _rehydrate(migratedState); + }, function (migrateErr) { + if (false) {} + _rehydrate(undefined, migrateErr); + }); + }, function (err) { + _rehydrate(undefined, err); + }); + + return _extends({}, baseReducer(restState, action), { + _persist: { version: version, rehydrated: false } + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PURGE"]) { + _purge = true; + action.result(Object(_purgeStoredState__WEBPACK_IMPORTED_MODULE_4__["default"])(config)); + return _extends({}, baseReducer(restState, action), { + _persist: _persist + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["FLUSH"]) { + action.result(_persistoid && _persistoid.flush()); + return _extends({}, baseReducer(restState, action), { + _persist: _persist + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PAUSE"]) { + _paused = true; + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["REHYDRATE"]) { + // noop on restState if purging + if (_purge) return _extends({}, restState, { + _persist: _extends({}, _persist, { rehydrated: true }) + + // @NOTE if key does not match, will continue to default else below + });if (action.key === config.key) { + var reducedState = baseReducer(restState, action); + var inboundState = action.payload; + // only reconcile state if stateReconciler and inboundState are both defined + var reconciledRest = stateReconciler !== false && inboundState !== undefined ? stateReconciler(inboundState, state, reducedState, config) : reducedState; + + var _newState = _extends({}, reconciledRest, { + _persist: _extends({}, _persist, { rehydrated: true }) + }); + return conditionalUpdate(_newState); + } + } + + // if we have not already handled PERSIST, straight passthrough + if (!_persist) return baseReducer(state, action); + + // run base reducer: + // is state modified ? return original : return updated + var newState = baseReducer(restState, action); + if (newState === restState) return state;else { + newState._persist = _persist; + return conditionalUpdate(newState); + } + }; +} + +/***/ }), + +/***/ "P3Kl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DOCTYPE_PERMISSIONS = exports.DOCTYPE_FILES = exports.REGISTRATION_ABORT = void 0; +var REGISTRATION_ABORT = 'REGISTRATION_ABORT'; +exports.REGISTRATION_ABORT = REGISTRATION_ABORT; +var DOCTYPE_FILES = 'io.cozy.files'; +exports.DOCTYPE_FILES = DOCTYPE_FILES; +var DOCTYPE_PERMISSIONS = 'io.cozy.permissions'; +exports.DOCTYPE_PERMISSIONS = DOCTYPE_PERMISSIONS; + +/***/ }), + +/***/ "P5x0": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in German, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + var months3char = ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'] + var monthsFull = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] + var weekdays2char = ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'] + var weekdays3char = ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'] + var weekdaysFull = ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "P7Gw": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'mindre end et sekund', + other: 'mindre end {{count}} sekunder' + }, + + xSeconds: { + one: '1 sekund', + other: '{{count}} sekunder' + }, + + halfAMinute: 'et halvt minut', + + lessThanXMinutes: { + one: 'mindre end et minut', + other: 'mindre end {{count}} minutter' + }, + + xMinutes: { + one: '1 minut', + other: '{{count}} minutter' + }, + + aboutXHours: { + one: 'cirka 1 time', + other: 'cirka {{count}} timer' + }, + + xHours: { + one: '1 time', + other: '{{count}} timer' + }, + + xDays: { + one: '1 dag', + other: '{{count}} dage' + }, + + aboutXMonths: { + one: 'cirka 1 måned', + other: 'cirka {{count}} måneder' + }, + + xMonths: { + one: '1 måned', + other: '{{count}} måneder' + }, + + aboutXYears: { + one: 'cirka 1 år', + other: 'cirka {{count}} år' + }, + + xYears: { + one: '1 år', + other: '{{count}} år' + }, + + overXYears: { + one: 'over 1 år', + other: 'over {{count}} år' + }, + + almostXYears: { + one: 'næsten 1 år', + other: 'næsten {{count}} år' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'om ' + result + } else { + return result + ' siden' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "P8i0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = __webpack_require__("LRPZ"); +var $find = __webpack_require__("7NDg")(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +__webpack_require__("pebw")(KEY); + + +/***/ }), + +/***/ "PA8a": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var classof = __webpack_require__("MrcW"); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + + +/***/ }), + +/***/ "PBFE": +/***/ (function(module, exports) { + +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; + + +/***/ }), + +/***/ "PFyx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + userSelect: 'none', + width: '1em', + height: '1em', + display: 'inline-block', + fill: 'currentColor', + flexShrink: 0, + fontSize: theme.typography.pxToRem(24), + transition: theme.transitions.create('fill', { + duration: theme.transitions.duration.shorter + }) + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main + }, + + /* Styles applied to the root element if `color="action"`. */ + colorAction: { + color: theme.palette.action.active + }, + + /* Styles applied to the root element if `color="error"`. */ + colorError: { + color: theme.palette.error.main + }, + + /* Styles applied to the root element if `color="disabled"`. */ + colorDisabled: { + color: theme.palette.action.disabled + }, + + /* Styles applied to the root element if `fontSize="inherit"`. */ + fontSizeInherit: { + fontSize: 'inherit' + }, + + /* Styles applied to the root element if `fontSize="small"`. */ + fontSizeSmall: { + fontSize: theme.typography.pxToRem(20) + }, + + /* Styles applied to the root element if `fontSize="large"`. */ + fontSizeLarge: { + fontSize: theme.typography.pxToRem(35) + } + }; +}; +var SvgIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function SvgIcon(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'inherit' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'svg' : _props$component, + _props$fontSize = props.fontSize, + fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize, + htmlColor = props.htmlColor, + titleAccess = props.titleAccess, + _props$viewBox = props.viewBox, + viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, color !== 'inherit' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(color))], fontSize !== 'default' && fontSize !== 'medium' && classes["fontSize".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(fontSize))]), + focusable: "false", + viewBox: viewBox, + color: htmlColor, + "aria-hidden": titleAccess ? undefined : true, + role: titleAccess ? 'img' : undefined, + ref: ref + }, other), children, titleAccess ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("title", null, titleAccess) : null); +}); + false ? undefined : void 0; +SvgIcon.muiName = 'SvgIcon'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiSvgIcon' +})(SvgIcon)); + +/***/ }), + +/***/ "PKCX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _get2 = _interopRequireDefault(__webpack_require__("RNXH")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _HasMany2 = _interopRequireDefault(__webpack_require__("Jm63")); + +var _dsl = __webpack_require__("v2kV"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var TRIGGERS_DOCTYPE = 'io.cozy.triggers'; +/** + * Association used for konnectors to retrieve all their related triggers. + * + * @augments HasMany + */ + +var HasManyTriggers = /*#__PURE__*/function (_HasMany) { + (0, _inherits2.default)(HasManyTriggers, _HasMany); + + var _super = _createSuper(HasManyTriggers); + + function HasManyTriggers() { + (0, _classCallCheck2.default)(this, HasManyTriggers); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(HasManyTriggers, [{ + key: "data", + get: function get() { + var _this = this; + + return (0, _get2.default)((0, _getPrototypeOf2.default)(HasManyTriggers.prototype), "data", this).filter(function (_ref) { + var slug = _ref.slug; + return slug === _this.target.slug; + }); + } + /** + * In this association the query is special, we need to fetch all the triggers + * having for the 'konnector' worker, and then filter them based on their + * `message.konnector` attribute + */ + + }], [{ + key: "query", + value: function query(doc, client) { + return (0, _dsl.Q)(TRIGGERS_DOCTYPE).where({ + worker: 'konnector' + }); + } + }]); + return HasManyTriggers; +}(_HasMany2.default); + +var _default = HasManyTriggers; +exports.default = _default; + +/***/ }), + +/***/ "PKog": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hexToRgb", function() { return hexToRgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbToHex", function() { return rgbToHex; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslToRgb", function() { return hslToRgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decomposeColor", function() { return decomposeColor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recomposeColor", function() { return recomposeColor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContrastRatio", function() { return getContrastRatio; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLuminance", function() { return getLuminance; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emphasize", function() { return emphasize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fade", function() { return fade; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alpha", function() { return alpha; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return darken; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return lighten; }); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rDuK"); + + +/* eslint-disable no-use-before-define */ + +/** + * Returns a number whose value is limited to the given range. + * + * @param {number} value The value to be clamped + * @param {number} min The lower boundary of the output range + * @param {number} max The upper boundary of the output range + * @returns {number} A number in the range [min, max] + */ +function clamp(value) { + var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + + if (false) {} + + return Math.min(Math.max(min, value), max); +} +/** + * Converts a color from CSS hex format to CSS rgb format. + * + * @param {string} color - Hex color, i.e. #nnn or #nnnnnn + * @returns {string} A CSS rgb color string + */ + + +function hexToRgb(color) { + color = color.substr(1); + var re = new RegExp(".{1,".concat(color.length >= 6 ? 2 : 1, "}"), 'g'); + var colors = color.match(re); + + if (colors && colors[0].length === 1) { + colors = colors.map(function (n) { + return n + n; + }); + } + + return colors ? "rgb".concat(colors.length === 4 ? 'a' : '', "(").concat(colors.map(function (n, index) { + return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000; + }).join(', '), ")") : ''; +} + +function intToHex(int) { + var hex = int.toString(16); + return hex.length === 1 ? "0".concat(hex) : hex; +} +/** + * Converts a color from CSS rgb format to CSS hex format. + * + * @param {string} color - RGB color, i.e. rgb(n, n, n) + * @returns {string} A CSS rgb color string, i.e. #nnnnnn + */ + + +function rgbToHex(color) { + // Idempotent + if (color.indexOf('#') === 0) { + return color; + } + + var _decomposeColor = decomposeColor(color), + values = _decomposeColor.values; + + return "#".concat(values.map(function (n) { + return intToHex(n); + }).join('')); +} +/** + * Converts a color from hsl format to rgb format. + * + * @param {string} color - HSL color values + * @returns {string} rgb color values + */ + +function hslToRgb(color) { + color = decomposeColor(color); + var _color = color, + values = _color.values; + var h = values[0]; + var s = values[1] / 100; + var l = values[2] / 100; + var a = s * Math.min(l, 1 - l); + + var f = function f(n) { + var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12; + return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); + }; + + var type = 'rgb'; + var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)]; + + if (color.type === 'hsla') { + type += 'a'; + rgb.push(values[3]); + } + + return recomposeColor({ + type: type, + values: rgb + }); +} +/** + * Returns an object with the type and values of a color. + * + * Note: Does not support rgb % values. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {object} - A MUI color object: {type: string, values: number[]} + */ + +function decomposeColor(color) { + // Idempotent + if (color.type) { + return color; + } + + if (color.charAt(0) === '#') { + return decomposeColor(hexToRgb(color)); + } + + var marker = color.indexOf('('); + var type = color.substring(0, marker); + + if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__["formatMuiErrorMessage"])(3, color)); + } + + var values = color.substring(marker + 1, color.length - 1).split(','); + values = values.map(function (value) { + return parseFloat(value); + }); + return { + type: type, + values: values + }; +} +/** + * Converts a color object with type and values to a string. + * + * @param {object} color - Decomposed color + * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla' + * @param {array} color.values - [n,n,n] or [n,n,n,n] + * @returns {string} A CSS color string + */ + +function recomposeColor(color) { + var type = color.type; + var values = color.values; + + if (type.indexOf('rgb') !== -1) { + // Only convert the first 3 values to int (i.e. not alpha) + values = values.map(function (n, i) { + return i < 3 ? parseInt(n, 10) : n; + }); + } else if (type.indexOf('hsl') !== -1) { + values[1] = "".concat(values[1], "%"); + values[2] = "".concat(values[2], "%"); + } + + return "".concat(type, "(").concat(values.join(', '), ")"); +} +/** + * Calculates the contrast ratio between two colors. + * + * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests + * + * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} A contrast ratio value in the range 0 - 21. + */ + +function getContrastRatio(foreground, background) { + var lumA = getLuminance(foreground); + var lumB = getLuminance(background); + return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); +} +/** + * The relative brightness of any point in a color space, + * normalized to 0 for darkest black and 1 for lightest white. + * + * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @returns {number} The relative brightness of the color in the range 0 - 1 + */ + +function getLuminance(color) { + color = decomposeColor(color); + var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values; + rgb = rgb.map(function (val) { + val /= 255; // normalized + + return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); + }); // Truncate at 3 digits + + return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); +} +/** + * Darken or lighten a color, depending on its luminance. + * Light colors are darkened, dark colors are lightened. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ + +function emphasize(color) { + var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; + return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); +} +var warnedOnce = false; +/** + * Set the absolute transparency of a color. + * Any existing alpha values are overwritten. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} value - value to set the alpha channel to in the range 0 -1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + * + * @deprecated + * Use `import { alpha } from '@material-ui/core/styles'` instead. + */ + +function fade(color, value) { + if (false) {} + + return alpha(color, value); +} +/** + * Set the absolute transparency of a color. + * Any existing alpha value is overwritten. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} value - value to set the alpha channel to in the range 0-1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ + +function alpha(color, value) { + color = decomposeColor(color); + value = clamp(value); + + if (color.type === 'rgb' || color.type === 'hsl') { + color.type += 'a'; + } + + color.values[3] = value; + return recomposeColor(color); +} +/** + * Darkens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ + +function darken(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient); + + if (color.type.indexOf('hsl') !== -1) { + color.values[2] *= 1 - coefficient; + } else if (color.type.indexOf('rgb') !== -1) { + for (var i = 0; i < 3; i += 1) { + color.values[i] *= 1 - coefficient; + } + } + + return recomposeColor(color); +} +/** + * Lightens a color. + * + * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() + * @param {number} coefficient - multiplier in the range 0 - 1 + * @returns {string} A CSS color string. Hex input values are returned as rgb + */ + +function lighten(color, coefficient) { + color = decomposeColor(color); + coefficient = clamp(coefficient); + + if (color.type.indexOf('hsl') !== -1) { + color.values[2] += (100 - color.values[2]) * coefficient; + } else if (color.type.indexOf('rgb') !== -1) { + for (var i = 0; i < 3; i += 1) { + color.values[i] += (255 - color.values[i]) * coefficient; + } + } + + return recomposeColor(color); +} + +/***/ }), + +/***/ "PPEI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Drawer", function() { return Drawer; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("IGOm"); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("k1vQ"); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var _Apps_AppsContent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("m1uh"); +/* harmony import */ var _Settings_SettingsContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("o5KW"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("gc+w"); + + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + +var Drawer = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Drawer, _Component); + + var _super = _createSuper(Drawer); + + function Drawer(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Drawer); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "onDrawerClick", function (event) { + if (event.target === _this.wrapperRef) { + _this.close(); + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "onTransitionEnd", function () { + if (_this.props.visible) { + if (!_this.gesturesHandler) _this.attachGestures(); + + _this.preventBackgroundScrolling(); + } else { + _this.restoreBackgroundScrolling(); + + _this.setState({ + isClosing: false + }); + } + + _this.props.drawerListener(); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "UNSAFE_componentWillReceiveProps", /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(nextProps) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(!_this.props.visible && nextProps.visible)) { + _context.next = 3; + break; + } + + _context.next = 3; + return _this.props.fetchSettingsData(); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "close", function () { + if (_this.state.isClosing) return; + + _this.detachGestures(); + + _this.setState(function () { + return { + isClosing: true + }; + }); + + _this.turnTransitionsOn(); + + _this.props.onClose(); + + _this.asideRef.style.transform = ''; + }); + + _this.state = { + isScrolling: false, + isClosing: false + }; + _this.handleLogout = _this.handleLogout.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Drawer, [{ + key: "componentDidMount", + value: function () { + var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.turnTransitionsOn(); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function componentDidMount() { + return _componentDidMount.apply(this, arguments); + } + + return componentDidMount; + }() + }, { + key: "turnTransitionsOn", + value: function turnTransitionsOn() { + this.asideRef.classList.add('with-transition'); + this.asideRef.addEventListener('transitionend', this.onTransitionEnd); + } + }, { + key: "turnTransitionsOff", + value: function turnTransitionsOff() { + this.asideRef.classList.remove('with-transition'); + this.asideRef.removeEventListener('transitionend', this.onTransitionEnd); + } + }, { + key: "preventBackgroundScrolling", + value: function preventBackgroundScrolling() { + document.body.style.overflow = 'hidden'; + } + }, { + key: "restoreBackgroundScrolling", + value: function restoreBackgroundScrolling() { + document.body.style.overflow = 'auto'; + } + }, { + key: "detachGestures", + value: function detachGestures() { + this.gesturesHandler.destroy(); + this.gesturesHandler = null; + } + }, { + key: "attachGestures", + value: function attachGestures() { + var _this2 = this; + + // IMPORTANT: on Chrome, the `overflow-y: scroll` property on .coz-drawer--apps prevented + // swipe events to be dispatched correctly ; the `touch-action: pan-y` fixes the problem + // see drawer.css + this.gesturesHandler = new hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.Manager(document.documentElement, { + // we listen in all directions so that we can catch panup/pandown events and let the user scroll + recognizers: [[hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.Pan, { + direction: hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.DIRECTION_ALL + }]] + }); // to be completely accurate, `maximumGestureDelta` should be the difference between the right of the aside and the + // left of the page; but using the width is much easier to compute and accurate enough. + + var maximumGestureDistance = this.asideRef.getBoundingClientRect().width; // between 0 and 1, how far down the gesture must be to be considered complete upon release + + var minimumCloseDistance = 0.4; // a gesture faster than this will dismiss the menu, regardless of distance traveled + + var minimumCloseVelocity = 0.2; + var currentGestureProgress = null; + this.gesturesHandler.on('panstart', function (event) { + if (_this2.state.isClosing) return; + + if (event.additionalEvent === 'panup' || event.additionalEvent === 'pandown') { + _this2.setState({ + isScrolling: true + }); + } else { + _this2.turnTransitionsOff(); + + currentGestureProgress = 0; + } + }); + this.gesturesHandler.on('pan', function (e) { + if (_this2.state.isClosing || _this2.state.isScrolling) return; + currentGestureProgress = -e.deltaX / maximumGestureDistance; + + _this2.applyTransformation(currentGestureProgress); + }); + this.gesturesHandler.on('panend', function (e) { + if (_this2.state.isClosing) return; + + if (_this2.state.isScrolling) { + _this2.setState({ + isScrolling: false + }); + + return; + } // Dismiss the menu if the swipe pan was bigger than the treshold, + // or if it was a fast, leftward gesture + + + var haveTravelledFarEnough = -e.deltaX / maximumGestureDistance >= minimumCloseDistance; + var haveTravelledFastEnough = e.velocity < 0 && Math.abs(e.velocity) >= minimumCloseVelocity; + var shouldDismiss = haveTravelledFarEnough || haveTravelledFastEnough; + + if (shouldDismiss) { + _this2.close(); + } else { + _this2.turnTransitionsOn(); + + _this2.applyTransformation(0); + } + }); + } + }, { + key: "applyTransformation", + value: function applyTransformation(progress) { + // constrain between 0 and 1.1 (go a bit further than 1 to be hidden completely) + progress = Math.min(1.1, Math.max(0, progress)); + this.asideRef.style.transform = 'translateX(-' + progress * 100 + '%)'; + } + }, { + key: "handleLogout", + value: function () { + var _handleLogout = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3() { + var _this$props, onLogOut, logOut, res; + + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _this$props = this.props, onLogOut = _this$props.onLogOut, logOut = _this$props.logOut; + + if (!(onLogOut && typeof onLogOut === 'function')) { + _context3.next = 6; + break; + } + + res = onLogOut(); + + if (!(res instanceof Promise)) { + _context3.next = 6; + break; + } + + _context3.next = 6; + return res; + + case 6: + logOut(); + + case 7: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function handleLogout() { + return _handleLogout.apply(this, arguments); + } + + return handleLogout; + }() + }, { + key: "render", + value: function render() { + var _this3 = this; + + var _this$props2 = this.props, + onClaudy = _this$props2.onClaudy, + visible = _this$props2.visible, + isClaudyLoading = _this$props2.isClaudyLoading, + settingsAppURL = _this$props2.settingsAppURL, + storageData = _this$props2.storageData, + isInvertedTheme = _this$props2.isInvertedTheme; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-drawer-wrapper", + onClick: this.onDrawerClick, + "aria-hidden": visible ? 'false' : 'true', + ref: function ref(node) { + _this3.wrapperRef = node; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("aside", { + ref: function ref(node) { + _this3.asideRef = node; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("nav", { + className: "coz-drawer--apps" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps_AppsContent__WEBPACK_IMPORTED_MODULE_13__["default"], { + onAppSwitch: this.close, + isInvertedTheme: isInvertedTheme + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("hr", { + className: "coz-sep-flex" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("nav", { + className: "coz-drawer--settings" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Settings_SettingsContent__WEBPACK_IMPORTED_MODULE_14__["default"], { + onLogOut: this.handleLogout, + storageData: storageData, + settingsAppURL: settingsAppURL, + isClaudyLoading: isClaudyLoading, + onClaudy: onClaudy, + isDrawer: true + })))); + } + }]); + + return Drawer; +}(react__WEBPACK_IMPORTED_MODULE_9__["Component"]); + +Drawer.propTypes = { + visible: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + onClose: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + onClaudy: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]), + isClaudyLoading: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + storageData: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object, + settingsAppURL: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.string, + fetchSettingsData: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + logOut: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func +}; + + +var mapStateToProps = function mapStateToProps(state) { + return { + storageData: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["getStorageData"])(state), + settingsAppURL: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["getSettingsAppURL"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchSettingsData: function fetchSettingsData() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["fetchSettingsData"])()); + }, + logOut: function logOut() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["logOut"])()); + } + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_10__["connect"])(mapStateToProps, mapDispatchToProps)(Drawer)); + +/***/ }), + +/***/ "PPOs": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var sign = __webpack_require__("7bGD"); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + + +/***/ }), + +/***/ "PPrd": +/***/ (function(module, exports, __webpack_require__) { + +var arrayEach = __webpack_require__("e3C4"), + baseEach = __webpack_require__("67e+"), + castFunction = __webpack_require__("nnOI"), + isArray = __webpack_require__("8u9v"); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; + + +/***/ }), + +/***/ "PQBE": +/***/ (function(module) { + +module.exports = JSON.parse("[\"apps\",\"context\"]"); + +/***/ }), + +/***/ "PRYp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addClass; }); +/* harmony import */ var _hasClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CJbV"); + +/** + * Adds a CSS class to a given element. + * + * @param element the element + * @param className the CSS class name + */ + +function addClass(element, className) { + if (element.classList) element.classList.add(className);else if (!Object(_hasClass__WEBPACK_IMPORTED_MODULE_0__["default"])(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className); +} + +/***/ }), + +/***/ "PSw8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ProfileEcogestureAnswerType = exports.EcogestureStepForm = void 0; +var EcogestureStepForm; +exports.EcogestureStepForm = EcogestureStepForm; +(function (EcogestureStepForm) { + EcogestureStepForm[EcogestureStepForm["HEATING_TYPE"] = 0] = "HEATING_TYPE"; + EcogestureStepForm[EcogestureStepForm["WARMING_FLUID"] = 1] = "WARMING_FLUID"; + EcogestureStepForm[EcogestureStepForm["HOT_WATER"] = 2] = "HOT_WATER"; + EcogestureStepForm[EcogestureStepForm["EQUIPMENTS"] = 3] = "EQUIPMENTS"; + EcogestureStepForm[EcogestureStepForm["END"] = 4] = "END"; +})(EcogestureStepForm || (exports.EcogestureStepForm = EcogestureStepForm = {})); +var ProfileEcogestureAnswerType; +exports.ProfileEcogestureAnswerType = ProfileEcogestureAnswerType; +(function (ProfileEcogestureAnswerType) { + ProfileEcogestureAnswerType[ProfileEcogestureAnswerType["SINGLE_CHOICE"] = 0] = "SINGLE_CHOICE"; + ProfileEcogestureAnswerType[ProfileEcogestureAnswerType["MULTI_CHOICE"] = 1] = "MULTI_CHOICE"; +})(ProfileEcogestureAnswerType || (exports.ProfileEcogestureAnswerType = ProfileEcogestureAnswerType = {})); + +/***/ }), + +/***/ "PUad": +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__("+Bmy"), + baseSlice = __webpack_require__("eSMJ"); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; + + +/***/ }), + +/***/ "PV+A": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getBoundT = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _nodePolyglot = _interopRequireDefault(__webpack_require__("pFjr")); + +var _emojiCountry = __webpack_require__("jFsP"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var polyglots = {}; +var langs = ['fr', 'en']; + +for (var _i = 0, _langs = langs; _i < _langs.length; _i++) { + var lang = _langs[_i]; + var locales = {}; + + try { + locales = __webpack_require__("b/Qy")("./".concat(lang, ".json")); + } catch (e) {// eslint-disable-line no-empty-block + } + + var polyglot = new _nodePolyglot.default(); + polyglot.extend(locales); + polyglots[lang] = polyglot; +} +/** + * @param {string} lang - fr, en, etc + * @returns {(label: string, opts?: {country?: string, smart_count?: number}) => string} + */ + + +var getBoundT = function getBoundT(lang) { + var polyglot = polyglots[lang] || polyglots['en']; + var t = polyglot.t.bind(polyglot); + return function (label) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var newOpts = _objectSpread(_objectSpread({}, opts), {}, { + smart_count: (opts === null || opts === void 0 ? void 0 : opts.smart_count) || 1 + }); + + var emojiCountry = (0, _emojiCountry.getEmojiByCountry)(opts === null || opts === void 0 ? void 0 : opts.country, t); + return emojiCountry ? "".concat(t(label, newOpts), " ").concat(emojiCountry) : t(label, newOpts); + }; +}; + +exports.getBoundT = getBoundT; + +/***/ }), + +/***/ "PVZM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNativeFetch", function() { return isNativeFetch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsDOMError", function() { return supportsDOMError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsDOMException", function() { return supportsDOMException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsErrorEvent", function() { return supportsErrorEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsFetch", function() { return supportsFetch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsHistory", function() { return supportsHistory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsNativeFetch", function() { return supportsNativeFetch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsReferrerPolicy", function() { return supportsReferrerPolicy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "supportsReportingObserver", function() { return supportsReportingObserver; }); +/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("loS6"); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7bZ2"); + + + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = Object(_worldwide_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])(); + +/** + * Tells whether current environment supports ErrorEvent objects + * {@link supportsErrorEvent}. + * + * @returns Answer to the given question. + */ +function supportsErrorEvent() { + try { + new ErrorEvent(''); + return true; + } catch (e) { + return false; + } +} + +/** + * Tells whether current environment supports DOMError objects + * {@link supportsDOMError}. + * + * @returns Answer to the given question. + */ +function supportsDOMError() { + try { + // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': + // 1 argument required, but only 0 present. + // @ts-ignore It really needs 1 argument, not 0. + new DOMError(''); + return true; + } catch (e) { + return false; + } +} + +/** + * Tells whether current environment supports DOMException objects + * {@link supportsDOMException}. + * + * @returns Answer to the given question. + */ +function supportsDOMException() { + try { + new DOMException(''); + return true; + } catch (e) { + return false; + } +} + +/** + * Tells whether current environment supports Fetch API + * {@link supportsFetch}. + * + * @returns Answer to the given question. + */ +function supportsFetch() { + if (!('fetch' in WINDOW)) { + return false; + } + + try { + new Headers(); + new Request('http://www.example.com'); + new Response(); + return true; + } catch (e) { + return false; + } +} +/** + * isNativeFetch checks if the given function is a native implementation of fetch() + */ +// eslint-disable-next-line @typescript-eslint/ban-types +function isNativeFetch(func) { + return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); +} + +/** + * Tells whether current environment supports Fetch API natively + * {@link supportsNativeFetch}. + * + * @returns true if `window.fetch` is natively implemented, false otherwise + */ +function supportsNativeFetch() { + if (!supportsFetch()) { + return false; + } + + // Fast path to avoid DOM I/O + // eslint-disable-next-line @typescript-eslint/unbound-method + if (isNativeFetch(WINDOW.fetch)) { + return true; + } + + // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) + // so create a "pure" iframe to see if that has native fetch + let result = false; + const doc = WINDOW.document; + // eslint-disable-next-line deprecation/deprecation + if (doc && typeof (doc.createElement ) === 'function') { + try { + const sandbox = doc.createElement('iframe'); + sandbox.hidden = true; + doc.head.appendChild(sandbox); + if (sandbox.contentWindow && sandbox.contentWindow.fetch) { + // eslint-disable-next-line @typescript-eslint/unbound-method + result = isNativeFetch(sandbox.contentWindow.fetch); + } + doc.head.removeChild(sandbox); + } catch (err) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _logger_js__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); + } + } + + return result; +} + +/** + * Tells whether current environment supports ReportingObserver API + * {@link supportsReportingObserver}. + * + * @returns Answer to the given question. + */ +function supportsReportingObserver() { + return 'ReportingObserver' in WINDOW; +} + +/** + * Tells whether current environment supports Referrer Policy API + * {@link supportsReferrerPolicy}. + * + * @returns Answer to the given question. + */ +function supportsReferrerPolicy() { + // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default' + // (see https://caniuse.com/#feat=referrer-policy), + // it doesn't. And it throws an exception instead of ignoring this parameter... + // REF: https://github.com/getsentry/raven-js/issues/1233 + + if (!supportsFetch()) { + return false; + } + + try { + new Request('_', { + referrerPolicy: 'origin' , + }); + return true; + } catch (e) { + return false; + } +} + +/** + * Tells whether current environment supports History API + * {@link supportsHistory}. + * + * @returns Answer to the given question. + */ +function supportsHistory() { + // NOTE: in Chrome App environment, touching history.pushState, *even inside + // a try/catch block*, will cause Chrome to output an error to console.error + // borrowed from: https://github.com/angular/angular.js/pull/13945/files + /* eslint-disable @typescript-eslint/no-unsafe-member-access */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const chrome = (WINDOW ).chrome; + const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; + /* eslint-enable @typescript-eslint/no-unsafe-member-access */ + const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + + return !isChromePackagedApp && hasHistoryApi; +} + + +//# sourceMappingURL=supports.js.map + + +/***/ }), + +/***/ "PdKc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _microee = _interopRequireDefault(__webpack_require__("GIvT")); + +var _cozyDeviceHelper = __webpack_require__("/K1E"); + +var _logger = _interopRequireDefault(__webpack_require__("o2qs")); + +var _SubscriptionList = _interopRequireDefault(__webpack_require__("q5BW")); + +var _RetryManager = _interopRequireDefault(__webpack_require__("oeo/")); + +var _utils = __webpack_require__("rO7t"); + +var _config = __webpack_require__("+RmU"); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +/** + * Manage the realtime interactions with a cozy stack + */ +var CozyRealtime = /*#__PURE__*/function () { + /** + * @constructor + * @param {object} options + * @param {CozyClient} options.client + */ + function CozyRealtime(options) { + var _this = this; + + (0, _classCallCheck2.default)(this, CozyRealtime); + this.client = (0, _utils.getCozyClientFromOptions)(options); + this.subscriptions = new _SubscriptionList.default(); + this.retryManager = new _RetryManager.default({ + raiseErrorAfterAttempts: _config.raiseErrorAfterAttempts, + timeBeforeSuccessful: _config.timeBeforeSuccessful, + baseWaitAfterFirstFailure: _config.baseWaitAfterFirstFailure, + maxWaitBetweenRetries: _config.maxWaitBetweenRetries + }); + this.retryManager.on('error', function (err) { + return _this.emit('error', err); + }); + this.bindEventHandlers(); + + if ((0, _cozyDeviceHelper.isCordova)() && !(0, _cozyDeviceHelper.hasNetworkInformationPlugin)()) { + _logger.default.warn("This seems a Cordova app and cordova-plugin-network-information doesn't seem to be installed. Please install it from https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/ to support online and offline events."); + } + } + /** + * Starts all handlers and try to connect if online. + * If not online, the connection will take place when receiving + * the `online` event. + * @see onOnline() + * @private + */ + + + (0, _createClass2.default)(CozyRealtime, [{ + key: "start", + value: function start() { + if (!this.isStarted) { + _logger.default.info('started'); + + this.isStarted = true; + this.retryManager.reset(); + this.subscribeGlobalEvents(); + this.subscribeClientEvents(); + this.subscribeCordovaEvents(); + this.emit('start'); + if ((0, _utils.isOnline)()) this.connect(); + } + } + /** + * Creates and attach a WebSocket to the current instance + * + * @private + * @returns {WebSocket} the created websocket + */ + + }, { + key: "createSocket", + value: function createSocket() { + if (this.websocket) { + _logger.default.error('Unexpected replacement of an existing socket, this should not happen. A `revokeWebSocket()` should have been called first inside CozyRealtime'); + + this.revokeWebSocket(); + } + + _logger.default.info('creating a new websocket…'); + + var url = (0, _utils.getUrl)(this.client); + + try { + this.websocket = new WebSocket(url, _utils.doctype); + this.websocket.authenticated = false; + this.websocket.onmessage = this.onWebSocketMessage; + this.websocket.onerror = this.onWebSocketError; + this.websocket.onopen = this.onWebSocketOpen; + this.websocket.onclose = this.onWebSocketClose; + return this.websocket; + } catch (error) { + this.onWebSocketError(error); + } + } + /** + * Connects a new websocket as soon as possible + * @private + */ + + }, { + key: "connect", + value: function () { + var _connect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var _ref, + _ref$immediate, + immediate, + _args = arguments; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref$immediate = _ref.immediate, immediate = _ref$immediate === void 0 ? false : _ref$immediate; + + _logger.default.info('connecting…'); // avoid multiple concurrent calls to connect, keeps the first one + + + if (!this.waitingForConnect) { + _context.next = 7; + break; + } + + _logger.default.debug('Pending reconnection, skipping reconnect'); + + if (immediate) this.retryManager.stopCurrentAttemptWaitingTime(); + _context.next = 17; + break; + + case 7: + _logger.default.debug('No pending reconnection, will reconnect'); + + _context.prev = 8; + this.waitingForConnect = true; + + if (immediate) { + _context.next = 13; + break; + } + + _context.next = 13; + return this.retryManager.waitBeforeNextAttempt(); + + case 13: + this.createSocket(); + + case 14: + _context.prev = 14; + this.waitingForConnect = false; + return _context.finish(14); + + case 17: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[8,, 14, 17]]); + })); + + function connect() { + return _connect.apply(this, arguments); + } + + return connect; + }() + /** + * Throws the previous socket and connect a new one + * @private + */ + + }, { + key: "reconnect", + value: function () { + var _reconnect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var _ref2, + _ref2$immediate, + immediate, + _args2 = arguments; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _ref2 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, _ref2$immediate = _ref2.immediate, immediate = _ref2$immediate === void 0 ? false : _ref2$immediate; + if (this.hasWebSocket()) this.revokeWebSocket(); + this.connect({ + immediate: immediate + }); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function reconnect() { + return _reconnect.apply(this, arguments); + } + + return reconnect; + }() + /** + * Removes all handlers on a websocket to avoid callbacks from an old rejected socket + * @private + */ + + }, { + key: "revokeWebSocket", + value: function revokeWebSocket() { + this.emit('disconnected'); + + if (this.hasWebSocket()) { + _logger.default.info('trashing the previous websocket…'); + + this.websocket.onmessage = null; + this.websocket.onerror = null; + this.websocket.onopen = null; + this.websocket.onclose = null; + + try { + this.websocket.close(); + } catch (e) {// void + } finally { + this.websocket = null; + } + } else { + _logger.default.error('Trying to revoke a websocket that is not attached. This should not happen'); + } + } + /** + * Closes the Realtime + * @private + */ + + }, { + key: "stop", + value: function stop() { + if (this.isStarted) { + _logger.default.info('stopped'); + + this.unsubscribeCordovaEvents(); + this.unsubscribeGlobalEvents(); + this.unsubscribeClientEvents(); + + if (this.hasWebSocket()) { + this.revokeWebSocket(); + } + + this.isStarted = false; + + if (!this.subscriptions.isEmpty()) { + this.unsubscribeAll(); + } + + this.emit('close'); + } + } + /** + * Authenticates to the websocket + * @private + */ + + }, { + key: "authenticate", + value: function authenticate() { + if (this.isWebSocketOpen()) { + var token = (0, _utils.getToken)(this.client); + + _logger.default.debug('authenticate with', token); + + this.sendWebSocketMessage('AUTH', token); + this.websocket.authenticated = true; + } else { + _logger.default.error('Trying to authenticate to a non-opened websocket. This should not happen.', this.websocket, this.websocket && this.websocket.readyState); + } + } + /** + * Sends a message through the websocket + * + * @private + * @param {string} method - like 'AUTH', 'SUBSCRIBE' or 'UNSUBSCRIBE' + * @param {object} payload - message to be sent + */ + + }, { + key: "sendWebSocketMessage", + value: function sendWebSocketMessage(method, payload) { + var message = JSON.stringify({ + method: method, + payload: payload + }); + this.websocket.send(message); + } + /** + * Sends a realtime notification to the server + * + * @param {string} doctype + * @param {string} id + * @param {object} data + */ + + }, { + key: "sendNotification", + value: function () { + var _sendNotification = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(doctype, id, data) { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", this.client.getStackClient().fetchJSON('POST', "/realtime/".concat(doctype, "/").concat(id), { + data: data + })); + + case 1: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function sendNotification(_x, _x2, _x3) { + return _sendNotification.apply(this, arguments); + } + + return sendNotification; + }() + }, { + key: "send", + value: function send() { + if (!this.sendDeprecationNoticeSent) { + this.sendDeprecationNoticeSent = true; + + _logger.default.warn('Deprecation notice: CozyRealtime.send() is deprecated, please use CozyRealtime.sendNotification() from now on'); + } + + return this.sendNotification.apply(this, arguments); + } + /** + * Waits until the socket is ready (and never fail) + */ + + }, { + key: "waitForSocketReady", + value: function () { + var _waitForSocketReady = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { + var _this2 = this; + + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + if (!this.isWebSocketAuthenticated()) { + _context4.next = 2; + break; + } + + return _context4.abrupt("return", true); + + case 2: + return _context4.abrupt("return", new Promise(function (resolve, reject) { + _this2.once('ready', resolve); + + _this2.once('close', reject); + })); + + case 3: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function waitForSocketReady() { + return _waitForSocketReady.apply(this, arguments); + } + + return waitForSocketReady; + }() + /** + * Is there a websocket? + * + * @private + * @returns {boolean} true if there is a websocket (may be not open or not authenticated) + */ + + }, { + key: "hasWebSocket", + value: function hasWebSocket() { + return !!this.websocket; + } + /** + * Is the websocket opened? + * + * @private + * @returns {boolean} true if opened, but may not be authenticated yet + */ + + }, { + key: "isWebSocketOpen", + value: function isWebSocketOpen() { + return !!(this.hasWebSocket() && this.websocket.readyState === WebSocket.OPEN); + } + /** + * Is the websocket ready and authenticated? + * + * @private + * @returns {boolean} true if opened and authenticated + */ + + }, { + key: "isWebSocketAuthenticated", + value: function isWebSocketAuthenticated() { + return !!(this.isWebSocketOpen() && this.websocket.authenticated); + } + /* * * * * * * * * * */ + + /* * SUBSCRIPTIONS * */ + + /* * * * * * * * * * */ + + /** + * Subscribes to an event, type, id + * + * @see `normalizeSubscription()` which describe the special signature + * + * @param {EventName} event + * @param {string} type + * @param {string|undefined|function} id - (or handler is `handler` is undefined) + * @param {function|undefined} handler - (not used if `id` is a function) + */ + + }, { + key: "subscribe", + value: function subscribe(event, type, id, handler) { + this.start(); // start the realtime in case it was stopped + + var sub = this.normalizeSubscription(event, type, id, handler); + var has = this.subscriptions.hasSameTypeAndId(sub); + this.subscriptions.add(sub); // send to the server if there wasn't any subscription with that type & id before + + if (!has && this.isWebSocketAuthenticated()) { + this.sendSubscription(sub.type, sub.id); + } + } + /** + * Unsubscribes to an event, type, id + * + * @see `normalizeSubscription()` which describe the special signature + * + * @param {EventName} event + * @param {string} type + * @param {string|undefined|function} id - (or handler is `handler` is undefined) + * @param {function|undefined} handler - (not used if `id` is a function) + */ + + }, { + key: "unsubscribe", + value: function unsubscribe(event, type, id, handler) { + var sub = this.normalizeSubscription(event, type, id, handler); + this.subscriptions.remove(sub); // if there is no more subscription of this type & id + // then unsubscribe to the server + + var has = this.subscriptions.hasSameTypeAndId(sub); + + if (!has && this.isWebSocketAuthenticated()) { + this.sendUnsubscription(sub.type, sub.id); + } // if this was the last subscription, stop the realtime + + + if (this.subscriptions.isEmpty()) this.stop(); + } + /** + * Unsubscribes to all events + */ + + }, { + key: "unsubscribeAll", + value: function unsubscribeAll() { + var all = this.subscriptions.getAll(); + + var _iterator = _createForOfIteratorHelper(all), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _step.value, + event = _step$value.event, + type = _step$value.type, + id = _step$value.id, + handler = _step$value.handler; + this.unsubscribe(event, type, id, handler); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + /** + * Sends all subscriptions to the current socket + * @private + */ + + }, { + key: "sendSubscriptions", + value: function sendSubscriptions() { + var pairs = this.subscriptions.getAllTypeAndIdPairs(); + + var _iterator2 = _createForOfIteratorHelper(pairs), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _step2$value = _step2.value, + type = _step2$value.type, + id = _step2$value.id; + this.sendSubscription(type, id); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + /** + * Sends subscription to the websocket + * + * @private + * @param {string} type - a doctype to subscribe to + * @param {string} id - optional, a id to subscribe to + */ + + }, { + key: "sendSubscription", + value: function sendSubscription(type, id) { + if (this.isWebSocketOpen()) { + var payload = id ? { + type: type, + id: id + } : { + type: type + }; + + _logger.default.debug('send subscription to', payload.type, payload.id); + + this.sendWebSocketMessage('SUBSCRIBE', payload); + } else { + _logger.default.error('Trying to subscribe on a non-ready socket. This should not happen. Type and id:', type, id); + } + } + /** + * Sends unsubscription to the websocket + * + * @private + * @param {string} type - a doctype to unsubscribe to + * @param {string} id - optional, a id to unsubscribe to + */ + + }, { + key: "sendUnsubscription", + value: function sendUnsubscription(type, id) { + if (this.isWebSocketOpen()) { + var payload = id ? { + type: type, + id: id + } : { + type: type + }; + + _logger.default.debug('send unsubscription to', payload.type, payload.id); + + this.sendWebSocketMessage('UNSUBSCRIBE', payload); + } else { + _logger.default.error('Trying to subscribe on a non-ready socket. This should not happen. Type and id:', type, id); + } + } + /** + * Normalizes a subscription request object + * + * This allows to support the two different signatures possible + * for the subscribe() and the unsubscribe() methods. + * + * One can call subscribe(event, type, id, handler) or + * (event, type, handler) without an id. This method does normalize + * so we can receive { event, type, id, handler } correctly whatever + * the developper uses. + * + * @private + * @param {EventName} event + * @param {string} type + * @param {string|undefined|function} id - (or handler is `handler` is undefined) + * @param {function|undefined} handler - (not used if `id` is a function) + * @returns {Subscription} + */ + + }, { + key: "normalizeSubscription", + value: function normalizeSubscription(event, type, id, handler) { + return { + event: event ? event.toUpperCase() : event, + type: type, + id: handler ? id : null, + handler: handler || id + }; + } + /* * * * * * * */ + + /* * EVENTS * */ + + /* * * * * * * */ + + /** + * Binds event handlers to the current instance + * @private + */ + + }, { + key: "bindEventHandlers", + value: function () { + var _bindEventHandlers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + // websocket + this.onWebSocketMessage = this.onWebSocketMessage.bind(this); + this.onWebSocketError = this.onWebSocketError.bind(this); + this.onWebSocketOpen = this.onWebSocketOpen.bind(this); + this.onWebSocketClose = this.onWebSocketClose.bind(this); // cozy client + + this.onClientLogin = this.onClientLogin.bind(this); + this.onClientTokenRefreshed = this.onClientTokenRefreshed.bind(this); + this.onClientLogout = this.onClientLogout.bind(this); // global events + + this.onOnline = this.onOnline.bind(this); + this.onOffline = this.onOffline.bind(this); + this.onVisibilityChange = this.onVisibilityChange.bind(this); // cordova events + + this.onDeviceReady = this.onDeviceReady.bind(this); + this.onResume = this.onResume.bind(this); + + case 12: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function bindEventHandlers() { + return _bindEventHandlers.apply(this, arguments); + } + + return bindEventHandlers; + }() + /* * * * * * * * * * * * */ + + /* * WebSocket EVENTS * */ + + /* * * * * * * * * * * * */ + + /** + * When receiving a message from the Realtime socket - Invokes subscribed handlers + * + * @private + * @param {object} message + */ + + }, { + key: "onWebSocketMessage", + value: function onWebSocketMessage(message) { + var _JSON$parse = JSON.parse(message.data), + event = _JSON$parse.event, + payload = _JSON$parse.payload; + + _logger.default.info('receive message from server', { + event: event, + payload: payload + }); + + var handlers = this.subscriptions.getAllHandlersForEvent(event, payload.type, payload.id); + + var _iterator3 = _createForOfIteratorHelper(handlers), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var handler = _step3.value; + + try { + handler(payload.doc); + } catch (e) { + _logger.default.error("handler did throw for ".concat(event, ", ").concat(payload.type, ", ").concat(payload.id)); + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + if (event === 'error') { + _logger.default.warn('Stack returned an error', payload); + } + } + /** + * When an error raises in a websocket - reconnects + * @private + */ + + }, { + key: "onWebSocketError", + value: function onWebSocketError(error) { + _logger.default.info('An error was raised on the websocket', error); + + this.retryManager.onFailure(error); + this.reconnect(); + } + /** + * When a websocket manages to get opened - authenticates and subscribes + * @private + */ + + }, { + key: "onWebSocketOpen", + value: function onWebSocketOpen() { + this.retryManager.onSuccess(); + this.authenticate(); + this.sendSubscriptions(); + this.emit('ready'); + } + /** + * When a websocket is closed by something else - reconnects + * @private + */ + + }, { + key: "onWebSocketClose", + value: function onWebSocketClose(event) { + _logger.default.info('The current websocket was closed by a third party', event); + + this.retryManager.onFailure(event); + this.reconnect(); + } + /* * * * * * * * * * * * * */ + + /* * Cozy Client EVENTS * */ + + /* * * * * * * * * * * * * */ + + /** + * Registers event handlers for cozy-client events + * @private + */ + + }, { + key: "subscribeClientEvents", + value: function subscribeClientEvents() { + this.client.on('login', this.onClientLogin); + this.client.on('tokenRefreshed', this.onClientTokenRefreshed); + this.client.on('logout', this.onClientLogout); + } + /** + * Unregisters event handlers for cozy-client events + * @private + */ + + }, { + key: "unsubscribeClientEvents", + value: function unsubscribeClientEvents() { + this.client.removeListener('login', this.onClientLogin); + this.client.removeListener('tokenRefreshed', this.onClientTokenRefreshed); + this.client.removeListener('logout', this.onClientLogout); + } + /** + * When the cozy-client instance successfully login - re-authenticates + * @private + */ + + }, { + key: "onClientLogin", + value: function onClientLogin() { + _logger.default.info('Received login from cozy-client'); + + if (this.isWebSocketOpen()) { + this.authenticate(); // send subscriptions again, permissions may have changed + + this.sendSubscriptions(); + } + } + /** + * When the cozy-client instance refresh its access token - re-authenticates + * @private + */ + + }, { + key: "onClientTokenRefreshed", + value: function onClientTokenRefreshed() { + // The stack doesn't need a reconnection or a reauthentication + // if we already have authenticated correctly. + // We however can't assert that the token sent was not expired. + // If this happenned, we should throw the socket and reconnect. + // Let's do that in all cases, as it won't be frequent anyways. + if (this.hasWebSocket()) { + this.revokeWebSocket(); + } + } + /** + * When the cozy-client instance logs out - throws the socket, don't reconnect yet (no authentication) + * @private + */ + + }, { + key: "onClientLogout", + value: function onClientLogout() { + if (this.hasWebSocket()) { + this.revokeWebSocket(); + } + } + /* * * * * * * * * * * */ + + /* * Cordova EVENTS * */ + + /* * * * * * * * * * * */ + + /** + * Subscribes to cordova events + * @private + */ + + }, { + key: "subscribeCordovaEvents", + value: function subscribeCordovaEvents() { + if ((0, _cozyDeviceHelper.isCordova)()) { + document.addEventListener('deviceready', this.onDeviceReady); + document.addEventListener('resume', this.onResume); + } + } + /** + * Unsubscribes to cordova events + * @private + */ + + }, { + key: "unsubscribeCordovaEvents", + value: function unsubscribeCordovaEvents() { + if ((0, _cozyDeviceHelper.isCordova)()) { + document.removeEventListener('deviceready', this.onDeviceReady); + document.removeEventListener('resume', this.onResume); + } + } + /** + * when the device is ready (for Cordova) + * @private + */ + + }, { + key: "onDeviceReady", + value: function onDeviceReady() { + // online and offline events were not ready + // detach them (should not be needed, but it doesnt' harm + // and we really don't want to attach an event twice + this.unsubscribeGlobalEvents(); + this.subscribeGlobalEvents(); + } + /** + * when the device resumes (for Cordova) + * @see https://cordova.apache.org/docs/en/9.x/cordova/events/events.html#resume + * @private + */ + + }, { + key: "onResume", + value: function onResume() { + this.reconnect({ + immediate: true + }); + } + /* * * * * * * * * * * * * * * */ + + /* * Global (browser) EVENTS * */ + + /* * * * * * * * * * * * * * * */ + + /** + * Subscribes to global events + * @private + */ + + }, { + key: "subscribeGlobalEvents", + value: function subscribeGlobalEvents() { + if (_utils.hasBrowserContext && window.addEventListener) { + window.addEventListener('online', this.onOnline); + window.addEventListener('offline', this.onOffline); + window.addEventListener('visibilitychange', this.onVisibilityChange); + } + } + /** + * Unsubscribes to global events + * @private + */ + + }, { + key: "unsubscribeGlobalEvents", + value: function unsubscribeGlobalEvents() { + if (_utils.hasBrowserContext && window.removeEventListener) { + window.removeEventListener('online', this.onOnline); + window.removeEventListener('offline', this.onOffline); + window.removeEventListener('visibilitychange', this.onVisibilityChange); + } + } + /** + * When going online again - throws the socket and reconnect + * @private + */ + + }, { + key: "onOnline", + value: function onOnline() { + _logger.default.info('reconnect because receiving an online event'); + + this.reconnect({ + immediate: true + }); + } + /** + * When going offline - throws the socket, don't try to reconnect yet + * @private + */ + + }, { + key: "onOffline", + value: function onOffline() { + this.hasWebSocket() && this.revokeWebSocket(); + } + /** + * When the page visibility changes + * @private + */ + + }, { + key: "onVisibilityChange", + value: function onVisibilityChange() { + if (document.visibilityState && document.visibilityState === 'visible') { + // if we have a reconnect waiting, do it immediatly + this.retryManager.stopCurrentAttemptWaitingTime(); + } + } + }]); + return CozyRealtime; +}(); + +_microee.default.mixin(CozyRealtime); + +var _default = CozyRealtime; +exports.default = _default; + +/***/ }), + +/***/ "Pdfj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = __webpack_require__("j2SL"); +var isObject = __webpack_require__("pFmr"); +var toLength = __webpack_require__("yhnj"); +var ctx = __webpack_require__("DnF+"); +var IS_CONCAT_SPREADABLE = __webpack_require__("Yhpl")('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + + +/***/ }), + +/***/ "PpCK": +/***/ (function(module, exports, __webpack_require__) { + +var baseFlatten = __webpack_require__("IcUP"), + baseOrderBy = __webpack_require__("tNpl"), + baseRest = __webpack_require__("Ce+n"), + isIterateeCall = __webpack_require__("7MQn"); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); + +module.exports = sortBy; + + +/***/ }), + +/***/ "PyAS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var createProperty = __webpack_require__("jeSS"); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * __webpack_require__("enc5")(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + + +/***/ }), + +/***/ "Q+Sd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArray; }); +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +/***/ }), + +/***/ "Q+nl": +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__("kTya"), + getSymbolsIn = __webpack_require__("S/72"); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; + + +/***/ }), + +/***/ "Q1cj": +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__("eckd"); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + + +/***/ }), + +/***/ "Q2MS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.useQueries = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _react = __webpack_require__("ivGQ"); + +var _reactRedux = __webpack_require__("rGC1"); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _useClient = _interopRequireDefault(__webpack_require__("CHrb")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +var _context = __webpack_require__("eDV5"); + +var _dsl = __webpack_require__("v2kV"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var useSelector = (0, _reactRedux.createSelectorHook)(_context.clientContext); + +var resolveToValue = function resolveToValue(fnOrValue) { + return typeof fnOrValue === 'function' ? fnOrValue() : fnOrValue; +}; + +var generateFetchMoreQueryDefinition = function generateFetchMoreQueryDefinition(queryResult) { + return queryResult.bookmark ? queryResult.definition.offsetBookmark(queryResult.bookmark) : queryResult.definition.offset(queryResult.data.length); +}; +/** + * Fetches a queryDefinition and returns the queryState + * + * @param {QueryDefinition} queryDefinition - Definition created with Q() + * @param {import("../types").QueryOptions} options - Options created with Q() + * @returns {import("../types").UseQueryReturnValue} + */ + + +var useQuery = function useQuery(queryDefinition, options) { + if (!useSelector) { + throw new Error('You must use react-redux > 7.1.0 to use useQuery (uses useSelector) under the hood'); + } + + if (!queryDefinition) { + _logger.default.warn('Bad query', queryDefinition); + + throw new Error('Bad query'); + } + + var as = options.as, + _options$enabled = options.enabled, + enabled = _options$enabled === void 0 ? true : _options$enabled; // If the query is not enabled, no need to call the queryDefinition + // because sometimes, we can have a getById(null) since we want to + // enabled the query only when the specific id is defined. And since + // Q() can throw error when some checks are KO we don't call Q() if + // enabled is not true + + var definition = enabled ? resolveToValue(queryDefinition) : null; + + if (!as) { + throw new Error('You must specify options.as when using useQuery'); + } + + var client = (0, _useClient.default)(); + var queryState = useSelector(function () { + if (options.singleDocData === undefined && queryDefinition.id) { + _logger.default.warn('useQuery options.singleDocData will pass to true in a next version of cozy-client, please add it now to prevent any problem in the future.'); + } + + return client.getQueryFromState(as, { + hydrated: (0, _get.default)(options, 'hydrated', true), + singleDocData: (0, _get.default)(options, 'singleDocData', false) + }); + }); + (0, _react.useEffect)(function () { + if (enabled === false) { + return; + } + + client.query(definition, options); + }, // eslint-disable-next-line react-hooks/exhaustive-deps + [as, enabled]); + var fetchMore = (0, _react.useCallback)(function () { + var queryState = client.getQueryFromState(as); + return client.query(generateFetchMoreQueryDefinition(queryState), { + as: as + }); + }, [as, client]); + var fetch = (0, _react.useCallback)(function () { + return client.query(definition, options); + }, [client, definition, options]); + return _objectSpread(_objectSpread({}, queryState), {}, { + fetchMore: fetchMore, + fetch: fetch + }); +}; + +var useQueries = function useQueries(querySpecs) { + var res = {}; + + for (var _i = 0, _Object$entries = Object.entries(querySpecs); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), + queryAttrName = _Object$entries$_i[0], + queryOpts = _Object$entries$_i[1]; + + // eslint-disable-next-line + res[queryAttrName] = useQuery(queryOpts.query, queryOpts); + } + + return res; +}; + +exports.useQueries = useQueries; +var _default = useQuery; +exports.default = _default; + +/***/ }), + +/***/ "Q32n": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("y78O"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("IU9S"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("fY06"); + + + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the root element if `underline="none"`. */ + underlineNone: { + textDecoration: 'none' + }, + + /* Styles applied to the root element if `underline="hover"`. */ + underlineHover: { + textDecoration: 'none', + '&:hover': { + textDecoration: 'underline' + } + }, + + /* Styles applied to the root element if `underline="always"`. */ + underlineAlways: { + textDecoration: 'underline' + }, + // Same reset as ButtonBase.root + + /* Styles applied to the root element if `component="button"`. */ + button: { + position: 'relative', + WebkitTapHighlightColor: 'transparent', + backgroundColor: 'transparent', + // Reset default value + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + border: 0, + margin: 0, + // Remove the margin in Safari + borderRadius: 0, + padding: 0, + // Remove the padding in Firefox + cursor: 'pointer', + userSelect: 'none', + verticalAlign: 'middle', + '-moz-appearance': 'none', + // Reset + '-webkit-appearance': 'none', + // Reset + '&::-moz-focus-inner': { + borderStyle: 'none' // Remove Firefox dotted outline. + + }, + '&$focusVisible': { + outline: 'auto' + } + }, + + /* Pseudo-class applied to the root element if the link is keyboard focused. */ + focusVisible: {} +}; +var Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Link(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$component = props.component, + component = _props$component === void 0 ? 'a' : _props$component, + onBlur = props.onBlur, + onFocus = props.onFocus, + TypographyClasses = props.TypographyClasses, + _props$underline = props.underline, + underline = _props$underline === void 0 ? 'hover' : _props$underline, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'inherit' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant"]); + + var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_8__["default"])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + focusVisible = _React$useState[0], + setFocusVisible = _React$useState[1]; + + var handlerRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(ref, focusVisibleRef); + + var handleBlur = function handleBlur(event) { + if (focusVisible) { + onBlurVisible(); + setFocusVisible(false); + } + + if (onBlur) { + onBlur(event); + } + }; + + var handleFocus = function handleFocus(event) { + if (isFocusVisible(event)) { + setFocusVisible(true); + } + + if (onFocus) { + onFocus(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["underline".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__["default"])(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button), + classes: TypographyClasses, + color: color, + component: component, + onBlur: handleBlur, + onFocus: handleFocus, + ref: handlerRef, + variant: variant + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiLink' +})(Link)); + +/***/ }), + +/***/ "Q6Yr": +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__("WSXa"); +var global = __webpack_require__("ETne"); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__("RqGj") ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), + +/***/ "Q6yt": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EGL_YEAR_DOCTYPE = void 0; +var EGL_YEAR_DOCTYPE = 'com.grandlyon.egl.year'; +exports.EGL_YEAR_DOCTYPE = EGL_YEAR_DOCTYPE; + +/***/ }), + +/***/ "Q7kj": +/***/ (function(module, exports) { + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; + + +/***/ }), + +/***/ "Q92J": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"), + root = __webpack_require__("GMq6"); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; + + +/***/ }), + +/***/ "QFLG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _DialogContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("boZ1"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _DialogContent__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QGb3": +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithoutHoles = __webpack_require__("03LE"); + +var iterableToArray = __webpack_require__("T+E/"); + +var unsupportedIterableToArray = __webpack_require__("gbaz"); + +var nonIterableSpread = __webpack_require__("HkQ0"); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "QJIl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasSafariPlugin = exports.hasNetworkInformationPlugin = exports.hasInAppBrowserPlugin = exports.hasDevicePlugin = void 0; + +var _cordova = __webpack_require__("dlno"); + +var hasDevicePlugin = function hasDevicePlugin() { + return (0, _cordova.isCordova)() && window.device !== undefined; +}; + +exports.hasDevicePlugin = hasDevicePlugin; + +var hasInAppBrowserPlugin = function hasInAppBrowserPlugin() { + return (0, _cordova.isCordova)() && window.cordova.InAppBrowser !== undefined; +}; + +exports.hasInAppBrowserPlugin = hasInAppBrowserPlugin; + +var hasSafariPlugin = function hasSafariPlugin() { + return new Promise(function (resolve) { + if (!(0, _cordova.isCordova)() || window.SafariViewController === undefined) { + resolve(false); + return; + } + + window.SafariViewController.isAvailable(function (available) { + return resolve(available); + }); + }); +}; +/** + * Check if the Cordova's cordova-plugin-network-information plugin is installed + * @see https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/ + * @returns {boolean} + */ + + +exports.hasSafariPlugin = hasSafariPlugin; + +var hasNetworkInformationPlugin = function hasNetworkInformationPlugin() { + return (0, _cordova.isCordova)() && window.navigator.connection !== undefined; +}; + +exports.hasNetworkInformationPlugin = hasNetworkInformationPlugin; + +/***/ }), + +/***/ "QJRf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StepButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("afhL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StepButton__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QJcL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV6Instrumentation", function() { return reactRouterV6Instrumentation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withSentryReactRouterV6Routing", function() { return withSentryReactRouterV6Routing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapCreateBrowserRouter", function() { return wrapCreateBrowserRouter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapUseRoutes", function() { return wrapUseRoutes; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); + + + + + +const _jsxFileName = "/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx";// Inspired from Donnie McNeal's solution: + +let activeTransaction; + +let _useEffect; +let _useLocation; +let _useNavigationType; +let _createRoutesFromChildren; +let _matchRoutes; +let _customStartTransaction; +let _startTransactionOnLocationChange; + +const SENTRY_TAGS = { + 'routing.instrumentation': 'react-router-v6', +}; + +function reactRouterV6Instrumentation( + useEffect, + useLocation, + useNavigationType, + createRoutesFromChildren, + matchRoutes, +) { + return ( + customStartTransaction, + startTransactionOnPageLoad = true, + startTransactionOnLocationChange = true, + ) => { + const initPathName = _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"] && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location.pathname; + if (startTransactionOnPageLoad && initPathName) { + activeTransaction = customStartTransaction({ + name: initPathName, + op: 'pageload', + tags: SENTRY_TAGS, + metadata: { + source: 'url', + }, + }); + } + + _useEffect = useEffect; + _useLocation = useLocation; + _useNavigationType = useNavigationType; + _matchRoutes = matchRoutes; + _createRoutesFromChildren = createRoutesFromChildren; + + _customStartTransaction = customStartTransaction; + _startTransactionOnLocationChange = startTransactionOnLocationChange; + }; +} + +function getNormalizedName( + routes, + location, + branches, +) { + if (!routes || routes.length === 0) { + return [location.pathname, 'url']; + } + + let pathBuilder = ''; + if (branches) { + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let x = 0; x < branches.length; x++) { + const branch = branches[x]; + const route = branch.route; + if (route) { + // Early return if index route + if (route.index) { + return [branch.pathname, 'route']; + } + + const path = route.path; + if (path) { + const newPath = path[0] === '/' || pathBuilder[pathBuilder.length - 1] === '/' ? path : `/${path}`; + pathBuilder += newPath; + if (branch.pathname === location.pathname) { + if ( + // If the route defined on the element is something like + // <Route path="/stores/:storeId/products/:productId" element={<div>Product</div>} /> + // We should check against the branch.pathname for the number of / seperators + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(pathBuilder) !== Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getNumberOfUrlSegments"])(branch.pathname) && + // We should not count wildcard operators in the url segments calculation + pathBuilder.slice(-2) !== '/*' + ) { + return [newPath, 'route']; + } + return [pathBuilder, 'route']; + } + } + } + } + } + + return [location.pathname, 'url']; +} + +function updatePageloadTransaction(location, routes, matches) { + const branches = Array.isArray(matches) ? matches : (_matchRoutes(routes, location) ); + + if (activeTransaction && branches) { + activeTransaction.setName(...getNormalizedName(routes, location, branches)); + } +} + +function handleNavigation( + location, + routes, + navigationType, + isBaseLocation, + matches, +) { + if (isBaseLocation) { + if (activeTransaction) { + activeTransaction.finish(); + } + + return; + } + + const branches = Array.isArray(matches) ? matches : _matchRoutes(routes, location); + + if (_startTransactionOnLocationChange && (navigationType === 'PUSH' || navigationType === 'POP') && branches) { + if (activeTransaction) { + activeTransaction.finish(); + } + + const [name, source] = getNormalizedName(routes, location, branches); + activeTransaction = _customStartTransaction({ + name, + op: 'navigation', + tags: SENTRY_TAGS, + metadata: { + source, + }, + }); + } +} + +function withSentryReactRouterV6Routing(Routes) { + if ( + !_useEffect || + !_useLocation || + !_useNavigationType || + !_createRoutesFromChildren || + !_matchRoutes || + !_customStartTransaction + ) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters. + useEffect: ${_useEffect}. useLocation: ${_useLocation}. useNavigationType: ${_useNavigationType}. + createRoutesFromChildren: ${_createRoutesFromChildren}. matchRoutes: ${_matchRoutes}. customStartTransaction: ${_customStartTransaction}.`); + + return Routes; + } + + let isBaseLocation = false; + let routes; + + const SentryRoutes = (props) => { + const location = _useLocation(); + const navigationType = _useNavigationType(); + + _useEffect(() => { + // Performance concern: + // This is repeated when <Routes /> is rendered. + routes = _createRoutesFromChildren(props.children) ; + isBaseLocation = true; + + updatePageloadTransaction(location, routes); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [props.children]); + + _useEffect(() => { + handleNavigation(location, routes, navigationType, isBaseLocation); + }, [props.children, location, navigationType, isBaseLocation]); + + isBaseLocation = false; + + // @ts-ignore Setting more specific React Component typing for `R` generic above + // will break advanced type inference done by react router params + return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(Routes, { ...props, __self: this, __source: {fileName: _jsxFileName, lineNumber: 206}} ); + }; + + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(SentryRoutes, Routes); + + // @ts-ignore Setting more specific React Component typing for `R` generic above + // will break advanced type inference done by react router params + return SentryRoutes; +} + +function wrapUseRoutes(origUseRoutes) { + if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes || !_customStartTransaction) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + 'reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters.', + ); + + return origUseRoutes; + } + + let isBaseLocation = false; + + return (routes, location) => { + const SentryRoutes = (props) => { + const Routes = origUseRoutes(routes, location); + + const locationArgObject = typeof location === 'string' ? { pathname: location } : location; + const locationObject = (locationArgObject ) || _useLocation(); + const navigationType = _useNavigationType(); + + _useEffect(() => { + isBaseLocation = true; + + updatePageloadTransaction(locationObject, routes); + }, [props]); + + _useEffect(() => { + handleNavigation(locationObject, routes, navigationType, isBaseLocation); + }, [props, locationObject, navigationType, isBaseLocation]); + + isBaseLocation = false; + + return Routes; + }; + + return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(SentryRoutes, {__self: this, __source: {fileName: _jsxFileName, lineNumber: 251}} ); + }; +} + +function wrapCreateBrowserRouter(createRouterFunction) { + // `opts` for createBrowserHistory and createMemoryHistory are different, but also not relevant for us at the moment. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function (routes, opts) { + const router = createRouterFunction(routes, opts); + + // The initial load ends when `createBrowserRouter` is called. + // This is the earliest convenient time to update the transaction name. + // Callbacks to `router.subscribe` are not called for the initial load. + if (router.state.historyAction === 'POP' && activeTransaction) { + updatePageloadTransaction(router.state.location, routes); + } + + router.subscribe((state) => { + const location = state.location; + + if ( + _startTransactionOnLocationChange && + (state.historyAction === 'PUSH' || state.historyAction === 'POP') && + activeTransaction + ) { + handleNavigation(location, routes, state.historyAction, false); + } + }); + + return router; + }; +} + + +//# sourceMappingURL=reactrouterv6.js.map + + +/***/ }), + +/***/ "QK3+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("kjpz"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("PKog"); +/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("y78O"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("UPk3"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("9sWd"); +/* harmony import */ var _ValueLabel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("EQre"); + + + + + + + + + + + + + + + + + + + +function asc(a, b) { + return a - b; +} + +function clamp(value, min, max) { + return Math.min(Math.max(min, value), max); +} + +function findClosest(values, currentValue) { + var _values$reduce = values.reduce(function (acc, value, index) { + var distance = Math.abs(currentValue - value); + + if (acc === null || distance < acc.distance || distance === acc.distance) { + return { + distance: distance, + index: index + }; + } + + return acc; + }, null), + closestIndex = _values$reduce.index; + + return closestIndex; +} + +function trackFinger(event, touchId) { + if (touchId.current !== undefined && event.changedTouches) { + for (var i = 0; i < event.changedTouches.length; i += 1) { + var touch = event.changedTouches[i]; + + if (touch.identifier === touchId.current) { + return { + x: touch.clientX, + y: touch.clientY + }; + } + } + + return false; + } + + return { + x: event.clientX, + y: event.clientY + }; +} + +function valueToPercent(value, min, max) { + return (value - min) * 100 / (max - min); +} + +function percentToValue(percent, min, max) { + return (max - min) * percent + min; +} + +function getDecimalPrecision(num) { + // This handles the case when num is very small (0.00000001), js will turn this into 1e-8. + // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine. + if (Math.abs(num) < 1) { + var parts = num.toExponential().split('e-'); + var matissaDecimalPart = parts[0].split('.')[1]; + return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10); + } + + var decimalPart = num.toString().split('.')[1]; + return decimalPart ? decimalPart.length : 0; +} + +function roundValueToStep(value, step, min) { + var nearest = Math.round((value - min) / step) * step + min; + return Number(nearest.toFixed(getDecimalPrecision(step))); +} + +function setValueIndex(_ref) { + var values = _ref.values, + source = _ref.source, + newValue = _ref.newValue, + index = _ref.index; + + // Performance shortcut + if (values[index] === newValue) { + return source; + } + + var output = values.slice(); + output[index] = newValue; + return output; +} + +function focusThumb(_ref2) { + var sliderRef = _ref2.sliderRef, + activeIndex = _ref2.activeIndex, + setActive = _ref2.setActive; + + if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) { + sliderRef.current.querySelector("[role=\"slider\"][data-index=\"".concat(activeIndex, "\"]")).focus(); + } + + if (setActive) { + setActive(activeIndex); + } +} + +var axisProps = { + horizontal: { + offset: function offset(percent) { + return { + left: "".concat(percent, "%") + }; + }, + leap: function leap(percent) { + return { + width: "".concat(percent, "%") + }; + } + }, + 'horizontal-reverse': { + offset: function offset(percent) { + return { + right: "".concat(percent, "%") + }; + }, + leap: function leap(percent) { + return { + width: "".concat(percent, "%") + }; + } + }, + vertical: { + offset: function offset(percent) { + return { + bottom: "".concat(percent, "%") + }; + }, + leap: function leap(percent) { + return { + height: "".concat(percent, "%") + }; + } + } +}; + +var Identity = function Identity(x) { + return x; +}; + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + height: 2, + width: '100%', + boxSizing: 'content-box', + padding: '13px 0', + display: 'inline-block', + position: 'relative', + cursor: 'pointer', + touchAction: 'none', + color: theme.palette.primary.main, + WebkitTapHighlightColor: 'transparent', + '&$disabled': { + pointerEvents: 'none', + cursor: 'default', + color: theme.palette.grey[400] + }, + '&$vertical': { + width: 2, + height: '100%', + padding: '0 13px' + }, + // The primary input mechanism of the device includes a pointing device of limited accuracy. + '@media (pointer: coarse)': { + // Reach 42px touch target, about ~8mm on screen. + padding: '20px 0', + '&$vertical': { + padding: '0 20px' + } + }, + '@media print': { + colorAdjust: 'exact' + } + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: {// TODO v5: move the style here + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main + }, + + /* Styles applied to the root element if `marks` is provided with at least one label. */ + marked: { + marginBottom: 20, + '&$vertical': { + marginBottom: 'auto', + marginRight: 20 + } + }, + + /* Pseudo-class applied to the root element if `orientation="vertical"`. */ + vertical: {}, + + /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the rail element. */ + rail: { + display: 'block', + position: 'absolute', + width: '100%', + height: 2, + borderRadius: 1, + backgroundColor: 'currentColor', + opacity: 0.38, + '$vertical &': { + height: '100%', + width: 2 + } + }, + + /* Styles applied to the track element. */ + track: { + display: 'block', + position: 'absolute', + height: 2, + borderRadius: 1, + backgroundColor: 'currentColor', + '$vertical &': { + width: 2 + } + }, + + /* Styles applied to the track element if `track={false}`. */ + trackFalse: { + '& $track': { + display: 'none' + } + }, + + /* Styles applied to the track element if `track="inverted"`. */ + trackInverted: { + '& $track': { + backgroundColor: // Same logic as the LinearProgress track color + theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["lighten"])(theme.palette.primary.main, 0.62) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["darken"])(theme.palette.primary.main, 0.5) + }, + '& $rail': { + opacity: 1 + } + }, + + /* Styles applied to the thumb element. */ + thumb: { + position: 'absolute', + width: 12, + height: 12, + marginLeft: -6, + marginTop: -5, + boxSizing: 'border-box', + borderRadius: '50%', + outline: 0, + backgroundColor: 'currentColor', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + transition: theme.transitions.create(['box-shadow'], { + duration: theme.transitions.duration.shortest + }), + '&::after': { + position: 'absolute', + content: '""', + borderRadius: '50%', + // reach 42px hit target (2 * 15 + thumb diameter) + left: -15, + top: -15, + right: -15, + bottom: -15 + }, + '&$focusVisible,&:hover': { + boxShadow: "0px 0px 0px 8px ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["alpha"])(theme.palette.primary.main, 0.16)), + '@media (hover: none)': { + boxShadow: 'none' + } + }, + '&$active': { + boxShadow: "0px 0px 0px 14px ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["alpha"])(theme.palette.primary.main, 0.16)) + }, + '&$disabled': { + width: 8, + height: 8, + marginLeft: -4, + marginTop: -3, + '&:hover': { + boxShadow: 'none' + } + }, + '$vertical &': { + marginLeft: -5, + marginBottom: -6 + }, + '$vertical &$disabled': { + marginLeft: -3, + marginBottom: -4 + } + }, + + /* Styles applied to the thumb element if `color="primary"`. */ + thumbColorPrimary: {// TODO v5: move the style here + }, + + /* Styles applied to the thumb element if `color="secondary"`. */ + thumbColorSecondary: { + '&$focusVisible,&:hover': { + boxShadow: "0px 0px 0px 8px ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["alpha"])(theme.palette.secondary.main, 0.16)) + }, + '&$active': { + boxShadow: "0px 0px 0px 14px ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__["alpha"])(theme.palette.secondary.main, 0.16)) + } + }, + + /* Pseudo-class applied to the thumb element if it's active. */ + active: {}, + + /* Pseudo-class applied to the thumb element if keyboard focused. */ + focusVisible: {}, + + /* Styles applied to the thumb label element. */ + valueLabel: { + // IE 11 centering bug, to remove from the customization demos once no longer supported + left: 'calc(-50% - 4px)' + }, + + /* Styles applied to the mark element. */ + mark: { + position: 'absolute', + width: 2, + height: 2, + borderRadius: 1, + backgroundColor: 'currentColor' + }, + + /* Styles applied to the mark element if active (depending on the value). */ + markActive: { + backgroundColor: theme.palette.background.paper, + opacity: 0.8 + }, + + /* Styles applied to the mark label element. */ + markLabel: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, theme.typography.body2, { + color: theme.palette.text.secondary, + position: 'absolute', + top: 26, + transform: 'translateX(-50%)', + whiteSpace: 'nowrap', + '$vertical &': { + top: 'auto', + left: 26, + transform: 'translateY(50%)' + }, + '@media (pointer: coarse)': { + top: 40, + '$vertical &': { + left: 31 + } + } + }), + + /* Styles applied to the mark label element if active (depending on the value). */ + markLabelActive: { + color: theme.palette.text.primary + } + }; +}; +var Slider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function Slider(props, ref) { + var ariaLabel = props['aria-label'], + ariaLabelledby = props['aria-labelledby'], + ariaValuetext = props['aria-valuetext'], + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'span' : _props$component, + defaultValue = props.defaultValue, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + getAriaLabel = props.getAriaLabel, + getAriaValueText = props.getAriaValueText, + _props$marks = props.marks, + marksProp = _props$marks === void 0 ? false : _props$marks, + _props$max = props.max, + max = _props$max === void 0 ? 100 : _props$max, + _props$min = props.min, + min = _props$min === void 0 ? 0 : _props$min, + name = props.name, + onChange = props.onChange, + onChangeCommitted = props.onChangeCommitted, + onMouseDown = props.onMouseDown, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + _props$scale = props.scale, + scale = _props$scale === void 0 ? Identity : _props$scale, + _props$step = props.step, + step = _props$step === void 0 ? 1 : _props$step, + _props$ThumbComponent = props.ThumbComponent, + ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent, + _props$track = props.track, + track = _props$track === void 0 ? 'normal' : _props$track, + valueProp = props.value, + _props$ValueLabelComp = props.ValueLabelComponent, + ValueLabelComponent = _props$ValueLabelComp === void 0 ? _ValueLabel__WEBPACK_IMPORTED_MODULE_17__["default"] : _props$ValueLabelComp, + _props$valueLabelDisp = props.valueLabelDisplay, + valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp, + _props$valueLabelForm = props.valueLabelFormat, + valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__["default"])(); + var touchId = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); // We can't use the :active browser pseudo-classes. + // - The active state isn't triggered when clicking on the rail. + // - The active state isn't transfered when inversing a range slider. + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](-1), + active = _React$useState[0], + setActive = _React$useState[1]; + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](-1), + open = _React$useState2[0], + setOpen = _React$useState2[1]; + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_16__["default"])({ + controlled: valueProp, + default: defaultValue, + name: 'Slider' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_useControlled, 2), + valueDerived = _useControlled2[0], + setValueState = _useControlled2[1]; + + var range = Array.isArray(valueDerived); + var values = range ? valueDerived.slice().sort(asc) : [valueDerived]; + values = values.map(function (value) { + return clamp(value, min, max); + }); + var marks = marksProp === true && step !== null ? Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) { + return { + value: min + step * index + }; + }) : marksProp || []; + + var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__["default"])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; + + var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](-1), + focusVisible = _React$useState3[0], + setFocusVisible = _React$useState3[1]; + + var sliderRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + var handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__["default"])(focusVisibleRef, sliderRef); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__["default"])(ref, handleFocusRef); + var handleFocus = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + var index = Number(event.currentTarget.getAttribute('data-index')); + + if (isFocusVisible(event)) { + setFocusVisible(index); + } + + setOpen(index); + }); + var handleBlur = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function () { + if (focusVisible !== -1) { + setFocusVisible(-1); + onBlurVisible(); + } + + setOpen(-1); + }); + var handleMouseOver = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + var index = Number(event.currentTarget.getAttribute('data-index')); + setOpen(index); + }); + var handleMouseLeave = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function () { + setOpen(-1); + }); + var isRtl = theme.direction === 'rtl'; + var handleKeyDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + var index = Number(event.currentTarget.getAttribute('data-index')); + var value = values[index]; + var tenPercents = (max - min) / 10; + var marksValues = marks.map(function (mark) { + return mark.value; + }); + var marksIndex = marksValues.indexOf(value); + var newValue; + var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight'; + var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft'; + + switch (event.key) { + case 'Home': + newValue = min; + break; + + case 'End': + newValue = max; + break; + + case 'PageUp': + if (step) { + newValue = value + tenPercents; + } + + break; + + case 'PageDown': + if (step) { + newValue = value - tenPercents; + } + + break; + + case increaseKey: + case 'ArrowUp': + if (step) { + newValue = value + step; + } else { + newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1]; + } + + break; + + case decreaseKey: + case 'ArrowDown': + if (step) { + newValue = value - step; + } else { + newValue = marksValues[marksIndex - 1] || marksValues[0]; + } + + break; + + default: + return; + } // Prevent scroll of the page + + + event.preventDefault(); + + if (step) { + newValue = roundValueToStep(newValue, step, min); + } + + newValue = clamp(newValue, min, max); + + if (range) { + var previousValue = newValue; + newValue = setValueIndex({ + values: values, + source: valueDerived, + newValue: newValue, + index: index + }).sort(asc); + focusThumb({ + sliderRef: sliderRef, + activeIndex: newValue.indexOf(previousValue) + }); + } + + setValueState(newValue); + setFocusVisible(index); + + if (onChange) { + onChange(event, newValue); + } + + if (onChangeCommitted) { + onChangeCommitted(event, newValue); + } + }); + var previousIndex = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + var axis = orientation; + + if (isRtl && orientation !== "vertical") { + axis += '-reverse'; + } + + var getFingerNewValue = function getFingerNewValue(_ref3) { + var finger = _ref3.finger, + _ref3$move = _ref3.move, + move = _ref3$move === void 0 ? false : _ref3$move, + values2 = _ref3.values, + source = _ref3.source; + var slider = sliderRef.current; + + var _slider$getBoundingCl = slider.getBoundingClientRect(), + width = _slider$getBoundingCl.width, + height = _slider$getBoundingCl.height, + bottom = _slider$getBoundingCl.bottom, + left = _slider$getBoundingCl.left; + + var percent; + + if (axis.indexOf('vertical') === 0) { + percent = (bottom - finger.y) / height; + } else { + percent = (finger.x - left) / width; + } + + if (axis.indexOf('-reverse') !== -1) { + percent = 1 - percent; + } + + var newValue; + newValue = percentToValue(percent, min, max); + + if (step) { + newValue = roundValueToStep(newValue, step, min); + } else { + var marksValues = marks.map(function (mark) { + return mark.value; + }); + var closestIndex = findClosest(marksValues, newValue); + newValue = marksValues[closestIndex]; + } + + newValue = clamp(newValue, min, max); + var activeIndex = 0; + + if (range) { + if (!move) { + activeIndex = findClosest(values2, newValue); + } else { + activeIndex = previousIndex.current; + } + + var previousValue = newValue; + newValue = setValueIndex({ + values: values2, + source: source, + newValue: newValue, + index: activeIndex + }).sort(asc); + activeIndex = newValue.indexOf(previousValue); + previousIndex.current = activeIndex; + } + + return { + newValue: newValue, + activeIndex: activeIndex + }; + }; + + var handleTouchMove = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + var finger = trackFinger(event, touchId); + + if (!finger) { + return; + } + + var _getFingerNewValue = getFingerNewValue({ + finger: finger, + move: true, + values: values, + source: valueDerived + }), + newValue = _getFingerNewValue.newValue, + activeIndex = _getFingerNewValue.activeIndex; + + focusThumb({ + sliderRef: sliderRef, + activeIndex: activeIndex, + setActive: setActive + }); + setValueState(newValue); + + if (onChange) { + onChange(event, newValue); + } + }); + var handleTouchEnd = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + var finger = trackFinger(event, touchId); + + if (!finger) { + return; + } + + var _getFingerNewValue2 = getFingerNewValue({ + finger: finger, + values: values, + source: valueDerived + }), + newValue = _getFingerNewValue2.newValue; + + setActive(-1); + + if (event.type === 'touchend') { + setOpen(-1); + } + + if (onChangeCommitted) { + onChangeCommitted(event, newValue); + } + + touchId.current = undefined; + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__["default"])(sliderRef.current); + doc.removeEventListener('mousemove', handleTouchMove); + doc.removeEventListener('mouseup', handleTouchEnd); + doc.removeEventListener('touchmove', handleTouchMove); + doc.removeEventListener('touchend', handleTouchEnd); + }); + var handleTouchStart = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + // Workaround as Safari has partial support for touchAction: 'none'. + event.preventDefault(); + var touch = event.changedTouches[0]; + + if (touch != null) { + // A number that uniquely identifies the current finger in the touch session. + touchId.current = touch.identifier; + } + + var finger = trackFinger(event, touchId); + + var _getFingerNewValue3 = getFingerNewValue({ + finger: finger, + values: values, + source: valueDerived + }), + newValue = _getFingerNewValue3.newValue, + activeIndex = _getFingerNewValue3.activeIndex; + + focusThumb({ + sliderRef: sliderRef, + activeIndex: activeIndex, + setActive: setActive + }); + setValueState(newValue); + + if (onChange) { + onChange(event, newValue); + } + + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__["default"])(sliderRef.current); + doc.addEventListener('touchmove', handleTouchMove); + doc.addEventListener('touchend', handleTouchEnd); + }); + react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { + var slider = sliderRef.current; + slider.addEventListener('touchstart', handleTouchStart); + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__["default"])(slider); + return function () { + slider.removeEventListener('touchstart', handleTouchStart); + doc.removeEventListener('mousemove', handleTouchMove); + doc.removeEventListener('mouseup', handleTouchEnd); + doc.removeEventListener('touchmove', handleTouchMove); + doc.removeEventListener('touchend', handleTouchEnd); + }; + }, [handleTouchEnd, handleTouchMove, handleTouchStart]); + var handleMouseDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__["default"])(function (event) { + if (onMouseDown) { + onMouseDown(event); + } + + event.preventDefault(); + var finger = trackFinger(event, touchId); + + var _getFingerNewValue4 = getFingerNewValue({ + finger: finger, + values: values, + source: valueDerived + }), + newValue = _getFingerNewValue4.newValue, + activeIndex = _getFingerNewValue4.activeIndex; + + focusThumb({ + sliderRef: sliderRef, + activeIndex: activeIndex, + setActive: setActive + }); + setValueState(newValue); + + if (onChange) { + onChange(event, newValue); + } + + var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__["default"])(sliderRef.current); + doc.addEventListener('mousemove', handleTouchMove); + doc.addEventListener('mouseup', handleTouchEnd); + }); + var trackOffset = valueToPercent(range ? values[0] : min, min, max); + var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset; + + var trackStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap)); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__["default"])({ + ref: handleRef, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__["default"])(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) { + return mark.label; + }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted), + onMouseDown: handleMouseDown + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { + className: classes.rail + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { + className: classes.track, + style: trackStyle + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("input", { + value: values.join(','), + name: name, + type: "hidden" + }), marks.map(function (mark, index) { + var percent = valueToPercent(mark.value, min, max); + var style = axisProps[axis].offset(percent); + var markActive; + + if (track === false) { + markActive = values.indexOf(mark.value) !== -1; + } else { + markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](react__WEBPACK_IMPORTED_MODULE_4__["Fragment"], { + key: mark.value + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { + style: style, + "data-index": index, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.mark, markActive && classes.markActive) + }), mark.label != null ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { + "aria-hidden": true, + "data-index": index, + style: style, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.markLabel, markActive && classes.markLabelActive) + }, mark.label) : null); + }), values.map(function (value, index) { + var percent = valueToPercent(value, min, max); + var style = axisProps[axis].offset(percent); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](ValueLabelComponent, { + key: index, + valueLabelFormat: valueLabelFormat, + valueLabelDisplay: valueLabelDisplay, + className: classes.valueLabel, + value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat, + index: index, + open: open === index || active === index || valueLabelDisplay === 'on', + disabled: disabled + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](ThumbComponent, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.thumb, classes["thumbColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__["default"])(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible), + tabIndex: disabled ? null : 0, + role: "slider", + style: style, + "data-index": index, + "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel, + "aria-labelledby": ariaLabelledby, + "aria-orientation": orientation, + "aria-valuemax": scale(max), + "aria-valuemin": scale(min), + "aria-valuenow": scale(value), + "aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext, + onKeyDown: handleKeyDown, + onFocus: handleFocus, + onBlur: handleBlur, + onMouseOver: handleMouseOver, + onMouseLeave: handleMouseLeave + })); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiSlider' +})(Slider)); + +/***/ }), + +/***/ "QKaz": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ "QLBk": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__("enc5"); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + + +/***/ }), + +/***/ "QLTc": +/***/ (function(module, exports, __webpack_require__) { + +var baseCreate = __webpack_require__("wfDR"), + getPrototype = __webpack_require__("pgeU"), + isPrototype = __webpack_require__("R+nh"); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; + + +/***/ }), + +/***/ "QP+a": +/***/ (function(module, exports, __webpack_require__) { + +var distanceInWords = __webpack_require__("OqZc") + +/** + * @category Common Helpers + * @summary Return the distance between the given date and now in words. + * + * @description + * Return the distance between the given date and now in words. + * + * | Distance to now | Result | + * |-------------------------------------------------------------------|---------------------| + * | 0 ... 30 secs | less than a minute | + * | 30 secs ... 1 min 30 secs | 1 minute | + * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | + * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | + * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | + * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | + * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | + * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | + * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | + * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | + * | 1 yr ... 1 yr 3 months | about 1 year | + * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | + * | 1 yr 9 months ... 2 yrs | almost 2 years | + * | N yrs ... N yrs 3 months | about N years | + * | N yrs 3 months ... N yrs 9 months | over N years | + * | N yrs 9 months ... N+1 yrs | almost N+1 years | + * + * With `options.includeSeconds == true`: + * | Distance to now | Result | + * |---------------------|----------------------| + * | 0 secs ... 5 secs | less than 5 seconds | + * | 5 secs ... 10 secs | less than 10 seconds | + * | 10 secs ... 20 secs | less than 20 seconds | + * | 20 secs ... 40 secs | half a minute | + * | 40 secs ... 60 secs | less than a minute | + * | 60 secs ... 90 secs | 1 minute | + * + * @param {Date|String|Number} date - the given date + * @param {Object} [options] - the object with options + * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed + * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first + * @param {Object} [options.locale=enLocale] - the locale object + * @returns {String} the distance in words + * + * @example + * // If today is 1 January 2015, what is the distance to 2 July 2014? + * var result = distanceInWordsToNow( + * new Date(2014, 6, 2) + * ) + * //=> '6 months' + * + * @example + * // If now is 1 January 2015 00:00:00, + * // what is the distance to 1 January 2015 00:00:15, including seconds? + * var result = distanceInWordsToNow( + * new Date(2015, 0, 1, 0, 0, 15), + * {includeSeconds: true} + * ) + * //=> 'less than 20 seconds' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 January 2016, with a suffix? + * var result = distanceInWordsToNow( + * new Date(2016, 0, 1), + * {addSuffix: true} + * ) + * //=> 'in about 1 year' + * + * @example + * // If today is 1 January 2015, + * // what is the distance to 1 August 2016 in Esperanto? + * var eoLocale = require('date-fns/locale/eo') + * var result = distanceInWordsToNow( + * new Date(2016, 7, 1), + * {locale: eoLocale} + * ) + * //=> 'pli ol 1 jaro' + */ +function distanceInWordsToNow (dirtyDate, dirtyOptions) { + return distanceInWords(Date.now(), dirtyDate, dirtyOptions) +} + +module.exports = distanceInWordsToNow + + +/***/ }), + +/***/ "QRhp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aKsV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FormLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QTES": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__("GlOB"); +var validate = __webpack_require__("LEB8"); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = __webpack_require__("BjNV")(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + + +/***/ }), + +/***/ "QTPW": +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__("DnF+"); +var call = __webpack_require__("Q1cj"); +var isArrayIter = __webpack_require__("cdPs"); +var anObject = __webpack_require__("eckd"); +var toLength = __webpack_require__("yhnj"); +var getIterFn = __webpack_require__("+IUY"); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), + +/***/ "QV4S": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'по-малко от секунда', + other: 'по-малко от {{count}} секунди' + }, + + xSeconds: { + one: '1 секунда', + other: '{{count}} секунди' + }, + + halfAMinute: 'половин минута', + + lessThanXMinutes: { + one: 'по-малко от минута', + other: 'по-малко от {{count}} минути' + }, + + xMinutes: { + one: '1 минута', + other: '{{count}} минути' + }, + + aboutXHours: { + one: 'около час', + other: 'около {{count}} часа' + }, + + xHours: { + one: '1 час', + other: '{{count}} часа' + }, + + xDays: { + one: '1 ден', + other: '{{count}} дни' + }, + + aboutXMonths: { + one: 'около месец', + other: 'около {{count}} месеца' + }, + + xMonths: { + one: '1 месец', + other: '{{count}} месеца' + }, + + aboutXYears: { + one: 'около година', + other: 'около {{count}} години' + }, + + xYears: { + one: '1 година', + other: '{{count}} години' + }, + + overXYears: { + one: 'над година', + other: 'над {{count}} години' + }, + + almostXYears: { + one: 'почти година', + other: 'почти {{count}} години' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'след ' + result + } else { + return 'преди ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "QXd9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hlA/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Table__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QXzx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9unf"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _useMediaQuery__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QZGM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fetchAggregatesFromDACC = exports.buildAggregateParams = exports.sendMeasureToDACC = exports.checkMeasureParams = exports.isCorrectDateFormat = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _cozyLogger = _interopRequireDefault(__webpack_require__("rUPj")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +/** + * Check whether or not the given date is in YYYY-MM-DD format + * + * @param {string} date - The date to check + * @returns {boolean} + */ +var isCorrectDateFormat = function isCorrectDateFormat(date) { + try { + var parsedDate = new Date(Date.parse(date)); + return !!parsedDate.toISOString().startsWith(date); + } catch (err) { + return false; + } +}; +/** + * Throw an errror if a DACC parameter is incorrect. + * + * @param { import("../types").DACCMeasure} measure - The DACC measure + */ + + +exports.isCorrectDateFormat = isCorrectDateFormat; + +var checkMeasureParams = function checkMeasureParams(measure) { + var createdBy = measure.createdBy, + measureName = measure.measureName, + startDate = measure.startDate, + value = measure.value, + group1 = measure.group1, + group2 = measure.group2, + group3 = measure.group3; + + if (!createdBy || typeof createdBy !== 'string') { + throw new Error('Missing or wrong type parameter: createdBy'); + } + + if (!measureName || typeof measureName !== 'string') { + throw new Error('Missing or wrong type parameter: measureName'); + } + + if (!startDate) { + throw new Error('Missing parameter: startDate'); + } + + if (!isCorrectDateFormat(startDate)) { + throw new Error('Date should be in YYYY-MM-DD format'); + } + + if (typeof value !== 'number') { + throw new Error('Missing or wrong type parameter: value'); + } + + if (group1 && (typeof group1 !== 'object' || Object.keys(group1).length === 0) || group2 && (typeof group2 !== 'object' || Object.keys(group2).length === 0) || group3 && (typeof group3 !== 'object' || Object.keys(group3).length === 0)) { + throw new Error('Groups should be key-value objects'); + } + + if (group3 && (!group2 || !group1) || group2 && !group1) { + throw new Error('Group order must be respected'); + } +}; +/** + * Send measures to a DACC through a remote doctype + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} remoteDoctype - The remote doctype to use + * @param {import("../types").DACCMeasure} measure - The DACC measure + */ + + +exports.checkMeasureParams = checkMeasureParams; + +var sendMeasureToDACC = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, remoteDoctype, measure) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + checkMeasureParams(measure); + _context.next = 4; + return client.getStackClient().fetchJSON('POST', "/remote/".concat(remoteDoctype), { + data: JSON.stringify(measure), + path: 'measure' + }); + + case 4: + _context.next = 10; + break; + + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](0); + (0, _cozyLogger.default)('error', "Error while sending measure to remote doctype: ".concat(_context.t0.message)); + throw _context.t0; + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 6]]); + })); + + return function sendMeasureToDACC(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Build parameters to request DACC aggregate + * + * + * @typedef Params - The unformatted DACC aggregate params + * @property {string} [measureName] - The measure name + * @property {string} [startDate] - The measure start date + * @property {string} [endDate] - The measure end date + * + * @param {Params} params - The unformatted DACC aggregate params + * @returns {import("../types").DACCAggregatesParams} + */ + + +exports.sendMeasureToDACC = sendMeasureToDACC; + +var buildAggregateParams = function buildAggregateParams(params) { + var measureName = params.measureName; + + if (!measureName || typeof measureName !== 'string') { + throw new Error('Missing or wrong type parameter: measureName'); + } + + var startDate = params.startDate || new Date(0).toISOString(); + var endDate = params.endDate || new Date(Date.now()).toISOString(); + + if (!isCorrectDateFormat(startDate) || !isCorrectDateFormat(endDate)) { + (0, _cozyLogger.default)('error', "Date should be in YYYY-MM-DD format but received: startDate: ".concat(startDate, " | endDate: ").concat(endDate)); + throw new Error('Date should be in YYYY-MM-DD format'); + } + + return { + measureName: measureName, + startDate: startDate, + endDate: endDate + }; +}; +/** + * Send measures to a DACC through a remote doctype + * + * @param {CozyClient} client - The CozyClient instance + * @param {string} remoteDoctype - The remote doctype to use + * @param {import("../types").DACCAggregatesParams} params - The request params + * @returns { Promise<import("../types").DACCAggregatesResponse> } + */ + + +exports.buildAggregateParams = buildAggregateParams; + +var fetchAggregatesFromDACC = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, remoteDoctype, params) { + var aggregateParams; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + aggregateParams = buildAggregateParams(params); + _context2.next = 4; + return client.getStackClient().fetchJSON('POST', "/remote/".concat(remoteDoctype), { + data: JSON.stringify(aggregateParams), + path: 'aggregate' + }); + + case 4: + return _context2.abrupt("return", _context2.sent); + + case 7: + _context2.prev = 7; + _context2.t0 = _context2["catch"](0); + (0, _cozyLogger.default)('error', "Error while fetching aggregates to remote doctype: ".concat(_context2.t0.message)); + throw _context2.t0; + + case 11: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[0, 7]]); + })); + + return function fetchAggregatesFromDACC(_x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; +}(); + +exports.fetchAggregatesFromDACC = fetchAggregatesFromDACC; + +/***/ }), + +/***/ "Qcxn": +/***/ (function(module, exports, __webpack_require__) { + +var LazyWrapper = __webpack_require__("czPI"), + LodashWrapper = __webpack_require__("e9eL"), + copyArray = __webpack_require__("MbtP"); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; + + +/***/ }), + +/***/ "QdZa": +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), + +/***/ "QdgZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__("ETne"); +var has = __webpack_require__("00OQ"); +var DESCRIPTORS = __webpack_require__("WXXH"); +var $export = __webpack_require__("LRPZ"); +var redefine = __webpack_require__("iNsi"); +var META = __webpack_require__("h/ey").KEY; +var $fails = __webpack_require__("enc5"); +var shared = __webpack_require__("Q6Yr"); +var setToStringTag = __webpack_require__("YoKN"); +var uid = __webpack_require__("Jz0u"); +var wks = __webpack_require__("Yhpl"); +var wksExt = __webpack_require__("QtKs"); +var wksDefine = __webpack_require__("xomR"); +var enumKeys = __webpack_require__("o3Qw"); +var isArray = __webpack_require__("j2SL"); +var anObject = __webpack_require__("eckd"); +var isObject = __webpack_require__("pFmr"); +var toObject = __webpack_require__("05TQ"); +var toIObject = __webpack_require__("764U"); +var toPrimitive = __webpack_require__("Tven"); +var createDesc = __webpack_require__("nVWS"); +var _create = __webpack_require__("7wnO"); +var gOPNExt = __webpack_require__("ku/n"); +var $GOPD = __webpack_require__("Yfzq"); +var $GOPS = __webpack_require__("9xp8"); +var $DP = __webpack_require__("GwHQ"); +var $keys = __webpack_require__("FFxP"); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__("qeDk").f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__("AJH6").f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__("RqGj")) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__("XyXA")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), + +/***/ "QfaY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("ETne"); +var DESCRIPTORS = __webpack_require__("WXXH"); +var LIBRARY = __webpack_require__("RqGj"); +var $typed = __webpack_require__("Yivq"); +var hide = __webpack_require__("XyXA"); +var redefineAll = __webpack_require__("UDoN"); +var fails = __webpack_require__("enc5"); +var anInstance = __webpack_require__("/Ytg"); +var toInteger = __webpack_require__("HzFX"); +var toLength = __webpack_require__("yhnj"); +var toIndex = __webpack_require__("LcW+"); +var gOPN = __webpack_require__("qeDk").f; +var dP = __webpack_require__("GwHQ").f; +var arrayFill = __webpack_require__("Axkr"); +var setToStringTag = __webpack_require__("YoKN"); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + + +/***/ }), + +/***/ "QhNL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FWjy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ClickAwayListener__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "QiYU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpContext", function() { return HttpContext; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("uDQB"); + + + +/** HttpContext integration collects information about HTTP request headers */ +class HttpContext {constructor() { HttpContext.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'HttpContext';} + + /** + * @inheritDoc + */ + __init() {this.name = HttpContext.id;} + + /** + * @inheritDoc + */ + setupOnce() { + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"])((event) => { + if (Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getIntegration(HttpContext)) { + // if none of the information we want exists, don't bother + if (!_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].navigator && !_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location && !_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].document) { + return event; + } + + // grab as much info as exists and add it to the event + const url = (event.request && event.request.url) || (_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location && _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.href); + const { referrer } = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].document || {}; + const { userAgent } = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].navigator || {}; + + const headers = { + ...(event.request && event.request.headers), + ...(referrer && { Referer: referrer }), + ...(userAgent && { 'User-Agent': userAgent }), + }; + const request = { ...(url && { url }), headers }; + + return { ...event, request }; + } + return event; + }); + } +} HttpContext.__initStatic(); + + +//# sourceMappingURL=httpcontext.js.map + + +/***/ }), + +/***/ "QlLD": +/***/ (function(module, exports, __webpack_require__) { + +var baseHasIn = __webpack_require__("zpyt"), + hasPath = __webpack_require__("AdZl"); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; + + +/***/ }), + +/***/ "Qpz8": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__("RqGj"); +var $export = __webpack_require__("LRPZ"); +var redefine = __webpack_require__("iNsi"); +var hide = __webpack_require__("XyXA"); +var Iterators = __webpack_require__("Ikrg"); +var $iterCreate = __webpack_require__("XF0z"); +var setToStringTag = __webpack_require__("YoKN"); +var getPrototypeOf = __webpack_require__("EjI+"); +var ITERATOR = __webpack_require__("Yhpl")('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), + +/***/ "Qq+Z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearCachedFetchImplementation", function() { return clearCachedFetchImplementation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNativeFetchImplementation", function() { return getNativeFetchImplementation; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("uDQB"); + + + +let cachedFetchImpl = undefined; + +/** + * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers. + * Whenever someone wraps the Fetch API and returns the wrong promise chain, + * this chain becomes orphaned and there is no possible way to capture it's rejections + * other than allowing it bubble up to this very handler. eg. + * + * const f = window.fetch; + * window.fetch = function () { + * const p = f.apply(this, arguments); + * + * p.then(function() { + * console.log('hi.'); + * }); + * + * return p; + * } + * + * `p.then(function () { ... })` is producing a completely separate promise chain, + * however, what's returned is `p` - the result of original `fetch` call. + * + * This mean, that whenever we use the Fetch API to send our own requests, _and_ + * some ad-blocker blocks it, this orphaned chain will _always_ reject, + * effectively causing another event to be captured. + * This makes a whole process become an infinite loop, which we need to somehow + * deal with, and break it in one way or another. + * + * To deal with this issue, we are making sure that we _always_ use the real + * browser Fetch API, instead of relying on what `window.fetch` exposes. + * The only downside to this would be missing our own requests as breadcrumbs, + * but because we are already not doing this, it should be just fine. + * + * Possible failed fetch error messages per-browser: + * + * Chrome: Failed to fetch + * Edge: Failed to Fetch + * Firefox: NetworkError when attempting to fetch resource + * Safari: resource blocked by content blocker + */ +function getNativeFetchImplementation() { + if (cachedFetchImpl) { + return cachedFetchImpl; + } + + /* eslint-disable @typescript-eslint/unbound-method */ + + // Fast path to avoid DOM I/O + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isNativeFetch"])(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].fetch)) { + return (cachedFetchImpl = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].fetch.bind(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"])); + } + + const document = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].document; + let fetchImpl = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].fetch; + // eslint-disable-next-line deprecation/deprecation + if (document && typeof document.createElement === 'function') { + try { + const sandbox = document.createElement('iframe'); + sandbox.hidden = true; + document.head.appendChild(sandbox); + const contentWindow = sandbox.contentWindow; + if (contentWindow && contentWindow.fetch) { + fetchImpl = contentWindow.fetch; + } + document.head.removeChild(sandbox); + } catch (e) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e); + } + } + + return (cachedFetchImpl = fetchImpl.bind(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"])); + /* eslint-enable @typescript-eslint/unbound-method */ +} + +/** Clears cached fetch impl */ +function clearCachedFetchImplementation() { + cachedFetchImpl = undefined; +} + + +//# sourceMappingURL=utils.js.map + + +/***/ }), + +/***/ "QtKs": +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__("Yhpl"); + + +/***/ }), + +/***/ "Quq9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var lime = { + 50: '#f9fbe7', + 100: '#f0f4c3', + 200: '#e6ee9c', + 300: '#dce775', + 400: '#d4e157', + 500: '#cddc39', + 600: '#c0ca33', + 700: '#afb42b', + 800: '#9e9d24', + 900: '#827717', + A100: '#f4ff81', + A200: '#eeff41', + A400: '#c6ff00', + A700: '#aeea00' +}; +/* harmony default export */ __webpack_exports__["default"] = (lime); + +/***/ }), + +/***/ "QvV2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isRegExp = __webpack_require__("FYJV"); +var anObject = __webpack_require__("eckd"); +var speciesConstructor = __webpack_require__("iyRu"); +var advanceStringIndex = __webpack_require__("mNB+"); +var toLength = __webpack_require__("yhnj"); +var callRegExpExec = __webpack_require__("PA8a"); +var regexpExec = __webpack_require__("Cf+5"); +var fails = __webpack_require__("enc5"); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +__webpack_require__("dRmG")('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + + +/***/ }), + +/***/ "Qvly": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warning; }); +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + +} + +/***/ }), + +/***/ "Qw2K": +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__("RLfQ"); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; + + +/***/ }), + +/***/ "R+nh": +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; + + +/***/ }), + +/***/ "R/Up": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createStyles; }); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("csMb"); + // let warnOnce = false; +// To remove in v5 + +function createStyles(styles) { + // warning( + // warnOnce, + // [ + // 'Material-UI: createStyles from @material-ui/core/styles is deprecated.', + // 'Please use @material-ui/styles/createStyles', + // ].join('\n'), + // ); + // warnOnce = true; + return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__["createStyles"])(styles); +} + +/***/ }), + +/***/ "R0wv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV3Instrumentation", function() { return reactRouterV3Instrumentation; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); + + +// Many of the types below had to be mocked out to prevent typescript issues +// these types are required for correct functionality. + +/** + * Creates routing instrumentation for React Router v3 + * Works for React Router >= 3.2.0 and < 4.0.0 + * + * @param history object from the `history` library + * @param routes a list of all routes, should be + * @param match `Router.match` utility + */ +function reactRouterV3Instrumentation( + history, + routes, + match, +) { + return ( + startTransaction, + startTransactionOnPageLoad = true, + startTransactionOnLocationChange = true, + ) => { + let activeTransaction; + let prevName; + + // Have to use window.location because history.location might not be defined. + if (startTransactionOnPageLoad && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"] && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location) { + normalizeTransactionName( + routes, + _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location , + match, + (localName, source = 'url') => { + prevName = localName; + activeTransaction = startTransaction({ + name: prevName, + op: 'pageload', + tags: { + 'routing.instrumentation': 'react-router-v3', + }, + metadata: { + source, + }, + }); + }, + ); + } + + if (startTransactionOnLocationChange && history.listen) { + history.listen(location => { + if (location.action === 'PUSH' || location.action === 'POP') { + if (activeTransaction) { + activeTransaction.finish(); + } + const tags = { + 'routing.instrumentation': 'react-router-v3', + }; + if (prevName) { + tags.from = prevName; + } + normalizeTransactionName(routes, location, match, (localName, source = 'url') => { + prevName = localName; + activeTransaction = startTransaction({ + name: prevName, + op: 'navigation', + tags, + metadata: { + source, + }, + }); + }); + } + }); + } + }; +} + +/** + * Normalize transaction names using `Router.match` + */ +function normalizeTransactionName( + appRoutes, + location, + match, + callback, +) { + let name = location.pathname; + match( + { + location, + routes: appRoutes, + }, + (error, _redirectLocation, renderProps) => { + if (error || !renderProps) { + return callback(name); + } + + const routePath = getRouteStringFromRoutes(renderProps.routes || []); + if (routePath.length === 0 || routePath === '/*') { + return callback(name); + } + + name = routePath; + return callback(name, 'route'); + }, + ); +} + +/** + * Generate route name from array of routes + */ +function getRouteStringFromRoutes(routes) { + if (!Array.isArray(routes) || routes.length === 0) { + return ''; + } + + const routesWithPaths = routes.filter((route) => !!route.path); + + let index = -1; + for (let x = routesWithPaths.length - 1; x >= 0; x--) { + const route = routesWithPaths[x]; + if (route.path && route.path.startsWith('/')) { + index = x; + break; + } + } + + return routesWithPaths + .slice(index) + .filter(({ path }) => !!path) + .map(({ path }) => path) + .join(''); +} + + +//# sourceMappingURL=reactrouterv3.js.map + + +/***/ }), + +/***/ "R9Wl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDomElement", function() { return getDomElement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocationHref", function() { return getLocationHref; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "htmlTreeAsString", function() { return htmlTreeAsString; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7bZ2"); + + + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = Object(_worldwide_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])(); + +/** + * Given a child DOM element, returns a query-selector statement describing that + * and its ancestors + * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] + * @returns generated DOM path + */ +function htmlTreeAsString(elem, keyAttrs) { + + // try/catch both: + // - accessing event.target (see getsentry/raven-js#838, #768) + // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly + // - can throw an exception in some circumstances. + try { + let currentElem = elem ; + const MAX_TRAVERSE_HEIGHT = 5; + const MAX_OUTPUT_LEN = 80; + const out = []; + let height = 0; + let len = 0; + const separator = ' > '; + const sepLength = separator.length; + let nextStr; + + // eslint-disable-next-line no-plusplus + while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { + nextStr = _htmlElementAsString(currentElem, keyAttrs); + // bail out if + // - nextStr is the 'html' element + // - the length of the string that would be created exceeds MAX_OUTPUT_LEN + // (ignore this limit if we are on the first iteration) + if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { + break; + } + + out.push(nextStr); + + len += nextStr.length; + currentElem = currentElem.parentNode; + } + + return out.reverse().join(separator); + } catch (_oO) { + return '<unknown>'; + } +} + +/** + * Returns a simple, query-selector representation of a DOM element + * e.g. [HTMLElement] => input#foo.btn[name=baz] + * @returns generated DOM path + */ +function _htmlElementAsString(el, keyAttrs) { + const elem = el + +; + + const out = []; + let className; + let classes; + let key; + let attr; + let i; + + if (!elem || !elem.tagName) { + return ''; + } + + out.push(elem.tagName.toLowerCase()); + + // Pairs of attribute keys defined in `serializeAttribute` and their values on element. + const keyAttrPairs = + keyAttrs && keyAttrs.length + ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)]) + : null; + + if (keyAttrPairs && keyAttrPairs.length) { + keyAttrPairs.forEach(keyAttrPair => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + } else { + if (elem.id) { + out.push(`#${elem.id}`); + } + + // eslint-disable-next-line prefer-const + className = elem.className; + if (className && Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isString"])(className)) { + classes = className.split(/\s+/); + for (i = 0; i < classes.length; i++) { + out.push(`.${classes[i]}`); + } + } + } + const allowedAttrs = ['type', 'name', 'title', 'alt']; + for (i = 0; i < allowedAttrs.length; i++) { + key = allowedAttrs[i]; + attr = elem.getAttribute(key); + if (attr) { + out.push(`[${key}="${attr}"]`); + } + } + return out.join(''); +} + +/** + * A safe form of location.href + */ +function getLocationHref() { + try { + return WINDOW.document.location.href; + } catch (oO) { + return ''; + } +} + +/** + * Gets a DOM element by using document.querySelector. + * + * This wrapper will first check for the existance of the function before + * actually calling it so that we don't have to take care of this check, + * every time we want to access the DOM. + * + * Reason: DOM/querySelector is not available in all environments. + * + * We have to cast to any because utils can be consumed by a variety of environments, + * and we don't want to break TS users. If you know what element will be selected by + * `document.querySelector`, specify it as part of the generic call. For example, + * `const element = getDomElement<Element>('selector');` + * + * @param selector the selector string passed on to document.querySelector + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function getDomElement(selector) { + if (WINDOW.document && WINDOW.document.querySelector) { + return WINDOW.document.querySelector(selector) ; + } + return null; +} + + +//# sourceMappingURL=browser.js.map + + +/***/ }), + +/***/ "RD7v": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.strings = void 0; +var strings = { + flagshipButNoRNAPI: '<WebviewIntentProvider /> can not instantiate its service. The application was detected as running in a Flagship webview but has no access to `window.ReactNativeWebView`, which is contradictory.', + noListenerFound: 'Could not handle event, this `NativeMessenger` instance does not have a listener.', + noWebviewFound: 'error: no WebView was found when trying to post message. This might mean we exited a CozyApp without waiting the call("backToHome") response.', + postMeSignature: '@post-me', + webviewIsRendered: 'webviewIsRendered', + errorRegisterWebview: 'Cannot register webview. A webview is already registered into cozy-intent with the uri: ${uri}', + errorUnregisterWebview: 'Cannot unregister webview. No webview is registered into cozy-intent with the uri: ${uri}', + errorEmitMessage: 'Cannot emit message. No webview is registered with uri: ${webviewUri}', + errorCozyBarAPIMissing: 'Cozy-bar was detected by WebviewIntentProvider but the required setWebviewContext() API was not found. Cozy-bar webview intents will not work. Your cozy-bar version is most likely outdated.', + errorParentHandshake: 'Handshake failed for uri: "${uri}". ConcreteConnection will not be available for this uri\'s messenger, but messages should still work. Error was: "${errorMessage}".', + errorNoMessengerToInit: 'Could not initialise messenger for uri: "${uri}. No WebView has been registered from react-native with this uri. Please use NativeService.registerWebview(WebviewRef).', + logging: { + registering: function registering(uri) { + return "- REGISTERING \u25B6\uFE0F \"".concat(uri, "\""); + }, + registered: function registered(uri) { + return "- REGISTERED \u25B6\uFE0F \"".concat(uri, "\""); + }, + unregistering: function unregistering(uri) { + return "- UNREGISTERING \u25B6\uFE0F \"".concat(uri, "\""); + }, + unregistered: function unregistered(uri) { + return "- UNREGISTERED \u25B6\uFE0F \"".concat(uri, "\""); + } + } +}; +exports.strings = strings; + +/***/ }), + +/***/ "REwm": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + + +/***/ }), + +/***/ "RF/d": +/***/ (function(module, exports, __webpack_require__) { + +var LodashWrapper = __webpack_require__("e9eL"), + flatRest = __webpack_require__("vjlx"), + getData = __webpack_require__("FsUY"), + getFuncName = __webpack_require__("lk8G"), + isArray = __webpack_require__("8u9v"), + isLaziable = __webpack_require__("l/Lm"); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; + + +/***/ }), + +/***/ "RFRV": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'] + var monthsFull = ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'] + var weekdays2char = ['do', 'se', 'te', 'qa', 'qi', 'se', 'sa'] + var weekdays3char = ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'] + var weekdaysFull = ['domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + 'º' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "RLdO": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.breakpointsPropTypes = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _throttle = _interopRequireDefault(__webpack_require__("y0wq")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _breakpoints = _interopRequireWildcard(__webpack_require__("S5nn")); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} +/** + * HOC providing the `breakpoints` property to its children to help + * with responsive web design. + * + * `breakpoints` values will reflect if the window.innerWidth is under + * those breakpoints. + * + * @Example + * ```` + * // here we define `mobile` as a screen under 1000px + * const B = withBreakpoints({ mobile: 1000 })(A) + * ```` + * + * `A` will receive `{ breakpoints: { mobile: true }}` if the screen + * width is under 1000px. + * + * `A` will receive `{ breakpoints: { mobile: false }}` if the screen + * width is over 1000px; + * + * + */ + +var withBreakpoints = function withBreakpoints() { + var bp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _breakpoints.default; + return function (Wrapped) { + var Aware = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(Aware, _Component); + var _super = _createSuper(Aware); + function Aware(props) { + var _this; + (0, _classCallCheck2.default)(this, Aware); + _this = _super.call(this, props); + _this.state = { + breakpoints: (0, _breakpoints.getBreakpointsStatus)(bp) + }; + _this.checkBreakpoints = (0, _throttle.default)(function () { + _this.setState({ + breakpoints: (0, _breakpoints.getBreakpointsStatus)(bp) + }); + }, 100, { + trailing: true + }); + return _this; + } + (0, _createClass2.default)(Aware, [{ + key: "componentDidMount", + value: function componentDidMount() { + window.addEventListener('resize', this.checkBreakpoints); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + window.removeEventListener('resize', this.checkBreakpoints); + } + }, { + key: "render", + value: function render() { + var props = this.props; + var breakpoints = this.state.breakpoints; + return /*#__PURE__*/_react.default.createElement(Wrapped, (0, _extends2.default)({}, props, { + breakpoints: breakpoints + })); + } + }]); + return Aware; + }(_react.Component); + Aware.displayName = "withBreakpoints(".concat(Wrapped.displayName || Wrapped.name, ")"); + return Aware; + }; +}; +/** + * PropTypes to use into the component Proptypes definition + */ + +var breakpointsPropTypes = _propTypes.default.shape(Object.keys(_breakpoints.default).reduce(function (all, breakpoint) { + all[breakpoint] = _propTypes.default.bool.isRequired; + return all; +}, {})); +exports.breakpointsPropTypes = breakpointsPropTypes; +var _default = withBreakpoints; +exports.default = _default; + +/***/ }), + +/***/ "RLfQ": +/***/ (function(module, exports, __webpack_require__) { + +var Uint8Array = __webpack_require__("m0eP"); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; + + +/***/ }), + +/***/ "RNXH": +/***/ (function(module, exports, __webpack_require__) { + +var superPropBase = __webpack_require__("O71y"); + +function _get() { + if (typeof Reflect !== "undefined" && Reflect.get) { + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; + } else { + module.exports = _get = function _get(target, property, receiver) { + var base = superPropBase(target, property); + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(arguments.length < 3 ? target : receiver); + } + + return desc.value; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + } + + return _get.apply(this, arguments); +} + +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "ROjY": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'minna en 1 sekúnda', + other: 'minna en {{count}} sekúndur' + }, + + xSeconds: { + one: '1 sekúnda', + other: '{{count}} sekúndur' + }, + + halfAMinute: 'hálf mínúta', + + lessThanXMinutes: { + one: 'minna en 1 mínúta', + other: 'minna en {{count}} mínútur' + }, + + xMinutes: { + one: '1 mínúta', + other: '{{count}} mínútur' + }, + + aboutXHours: { + one: 'u.þ.b. 1 klukkustund', + other: 'u.þ.b. {{count}} klukkustundir' + }, + + xHours: { + one: '1 klukkustund', + other: '{{count}} klukkustundir' + }, + + xDays: { + one: '1 dagur', + other: '{{count}} dagar' + }, + + aboutXMonths: { + one: 'u.þ.b. 1 mánuður', + other: 'u.þ.b. {{count}} mánuðir' + }, + + xMonths: { + one: '1 mánuður', + other: '{{count}} mánuðir' + }, + + aboutXYears: { + one: 'u.þ.b. 1 ár', + other: 'u.þ.b. {{count}} ár' + }, + + xYears: { + one: '1 ár', + other: '{{count}} ár' + }, + + overXYears: { + one: 'meira en 1 ár', + other: 'meira en {{count}} ár' + }, + + almostXYears: { + one: 'næstum 1 ár', + other: 'næstum {{count}} ár' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'í ' + result + } else { + return result + ' síðan' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "RPc2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UNIVERSAL_LINK_URL = exports.NATIVE_APP_INFOS = void 0; +var _cozyDeviceHelper = __webpack_require__("Kv7L"); +var NATIVE_APP_INFOS = { + drive: { + appId: 'io.cozy.drive.mobile', + uri: 'cozydrive://', + name: 'Cozy Drive' + }, + banks: { + appId: (0, _cozyDeviceHelper.isAndroidApp)() ? 'io.cozy.banks.mobile' : 'io.cozy.banks', + uri: 'cozybanks://', + name: 'Cozy Banks' + } +}; +exports.NATIVE_APP_INFOS = NATIVE_APP_INFOS; +var UNIVERSAL_LINK_URL = 'https://links.mycozy.cloud'; +exports.UNIVERSAL_LINK_URL = UNIVERSAL_LINK_URL; + +/***/ }), + +/***/ "RR6/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DataloadState = exports.DataloadSectionType = void 0; +var DataloadState; +exports.DataloadState = DataloadState; +(function (DataloadState) { + DataloadState["VALID"] = "VALID"; + DataloadState["EMPTY"] = "EMPTY"; + DataloadState["MISSING"] = "MISSING"; + DataloadState["HOLE"] = "HOLE"; + DataloadState["UPCOMING"] = "UPCOMING"; + DataloadState["COMING"] = "COMING"; + DataloadState["AGGREGATED_VALID"] = "AGGREGATED_VALID"; + DataloadState["AGGREGATED_EMPTY"] = "AGGREGATED_EMPTY"; + DataloadState["AGGREGATED_WITH_EMPTY"] = "AGGREGATED_WITH_EMPTY"; + DataloadState["AGGREGATED_HOLE_OR_MISSING"] = "AGGREGATED_HOLE_OR_MISSING"; + DataloadState["AGGREGATED_WITH_HOLE_OR_MISSING"] = "AGGREGATED_WITH_HOLE_OR_MISSING"; + DataloadState["AGGREGATED_WITH_COMING"] = "AGGREGATED_WITH_UPCOMING"; + DataloadState["AGGREGATED_COMING"] = "AGGREGATED_COMING"; +})(DataloadState || (exports.DataloadState = DataloadState = {})); +var DataloadSectionType; +exports.DataloadSectionType = DataloadSectionType; +(function (DataloadSectionType) { + DataloadSectionType["NO_COMPARE"] = "NO_COMPARE"; + DataloadSectionType["LEFT"] = "LEFT"; + DataloadSectionType["RIGHT"] = "RIGHT"; +})(DataloadSectionType || (exports.DataloadSectionType = DataloadSectionType = {})); + +/***/ }), + +/***/ "RU3a": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.20 Math.log1p(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { log1p: __webpack_require__("f9kN") }); + + +/***/ }), + +/***/ "RXc6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.NOTES_URL_DOCTYPE = exports.NOTES_DOCTYPE = void 0; + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__("GSeB")); + +var _utils = __webpack_require__("YJcZ"); + +var _NotesSchema = __webpack_require__("MvNj"); + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/notes/", "/open"]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/files/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var NOTES_DOCTYPE = 'io.cozy.notes'; +exports.NOTES_DOCTYPE = NOTES_DOCTYPE; +var NOTES_URL_DOCTYPE = 'io.cozy.notes.url'; +exports.NOTES_URL_DOCTYPE = NOTES_URL_DOCTYPE; + +var normalizeDoc = _DocumentCollection2.default.normalizeDoctypeJsonApi(NOTES_DOCTYPE); + +var normalizeNote = function normalizeNote(note) { + return _objectSpread(_objectSpread({}, normalizeDoc(note, NOTES_DOCTYPE)), note.attributes); +}; + +var normalizeNoteUrl = function normalizeNoteUrl(noteUrl) { + return _objectSpread(_objectSpread({}, _DocumentCollection2.default.normalizeDoctypeJsonApi(NOTES_URL_DOCTYPE)(noteUrl)), noteUrl.attributes); +}; +/** + * Implements `DocumentCollection` API to interact with the /notes endpoint of the stack + */ + + +var NotesCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(NotesCollection, _DocumentCollection); + + var _super = _createSuper(NotesCollection); + + function NotesCollection(stackClient) { + (0, _classCallCheck2.default)(this, NotesCollection); + return _super.call(this, NOTES_DOCTYPE, stackClient); + } + /** + * Fetches all notes + * + * @returns {{data, links, meta}} The JSON API conformant response. + */ + + + (0, _createClass2.default)(NotesCollection, [{ + key: "all", + value: function () { + var _all = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var resp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.stackClient.fetchJSON('GET', '/notes'); + + case 2: + resp = _context.sent; + return _context.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: resp.data.map(normalizeNote) + })); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function all() { + return _all.apply(this, arguments); + } + + return all; + }() + /** + * Destroys the note on the server + * + * @param {object} note The io.cozy.notes document to destroy + * @param {string} [note._id] The note's id + * + * @returns {{ data }} The deleted note + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref) { + var _id, resp; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _id = _ref._id; + _context2.next = 3; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject(), _id)); + + case 3: + resp = _context2.sent; + return _context2.abrupt("return", { + data: _objectSpread(_objectSpread({}, normalizeNote(resp.data)), {}, { + _deleted: true + }) + }); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function destroy(_x) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + /** + * Create a note + * + * @param {object} options - Options + * @param {string} [options.dir_id] dir_id where to create the note + * + * @returns {{data, links, meta}} The JSON API conformant response. + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref2) { + var dir_id, resp; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + dir_id = _ref2.dir_id; + _context3.next = 3; + return this.stackClient.fetchJSON('POST', '/notes', { + data: { + type: 'io.cozy.notes.documents', + attributes: { + title: '', + schema: (0, _NotesSchema.getDefaultSchema)(), + dir_id: dir_id + } + } + }); + + case 3: + resp = _context3.sent; + return _context3.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: normalizeNote(resp.data) + })); + + case 5: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function create(_x2) { + return _create.apply(this, arguments); + } + + return create; + }() + /** + * Returns the details to build the note's url + * + * @see https://github.com/cozy/cozy-stack/blob/master/docs/notes.md#get-notesidopen + * + * @param {object} note The io.cozy.notes document to open + * @param {string} [note._id] The note's id + * + * @returns {{ data }} The note's url details + */ + + }, { + key: "fetchURL", + value: function () { + var _fetchURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref3) { + var _id, resp; + + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _id = _ref3._id; + _context4.next = 3; + return this.stackClient.fetchJSON('GET', (0, _utils.uri)(_templateObject2(), _id)); + + case 3: + resp = _context4.sent; + return _context4.abrupt("return", { + data: normalizeNoteUrl(resp.data) + }); + + case 5: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function fetchURL(_x3) { + return _fetchURL.apply(this, arguments); + } + + return fetchURL; + }() + /** + * Returns promise mirror schema for a note + * + * @returns {object} schema + */ + + }, { + key: "getDefaultSchema", + value: function getDefaultSchema() { + return (0, _NotesSchema.getDefaultSchema)(); + } + }]); + return NotesCollection; +}(_DocumentCollection2.default); + +NotesCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = NotesCollection; +exports.default = _default; + +/***/ }), + +/***/ "Ra5m": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("oPNn") +var buildFormatLocale = __webpack_require__("JNO2") + +/** + * @category Locales + * @summary Turkish locale. + * @author Alpcan Aydın [@alpcanaydin]{@link https://github.com/alpcanaydin} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "RaNm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $abs = GetIntrinsic('%Math.abs%'); + +// http://262.ecma-international.org/5.1/#sec-5.2 + +module.exports = function abs(x) { + return $abs(x); +}; + + +/***/ }), + +/***/ "Rcf4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $typed = __webpack_require__("Yivq"); +var buffer = __webpack_require__("QfaY"); +var anObject = __webpack_require__("eckd"); +var toAbsoluteIndex = __webpack_require__("I9Qy"); +var toLength = __webpack_require__("yhnj"); +var isObject = __webpack_require__("pFmr"); +var ArrayBuffer = __webpack_require__("ETne").ArrayBuffer; +var speciesConstructor = __webpack_require__("iyRu"); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * __webpack_require__("enc5")(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +__webpack_require__("iaIa")(ARRAY_BUFFER); + + +/***/ }), + +/***/ "Ri2D": +/***/ (function(module, exports) { + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; + + +/***/ }), + +/***/ "RjDH": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + singular: 'mindre än en sekund', + plural: 'mindre än {{count}} sekunder' + }, + + xSeconds: { + singular: 'en sekund', + plural: '{{count}} sekunder' + }, + + halfAMinute: 'en halv minut', + + lessThanXMinutes: { + singular: 'mindre än en minut', + plural: 'mindre än {{count}} minuter' + }, + + xMinutes: { + singular: 'en minut', + plural: '{{count}} minuter' + }, + + aboutXHours: { + singular: 'ungefär en timme', + plural: 'ungefär {{count}} timmar' + }, + + xHours: { + singular: 'en timme', + plural: '{{count}} timmar' + }, + + xDays: { + singular: 'en dag', + plural: '{{count}} dagar' + }, + + aboutXMonths: { + singular: 'ungefär en månad', + plural: 'ungefär {{count}} månader' + }, + + xMonths: { + singular: 'en månad', + plural: '{{count}} månader' + }, + + aboutXYears: { + singular: 'ungefär ett år', + plural: 'ungefär {{count}} år' + }, + + xYears: { + singular: 'ett år', + plural: '{{count}} år' + }, + + overXYears: { + singular: 'över ett år', + plural: 'över {{count}} år' + }, + + almostXYears: { + singular: 'nästan ett år', + plural: 'nästan {{count}} år' + } + } + + var wordMapping = [ + 'noll', + 'en', + 'två', + 'tre', + 'fyra', + 'fem', + 'sex', + 'sju', + 'åtta', + 'nio', + 'tio', + 'elva', + 'tolv' + ] + + function localize (token, count, options) { + options = options || {} + + var translation = distanceInWordsLocale[token] + var result + if (typeof translation === 'string') { + result = translation + } else if (count === 0 || count > 1) { + result = translation.plural.replace('{{count}}', count < 13 ? wordMapping[count] : count) + } else { + result = translation.singular + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'om ' + result + } else { + return result + ' sedan' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "RjO1": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseClone = __webpack_require__("8U3o"), + baseUnset = __webpack_require__("OQB6"), + castPath = __webpack_require__("+ERu"), + copyObject = __webpack_require__("kTya"), + customOmitClone = __webpack_require__("VIZI"), + flatRest = __webpack_require__("vjlx"), + getAllKeysIn = __webpack_require__("7XCK"); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ +var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; +}); + +module.exports = omit; + + +/***/ }), + +/***/ "Rk98": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("NrmK") +var buildFormatLocale = __webpack_require__("S7yZ") + +/** + * @category Locales + * @summary Norwegian Bokmål locale. + * @author Hans-Kristian Koren [@Hanse]{@link https://github.com/Hanse} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "RmWH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("npFJ")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("sVxE"); +var hasOwn = __webpack_require__("H8OS"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "RqGj": +/***/ (function(module, exports) { + +module.exports = false; + + +/***/ }), + +/***/ "Rs/3": +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__("8ltH"), + arrayIncludes = __webpack_require__("pSuu"), + arrayIncludesWith = __webpack_require__("yvNq"), + arrayMap = __webpack_require__("4FGL"), + baseUnary = __webpack_require__("Ijh8"), + cacheHas = __webpack_require__("fO1A"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; + + +/***/ }), + +/***/ "Rvbi": +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__("rZ9V"); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; + + +/***/ }), + +/***/ "RyfF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSvgIcon; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ZbWQ"); + + + +/** + * Private module reserved for @material-ui/x packages. + */ + +function createSvgIcon(path, displayName) { + var Component = function Component(props, ref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_SvgIcon__WEBPACK_IMPORTED_MODULE_2__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref + }, props), path); + }; + + if (false) {} + + Component.muiName = _SvgIcon__WEBPACK_IMPORTED_MODULE_2__["default"].muiName; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.memo( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.forwardRef(Component)); +} + +/***/ }), + +/***/ "S+LB": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsNative = __webpack_require__("ZZVX"), + getValue = __webpack_require__("26Ja"); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; + + +/***/ }), + +/***/ "S/72": +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__("1del"), + getPrototype = __webpack_require__("pgeU"), + getSymbols = __webpack_require__("b7tc"), + stubArray = __webpack_require__("lZWV"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; + + +/***/ }), + +/***/ "S2w+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("ETne"); +var each = __webpack_require__("7NDg")(0); +var redefine = __webpack_require__("iNsi"); +var meta = __webpack_require__("h/ey"); +var assign = __webpack_require__("lPsH"); +var weak = __webpack_require__("zPcw"); +var isObject = __webpack_require__("pFmr"); +var validate = __webpack_require__("LEB8"); +var NATIVE_WEAK_MAP = __webpack_require__("LEB8"); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = __webpack_require__("BjNV")(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + + +/***/ }), + +/***/ "S42a": +/***/ (function(module, exports) { + +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +module.exports = trimmedEndIndex; + + +/***/ }), + +/***/ "S4gh": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NativeService = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _postMe = __webpack_require__("L5KM"); + +var _api = __webpack_require__("VXXh"); + +var _utils = __webpack_require__("Lv97"); + +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; } + +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) { (0, _defineProperty2.default)(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; } + +var log = (0, _postMe.debug)('NativeService'); + +var NativeService = /*#__PURE__*/function () { + function NativeService(localMethods) { + var _this = this; + + var messengerService = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _api.NativeMessenger; + (0, _classCallCheck2.default)(this, NativeService); + (0, _defineProperty2.default)(this, "messengerService", void 0); + (0, _defineProperty2.default)(this, "localMethods", void 0); + (0, _defineProperty2.default)(this, "messengerRegister", {}); + (0, _defineProperty2.default)(this, "getUri", function (source) { + return new URL(source.nativeEvent.url).hostname.toLowerCase(); + }); + (0, _defineProperty2.default)(this, "parseNativeEvent", function (_ref) { + var nativeEvent = _ref.nativeEvent; + return JSON.parse(nativeEvent.data); + }); + (0, _defineProperty2.default)(this, "isPostMeMessage", function (message) { + return message.type === _api.strings.postMeSignature; + }); + (0, _defineProperty2.default)(this, "isInitMessage", function (message) { + return message.message === _api.strings.webviewIsRendered; + }); + (0, _defineProperty2.default)(this, "registerWebview", function (uri, ref) { + log(_api.strings.logging.registering(uri)); + if (_this.messengerRegister[uri]) return log((0, _utils.interpolate)(_api.strings.errorRegisterWebview, { + uri: uri + })); + var messenger = new _this.messengerService(ref); + _this.messengerRegister = _objectSpread(_objectSpread({}, _this.messengerRegister), {}, (0, _defineProperty2.default)({}, uri, { + messenger: (0, _utils.isNativeDevMode)() ? (0, _api.DebugNativeMessenger)(messenger) : messenger + })); + log(_api.strings.logging.registered(uri)); + }); + (0, _defineProperty2.default)(this, "unregisterWebview", function (uri) { + log(_api.strings.logging.unregistering(uri)); + if (!_this.messengerRegister[uri]) return log((0, _utils.interpolate)(_api.strings.errorUnregisterWebview, { + uri: uri + })); + delete _this.messengerRegister[uri]; + log(_api.strings.logging.unregistered(uri)); + }); + (0, _defineProperty2.default)(this, "initWebview", /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(messenger) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _postMe.ParentHandshake)(messenger, _this.localMethods, _api.numbers.maxAttempts); + + case 2: + return _context.abrupt("return", _context.sent); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref2.apply(this, arguments); + }; + }()); + (0, _defineProperty2.default)(this, "tryEmit", /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(event) { + var parsedEvent; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (_this.isNativeEvent(event)) { + _context2.next = 2; + break; + } + + return _context2.abrupt("return"); + + case 2: + parsedEvent = _this.parseNativeEvent(event); + + if (!_this.isInitMessage(parsedEvent)) { + _context2.next = 7; + break; + } + + _context2.next = 6; + return _this.tryInit(event); + + case 6: + return _context2.abrupt("return", _context2.sent); + + case 7: + if (_this.isPostMeMessage(parsedEvent)) _this.tryOnMessage(event, parsedEvent); + + case 8: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function (_x2) { + return _ref3.apply(this, arguments); + }; + }()); + (0, _defineProperty2.default)(this, "tryInit", /*#__PURE__*/function () { + var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(event) { + var uri, messengerToInit; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + uri = _this.getUri(event); + messengerToInit = _this.messengerRegister[uri]; + _context3.prev = 2; + + if (messengerToInit) { + _context3.next = 5; + break; + } + + throw new Error((0, _utils.interpolate)(_api.strings.errorNoMessengerToInit, { + uri: uri + })); + + case 5: + _context3.next = 7; + return _this.initWebview(messengerToInit.messenger); + + case 7: + messengerToInit.connection = _context3.sent; + _context3.next = 13; + break; + + case 10: + _context3.prev = 10; + _context3.t0 = _context3["catch"](2); + log((0, _utils.interpolate)(_api.strings.errorParentHandshake, { + uri: uri, + errorMessage: (0, _utils.getErrorMessage)(_context3.t0) + })); + + case 13: + case "end": + return _context3.stop(); + } + } + }, _callee3, null, [[2, 10]]); + })); + + return function (_x3) { + return _ref4.apply(this, arguments); + }; + }()); + (0, _defineProperty2.default)(this, "tryOnMessage", function (event, message) { + var webviewUri = _this.getUri(event); + + var registeredWebview = _this.messengerRegister[webviewUri]; + + if (registeredWebview === undefined) { + return log((0, _utils.interpolate)(_api.strings.errorEmitMessage, { + webviewUri: webviewUri + })); + } + + registeredWebview.messenger.onMessage(message); + }); + (0, _defineProperty2.default)(this, "getHostname", function (uri) { + try { + return new URL(uri).hostname.toLowerCase(); + } catch (_unused) { + return uri; + } + }); + (0, _defineProperty2.default)(this, "call", function (uri, methodName) { + var _this$messengerRegist, _this$messengerRegist2, _this$messengerRegist3; + + for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + return (_this$messengerRegist = _this.messengerRegister[_this.getHostname(uri)]) === null || _this$messengerRegist === void 0 ? void 0 : (_this$messengerRegist2 = _this$messengerRegist.connection) === null || _this$messengerRegist2 === void 0 ? void 0 : (_this$messengerRegist3 = _this$messengerRegist2.remoteHandle()).call.apply(_this$messengerRegist3, [methodName].concat(args)); + }); + this.messengerService = messengerService; + this.localMethods = localMethods; + } + + (0, _createClass2.default)(NativeService, [{ + key: "isNativeEvent", + value: function isNativeEvent(object) { + var _nativeEvent; + + return ((_nativeEvent = object.nativeEvent) === null || _nativeEvent === void 0 ? void 0 : _nativeEvent.data) !== undefined; + } + }]); + return NativeService; +}(); + +exports.NativeService = NativeService; + +/***/ }), + +/***/ "S5PF": +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; + + +/***/ }), + +/***/ "S5nn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getBreakpointsStatus = exports.default = void 0; +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); +var _mapValues = _interopRequireDefault(__webpack_require__("7FTH")); +var large = 1200; +var medium = 1023; +var small = 768; +var tiny = 543; +var breakpoints = { + isExtraLarge: [large + 1], + isLarge: [medium + 1, large], + isMedium: [small + 1, medium], + isSmall: [tiny + 1, small], + isTiny: [0, tiny], + isDesktop: [medium + 1], + isTablet: [small + 1, medium], + isMobile: [0, small] +}; +var getBreakpointsStatus = function getBreakpointsStatus(breakpoints) { + var width = window.innerWidth; + return (0, _mapValues.default)(breakpoints, function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + min = _ref2[0], + max = _ref2[1]; + return width >= min && (max === undefined || width <= max); + }); +}; +exports.getBreakpointsStatus = getBreakpointsStatus; +var _default = breakpoints; +exports.default = _default; + +/***/ }), + +/***/ "S7Vc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebviewIntentProvider = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); + +var _postMe = __webpack_require__("L5KM"); + +var _api = __webpack_require__("VXXh"); + +var _view = __webpack_require__("7zRI"); + +var _utils = __webpack_require__("Lv97"); + +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +var log = (0, _postMe.debug)('WebviewIntentProvider'); +var assumeWebviewWindow = window; + +function isWebviewWindow(window) { + return window.ReactNativeWebView !== undefined; +} +/* eslint-disable no-console */ + +/* eslint-disable @typescript-eslint/no-non-null-assertion */ + + +var getBarInitAPI = function getBarInitAPI() { + try { + if (cozy.bar && cozy.bar.setWebviewContext === undefined) { + return log(_api.strings.errorCozyBarAPIMissing); + } + + return cozy.bar.setWebviewContext; + } catch (err) { + return undefined; + } +}; +/* eslint-enable @typescript-eslint/no-non-null-assertion */ + +/* eslint-enable no-console */ + + +var sendSyncMessage = function sendSyncMessage(message) { + return assumeWebviewWindow.ReactNativeWebView.postMessage(JSON.stringify({ + type: _api.strings.postMeSignature, + message: message + })); +}; + +var getConnection = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(callBack, methods) { + var messenger, result; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + sendSyncMessage(_api.strings.webviewIsRendered); + messenger = new _api.WebviewMessenger(assumeWebviewWindow); + _context.next = 4; + return (0, _postMe.ChildHandshake)((0, _utils.isWebDevMode)() ? (0, _api.DebugWebviewMessenger)(messenger) : messenger, methods); + + case 4: + result = _context.sent; + callBack(result); + + case 6: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function getConnection(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +var isValidEnv = function isValidEnv() { + var _assumeWebviewWindow$; + + var flagshipApp = (_assumeWebviewWindow$ = assumeWebviewWindow.cozy) === null || _assumeWebviewWindow$ === void 0 ? void 0 : _assumeWebviewWindow$.flagship; + if (!flagshipApp) return false; + + if (!isWebviewWindow(window)) { + log(_api.strings.flagshipButNoRNAPI); + return false; + } + + return true; +}; + +var WebviewIntentProvider = function WebviewIntentProvider(_ref2) { + var children = _ref2.children, + methods = _ref2.methods, + setBarContext = _ref2.setBarContext, + webviewService = _ref2.webviewService; + + var _useState = (0, _react.useState)(), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + connection = _useState2[0], + setConnection = _useState2[1]; + + var _useState3 = (0, _react.useState)(webviewService), + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), + service = _useState4[0], + setService = _useState4[1]; + + var setBarWebviewContext = setBarContext || getBarInitAPI(); + (0, _react.useEffect)(function () { + !connection && !webviewService && isValidEnv() && getConnection(setConnection, methods).catch(log); + }, [connection, webviewService, methods]); + (0, _react.useEffect)(function () { + !service && connection && setService(new _api.WebviewService(connection)); + }, [service, connection]); + (0, _react.useEffect)(function () { + setBarWebviewContext && service && setBarWebviewContext(service); + }, [setBarWebviewContext, service]); + return /*#__PURE__*/_react.default.createElement(_view.WebviewContext.Provider, { + value: service + }, children); +}; + +exports.WebviewIntentProvider = WebviewIntentProvider; + +/***/ }), + +/***/ "S7yZ": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan.', 'feb.', 'mars', 'april', 'mai', 'juni', 'juli', 'aug.', 'sep.', 'okt.', 'nov.', 'des.'] + var monthsFull = ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'] + var weekdays2char = ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'] + var weekdays3char = ['sø.', 'ma.', 'ti.', 'on.', 'to.', 'fr.', 'lø.'] + var weekdaysFull = ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "SBwf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $reduce = __webpack_require__("Hg8A"); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + + +/***/ }), + +/***/ "SCQF": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +$export($export.G + $export.W + $export.F * !__webpack_require__("Yivq").ABV, { + DataView: __webpack_require__("QfaY").DataView +}); + + +/***/ }), + +/***/ "SGK2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/cozy-circle.svg` to regenerate; + +function SvgCozyCircle(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 20 20" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm2 0c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0s10 4.477 10 10zm-8.59 1.206c.134.086.33.046.417-.085a.28.28 0 00-.087-.396c-.116-.073-.125-.223-.125-.223a.296.296 0 00-.3-.282h-.006a.306.306 0 00-.21.087.283.283 0 00-.085.21.895.895 0 00.029.183 1.682 1.682 0 01-2.087.004c.03-.11.03-.189.03-.191a.294.294 0 00-.291-.292.285.285 0 00-.213.076.289.289 0 00-.098.204s-.008.15-.126.225a.282.282 0 00-.085.396.315.315 0 00.442.068l.007-.005c.392.295.874.455 1.375.455a2.29 2.29 0 001.379-.456l.033.022zm.766-5.313c.521.502.845 1.153.932 1.856C14.726 7.892 16 9.236 16 10.869 16 12.594 14.574 14 12.822 14H7.177C5.425 14 4 12.595 4 10.868c0-.823.322-1.601.906-2.19a3.179 3.179 0 011.893-.92c.085-.707.41-1.36.933-1.865A3.18 3.18 0 019.954 5a3.18 3.18 0 012.222.893z" + })); +} +var _default = SvgCozyCircle; +exports.default = _default; + +/***/ }), + +/***/ "SJjQ": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("riUr") +var buildFormatLocale = __webpack_require__("siJb") + +/** + * @category Locales + * @summary Indonesian locale. + * @author Rahmat Budiharso [@rbudiharso]{@link https://github.com/rbudiharso} + * @author Benget Nata [@bentinata]{@link https://github.com/bentinata} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "SRIV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("VFrX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getThemeProps__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "SU1J": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__("LRPZ"); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__("enc5")(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), + +/***/ "SUby": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("+qzK") +var buildFormatLocale = __webpack_require__("EDbf") + +/** + * @category Locales + * @summary Chinese Simplified locale. + * @author Changyu Geng [@KingMario]{@link https://github.com/KingMario} + * @author Song Shuoyun [@fnlctrl]{@link https://github.com/fnlctrl} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "SV6h": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ThemeProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eVKw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ThemeProvider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "SXNx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("ETne"); +var has = __webpack_require__("00OQ"); +var cof = __webpack_require__("ARbH"); +var inheritIfRequired = __webpack_require__("z41q"); +var toPrimitive = __webpack_require__("Tven"); +var fails = __webpack_require__("enc5"); +var gOPN = __webpack_require__("qeDk").f; +var gOPD = __webpack_require__("Yfzq").f; +var dP = __webpack_require__("GwHQ").f; +var $trim = __webpack_require__("V+ek").trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__("7wnO")(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__("WXXH") ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__("iNsi")(global, NUMBER, $Number); +} + + +/***/ }), + +/***/ "SaR9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var __DEV__ = "production" !== 'production'; + +var warning = function() {}; + +if (__DEV__) { + var printWarning = function printWarning(format, args) { + var len = arguments.length; + args = new Array(len > 1 ? len - 1 : 0); + for (var key = 1; key < len; key++) { + args[key - 1] = arguments[key]; + } + var argIndex = 0; + var message = 'Warning: ' + + format.replace(/%s/g, function() { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + } + + warning = function(condition, format, args) { + var len = arguments.length; + args = new Array(len > 2 ? len - 2 : 0); + for (var key = 2; key < len; key++) { + args[key - 2] = arguments[key]; + } + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + if (!condition) { + printWarning.apply(null, [format].concat(args)); + } + }; +} + +module.exports = warning; + + +/***/ }), + +/***/ "SbG8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsFunction", function() { return whenMapStateToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsMissing", function() { return whenMapStateToPropsIsMissing; }); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fbfW"); + +function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsFunc"])(mapStateToProps, 'mapStateToProps') : undefined; +} +function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsConstant"])(function () { + return {}; + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); + +/***/ }), + +/***/ "SgOY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _DialogTitle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UDPO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _DialogTitle__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "SjuW": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'น้อยกว่า 1 วินาที', + other: 'น้อยกว่า {{count}} วินาที' + }, + + xSeconds: { + one: '1 วินาที', + other: '{{count}} วินาที' + }, + + halfAMinute: 'ครึ่งนาที', + + lessThanXMinutes: { + one: 'น้อยกว่า 1 นาที', + other: 'น้อยกว่า {{count}} นาที' + }, + + xMinutes: { + one: '1 นาที', + other: '{{count}} นาที' + }, + + aboutXHours: { + one: 'ประมาณ 1 ชั่วโมง', + other: 'ประมาณ {{count}} ชั่วโมง' + }, + + xHours: { + one: '1 ชั่วโมง', + other: '{{count}} ชั่วโมง' + }, + + xDays: { + one: '1 วัน', + other: '{{count}} วัน' + }, + + aboutXMonths: { + one: 'ประมาณ 1 เดือน', + other: 'ประมาณ {{count}} เดือน' + }, + + xMonths: { + one: '1 เดือน', + other: '{{count}} เดือน' + }, + + aboutXYears: { + one: 'ประมาณ 1 ปี', + other: 'ประมาณ {{count}} ปี' + }, + + xYears: { + one: '1 ปี', + other: '{{count}} ปี' + }, + + overXYears: { + one: 'มากกว่า 1 ปี', + other: 'มากกว่า {{count}} ปี' + }, + + almostXYears: { + one: 'เกือบ 1 ปี', + other: 'เกือบ {{count}} ปี' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + if (token === 'halfAMinute') { + return 'ใน' + result + } else { + return 'ใน ' + result + } + } else { + return result + 'ที่ผ่านมา' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "Snl0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return createProvider; }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("I4/v"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("wdBx"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("OuGR"); +/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Qvly"); + + + + + +var didWarnAboutReceivingStore = false; + +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(_utils_warning__WEBPACK_IMPORTED_MODULE_4__["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); +} + +function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + "Subscription"; + + var Provider = + /*#__PURE__*/ + function (_Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(Provider, _Component); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return react__WEBPACK_IMPORTED_MODULE_1__["Children"].only(this.props.children); + }; + + return Provider; + }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); + + if (false) {} + + Provider.propTypes = { + store: _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["storeShape"].isRequired, + children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.element.isRequired + }; + Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["storeShape"].isRequired, _Provider$childContex[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["subscriptionShape"], _Provider$childContex); + return Provider; +} +/* harmony default export */ __webpack_exports__["default"] = (createProvider()); + +/***/ }), + +/***/ "SoMK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("msv5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _mergeClasses__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "SpSB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); + + + + + + + +/** + * @ignore - internal component. + */ + +var NativeSelectInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function NativeSelectInput(props, ref) { + var classes = props.classes, + className = props.className, + disabled = props.disabled, + IconComponent = props.IconComponent, + inputRef = props.inputRef, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "disabled", "IconComponent", "inputRef", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("select", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, // TODO v5: merge root and select + classes.select, classes[variant], className, disabled && classes.disabled), + disabled: disabled, + ref: inputRef || ref + }, other)), props.multiple ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](IconComponent, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.icon, classes["icon".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(variant))], disabled && classes.disabled) + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (NativeSelectInput); + +/***/ }), + +/***/ "Strw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BREADCRUMB_INTEGRATION_ID", function() { return BREADCRUMB_INTEGRATION_ID; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return Breadcrumbs; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("uDQB"); + + + + +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ + +/** JSDoc */ + +const BREADCRUMB_INTEGRATION_ID = 'Breadcrumbs'; + +/** + * Default Breadcrumbs instrumentations + * TODO: Deprecated - with v6, this will be renamed to `Instrument` + */ +class Breadcrumbs { + /** + * @inheritDoc + */ + static __initStatic() {this.id = BREADCRUMB_INTEGRATION_ID;} + + /** + * @inheritDoc + */ + __init() {this.name = Breadcrumbs.id;} + + /** + * Options of the breadcrumbs integration. + */ + // This field is public, because we use it in the browser client to check if the `sentry` option is enabled. + + /** + * @inheritDoc + */ + constructor(options) {;Breadcrumbs.prototype.__init.call(this); + this.options = { + console: true, + dom: true, + fetch: true, + history: true, + sentry: true, + xhr: true, + ...options, + }; + } + + /** + * Instrument browser built-ins w/ breadcrumb capturing + * - Console API + * - DOM API (click/typing) + * - XMLHttpRequest API + * - Fetch API + * - History API + */ + setupOnce() { + if (this.options.console) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('console', _consoleBreadcrumb); + } + if (this.options.dom) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('dom', _domBreadcrumb(this.options.dom)); + } + if (this.options.xhr) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('xhr', _xhrBreadcrumb); + } + if (this.options.fetch) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('fetch', _fetchBreadcrumb); + } + if (this.options.history) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('history', _historyBreadcrumb); + } + } +} Breadcrumbs.__initStatic(); + +/** + * A HOC that creaes a function that creates breadcrumbs from DOM API calls. + * This is a HOC so that we get access to dom options in the closure. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _domBreadcrumb(dom) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function _innerDomBreadcrumb(handlerData) { + let target; + let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined; + + if (typeof keyAttrs === 'string') { + keyAttrs = [keyAttrs]; + } + + // Accessing event.target can throw (see getsentry/raven-js#838, #768) + try { + target = handlerData.event.target + ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(handlerData.event.target , keyAttrs) + : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(handlerData.event , keyAttrs); + } catch (e) { + target = '<unknown>'; + } + + if (target.length === 0) { + return; + } + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb( + { + category: `ui.${handlerData.name}`, + message: target, + }, + { + event: handlerData.event, + name: handlerData.name, + global: handlerData.global, + }, + ); + } + + return _innerDomBreadcrumb; +} + +/** + * Creates breadcrumbs from console API calls + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _consoleBreadcrumb(handlerData) { + // This is a hack to fix a Vue3-specific bug that causes an infinite loop of + // console warnings. This happens when a Vue template is rendered with + // an undeclared variable, which we try to stringify, ultimately causing + // Vue to issue another warning which repeats indefinitely. + // see: https://github.com/getsentry/sentry-javascript/pull/6010 + // see: https://github.com/getsentry/sentry-javascript/issues/5916 + for (let i = 0; i < handlerData.args.length; i++) { + if (handlerData.args[i] === 'ref=Ref<') { + handlerData.args[i + 1] = 'viewRef'; + break; + } + } + const breadcrumb = { + category: 'console', + data: { + arguments: handlerData.args, + logger: 'console', + }, + level: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["severityLevelFromString"])(handlerData.level), + message: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["safeJoin"])(handlerData.args, ' '), + }; + + if (handlerData.level === 'assert') { + if (handlerData.args[0] === false) { + breadcrumb.message = `Assertion failed: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["safeJoin"])(handlerData.args.slice(1), ' ') || 'console.assert'}`; + breadcrumb.data.arguments = handlerData.args.slice(1); + } else { + // Don't capture a breadcrumb for passed assertions + return; + } + } + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb(breadcrumb, { + input: handlerData.args, + level: handlerData.level, + }); +} + +/** + * Creates breadcrumbs from XHR API calls + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _xhrBreadcrumb(handlerData) { + if (handlerData.endTimestamp) { + // We only capture complete, non-sentry requests + if (handlerData.xhr.__sentry_own_request__) { + return; + } + + const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {}; + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb( + { + category: 'xhr', + data: { + method, + url, + status_code, + }, + type: 'http', + }, + { + xhr: handlerData.xhr, + input: body, + }, + ); + + return; + } +} + +/** + * Creates breadcrumbs from fetch API calls + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _fetchBreadcrumb(handlerData) { + // We only capture complete fetch requests + if (!handlerData.endTimestamp) { + return; + } + + if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') { + // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests) + return; + } + + if (handlerData.error) { + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb( + { + category: 'fetch', + data: handlerData.fetchData, + level: 'error', + type: 'http', + }, + { + data: handlerData.error, + input: handlerData.args, + }, + ); + } else { + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb( + { + category: 'fetch', + data: { + ...handlerData.fetchData, + status_code: handlerData.response.status, + }, + type: 'http', + }, + { + input: handlerData.args, + response: handlerData.response, + }, + ); + } +} + +/** + * Creates breadcrumbs from history API calls + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _historyBreadcrumb(handlerData) { + let from = handlerData.from; + let to = handlerData.to; + const parsedLoc = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["parseUrl"])(_helpers_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].location.href); + let parsedFrom = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["parseUrl"])(from); + const parsedTo = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["parseUrl"])(to); + + // Initial pushState doesn't provide `from` information + if (!parsedFrom.path) { + parsedFrom = parsedLoc; + } + + // Use only the path component of the URL if the URL matches the current + // document (almost all the time when using pushState) + if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { + to = parsedTo.relative; + } + if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { + from = parsedFrom.relative; + } + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb({ + category: 'navigation', + data: { + from, + to, + }, + }); +} + + +//# sourceMappingURL=breadcrumbs.js.map + + +/***/ }), + +/***/ "Suxc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "HasManyFiles", { + enumerable: true, + get: function get() { + return _HasManyFiles.default; + } +}); +Object.defineProperty(exports, "HasMany", { + enumerable: true, + get: function get() { + return _HasMany.default; + } +}); +Object.defineProperty(exports, "HasOne", { + enumerable: true, + get: function get() { + return _HasOne.default; + } +}); +Object.defineProperty(exports, "HasOneInPlace", { + enumerable: true, + get: function get() { + return _HasOneInPlace.default; + } +}); +Object.defineProperty(exports, "HasManyInPlace", { + enumerable: true, + get: function get() { + return _HasManyInPlace.default; + } +}); +Object.defineProperty(exports, "HasManyTriggers", { + enumerable: true, + get: function get() { + return _HasManyTriggers.default; + } +}); +Object.defineProperty(exports, "Association", { + enumerable: true, + get: function get() { + return _Association.default; + } +}); +Object.defineProperty(exports, "resolveClass", { + enumerable: true, + get: function get() { + return _helpers.resolveClass; + } +}); +Object.defineProperty(exports, "create", { + enumerable: true, + get: function get() { + return _helpers.create; + } +}); +Object.defineProperty(exports, "isReferencedBy", { + enumerable: true, + get: function get() { + return _helpers.isReferencedBy; + } +}); +Object.defineProperty(exports, "isReferencedById", { + enumerable: true, + get: function get() { + return _helpers.isReferencedById; + } +}); +Object.defineProperty(exports, "getReferencedBy", { + enumerable: true, + get: function get() { + return _helpers.getReferencedBy; + } +}); +Object.defineProperty(exports, "getReferencedById", { + enumerable: true, + get: function get() { + return _helpers.getReferencedById; + } +}); + +var _HasManyFiles = _interopRequireDefault(__webpack_require__("Dktw")); + +var _HasMany = _interopRequireDefault(__webpack_require__("Jm63")); + +var _HasOne = _interopRequireDefault(__webpack_require__("ZN96")); + +var _HasOneInPlace = _interopRequireDefault(__webpack_require__("7DJk")); + +var _HasManyInPlace = _interopRequireDefault(__webpack_require__("BCXA")); + +var _HasManyTriggers = _interopRequireDefault(__webpack_require__("PKCX")); + +var _Association = _interopRequireDefault(__webpack_require__("urEX")); + +var _helpers = __webpack_require__("0Do6"); + +/***/ }), + +/***/ "SxiJ": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] + var monthsFull = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'] + var weekdays2char = ['日', '月', '火', '水', '木', '金', '土'] + var weekdays3char = ['日曜', '月曜', '火曜', '水曜', '木曜', '金曜', '土曜'] + var weekdaysFull = ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'] + var meridiemUppercase = ['午前', '午後'] + var meridiemLowercase = ['午前', '午後'] + var meridiemFull = ['午前', '午後'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '日' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "SxtW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _dsl = __webpack_require__("v2kV"); + +var useCapabilities = function useCapabilities(client) { + var _useState = (0, _react.useState)(), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + capabilities = _useState2[0], + setCapabilities = _useState2[1]; + + var _useState3 = (0, _react.useState)('idle'), + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), + fetchStatus = _useState4[0], + setFetchStatus = _useState4[1]; + + (0, _react.useEffect)(function () { + var fetchData = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var capabilitiesResult; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + setFetchStatus('loading'); + _context.prev = 1; + _context.next = 4; + return client.query((0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.capabilities')); + + case 4: + capabilitiesResult = _context.sent; + setCapabilities((0, _get.default)(capabilitiesResult, 'data.attributes', {})); + setFetchStatus('loaded'); + _context.next = 12; + break; + + case 9: + _context.prev = 9; + _context.t0 = _context["catch"](1); + setFetchStatus('failed'); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 9]]); + })); + + return function fetchData() { + return _ref.apply(this, arguments); + }; + }(); + + if (client.capabilities) { + setCapabilities(client.capabilities); + setFetchStatus('loaded'); + } else { + fetchData(); + } + }, [client]); + return { + capabilities: capabilities, + fetchStatus: fetchStatus + }; +}; + +var _default = useCapabilities; +exports.default = _default; + +/***/ }), + +/***/ "T+E/": +/***/ (function(module, exports) { + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "T3WX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getSharingLink = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _const = __webpack_require__("P3Kl"); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _helpers = __webpack_require__("Eg6m"); + +/** + * Generate Sharing link for one or many files + * + * @param {CozyClient} client - Instance of CozyClient + * @param {string[]} filesIds - Array of io.cozy.files ids + * @param {boolean} [isFlatDomain] - + * @returns {Promise<string>} Shared link + */ +var getSharingLink = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, filesIds, isFlatDomain) { + var _sharedLink$attribute, _sharedLink$attribute2; + + var PERMS, _yield$client$save, sharedLink, webLink; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + PERMS = { + _type: _const.DOCTYPE_PERMISSIONS, + permissions: { + files: { + type: _const.DOCTYPE_FILES, + values: filesIds, + verbs: ['GET'] + } + } + }; + _context.next = 3; + return client.save(PERMS); + + case 3: + _yield$client$save = _context.sent; + sharedLink = _yield$client$save.data; + webLink = (0, _helpers.generateWebLink)({ + cozyUrl: client.getStackClient().uri, + searchParams: [['sharecode', sharedLink === null || sharedLink === void 0 ? void 0 : (_sharedLink$attribute = sharedLink.attributes) === null || _sharedLink$attribute === void 0 ? void 0 : (_sharedLink$attribute2 = _sharedLink$attribute.shortcodes) === null || _sharedLink$attribute2 === void 0 ? void 0 : _sharedLink$attribute2.code]], + pathname: '/public', + slug: 'drive', + subDomainType: isFlatDomain ? 'flat' : 'nested' + }); + return _context.abrupt("return", webLink); + + case 7: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function getSharingLink(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); + +exports.getSharingLink = getSharingLink; + +/***/ }), + +/***/ "T7ls": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__("D244"); +} else {} + + +/***/ }), + +/***/ "TAqK": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getUniversalLinkDomain = exports.generateWebLink = exports.generateUniversalLink = void 0; +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); +var _cozyClient = __webpack_require__("xEu0"); +var _native = __webpack_require__("RPc2"); +var _excluded = ["nativePath"]; +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; +} +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) { + (0, _defineProperty2.default)(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; +} +var getUniversalLinkDomain = function getUniversalLinkDomain() { + return _native.UNIVERSAL_LINK_URL; +}; +exports.getUniversalLinkDomain = getUniversalLinkDomain; +var generateWebLink = function generateWebLink(_ref) { + var nativePath = _ref.nativePath, + props = (0, _objectWithoutProperties2.default)(_ref, _excluded); + console.warn('Deprecated: you should use generateWebLink from cozy-client instead'); + return (0, _cozyClient.generateWebLink)(_objectSpread({ + pathname: '/', + hash: nativePath + }, props)); +}; +/** + * Returns a universal link for an app + native path + * + * @param {string} options.slug - eg: drive + * @param {string} options.nativePath - /path/to/view + * @param {string} options.fallbackUrl - https://...mycozy.cloud, optional if cozyUrl is passed + * @param {string} options.cozyUrl - https://name.mycozy.cloud, optional if fallbackUrl is passed + * @param {string} options.subDomainType - flat/nested, optionally the type of subdomains that is used. + * @return {string} - https://links.cozy.cloud/drive/?fallback... + */ +exports.generateWebLink = generateWebLink; +var generateUniversalLink = function generateUniversalLink(options) { + var slug = options.slug, + cozyUrl = options.cozyUrl, + subDomainType = options.subDomainType; + var fallbackUrl = options.fallbackUrl, + nativePath = options.nativePath; + nativePath = (0, _cozyClient.ensureFirstSlash)(nativePath); + if (!cozyUrl && !fallbackUrl) { + throw new Error('Must have either cozyUrl or fallbackUrl to generate universal link.'); + } + if (cozyUrl && !fallbackUrl) { + fallbackUrl = (0, _cozyClient.generateWebLink)({ + cozyUrl: cozyUrl, + pathname: '/', + hash: nativePath, + slug: slug, + subDomainType: subDomainType + }); + } + var url = getUniversalLinkDomain(cozyUrl) + '/' + slug + nativePath; + var urlObj = new URL(url); + urlObj.searchParams.append('fallback', fallbackUrl); + return urlObj.toString(); +}; +exports.generateUniversalLink = generateUniversalLink; + +/***/ }), + +/***/ "TBKv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.normalizeAppFromRegistry = exports.APPS_REGISTRY_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _registry = __webpack_require__("J3p3"); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _errors = __webpack_require__("twUa"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var APPS_REGISTRY_DOCTYPE = 'io.cozy.apps_registry'; +exports.APPS_REGISTRY_DOCTYPE = APPS_REGISTRY_DOCTYPE; + +var normalizeAppFromRegistry = function normalizeAppFromRegistry(app, doctype) { + return _objectSpread({}, (0, _DocumentCollection2.normalizeDoc)(app, doctype)); +}; +/** + * Extends `DocumentCollection` API along with specific methods for `io.cozy.apps_registry`. + */ + + +exports.normalizeAppFromRegistry = normalizeAppFromRegistry; + +var AppsRegistryCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(AppsRegistryCollection, _DocumentCollection); + + var _super = _createSuper(AppsRegistryCollection); + + function AppsRegistryCollection(stackClient) { + var _this; + + (0, _classCallCheck2.default)(this, AppsRegistryCollection); + _this = _super.call(this, APPS_REGISTRY_DOCTYPE, stackClient); + _this.endpoint = '/registry/'; + return _this; + } + /** + * Fetches an app from the registry. + * + * @param {string} slug - Slug of the app + * @returns {Promise<{data: object}>} JsonAPI response containing normalized document as data attribute + * @throws {FetchError} + */ + + + (0, _createClass2.default)(AppsRegistryCollection, [{ + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(slug) { + var app, data; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.stackClient.fetchJSON('GET', "".concat(this.endpoint).concat(slug)); + + case 2: + app = _context.sent; + data = (0, _registry.transformRegistryFormatToStackFormat)(app); + return _context.abrupt("return", { + data: normalizeAppFromRegistry(data, this.doctype) + }); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + throw new Error('create() method is not available for AppsRegistryCollection'); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function create() { + return _create.apply(this, arguments); + } + + return create; + }() + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + throw new Error('destroy() method is not available for AppsRegistryCollection'); + + case 1: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + function destroy() { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + }]); + return AppsRegistryCollection; +}(_DocumentCollection2.default); + +var _default = AppsRegistryCollection; +exports.default = _default; + +/***/ }), + +/***/ "TBgN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TimeStep = void 0; +var TimeStep; +exports.TimeStep = TimeStep; +(function (TimeStep) { + TimeStep[TimeStep["HALF_AN_HOUR"] = 10] = "HALF_AN_HOUR"; + TimeStep[TimeStep["HOUR"] = 15] = "HOUR"; + TimeStep[TimeStep["DAY"] = 20] = "DAY"; + TimeStep[TimeStep["WEEK"] = 30] = "WEEK"; + TimeStep[TimeStep["MONTH"] = 40] = "MONTH"; + TimeStep[TimeStep["YEAR"] = 50] = "YEAR"; +})(TimeStep || (exports.TimeStep = TimeStep = {})); + +/***/ }), + +/***/ "TCx2": +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__("Tusy"); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; + + +/***/ }), + +/***/ "TDQG": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +var logDeprecate = function logDeprecate() { + if (false) {} + + _logger.default.warn.apply(_logger.default, arguments); +}; + +var _default = logDeprecate; +exports.default = _default; + +/***/ }), + +/***/ "TGEi": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _store = __webpack_require__("6mdx"); + +/** + * ObservableQueries are the glue between the store and observers + * of the store. They have the responsibility to hydrate the documents + * before passing them to the React component. + */ +var hasOwn = Object.prototype.hasOwnProperty; + +var ObservableQuery = /*#__PURE__*/function () { + function ObservableQuery(queryId, definition, client, options) { + var _this = this; + + (0, _classCallCheck2.default)(this, ObservableQuery); + (0, _defineProperty2.default)(this, "handleStoreChange", function () { + var nextResult = _this.currentRawResult(); + + if (!shallowEqual(nextResult, _this.lastResult)) { + _this.lastResult = nextResult; + + _this.notifyObservers(); + } + }); + + if (!queryId || !definition || !client) { + throw new Error('ObservableQuery takes 3 arguments: queryId, definition and client'); + } + + this.queryId = queryId; + this.definition = definition; + this.client = client; + this.observers = {}; + this.idCounter = 1; + this.lastResult = this.currentRawResult(); + this.options = options; + } + + (0, _createClass2.default)(ObservableQuery, [{ + key: "currentResult", + + /** + * Returns the query from the store with hydrated documents. + * + * @typedef {object} HydratedQueryState + * + * @returns {HydratedQueryState} + */ + value: function currentResult() { + return this.client.getQueryFromState(this.queryId, { + hydrated: (0, _get.default)(this.options, 'hydrated', true), + singleDocData: true + }); + } + }, { + key: "fetch", + value: function fetch() { + return this.client.query(this.definition, { + as: this.queryId + }); + } + /** + * Generates and executes a query that is offsetted by the number of documents + * we have in the store. + */ + + }, { + key: "fetchMore", + value: function fetchMore() { + var rawResult = this.currentRawResult(); + return rawResult.bookmark ? this.client.query(this.definition.offsetBookmark(rawResult.bookmark), { + as: this.queryId + }) : this.client.query(this.definition.offset(rawResult.data.length), { + as: this.queryId + }); + } + }, { + key: "currentRawResult", + value: function currentRawResult() { + return (0, _store.getRawQueryFromState)(this.getStore().getState(), this.queryId); + } + }, { + key: "notifyObservers", + value: function notifyObservers() { + var _this2 = this; + + Object.keys(this.observers).forEach(function (id) { + return _this2.observers[id](); + }); + } + }, { + key: "subscribeToStore", + value: function subscribeToStore() { + if (this._unsubscribeStore) { + throw new Error('ObservableQuery instance is already subscribed to store.'); + } + + this._unsubscribeStore = this.getStore().subscribe(this.handleStoreChange); + } + }, { + key: "unsubscribeFromStore", + value: function unsubscribeFromStore() { + if (!this._unsubscribeStore) { + throw new Error('ObservableQuery instance is not subscribed to store'); + } + + this._unsubscribeStore(); + } + }, { + key: "subscribe", + value: function subscribe(callback) { + var _this3 = this; + + var callbackId = this.idCounter; + this.idCounter++; + this.observers[callbackId] = callback; + + if (Object.keys(this.observers).length === 1) { + this.subscribeToStore(); + } + + return function () { + return _this3.unsubscribe(callbackId); + }; + } + }, { + key: "unsubscribe", + value: function unsubscribe(callbackId) { + if (!this.observers[callbackId]) { + throw new Error("Cannot unsubscribe unknown callbackId ".concat(callbackId)); + } + + delete this.observers[callbackId]; + + if (Object.keys(this.observers).length === 0) { + this.unsubscribeFromStore(); + this._unsubscribeStore = null; + } + } + }, { + key: "getStore", + value: function getStore() { + return this.client.store; + } + }]); + return ObservableQuery; +}(); + +exports.default = ObservableQuery; + +function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +/***/ }), + +/***/ "TMOa": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Cw3s"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Menu__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "TMd+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 22.1.3.13 Array.prototype.join(separator) +var $export = __webpack_require__("LRPZ"); +var toIObject = __webpack_require__("764U"); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (__webpack_require__("pTfQ") != Object || !__webpack_require__("QLBk")(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), + +/***/ "TNNU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableSortLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XyWS"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableSortLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "TNmm": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = __webpack_require__("LRPZ"); +var setProto = __webpack_require__("DWlN"); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "TQc+": +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), + +/***/ "TXAW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var Secret = function Secret(data) { + Object.assign(this, data); + return this; +}; + +Secret.prototype.toString = function () { + throw new Error('Cannot convert Secret to string'); +}; + +module.exports = Secret; + +/***/ }), + +/***/ "TbTh": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Afficher le menu latéral\",\"profile\":\"Profil\",\"plans\":\"Forfait\",\"permissions\":\"Permissions\",\"connectedDevices\":\"Appareils connectés\",\"connections\":\"Connexions\",\"storage\":\"Stockage\",\"storage_phrase\":\"%{diskUsage} Go sur %{diskQuota} Go\",\"help\":\"Manuel d'utilisation\",\"contact\":\"Nous contacter\",\"logout\":\"Déconnexion\",\"soon\":\"à venir\",\"error_UnavailableStack\":\"Connexion à la stack impossible (connection timed-out)\",\"error_UnauthorizedStack\":\"Des permissions sont manquante, l'application ne peut accéder aux ressources demandées.\",\"no_apps\":\"Pas d'applications Cozy trouvées.\",\"menu\":{\"apps\":\"Applications\",\"settings\":\"Paramètres\",\"home_mobile\":\"Retour vers le tableau de bord...\",\"home\":\"Retour vers le tableau de bord\",\"home_title\":\"Accueil \"},\"Categories\":{\"cozy\":\"Apps Cozy\",\"partners\":\"Expérimentation MesInfos\",\"ptnb\":\"Expérimentation Carnet du logement\",\"others\":\"Autres apps\"},\"claudy\":{\"title\":\"Comment utiliser votre Cozy ?\"},\"permsModal\":{\"title\":\"Accéder à ton Cozy à partir de ton application\",\"description\":\"Autoriser %{app} à afficher les applications de ton Cozy sur cet appareil\",\"button\":\"Autoriser l'accès\"},\"comingSoon\":{\"store\":{\"title\":\"L'application Store sera bientôt disponible dans votre Cozy\",\"description\":\"Grâce à cozy Store vous pourrez installer les applications que vous souhaitez sur votre Cozy.\"}},\"banner\":{\"tos-updated\":{\"description\":\"Dans le cadre du RGPD, Cozy Cloud met à jour ses Conditions Générales d'Utilisation qui ont pris effet le 25 Mai 2018\",\"CTA\":\"Lire maintenant\"}}}"); + +/***/ }), + +/***/ "TbkX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Badge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ls/u"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Badge__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "TctG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; }); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("rDuK"); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3AVn"); + + + + + + +function omit(input, fields) { + var output = {}; + Object.keys(input).forEach(function (prop) { + if (fields.indexOf(prop) === -1) { + output[prop] = input[prop]; + } + }); + return output; +} + +var warnedOnce = false; + +function styleFunctionSx(styleFunction) { + var newStyleFunction = function newStyleFunction(props) { + var output = styleFunction(props); + + if (props.css) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, Object(_merge__WEBPACK_IMPORTED_MODULE_4__["default"])(output, styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + theme: props.theme + }, props.css))), omit(props.css, [styleFunction.filterProps])); + } + + if (props.sx) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, Object(_merge__WEBPACK_IMPORTED_MODULE_4__["default"])(output, styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + theme: props.theme + }, props.sx))), omit(props.sx, [styleFunction.filterProps])); + } + + return output; + }; + + newStyleFunction.propTypes = false ? undefined : {}; + newStyleFunction.filterProps = ['css', 'sx'].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(styleFunction.filterProps)); + return newStyleFunction; +} +/** + * + * @deprecated + * The css style function is deprecated. Use the `styleFunctionSx` instead. + */ + + +function css(styleFunction) { + if (false) {} + + return styleFunctionSx(styleFunction); +} +/* harmony default export */ __webpack_exports__["default"] = (styleFunctionSx); + +/***/ }), + +/***/ "Td2o": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// http://262.ecma-international.org/5.1/#sec-9.11 + +module.exports = __webpack_require__("5RFn"); + + +/***/ }), + +/***/ "TlDL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CardMedia__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c4+P"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _CardMedia__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "TlHu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getIllegalCharacters = void 0; + +/** + * Get the list of illegal characters in the file name + * + * @public + * @param {string} name - the file name + * @returns {string} illegal characters separated by spaces + */ +var getIllegalCharacters = function getIllegalCharacters(name) { + var FILENAME_ILLEGAL_CHARACTERS = /\/|\x00|\n|\r/g; // eslint-disable-line no-control-regex + + var match = name.match(FILENAME_ILLEGAL_CHARACTERS); + return match ? match.join(' ') : ''; +}; + +exports.getIllegalCharacters = getIllegalCharacters; + +/***/ }), + +/***/ "TrIy": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.12 Object.isFrozen(O) +var isObject = __webpack_require__("pFmr"); + +__webpack_require__("80eX")('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + + +/***/ }), + +/***/ "Tso9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.triggers = exports.triggerStates = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _account = __webpack_require__("V9T3"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var actionableErrors = ['CHALLENGE_ASKED', 'DISK_QUOTA_EXCEEDED', 'TERMS_VERSION_MISMATCH', 'USER_ACTION_NEEDED', 'USER_ACTION_NEEDED.CHANGE_PASSWORD', 'USER_ACTION_NEEDED.ACCOUNT_REMOVED', 'USER_ACTION_NEEDED.WEBAUTH_REQUIRED', 'USER_ACTION_NEEDED.SCA_REQUIRED', 'LOGIN_FAILED']; +/** Trigger states come from /jobs/triggers */ + +var triggerStates = { + /** + * Returns when the trigger was last executed + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {String} last execution date of any job related to the given trigger + */ + getLastExecution: function getLastExecution(trigger) { + var _trigger$current_stat; + + return trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat = trigger.current_state) === null || _trigger$current_stat === void 0 ? void 0 : _trigger$current_stat.last_execution; + }, + + /** + * Returns when the trigger was last executed with success + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {String} last execution date of any job related to the given trigger and with success + */ + getLastSuccess: function getLastSuccess(trigger) { + var _trigger$current_stat2; + + return trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat2 = trigger.current_state) === null || _trigger$current_stat2 === void 0 ? void 0 : _trigger$current_stat2.last_success; + }, + + /** + * Returns when the trigger was last executed with success + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {String} last execution date of any job related to the given trigger and with success + */ + getLastsuccess: function getLastsuccess(trigger) { + var _trigger$current_stat3; + + _logger.default.warn('Deprecated, please use getLastSuccess instead of getLastsuccess'); + + return trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat3 = trigger.current_state) === null || _trigger$current_stat3 === void 0 ? void 0 : _trigger$current_stat3.last_success; + }, + + /** + * Returns whether last job failed + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {Boolean} + */ + isErrored: function isErrored(trigger) { + var _trigger$current_stat4; + + return (trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat4 = trigger.current_state) === null || _trigger$current_stat4 === void 0 ? void 0 : _trigger$current_stat4.status) === 'errored'; + }, + + /** + * Returns the type of the last error to occur + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {String} + */ + getLastErrorType: function getLastErrorType(trigger) { + var _trigger$current_stat5; + + return trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat5 = trigger.current_state) === null || _trigger$current_stat5 === void 0 ? void 0 : _trigger$current_stat5.last_error; + } +}; +exports.triggerStates = triggerStates; +var DEFAULT_CRON = '0 0 0 * * 0'; // Once a week, sunday at midnight + +var triggers = { + /** + * Returns whether the given trigger is associated to a konnector or not + * + * @param {import('../types').IOCozyTrigger} trigger - trigger object + * @returns {Boolean} + */ + isKonnectorWorker: function isKonnectorWorker(trigger) { + return trigger.worker === 'konnector'; + }, + + /** + * Returns the konnector slug that executed a trigger + * + * @param {import('../types').IOCozyTrigger} trigger - io.cozy.triggers + * + * @returns {string|void} A konnector slug + */ + getKonnector: function getKonnector(trigger) { + if (!triggers.isKonnectorWorker(trigger)) { + return null; + } + + if (trigger.message && trigger.message.konnector) { + return trigger.message.konnector; + } else if (trigger.message && trigger.message.Data) { + // Legacy triggers + var message = JSON.parse(atob(trigger.message.Data)); + return message.konnector; + } + }, + + /** + * getAccountId - Returns the account id for a trigger + * + * @param {import('../types').IOCozyTrigger} trigger io.cozy.triggers + * + * @returns {String} Id for an io.cozy.accounts + */ + getAccountId: function getAccountId(trigger) { + var _trigger$message; + + var legacyData = trigger === null || trigger === void 0 ? void 0 : (_trigger$message = trigger.message) === null || _trigger$message === void 0 ? void 0 : _trigger$message.Data; + + if (legacyData) { + var message = JSON.parse(atob(legacyData)); + return message.account; + } else { + var _trigger$message2; + + return trigger === null || trigger === void 0 ? void 0 : (_trigger$message2 = trigger.message) === null || _trigger$message2 === void 0 ? void 0 : _trigger$message2.account; + } + }, + + /** + * Checks if the triggers current error has been muted in the corresponding io.cozy.accounts + * + * @param {import('../types').IOCozyTrigger} trigger io.cozy.triggers + * @param {import('../types').IOCozyAccount} account io.cozy.accounts used by the trigger + * + * @returns {Boolean} Whether the error is muted or not + */ + isLatestErrorMuted: function isLatestErrorMuted(trigger, account) { + var lastErrorType = triggerStates.getLastErrorType(trigger); + var lastSuccess = triggerStates.getLastSuccess(trigger); + var lastSuccessDate = lastSuccess ? new Date(lastSuccess) : new Date(); + var mutedErrors = (0, _account.getMutedErrors)(account); + var isErrorMuted = mutedErrors.some(function (mutedError) { + return mutedError.type === lastErrorType && (!lastSuccess || new Date(mutedError.mutedAt) > lastSuccessDate); + }); + return isErrorMuted; + }, + + /** + * Returns whether the error in trigger can be solved by the user + * + * @param {import('../types').IOCozyTrigger} trigger io.cozy.triggers + * + * @returns {Boolean} Whether the error is muted or not + */ + hasActionableError: function hasActionableError(trigger) { + var _trigger$current_stat6; + + return actionableErrors.includes(trigger === null || trigger === void 0 ? void 0 : (_trigger$current_stat6 = trigger.current_state) === null || _trigger$current_stat6 === void 0 ? void 0 : _trigger$current_stat6.last_error); + }, + + /** + * Build trigger attributes given konnector and account + * + * @param {Object} options - options object + * @param {import('../types').IOCozyKonnector} options.konnector - konnector object + * @param {import('../types').IOCozyAccount} options.account - account object + * @param {String} [options.cron] - cron string. Defaults to '0 0 0 * * 0' + * @param {object} [options.folder] - folder object + * @returns {import('../types').IOCozyTrigger} created trigger + */ + buildTriggerAttributes: function buildTriggerAttributes(_ref) { + var account = _ref.account, + _ref$cron = _ref.cron, + cron = _ref$cron === void 0 ? DEFAULT_CRON : _ref$cron, + folder = _ref.folder, + konnector = _ref.konnector; + var message = { + account: account._id, + konnector: konnector.slug + }; + + if (folder) { + message['folder_to_save'] = folder._id; + } + + var result = { + worker: 'konnector', + message: message + }; + var options = konnector.clientSide ? { + type: '@client' + } : { + type: '@cron', + arguments: cron + }; + return _objectSpread(_objectSpread({}, result), options); + } +}; +exports.triggers = triggers; + +/***/ }), + +/***/ "TtpO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var brown = { + 50: '#efebe9', + 100: '#d7ccc8', + 200: '#bcaaa4', + 300: '#a1887f', + 400: '#8d6e63', + 500: '#795548', + 600: '#6d4c41', + 700: '#5d4037', + 800: '#4e342e', + 900: '#3e2723', + A100: '#d7ccc8', + A200: '#bcaaa4', + A400: '#8d6e63', + A700: '#5d4037' +}; +/* harmony default export */ __webpack_exports__["default"] = (brown); + +/***/ }), + +/***/ "Tu0e": +/***/ (function(module, exports, __webpack_require__) { + +var hashClear = __webpack_require__("2GSc"), + hashDelete = __webpack_require__("Ri2D"), + hashGet = __webpack_require__("AJRS"), + hashHas = __webpack_require__("L3Nm"), + hashSet = __webpack_require__("wTd/"); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; + + +/***/ }), + +/***/ "Tusy": +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__("lBlV"); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; + + +/***/ }), + +/***/ "Tven": +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__("pFmr"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ "TxVH": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Module +exports.push([module.i, "/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n.loader {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n.loader.gold {\n color: #b2901b;\n}\n.loader.gaz {\n color: #45d1b8;\n}\n.loader.elec {\n color: #d87b39;\n}\n.loader.water {\n color: #3a98ec;\n}\n.loader.black {\n color: #242633;\n}\n.loader .bars {\n height: 50px;\n margin: auto;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n gap: 8px;\n}\n.loader .bars .bar {\n width: 10px;\n border-radius: 5px;\n background: currentColor;\n animation: load 0.4s -0.4s linear infinite alternate;\n}\n.loader .bars .bar:nth-child(1) {\n animation-delay: -0.1s;\n}\n.loader .bars .bar:nth-child(3) {\n animation-delay: -0.55s;\n}\n@keyframes load {\n 0% {\n height: 20%;\n }\n 100% {\n height: 100%;\n }\n}", ""]); + + + +/***/ }), + +/***/ "Tyf5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserClient", function() { return BrowserClient; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Bp2Q"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("uDQB"); +/* harmony import */ var _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Strw"); + + + + + + +/** + * The Sentry Browser SDK Client. + * + * @see BrowserOptions for documentation on configuration options. + * @see SentryClient for usage documentation. + */ +class BrowserClient extends _sentry_core__WEBPACK_IMPORTED_MODULE_0__["BaseClient"] { + /** + * Creates a new Browser SDK instance. + * + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}; + options._metadata.sdk = options._metadata.sdk || { + name: 'sentry.javascript.browser', + packages: [ + { + name: 'npm:@sentry/browser', + version: _sentry_core__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"], + }, + ], + version: _sentry_core__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"], + }; + + super(options); + + if (options.sendClientReports && _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document) { + _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document.addEventListener('visibilitychange', () => { + if (_helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document.visibilityState === 'hidden') { + this._flushOutcomes(); + } + }); + } + } + + /** + * @inheritDoc + */ + eventFromException(exception, hint) { + return Object(_eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__["eventFromException"])(this._options.stackParser, exception, hint, this._options.attachStacktrace); + } + + /** + * @inheritDoc + */ + eventFromMessage( + message, + // eslint-disable-next-line deprecation/deprecation + level = 'info', + hint, + ) { + return Object(_eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__["eventFromMessage"])(this._options.stackParser, message, level, hint, this._options.attachStacktrace); + } + + /** + * @inheritDoc + */ + sendEvent(event, hint) { + // We only want to add the sentry event breadcrumb when the user has the breadcrumb integration installed and + // activated its `sentry` option. + // We also do not want to use the `Breadcrumbs` class here directly, because we do not want it to be included in + // bundles, if it is not used by the SDK. + // This all sadly is a bit ugly, but we currently don't have a "pre-send" hook on the integrations so we do it this + // way for now. + const breadcrumbIntegration = this.getIntegrationById(_integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_4__["BREADCRUMB_INTEGRATION_ID"]) ; + if ( + breadcrumbIntegration && + // We check for definedness of `options`, even though it is not strictly necessary, because that access to + // `.sentry` below does not throw, in case users provided their own integration with id "Breadcrumbs" that does + // not have an`options` field + breadcrumbIntegration.options && + breadcrumbIntegration.options.sentry + ) { + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb( + { + category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`, + event_id: event.event_id, + level: event.level, + message: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getEventDescription"])(event), + }, + { + event, + }, + ); + } + + super.sendEvent(event, hint); + } + + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope) { + event.platform = event.platform || 'javascript'; + return super._prepareEvent(event, hint, scope); + } + + /** + * Sends client reports as an envelope. + */ + _flushOutcomes() { + const outcomes = this._clearOutcomes(); + + if (outcomes.length === 0) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('No outcomes to send'); + return; + } + + if (!this._dsn) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('No dsn provided, will not send outcomes'); + return; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Sending outcomes:', outcomes); + + const url = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getEnvelopeEndpointWithUrlEncodedAuth"])(this._dsn, this._options); + const envelope = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["createClientReportEnvelope"])(outcomes, this._options.tunnel && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dsnToString"])(this._dsn)); + + try { + const isRealNavigator = Object.prototype.toString.call(_helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"] && _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].navigator) === '[object Navigator]'; + const hasSendBeacon = isRealNavigator && typeof _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].navigator.sendBeacon === 'function'; + // Make sure beacon is not used if user configures custom transport options + if (hasSendBeacon && !this._options.transportOptions) { + // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch + const sendBeacon = _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].navigator.sendBeacon.bind(_helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].navigator); + sendBeacon(url, Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["serializeEnvelope"])(envelope)); + } else { + // If beacon is not supported or if they are using the tunnel option + // use our regular transport to send client reports to Sentry. + this._sendEnvelope(envelope); + } + } catch (e) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error(e); + } + } +} + + +//# sourceMappingURL=client.js.map + + +/***/ }), + +/***/ "U9vJ": +/***/ (function(module, exports, __webpack_require__) { + +var LazyWrapper = __webpack_require__("czPI"), + LodashWrapper = __webpack_require__("e9eL"), + baseLodash = __webpack_require__("ajN4"), + isArray = __webpack_require__("8u9v"), + isObjectLike = __webpack_require__("S5PF"), + wrapperClone = __webpack_require__("Qcxn"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; +lodash.prototype.constructor = lodash; + +module.exports = lodash; + + +/***/ }), + +/***/ "UCvF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "handleBreakpoints", function() { return handleBreakpoints; }); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("j9Ms"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3AVn"); + + + + + // The breakpoint **start** at this value. +// For instance with the first breakpoint xs: [xs, sm[. + +var values = { + xs: 0, + sm: 600, + md: 960, + lg: 1280, + xl: 1920 +}; +var defaultBreakpoints = { + // Sorted ASC by size. That's important. + // It can't be configured as it's used statically for propTypes. + keys: ['xs', 'sm', 'md', 'lg', 'xl'], + up: function up(key) { + return "@media (min-width:".concat(values[key], "px)"); + } +}; +function handleBreakpoints(props, propValue, styleFromPropValue) { + if (false) {} + + if (Array.isArray(propValue)) { + var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints; + return propValue.reduce(function (acc, item, index) { + acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]); + return acc; + }, {}); + } + + if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(propValue) === 'object') { + var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints; + + return Object.keys(propValue).reduce(function (acc, breakpoint) { + acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]); + return acc; + }, {}); + } + + var output = styleFromPropValue(propValue); + return output; +} + +function breakpoints(styleFunction) { + var newStyleFunction = function newStyleFunction(props) { + var base = styleFunction(props); + var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints; + var extended = themeBreakpoints.keys.reduce(function (acc, key) { + if (props[key]) { + acc = acc || {}; + acc[themeBreakpoints.up(key)] = styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + theme: props.theme + }, props[key])); + } + + return acc; + }, null); + return Object(_merge__WEBPACK_IMPORTED_MODULE_4__["default"])(base, extended); + }; + + newStyleFunction.propTypes = false ? undefined : {}; + newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(styleFunction.filterProps)); + return newStyleFunction; +} + +/* harmony default export */ __webpack_exports__["default"] = (breakpoints); + +/***/ }), + +/***/ "UDFD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindReporter", function() { return bindReporter; }); +const bindReporter = ( + callback, + metric, + reportAllChanges, +) => { + let prevValue; + let delta; + return (forceReport) => { + if (metric.value >= 0) { + if (forceReport || reportAllChanges) { + delta = metric.value - (prevValue || 0); + + // Report the metric if there's a non-zero delta or if no previous + // value exists (which can happen in the case of the document becoming + // hidden when the metric value is 0). + // See: https://github.com/GoogleChrome/web-vitals/issues/14 + if (delta || prevValue === undefined) { + prevValue = metric.value; + metric.delta = delta; + callback(metric); + } + } + } + }; +}; + + +//# sourceMappingURL=bindReporter.js.map + + +/***/ }), + +/***/ "UDPO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fY06"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + margin: 0, + padding: '16px 24px', + flex: '0 0 auto' + } +}; +var DialogTitle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function DialogTitle(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$disableTypogra = props.disableTypography, + disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "disableTypography"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other), disableTypography ? children : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], { + component: "h2", + variant: "h6" + }, children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiDialogTitle' +})(DialogTitle)); + +/***/ }), + +/***/ "UDoN": +/***/ (function(module, exports, __webpack_require__) { + +var redefine = __webpack_require__("iNsi"); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + + +/***/ }), + +/***/ "UHhX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("xww6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Backdrop__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UImY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _dsl = __webpack_require__("v2kV"); + +var _applications = __webpack_require__("4HHt"); + +var useAppLinkWithStoreFallback = function useAppLinkWithStoreFallback(slug, client) { + var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + + var _useState = (0, _react.useState)('loading'), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + fetchStatus = _useState2[0], + setFetchStatus = _useState2[1]; + + var _useState3 = (0, _react.useState)(true), + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), + isInstalled = _useState4[0], + setIsInstalled = _useState4[1]; + + var _useState5 = (0, _react.useState)(null), + _useState6 = (0, _slicedToArray2.default)(_useState5, 2), + url = _useState6[0], + setURL = _useState6[1]; + + (0, _react.useEffect)(function () { + var load = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var apps, appDocument, appInstalled; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return client.query((0, _dsl.Q)('io.cozy.apps')); + + case 3: + apps = _context.sent; + appDocument = { + slug: slug + }; + appInstalled = (0, _applications.isInstalled)(apps.data, appDocument); + setIsInstalled(!!appInstalled); + + if (appInstalled) { + setURL((0, _applications.getUrl)(appInstalled) + path); + } else { + setURL((0, _applications.getStoreURL)(apps.data, appDocument)); + } + + setFetchStatus('loaded'); + _context.next = 14; + break; + + case 11: + _context.prev = 11; + _context.t0 = _context["catch"](0); + setFetchStatus('errored'); + + case 14: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 11]]); + })); + + return function load() { + return _ref.apply(this, arguments); + }; + }(); + + load(); + }, [client, slug, path]); + return { + fetchStatus: fetchStatus, + isInstalled: isInstalled, + url: url + }; +}; + +var _default = useAppLinkWithStoreFallback; +exports.default = _default; + +/***/ }), + +/***/ "UJ5a": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(setImmediate) {/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function f(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<g(e,b))a[d]=b,a[c]=e,c=d;else break a}}function h(a){return 0===a.length?null:a[0]}function k(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,w=e>>>1;d<w;){var m=2*(d+1)-1,C=a[m],n=m+1,x=a[n];if(0>g(C,c))n<e&&0>g(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(n<e&&0>g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b} +function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null; +"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}} +function J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1; +function M(){return exports.unstable_now()-Q<P?!1:!0}function R(){if(null!==O){var a=exports.unstable_now();Q=a;var b=!0;try{b=O(!0,a)}finally{b?S():(N=!1,O=null)}}else N=!1}var S;if("function"===typeof F)S=function(){F(R)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,U=T.port2;T.port1.onmessage=R;S=function(){U.postMessage(null)}}else S=function(){D(R,0)};function I(a){O=a;N||(N=!0,S())}function K(a,b){L=D(function(){a(exports.unstable_now())},b)} +exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){A||z||(A=!0,I(J))}; +exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<a?Math.floor(1E3/a):5};exports.unstable_getCurrentPriorityLevel=function(){return y};exports.unstable_getFirstCallbackNode=function(){return h(r)};exports.unstable_next=function(a){switch(y){case 1:case 2:case 3:var b=3;break;default:b=y}var c=y;y=b;try{return a()}finally{y=c}};exports.unstable_pauseExecution=function(){}; +exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=y;y=a;try{return b()}finally{y=c}}; +exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:u++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a}; +exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}}; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("6aqz").setImmediate)) + +/***/ }), + +/***/ "UMYs": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.start = void 0; + +var _helpers = __webpack_require__("6cet"); + +function listenClientData(intent, window) { + return new Promise(function (resolve) { + var messageEventListener = function messageEventListener(event) { + if (event.origin !== intent.attributes.client) return; + window.removeEventListener('message', messageEventListener); + resolve(event.data); + }; + + window.addEventListener('message', messageEventListener); + window.parent.postMessage({ + type: "intent-".concat(intent._id, ":ready") + }, intent.attributes.client); + }); +} // maximize the height of an element + + +function maximize(element) { + if (element && element.style) { + element.style.height = '100%'; + } +} + +var start = function start(request) { + return function (intentIdArg, serviceWindowArg) { + var serviceWindow = serviceWindowArg || typeof window !== 'undefined' && window; + + if (!serviceWindow || !serviceWindow.document) { + return Promise.reject(new Error('Intent service should be used in browser')); + } // Maximize document, the whole iframe is handled by intents, clients and + // services + + + serviceWindow.addEventListener('load', function () { + var document = serviceWindow.document; + [document.documentElement, document.body].forEach(maximize); + }); + var intentId = intentIdArg || serviceWindow.location.search.split('=')[1]; + if (!intentId) return Promise.reject(new Error('Cannot retrieve intent from URL')); + return request.get(intentId).then(function (intent) { + var terminated = false; + + var sendMessage = function sendMessage(message) { + if (terminated) throw new Error('Intent service has already been terminated'); + serviceWindow.parent.postMessage(message, intent.attributes.client); + }; + + var compose = function compose(action, doctype, data) { + return new Promise(function (resolve) { + var composeEventListener = function composeEventListener(event) { + if (event.origin !== intent.attributes.client) return; + serviceWindow.removeEventListener('message', composeEventListener); + return resolve(event.data); + }; + + serviceWindow.addEventListener('message', composeEventListener); + sendMessage({ + type: "intent-".concat(intent._id, ":compose"), + action: action, + doctype: doctype, + data: data + }); + }); + }; + + var _terminate = function terminate(message) { + sendMessage(message); + terminated = true; + }; + + var resizeClient = function resizeClient(dimensions, transitionProperty) { + if (terminated) throw new Error('Intent service has been terminated'); + sendMessage({ + type: "intent-".concat(intent._id, ":resize"), + // if a dom element is passed, calculate its size + dimensions: dimensions.element ? Object.assign({}, dimensions, { + maxHeight: dimensions.element.clientHeight, + maxWidth: dimensions.element.clientWidth + }) : dimensions, + transition: transitionProperty + }); + }; + + var cancel = function cancel() { + _terminate({ + type: "intent-".concat(intent._id, ":cancel") + }); + }; // Prevent unfulfilled client promises when this window unloads for a + // reason or another. + + + serviceWindow.addEventListener('unload', function () { + if (!terminated) cancel(); + }); + return listenClientData(intent, serviceWindow).then(function (data) { + return { + compose: compose, + getData: function getData() { + return data; + }, + getIntent: function getIntent() { + return intent; + }, + terminate: function terminate(doc) { + var eventName = data && data.exposeIntentFrameRemoval ? 'exposeFrameRemoval' : 'done'; + return _terminate({ + type: "intent-".concat(intent._id, ":").concat(eventName), + document: doc + }); + }, + throw: function _throw(error) { + return _terminate({ + type: "intent-".concat(intent._id, ":error"), + error: _helpers.errorSerializer.serialize(error) + }); + }, + resizeClient: resizeClient, + cancel: cancel + }; + }); + }); + }; +}; + +exports.start = start; + +/***/ }), + +/***/ "UPk3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useEventCallback; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"]; +/** + * https://github.com/facebook/react/issues/14099#issuecomment-440013892 + * + * @param {function} fn + */ + +function useEventCallback(fn) { + var ref = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](fn); + useEnhancedEffect(function () { + ref.current = fn; + }); + return react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function () { + return (0, ref.current).apply(void 0, arguments); + }, []); +} + +/***/ }), + +/***/ "UQCX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("HFC8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _LinearProgress__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UQKm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return connectAdvanced; }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("I4/v"); +/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("muMs"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6vz+"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ak+c"); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("xIul"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("qiP9"); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("OuGR"); + + + + + + + + + + +var hotReloadingVersion = 0; +var dummyState = {}; + +function noop() {} + +function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + } + }; + return selector; +} + +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_3__["default"])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["storeShape"], _contextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["subscriptionShape"], _contextTypes); + var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["subscriptionShape"], _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + invariant__WEBPACK_IMPORTED_MODULE_5___default()(Object(react_is__WEBPACK_IMPORTED_MODULE_7__["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent))); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + + }); + + var Connect = + /*#__PURE__*/ + function (_Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(_this))); + invariant__WEBPACK_IMPORTED_MODULE_5___default()(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\".")); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3; + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + invariant__WEBPACK_IMPORTED_MODULE_5___default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call.")); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new _utils_Subscription__WEBPACK_IMPORTED_MODULE_8__["default"](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(react__WEBPACK_IMPORTED_MODULE_6__["createElement"])(WrappedComponent, this.addExtraProps(selector.props)); + } + }; + + return Connect; + }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); + /* eslint-enable react/no-deprecated */ + + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (false) {} + + return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(Connect, WrappedComponent); + }; +} + +/***/ }), + +/***/ "UTF8": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Module +exports.push([module.i, "html{--primaryFont:Lato,sans-serif}body,body button,body input,body optgroup,body select,body textarea{font-family:var(--primaryFont)}@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}:root{--invertedBackgroundColor:#297ef2;--invertedContrastTextColor:#fff}.CozyTheme--inverted{--primaryTextColor:#fff;--secondaryTextColor:rgba(255,255,255,0.64);--disabledTextColor:rgba(255,255,255,0.4);--hintTextColor:rgba(255,255,255,0.4);--iconTextColor:#fff;--actionColorActive:#fff;--actionColorHover:rgba(255,255,255,0.08);--actionColorSelected:rgba(255,255,255,0.16);--actionColorDisabled:rgba(255,255,255,0.32);--actionColorDisabledBackground:rgba(255,255,255,0.12);--actionColorFocus:rgba(255,255,255,0.24);--actionColorGhost:rgba(255,255,255,0.08);--actionColorHoverGhost:rgba(255,255,255,0.16);--dividerColor:rgba(255,255,255,0.16);--borderMainColor:rgba(255,255,255,0.24);--borderDisabledColor:rgba(255,255,255,0.12);--borderGhostColor:rgba(255,255,255,0.48);--borderGhostDisabledColor:rgba(255,255,255,0.24);--paperBackgroundColor:#297ef2;--defaultBackgroundColor:#579eff;--contrastBackgroundColor:rgba(255,255,255,0.12);--primaryColorLight:#fff;--primaryColor:#fff;--primaryColorDark:#eaf3ff;--primaryContrastTextColor:#297ef2;--secondaryColorLight:#f8eefd;--secondaryColor:#ecd7f7;--secondaryColorDark:#deb8f0;--secondaryContrastTextColor:rgba(29,33,42,0.9);--errorColorLight:#ffecec;--errorColor:#ffd3d3;--errorColorDark:#ffb9b9;--errorColorContrastText:rgba(29,33,42,0.9);--errorBackground:#d31f1f;--warningColorLight:#fff3dd;--warningColor:#ffe4b5;--warningColorDark:#ffd58b;--warningColorContrastText:rgba(29,33,42,0.9);--successColorLight:#e3ffe7;--successColor:#c0f4c6;--successColorDark:#97eca1;--successColorContrastText:rgba(29,33,42,0.9);--infoColorLight:#d4feff;--infoColor:#affdff;--infoColorDark:#86f5f7;--infoColorContrastText:rgba(29,33,42,0.9);--iconColor:currentColor;--textIconColor:#fff;--actionMenuIconColor:#fff;--barIconColor:#fff;--barIconColorDisabled:rgba(255,255,255,0.88);--spinnerColor:#fff;--linkColor:#fff;--linkColorActive:#fff;--linkTextDecoration:underline;--regularButtonPrimaryColor:#fff;--regularButtonSecondaryColor:#fff;--regularButtonActiveColor:rgba(255,255,255,0.88);--regularButtonConstrastColor:#297ef2;--secondaryButtonPrimaryColor:#297ef2;--secondaryButtonSecondaryColor:#fff;--secondaryButtonActiveColor:rgba(255,255,255,0.24);--secondaryButtonContrastColor:#fff;--dividerColor2:rgba(255,255,255,0.16)}html{--grey0:#fff;--grey50:#f9fafb;--grey100:#f4f5f6;--grey200:#eceff1;--grey300:#dde0e3;--grey400:#bfc3c7;--grey500:#9da2a6;--grey600:#7c8086;--grey700:#5d6169;--grey800:#3e424a;--grey900:#1d212a;--greyA100:#d3d6d8;--greyA200:#a7abaf;--greyA400:#2c3039;--greyA700:#5d6169;--white:#fff;--paleGrey:#f5f6f7;--silver:#d6d8da;--coolGrey:#95999d;--slateGrey:#5d6165;--charcoalGrey:#32363f;--black:#000;--overlay:rgba(50,54,63,0.5);--zircon:#f5faff;--dodgerBlue:#297ef2;--scienceBlue:#0b61d6;--weirdGreen:#40de8e;--emerald:#35ce68;--malachite:#08b442;--mango:#ff962f;--chablis:#fff2f2;--yourPink:#fdcbcb;--fuchsia:#fc4c83;--pomegranate:#f52d2d;--monza:#dd0505}html,.CozyTheme--normal{--primaryColorLightest:#b3d3ff;--primaryColorLight:#579eff;--primaryColor:#297ef2;--primaryColorDark:#0f5cc7;--primaryContrastTextColor:#fff;--secondaryColorLightest:#ffd3d3;--secondaryColorLight:#f96b6b;--secondaryColor:#ea3f3f;--secondaryColorDark:#d31f1f;--secondaryContrastTextColor:#fff;--primaryBackgroundLight:#f7faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f4f5f6;--contrastBackgroundColor:rgba(29,33,42,0.048);--primaryTextColor:rgba(29,33,42,0.9);--secondaryTextColor:rgba(29,33,42,0.48);--disabledTextColor:rgba(29,33,42,0.32);--hintTextColor:rgba(29,33,42,0.32);--iconTextColor:rgba(29,33,42,0.72);--actionColorActive:rgba(29,33,42,0.56);--actionColorHover:rgba(29,33,42,0.04);--actionColorSelected:rgba(29,33,42,0.08);--actionColorDisabled:rgba(29,33,42,0.24);--actionColorDisabledBackground:rgba(29,33,42,0.12);--actionColorFocus:rgba(29,33,42,0.12);--actionColorGhost:rgba(29,33,42,0.08);--actionColorHoverGhost:rgba(29,33,42,0.16);--borderMainColor:rgba(29,33,42,0.16);--borderDisabledColor:rgba(29,33,42,0.08);--borderGhostColor:rgba(29,33,42,0.48);--borderGhostDisabledColor:rgba(29,33,42,0.16);--dividerColor:rgba(29,33,42,0.12);--successColorLight:#38c949;--successColor:#09ae1c;--successColorDark:#018711;--successColorContrastText:#fff;--warningColorLight:#efa82d;--warningColor:#cb8100;--warningColorDark:#986100;--warningColorContrastText:#fff;--errorColorLightest:#ffecec;--errorColorLight:#f96b6b;--errorColor:#ea3f3f;--errorColorDark:#d31f1f;--errorBackground:#ffecec;--errorColorContrastText:#fff;--infoColorLight:#0ec4c7;--infoColor:#009fa2;--infoColorDark:#007578;--infoColorContrastText:#fff;--spinnerColor:var(--primaryColor);--linkColor:var(--primaryColor);--linkTextDecoration:none;--linkColorActive:var(--primaryColorDark);--invertedTabsActiveTextColor:var(--primaryContrastTextColor);--invertedTabsInactiveTextColor:var(--primaryContrastTextColor);--invertedTabsIndicatorColor:var(--primaryContrastTextColor);--invertedTabsBackgroundColor:var(--primaryColor);--regularButtonPrimaryColor:var(--primaryColor);--regularButtonSecondaryColor:var(--primaryColor);--regularButtonActiveColor:var(--primaryColorDark);--regularButtonConstrastColor:var(--primaryContrastTextColor);--secondaryButtonPrimaryColor:#fff;--secondaryButtonSecondaryColor:var(--silver);--secondaryButtonActiveColor:var(--silver);--secondaryButtonContrastColor:var(--black);--dividerColor2:var(--coolGrey);--iconColor:currentColor;--textIconColor:var(--charcoalGrey);--actionMenuIconColor:var(--slateGrey);--neutralBackground:var(--paleGrey);--buttonTextTransform:uppercase;--buttonBorderRadius:.125rem;--navTextColor:var(--slateGrey);--navTextActiveColor:var(--slateGrey);--navTextHoverColor:var(--charcoalGrey);--alertErrorColor:#fff;--alertErrorBackgroundColor:var(--errorColor);--alertSuccessColor:#fff;--alertSuccessBackgroundColor:var(--successColor);--alertInfoColor:#fff;--alertInfoBackgroundColor:var(--slateGrey)}.u-elevation-1{box-shadow:0 4px 12px 0 rgba(0,0,0,0.08);border:1px solid rgba(0,0,0,0.08)}html{--zIndex-below:-1;--zIndex-app:0;--zIndex-low:1;--zIndex-alertMobile:10;--zIndex-nav:20;--zIndex-bar:21;--zIndex-selection:30;--zIndex-popover:40;--zIndex-overlay:50;--zIndex-fileActionMenu:60;--zIndex-drawer:60;--zIndex-modal:70;--zindex-alert:80}/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\nhtml{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--safe-area-inset-top:env(safe-area-inset-top);--safe-area-inset-right:env(safe-area-inset-right);--safe-area-inset-bottom:env(safe-area-inset-bottom);--safe-area-inset-left:env(safe-area-inset-left)}html{font-size:100%}body{font:100%/1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}html{height:100%}body{display:flex;flex-direction:column;align-items:stretch;width:100vw;height:100%;margin:0}@media (max-width:63.938rem){html,body{display:block;height:auto}}[role=application]{display:flex;height:inherit;flex:1 1 100%;overflow-x:hidden;overflow-y:auto}@media (max-width:63.938rem){[role=application]{overflow:visible}}html,body{background-color:var(--white);color:var(--black)}.u-visuallyhidden{position:absolute !important;border:0 !important;width:.063rem !important;height:.063rem !important;overflow:hidden !important;padding:0 !important;white-space:nowrap !important;clip:rect(.063rem,.063rem,.063rem,.063rem) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important}.u-hide{display:none !important;visibility:hidden !important}@media (max-width:63.938rem){.u-hide--mob{display:none !important}}@media (min-width:64rem){.u-hide--tablet{display:none !important}}@media (min-width:48.063rem){.u-hide--desk{display:none !important}}.u-dn{display:none}.u-di{display:inline}.u-db{display:block}.u-dib{display:inline-block}.u-dit{display:inline-table}.u-dt{display:table}.u-dtc{display:table-cell}.u-dt-row{display:table-row}.u-dt-row-group{display:table-row-group}.u-dt-column{display:table-column}.u-dt-column-group{display:table-column-group}@media (max-width:30rem){.u-dn-t{display:none}.u-di-t{display:inline}.u-db-t{display:block}.u-dib-t{display:inline-block}.u-dit-t{display:inline-table}.u-dt-t{display:table}.u-dtc-t{display:table-cell}.u-dt-row-t{display:table-row}.u-dt-row-group-t{display:table-row-group}.u-dt-column-t{display:table-column}.u-dt-column-group-t{display:table-column-group}}@media (max-width:48rem){.u-dn-s{display:none}.u-di-s{display:inline}.u-db-s{display:block}.u-dib-s{display:inline-block}.u-dit-s{display:inline-table}.u-dt-s{display:table}.u-dtc-s{display:table-cell}.u-dt-row-s{display:table-row}.u-dt-row-group-s{display:table-row-group}.u-dt-column-s{display:table-column}.u-dt-column-group-s{display:table-column-group}}@media (max-width:63.938rem){.u-dn-m{display:none}.u-di-m{display:inline}.u-db-m{display:block}.u-dib-m{display:inline-block}.u-dit-m{display:inline-table}.u-dt-m{display:table}.u-dtc-m{display:table-cell}.u-dt-row-m{display:table-row}.u-dt-row-group-m{display:table-row-group}.u-dt-column-m{display:table-column}.u-dt-column-group-m{display:table-column-group}}.u-black{color:var(--black) !important}.u-charcoalGrey{color:var(--charcoalGrey) !important}.u-coolGrey{color:var(--coolGrey) !important}.u-silver{color:var(--silver) !important}.u-slateGrey{color:var(--slateGrey) !important}.u-lightishPurple{color:#b449e7 !important}.u-dodgerBlue{color:#297ef2 !important}.u-overlay{color:var(--overlay) !important}.u-paleGrey{color:var(--paleGrey) !important}.u-monza{color:#dd0505 !important}.u-pomegranate{color:#f52d2d !important}.u-primaryBackgroundLight{color:var(--primaryBackgroundLight) !important}.u-primaryColor{color:var(--primaryColor) !important}.u-primaryColorLight{color:var(--primaryColorLight) !important}.u-primaryContrastTextColor{color:var(--primaryContrastTextColor) !important}.u-error{color:var(--errorColor) !important}.u-errorBackground{color:var(--errorBackground) !important}.u-success{color:var(--successColor) !important}.u-warning{color:var(--warningColor) !important}.u-info{color:var(--infoColor) !important}.u-weirdGreen{color:#40de8e !important}.u-white{color:var(--white) !important}.u-breakword{word-break:break-word}.u-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.u-spacellipsis{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}@media (max-width:30rem){.u-spacellipsis-t{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}@media (max-width:48rem){.u-spacellipsis-s{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}@media (max-width:63.938rem){.u-spacellipsis-m{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}}.u-midellipsis{display:flex;flex-wrap:nowrap}.u-midellipsis > *{display:inline-block;max-width:50%;overflow:hidden;white-space:pre}.u-midellipsis > :first-child{text-overflow:ellipsis}.u-midellipsis > :last-child{text-overflow:clip;direction:rtl}@supports (text-overflow:'[...]'){.u-midellipsis > :first-child{text-overflow:'[...]'}}.u-link:link{color:var(--linkColor) !important;-webkit-text-decoration:var(--linkTextDecoration) !important;text-decoration:var(--linkTextDecoration) !important}.u-link:visited,.u-link:active,.u-link:hover,.u-link:focus{color:var(--linkColorActive) !important}.u-lh-tiny{line-height:1 !important}.u-lh-xsmall{line-height:1.1 !important}.u-lh-small{line-height:1.2 !important}.u-lh-medium{line-height:1.3 !important}.u-lh-large{line-height:1.4 !important}.u-lh-xlarge{line-height:1.5 !important}.u-fz-tiny{font-size:.75rem !important;line-height:1.3 !important}.u-fz-xsmall{font-size:.813rem !important;line-height:1.4 !important}.u-fz-small{font-size:.875rem !important;line-height:1.4 !important}.u-fz-medium{font-size:1rem !important;line-height:1.5 !important}.u-fz-large{font-size:1.125rem !important;line-height:1.5 !important}@media (max-width:30rem){.u-fz-tiny-t{font-size:.75rem !important;line-height:1.3 !important}.u-fz-xsmall-t{font-size:.813rem !important;line-height:1.4 !important}.u-fz-small-t{font-size:.875rem !important;line-height:1.4 !important}.u-fz-medium-t{font-size:1rem !important;line-height:1.5 !important}.u-fz-large-t{font-size:1.125rem !important;line-height:1.5 !important}}@media (max-width:48rem){.u-fz-tiny-s{font-size:.75rem !important;line-height:1.3 !important}.u-fz-xsmall-s{font-size:.813rem !important;line-height:1.4 !important}.u-fz-small-s{font-size:.875rem !important;line-height:1.4 !important}.u-fz-medium-s{font-size:1rem !important;line-height:1.5 !important}.u-fz-large-s{font-size:1.125rem !important;line-height:1.5 !important}}@media (max-width:63.938rem){.u-fz-tiny-m{font-size:.75rem !important;line-height:1.3 !important}.u-fz-xsmall-m{font-size:.813rem !important;line-height:1.4 !important}.u-fz-small-m{font-size:.875rem !important;line-height:1.4 !important}.u-fz-medium-m{font-size:1rem !important;line-height:1.5 !important}.u-fz-large-m{font-size:1.125rem !important;line-height:1.5 !important}}.u-ta-left{text-align:left !important}.u-ta-right{text-align:right !important}.u-ta-center{text-align:center !important}.u-ta-justify{text-align:justify !important}@media (max-width:30rem){.u-ta-left-t{text-align:left !important}.u-ta-right-t{text-align:right !important}.u-ta-center-t{text-align:center !important}.u-ta-justify-t{text-align:justify !important}}@media (max-width:48rem){.u-ta-left-s{text-align:left !important}.u-ta-right-s{text-align:right !important}.u-ta-center-s{text-align:center !important}.u-ta-justify-s{text-align:justify !important}}@media (max-width:63.938rem){.u-ta-left-m{text-align:left !important}.u-ta-right-m{text-align:right !important}.u-ta-center-m{text-align:center !important}.u-ta-justify-m{text-align:justify !important}}.u-fs-normal{font-style:normal !important}.u-fs-italic{font-style:italic !important}@media (max-width:30rem){.u-fs-normal-t{font-style:normal !important}.u-fs-italic-t{font-style:italic !important}}@media (max-width:48rem){.u-fs-normal-s{font-style:normal !important}.u-fs-italic-s{font-style:italic !important}}@media (max-width:63.938rem){.u-fs-normal-m{font-style:normal !important}.u-fs-italic-m{font-style:italic !important}}.u-fw-normal{font-weight:normal}.u-fw-bold{font-weight:bold}@media (max-width:30rem){.u-fw-normal-t{font-weight:normal}.u-fw-bold-t{font-weight:bold}}@media (max-width:48rem){.u-fw-normal-s{font-weight:normal}.u-fw-bold-s{font-weight:bold}}@media (max-width:63.938rem){.u-fw-normal-m{font-weight:normal}.u-fw-bold-m{font-weight:bold}}.c-btn,.c-btn--regular,.c-btn-client,.c-btn-client-mobile{position:relative;box-sizing:border-box;display:inline-flex;margin:0 .25rem;border-width:.063rem;border-style:solid;border-radius:var(--buttonBorderRadius);min-height:2.5rem;min-width:7rem;padding:.188rem 1rem;vertical-align:top;text-align:center;font-size:.875rem;font-weight:bold;line-height:1;text-transform:var(--buttonTextTransform);text-decoration:none;cursor:pointer;align-items:center;background-color:var(--regularButtonPrimaryColor);color:var(--regularButtonConstrastColor);border-color:var(--regularButtonSecondaryColor)}.c-btn svg,.c-btn--regular svg,.c-btn-client svg,.c-btn-client-mobile svg{fill:currentColor}.c-btn svg + span,.c-btn--regular svg + span,.c-btn-client svg + span,.c-btn-client-mobile svg + span{margin-left:.375rem}.c-btn input,.c-btn--regular input,.c-btn-client input,.c-btn-client-mobile input{cursor:pointer}.c-btn > span,.c-btn--regular > span,.c-btn-client > span,.c-btn-client-mobile > span{display:flex;align-items:center;justify-content:center;width:100%}.c-btn[disabled],.c-btn--regular[disabled],.c-btn-client[disabled],.c-btn-client-mobile[disabled],.c-btn[aria-disabled=true],.c-btn--regular[aria-disabled=true],.c-btn-client[aria-disabled=true],.c-btn-client-mobile[aria-disabled=true]{opacity:.5;cursor:not-allowed}.c-btn[disabled] input,.c-btn--regular[disabled] input,.c-btn-client[disabled] input,.c-btn-client-mobile[disabled] input,.c-btn[aria-disabled=true] input,.c-btn--regular[aria-disabled=true] input,.c-btn-client[aria-disabled=true] input,.c-btn-client-mobile[aria-disabled=true] input{cursor:not-allowed}.c-btn[aria-busy=true],.c-btn--regular[aria-busy=true],.c-btn-client[aria-busy=true],.c-btn-client-mobile[aria-busy=true]{opacity:.5;pointer-events:none}.c-btn:visited,.c-btn--regular:visited,.c-btn-client:visited,.c-btn-client-mobile:visited{color:var(--regularButtonConstrastColor)}.c-btn:active,.c-btn--regular:active,.c-btn-client:active,.c-btn-client-mobile:active,.c-btn:hover,.c-btn--regular:hover,.c-btn-client:hover,.c-btn-client-mobile:hover,.c-btn:focus,.c-btn--regular:focus,.c-btn-client:focus,.c-btn-client-mobile:focus{border-color:var(--regularButtonActiveColor);background-color:var(--regularButtonActiveColor)}.c-btn[disabled]:hover,.c-btn--regular[disabled]:hover,.c-btn-client[disabled]:hover,.c-btn-client-mobile[disabled]:hover,.c-btn[aria-disabled=true]:hover,.c-btn--regular[aria-disabled=true]:hover,.c-btn-client[aria-disabled=true]:hover,.c-btn-client-mobile[aria-disabled=true]:hover{border-color:var(--regularButtonSecondaryColor);background-color:var(--regularButtonPrimaryColor)}.c-btn--ghost{background-color:var(--zircon);color:var(--primaryColor);border-color:#c2dcff;border-style:dashed}.c-btn--ghost:visited{color:var(--primaryColor)}.c-btn--ghost:active,.c-btn--ghost:hover,.c-btn--ghost:focus{border-color:#c2dcff;background-color:#c2dcff}.c-btn--ghost[disabled]:hover,.c-btn--ghost[aria-disabled=true]:hover{border-color:#c2dcff;background-color:var(--zircon)}.c-btn--highlight{background-color:#35ce68;color:var(--white);border-color:#35ce68}.c-btn--highlight:visited{color:var(--white)}.c-btn--highlight:active,.c-btn--highlight:hover,.c-btn--highlight:focus{border-color:#08b442;background-color:#08b442}.c-btn--highlight[disabled]:hover,.c-btn--highlight[aria-disabled=true]:hover{border-color:#35ce68;background-color:#35ce68}.c-btn--alpha,.c-btn--action,.c-btn--close{background-color:transparent;color:var(--white);border-color:var(--white)}.c-btn--alpha:visited,.c-btn--action:visited,.c-btn--close:visited{color:var(--white)}.c-btn--alpha:active,.c-btn--action:active,.c-btn--close:active,.c-btn--alpha:hover,.c-btn--action:hover,.c-btn--close:hover,.c-btn--alpha:focus,.c-btn--action:focus,.c-btn--close:focus{border-color:var(--scienceBlue);background-color:var(--scienceBlue)}.c-btn--alpha[disabled]:hover,.c-btn--action[disabled]:hover,.c-btn--close[disabled]:hover,.c-btn--alpha[aria-disabled=true]:hover,.c-btn--action[aria-disabled=true]:hover,.c-btn--close[aria-disabled=true]:hover{border-color:var(--white);background-color:transparent}.c-btn--danger{background-color:#f52d2d;color:var(--white);border-color:#f52d2d}.c-btn--danger:visited{color:var(--white)}.c-btn--danger:active,.c-btn--danger:hover,.c-btn--danger:focus{border-color:var(--monza);background-color:var(--monza)}.c-btn--danger[disabled]:hover,.c-btn--danger[aria-disabled=true]:hover{border-color:#f52d2d;background-color:#f52d2d}.c-btn--secondary,.c-btn-client,.c-btn-client-mobile{background-color:var(--secondaryButtonPrimaryColor);color:var(--secondaryButtonContrastColor);border-color:var(--secondaryButtonSecondaryColor)}.c-btn--secondary:visited,.c-btn-client:visited,.c-btn-client-mobile:visited{color:var(--secondaryButtonContrastColor)}.c-btn--secondary:active,.c-btn-client:active,.c-btn-client-mobile:active,.c-btn--secondary:hover,.c-btn-client:hover,.c-btn-client-mobile:hover,.c-btn--secondary:focus,.c-btn-client:focus,.c-btn-client-mobile:focus{border-color:var(--secondaryButtonActiveColor);background-color:var(--secondaryButtonActiveColor)}.c-btn--secondary[disabled]:hover,.c-btn-client[disabled]:hover,.c-btn-client-mobile[disabled]:hover,.c-btn--secondary[aria-disabled=true]:hover,.c-btn-client[aria-disabled=true]:hover,.c-btn-client-mobile[aria-disabled=true]:hover{border-color:var(--secondaryButtonSecondaryColor);background-color:var(--secondaryButtonPrimaryColor)}.c-btn--danger-outline{background-color:var(--white);color:#f52d2d;border-color:#fdcbcb}.c-btn--danger-outline:visited{color:#f52d2d}.c-btn--danger-outline:active,.c-btn--danger-outline:hover,.c-btn--danger-outline:focus{border-color:#fdcbcb;background-color:#fdcbcb}.c-btn--danger-outline[disabled]:hover,.c-btn--danger-outline[aria-disabled=true]:hover{border-color:#fdcbcb;background-color:var(--white)}.c-btn--text{background-color:transparent;color:var(--primaryColor);border-color:transparent}.c-btn--text:visited{color:var(--primaryColor)}.c-btn--text:active,.c-btn--text:hover,.c-btn--text:focus{border-color:transparent;background-color:transparent}.c-btn--text[disabled]:hover,.c-btn--text[aria-disabled=true]:hover{border-color:transparent;background-color:transparent}.c-btn--text:hover,.c-btn--text:focus{color:var(--primaryColorDark)}.c-btn--action{border-color:transparent;padding:.5rem;opacity:.5}.c-btn--action:active,.c-btn--action:hover,.c-btn--action:focus{background-color:transparent;border-color:transparent}.c-btn--close{border-color:transparent;padding:.5rem}.c-btn--close:active,.c-btn--close:hover,.c-btn--close:focus{background-color:transparent;border-color:transparent}.c-btn-alert,.c-btn-alert--error,.c-btn-alert--info,.c-btn-alert--success{border:0;height:auto;padding:.5rem 1rem;background-color:var(--white);font-weight:bold;font-size:.875rem;text-decoration:none}.c-btn-alert--error{color:#f52d2d !important;background-color:var(--white) !important;border-color:var(--white) !important}.c-btn-alert--error:visited{color:#f52d2d !important}.c-btn-alert--error:active,.c-btn-alert--error:hover,.c-btn-alert--error:focus{color:var(--monza) !important;background-color:#fdcbcb !important;border-color:#fdcbcb !important}.c-btn-alert--info{color:var(--white) !important;background-color:var(--coolGrey) !important;border-color:var(--coolGrey) !important}.c-btn-alert--info[disabled]:hover,.c-btn-alert--info[aria-disabled=true]:hover{background-color:var(--coolGrey) !important}.c-btn-alert--info:visited{color:var(--white) !important}.c-btn-alert--info:active,.c-btn-alert--info:hover,.c-btn-alert--info:focus{background-color:var(--charcoalGrey) !important;border-color:var(--charcoalGrey) !important}.c-btn-alert--success{color:#35ce68 !important;background-color:var(--white) !important;border-color:var(--white) !important}.c-btn-alert--success:visited{color:#35ce68 !important}.c-btn-alert--success:active,.c-btn-alert--success:hover,.c-btn-alert--success:focus{color:#08b442 !important;background-color:#def7e7 !important;border-color:#def7e7 !important}.c-btn-client,.c-btn-client-mobile{display:flex;justify-content:center;align-items:center;height:auto;min-height:3.5rem;margin:0;padding-left:1rem;padding-right:1rem;background-color:transparent;text-align:left;font-size:.813rem;font-weight:bold;line-height:1.3;color:var(--slateGrey)}.c-btn-client:visited,.c-btn-client-mobile:visited{color:var(--slateGrey)}.c-btn-client span,.c-btn-client-mobile span{flex:0 1 auto}.c-btn-client figure,.c-btn-client-mobile figure{flex:0 0 2rem;margin:0 .75rem 0 0}.c-btn-client-mobile{display:flex;justify-content:flex-start;background-color:var(--dodgerBlue);border:0;border-radius:0;margin:0;padding:.5rem 3rem .5rem 1rem;font-size:1rem;font-weight:normal;color:var(--white);text-decoration:none;text-transform:none}.c-btn-client-mobile[disabled]:hover,.c-btn-client-mobile[aria-disabled=true]:hover{background-color:var(--dodgerBlue)}.c-btn-client-mobile:visited{color:var(--white)}.c-btn-client-mobile:active,.c-btn-client-mobile:hover,.c-btn-client-mobile:focus{background-color:var(--dodgerBlue)}.c-btn-client-mobile figure{flex:0 0 2.75rem;border-radius:.5rem;border:.313rem solid var(--white);background-color:var(--white)}.c-btn-client-mobile figure svg{display:block}.c-btn--left > span{justify-content:flex-start}.c-btn--center > span{justify-content:center}.c-btn--right > span{justify-content:flex-end}.c-btn.c-btn--tiny{min-height:1.5rem;min-width:5rem;padding:.125rem 1rem;font-size:.75rem;line-height:1.3}.c-btn.c-btn--small{min-height:2rem;min-width:6rem;padding:.188rem .5rem;font-size:.813rem;line-height:1.4}.c-btn.c-btn--large{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5}.c-btn.c-btn--full{width:100%;margin-left:0;margin-right:0}.c-btn.c-btn--narrow,.c-btn.c-btn--round{min-width:auto}.c-btn.c-btn--round{border-radius:100%;min-height:auto;padding:.25rem}.c-btn.c-btn--round svg{width:.625rem;height:.625rem}@media (pointer:coarse){.c-btn.c-btn--round:after{content:'';position:absolute;top:-.875rem;right:-.875rem;bottom:-.875rem;left:-.875rem}}.c-btn--subtle{color:var(--regularButtonSecondaryColor);min-height:auto;min-width:auto;border:0;margin:1rem 0;padding:0;vertical-align:baseline;background:transparent;cursor:pointer;font-size:.875rem;font-weight:bold;text-transform:uppercase}.c-btn--subtle:active,.c-btn--subtle:focus,.c-btn--subtle:hover{color:var(--regularButtonActiveColor)}.c-btn--subtle > span{display:flex;align-items:center;justify-content:center;width:100%}.c-btn--subtle[disabled],.c-btn--subtle[aria-disabled=true]{opacity:.5;cursor:not-allowed}.c-btn--subtle[disabled]:hover,.c-btn--subtle[aria-disabled=true]:hover{background:transparent}.c-btn--subtle[aria-busy=true]{opacity:.5;cursor:not-allowed;pointer-events:none}.c-btn--subtle[aria-busy=true]:hover{background:transparent}.c-btn--subtle:active,.c-btn--subtle:hover,.c-btn--subtle:focus,.c-btn--subtle:visited{color:var(--primaryColorDark);background:transparent}* + .c-btn--subtle{margin-left:.063rem}.c-btn--subtle.c-btn--tiny{min-height:0;min-width:0;padding:0;font-size:.563rem}.c-btn--subtle.c-btn--small{min-height:0;min-width:0;padding:0;font-size:.75rem}.c-btn--subtle.c-btn--large{min-height:0;min-width:0;padding:0;font-size:1rem}.c-btn--subtle.c-btn--danger{color:#f52d2d}.c-btn--subtle.c-btn--danger:active,.c-btn--subtle.c-btn--danger:focus,.c-btn--subtle.c-btn--danger:hover{color:var(--monza)}.c-btn--subtle.c-btn--highlight{color:#35ce68}.c-btn--subtle.c-btn--highlight:active,.c-btn--subtle.c-btn--highlight:focus,.c-btn--subtle.c-btn--highlight:hover{color:#08b442}.c-btn--subtle.c-btn--regular{color:var(--regularButtonSecondaryColor)}.c-btn--subtle.c-btn--regular:active,.c-btn--subtle.c-btn--regular:focus,.c-btn--subtle.c-btn--regular:hover{color:var(--regularButtonActiveColor)}.c-btn--subtle.c-btn--secondary{color:var(--slateGrey)}.c-btn--subtle.c-btn--secondary:active,.c-btn--subtle.c-btn--secondary:focus,.c-btn--subtle.c-btn--secondary:hover{color:var(--charcoalGrey)}.c-btn--subtle.c-btn--secondary:active svg,.c-btn--subtle.c-btn--secondary:focus svg,.c-btn--subtle.c-btn--secondary:hover svg{color:var(--slateGrey)}.c-btn--subtle.c-btn--secondary svg{color:var(--coolGrey)}[data-input=radio],[data-input=checkbox]{display:flex}[data-input=radio] input[type=radio],[data-input=checkbox] input[type=radio],[data-input=radio] input[type=checkbox],[data-input=checkbox] input[type=checkbox]{display:none !important;visibility:hidden !important}[data-input=radio] label,[data-input=checkbox] label{position:relative;display:inline-block;width:1rem;height:1rem;padding-left:1.4rem;cursor:pointer}[data-input=radio] label::before,[data-input=checkbox] label::before,[data-input=radio] label::after,[data-input=checkbox] label::after{content:'';position:absolute;left:0;top:0;box-sizing:border-box;width:1rem;height:1rem}[data-input=radio] label::before,[data-input=checkbox] label::before{transition:box-shadow 350ms cubic-bezier(0,.89,.44,1)}[data-input=radio] label::after,[data-input=checkbox] label::after{transition-duration:.2s;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.c-label{text-transform:uppercase;color:var(--secondaryTextColor);font-size:.813rem;font-weight:bold;line-height:1rem}.c-label.is-error{color:var(--pomegranate)}.c-label--block{display:block;padding:.5rem 0}.c-input-text[aria-disabled=true],.c-input-text[disabled],.c-textarea[aria-disabled=true],.c-textarea[disabled],.c-select[aria-disabled=true],.c-select[disabled],.wizard-select[aria-disabled=true],.wizard-select[disabled]{cursor:not-allowed;background-color:var(--paleGrey);color:var(--charcoalGrey)}.c-input-text[aria-disabled=true]:hover,.c-input-text[disabled]:hover,.c-textarea[aria-disabled=true]:hover,.c-textarea[disabled]:hover,.c-select[aria-disabled=true]:hover,.c-select[disabled]:hover,.wizard-select[aria-disabled=true]:hover,.wizard-select[disabled]:hover,.c-input-text[aria-disabled=true]:focus,.c-input-text[disabled]:focus,.c-textarea[aria-disabled=true]:focus,.c-textarea[disabled]:focus,.c-select[aria-disabled=true]:focus,.c-select[disabled]:focus,.wizard-select[aria-disabled=true]:focus,.wizard-select[disabled]:focus{border:.063rem solid var(--dividerColor)}.c-input-text,.c-textarea,.c-select,.wizard-select{display:inline-block;width:100%;max-width:32rem;padding:.813rem 1rem;box-sizing:border-box;border-radius:.188rem;background:var(--white);border:.063rem solid var(--dividerColor);font-size:1rem;line-height:1.25;color:var(--charcoalGrey);outline:0}.c-input-text::-webkit-input-placeholder,.c-textarea::-webkit-input-placeholder,.c-select::-webkit-input-placeholder,.wizard-select::-webkit-input-placeholder{color:var(--coolGrey);font-size:1rem}.c-input-text::placeholder,.c-textarea::placeholder,.c-select::placeholder,.wizard-select::placeholder{color:var(--coolGrey);font-size:1rem}.c-input-text:hover,.c-textarea:hover,.c-select:hover,.wizard-select:hover{border:.063rem solid var(--coolGrey)}.c-input-text:focus,.c-textarea:focus,.c-select:focus,.wizard-select:focus{border:.063rem solid var(--dodgerBlue);outline:0}.c-input-text.is-error,.c-textarea.is-error,.c-select.is-error,.wizard-select.is-error,.c-input-text:not(:focus):invalid,.c-textarea:not(:focus):invalid,.c-select:not(:focus):invalid,.wizard-select:not(:focus):invalid{border:.063rem solid var(--pomegranate)}.c-input-text--tiny,.c-textarea--tiny,.c-select--tiny{border-radius:.125rem;padding:.25rem .5rem .375rem}.c-input-text--medium,.c-textarea--medium,.c-select--medium,.wizard-select--medium{border-radius:.125rem;padding:.5rem 1rem .625rem}.c-input-text--large{border-radius:.188rem;padding:.813rem 1rem}.c-input-text--fullwidth,.c-textarea--fullwidth,.c-select--fullwidth{max-width:100%}.c-input-checkbox,.c-input-radio{display:flex;align-items:center;min-width:1rem;min-height:1rem}.c-input-checkbox span,.c-input-radio span{position:relative;display:inline-block;padding-left:1.5rem;cursor:pointer;line-height:1.5}.c-input-checkbox span::before,.c-input-radio span::before,.c-input-checkbox span::after,.c-input-radio span::after{content:'';position:absolute;left:0;top:50%;box-sizing:border-box;width:1rem;height:1rem;border-radius:.125rem}.c-input-checkbox span::before,.c-input-radio span::before{transition:box-shadow 350ms cubic-bezier(0,.89,.44,1);background-color:var(--white);box-shadow:inset 0 0 0 .125rem var(--silver);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.c-input-checkbox span:hover::before,.c-input-radio span:hover::before{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}.c-input-checkbox span::after,.c-input-radio span::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMjAnIGhlaWdodD0nMjAnIHZpZXdCb3g9JzAgMCAyMCAyMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz4KICAgIDxwYXRoIGQ9J00zIDEwLjAxOWw0LjUyMyA0LjUyMyA5LjU0MS05LjU0MScgc3Ryb2tlPScjRkZGJyBzdHJva2Utd2lkdGg9JzInIGZpbGw9Im5vbmUiLz4KPC9zdmc+Cg==\");background-size:contain;transition-duration:.2s;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.c-input-checkbox[aria-checked='mixed'] span::after,.c-input-radio[aria-checked='mixed'] span::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj48cGF0aCBkPSJNMy40OTcgMTBoMTMuMDA2IiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgLz48L3N2Zz4K\");background-size:contain}.c-input-checkbox[aria-disabled=true] span,.c-input-radio[aria-disabled=true] span{opacity:.5;cursor:not-allowed}.c-input-checkbox[aria-disabled=true] :hover::before,.c-input-radio[aria-disabled=true] :hover::before{box-shadow:inset 0 0 0 .125rem var(--silver)}.c-input-checkbox[aria-disabled=true] ::before,.c-input-radio[aria-disabled=true] ::before{background-color:var(--paleGrey)}.c-input-checkbox input,.c-input-radio input{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0,0 0,0 0);clip-path:polygon(0 0,0 0,0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.c-input-checkbox input:focus + span::before,.c-input-radio input:focus + span::before{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}.c-input-checkbox input:checked + span::before,.c-input-radio input:checked + span::before{box-shadow:inset 0 0 0 1rem var(--dodgerBlue)}.c-input-checkbox input:checked + span::after,.c-input-radio input:checked + span::after{opacity:1;-webkit-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1)}.c-input-checkbox input:not(:checked) + span::after,.c-input-radio input:not(:checked) + span::after{opacity:0;-webkit-transform:translateY(-50%) scale(0);transform:translateY(-50%) scale(0)}.c-input-checkbox.is-error span,.c-input-radio.is-error span{color:var(--pomegranate)}.c-input-checkbox.is-error span::before,.c-input-radio.is-error span::before{box-shadow:inset 0 0 0 .125rem var(--pomegranate);background-color:var(--yourPink)}.c-input-checkbox--noGutter span,.c-input-radio--noGutter span{padding-left:0}.c-input-radio span::before,.c-input-radio span::after{border-radius:50%}.c-input-radio span::after{content:'';background:var(--white);border:.313rem solid var(--dodgerBlue);box-sizing:border-box;width:1rem;height:1rem}.c-textarea{display:block;width:100%;min-height:7.5rem;resize:vertical}.c-textarea--tiny{min-height:3rem}.c-textarea--medium{min-height:5rem}.c-select,.c-select--tiny,.c-select--medium,.c-select--fullwidth,.wizard-select,.wizard-select--medium{padding-right:2.375rem}.c-select,.wizard-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICA8ZyBmaWxsPSIjOTU5OTlkIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLjI4NTcxNCwgMTIuMDAwMDAwKSByb3RhdGUoOTAuMDAwMDAwKSB0cmFuc2xhdGUoLTEyLjI4NTcxNCwgLTEyLjAwMDAwMCkiPgogICAgPHBhdGggZD0iTTYuNDYwMjYwNzcsMjAuMzE3NDAzNiBDNS44NDY1Nzk3NCwyMC45MzEwODQ3IDUuODQ2NTc5NzQsMjEuOTI2MDU4MiA2LjQ2MDI2MDc3LDIyLjUzOTczOTIgQzcuMDczOTQxOCwyMy4xNTM0MjAzIDguMDY4OTE1MzQsMjMuMTUzNDIwMyA4LjY4MjU5NjM3LDIyLjUzOTczOTIgTDE4LjExMTE2NzgsMTMuMTExMTY3OCBDMTguNzI0ODQ4OCwxMi40OTc0ODY4IDE4LjcyNDg0ODgsMTEuNTAyNTEzMiAxOC4xMTExNjc4LDEwLjg4ODgzMjIgTDguNjgyNTk2MzcsMS40NjAyNjA3NyBDOC4wNjg5MTUzNCwwLjg0NjU3OTc0MyA3LjA3Mzk0MTgsMC44NDY1Nzk3NDMgNi40NjAyNjA3NywxLjQ2MDI2MDc3IEM1Ljg0NjU3OTc0LDIuMDczOTQxOCA1Ljg0NjU3OTc0LDMuMDY4OTE1MzQgNi40NjAyNjA3NywzLjY4MjU5NjM3IEwxNC43Nzc2NjQ0LDEyIEw2LjQ2MDI2MDc3LDIwLjMxNzQwMzYgWiIgLz4KICA8L2c+Cjwvc3ZnPgo=\") right 1rem center no-repeat;background-size:.875rem;text-align:left}.c-select::-ms-expand,.wizard-select::-ms-expand{display:none}.o-field{position:relative;display:flex;flex-direction:column;margin:.5rem 0 1rem}.o-field-inline{display:flex;align-items:flex-start;flex-direction:row;margin:.5rem 0 .5rem 1.5rem}@media (max-width:48rem){.o-field-inline{flex-direction:column;margin-left:0}}.c-double-field{width:100%}.c-double-field--with-button{box-sizing:border-box;position:relative;padding-right:2.5rem}.c-double-field-label{min-height:2.5rem}.c-double-field-button{position:absolute;right:-2.5rem;top:.625rem}.c-double-field-wrapper{display:inline-flex;width:100%;margin-bottom:.5rem}@media (max-width:48rem){.c-double-field-wrapper{flex-direction:column}}.c-double-field-input{box-sizing:border-box;flex:1 1 70%}.c-double-field-input + .c-double-field-input{flex:1 1 auto}[data-input=radio] label::before{border-radius:50%;border:.125rem solid var(--coolGrey);box-shadow:inset 0 0 0 1rem transparent}[data-input=radio] input[type=radio]:checked + label::before{box-shadow:inset 0 0 0 .188rem var(--paleGrey),inset 0 0 0 1rem var(--dodgerBlue)}[data-input=checkbox] label::before,[data-input=checkbox] label::after{border-radius:.125rem}[data-input=checkbox] label::before{background-color:var(--white);box-shadow:inset 0 0 0 .125rem var(--silver)}[data-input=checkbox] label::before:hover{box-shadow:inset 0 0 0 .125rem var(--dodgerBlue)}[data-input=checkbox] label::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMjAnIGhlaWdodD0nMjAnIHZpZXdCb3g9JzAgMCAyMCAyMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz4KICAgIDxwYXRoIGQ9J00zIDEwLjAxOWw0LjUyMyA0LjUyMyA5LjU0MS05LjU0MScgc3Ryb2tlPScjRkZGJyBzdHJva2Utd2lkdGg9JzInIGZpbGw9Im5vbmUiLz4KPC9zdmc+Cg==\");background-size:contain}[data-input=checkbox][aria-checked='mixed'] label::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj48cGF0aCBkPSJNMy40OTcgMTBoMTMuMDA2IiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgLz48L3N2Zz4K\");background-size:contain}[data-input=checkbox] input[type=checkbox]:checked + label::before{box-shadow:inset 0 0 0 1rem var(--dodgerBlue)}[data-input=checkbox] input[type=checkbox]:checked + label::after{opacity:1;-webkit-transform:scale(1);transform:scale(1)}[data-input=checkbox] input[type=checkbox]:not(:checked) + label::after{opacity:0;-webkit-transform:scale(0);transform:scale(0)}.wizard-wrapper{display:flex;flex-flow:column nowrap;align-items:stretch}.wizard-main{background:linear-gradient(#fff 30%,rgba(255,255,255,0)),linear-gradient(rgba(255,255,255,0),#fff 70%) 0 100%,linear-gradient(rgba(214,216,218,0.25) 0,rgba(214,216,218,0.25) 25%,rgba(255,255,255,0) 26%,rgba(255,255,255,0) 100%),linear-gradient(rgba(255,255,255,0) 0,rgba(255,255,255,0) 74%,rgba(214,216,218,0.25) 75%,rgba(214,216,218,0.25) 100%) 0 100%;background-repeat:no-repeat;background-color:var(--white);background-size:100% 2rem,100% 2rem,100% .5rem,100% .5rem;background-attachment:local,local,scroll,scroll;background-clip:padding-box;overflow:auto;-webkit-overflow-scrolling:touch}.wizard-header,.wizard-footer{flex:0 0 auto}.o-layout,.o-layout-2panes{box-sizing:border-box;display:flex;max-width:100%;width:100%;height:100%}.o-layout main,.o-layout-2panes main{display:flex;flex-direction:column;flex:0 0 auto}.o-layout main,.o-layout-2panes main,.o-layout main > [role=contentinfo],.o-layout-2panes main > [role=contentinfo],.o-layout main > [role=main],.o-layout-2panes main > [role=main]{position:relative;display:flex;flex-direction:column;flex:1 1 auto;box-sizing:border-box;height:100%;overflow-x:hidden;overflow-y:auto}@media (max-width:63.938rem){.o-layout,.o-layout-2panes{display:block}.o-layout main,.o-layout-2panes main{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}.o-layout main,.o-layout-2panes main,.o-layout main > [role=contentinfo],.o-layout-2panes main > [role=contentinfo],.o-layout main > [role=main],.o-layout-2panes main > [role=main]{display:block;overflow:visible}.o-layout:before,.o-layout-2panes:before,.o-layout:after,.o-layout-2panes:after{content:'';display:block}.o-layout:before,.o-layout-2panes:before{height:3rem}.o-layout:after,.o-layout-2panes:after{height:3rem}}.o-layout-2panes{flex:0 0 100%;align-items:stretch}.o-layout-2panes > aside{display:flex;flex-direction:column;flex:0 0 auto}.o-layout-2panes main,.o-layout-2panes main > [role=contentinfo],.o-layout-2panes main > [role=main]{height:auto}@media (max-width:63.938rem){.o-layout-2panes > aside{position:fixed;bottom:0;left:0;display:block;z-index:20;width:100%}}.u-media{display:flex;align-items:center}.u-media-top{align-items:flex-start}.u-media-bottom{align-items:flex-end}.u-media-grow{flex:1 1 auto;overflow:hidden}.u-media-fixed{line-height:0;flex:0 0 auto}:root{--sidebarHeight:3rem}.o-sidebar{width:13.75rem;border-right:.063rem solid var(--dividerColor);background-color:var(--paleGrey)}@media (max-width:63.938rem){.o-sidebar{justify-content:space-between;border:0;border-top:.063rem solid var(--dividerColor);height:var(--sidebarHeight);width:100%;padding-bottom:env(safe-area-inset-bottom)}}.c-avatar{background-color:var(--paleGrey);color:var(--silver);position:relative;z-index:1}.c-avatar svg{width:50%;height:50%}.c-avatar-image{width:100%}.u-card{border:.063rem solid var(--dividerColor);border-radius:.5rem;padding:1rem;text-decoration:none;display:block}.c-chip{box-sizing:border-box;line-height:1;display:inline-flex;align-items:center;margin-right:.25rem;margin-bottom:.25rem;border:0}.c-chip--round{width:2.5rem;text-align:center;justify-content:center}.c-chip--tinySize{height:1.5rem;padding:0 .375rem;border-radius:.75rem;font-size:.75rem}.c-chip--smallSize{height:2rem;padding:0 .5625rem;border-radius:1rem;font-size:.875rem}.c-chip--normalSize{height:2.5rem;padding:0 .75rem;border-radius:1.25rem}.c-chip--outlinedVariant{border:1px solid}.c-chip--dashedVariant{border:1px dashed}.c-chip--normalTheme{border-color:var(--silver);background-color:var(--paleGrey);color:inherit}.c-chip--primaryTheme{border-color:var(--primaryColorLightest);background-color:var(--primaryBackgroundLight);color:var(--primaryColor)}.c-chip--errorTheme{border-color:var(--errorColorLight);background-color:var(--errorColorLightest);color:var(--errorColor)}.c-chip--hoverableNormalTheme{color:var(--charcoalGrey)}.c-chip--hoverableNormalTheme:hover,.c-chip--hoverableNormalTheme:focus{background-color:var(--silver)}.c-chip--hoverablePrimaryTheme:hover,.c-chip--hoverablePrimaryTheme:focus{background-color:var(--primaryBackgroundLight)}.c-chip--normalPrimaryTheme{background-color:var(--primaryColor);color:var(--white)}.c-chip--hoverableErrorTheme:hover,.c-chip--hoverableErrorTheme:focus{background-color:var(--errorColorLight)}.c-chip--outlinedNormalTheme{background-color:transparent}.c-chip--clickable{cursor:pointer}.c-chip-separator{width:.063rem;border-left:.063rem solid var(--dividerColor);display:inline-block;height:40%;margin-left:.5rem;margin-right:.5rem}.c-chip-button{cursor:pointer;color:var(--slateGrey)}.c-chip-button--disabled{color:var(--coolGrey)}.c-avatar{--circleSize:2.5rem;width:var(--circleSize);height:var(--circleSize);min-width:var(--circleSize);min-height:var(--circleSize);font-size:calc(var(--circleSize) / 2.28);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;overflow:hidden;background-color:var(--dodgerBlue);color:var(--white)}.c-avatar--xsmall{width:1rem;height:1rem;min-width:1rem;min-height:1rem;font-size:calc(1rem / 2.28)}.c-avatar--small{width:2rem;height:2rem;min-width:2rem;min-height:2rem;font-size:calc(2rem / 2.28)}.c-avatar--large{width:3rem;height:3rem;min-width:3rem;min-height:3rem;font-size:calc(3rem / 2.28)}.c-avatar--xlarge{width:4rem;height:4rem;min-width:4rem;min-height:4rem;font-size:calc(4rem / 2.28)}.c-avatar-initials{font-weight:bold;line-height:1}.c-nav{margin:1.5rem 0;padding:0;list-style:none}@media (max-width:63.938rem){.c-nav{display:flex;justify-content:space-around;margin:.313rem 0 .25rem;padding-right:0}}.c-nav-item{position:relative;z-index:0;height:3rem;box-sizing:border-box;cursor:pointer}.c-nav-item:hover::before{content:'';position:absolute;z-index:-1;border-radius:0 .188rem .188rem 0;top:0;left:0;right:1rem;bottom:0;background:rgba(0,0,0,0.1)}@media (hover:none){.c-nav-item:hover::before{content:none}}@media (max-width:63.938rem){.c-nav-item{margin:0 .75rem;height:auto;display:block;flex:0 0 2.5rem;padding-right:0}.c-nav-item:hover::before{content:none}}.c-nav-icon{display:inline-block;margin-right:.688rem;color:var(--coolGrey);fill:currentColor}.c-nav-icon svg{display:block}.is-active .c-nav-icon{color:var(--primaryColor)}:hover > .c-nav-icon{color:var(--navTextColor)}@media (max-width:63.938rem){.c-nav-icon{display:block;margin-right:0}.c-nav-icon svg{margin:0 auto 3px;width:1.5rem;height:1.5rem}}@media (max-width:63.938rem){.c-nav-text{display:block;text-align:center;white-space:nowrap}}.c-nav-link{display:flex;box-shadow:border-box;padding-left:1.5rem;padding-right:1rem;line-height:1.5;text-decoration:none;color:var(--navTextColor);height:100%;align-items:center;flex:1;background-repeat:no-repeat;background-position:1.5rem center}.c-nav-link:visited{color:var(--navTextColor)}.c-nav-link:hover:not(.is-active){color:var(--navTextHoverColor)}.c-nav-link.is-active{box-shadow:inset .25rem 0 0 0 var(--primaryColor);font-weight:bold;color:var(--navTextActiveColor)}.c-nav-link.is-active .c-nav-icon{color:var(--primaryColor)}@media (max-width:63.938rem){.c-nav-link{display:block;height:auto;padding:0;text-align:center;font-size:.625rem;line-height:.75rem;background-position:center top;background-size:1.5rem}.c-nav-link.is-active,.c-nav-link:hover{box-shadow:none;font-weight:normal}}@media not all and (pointer:fine){.c-nav-link:hover:not(.is-active){color:var(--navTextColor)}}.c-nav-item-secondary{height:auto}.c-nav-item-secondary + .c-nav-item-secondary{margin-top:.125rem}@media (max-width:63.938rem){.c-nav-item-secondary{display:none}}.c-nav-item-secondary:hover::before{content:'';position:absolute;z-index:-1;border-radius:.188rem 0 0 .188rem;top:0;right:0;left:3rem;bottom:0;background:rgba(0,0,0,0.1)}@media (hover:none){.c-nav-item-secondary:hover::before{content:none}}.c-nav-item-secondary .c-nav-link{padding:.5rem 1rem;margin-left:3rem;border-radius:4px 0 0 4px;box-shadow:none;font-size:.875rem;color:var(--navTextColor);text-decoration:none;height:auto}.c-nav-item-secondary .c-nav-link:hover:not(.is-active){color:var(--navTextHoverColor)}.c-nav-item-secondary .c-nav-link.is-active{color:#fff;border-right:1px solid var(--navTextColor);background-color:var(--navTextColor)}.u-p-0{padding:0 !important}.u-pt-0{padding-top:0 !important}.u-pb-0{padding-bottom:0 !important}.u-pl-0{padding-left:0 !important}.u-pr-0{padding-right:0 !important}.u-pv-0{padding-top:0 !important;padding-bottom:0 !important}.u-ph-0{padding-left:0 !important;padding-right:0 !important}.u-p-1{padding:1rem !important}.u-pt-1{padding-top:1rem !important}.u-pb-1{padding-bottom:1rem !important}.u-pl-1{padding-left:1rem !important}.u-pr-1{padding-right:1rem !important}.u-pv-1{padding-top:1rem !important;padding-bottom:1rem !important}.u-ph-1{padding-left:1rem !important;padding-right:1rem !important}.u-p-2{padding:2rem !important}.u-pt-2{padding-top:2rem !important}.u-pb-2{padding-bottom:2rem !important}.u-pl-2{padding-left:2rem !important}.u-pr-2{padding-right:2rem !important}.u-pv-2{padding-top:2rem !important;padding-bottom:2rem !important}.u-ph-2{padding-left:2rem !important;padding-right:2rem !important}.u-p-3{padding:3rem !important}.u-pt-3{padding-top:3rem !important}.u-pb-3{padding-bottom:3rem !important}.u-pl-3{padding-left:3rem !important}.u-pr-3{padding-right:3rem !important}.u-pv-3{padding-top:3rem !important;padding-bottom:3rem !important}.u-ph-3{padding-left:3rem !important;padding-right:3rem !important}.u-p-auto{padding:auto !important}.u-pt-auto{padding-top:auto !important}.u-pb-auto{padding-bottom:auto !important}.u-pl-auto{padding-left:auto !important}.u-pr-auto{padding-right:auto !important}.u-pv-auto{padding-top:auto !important;padding-bottom:auto !important}.u-ph-auto{padding-left:auto !important;padding-right:auto !important}.u-p-half{padding:.5rem !important}.u-pt-half{padding-top:.5rem !important}.u-pb-half{padding-bottom:.5rem !important}.u-pl-half{padding-left:.5rem !important}.u-pr-half{padding-right:.5rem !important}.u-pv-half{padding-top:.5rem !important;padding-bottom:.5rem !important}.u-ph-half{padding-left:.5rem !important;padding-right:.5rem !important}.u-p-1-half{padding:1.5rem !important}.u-pt-1-half{padding-top:1.5rem !important}.u-pb-1-half{padding-bottom:1.5rem !important}.u-pl-1-half{padding-left:1.5rem !important}.u-pr-1-half{padding-right:1.5rem !important}.u-pv-1-half{padding-top:1.5rem !important;padding-bottom:1.5rem !important}.u-ph-1-half{padding-left:1.5rem !important;padding-right:1.5rem !important}.u-p-2-half{padding:2.5rem !important}.u-pt-2-half{padding-top:2.5rem !important}.u-pb-2-half{padding-bottom:2.5rem !important}.u-pl-2-half{padding-left:2.5rem !important}.u-pr-2-half{padding-right:2.5rem !important}.u-pv-2-half{padding-top:2.5rem !important;padding-bottom:2.5rem !important}.u-ph-2-half{padding-left:2.5rem !important;padding-right:2.5rem !important}.u-m-0{margin:0 !important}.u-mt-0{margin-top:0 !important}.u-mb-0{margin-bottom:0 !important}.u-ml-0{margin-left:0 !important}.u-mr-0{margin-right:0 !important}.u-mv-0{margin-top:0 !important;margin-bottom:0 !important}.u-mh-0{margin-left:0 !important;margin-right:0 !important}.u-m-1{margin:1rem !important}.u-mt-1{margin-top:1rem !important}.u-mb-1{margin-bottom:1rem !important}.u-ml-1{margin-left:1rem !important}.u-mr-1{margin-right:1rem !important}.u-mv-1{margin-top:1rem !important;margin-bottom:1rem !important}.u-mh-1{margin-left:1rem !important;margin-right:1rem !important}.u-m-2{margin:2rem !important}.u-mt-2{margin-top:2rem !important}.u-mb-2{margin-bottom:2rem !important}.u-ml-2{margin-left:2rem !important}.u-mr-2{margin-right:2rem !important}.u-mv-2{margin-top:2rem !important;margin-bottom:2rem !important}.u-mh-2{margin-left:2rem !important;margin-right:2rem !important}.u-m-3{margin:3rem !important}.u-mt-3{margin-top:3rem !important}.u-mb-3{margin-bottom:3rem !important}.u-ml-3{margin-left:3rem !important}.u-mr-3{margin-right:3rem !important}.u-mv-3{margin-top:3rem !important;margin-bottom:3rem !important}.u-mh-3{margin-left:3rem !important;margin-right:3rem !important}.u-m-auto{margin:auto !important}.u-mt-auto{margin-top:auto !important}.u-mb-auto{margin-bottom:auto !important}.u-ml-auto{margin-left:auto !important}.u-mr-auto{margin-right:auto !important}.u-mv-auto{margin-top:auto !important;margin-bottom:auto !important}.u-mh-auto{margin-left:auto !important;margin-right:auto !important}.u-m-half{margin:.5rem !important}.u-mt-half{margin-top:.5rem !important}.u-mb-half{margin-bottom:.5rem !important}.u-ml-half{margin-left:.5rem !important}.u-mr-half{margin-right:.5rem !important}.u-mv-half{margin-top:.5rem !important;margin-bottom:.5rem !important}.u-mh-half{margin-left:.5rem !important;margin-right:.5rem !important}.u-m-1-half{margin:1.5rem !important}.u-mt-1-half{margin-top:1.5rem !important}.u-mb-1-half{margin-bottom:1.5rem !important}.u-ml-1-half{margin-left:1.5rem !important}.u-mr-1-half{margin-right:1.5rem !important}.u-mv-1-half{margin-top:1.5rem !important;margin-bottom:1.5rem !important}.u-mh-1-half{margin-left:1.5rem !important;margin-right:1.5rem !important}.u-m-2-half{margin:2.5rem !important}.u-mt-2-half{margin-top:2.5rem !important}.u-mb-2-half{margin-bottom:2.5rem !important}.u-ml-2-half{margin-left:2.5rem !important}.u-mr-2-half{margin-right:2.5rem !important}.u-mv-2-half{margin-top:2.5rem !important;margin-bottom:2.5rem !important}.u-mh-2-half{margin-left:2.5rem !important;margin-right:2.5rem !important}@media (max-width:30rem){.u-p-0-t{padding:0 !important}}@media (max-width:30rem){.u-pt-0-t{padding-top:0 !important}}@media (max-width:30rem){.u-pb-0-t{padding-bottom:0 !important}}@media (max-width:30rem){.u-pl-0-t{padding-left:0 !important}}@media (max-width:30rem){.u-pr-0-t{padding-right:0 !important}}@media (max-width:30rem){.u-pv-0-t{padding-top:0 !important;padding-bottom:0 !important}}@media (max-width:30rem){.u-ph-0-t{padding-left:0 !important;padding-right:0 !important}}@media (max-width:30rem){.u-p-1-t{padding:1rem !important}}@media (max-width:30rem){.u-pt-1-t{padding-top:1rem !important}}@media (max-width:30rem){.u-pb-1-t{padding-bottom:1rem !important}}@media (max-width:30rem){.u-pl-1-t{padding-left:1rem !important}}@media (max-width:30rem){.u-pr-1-t{padding-right:1rem !important}}@media (max-width:30rem){.u-pv-1-t{padding-top:1rem !important;padding-bottom:1rem !important}}@media (max-width:30rem){.u-ph-1-t{padding-left:1rem !important;padding-right:1rem !important}}@media (max-width:30rem){.u-p-2-t{padding:2rem !important}}@media (max-width:30rem){.u-pt-2-t{padding-top:2rem !important}}@media (max-width:30rem){.u-pb-2-t{padding-bottom:2rem !important}}@media (max-width:30rem){.u-pl-2-t{padding-left:2rem !important}}@media (max-width:30rem){.u-pr-2-t{padding-right:2rem !important}}@media (max-width:30rem){.u-pv-2-t{padding-top:2rem !important;padding-bottom:2rem !important}}@media (max-width:30rem){.u-ph-2-t{padding-left:2rem !important;padding-right:2rem !important}}@media (max-width:30rem){.u-p-3-t{padding:3rem !important}}@media (max-width:30rem){.u-pt-3-t{padding-top:3rem !important}}@media (max-width:30rem){.u-pb-3-t{padding-bottom:3rem !important}}@media (max-width:30rem){.u-pl-3-t{padding-left:3rem !important}}@media (max-width:30rem){.u-pr-3-t{padding-right:3rem !important}}@media (max-width:30rem){.u-pv-3-t{padding-top:3rem !important;padding-bottom:3rem !important}}@media (max-width:30rem){.u-ph-3-t{padding-left:3rem !important;padding-right:3rem !important}}@media (max-width:30rem){.u-p-auto-t{padding:auto !important}}@media (max-width:30rem){.u-pt-auto-t{padding-top:auto !important}}@media (max-width:30rem){.u-pb-auto-t{padding-bottom:auto !important}}@media (max-width:30rem){.u-pl-auto-t{padding-left:auto !important}}@media (max-width:30rem){.u-pr-auto-t{padding-right:auto !important}}@media (max-width:30rem){.u-pv-auto-t{padding-top:auto !important;padding-bottom:auto !important}}@media (max-width:30rem){.u-ph-auto-t{padding-left:auto !important;padding-right:auto !important}}@media (max-width:30rem){.u-p-half-t{padding:.5rem !important}}@media (max-width:30rem){.u-pt-half-t{padding-top:.5rem !important}}@media (max-width:30rem){.u-pb-half-t{padding-bottom:.5rem !important}}@media (max-width:30rem){.u-pl-half-t{padding-left:.5rem !important}}@media (max-width:30rem){.u-pr-half-t{padding-right:.5rem !important}}@media (max-width:30rem){.u-pv-half-t{padding-top:.5rem !important;padding-bottom:.5rem !important}}@media (max-width:30rem){.u-ph-half-t{padding-left:.5rem !important;padding-right:.5rem !important}}@media (max-width:30rem){.u-p-1-half-t{padding:1.5rem !important}}@media (max-width:30rem){.u-pt-1-half-t{padding-top:1.5rem !important}}@media (max-width:30rem){.u-pb-1-half-t{padding-bottom:1.5rem !important}}@media (max-width:30rem){.u-pl-1-half-t{padding-left:1.5rem !important}}@media (max-width:30rem){.u-pr-1-half-t{padding-right:1.5rem !important}}@media (max-width:30rem){.u-pv-1-half-t{padding-top:1.5rem !important;padding-bottom:1.5rem !important}}@media (max-width:30rem){.u-ph-1-half-t{padding-left:1.5rem !important;padding-right:1.5rem !important}}@media (max-width:30rem){.u-p-2-half-t{padding:2.5rem !important}}@media (max-width:30rem){.u-pt-2-half-t{padding-top:2.5rem !important}}@media (max-width:30rem){.u-pb-2-half-t{padding-bottom:2.5rem !important}}@media (max-width:30rem){.u-pl-2-half-t{padding-left:2.5rem !important}}@media (max-width:30rem){.u-pr-2-half-t{padding-right:2.5rem !important}}@media (max-width:30rem){.u-pv-2-half-t{padding-top:2.5rem !important;padding-bottom:2.5rem !important}}@media (max-width:30rem){.u-ph-2-half-t{padding-left:2.5rem !important;padding-right:2.5rem !important}}@media (max-width:30rem){.u-m-0-t{margin:0 !important}}@media (max-width:30rem){.u-mt-0-t{margin-top:0 !important}}@media (max-width:30rem){.u-mb-0-t{margin-bottom:0 !important}}@media (max-width:30rem){.u-ml-0-t{margin-left:0 !important}}@media (max-width:30rem){.u-mr-0-t{margin-right:0 !important}}@media (max-width:30rem){.u-mv-0-t{margin-top:0 !important;margin-bottom:0 !important}}@media (max-width:30rem){.u-mh-0-t{margin-left:0 !important;margin-right:0 !important}}@media (max-width:30rem){.u-m-1-t{margin:1rem !important}}@media (max-width:30rem){.u-mt-1-t{margin-top:1rem !important}}@media (max-width:30rem){.u-mb-1-t{margin-bottom:1rem !important}}@media (max-width:30rem){.u-ml-1-t{margin-left:1rem !important}}@media (max-width:30rem){.u-mr-1-t{margin-right:1rem !important}}@media (max-width:30rem){.u-mv-1-t{margin-top:1rem !important;margin-bottom:1rem !important}}@media (max-width:30rem){.u-mh-1-t{margin-left:1rem !important;margin-right:1rem !important}}@media (max-width:30rem){.u-m-2-t{margin:2rem !important}}@media (max-width:30rem){.u-mt-2-t{margin-top:2rem !important}}@media (max-width:30rem){.u-mb-2-t{margin-bottom:2rem !important}}@media (max-width:30rem){.u-ml-2-t{margin-left:2rem !important}}@media (max-width:30rem){.u-mr-2-t{margin-right:2rem !important}}@media (max-width:30rem){.u-mv-2-t{margin-top:2rem !important;margin-bottom:2rem !important}}@media (max-width:30rem){.u-mh-2-t{margin-left:2rem !important;margin-right:2rem !important}}@media (max-width:30rem){.u-m-3-t{margin:3rem !important}}@media (max-width:30rem){.u-mt-3-t{margin-top:3rem !important}}@media (max-width:30rem){.u-mb-3-t{margin-bottom:3rem !important}}@media (max-width:30rem){.u-ml-3-t{margin-left:3rem !important}}@media (max-width:30rem){.u-mr-3-t{margin-right:3rem !important}}@media (max-width:30rem){.u-mv-3-t{margin-top:3rem !important;margin-bottom:3rem !important}}@media (max-width:30rem){.u-mh-3-t{margin-left:3rem !important;margin-right:3rem !important}}@media (max-width:30rem){.u-m-auto-t{margin:auto !important}}@media (max-width:30rem){.u-mt-auto-t{margin-top:auto !important}}@media (max-width:30rem){.u-mb-auto-t{margin-bottom:auto !important}}@media (max-width:30rem){.u-ml-auto-t{margin-left:auto !important}}@media (max-width:30rem){.u-mr-auto-t{margin-right:auto !important}}@media (max-width:30rem){.u-mv-auto-t{margin-top:auto !important;margin-bottom:auto !important}}@media (max-width:30rem){.u-mh-auto-t{margin-left:auto !important;margin-right:auto !important}}@media (max-width:30rem){.u-m-half-t{margin:.5rem !important}}@media (max-width:30rem){.u-mt-half-t{margin-top:.5rem !important}}@media (max-width:30rem){.u-mb-half-t{margin-bottom:.5rem !important}}@media (max-width:30rem){.u-ml-half-t{margin-left:.5rem !important}}@media (max-width:30rem){.u-mr-half-t{margin-right:.5rem !important}}@media (max-width:30rem){.u-mv-half-t{margin-top:.5rem !important;margin-bottom:.5rem !important}}@media (max-width:30rem){.u-mh-half-t{margin-left:.5rem !important;margin-right:.5rem !important}}@media (max-width:30rem){.u-m-1-half-t{margin:1.5rem !important}}@media (max-width:30rem){.u-mt-1-half-t{margin-top:1.5rem !important}}@media (max-width:30rem){.u-mb-1-half-t{margin-bottom:1.5rem !important}}@media (max-width:30rem){.u-ml-1-half-t{margin-left:1.5rem !important}}@media (max-width:30rem){.u-mr-1-half-t{margin-right:1.5rem !important}}@media (max-width:30rem){.u-mv-1-half-t{margin-top:1.5rem !important;margin-bottom:1.5rem !important}}@media (max-width:30rem){.u-mh-1-half-t{margin-left:1.5rem !important;margin-right:1.5rem !important}}@media (max-width:30rem){.u-m-2-half-t{margin:2.5rem !important}}@media (max-width:30rem){.u-mt-2-half-t{margin-top:2.5rem !important}}@media (max-width:30rem){.u-mb-2-half-t{margin-bottom:2.5rem !important}}@media (max-width:30rem){.u-ml-2-half-t{margin-left:2.5rem !important}}@media (max-width:30rem){.u-mr-2-half-t{margin-right:2.5rem !important}}@media (max-width:30rem){.u-mv-2-half-t{margin-top:2.5rem !important;margin-bottom:2.5rem !important}}@media (max-width:30rem){.u-mh-2-half-t{margin-left:2.5rem !important;margin-right:2.5rem !important}}@media (max-width:48rem){.u-p-0-s{padding:0 !important}}@media (max-width:48rem){.u-pt-0-s{padding-top:0 !important}}@media (max-width:48rem){.u-pb-0-s{padding-bottom:0 !important}}@media (max-width:48rem){.u-pl-0-s{padding-left:0 !important}}@media (max-width:48rem){.u-pr-0-s{padding-right:0 !important}}@media (max-width:48rem){.u-pv-0-s{padding-top:0 !important;padding-bottom:0 !important}}@media (max-width:48rem){.u-ph-0-s{padding-left:0 !important;padding-right:0 !important}}@media (max-width:48rem){.u-p-1-s{padding:1rem !important}}@media (max-width:48rem){.u-pt-1-s{padding-top:1rem !important}}@media (max-width:48rem){.u-pb-1-s{padding-bottom:1rem !important}}@media (max-width:48rem){.u-pl-1-s{padding-left:1rem !important}}@media (max-width:48rem){.u-pr-1-s{padding-right:1rem !important}}@media (max-width:48rem){.u-pv-1-s{padding-top:1rem !important;padding-bottom:1rem !important}}@media (max-width:48rem){.u-ph-1-s{padding-left:1rem !important;padding-right:1rem !important}}@media (max-width:48rem){.u-p-2-s{padding:2rem !important}}@media (max-width:48rem){.u-pt-2-s{padding-top:2rem !important}}@media (max-width:48rem){.u-pb-2-s{padding-bottom:2rem !important}}@media (max-width:48rem){.u-pl-2-s{padding-left:2rem !important}}@media (max-width:48rem){.u-pr-2-s{padding-right:2rem !important}}@media (max-width:48rem){.u-pv-2-s{padding-top:2rem !important;padding-bottom:2rem !important}}@media (max-width:48rem){.u-ph-2-s{padding-left:2rem !important;padding-right:2rem !important}}@media (max-width:48rem){.u-p-3-s{padding:3rem !important}}@media (max-width:48rem){.u-pt-3-s{padding-top:3rem !important}}@media (max-width:48rem){.u-pb-3-s{padding-bottom:3rem !important}}@media (max-width:48rem){.u-pl-3-s{padding-left:3rem !important}}@media (max-width:48rem){.u-pr-3-s{padding-right:3rem !important}}@media (max-width:48rem){.u-pv-3-s{padding-top:3rem !important;padding-bottom:3rem !important}}@media (max-width:48rem){.u-ph-3-s{padding-left:3rem !important;padding-right:3rem !important}}@media (max-width:48rem){.u-p-auto-s{padding:auto !important}}@media (max-width:48rem){.u-pt-auto-s{padding-top:auto !important}}@media (max-width:48rem){.u-pb-auto-s{padding-bottom:auto !important}}@media (max-width:48rem){.u-pl-auto-s{padding-left:auto !important}}@media (max-width:48rem){.u-pr-auto-s{padding-right:auto !important}}@media (max-width:48rem){.u-pv-auto-s{padding-top:auto !important;padding-bottom:auto !important}}@media (max-width:48rem){.u-ph-auto-s{padding-left:auto !important;padding-right:auto !important}}@media (max-width:48rem){.u-p-half-s{padding:.5rem !important}}@media (max-width:48rem){.u-pt-half-s{padding-top:.5rem !important}}@media (max-width:48rem){.u-pb-half-s{padding-bottom:.5rem !important}}@media (max-width:48rem){.u-pl-half-s{padding-left:.5rem !important}}@media (max-width:48rem){.u-pr-half-s{padding-right:.5rem !important}}@media (max-width:48rem){.u-pv-half-s{padding-top:.5rem !important;padding-bottom:.5rem !important}}@media (max-width:48rem){.u-ph-half-s{padding-left:.5rem !important;padding-right:.5rem !important}}@media (max-width:48rem){.u-p-1-half-s{padding:1.5rem !important}}@media (max-width:48rem){.u-pt-1-half-s{padding-top:1.5rem !important}}@media (max-width:48rem){.u-pb-1-half-s{padding-bottom:1.5rem !important}}@media (max-width:48rem){.u-pl-1-half-s{padding-left:1.5rem !important}}@media (max-width:48rem){.u-pr-1-half-s{padding-right:1.5rem !important}}@media (max-width:48rem){.u-pv-1-half-s{padding-top:1.5rem !important;padding-bottom:1.5rem !important}}@media (max-width:48rem){.u-ph-1-half-s{padding-left:1.5rem !important;padding-right:1.5rem !important}}@media (max-width:48rem){.u-p-2-half-s{padding:2.5rem !important}}@media (max-width:48rem){.u-pt-2-half-s{padding-top:2.5rem !important}}@media (max-width:48rem){.u-pb-2-half-s{padding-bottom:2.5rem !important}}@media (max-width:48rem){.u-pl-2-half-s{padding-left:2.5rem !important}}@media (max-width:48rem){.u-pr-2-half-s{padding-right:2.5rem !important}}@media (max-width:48rem){.u-pv-2-half-s{padding-top:2.5rem !important;padding-bottom:2.5rem !important}}@media (max-width:48rem){.u-ph-2-half-s{padding-left:2.5rem !important;padding-right:2.5rem !important}}@media (max-width:48rem){.u-m-0-s{margin:0 !important}}@media (max-width:48rem){.u-mt-0-s{margin-top:0 !important}}@media (max-width:48rem){.u-mb-0-s{margin-bottom:0 !important}}@media (max-width:48rem){.u-ml-0-s{margin-left:0 !important}}@media (max-width:48rem){.u-mr-0-s{margin-right:0 !important}}@media (max-width:48rem){.u-mv-0-s{margin-top:0 !important;margin-bottom:0 !important}}@media (max-width:48rem){.u-mh-0-s{margin-left:0 !important;margin-right:0 !important}}@media (max-width:48rem){.u-m-1-s{margin:1rem !important}}@media (max-width:48rem){.u-mt-1-s{margin-top:1rem !important}}@media (max-width:48rem){.u-mb-1-s{margin-bottom:1rem !important}}@media (max-width:48rem){.u-ml-1-s{margin-left:1rem !important}}@media (max-width:48rem){.u-mr-1-s{margin-right:1rem !important}}@media (max-width:48rem){.u-mv-1-s{margin-top:1rem !important;margin-bottom:1rem !important}}@media (max-width:48rem){.u-mh-1-s{margin-left:1rem !important;margin-right:1rem !important}}@media (max-width:48rem){.u-m-2-s{margin:2rem !important}}@media (max-width:48rem){.u-mt-2-s{margin-top:2rem !important}}@media (max-width:48rem){.u-mb-2-s{margin-bottom:2rem !important}}@media (max-width:48rem){.u-ml-2-s{margin-left:2rem !important}}@media (max-width:48rem){.u-mr-2-s{margin-right:2rem !important}}@media (max-width:48rem){.u-mv-2-s{margin-top:2rem !important;margin-bottom:2rem !important}}@media (max-width:48rem){.u-mh-2-s{margin-left:2rem !important;margin-right:2rem !important}}@media (max-width:48rem){.u-m-3-s{margin:3rem !important}}@media (max-width:48rem){.u-mt-3-s{margin-top:3rem !important}}@media (max-width:48rem){.u-mb-3-s{margin-bottom:3rem !important}}@media (max-width:48rem){.u-ml-3-s{margin-left:3rem !important}}@media (max-width:48rem){.u-mr-3-s{margin-right:3rem !important}}@media (max-width:48rem){.u-mv-3-s{margin-top:3rem !important;margin-bottom:3rem !important}}@media (max-width:48rem){.u-mh-3-s{margin-left:3rem !important;margin-right:3rem !important}}@media (max-width:48rem){.u-m-auto-s{margin:auto !important}}@media (max-width:48rem){.u-mt-auto-s{margin-top:auto !important}}@media (max-width:48rem){.u-mb-auto-s{margin-bottom:auto !important}}@media (max-width:48rem){.u-ml-auto-s{margin-left:auto !important}}@media (max-width:48rem){.u-mr-auto-s{margin-right:auto !important}}@media (max-width:48rem){.u-mv-auto-s{margin-top:auto !important;margin-bottom:auto !important}}@media (max-width:48rem){.u-mh-auto-s{margin-left:auto !important;margin-right:auto !important}}@media (max-width:48rem){.u-m-half-s{margin:.5rem !important}}@media (max-width:48rem){.u-mt-half-s{margin-top:.5rem !important}}@media (max-width:48rem){.u-mb-half-s{margin-bottom:.5rem !important}}@media (max-width:48rem){.u-ml-half-s{margin-left:.5rem !important}}@media (max-width:48rem){.u-mr-half-s{margin-right:.5rem !important}}@media (max-width:48rem){.u-mv-half-s{margin-top:.5rem !important;margin-bottom:.5rem !important}}@media (max-width:48rem){.u-mh-half-s{margin-left:.5rem !important;margin-right:.5rem !important}}@media (max-width:48rem){.u-m-1-half-s{margin:1.5rem !important}}@media (max-width:48rem){.u-mt-1-half-s{margin-top:1.5rem !important}}@media (max-width:48rem){.u-mb-1-half-s{margin-bottom:1.5rem !important}}@media (max-width:48rem){.u-ml-1-half-s{margin-left:1.5rem !important}}@media (max-width:48rem){.u-mr-1-half-s{margin-right:1.5rem !important}}@media (max-width:48rem){.u-mv-1-half-s{margin-top:1.5rem !important;margin-bottom:1.5rem !important}}@media (max-width:48rem){.u-mh-1-half-s{margin-left:1.5rem !important;margin-right:1.5rem !important}}@media (max-width:48rem){.u-m-2-half-s{margin:2.5rem !important}}@media (max-width:48rem){.u-mt-2-half-s{margin-top:2.5rem !important}}@media (max-width:48rem){.u-mb-2-half-s{margin-bottom:2.5rem !important}}@media (max-width:48rem){.u-ml-2-half-s{margin-left:2.5rem !important}}@media (max-width:48rem){.u-mr-2-half-s{margin-right:2.5rem !important}}@media (max-width:48rem){.u-mv-2-half-s{margin-top:2.5rem !important;margin-bottom:2.5rem !important}}@media (max-width:48rem){.u-mh-2-half-s{margin-left:2.5rem !important;margin-right:2.5rem !important}}@media (max-width:63.938rem){.u-p-0-m{padding:0 !important}}@media (max-width:63.938rem){.u-pt-0-m{padding-top:0 !important}}@media (max-width:63.938rem){.u-pb-0-m{padding-bottom:0 !important}}@media (max-width:63.938rem){.u-pl-0-m{padding-left:0 !important}}@media (max-width:63.938rem){.u-pr-0-m{padding-right:0 !important}}@media (max-width:63.938rem){.u-pv-0-m{padding-top:0 !important;padding-bottom:0 !important}}@media (max-width:63.938rem){.u-ph-0-m{padding-left:0 !important;padding-right:0 !important}}@media (max-width:63.938rem){.u-p-1-m{padding:1rem !important}}@media (max-width:63.938rem){.u-pt-1-m{padding-top:1rem !important}}@media (max-width:63.938rem){.u-pb-1-m{padding-bottom:1rem !important}}@media (max-width:63.938rem){.u-pl-1-m{padding-left:1rem !important}}@media (max-width:63.938rem){.u-pr-1-m{padding-right:1rem !important}}@media (max-width:63.938rem){.u-pv-1-m{padding-top:1rem !important;padding-bottom:1rem !important}}@media (max-width:63.938rem){.u-ph-1-m{padding-left:1rem !important;padding-right:1rem !important}}@media (max-width:63.938rem){.u-p-2-m{padding:2rem !important}}@media (max-width:63.938rem){.u-pt-2-m{padding-top:2rem !important}}@media (max-width:63.938rem){.u-pb-2-m{padding-bottom:2rem !important}}@media (max-width:63.938rem){.u-pl-2-m{padding-left:2rem !important}}@media (max-width:63.938rem){.u-pr-2-m{padding-right:2rem !important}}@media (max-width:63.938rem){.u-pv-2-m{padding-top:2rem !important;padding-bottom:2rem !important}}@media (max-width:63.938rem){.u-ph-2-m{padding-left:2rem !important;padding-right:2rem !important}}@media (max-width:63.938rem){.u-p-3-m{padding:3rem !important}}@media (max-width:63.938rem){.u-pt-3-m{padding-top:3rem !important}}@media (max-width:63.938rem){.u-pb-3-m{padding-bottom:3rem !important}}@media (max-width:63.938rem){.u-pl-3-m{padding-left:3rem !important}}@media (max-width:63.938rem){.u-pr-3-m{padding-right:3rem !important}}@media (max-width:63.938rem){.u-pv-3-m{padding-top:3rem !important;padding-bottom:3rem !important}}@media (max-width:63.938rem){.u-ph-3-m{padding-left:3rem !important;padding-right:3rem !important}}@media (max-width:63.938rem){.u-p-auto-m{padding:auto !important}}@media (max-width:63.938rem){.u-pt-auto-m{padding-top:auto !important}}@media (max-width:63.938rem){.u-pb-auto-m{padding-bottom:auto !important}}@media (max-width:63.938rem){.u-pl-auto-m{padding-left:auto !important}}@media (max-width:63.938rem){.u-pr-auto-m{padding-right:auto !important}}@media (max-width:63.938rem){.u-pv-auto-m{padding-top:auto !important;padding-bottom:auto !important}}@media (max-width:63.938rem){.u-ph-auto-m{padding-left:auto !important;padding-right:auto !important}}@media (max-width:63.938rem){.u-p-half-m{padding:.5rem !important}}@media (max-width:63.938rem){.u-pt-half-m{padding-top:.5rem !important}}@media (max-width:63.938rem){.u-pb-half-m{padding-bottom:.5rem !important}}@media (max-width:63.938rem){.u-pl-half-m{padding-left:.5rem !important}}@media (max-width:63.938rem){.u-pr-half-m{padding-right:.5rem !important}}@media (max-width:63.938rem){.u-pv-half-m{padding-top:.5rem !important;padding-bottom:.5rem !important}}@media (max-width:63.938rem){.u-ph-half-m{padding-left:.5rem !important;padding-right:.5rem !important}}@media (max-width:63.938rem){.u-p-1-half-m{padding:1.5rem !important}}@media (max-width:63.938rem){.u-pt-1-half-m{padding-top:1.5rem !important}}@media (max-width:63.938rem){.u-pb-1-half-m{padding-bottom:1.5rem !important}}@media (max-width:63.938rem){.u-pl-1-half-m{padding-left:1.5rem !important}}@media (max-width:63.938rem){.u-pr-1-half-m{padding-right:1.5rem !important}}@media (max-width:63.938rem){.u-pv-1-half-m{padding-top:1.5rem !important;padding-bottom:1.5rem !important}}@media (max-width:63.938rem){.u-ph-1-half-m{padding-left:1.5rem !important;padding-right:1.5rem !important}}@media (max-width:63.938rem){.u-p-2-half-m{padding:2.5rem !important}}@media (max-width:63.938rem){.u-pt-2-half-m{padding-top:2.5rem !important}}@media (max-width:63.938rem){.u-pb-2-half-m{padding-bottom:2.5rem !important}}@media (max-width:63.938rem){.u-pl-2-half-m{padding-left:2.5rem !important}}@media (max-width:63.938rem){.u-pr-2-half-m{padding-right:2.5rem !important}}@media (max-width:63.938rem){.u-pv-2-half-m{padding-top:2.5rem !important;padding-bottom:2.5rem !important}}@media (max-width:63.938rem){.u-ph-2-half-m{padding-left:2.5rem !important;padding-right:2.5rem !important}}@media (max-width:63.938rem){.u-m-0-m{margin:0 !important}}@media (max-width:63.938rem){.u-mt-0-m{margin-top:0 !important}}@media (max-width:63.938rem){.u-mb-0-m{margin-bottom:0 !important}}@media (max-width:63.938rem){.u-ml-0-m{margin-left:0 !important}}@media (max-width:63.938rem){.u-mr-0-m{margin-right:0 !important}}@media (max-width:63.938rem){.u-mv-0-m{margin-top:0 !important;margin-bottom:0 !important}}@media (max-width:63.938rem){.u-mh-0-m{margin-left:0 !important;margin-right:0 !important}}@media (max-width:63.938rem){.u-m-1-m{margin:1rem !important}}@media (max-width:63.938rem){.u-mt-1-m{margin-top:1rem !important}}@media (max-width:63.938rem){.u-mb-1-m{margin-bottom:1rem !important}}@media (max-width:63.938rem){.u-ml-1-m{margin-left:1rem !important}}@media (max-width:63.938rem){.u-mr-1-m{margin-right:1rem !important}}@media (max-width:63.938rem){.u-mv-1-m{margin-top:1rem !important;margin-bottom:1rem !important}}@media (max-width:63.938rem){.u-mh-1-m{margin-left:1rem !important;margin-right:1rem !important}}@media (max-width:63.938rem){.u-m-2-m{margin:2rem !important}}@media (max-width:63.938rem){.u-mt-2-m{margin-top:2rem !important}}@media (max-width:63.938rem){.u-mb-2-m{margin-bottom:2rem !important}}@media (max-width:63.938rem){.u-ml-2-m{margin-left:2rem !important}}@media (max-width:63.938rem){.u-mr-2-m{margin-right:2rem !important}}@media (max-width:63.938rem){.u-mv-2-m{margin-top:2rem !important;margin-bottom:2rem !important}}@media (max-width:63.938rem){.u-mh-2-m{margin-left:2rem !important;margin-right:2rem !important}}@media (max-width:63.938rem){.u-m-3-m{margin:3rem !important}}@media (max-width:63.938rem){.u-mt-3-m{margin-top:3rem !important}}@media (max-width:63.938rem){.u-mb-3-m{margin-bottom:3rem !important}}@media (max-width:63.938rem){.u-ml-3-m{margin-left:3rem !important}}@media (max-width:63.938rem){.u-mr-3-m{margin-right:3rem !important}}@media (max-width:63.938rem){.u-mv-3-m{margin-top:3rem !important;margin-bottom:3rem !important}}@media (max-width:63.938rem){.u-mh-3-m{margin-left:3rem !important;margin-right:3rem !important}}@media (max-width:63.938rem){.u-m-auto-m{margin:auto !important}}@media (max-width:63.938rem){.u-mt-auto-m{margin-top:auto !important}}@media (max-width:63.938rem){.u-mb-auto-m{margin-bottom:auto !important}}@media (max-width:63.938rem){.u-ml-auto-m{margin-left:auto !important}}@media (max-width:63.938rem){.u-mr-auto-m{margin-right:auto !important}}@media (max-width:63.938rem){.u-mv-auto-m{margin-top:auto !important;margin-bottom:auto !important}}@media (max-width:63.938rem){.u-mh-auto-m{margin-left:auto !important;margin-right:auto !important}}@media (max-width:63.938rem){.u-m-half-m{margin:.5rem !important}}@media (max-width:63.938rem){.u-mt-half-m{margin-top:.5rem !important}}@media (max-width:63.938rem){.u-mb-half-m{margin-bottom:.5rem !important}}@media (max-width:63.938rem){.u-ml-half-m{margin-left:.5rem !important}}@media (max-width:63.938rem){.u-mr-half-m{margin-right:.5rem !important}}@media (max-width:63.938rem){.u-mv-half-m{margin-top:.5rem !important;margin-bottom:.5rem !important}}@media (max-width:63.938rem){.u-mh-half-m{margin-left:.5rem !important;margin-right:.5rem !important}}@media (max-width:63.938rem){.u-m-1-half-m{margin:1.5rem !important}}@media (max-width:63.938rem){.u-mt-1-half-m{margin-top:1.5rem !important}}@media (max-width:63.938rem){.u-mb-1-half-m{margin-bottom:1.5rem !important}}@media (max-width:63.938rem){.u-ml-1-half-m{margin-left:1.5rem !important}}@media (max-width:63.938rem){.u-mr-1-half-m{margin-right:1.5rem !important}}@media (max-width:63.938rem){.u-mv-1-half-m{margin-top:1.5rem !important;margin-bottom:1.5rem !important}}@media (max-width:63.938rem){.u-mh-1-half-m{margin-left:1.5rem !important;margin-right:1.5rem !important}}@media (max-width:63.938rem){.u-m-2-half-m{margin:2.5rem !important}}@media (max-width:63.938rem){.u-mt-2-half-m{margin-top:2.5rem !important}}@media (max-width:63.938rem){.u-mb-2-half-m{margin-bottom:2.5rem !important}}@media (max-width:63.938rem){.u-ml-2-half-m{margin-left:2.5rem !important}}@media (max-width:63.938rem){.u-mr-2-half-m{margin-right:2.5rem !important}}@media (max-width:63.938rem){.u-mv-2-half-m{margin-top:2.5rem !important;margin-bottom:2.5rem !important}}@media (max-width:63.938rem){.u-mh-2-half-m{margin-left:2.5rem !important;margin-right:2.5rem !important}}.c-table-divider{background-color:var(--paleGrey);height:2rem;display:flex;align-items:center;text-indent:2rem;font-weight:bold;font-size:.75rem;line-height:1.33;color:var(--coolGrey);text-transform:uppercase}.c-table-divider + .c-table-divider{border-top:0}@media (max-width:48rem){.c-table-divider{text-indent:1rem}}div.c-table{position:relative;display:flex;flex-direction:column;flex:1 1 100%;height:100%;text-align:left;color:var(--secondaryTextColor)}.c-table-head{flex:0 0 2rem}@media (max-width:48rem){.c-table-head{display:none}}.c-table-body{flex:1 1 auto;display:flex;flex-direction:column;overflow:auto}@media (max-width:48rem){.c-table-body{max-height:100%}}.c-table-row,.c-table-row-head,table.c-table tr,table.c-table thead tr{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;flex:0 0 auto;height:3rem;width:100%;border-top:.063rem solid var(--dividerColor)}.c-table-row:hover,.c-table-row-head:hover,table.c-table tr:hover,table.c-table thead tr:hover{background-color:var(--actionColorHover)}@media (hover:none){.c-table-row:hover,.c-table-row-head:hover,table.c-table tr:hover,table.c-table thead tr:hover{background-color:transparent}}.c-table-row:last-child,.c-table-row-head:last-child,table.c-table tr:last-child,table.c-table thead tr:last-child{border-bottom:.063rem solid var(--dividerColor)}@media (max-width:63.938rem){.c-table-row,.c-table-row-head,table.c-table tr,table.c-table thead tr{max-width:100vw}}.c-table-row-head,table.c-table thead tr{border:0}.c-table-row-head:hover,table.c-table thead tr:hover{background-color:transparent}.c-table-row-head:last-child,table.c-table thead tr:last-child{border-bottom:0}.c-table-row.is-selected,table.c-table tr.is-selected,.c-table-row.is-selected:hover,table.c-table tr.is-selected:hover{background-color:var(--zircon)}.c-table-cell,.c-table-header,table.c-table th,table.c-table td{box-sizing:border-box;padding:.875rem 1rem;font-size:.875rem;line-height:1.3}.c-table-header,table.c-table th{padding:.5rem 1rem;font-size:.75rem;font-weight:bold;text-transform:uppercase}.c-table-cell--primary,.c-table-ellipsis,table.c-table td.c-table-cell--primary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.c-table-cell--primary,table.c-table td.c-table-cell--primary{font-size:1rem;line-height:1.15;color:var(--charcoalGrey)}@media (max-width:48rem){.c-table-cell--primary,table.c-table td.c-table-cell--primary{flex:1 1 auto}}.c-table-divider{position:sticky;z-index:1;top:0}table.c-table{width:100%;border:0;text-align:left;color:var(--secondaryTextColor);border-collapse:collapse}table.c-table tr{display:table-row}table.c-table thead tr{display:table-row}table.c-table tr.c-table-divider{border:0;width:auto;height:auto;background-color:var(--zircon)}table.c-table tr.c-table-divider::before{content:none}table.c-table tr.c-table-divider td{font-weight:bold;color:var(--secondaryTextColor);padding:0;font-size:.75rem;line-height:1.33}table.c-table tr.c-table-divider + *{border-top:0}table.c-table td.c-table-ellipsis{position:relative}table.c-table td.c-table-ellipsis > div{box-sizing:border-box;position:absolute;top:.875rem;right:1rem;bottom:.875rem;left:1rem;display:block;width:calc(100% - rem(32))}table.c-table td.c-table-ellipsis > div > div{box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wizard{position:fixed;top:0;left:0;box-sizing:border-box;height:100%;display:flex;justify-content:center;align-items:center;width:100%;background-color:var(--white);color:var(--charcoalGrey);text-align:center}@media (max-width:30rem),(max-height:23.438rem){.wizard{flex-direction:column;justify-content:flex-start}}.wizard--waiting{color:var(--white);background-color:var(--primaryColor)}.wizard--scroll{position:absolute;padding-top:3.5rem}@media (max-width:63.938rem){.wizard--scroll{box-sizing:border-box}}@media (max-width:30rem),(max-height:23.438rem){.wizard--scroll{padding-top:0}}.wizard--dual{position:static;width:100%}.wizard-wrapper{justify-content:center;width:100%;height:100%;max-width:34rem;text-align:left}@media (max-width:30rem),(max-height:23.438rem){.wizard-wrapper{justify-content:flex-start}}@media (max-width:30rem),(max-height:23.438rem){.wizard-wrapper--center{justify-content:center}}.wizard-wrapper--bleed{align-items:center;max-width:100%}.wizard-wrapper--dual{display:flex;flex-direction:column;align-items:center;height:100vh}@media (max-height:38rem){.wizard-wrapper--dual{min-height:100vh;height:auto}}.wizard-dual{flex:1 1 50%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}.wizard-dual:first-child{justify-content:flex-end;color:var(--white);background-color:var(--primaryColor)}.wizard-errors{order:1;margin:1rem 0 0;font-size:.875rem;line-height:1.7;font-style:italic}.wizard-errors p{margin:0}@media (max-width:30rem),(max-height:23.438rem){.wizard-errors{margin-top:.5rem}}.wizard-header{display:flex;flex-direction:column;box-sizing:border-box;max-width:34rem;margin:1rem 0 .5rem;padding:0 1rem;position:relative}@media (max-width:30rem),(max-height:23.438rem){.wizard-header{margin:1rem 0 0}}.wizard-dual .wizard-header{margin-bottom:2rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-dual .wizard-header{margin-bottom:1.5rem}}.wizard-main{display:flex;flex-direction:column;flex:0 1 auto;box-sizing:border-box;width:100%;padding:0 1rem}.wizard-main > *{flex-shrink:0}.wizard-footer{display:flex;order:2;flex-wrap:wrap;box-sizing:border-box;max-width:34rem;margin:2rem 0 1.5rem;padding:0 1rem;padding-bottom:env(safe-area-inset-bottom)}.wizard-footer > button,.wizard-footer > a:link{flex:1 1 100%;margin:0 0 .5rem;line-height:1.5}@media (max-width:30rem),(max-height:23.438rem){.wizard-footer{margin:1.5rem 0 .5rem}}.wizard--welcome .wizard-footer{justify-content:space-between}@media (min-width:30.063rem){.wizard--welcome .wizard-footer > button,.wizard--welcome .wizard-footer > a:link{flex:0 1 calc(50% - 0.25rem)}}.wizard-dual .wizard-footer{margin-top:2rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-dual .wizard-footer{margin-top:1.5rem;font-size:.875rem}}.wizard-logo{position:relative;margin:0 auto;width:7.5rem}.wizard-logo-img{width:100%;vertical-align:center}.wizard-logo-badge{display:flex;align-items:center;justify-content:center;position:absolute;bottom:-.375rem;right:-.375rem;width:2rem;height:2rem;border:.125rem solid var(--white);background-color:var(--primaryColor);border-radius:50%}.wizard-header-help{order:-1;margin:0 0 .5rem;font-size:1.125rem;line-height:1.5;text-align:center}@media (max-width:30rem),(max-height:23.438rem){.wizard-header-help{margin:.25rem 0 0;font-size:1rem}}.wizard-disclaimer{display:flex;margin:1.5rem 0 .5rem;flex-direction:row;align-items:flex-start;font-size:.938rem;line-height:1.33}.wizard-disclaimer span{flex:0 0 auto;margin-right:1rem;background-color:var(--grannyApple);padding:.5rem;border-radius:50%}.wizard-disclaimer svg{display:block;fill:var(--emerald)}.wizard-disclaimer strong{color:var(--emerald)}@media (max-width:30rem),(max-height:23.438rem){.wizard-disclaimer{display:none}}.wizard-desc{margin:2rem 0 0;line-height:1.5}.wizard-desc a{color:var(--primaryColor);text-decoration:none}.wizard-desc a:hover,.wizard-desc a:focus{color:var(--primaryColorDark)}@media (max-width:30rem),(max-height:23.438rem){.wizard-desc{margin:1.5rem 0 0}}.wizard-desc--footer{margin:2rem 0}@media (max-width:30rem),(max-height:23.438rem){.wizard-desc--footer{margin:1rem 0}}.wizard-header-fixed{position:fixed;top:.5rem;left:1rem;display:inline-flex;align-items:center}.wizard-previous{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin:0;padding:.625rem 1rem;color:var(--coolGrey)}.wizard-brand{margin-left:2rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-brand{display:none}}.wizard-brand--invert svg{-webkit-filter:brightness(0) invert(100%);filter:brightness(0) invert(100%)}.wizard-previous + .wizard-brand{position:relative;padding-left:1.5rem;margin-left:.5rem}.wizard-previous + .wizard-brand:before{content:'';position:absolute;left:0;top:50%;height:1.5rem;border-left:.063rem solid var(--dividerColor);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.wizard-next{padding-right:3rem;padding-left:3rem}.wizard-next svg{position:absolute;right:1rem}@media (min-width:30.063rem) and (min-height:23.5rem){.wizard-button{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5}}@media (min-width:30.063rem){.wizard-buttonlink{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5}}@media (max-width:30rem),(max-height:23.438rem){.wizard-input{border-radius:.125rem;padding:.5rem 1rem .625rem}}.wizard-dual-btn{position:absolute;bottom:-2.437rem;left:1rem;right:1rem;margin:0;width:calc(100% - 2rem);font-size:.875rem}@media (min-width:30.063rem){.wizard-dual-btn{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5;bottom:-2rem;font-size:1rem}}.wizard-dual-btn:hover,.wizard-dual-btn:focus{background-color:var(--emerald);border-color:var(--emerald)}.wizard-waiting-icon,.wizard-dual-icon{margin:0 0 2rem;height:6.188rem}.wizard-waiting-icon svg,.wizard-dual-icon svg{display:block;margin:0 auto;height:100%;width:100%}@media (max-width:30rem),(max-height:23.438rem){.wizard-waiting-icon,.wizard-dual-icon{margin-bottom:1rem;height:3.438rem}}.wizard-dual-icon{margin:0 0 1rem;height:7.688rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-dual-icon{height:5.125rem}}.wizard-title,.wizard-dual-title{margin:0;text-align:center;font-size:2rem;line-height:1.25}@media (max-width:30rem),(max-height:23.438rem){.wizard-title,.wizard-dual-title{font-size:1.125rem;line-height:1.78}}.wizard-dual-title{margin-bottom:1rem;font-size:2.5rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-dual-title{margin-bottom:.5rem;font-size:1.5rem;line-height:1.3}}.wizard-title-sub{display:block;margin-top:.5rem;opacity:.64;font-size:1rem;font-weight:normal;line-height:1.5}@media (max-width:30rem),(max-height:23.438rem){.wizard-title-sub{margin:0;font-size:1rem;line-height:1.5}}.wizard-subtitle,.wizard-dual-subtitle{margin:0;text-align:center;font-size:1rem;font-weight:normal;line-height:1.5}@media (max-width:30rem),(max-height:23.438rem){.wizard-subtitle,.wizard-dual-subtitle{font-size:.875rem;line-height:1.15}}.wizard-dual-subtitle{font-size:1.25rem;line-height:1.4}@media (max-width:30rem),(max-height:23.438rem){.wizard-dual-subtitle{font-size:1rem;line-height:1.5}}@media (max-width:30rem),(max-height:23.438rem){.wizard--welcome .wizard-title{font-size:1.5rem;line-height:1.17}}.wizard-showbutton{position:absolute;right:0;top:.688rem;margin:0;border:0;padding:0;min-width:auto;background-color:transparent;color:var(--coolGrey)}.wizard-showbutton:hover,.wizard-showbutton:focus{background-color:inherit;color:var(--charcoalGrey)}.wizard-dualfield{display:flex;flex-direction:row;align-items:stretch;border:.063rem solid var(--dividerColor);border-radius:.125rem}.wizard-dualfield--focus{border-color:var(--primaryColor)}.wizard-dualfield--error{border-color:var(--errorColor)}.wizard-dualfield-wrapper{flex:1 1 auto}.wizard-dualfield-input{border:0;padding-right:.5rem}.wizard-dualfield-input:hover,.wizard-dualfield-input:focus{position:relative;z-index:1;border:0;outline:0}@media (max-width:30rem),(max-height:23.438rem){.wizard-dualfield-input{border-radius:.125rem;padding:.5rem 1rem .625rem;padding-right:.25rem}}.wizard-protocol{display:flex;align-items:center;background-color:var(--paleGrey);border-right:.063rem solid var(--dividerColor);padding:0 1rem}.wizard-protocol svg{fill:currentColor;margin-right:.5rem}.wizard-domain{display:flex;flex-direction:column;justify-content:center;flex:0 1 auto;margin-right:1rem;max-width:8.75rem}.wizard-select{flex:0 0 auto;margin:.125rem;width:9.25rem;border:0;padding:.625rem 2.375rem .625rem .5rem}.wizard-select:hover,.wizard-select:focus{position:relative;z-index:1;background-color:var(--paleGrey);border:0;outline:0}.wizard-select--medium{padding:.313rem 2.375rem .438rem .5rem}.wizard-requirements{order:2;margin-bottom:0;padding:0;list-style:disc inside;line-height:1.5;font-style:italic;color:var(--coolGrey)}.wizard-requirements span{display:inline-block;text-indent:.375rem}@media (max-width:30rem),(max-height:23.438rem){.wizard-requirements{font-size:.875rem;margin-top:.5rem}.wizard-requirements span{text-indent:.125rem}}.wizard-agreements{display:flex;flex-direction:row;margin:0 auto;padding:0;list-style:none;max-width:64.5rem}@media (max-width:63.938rem){.wizard-agreements{flex-direction:column;margin:0 auto;max-width:32rem}}.wizard-agreements-item{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1 1 calc(100% / 6 - 0.5rem);margin:1rem .25rem 0;border:.063rem solid var(--dividerColor);border-radius:.5rem;padding:1rem;color:var(--slateGrey)}@media (max-width:63.938rem){.wizard-agreements-item{flex-direction:row;flex:1 0 auto;margin:1rem 0 0;border:0;padding:0}.wizard-agreements-item:last-child p{border:0;margin:0}}.wizard-agreements-desc{min-height:2rem;font-size:.875rem;line-height:1.43}@media (max-width:63.938rem){.wizard-agreements-desc{flex:1 1 100%;border-bottom:.063rem solid var(--dividerColor);padding-bottom:1rem;font-size:1rem;line-height:1.5}}.wizard-agreements-icon{--bgcolor:var(--dodgerBlue);box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex:0 0 auto;margin:0 auto 1rem;width:3rem;height:3rem;border-radius:50%;padding:.75rem;background-color:var(--bgcolor)}.wizard-agreements-icon svg{display:block;width:100%;height:100%;fill:var(--white)}@media (max-width:63.938rem){.wizard-agreements-icon{margin:0 1.5rem 0 0;width:2rem;height:2rem;border-radius:50%;padding:.5rem}}.wizard-updated{position:absolute;right:-1.687rem;top:1.188rem;width:6.25rem;background-color:var(--primaryColor);text-transform:uppercase;color:var(--primaryContrastTextColor);-webkit-transform:rotate(-315deg);transform:rotate(-315deg);padding:.313rem;font-size:.625rem;line-height:1;font-weight:bold;text-align:center}.wizard-progress{position:relative;margin:.5rem auto 2rem;max-width:32rem;height:.375rem}.wizard-progress:before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;opacity:.24;border-radius:.188rem;background-color:var(--white)}@media (max-width:33.9375rem){.wizard-progress{margin:.5rem 1rem 1.5rem}}@media (max-height:23.4375rem){.wizard-progress{margin-bottom:1.5rem}}.wizard-progress-bar{position:relative;z-index:1;width:0;height:100%;background-color:var(--white);border-radius:.188rem;transition:width .5s ease-out}.wizard-notice{order:2;margin:2rem 0 0;line-height:1.5}.wizard-notice + .wizard-notice{margin-top:1rem}.wizard-notice p{margin:0}.wizard-notice a{color:var(--dodgerBlue);text-decoration:none;font-weight:bold}.wizard-notice a:hover,.wizard-notice a:focus{color:var(--scienceBlue)}@media (min-width:30.063rem){.wizard-notice{margin:2rem 0 0}}.wizard-notice--lost{font-size:1rem}.u-bg-black{background-color:var(--black) !important}.u-bg-charcoalGrey{background-color:var(--charcoalGrey) !important}.u-bg-coolGrey{background-color:var(--coolGrey) !important}.u-bg-silver{background-color:var(--silver) !important}.u-bg-slateGrey{background-color:var(--slateGrey) !important}.u-bg-lightishPurple{background-color:#b449e7 !important}.u-bg-dodgerBlue{background-color:#297ef2 !important}.u-bg-overlay{background-color:var(--overlay) !important}.u-bg-paleGrey{background-color:var(--paleGrey) !important}.u-bg-monza{background-color:#dd0505 !important}.u-bg-pomegranate{background-color:#f52d2d !important}.u-bg-primaryBackgroundLight{background-color:var(--primaryBackgroundLight) !important}.u-bg-primaryColor{background-color:var(--primaryColor) !important}.u-bg-primaryColorLight{background-color:var(--primaryColorLight) !important}.u-bg-primaryContrastTextColor{background-color:var(--primaryContrastTextColor) !important}.u-bg-error{background-color:var(--errorColor) !important}.u-bg-errorBackground{background-color:var(--errorBackground) !important}.u-bg-success{background-color:var(--successColor) !important}.u-bg-warning{background-color:var(--warningColor) !important}.u-bg-info{background-color:var(--infoColor) !important}.u-bg-weirdGreen{background-color:#40de8e !important}.u-bg-white{background-color:var(--white) !important}.u-bdrs-0{border-radius:0}.u-bdrs-1{border-radius:.125rem}.u-bdrs-2{border-radius:.188rem}.u-bdrs-3{border-radius:.25rem}.u-bdrs-4{border-radius:.5rem}.u-bdrs-circle{border-radius:100%}.u-bdw-0{border-width:0}.u-bdw-1{border-width:.125rem}@media (max-width:30rem){.u-bdrs-0-t{border-radius:0}.u-bdrs-1-t{border-radius:.125rem}.u-bdrs-2-t{border-radius:.188rem}.u-bdrs-3-t{border-radius:.25rem}.u-bdrs-4-t{border-radius:.5rem}.u-bdrs-circle-t{border-radius:100%}.u-bdw-0-t{border-width:0}.u-bdw-1-t{border-width:.125rem}}@media (max-width:48rem){.u-bdrs-0-s{border-radius:0}.u-bdrs-1-s{border-radius:.125rem}.u-bdrs-2-s{border-radius:.188rem}.u-bdrs-3-s{border-radius:.25rem}.u-bdrs-4-s{border-radius:.5rem}.u-bdrs-circle-s{border-radius:100%}.u-bdw-0-s{border-width:0}.u-bdw-1-s{border-width:.125rem}}@media (max-width:63.938rem){.u-bdrs-0-m{border-radius:0}.u-bdrs-1-m{border-radius:.125rem}.u-bdrs-2-m{border-radius:.188rem}.u-bdrs-3-m{border-radius:.25rem}.u-bdrs-4-m{border-radius:.5rem}.u-bdrs-circle-m{border-radius:100%}.u-bdw-0-m{border-width:0}.u-bdw-1-m{border-width:.125rem}}.u-bxz{box-sizing:border-box}.u-c-default{cursor:default}.u-c-help{cursor:help}.u-c-pointer{cursor:pointer}.u-c-wait{cursor:wait}.u-c-not-allowed{cursor:not-allowed}.u-debug{background:rgba(0,0,0,0.075);border:1px solid #f00}.u-debug .u-debug{border-color:#00f}.u-debug .u-debug .u-debug{border-color:#008000}.u-miw-1{min-width:1rem !important}.u-maw-1{max-width:1rem !important}.u-mih-1{min-height:1rem !important}.u-mah-1{max-height:1rem !important}.u-miw-2{min-width:2rem !important}.u-maw-2{max-width:2rem !important}.u-mih-2{min-height:2rem !important}.u-mah-2{max-height:2rem !important}.u-miw-3{min-width:4rem !important}.u-maw-3{max-width:4rem !important}.u-mih-3{min-height:4rem !important}.u-mah-3{max-height:4rem !important}.u-miw-4{min-width:8rem !important}.u-maw-4{max-width:8rem !important}.u-mih-4{min-height:8rem !important}.u-mah-4{max-height:8rem !important}.u-miw-5{min-width:16rem !important}.u-maw-5{max-width:16rem !important}.u-mih-5{min-height:16rem !important}.u-mah-5{max-height:16rem !important}.u-miw-6{min-width:32rem !important}.u-maw-6{max-width:32rem !important}.u-mih-6{min-height:32rem !important}.u-mah-6{max-height:32rem !important}.u-miw-7{min-width:48rem !important}.u-maw-7{max-width:48rem !important}.u-mih-7{min-height:48rem !important}.u-mah-7{max-height:48rem !important}.u-miw-8{min-width:64rem !important}.u-maw-8{max-width:64rem !important}.u-mih-8{min-height:64rem !important}.u-mah-8{max-height:64rem !important}.u-miw-9{min-width:96rem !important}.u-maw-9{max-width:96rem !important}.u-mih-9{min-height:96rem !important}.u-mah-9{max-height:96rem !important}.u-miw-100{min-width:100% !important}.u-maw-100{max-width:100% !important}.u-mih-100{min-height:100% !important}.u-mah-100{max-height:100% !important}.u-maw-none{max-width:none !important}.u-mah-none{max-height:none !important}.u-miw-auto{min-width:auto !important}.u-mih-auto{min-height:auto !important}.u-miw-half{min-width:.5rem !important}.u-maw-half{max-width:.5rem !important}.u-mih-half{min-height:.5rem !important}.u-mah-half{max-height:.5rem !important}.u-miw-1-half{min-width:1.5rem !important}.u-maw-1-half{max-width:1.5rem !important}.u-mih-1-half{min-height:1.5rem !important}.u-mah-1-half{max-height:1.5rem !important}.u-miw-2-half{min-width:2.5rem !important}.u-maw-2-half{max-width:2.5rem !important}.u-mih-2-half{min-height:2.5rem !important}.u-mah-2-half{max-height:2.5rem !important}@media (max-width:30rem){.u-miw-1-t{min-width:1rem !important}}@media (max-width:30rem){.u-maw-1-t{max-width:1rem !important}}@media (max-width:30rem){.u-mih-1-t{min-height:1rem !important}}@media (max-width:30rem){.u-mah-1-t{max-height:1rem !important}}@media (max-width:30rem){.u-miw-2-t{min-width:2rem !important}}@media (max-width:30rem){.u-maw-2-t{max-width:2rem !important}}@media (max-width:30rem){.u-mih-2-t{min-height:2rem !important}}@media (max-width:30rem){.u-mah-2-t{max-height:2rem !important}}@media (max-width:30rem){.u-miw-3-t{min-width:4rem !important}}@media (max-width:30rem){.u-maw-3-t{max-width:4rem !important}}@media (max-width:30rem){.u-mih-3-t{min-height:4rem !important}}@media (max-width:30rem){.u-mah-3-t{max-height:4rem !important}}@media (max-width:30rem){.u-miw-4-t{min-width:8rem !important}}@media (max-width:30rem){.u-maw-4-t{max-width:8rem !important}}@media (max-width:30rem){.u-mih-4-t{min-height:8rem !important}}@media (max-width:30rem){.u-mah-4-t{max-height:8rem !important}}@media (max-width:30rem){.u-miw-5-t{min-width:16rem !important}}@media (max-width:30rem){.u-maw-5-t{max-width:16rem !important}}@media (max-width:30rem){.u-mih-5-t{min-height:16rem !important}}@media (max-width:30rem){.u-mah-5-t{max-height:16rem !important}}@media (max-width:30rem){.u-miw-6-t{min-width:32rem !important}}@media (max-width:30rem){.u-maw-6-t{max-width:32rem !important}}@media (max-width:30rem){.u-mih-6-t{min-height:32rem !important}}@media (max-width:30rem){.u-mah-6-t{max-height:32rem !important}}@media (max-width:30rem){.u-miw-7-t{min-width:48rem !important}}@media (max-width:30rem){.u-maw-7-t{max-width:48rem !important}}@media (max-width:30rem){.u-mih-7-t{min-height:48rem !important}}@media (max-width:30rem){.u-mah-7-t{max-height:48rem !important}}@media (max-width:30rem){.u-miw-8-t{min-width:64rem !important}}@media (max-width:30rem){.u-maw-8-t{max-width:64rem !important}}@media (max-width:30rem){.u-mih-8-t{min-height:64rem !important}}@media (max-width:30rem){.u-mah-8-t{max-height:64rem !important}}@media (max-width:30rem){.u-miw-9-t{min-width:96rem !important}}@media (max-width:30rem){.u-maw-9-t{max-width:96rem !important}}@media (max-width:30rem){.u-mih-9-t{min-height:96rem !important}}@media (max-width:30rem){.u-mah-9-t{max-height:96rem !important}}@media (max-width:30rem){.u-miw-100-t{min-width:100% !important}}@media (max-width:30rem){.u-maw-100-t{max-width:100% !important}}@media (max-width:30rem){.u-mih-100-t{min-height:100% !important}}@media (max-width:30rem){.u-mah-100-t{max-height:100% !important}}@media (max-width:30rem){.u-maw-none-t{max-width:none !important}}@media (max-width:30rem){.u-mah-none-t{max-height:none !important}}@media (max-width:30rem){.u-miw-auto-t{min-width:auto !important}}@media (max-width:30rem){.u-mih-auto-t{min-height:auto !important}}@media (max-width:30rem){.u-miw-half-t{min-width:.5rem !important}}@media (max-width:30rem){.u-maw-half-t{max-width:.5rem !important}}@media (max-width:30rem){.u-mih-half-t{min-height:.5rem !important}}@media (max-width:30rem){.u-mah-half-t{max-height:.5rem !important}}@media (max-width:30rem){.u-miw-1-half-t{min-width:1.5rem !important}}@media (max-width:30rem){.u-maw-1-half-t{max-width:1.5rem !important}}@media (max-width:30rem){.u-mih-1-half-t{min-height:1.5rem !important}}@media (max-width:30rem){.u-mah-1-half-t{max-height:1.5rem !important}}@media (max-width:30rem){.u-miw-2-half-t{min-width:2.5rem !important}}@media (max-width:30rem){.u-maw-2-half-t{max-width:2.5rem !important}}@media (max-width:30rem){.u-mih-2-half-t{min-height:2.5rem !important}}@media (max-width:30rem){.u-mah-2-half-t{max-height:2.5rem !important}}@media (max-width:48rem){.u-miw-1-s{min-width:1rem !important}}@media (max-width:48rem){.u-maw-1-s{max-width:1rem !important}}@media (max-width:48rem){.u-mih-1-s{min-height:1rem !important}}@media (max-width:48rem){.u-mah-1-s{max-height:1rem !important}}@media (max-width:48rem){.u-miw-2-s{min-width:2rem !important}}@media (max-width:48rem){.u-maw-2-s{max-width:2rem !important}}@media (max-width:48rem){.u-mih-2-s{min-height:2rem !important}}@media (max-width:48rem){.u-mah-2-s{max-height:2rem !important}}@media (max-width:48rem){.u-miw-3-s{min-width:4rem !important}}@media (max-width:48rem){.u-maw-3-s{max-width:4rem !important}}@media (max-width:48rem){.u-mih-3-s{min-height:4rem !important}}@media (max-width:48rem){.u-mah-3-s{max-height:4rem !important}}@media (max-width:48rem){.u-miw-4-s{min-width:8rem !important}}@media (max-width:48rem){.u-maw-4-s{max-width:8rem !important}}@media (max-width:48rem){.u-mih-4-s{min-height:8rem !important}}@media (max-width:48rem){.u-mah-4-s{max-height:8rem !important}}@media (max-width:48rem){.u-miw-5-s{min-width:16rem !important}}@media (max-width:48rem){.u-maw-5-s{max-width:16rem !important}}@media (max-width:48rem){.u-mih-5-s{min-height:16rem !important}}@media (max-width:48rem){.u-mah-5-s{max-height:16rem !important}}@media (max-width:48rem){.u-miw-6-s{min-width:32rem !important}}@media (max-width:48rem){.u-maw-6-s{max-width:32rem !important}}@media (max-width:48rem){.u-mih-6-s{min-height:32rem !important}}@media (max-width:48rem){.u-mah-6-s{max-height:32rem !important}}@media (max-width:48rem){.u-miw-7-s{min-width:48rem !important}}@media (max-width:48rem){.u-maw-7-s{max-width:48rem !important}}@media (max-width:48rem){.u-mih-7-s{min-height:48rem !important}}@media (max-width:48rem){.u-mah-7-s{max-height:48rem !important}}@media (max-width:48rem){.u-miw-8-s{min-width:64rem !important}}@media (max-width:48rem){.u-maw-8-s{max-width:64rem !important}}@media (max-width:48rem){.u-mih-8-s{min-height:64rem !important}}@media (max-width:48rem){.u-mah-8-s{max-height:64rem !important}}@media (max-width:48rem){.u-miw-9-s{min-width:96rem !important}}@media (max-width:48rem){.u-maw-9-s{max-width:96rem !important}}@media (max-width:48rem){.u-mih-9-s{min-height:96rem !important}}@media (max-width:48rem){.u-mah-9-s{max-height:96rem !important}}@media (max-width:48rem){.u-miw-100-s{min-width:100% !important}}@media (max-width:48rem){.u-maw-100-s{max-width:100% !important}}@media (max-width:48rem){.u-mih-100-s{min-height:100% !important}}@media (max-width:48rem){.u-mah-100-s{max-height:100% !important}}@media (max-width:48rem){.u-maw-none-s{max-width:none !important}}@media (max-width:48rem){.u-mah-none-s{max-height:none !important}}@media (max-width:48rem){.u-miw-auto-s{min-width:auto !important}}@media (max-width:48rem){.u-mih-auto-s{min-height:auto !important}}@media (max-width:48rem){.u-miw-half-s{min-width:.5rem !important}}@media (max-width:48rem){.u-maw-half-s{max-width:.5rem !important}}@media (max-width:48rem){.u-mih-half-s{min-height:.5rem !important}}@media (max-width:48rem){.u-mah-half-s{max-height:.5rem !important}}@media (max-width:48rem){.u-miw-1-half-s{min-width:1.5rem !important}}@media (max-width:48rem){.u-maw-1-half-s{max-width:1.5rem !important}}@media (max-width:48rem){.u-mih-1-half-s{min-height:1.5rem !important}}@media (max-width:48rem){.u-mah-1-half-s{max-height:1.5rem !important}}@media (max-width:48rem){.u-miw-2-half-s{min-width:2.5rem !important}}@media (max-width:48rem){.u-maw-2-half-s{max-width:2.5rem !important}}@media (max-width:48rem){.u-mih-2-half-s{min-height:2.5rem !important}}@media (max-width:48rem){.u-mah-2-half-s{max-height:2.5rem !important}}@media (max-width:63.938rem){.u-miw-1-m{min-width:1rem !important}}@media (max-width:63.938rem){.u-maw-1-m{max-width:1rem !important}}@media (max-width:63.938rem){.u-mih-1-m{min-height:1rem !important}}@media (max-width:63.938rem){.u-mah-1-m{max-height:1rem !important}}@media (max-width:63.938rem){.u-miw-2-m{min-width:2rem !important}}@media (max-width:63.938rem){.u-maw-2-m{max-width:2rem !important}}@media (max-width:63.938rem){.u-mih-2-m{min-height:2rem !important}}@media (max-width:63.938rem){.u-mah-2-m{max-height:2rem !important}}@media (max-width:63.938rem){.u-miw-3-m{min-width:4rem !important}}@media (max-width:63.938rem){.u-maw-3-m{max-width:4rem !important}}@media (max-width:63.938rem){.u-mih-3-m{min-height:4rem !important}}@media (max-width:63.938rem){.u-mah-3-m{max-height:4rem !important}}@media (max-width:63.938rem){.u-miw-4-m{min-width:8rem !important}}@media (max-width:63.938rem){.u-maw-4-m{max-width:8rem !important}}@media (max-width:63.938rem){.u-mih-4-m{min-height:8rem !important}}@media (max-width:63.938rem){.u-mah-4-m{max-height:8rem !important}}@media (max-width:63.938rem){.u-miw-5-m{min-width:16rem !important}}@media (max-width:63.938rem){.u-maw-5-m{max-width:16rem !important}}@media (max-width:63.938rem){.u-mih-5-m{min-height:16rem !important}}@media (max-width:63.938rem){.u-mah-5-m{max-height:16rem !important}}@media (max-width:63.938rem){.u-miw-6-m{min-width:32rem !important}}@media (max-width:63.938rem){.u-maw-6-m{max-width:32rem !important}}@media (max-width:63.938rem){.u-mih-6-m{min-height:32rem !important}}@media (max-width:63.938rem){.u-mah-6-m{max-height:32rem !important}}@media (max-width:63.938rem){.u-miw-7-m{min-width:48rem !important}}@media (max-width:63.938rem){.u-maw-7-m{max-width:48rem !important}}@media (max-width:63.938rem){.u-mih-7-m{min-height:48rem !important}}@media (max-width:63.938rem){.u-mah-7-m{max-height:48rem !important}}@media (max-width:63.938rem){.u-miw-8-m{min-width:64rem !important}}@media (max-width:63.938rem){.u-maw-8-m{max-width:64rem !important}}@media (max-width:63.938rem){.u-mih-8-m{min-height:64rem !important}}@media (max-width:63.938rem){.u-mah-8-m{max-height:64rem !important}}@media (max-width:63.938rem){.u-miw-9-m{min-width:96rem !important}}@media (max-width:63.938rem){.u-maw-9-m{max-width:96rem !important}}@media (max-width:63.938rem){.u-mih-9-m{min-height:96rem !important}}@media (max-width:63.938rem){.u-mah-9-m{max-height:96rem !important}}@media (max-width:63.938rem){.u-miw-100-m{min-width:100% !important}}@media (max-width:63.938rem){.u-maw-100-m{max-width:100% !important}}@media (max-width:63.938rem){.u-mih-100-m{min-height:100% !important}}@media (max-width:63.938rem){.u-mah-100-m{max-height:100% !important}}@media (max-width:63.938rem){.u-maw-none-m{max-width:none !important}}@media (max-width:63.938rem){.u-mah-none-m{max-height:none !important}}@media (max-width:63.938rem){.u-miw-auto-m{min-width:auto !important}}@media (max-width:63.938rem){.u-mih-auto-m{min-height:auto !important}}@media (max-width:63.938rem){.u-miw-half-m{min-width:.5rem !important}}@media (max-width:63.938rem){.u-maw-half-m{max-width:.5rem !important}}@media (max-width:63.938rem){.u-mih-half-m{min-height:.5rem !important}}@media (max-width:63.938rem){.u-mah-half-m{max-height:.5rem !important}}@media (max-width:63.938rem){.u-miw-1-half-m{min-width:1.5rem !important}}@media (max-width:63.938rem){.u-maw-1-half-m{max-width:1.5rem !important}}@media (max-width:63.938rem){.u-mih-1-half-m{min-height:1.5rem !important}}@media (max-width:63.938rem){.u-mah-1-half-m{max-height:1.5rem !important}}@media (max-width:63.938rem){.u-miw-2-half-m{min-width:2.5rem !important}}@media (max-width:63.938rem){.u-maw-2-half-m{max-width:2.5rem !important}}@media (max-width:63.938rem){.u-mih-2-half-m{min-height:2.5rem !important}}@media (max-width:63.938rem){.u-mah-2-half-m{max-height:2.5rem !important}}.u-w-1{width:1rem !important}.u-h-1{height:1rem !important}.u-w-2{width:2rem !important}.u-h-2{height:2rem !important}.u-w-3{width:4rem !important}.u-h-3{height:4rem !important}.u-w-4{width:8rem !important}.u-h-4{height:8rem !important}.u-w-5{width:16rem !important}.u-h-5{height:16rem !important}.u-w-6{width:32rem !important}.u-h-6{height:32rem !important}.u-w-7{width:48rem !important}.u-h-7{height:48rem !important}.u-w-8{width:64rem !important}.u-h-8{height:64rem !important}.u-w-9{width:96rem !important}.u-h-9{height:96rem !important}.u-w-100{width:100% !important}.u-h-100{height:100% !important}.u-w-auto{width:auto !important}.u-h-auto{height:auto !important}.u-w-half{width:.5rem !important}.u-h-half{height:.5rem !important}.u-w-1-half{width:1.5rem !important}.u-h-1-half{height:1.5rem !important}.u-w-2-half{width:2.5rem !important}.u-h-2-half{height:2.5rem !important}@media (max-width:30rem){.u-w-1-t{width:1rem !important}}@media (max-width:30rem){.u-h-1-t{height:1rem !important}}@media (max-width:30rem){.u-w-2-t{width:2rem !important}}@media (max-width:30rem){.u-h-2-t{height:2rem !important}}@media (max-width:30rem){.u-w-3-t{width:4rem !important}}@media (max-width:30rem){.u-h-3-t{height:4rem !important}}@media (max-width:30rem){.u-w-4-t{width:8rem !important}}@media (max-width:30rem){.u-h-4-t{height:8rem !important}}@media (max-width:30rem){.u-w-5-t{width:16rem !important}}@media (max-width:30rem){.u-h-5-t{height:16rem !important}}@media (max-width:30rem){.u-w-6-t{width:32rem !important}}@media (max-width:30rem){.u-h-6-t{height:32rem !important}}@media (max-width:30rem){.u-w-7-t{width:48rem !important}}@media (max-width:30rem){.u-h-7-t{height:48rem !important}}@media (max-width:30rem){.u-w-8-t{width:64rem !important}}@media (max-width:30rem){.u-h-8-t{height:64rem !important}}@media (max-width:30rem){.u-w-9-t{width:96rem !important}}@media (max-width:30rem){.u-h-9-t{height:96rem !important}}@media (max-width:30rem){.u-w-100-t{width:100% !important}}@media (max-width:30rem){.u-h-100-t{height:100% !important}}@media (max-width:30rem){.u-w-auto-t{width:auto !important}}@media (max-width:30rem){.u-h-auto-t{height:auto !important}}@media (max-width:30rem){.u-w-half-t{width:.5rem !important}}@media (max-width:30rem){.u-h-half-t{height:.5rem !important}}@media (max-width:30rem){.u-w-1-half-t{width:1.5rem !important}}@media (max-width:30rem){.u-h-1-half-t{height:1.5rem !important}}@media (max-width:30rem){.u-w-2-half-t{width:2.5rem !important}}@media (max-width:30rem){.u-h-2-half-t{height:2.5rem !important}}@media (max-width:48rem){.u-w-1-s{width:1rem !important}}@media (max-width:48rem){.u-h-1-s{height:1rem !important}}@media (max-width:48rem){.u-w-2-s{width:2rem !important}}@media (max-width:48rem){.u-h-2-s{height:2rem !important}}@media (max-width:48rem){.u-w-3-s{width:4rem !important}}@media (max-width:48rem){.u-h-3-s{height:4rem !important}}@media (max-width:48rem){.u-w-4-s{width:8rem !important}}@media (max-width:48rem){.u-h-4-s{height:8rem !important}}@media (max-width:48rem){.u-w-5-s{width:16rem !important}}@media (max-width:48rem){.u-h-5-s{height:16rem !important}}@media (max-width:48rem){.u-w-6-s{width:32rem !important}}@media (max-width:48rem){.u-h-6-s{height:32rem !important}}@media (max-width:48rem){.u-w-7-s{width:48rem !important}}@media (max-width:48rem){.u-h-7-s{height:48rem !important}}@media (max-width:48rem){.u-w-8-s{width:64rem !important}}@media (max-width:48rem){.u-h-8-s{height:64rem !important}}@media (max-width:48rem){.u-w-9-s{width:96rem !important}}@media (max-width:48rem){.u-h-9-s{height:96rem !important}}@media (max-width:48rem){.u-w-100-s{width:100% !important}}@media (max-width:48rem){.u-h-100-s{height:100% !important}}@media (max-width:48rem){.u-w-auto-s{width:auto !important}}@media (max-width:48rem){.u-h-auto-s{height:auto !important}}@media (max-width:48rem){.u-w-half-s{width:.5rem !important}}@media (max-width:48rem){.u-h-half-s{height:.5rem !important}}@media (max-width:48rem){.u-w-1-half-s{width:1.5rem !important}}@media (max-width:48rem){.u-h-1-half-s{height:1.5rem !important}}@media (max-width:48rem){.u-w-2-half-s{width:2.5rem !important}}@media (max-width:48rem){.u-h-2-half-s{height:2.5rem !important}}@media (max-width:63.938rem){.u-w-1-m{width:1rem !important}}@media (max-width:63.938rem){.u-h-1-m{height:1rem !important}}@media (max-width:63.938rem){.u-w-2-m{width:2rem !important}}@media (max-width:63.938rem){.u-h-2-m{height:2rem !important}}@media (max-width:63.938rem){.u-w-3-m{width:4rem !important}}@media (max-width:63.938rem){.u-h-3-m{height:4rem !important}}@media (max-width:63.938rem){.u-w-4-m{width:8rem !important}}@media (max-width:63.938rem){.u-h-4-m{height:8rem !important}}@media (max-width:63.938rem){.u-w-5-m{width:16rem !important}}@media (max-width:63.938rem){.u-h-5-m{height:16rem !important}}@media (max-width:63.938rem){.u-w-6-m{width:32rem !important}}@media (max-width:63.938rem){.u-h-6-m{height:32rem !important}}@media (max-width:63.938rem){.u-w-7-m{width:48rem !important}}@media (max-width:63.938rem){.u-h-7-m{height:48rem !important}}@media (max-width:63.938rem){.u-w-8-m{width:64rem !important}}@media (max-width:63.938rem){.u-h-8-m{height:64rem !important}}@media (max-width:63.938rem){.u-w-9-m{width:96rem !important}}@media (max-width:63.938rem){.u-h-9-m{height:96rem !important}}@media (max-width:63.938rem){.u-w-100-m{width:100% !important}}@media (max-width:63.938rem){.u-h-100-m{height:100% !important}}@media (max-width:63.938rem){.u-w-auto-m{width:auto !important}}@media (max-width:63.938rem){.u-h-auto-m{height:auto !important}}@media (max-width:63.938rem){.u-w-half-m{width:.5rem !important}}@media (max-width:63.938rem){.u-h-half-m{height:.5rem !important}}@media (max-width:63.938rem){.u-w-1-half-m{width:1.5rem !important}}@media (max-width:63.938rem){.u-h-1-half-m{height:1.5rem !important}}@media (max-width:63.938rem){.u-w-2-half-m{width:2.5rem !important}}@media (max-width:63.938rem){.u-h-2-half-m{height:2.5rem !important}}.u-shake{-webkit-animation-name:shake;animation-name:shake;-webkit-animation-duration:820ms;animation-duration:820ms;-webkit-animation-timing-function:cubic-bezier(.36,.07,.19,.97);animation-timing-function:cubic-bezier(.36,.07,.19,.97);-webkit-animation-fill-mode:both;animation-fill-mode:both}.u-filter-gray-100{-webkit-filter:grayscale(1);filter:grayscale(1)}.u-flex{display:flex}.u-inline-flex{display:inline-flex}.u-flex-none{flex:none}.u-flex-column{flex-direction:column}.u-flex-row{flex-direction:row}.u-flex-wrap{flex-wrap:wrap}.u-flex-nowrap{flex-wrap:nowrap}.u-flex-wrap-reverse{flex-wrap:wrap-reverse}.u-flex-column-reverse{flex-direction:column-reverse}.u-flex-row-reverse{flex-direction:row-reverse}.u-flex-auto{flex:1 1 auto}.u-flex-items-start{align-items:flex-start}.u-flex-items-end{align-items:flex-end}.u-flex-items-center{align-items:center}.u-flex-items-baseline{align-items:baseline}.u-flex-items-stretch{align-items:stretch}.u-flex-self-start{align-self:flex-start}.u-flex-self-end{align-self:flex-end}.u-flex-self-center{align-self:center}.u-flex-self-baseline{align-self:baseline}.u-flex-self-stretch{align-self:stretch}.u-flex-justify-start{justify-content:flex-start}.u-flex-justify-end{justify-content:flex-end}.u-flex-justify-center{justify-content:center}.u-flex-justify-between{justify-content:space-between}.u-flex-justify-around{justify-content:space-around}.u-flex-content-start{align-content:flex-start}.u-flex-content-end{align-content:flex-end}.u-flex-content-center{align-content:center}.u-flex-content-between{align-content:space-between}.u-flex-content-around{align-content:space-around}.u-flex-content-stretch{align-content:stretch}.u-flex-order-0{order:0}.u-flex-order-1{order:1}.u-flex-order-2{order:2}.u-flex-order-3{order:3}.u-flex-order-4{order:4}.u-flex-order-5{order:5}.u-flex-order-6{order:6}.u-flex-order-7{order:7}.u-flex-order-8{order:8}.u-flex-order-last{order:99999}.u-flex-grow-0{flex-grow:0}.u-flex-grow-1{flex-grow:1}.u-flex-shrink-0{flex-shrink:0}.u-flex-shrink-1{flex-shrink:1}@media (max-width:30rem){.u-flex-t{display:flex}.u-inline-flex-t{display:inline-flex}.u-flex-none-t{flex:none}.u-flex-column-t{flex-direction:column}.u-flex-row-t{flex-direction:row}.u-flex-wrap-t{flex-wrap:wrap}.u-flex-nowrap-t{flex-wrap:nowrap}.u-flex-wrap-reverse-t{flex-wrap:wrap-reverse}.u-flex-column-reverse-t{flex-direction:column-reverse}.u-flex-row-reverse-t{flex-direction:row-reverse}.u-flex-auto-t{flex:1 1 auto}.u-flex-items-start-t{align-items:flex-start}.u-flex-items-end-t{align-items:flex-end}.u-flex-items-center-t{align-items:center}.u-flex-items-baseline-t{align-items:baseline}.u-flex-items-stretch-t{align-items:stretch}.u-flex-self-start-t{align-self:flex-start}.u-flex-self-end-t{align-self:flex-end}.u-flex-self-center-t{align-self:center}.u-flex-self-baseline-t{align-self:baseline}.u-flex-self-stretch-t{align-self:stretch}.u-flex-justify-start-t{justify-content:flex-start}.u-flex-justify-end-t{justify-content:flex-end}.u-flex-justify-center-t{justify-content:center}.u-flex-justify-between-t{justify-content:space-between}.u-flex-justify-around-t{justify-content:space-around}.u-flex-content-start-t{align-content:flex-start}.u-flex-content-end-t{align-content:flex-end}.u-flex-content-center-t{align-content:center}.u-flex-content-between-t{align-content:space-between}.u-flex-content-around-t{align-content:space-around}.u-flex-content-stretch-t{align-content:stretch}.u-flex-order-0-t{order:0}.u-flex-order-1-t{order:1}.u-flex-order-2-t{order:2}.u-flex-order-3-t{order:3}.u-flex-order-4-t{order:4}.u-flex-order-5-t{order:5}.u-flex-order-6-t{order:6}.u-flex-order-7-t{order:7}.u-flex-order-8-t{order:8}.u-flex-order-last-t{order:99999}.u-flex-grow-0-t{flex-grow:0}.u-flex-grow-1-t{flex-grow:1}.u-flex-shrink-0-t{flex-shrink:0}.u-flex-shrink-1-t{flex-shrink:1}}@media (max-width:48rem){.u-flex-s{display:flex}.u-inline-flex-s{display:inline-flex}.u-flex-none-s{flex:none}.u-flex-column-s{flex-direction:column}.u-flex-row-s{flex-direction:row}.u-flex-wrap-s{flex-wrap:wrap}.u-flex-nowrap-s{flex-wrap:nowrap}.u-flex-wrap-reverse-s{flex-wrap:wrap-reverse}.u-flex-column-reverse-s{flex-direction:column-reverse}.u-flex-row-reverse-s{flex-direction:row-reverse}.u-flex-auto-s{flex:1 1 auto}.u-flex-items-start-s{align-items:flex-start}.u-flex-items-end-s{align-items:flex-end}.u-flex-items-center-s{align-items:center}.u-flex-items-baseline-s{align-items:baseline}.u-flex-items-stretch-s{align-items:stretch}.u-flex-self-start-s{align-self:flex-start}.u-flex-self-end-s{align-self:flex-end}.u-flex-self-center-s{align-self:center}.u-flex-self-baseline-s{align-self:baseline}.u-flex-self-stretch-s{align-self:stretch}.u-flex-justify-start-s{justify-content:flex-start}.u-flex-justify-end-s{justify-content:flex-end}.u-flex-justify-center-s{justify-content:center}.u-flex-justify-between-s{justify-content:space-between}.u-flex-justify-around-s{justify-content:space-around}.u-flex-content-start-s{align-content:flex-start}.u-flex-content-end-s{align-content:flex-end}.u-flex-content-center-s{align-content:center}.u-flex-content-between-s{align-content:space-between}.u-flex-content-around-s{align-content:space-around}.u-flex-content-stretch-s{align-content:stretch}.u-flex-order-0-s{order:0}.u-flex-order-1-s{order:1}.u-flex-order-2-s{order:2}.u-flex-order-3-s{order:3}.u-flex-order-4-s{order:4}.u-flex-order-5-s{order:5}.u-flex-order-6-s{order:6}.u-flex-order-7-s{order:7}.u-flex-order-8-s{order:8}.u-flex-order-last-s{order:99999}.u-flex-grow-0-s{flex-grow:0}.u-flex-grow-1-s{flex-grow:1}.u-flex-shrink-0-s{flex-shrink:0}.u-flex-shrink-1-s{flex-shrink:1}}@media (max-width:63.938rem){.u-flex-m{display:flex}.u-inline-flex-m{display:inline-flex}.u-flex-none-m{flex:none}.u-flex-column-m{flex-direction:column}.u-flex-row-m{flex-direction:row}.u-flex-wrap-m{flex-wrap:wrap}.u-flex-nowrap-m{flex-wrap:nowrap}.u-flex-wrap-reverse-m{flex-wrap:wrap-reverse}.u-flex-column-reverse-m{flex-direction:column-reverse}.u-flex-row-reverse-m{flex-direction:row-reverse}.u-flex-auto-m{flex:1 1 auto}.u-flex-items-start-m{align-items:flex-start}.u-flex-items-end-m{align-items:flex-end}.u-flex-items-center-m{align-items:center}.u-flex-items-baseline-m{align-items:baseline}.u-flex-items-stretch-m{align-items:stretch}.u-flex-self-start-m{align-self:flex-start}.u-flex-self-end-m{align-self:flex-end}.u-flex-self-center-m{align-self:center}.u-flex-self-baseline-m{align-self:baseline}.u-flex-self-stretch-m{align-self:stretch}.u-flex-justify-start-m{justify-content:flex-start}.u-flex-justify-end-m{justify-content:flex-end}.u-flex-justify-center-m{justify-content:center}.u-flex-justify-between-m{justify-content:space-between}.u-flex-justify-around-m{justify-content:space-around}.u-flex-content-start-m{align-content:flex-start}.u-flex-content-end-m{align-content:flex-end}.u-flex-content-center-m{align-content:center}.u-flex-content-between-m{align-content:space-between}.u-flex-content-around-m{align-content:space-around}.u-flex-content-stretch-m{align-content:stretch}.u-flex-order-0-m{order:0}.u-flex-order-1-m{order:1}.u-flex-order-2-m{order:2}.u-flex-order-3-m{order:3}.u-flex-order-4-m{order:4}.u-flex-order-5-m{order:5}.u-flex-order-6-m{order:6}.u-flex-order-7-m{order:7}.u-flex-order-8-m{order:8}.u-flex-order-last-m{order:99999}.u-flex-grow-0-m{flex-grow:0}.u-flex-grow-1-m{flex-grow:1}.u-flex-shrink-0-m{flex-shrink:0}.u-flex-shrink-1-m{flex-shrink:1}}.u-nolist{list-style-type:none}@media (max-width:30rem){.u-nolist-t{list-style-type:none}}@media (max-width:48rem){.u-nolist-s{list-style-type:none}}@media (max-width:63.938rem){.u-nolist-m{list-style-type:none}}.u-o-100{opacity:1}.u-o-90{opacity:.9}.u-o-80{opacity:.8}.u-o-70{opacity:.7}.u-o-60{opacity:.6}.u-o-50{opacity:.5}.u-o-40{opacity:.4}.u-o-30{opacity:.3}.u-o-20{opacity:.2}.u-o-10{opacity:.1}.u-o-05{opacity:.05}.u-o-025{opacity:.025}.u-o-0{opacity:0}.u-ov-visible{overflow:visible}.u-ov-hidden{overflow:hidden}.u-ov-scroll{overflow:scroll}.u-ov-auto{overflow:auto}.u-pos-absolute{position:absolute}.u-pos-relative{position:relative}.u-pos-fixed{position:fixed}.u-pos-sticky{position:sticky}.u-pos-static{position:static}@media (max-width:30rem){.u-pos-absolute-t{position:absolute}.u-pos-relative-t{position:relative}.u-pos-fixed-t{position:fixed}.u-pos-sticky-t{position:sticky}.u-pos-static-t{position:static}}@media (max-width:48rem){.u-pos-absolute-s{position:absolute}.u-pos-relative-s{position:relative}.u-pos-fixed-s{position:fixed}.u-pos-sticky-s{position:sticky}.u-pos-static-s{position:static}}@media (max-width:63.938rem){.u-pos-absolute-m{position:absolute}.u-pos-relative-m{position:relative}.u-pos-fixed-m{position:fixed}.u-pos-sticky-m{position:sticky}.u-pos-static-m{position:static}}.u-top-m{top:1rem}.u-top-xs{top:.5rem}.u-top-s{top:.75rem}.u-top-l{top:1.5rem}.u-top-xl{top:2rem}.u-top-xxl{top:3rem}.u-top-0{top:0}.u-bottom-m{bottom:1rem}.u-bottom-xs{bottom:.5rem}.u-bottom-s{bottom:.75rem}.u-bottom-l{bottom:1.5rem}.u-bottom-xl{bottom:2rem}.u-bottom-xxl{bottom:3rem}.u-bottom-0{bottom:0}.u-left-m{left:1rem}.u-left-xs{left:.5rem}.u-left-s{left:.75rem}.u-left-l{left:1.5rem}.u-left-xl{left:2rem}.u-left-xxl{left:3rem}.u-left-0{left:0}.u-right-m{right:1rem}.u-right-xs{right:.5rem}.u-right-s{right:.75rem}.u-right-l{right:1.5rem}.u-right-xl{right:2rem}.u-right-xxl{right:3rem}.u-right-0{right:0}.u-stack-m > * + *{margin-top:1rem}.u-stack-xs > * + *{margin-top:.5rem}.u-stack-s > * + *{margin-top:.75rem}.u-stack-l > * + *{margin-top:1.5rem}.u-stack-xl > * + *{margin-top:2rem}.u-stack-xxl > * + *{margin-top:3rem}.u-row-m > * + *{margin-left:1rem}.u-row-xs > * + *{margin-left:.5rem}.u-row-s > * + *{margin-left:.75rem}.u-row-l > * + *{margin-left:1.5rem}.u-row-xl > * + *{margin-left:2rem}.u-row-xxl > * + *{margin-left:3rem}.u-title-h1,.u-title-h2,.u-title-h3,.u-title-h4{font-weight:bold;color:var(--primaryTextColor)}.u-title-h1{font-size:1.5rem;letter-spacing:-.012rem}@media (max-width:48rem){.u-title-h1{font-size:1.25rem}}.u-title-h2{font-size:1.25rem}@media (max-width:48rem){.u-title-h2{font-size:1.125rem}}.u-title-h3{font-size:1.125rem}@media (max-width:48rem){.u-title-h3{font-size:1rem}}.u-title-h4{font-size:1rem}@media (max-width:48rem){.u-title-h4{font-weight:bold;color:var(--primaryTextColor)}}.u-text{font-size:1rem;line-height:1.3;color:var(--primaryTextColor)}.u-caption{font-size:.75rem;line-height:1.2;color:var(--coolGrey)}.u-subtitle{font-size:.75rem;line-height:1.313}.u-uppercase{text-transform:uppercase}.u-lowercase{text-transform:lowercase}.u-subtitle{font-size:.75rem;text-transform:uppercase;font-weight:bold}.c-input-checkbox--svg span::after{display:none}.c-input-checkbox-icon{position:absolute;left:0;top:50%;box-sizing:border-box;width:1rem;height:1rem;padding:.125rem;transition-duration:.2s;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.c-input-checkbox input:not(:checked) + span .c-input-checkbox-icon{opacity:0;-webkit-transform:scale(0) translateY(-50%);transform:scale(0) translateY(-50%)}.c-input-checkbox input:checked + span .c-input-checkbox-icon{opacity:1;-webkit-transform:scale(1) translateY(-50%);transform:scale(1) translateY(-50%)}.c-avatar--text{color:#fff}.c-avatar--disabled.c-avatar--image{background-color:#fff !important}.c-avatar--disabled:not(.c-avatar--image){background-color:var(--silver) !important}.c-avatar--disabled .c-avatar-image{-webkit-filter:grayscale(1);filter:grayscale(1);opacity:.3}.c-avatar--ghost{background-color:transparent !important;border:1px dashed var(--borderGhostColor);color:var(--secondaryTextColor)}.c-avatar--ghost .c-avatar-image{-webkit-filter:grayscale(1);filter:grayscale(1);opacity:.3}.wizard-agreements-item:nth-child(1) .wizard-agreements-icon{--bgcolor:var(--weirdGreen)}.wizard-agreements-item:nth-child(2) .wizard-agreements-icon{--bgcolor:var(--mango)}.wizard-agreements-item:nth-child(3) .wizard-agreements-icon{--bgcolor:var(--lightishPurple)}.wizard-agreements-item:nth-child(4) .wizard-agreements-icon{--bgcolor:var(--pomegranate)}.wizard-agreements-item:nth-child(5) .wizard-agreements-icon{--bgcolor:var(--azure)}.wizard-agreements-item:nth-child(6) .wizard-agreements-icon{--bgcolor:var(--brightSun)}", ""]); + + + +/***/ }), + +/***/ "UX0t": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var red = { + 50: '#ffebee', + 100: '#ffcdd2', + 200: '#ef9a9a', + 300: '#e57373', + 400: '#ef5350', + 500: '#f44336', + 600: '#e53935', + 700: '#d32f2f', + 800: '#c62828', + 900: '#b71c1c', + A100: '#ff8a80', + A200: '#ff5252', + A400: '#ff1744', + A700: '#d50000' +}; +/* harmony default export */ __webpack_exports__["default"] = (red); + +/***/ }), + +/***/ "UYWi": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Radio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eOEn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Radio__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UaW2": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var inheritIfRequired = __webpack_require__("z41q"); +var dP = __webpack_require__("GwHQ").f; +var gOPN = __webpack_require__("qeDk").f; +var isRegExp = __webpack_require__("FYJV"); +var $flags = __webpack_require__("+TZB"); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (__webpack_require__("WXXH") && (!CORRECT_NEW || __webpack_require__("enc5")(function () { + re2[__webpack_require__("Yhpl")('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__("iNsi")(global, 'RegExp', $RegExp); +} + +__webpack_require__("iaIa")('RegExp'); + + +/***/ }), + +/***/ "Ud+c": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _HiddenJs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("n9ol"); +/* harmony import */ var _HiddenCss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Wmhc"); + + + + + + +/** + * Responsively hides children based on the selected implementation. + */ + +function Hidden(props) { + var _props$implementation = props.implementation, + implementation = _props$implementation === void 0 ? 'js' : _props$implementation, + _props$lgDown = props.lgDown, + lgDown = _props$lgDown === void 0 ? false : _props$lgDown, + _props$lgUp = props.lgUp, + lgUp = _props$lgUp === void 0 ? false : _props$lgUp, + _props$mdDown = props.mdDown, + mdDown = _props$mdDown === void 0 ? false : _props$mdDown, + _props$mdUp = props.mdUp, + mdUp = _props$mdUp === void 0 ? false : _props$mdUp, + _props$smDown = props.smDown, + smDown = _props$smDown === void 0 ? false : _props$smDown, + _props$smUp = props.smUp, + smUp = _props$smUp === void 0 ? false : _props$smUp, + _props$xlDown = props.xlDown, + xlDown = _props$xlDown === void 0 ? false : _props$xlDown, + _props$xlUp = props.xlUp, + xlUp = _props$xlUp === void 0 ? false : _props$xlUp, + _props$xsDown = props.xsDown, + xsDown = _props$xsDown === void 0 ? false : _props$xsDown, + _props$xsUp = props.xsUp, + xsUp = _props$xsUp === void 0 ? false : _props$xsUp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["implementation", "lgDown", "lgUp", "mdDown", "mdUp", "smDown", "smUp", "xlDown", "xlUp", "xsDown", "xsUp"]); + + if (implementation === 'js') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_HiddenJs__WEBPACK_IMPORTED_MODULE_4__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + lgDown: lgDown, + lgUp: lgUp, + mdDown: mdDown, + mdUp: mdUp, + smDown: smDown, + smUp: smUp, + xlDown: xlDown, + xlUp: xlUp, + xsDown: xsDown, + xsUp: xsUp + }, other)); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_HiddenCss__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + lgDown: lgDown, + lgUp: lgUp, + mdDown: mdDown, + mdUp: mdUp, + smDown: smDown, + smUp: smUp, + xlDown: xlDown, + xlUp: xlUp, + xsDown: xsDown, + xsUp: xsUp + }, other)); +} + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Hidden); + +/***/ }), + +/***/ "UdSB": +/***/ (function(module, exports, __webpack_require__) { + +var objectWithoutPropertiesLoose = __webpack_require__("hO0W"); + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "Udtv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Hidden__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Ud+c"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Hidden__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "Ukil": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mOey"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Popper__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UmYl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = Number.isNaN || function (a) { return a !== a; }; + +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + + +/***/ }), + +/***/ "Umsc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.APP_TYPE = void 0; +var APP_TYPE = { + KONNECTOR: 'konnector', + WEBAPP: 'webapp' +}; +exports.APP_TYPE = APP_TYPE; + +/***/ }), + +/***/ "UnG5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("IGOm"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("o1F1"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("AHiN"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("Wsob"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _ButtonCozyHome__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("9DWD"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("gc+w"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + +var AppNavButton = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(AppNavButton, _Component); + + var _super = _createSuper(AppNavButton); + + function AppNavButton() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, AppNavButton); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(AppNavButton, [{ + key: "render", + value: function render() { + var _this$props = this.props, + homeApp = _this$props.homeApp, + handleClick = _this$props.handleClick, + appName = _this$props.appName, + appNamePrefix = _this$props.appNamePrefix, + appSlug = _this$props.appSlug, + iconPath = _this$props.iconPath, + isInvertedTheme = _this$props.isInvertedTheme, + isFetchingApps = _this$props.isFetchingApps, + isPublic = _this$props.isPublic, + opened = _this$props.opened, + t = _this$props.t; + var isHomeApp = homeApp && homeApp.isCurrentApp; + + if (!isPublic && isFetchingApps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns --loading" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns-home coz-loading-placeholder" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns-main coz-loading-placeholder" + })); + } + + var displayName = !isHomeApp && appNamePrefix ? [t("".concat(appSlug, ".name_prefix"), { + _: appNamePrefix + }), t("".concat(appSlug, ".name"), { + _: appName + })].join(' ') : t("".concat(appSlug, ".name"), { + _: appName + }); + var homeHref = !isPublic && homeApp && homeApp.href; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns".concat(isHomeApp ? ' --currentHome' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_12__["ButtonCozyHome"], { + homeHref: homeHref, + isInvertedTheme: isInvertedTheme + }), !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + className: "coz-nav-apps-btns-sep" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("button", { + type: "button", + onClick: isPublic ? null : handleClick, + className: "coz-nav-apps-btns-main", + "aria-controls": "coz-nav-pop--apps", + "data-tutorial": "apps", + disabled: isPublic + }, !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("img", { + className: "coz-bar-hide-sm", + src: iconPath, + width: "28", + alt: "" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + className: "coz-nav-app-name" + }, displayName), !isPublic && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default.a, { + icon: opened ? cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10___default.a : cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8___default.a, + color: "#95999d", + size: "12" + }))); + } + }]); + + return AppNavButton; +}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); + +AppNavButton.propTypes = { + homeApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.shape({ + isCurrentApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + slug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + href: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string + }), + handleClick: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, + appName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + isFetchingApps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + opened: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; + +var mapStateToProps = function mapStateToProps(state) { + return { + homeApp: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_13__["getHomeApp"])(state), + isFetchingApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_13__["isFetchingApps"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps() { + return {}; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_6__["connect"])(mapStateToProps, mapDispatchToProps)(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])()(AppNavButton))); + +/***/ }), + +/***/ "UoGG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BPq5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Checkbox__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UoK9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Breadcrumbs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("VUCs"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Breadcrumbs__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "UrlN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + flexWrap: 'wrap', + overflowY: 'auto', + listStyle: 'none', + padding: 0, + WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling. + + } +}; +var warnedOnce = false; +/** + * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming. + * + * You should use `import { ImageList } from '@material-ui/core'` + * or `import ImageList from '@material-ui/core/ImageList'`. + */ + +var GridList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function GridList(props, ref) { + if (false) {} + + var _props$cellHeight = props.cellHeight, + cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight, + children = props.children, + classes = props.classes, + className = props.className, + _props$cols = props.cols, + cols = _props$cols === void 0 ? 2 : _props$cols, + _props$component = props.component, + Component = _props$component === void 0 ? 'ul' : _props$component, + _props$spacing = props.spacing, + spacing = _props$spacing === void 0 ? 4 : _props$spacing, + style = props.style, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["cellHeight", "children", "classes", "className", "cols", "component", "spacing", "style"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref, + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + margin: -spacing / 2 + }, style) + }, other), react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return null; + } + + if (false) {} + + var childCols = child.props.cols || 1; + var childRows = child.props.rows || 1; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + width: "".concat(100 / cols * childCols, "%"), + height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing, + padding: spacing / 2 + }, child.props.style) + }); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiGridList' +})(GridList)); + +/***/ }), + +/***/ "UvGa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +var _excluded = ["iconRef"]; +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/cube.svg` to regenerate; + +function SvgCube(_ref) { + var iconRef = _ref.iconRef, + props = (0, _objectWithoutProperties2.default)(_ref, _excluded); + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props, { + ref: iconRef + }), /*#__PURE__*/_react.default.createElement("path", { + d: "M1 11.009V5.5c0-.55.39-.773.872-.498l5.256 3.003c.476.272.872.944.872 1.495v5.508c0 .549-.39.772-.872.497l-5.256-3.003C1.396 12.231 1 11.56 1 11.01zm15 0c0 .55-.396 1.222-.872 1.494l-5.256 3.003c-.481.275-.872.052-.872-.497V9.5c0-.55.396-1.223.872-1.495l5.256-3.003c.481-.275.872-.052.872.498v5.508zM9.35 6.982c-.47.288-1.237.284-1.7 0l-4.8-2.954c-.47-.29-.463-.732.027-.995L7.623.477c.485-.261 1.264-.264 1.754 0l4.746 2.556c.485.26.49.71.027.995l-4.8 2.954z" + })); +} +var _default = SvgCube; +exports.default = _default; + +/***/ }), + +/***/ "Uxqk": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__("LRPZ"); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__("DWlN").set }); + + +/***/ }), + +/***/ "UxrS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__("B3W8"); + +module.exports = function getPolyfill() { + return typeof Object.entries === 'function' ? Object.entries : implementation; +}; + + +/***/ }), + +/***/ "V+ek": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var defined = __webpack_require__("etLA"); +var fails = __webpack_require__("enc5"); +var spaces = __webpack_require__("870Y"); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), + +/***/ "V06o": +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__("Yhpl")('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + + +/***/ }), + +/***/ "V1K6": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") +var startOfISOWeek = __webpack_require__("MKBq") + +/** + * @category ISO Week-Numbering Year Helpers + * @summary Get the ISO week-numbering year of the given date. + * + * @description + * Get the ISO week-numbering year of the given date, + * which always starts 3 days before the year's first Thursday. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|String|Number} date - the given date + * @returns {Number} the ISO week-numbering year + * + * @example + * // Which ISO-week numbering year is 2 January 2005? + * var result = getISOYear(new Date(2005, 0, 2)) + * //=> 2004 + */ +function getISOYear (dirtyDate) { + var date = parse(dirtyDate) + var year = date.getFullYear() + + var fourthOfJanuaryOfNextYear = new Date(0) + fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4) + fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0) + var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear) + + var fourthOfJanuaryOfThisYear = new Date(0) + fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4) + fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0) + var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear) + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1 + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year + } else { + return year - 1 + } +} + +module.exports = getISOYear + + +/***/ }), + +/***/ "V1kJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _minilog = _interopRequireDefault(__webpack_require__("B4A6")); + +var logger = (0, _minilog.default)('cozy-stack-client'); + +_minilog.default.suggest.deny('cozy-stack-client', 'info'); + +var _default = logger; +exports.default = _default; + +/***/ }), + +/***/ "V42N": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.10 String.prototype.link(url) +__webpack_require__("A7oe")('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + + +/***/ }), + +/***/ "V6W0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "easing", function() { return easing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "duration", function() { return duration; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); + +// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves +// to learn the context in which each easing should be used. +var easing = { + // This is the most common easing curve. + easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)', + // Objects enter the screen at full velocity from off-screen and + // slowly decelerate to a resting point. + easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)', + // Objects leave the screen at full velocity. They do not decelerate when off-screen. + easeIn: 'cubic-bezier(0.4, 0, 1, 1)', + // The sharp curve is used by objects that may return to the screen at any time. + sharp: 'cubic-bezier(0.4, 0, 0.6, 1)' +}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations +// to learn when use what timing + +var duration = { + shortest: 150, + shorter: 200, + short: 250, + // most basic recommended timing + standard: 300, + // this is to be used in complex animations + complex: 375, + // recommended when something is entering screen + enteringScreen: 225, + // recommended when something is leaving screen + leavingScreen: 195 +}; + +function formatMs(milliseconds) { + return "".concat(Math.round(milliseconds), "ms"); +} +/** + * @param {string|Array} props + * @param {object} param + * @param {string} param.prop + * @param {number} param.duration + * @param {string} param.easing + * @param {number} param.delay + */ + + +/* harmony default export */ __webpack_exports__["default"] = ({ + easing: easing, + duration: duration, + create: function create() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all']; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var _options$duration = options.duration, + durationOption = _options$duration === void 0 ? duration.standard : _options$duration, + _options$easing = options.easing, + easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing, + _options$delay = options.delay, + delay = _options$delay === void 0 ? 0 : _options$delay, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(options, ["duration", "easing", "delay"]); + + if (false) { var isNumber, isString; } + + return (Array.isArray(props) ? props : [props]).map(function (animatedProp) { + return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay)); + }).join(','); + }, + getAutoHeightDuration: function getAutoHeightDuration(height) { + if (!height) { + return 0; + } + + var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10 + + return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10); + } +}); + +/***/ }), + +/***/ "V9T3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isAccountWithTrigger = exports.buildAccount = exports.getAccountName = exports.getAccountLogin = exports.setContractSyncStatusInAccount = exports.getContractSyncStatusFromAccount = exports.muteError = exports.getMutedErrors = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _dsl = __webpack_require__("v2kV"); + +var _HasMany = __webpack_require__("Jm63"); + +var _manifest = __webpack_require__("y2NW"); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * getMutedErrors - Returns the list of errors that have been muted for the given account + * + * @param {import('../types').IOCozyAccount} account io.cozy.accounts + * + * @returns {Array} An array of errors with a `type` and `mutedAt` field + */ +var getMutedErrors = function getMutedErrors(account) { + return (account === null || account === void 0 ? void 0 : account.mutedErrors) || []; +}; +/** + * muteError - Adds an error to the list of muted errors for the given account + * + * @param {import('../types').IOCozyAccount} account io.cozy.accounts + * @param {string} errorType The type of the error to mute + * + * @returns {import('../types').IOCozyAccount} An updated io.cozy.accounts + */ + + +exports.getMutedErrors = getMutedErrors; + +var muteError = function muteError(account, errorType) { + var mutedErrors = getMutedErrors(account); + mutedErrors.push({ + type: errorType, + mutedAt: new Date().toISOString() + }); + return _objectSpread(_objectSpread({}, account), {}, { + mutedErrors: mutedErrors + }); +}; + +exports.muteError = muteError; +var DEFAULT_CONTRACT_SYNC_STATUS = true; +/** + * Returns whether a contract is synced from account relationship + * + * @param {import('../types').IOCozyAccount} account - Cozy account + * @param {String} contractId - contract identifier + * @returns {Boolean} synchronisation status + */ + +var getContractSyncStatusFromAccount = function getContractSyncStatusFromAccount(account, contractId) { + var _relItem$metadata$imp, _relItem$metadata; + + var relItem = (0, _HasMany.getHasManyItem)(account, 'contracts', contractId); + + if (!relItem) { + throw new Error("Cannot find contrat ".concat(contractId, " in account")); + } + + return (_relItem$metadata$imp = relItem === null || relItem === void 0 ? void 0 : (_relItem$metadata = relItem.metadata) === null || _relItem$metadata === void 0 ? void 0 : _relItem$metadata.imported) !== null && _relItem$metadata$imp !== void 0 ? _relItem$metadata$imp : DEFAULT_CONTRACT_SYNC_STATUS; +}; +/** + * Sets contract sync status into account relationship + * + * @param {import('../types').IOCozyAccount} account - Cozy account + * @param {String} contractId - contract identifier + * @param {String} syncStatus - synchronisation status + * @returns {import('../types').IOCozyAccount} + */ + + +exports.getContractSyncStatusFromAccount = getContractSyncStatusFromAccount; + +var setContractSyncStatusInAccount = function setContractSyncStatusInAccount(account, contractId, syncStatus) { + return (0, _HasMany.updateHasManyItem)(account, 'contracts', contractId, function (contractRel) { + if (contractRel === undefined) { + throw new Error("Cannot find contrat ".concat(contractId, " in account")); + } + + return (0, _merge.default)({}, contractRel, { + metadata: { + imported: syncStatus + } + }); + }); +}; +/** + * Get the account login field value from a given account + * + * @param {import('../types').IOCozyAccount} account - the given cozy account + * @returns {String|null} - Account login + */ + + +exports.setContractSyncStatusInAccount = setContractSyncStatusInAccount; + +var getAccountLogin = function getAccountLogin(account) { + if (account && account.auth) { + var _iterator = _createForOfIteratorHelper(_manifest.legacyLoginFields), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var fieldName = _step.value; + if (account.auth[fieldName]) return account.auth[fieldName]; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + + return null; +}; +/** + * Get the account name from a given account + * + * @param {import('../types').IOCozyAccount} account - the given cozy account + * @returns {String|null} - Account name + */ + + +exports.getAccountLogin = getAccountLogin; + +var getAccountName = function getAccountName(account) { + if (!account) return null; + + if (account.auth) { + return account.auth.accountName || getAccountLogin(account) || account._id; + } else { + return account._id; + } +}; +/** + * Transforms account auth data to io.cozy.accounts document + * + * @param {import('../types').IOCozyKonnector} konnector Konnector related to account + * @param {object} authData Authentication data + * @returns {import('../types').IOCozyAccount} io.cozy.accounts attributes + */ + + +exports.getAccountName = getAccountName; + +var buildAccount = function buildAccount(konnector, authData) { + return { + auth: authData, + account_type: konnector.slug, + identifier: (0, _manifest.getIdentifier)(konnector.fields), + state: null + }; +}; +/** + * Look if the given account has an associated trigger or not. + * + * @param {import('../CozyClient').default} client - CozyClient instance + * @param {import('../types').IOCozyAccount} account - account document + * @returns {Promise<Boolean>} + */ + + +exports.buildAccount = buildAccount; + +var isAccountWithTrigger = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, account) { + var result; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return client.query((0, _dsl.Q)('io.cozy.triggers').where({ + 'message.account': account._id + }).indexFields(['message.account']).limitBy(1)); + + case 2: + result = _context.sent; + return _context.abrupt("return", result.data.length > 0); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function isAccountWithTrigger(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +exports.isAccountWithTrigger = isAccountWithTrigger; + +/***/ }), + +/***/ "VBgW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var slice = Array.prototype.slice; +var isArgs = __webpack_require__("Kl0M"); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__("tqA5"); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + + +/***/ }), + +/***/ "VDWE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + padding: 8, + justifyContent: 'flex-end' + }, + + /* Styles applied to the root element if `disableSpacing={false}`. */ + spacing: { + '& > :not(:first-child)': { + marginLeft: 8 + } + } +}; +var warnedOnce = false; +/** + * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention. + * + * You should use `import { AccordionActions } from '@material-ui/core'` + * or `import AccordionActions from '@material-ui/core/AccordionActions'`. + */ + +var ExpansionPanelActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ExpansionPanelActions(props, ref) { + if (false) {} + + var classes = props.classes, + className = props.className, + _props$disableSpacing = props.disableSpacing, + disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "disableSpacing"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, !disableSpacing && classes.spacing), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiExpansionPanelActions' +})(ExpansionPanelActions)); + +/***/ }), + +/***/ "VFVQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MFz2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "common", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _red__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("UX0t"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "red", function() { return _red__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _pink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("kobI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pink", function() { return _pink__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _purple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("FK5q"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "purple", function() { return _purple__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _deepPurple__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("hxGs"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepPurple", function() { return _deepPurple__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5wjq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indigo", function() { return _indigo__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _blue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3EGO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blue", function() { return _blue__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _lightBlue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("hhFM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightBlue", function() { return _lightBlue__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _cyan__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ZTWm"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cyan", function() { return _cyan__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _teal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("d9PM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "teal", function() { return _teal__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("CehB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "green", function() { return _green__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _lightGreen__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("dz/2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightGreen", function() { return _lightGreen__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _lime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("Quq9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lime", function() { return _lime__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _yellow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("VrlH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yellow", function() { return _yellow__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony import */ var _amber__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("cA5E"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "amber", function() { return _amber__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _orange__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("WOYA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "orange", function() { return _orange__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _deepOrange__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("M348"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepOrange", function() { return _deepOrange__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony import */ var _brown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("TtpO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brown", function() { return _brown__WEBPACK_IMPORTED_MODULE_17__["default"]; }); + +/* harmony import */ var _grey__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("8Ax9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "grey", function() { return _grey__WEBPACK_IMPORTED_MODULE_18__["default"]; }); + +/* harmony import */ var _blueGrey__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("Jk6u"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blueGrey", function() { return _blueGrey__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + + + + + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "VFrX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getThemeProps; }); +/* eslint-disable no-restricted-syntax */ +function getThemeProps(params) { + var theme = params.theme, + name = params.name, + props = params.props; + + if (!theme || !theme.props || !theme.props[name]) { + return props; + } // Resolve default props, code borrow from React source. + // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221 + + + var defaultProps = theme.props[name]; + var propName; + + for (propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; +} + +/***/ }), + +/***/ "VHLe": +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__("8ltH"), + arrayIncludes = __webpack_require__("pSuu"), + arrayIncludesWith = __webpack_require__("yvNq"), + cacheHas = __webpack_require__("fO1A"), + createSet = __webpack_require__("YUW9"), + setToArray = __webpack_require__("4Fdj"); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; + + +/***/ }), + +/***/ "VHzf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("tbe6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Paper__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "VIZI": +/***/ (function(module, exports, __webpack_require__) { + +var isPlainObject = __webpack_require__("JZOQ"); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; + + +/***/ }), + +/***/ "VNFE": +/***/ (function(module, exports, __webpack_require__) { + +var baseFindIndex = __webpack_require__("5/Pu"), + baseIsNaN = __webpack_require__("41Vg"), + strictIndexOf = __webpack_require__("Od+F"); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; + + +/***/ }), + +/***/ "VNZK": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.authFunction = exports.authenticateWithCordova = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _const = __webpack_require__("P3Kl"); + +var _cozyDeviceHelper = __webpack_require__("Kv7L"); + +/* global prompt */ + +/** + * @type {import("../types").CordovaWindow} + */ +// @ts-ignore +var win = typeof window !== 'undefined' ? window : null; +/** + * Open a SafariView Controller and resolve with the URL containing the token + * + * @param {string} url - Url containing access_code and state + * @returns {Promise} + */ + +var authenticateWithSafari = function authenticateWithSafari(url) { + return new Promise(function (resolve, reject) { + win.SafariViewController.show({ + url: url, + transition: 'curl' // (this only works in iOS 9.1/9.2 and lower) unless animated is false you can choose from: curl, flip, fade, slide (default) + // enterReaderModeIfAvailable: readerMode, // default false + // tintColor: "#00ffff", // default is ios blue + // barColor: "#0000ff", // on iOS 10+ you can change the background color as well + // controlTintColor: "#ffffff" // on iOS 10+ you can override the default tintColor + + }, // this success handler will be invoked for the lifecycle events 'opened', 'loaded' and 'closed' + function (result) { + if (result.event === 'closed') { + reject(new Error(_const.REGISTRATION_ABORT)); + } + }, function (error) { + console.log('KO: ' + error); + reject(new Error(_const.REGISTRATION_ABORT)); + }); + var handle = win.handleOpenURL; + + win.handleOpenURL = function (url) { + win.SafariViewController.hide(); + resolve(url); + + if (handle) { + win.handleOpenURL = handle; + } + }; + }); +}; +/** + * Opens an InAppBrowser and resolves with the URL containing the token + * + * @param {string} url - Url containing access_code and state + * @returns {Promise} + */ + + +var authenticateWithInAppBrowser = function authenticateWithInAppBrowser(url) { + return new Promise(function (resolve, reject) { + var target = '_blank'; + var options = 'clearcache=yes,zoom=no'; + var inAppBrowser = win.cordova.InAppBrowser.open(url, target, options); + + var removeListener = function removeListener() { + inAppBrowser.removeEventListener('loadstart', onLoadStart); + inAppBrowser.removeEventListener('exit', onExit); + }; + + var onLoadStart = function onLoadStart(_ref) { + var url = _ref.url; + var accessCode = /\?access_code=(.+)$/.test(url); + var state = /\?state=(.+)$/.test(url); + + if (accessCode || state) { + resolve(url); + removeListener(); + inAppBrowser.close(); + } + }; + + var onExit = function onExit() { + reject(new Error(_const.REGISTRATION_ABORT)); + removeListener(); + inAppBrowser.close(); + }; + + inAppBrowser.addEventListener('loadstart', onLoadStart); + inAppBrowser.addEventListener('exit', onExit); + }); +}; + +var authenticateWithCordova = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.t0 = (0, _cozyDeviceHelper.isIOSApp)(); + + if (!_context.t0) { + _context.next = 5; + break; + } + + _context.next = 4; + return (0, _cozyDeviceHelper.hasSafariPlugin)(); + + case 4: + _context.t0 = _context.sent; + + case 5: + if (!_context.t0) { + _context.next = 9; + break; + } + + return _context.abrupt("return", authenticateWithSafari(url)); + + case 9: + if (!(0, _cozyDeviceHelper.hasInAppBrowserPlugin)()) { + _context.next = 13; + break; + } + + return _context.abrupt("return", authenticateWithInAppBrowser(url)); + + case 13: + /** + * for dev purpose: + * In oauth workflow, the server displays an authorization page + * User must accept to give permission then the server gives an url + * with query parameters used by cozy-client-js to initialize itself. + * + * This hack let developers open the authorization page in a new tab + * then get the "access_code" url and paste it in the prompt to let the + * application initialize and redirect to other pages. + */ + console.log(url); // Useful for dev (see above). + + return _context.abrupt("return", new Promise(function (resolve) { + setTimeout(function () { + var token = prompt('Paste the url here:'); + resolve(token); + }, 5000); + })); + + case 15: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function authenticateWithCordova(_x) { + return _ref2.apply(this, arguments); + }; +}(); + +exports.authenticateWithCordova = authenticateWithCordova; +var authFunction = authenticateWithCordova; +exports.authFunction = authFunction; + +/***/ }), + +/***/ "VNf9": +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__("8ltH"), + arrayIncludes = __webpack_require__("pSuu"), + arrayIncludesWith = __webpack_require__("yvNq"), + arrayMap = __webpack_require__("4FGL"), + baseUnary = __webpack_require__("Ijh8"), + cacheHas = __webpack_require__("fO1A"); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; + + +/***/ }), + +/***/ "VP3k": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); +var _Icon = _interopRequireDefault(__webpack_require__("AHiN")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +var _excluded = ["icon", "ariaHidden", "size"]; +var StyledIcon = function StyledIcon(_ref) { + var icon = _ref.icon, + _ref$ariaHidden = _ref.ariaHidden, + ariaHidden = _ref$ariaHidden === void 0 ? true : _ref$ariaHidden, + _ref$size = _ref.size, + size = _ref$size === void 0 ? 16 : _ref$size, + props = (0, _objectWithoutProperties2.default)(_ref, _excluded); + return /*#__PURE__*/_react.default.createElement(_Icon.default, (0, _extends2.default)({ + "aria-hidden": ariaHidden, + icon: icon, + size: size + }, props)); +}; +var _default = StyledIcon; +exports.default = _default; + +/***/ }), + +/***/ "VPKY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useId; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * Private module reserved for @material-ui/x packages. + */ + +function useId(idOverride) { + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](idOverride), + defaultId = _React$useState[0], + setDefaultId = _React$useState[1]; + + var id = idOverride || defaultId; + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (defaultId == null) { + // Fallback to this default id when possible. + // Use the random value for client-side rendering only. + // We can't use it server-side. + setDefaultId("mui-".concat(Math.round(Math.random() * 1e5))); + } + }, [defaultId]); + return id; +} + +/***/ }), + +/***/ "VUCs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Im6z"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fY06"); +/* harmony import */ var _BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("iHhZ"); + + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the ol element. */ + ol: { + display: 'flex', + flexWrap: 'wrap', + alignItems: 'center', + padding: 0, + margin: 0, + listStyle: 'none' + }, + + /* Styles applied to the li element. */ + li: {}, + + /* Styles applied to the separator element. */ + separator: { + display: 'flex', + userSelect: 'none', + marginLeft: 8, + marginRight: 8 + } +}; + +function insertSeparators(items, className, separator) { + return items.reduce(function (acc, current, index) { + if (index < items.length - 1) { + acc = acc.concat(current, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("li", { + "aria-hidden": true, + key: "separator-".concat(index), + className: className + }, separator)); + } else { + acc.push(current); + } + + return acc; + }, []); +} + +var Breadcrumbs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Breadcrumbs(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'nav' : _props$component, + _props$expandText = props.expandText, + expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText, + _props$itemsAfterColl = props.itemsAfterCollapse, + itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl, + _props$itemsBeforeCol = props.itemsBeforeCollapse, + itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol, + _props$maxItems = props.maxItems, + maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems, + _props$separator = props.separator, + separator = _props$separator === void 0 ? '/' : _props$separator, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "classes", "className", "component", "expandText", "itemsAfterCollapse", "itemsBeforeCollapse", "maxItems", "separator"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](false), + expanded = _React$useState[0], + setExpanded = _React$useState[1]; + + var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) { + var handleClickExpand = function handleClickExpand(event) { + setExpanded(true); // The clicked element received the focus but gets removed from the DOM. + // Let's keep the focus in the component after expanding. + + var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]'); + + if (focusable) { + focusable.focus(); + } + }; // This defends against someone passing weird input, to ensure that if all + // items would be shown anyway, we just show all items without the EllipsisItem + + + if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) { + if (false) {} + + return allItems; + } + + return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_9__["default"], { + "aria-label": expandText, + key: "ellipsis", + onClick: handleClickExpand + })], Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length))); + }; + + var allItems = react__WEBPACK_IMPORTED_MODULE_3__["Children"].toArray(children).filter(function (child) { + if (false) {} + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child); + }).map(function (child, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("li", { + className: classes.li, + key: "child-".concat(index) + }, child); + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref, + component: Component, + color: "textSecondary", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__["default"])(classes.root, className) + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("ol", { + className: classes.ol + }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiBreadcrumbs' +})(Breadcrumbs)); + +/***/ }), + +/***/ "VXXh": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _numbers = __webpack_require__("7mpy"); + +Object.keys(_numbers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _numbers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _numbers[key]; + } + }); +}); + +var _strings = __webpack_require__("RD7v"); + +Object.keys(_strings).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _strings[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _strings[key]; + } + }); +}); + +var _applications = __webpack_require__("GndU"); + +Object.keys(_applications).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _applications[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _applications[key]; + } + }); +}); + +var _environments = __webpack_require__("dNxw"); + +Object.keys(_environments).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _environments[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _environments[key]; + } + }); +}); + +var _events = __webpack_require__("1aH1"); + +Object.keys(_events).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _events[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _events[key]; + } + }); +}); + +var _messengers = __webpack_require__("VcL4"); + +Object.keys(_messengers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _messengers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _messengers[key]; + } + }); +}); + +var _methods = __webpack_require__("chDU"); + +Object.keys(_methods).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _methods[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _methods[key]; + } + }); +}); + +var _NativeMessenger = __webpack_require__("XROj"); + +Object.keys(_NativeMessenger).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _NativeMessenger[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _NativeMessenger[key]; + } + }); +}); + +var _NativeService = __webpack_require__("S4gh"); + +Object.keys(_NativeService).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _NativeService[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _NativeService[key]; + } + }); +}); + +var _WebviewMessenger = __webpack_require__("Vppj"); + +Object.keys(_WebviewMessenger).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _WebviewMessenger[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _WebviewMessenger[key]; + } + }); +}); + +var _WebviewService = __webpack_require__("qEZt"); + +Object.keys(_WebviewService).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _WebviewService[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _WebviewService[key]; + } + }); +}); + +/***/ }), + +/***/ "VcL4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/***/ }), + +/***/ "VjOD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function() { return getActiveTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasTracingEnabled", function() { return hasTracingEnabled; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "msToSec", function() { return msToSec; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "secToMs", function() { return secToMs; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["TRACEPARENT_REGEXP"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["extractTraceparentData"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["stripUrlQueryAndFragment"]; }); + + + + +/** + * Determines if tracing is currently enabled. + * + * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config. + */ +function hasTracingEnabled( + maybeOptions, +) { + const client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getClient(); + const options = maybeOptions || (client && client.getOptions()); + return !!options && ('tracesSampleRate' in options || 'tracesSampler' in options); +} + +/** Grabs active transaction off scope, if any */ +function getActiveTransaction(maybeHub) { + const hub = maybeHub || Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])(); + const scope = hub.getScope(); + return scope && (scope.getTransaction() ); +} + +/** + * Converts from milliseconds to seconds + * @param time time in ms + */ +function msToSec(time) { + return time / 1000; +} + +/** + * Converts from seconds to milliseconds + * @param time time in seconds + */ +function secToMs(time) { + return time * 1000; +} + + +//# sourceMappingURL=utils.js.map + + +/***/ }), + +/***/ "VkL2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_browserPerformanceTimeOriginMode", function() { return _browserPerformanceTimeOriginMode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "browserPerformanceTimeOrigin", function() { return browserPerformanceTimeOrigin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateTimestampInSeconds", function() { return dateTimestampInSeconds; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestampInSeconds", function() { return timestampInSeconds; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestampWithMs", function() { return timestampWithMs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "usingPerformanceAPI", function() { return usingPerformanceAPI; }); +/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5Ysx"); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7bZ2"); + + + +// eslint-disable-next-line deprecation/deprecation +const WINDOW = Object(_worldwide_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalObject"])(); + +/** + * An object that can return the current timestamp in seconds since the UNIX epoch. + */ + +/** + * A TimestampSource implementation for environments that do not support the Performance Web API natively. + * + * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier + * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It + * is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration". + */ +const dateTimestampSource = { + nowSeconds: () => Date.now() / 1000, +}; + +/** + * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance} + * for accessing a high-resolution monotonic clock. + */ + +/** + * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not + * support the API. + * + * Wrapping the native API works around differences in behavior from different browsers. + */ +function getBrowserPerformance() { + const { performance } = WINDOW; + if (!performance || !performance.now) { + return undefined; + } + + // Replace performance.timeOrigin with our own timeOrigin based on Date.now(). + // + // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin + + // performance.now() gives a date arbitrarily in the past. + // + // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is + // undefined. + // + // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to + // interact with data coming out of performance entries. + // + // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that + // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes + // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have + // observed skews that can be as long as days, weeks or months. + // + // See https://github.com/getsentry/sentry-javascript/issues/2590. + // + // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload + // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation + // transactions of long-lived web pages. + const timeOrigin = Date.now() - performance.now(); + + return { + now: () => performance.now(), + timeOrigin, + }; +} + +/** + * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't + * implement the API. + */ +function getNodePerformance() { + try { + const perfHooks = Object(_node_js__WEBPACK_IMPORTED_MODULE_0__["dynamicRequire"])(module, 'perf_hooks') ; + return perfHooks.performance; + } catch (_) { + return undefined; + } +} + +/** + * The Performance API implementation for the current platform, if available. + */ +const platformPerformance = Object(_node_js__WEBPACK_IMPORTED_MODULE_0__["isNodeEnv"])() ? getNodePerformance() : getBrowserPerformance(); + +const timestampSource = + platformPerformance === undefined + ? dateTimestampSource + : { + nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000, + }; + +/** + * Returns a timestamp in seconds since the UNIX epoch using the Date API. + */ +const dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource); + +/** + * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the + * availability of the Performance API. + * + * See `usingPerformanceAPI` to test whether the Performance API is used. + * + * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is + * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The + * skew can grow to arbitrary amounts like days, weeks or months. + * See https://github.com/getsentry/sentry-javascript/issues/2590. + */ +const timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); + +// Re-exported with an old name for backwards-compatibility. +const timestampWithMs = timestampInSeconds; + +/** + * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps. + */ +const usingPerformanceAPI = platformPerformance !== undefined; + +/** + * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only. + */ +let _browserPerformanceTimeOriginMode; + +/** + * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the + * performance API is available. + */ +const browserPerformanceTimeOrigin = (() => { + // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or + // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin + // data as reliable if they are within a reasonable threshold of the current time. + + const { performance } = WINDOW; + if (!performance || !performance.now) { + _browserPerformanceTimeOriginMode = 'none'; + return undefined; + } + + const threshold = 3600 * 1000; + const performanceNow = performance.now(); + const dateNow = Date.now(); + + // if timeOrigin isn't available set delta to threshold so it isn't used + const timeOriginDelta = performance.timeOrigin + ? Math.abs(performance.timeOrigin + performanceNow - dateNow) + : threshold; + const timeOriginIsReliable = timeOriginDelta < threshold; + + // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin + // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. + // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always + // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the + // Date API. + // eslint-disable-next-line deprecation/deprecation + const navigationStart = performance.timing && performance.timing.navigationStart; + const hasNavigationStart = typeof navigationStart === 'number'; + // if navigationStart isn't available set delta to threshold so it isn't used + const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold; + const navigationStartIsReliable = navigationStartDelta < threshold; + + if (timeOriginIsReliable || navigationStartIsReliable) { + // Use the more reliable time origin + if (timeOriginDelta <= navigationStartDelta) { + _browserPerformanceTimeOriginMode = 'timeOrigin'; + return performance.timeOrigin; + } else { + _browserPerformanceTimeOriginMode = 'navigationStart'; + return navigationStart; + } + } + + // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date. + _browserPerformanceTimeOriginMode = 'dateNow'; + return dateNow; +})(); + + +//# sourceMappingURL=time.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("BE8o")(module))) + +/***/ }), + +/***/ "VmiN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>} + */ + +var AccordionContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({}); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (AccordionContext); + +/***/ }), + +/***/ "VnBx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppItem", function() { return AppItem; }); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("LGLP"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("/yh+"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("xEu0"); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_client__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("eCKa"); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("CE71"); +/* harmony import */ var cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var _IconCozyHome__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("2B+r"); +/* harmony import */ var _proptypes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("tJ5F"); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("jTJl"); + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + +var getAppDisplayName = lodash_get__WEBPACK_IMPORTED_MODULE_9___default()(cozy_client__WEBPACK_IMPORTED_MODULE_11__["models"], 'applications.getAppDisplayName', function (app) { + return app.namePrefix && app.namePrefix.toLowerCase() !== 'cozy' ? "".concat(app.namePrefix, " ").concat(app.name) : app.name; +}); +var AppItem = /*#__PURE__*/function (_React$Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(AppItem, _React$Component); + + var _super = _createSuper(AppItem); + + /** + * Used to add query params to AppLinker links, useful in overrides + * @param {Object} props AppItem props + * @param {Object} context AppItem context + * @return {Object} Query string parameters as object + */ + function AppItem(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, AppItem); + + _this = _super.call(this, props); + _this.onAppSwitch = _this.onAppSwitch.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(AppItem, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + if (this.switchTimeout) clearTimeout(this.switchTimeout); + } + }, { + key: "buildAppUrl", + value: function buildAppUrl(href) { + var url; + + try { + url = new URL(href); + } catch (error) { + // eslint-disable-next-line no-console + console.error(error.message); + return null; + } + + var queryParams = AppItem.buildQueryParams(this.props, this.context); + + if (queryParams) { + for (var name in queryParams) { + url.searchParams.append(name, queryParams[name]); + } + } + + return url.toString(); + } + }, { + key: "onAppSwitch", + value: function onAppSwitch() { + var onAppSwitch = this.props.onAppSwitch; + + if (typeof onAppSwitch === 'function') { + this.switchTimeout = setTimeout(function () { + onAppSwitch(); + }, 1000); + } + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + useHomeIcon = _this$props.useHomeIcon, + app = _this$props.app, + isInvertedTheme = _this$props.isInvertedTheme; + var dataIcon = app.slug ? "icon-".concat(app.slug) : ''; + var appName = getAppDisplayName(app); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13___default.a, { + onAppSwitch: this.onAppSwitch, + href: this.buildAppUrl(app.href) || '', + app: app + }, function (_ref) { + var onClick = _ref.onClick, + href = _ref.href; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("li", { + className: "coz-nav-apps-item".concat(app.isCurrentApp ? ' --current' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("a", { + role: "menuitem", + href: href, + "data-icon": dataIcon, + title: appName, + onClick: onClick + }, useHomeIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_14__["default"], { + className: "coz-nav-apps-item-icon", + isInvertedTheme: isInvertedTheme + }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12___default.a, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + app: app, + className: "coz-nav-apps-item-icon", + key: app.slug + }, _lib_stack__WEBPACK_IMPORTED_MODULE_16__["default"].get.iconProps())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("p", { + className: "coz-label" + }, appName))); + }); + } + }]); + + return AppItem; +}(react__WEBPACK_IMPORTED_MODULE_8___default.a.Component); + +_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(AppItem, "buildQueryParams", function () { + // default behaviour + return null; +}); + +AppItem.propTypes = { + app: _proptypes__WEBPACK_IMPORTED_MODULE_15__["appShape"].isRequired, + useHomeIcon: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.bool, + onAppSwitch: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func +}; +/* harmony default export */ __webpack_exports__["default"] = (AppItem); + +/***/ }), + +/***/ "Vppj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebviewMessenger = exports.DebugWebviewMessenger = void 0; + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _postMe = __webpack_require__("L5KM"); + +var WebviewMessenger = /*#__PURE__*/(0, _createClass2.default)(function WebviewMessenger(windowRef) { + var _this = this; + + (0, _classCallCheck2.default)(this, WebviewMessenger); + (0, _defineProperty2.default)(this, "windowRef", void 0); + (0, _defineProperty2.default)(this, "postMessage", function (message) { + var _this$windowRef; + + return (_this$windowRef = _this.windowRef) === null || _this$windowRef === void 0 ? void 0 : _this$windowRef.ReactNativeWebView.postMessage(JSON.stringify(message)); + }); + (0, _defineProperty2.default)(this, "addMessageListener", function (listener) { + var _this$windowRef2; + + var outerListener = function outerListener(event) { + return listener(event); + }; + + (_this$windowRef2 = _this.windowRef) === null || _this$windowRef2 === void 0 ? void 0 : _this$windowRef2.addEventListener('message', outerListener); + + var removeMessageListener = function removeMessageListener() { + var _this$windowRef3; + + return (_this$windowRef3 = _this.windowRef) === null || _this$windowRef3 === void 0 ? void 0 : _this$windowRef3.removeEventListener('message', outerListener); + }; + + return removeMessageListener; + }); + this.windowRef = windowRef; +}); +exports.WebviewMessenger = WebviewMessenger; + +var DebugWebviewMessenger = function DebugWebviewMessenger(messenger) { + var log = (0, _postMe.debug)('WebviewMessenger'); + return { + postMessage: function postMessage(message) { + message.action !== 'response' && log('- OUT', message); + messenger.postMessage(message); + }, + addMessageListener: function addMessageListener(listener) { + return messenger.addMessageListener(listener); + } + }; +}; + +exports.DebugWebviewMessenger = DebugWebviewMessenger; + +/***/ }), + +/***/ "Vq80": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nFpy"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rDuK"); +/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3+Qv"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("VHzf"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("OY/u"); +/* harmony import */ var _AccordionContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("VmiN"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("9sWd"); + + + + + + + + + + + + + + +var styles = function styles(theme) { + var transition = { + duration: theme.transitions.duration.shortest + }; + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + transition: theme.transitions.create(['margin'], transition), + '&:before': { + position: 'absolute', + left: 0, + top: -1, + right: 0, + height: 1, + content: '""', + opacity: 1, + backgroundColor: theme.palette.divider, + transition: theme.transitions.create(['opacity', 'background-color'], transition) + }, + '&:first-child': { + '&:before': { + display: 'none' + } + }, + '&$expanded': { + margin: '16px 0', + '&:first-child': { + marginTop: 0 + }, + '&:last-child': { + marginBottom: 0 + }, + '&:before': { + opacity: 0 + } + }, + '&$expanded + &': { + '&:before': { + display: 'none' + } + }, + '&$disabled': { + backgroundColor: theme.palette.action.disabledBackground + } + }, + + /* Styles applied to the root element if `square={false}`. */ + rounded: { + borderRadius: 0, + '&:first-child': { + borderTopLeftRadius: theme.shape.borderRadius, + borderTopRightRadius: theme.shape.borderRadius + }, + '&:last-child': { + borderBottomLeftRadius: theme.shape.borderRadius, + borderBottomRightRadius: theme.shape.borderRadius, + // Fix a rendering issue on Edge + '@supports (-ms-ime-align: auto)': { + borderBottomLeftRadius: 0, + borderBottomRightRadius: 0 + } + } + }, + + /* Styles applied to the root element if `expanded={true}`. */ + expanded: {}, + + /* Styles applied to the root element if `disabled={true}`. */ + disabled: {} + }; +}; +var Accordion = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function Accordion(props, ref) { + var childrenProp = props.children, + classes = props.classes, + className = props.className, + _props$defaultExpande = props.defaultExpanded, + defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + expandedProp = props.expanded, + onChange = props.onChange, + _props$square = props.square, + square = _props$square === void 0 ? false : _props$square, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_9__["default"] : _props$TransitionComp, + TransitionProps = props.TransitionProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__["default"])(props, ["children", "classes", "className", "defaultExpanded", "disabled", "expanded", "onChange", "square", "TransitionComponent", "TransitionProps"]); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_13__["default"])({ + controlled: expandedProp, + default: defaultExpanded, + name: 'Accordion', + state: 'expanded' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useControlled, 2), + expanded = _useControlled2[0], + setExpandedState = _useControlled2[1]; + + var handleChange = react__WEBPACK_IMPORTED_MODULE_4__["useCallback"](function (event) { + setExpandedState(!expanded); + + if (onChange) { + onChange(event, !expanded); + } + }, [expanded, onChange, setExpandedState]); + + var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_4__["Children"].toArray(childrenProp), + _React$Children$toArr2 = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_React$Children$toArr), + summary = _React$Children$toArr2[0], + children = _React$Children$toArr2.slice(1); + + var contextValue = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { + return { + expanded: expanded, + disabled: disabled, + toggle: handleChange + }; + }, [expanded, disabled, handleChange]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded), + ref: ref, + square: square + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_AccordionContext__WEBPACK_IMPORTED_MODULE_12__["default"].Provider, { + value: contextValue + }, summary), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: expanded, + timeout: "auto" + }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", { + "aria-labelledby": summary.props.id, + id: summary.props['aria-controls'], + role: "region" + }, children))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__["default"])(styles, { + name: 'MuiAccordion' +})(Accordion)); + +/***/ }), + +/***/ "VrlH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var yellow = { + 50: '#fffde7', + 100: '#fff9c4', + 200: '#fff59d', + 300: '#fff176', + 400: '#ffee58', + 500: '#ffeb3b', + 600: '#fdd835', + 700: '#fbc02d', + 800: '#f9a825', + 900: '#f57f17', + A100: '#ffff8d', + A200: '#ffff00', + A400: '#ffea00', + A700: '#ffd600' +}; +/* harmony default export */ __webpack_exports__["default"] = (yellow); + +/***/ }), + +/***/ "Vso4": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var $parseFloat = __webpack_require__("euRm"); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + + +/***/ }), + +/***/ "Vtbw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createReduxEnhancer", function() { return createReduxEnhancer; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); + + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +const ACTION_BREADCRUMB_CATEGORY = 'redux.action'; +const ACTION_BREADCRUMB_TYPE = 'info'; + +const defaultOptions = { + actionTransformer: action => action, + stateTransformer: state => state || null, +}; + +/** + * Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry. + * + * @param enhancerOptions Options to pass to the enhancer + */ +function createReduxEnhancer(enhancerOptions) { + // Note: We return an any type as to not have type conflicts. + const options = { + ...defaultOptions, + ...enhancerOptions, + }; + + return (next) => + (reducer, initialState) => { + const sentryReducer = (state, action) => { + const newState = reducer(state, action); + + Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["configureScope"])(scope => { + /* Action breadcrumbs */ + const transformedAction = options.actionTransformer(action); + if (typeof transformedAction !== 'undefined' && transformedAction !== null) { + scope.addBreadcrumb({ + category: ACTION_BREADCRUMB_CATEGORY, + data: transformedAction, + type: ACTION_BREADCRUMB_TYPE, + }); + } + + /* Set latest state to scope */ + const transformedState = options.stateTransformer(newState); + if (typeof transformedState !== 'undefined' && transformedState !== null) { + scope.setContext('state', { state: { type: 'redux', value: transformedState } }); + } else { + scope.setContext('state', null); + } + + /* Allow user to configure scope with latest state */ + // eslint-disable-next-line @typescript-eslint/unbound-method + const { configureScopeWithState } = options; + if (typeof configureScopeWithState === 'function') { + configureScopeWithState(scope, newState); + } + }); + + return newState; + }; + + return next(sentryReducer, initialState); + }; +} + + +//# sourceMappingURL=redux.js.map + + +/***/ }), + +/***/ "VwI0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createWebStorage = __webpack_require__("ZV7m"); + +var _createWebStorage2 = _interopRequireDefault(_createWebStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = (0, _createWebStorage2.default)('local'); + +/***/ }), + +/***/ "VxLx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/* + Modernizr 3.0.0pre (Custom Build) | MIT +*/ +var aa=__webpack_require__("ivGQ"),ca=__webpack_require__("uCEU");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var da=new Set,ea={};function fa(a,b){ha(a,b);ha(a+"Capture",b)} +function ha(a,b){ea[a]=b;for(a=0;a<b.length;a++)da.add(b[a])} +var ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la= +{},ma={};function oa(a){if(ja.call(ma,a))return!0;if(ja.call(la,a))return!1;if(ka.test(a))return ma[a]=!0;la[a]=!0;return!1}function pa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}} +function qa(a,b,c,d){if(null===b||"undefined"===typeof b||pa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={}; +"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)}); +["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)}); +["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()} +"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra, +sa);z[b]=new v(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)}); +z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)}); +function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])qa(b,c,e,d)&&(c=null),d||null===e?oa(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))} +var ua=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,va=Symbol.for("react.element"),wa=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Aa=Symbol.for("react.profiler"),Ba=Symbol.for("react.provider"),Ca=Symbol.for("react.context"),Da=Symbol.for("react.forward_ref"),Ea=Symbol.for("react.suspense"),Fa=Symbol.for("react.suspense_list"),Ga=Symbol.for("react.memo"),Ha=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode"); +var Ia=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Ja=Symbol.iterator;function Ka(a){if(null===a||"object"!==typeof a)return null;a=Ja&&a[Ja]||a["@@iterator"];return"function"===typeof a?a:null}var A=Object.assign,La;function Ma(a){if(void 0===La)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);La=b&&b[1]||""}return"\n"+La+a}var Na=!1; +function Oa(a,b){if(!a||Na)return"";Na=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(l){var d=l}Reflect.construct(a,[],b)}else{try{b.call()}catch(l){d=l}a.call(b.prototype)}else{try{throw Error();}catch(l){d=l}a()}}catch(l){if(l&&d&&"string"===typeof l.stack){for(var e=l.stack.split("\n"), +f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Ma(a):""} +function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return""}} +function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||"Context")+".Consumer";case Ba:return(a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName|| +b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null} +function Ra(a){var b=a.type;switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return"Offscreen"; +case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}} +function Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} +function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker= +null;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} +function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1)} +function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)} +function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)} +function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}var eb=Array.isArray; +function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}} +function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(p(91));return A({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(p(92));if(eb(c)){if(1<c.length)throw Error(p(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Sa(c)}} +function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function kb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}} +function lb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?kb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} +var mb,nb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{mb=mb||document.createElement("div");mb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}); +function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b} +var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0, +zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px"} +function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); +function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p(62));}} +function vb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null; +function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(){}var Ib=!1;function Jb(a,b,c){if(Ib)return a(b,c);Ib=!0;try{return Gb(a,b,c)}finally{if(Ib=!1,null!==zb||null!==Ab)Hb(),Fb()}} +function Kb(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!== +typeof c)throw Error(p(231,b,typeof c));return c}var Lb=!1;if(ia)try{var Mb={};Object.defineProperty(Mb,"passive",{get:function(){Lb=!0}});window.addEventListener("test",Mb,Mb);window.removeEventListener("test",Mb,Mb)}catch(a){Lb=!1}function Nb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var Ob=!1,Pb=null,Qb=!1,Rb=null,Sb={onError:function(a){Ob=!0;Pb=a}};function Tb(a,b,c,d,e,f,g,h,k){Ob=!1;Pb=null;Nb.apply(Sb,arguments)} +function Ub(a,b,c,d,e,f,g,h,k){Tb.apply(this,arguments);if(Ob){if(Ob){var l=Pb;Ob=!1;Pb=null}else throw Error(p(198));Qb||(Qb=!0,Rb=l)}}function Vb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Wb(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Xb(a){if(Vb(a)!==a)throw Error(p(188));} +function Yb(a){var b=a.alternate;if(!b){b=Vb(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Xb(e),a;if(f===d)return Xb(e),b;f=f.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h=== +c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function Zb(a){a=Yb(a);return null!==a?$b(a):null}function $b(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=$b(a);if(null!==b)return b;a=a.sibling}return null} +var ac=ca.unstable_scheduleCallback,bc=ca.unstable_cancelCallback,cc=ca.unstable_shouldYield,dc=ca.unstable_requestPaint,B=ca.unstable_now,ec=ca.unstable_getCurrentPriorityLevel,fc=ca.unstable_ImmediatePriority,gc=ca.unstable_UserBlockingPriority,hc=ca.unstable_NormalPriority,ic=ca.unstable_LowPriority,jc=ca.unstable_IdlePriority,kc=null,lc=null;function mc(a){if(lc&&"function"===typeof lc.onCommitFiberRoot)try{lc.onCommitFiberRoot(kc,a,void 0,128===(a.current.flags&128))}catch(b){}} +var oc=Math.clz32?Math.clz32:nc,pc=Math.log,qc=Math.LN2;function nc(a){a>>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304; +function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824; +default:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-oc(b),e=1<<c,d|=a[c],b&=~e;return d} +function vc(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}} +function wc(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-oc(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=vc(h,b)}else k<=b&&(a.expiredLanes|=h);f&=~h}}function xc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function yc(){var a=rc;rc<<=1;0===(rc&4194240)&&(rc=64);return a}function zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b} +function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-oc(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f}} +function Cc(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-oc(c),e=1<<d;e&b|a[d]&b&&(a[d]|=b);c&=~e}}var C=0;function Dc(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}var Ec,Fc,Gc,Hc,Ic,Jc=!1,Kc=[],Lc=null,Mc=null,Nc=null,Oc=new Map,Pc=new Map,Qc=[],Rc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); +function Sc(a,b){switch(a){case "focusin":case "focusout":Lc=null;break;case "dragenter":case "dragleave":Mc=null;break;case "mouseover":case "mouseout":Nc=null;break;case "pointerover":case "pointerout":Oc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Pc.delete(b.pointerId)}} +function Tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,nativeEvent:f,targetContainers:[e]},null!==b&&(b=Cb(b),null!==b&&Fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a} +function Uc(a,b,c,d,e){switch(b){case "focusin":return Lc=Tc(Lc,a,b,c,d,e),!0;case "dragenter":return Mc=Tc(Mc,a,b,c,d,e),!0;case "mouseover":return Nc=Tc(Nc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Oc.set(f,Tc(Oc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Pc.set(f,Tc(Pc.get(f)||null,a,b,c,d,e)),!0}return!1} +function Vc(a){var b=Wc(a.target);if(null!==b){var c=Vb(b);if(null!==c)if(b=c.tag,13===b){if(b=Wb(c),null!==b){a.blockedOn=b;Ic(a.priority,function(){Gc(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null} +function Xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;var d=new c.constructor(c.type,c);wb=d;c.target.dispatchEvent(d);wb=null}else return b=Cb(c),null!==b&&Fc(b),a.blockedOn=c,!1;b.shift()}return!0}function Zc(a,b,c){Xc(a)&&c.delete(b)}function $c(){Jc=!1;null!==Lc&&Xc(Lc)&&(Lc=null);null!==Mc&&Xc(Mc)&&(Mc=null);null!==Nc&&Xc(Nc)&&(Nc=null);Oc.forEach(Zc);Pc.forEach(Zc)} +function ad(a,b){a.blockedOn===b&&(a.blockedOn=null,Jc||(Jc=!0,ca.unstable_scheduleCallback(ca.unstable_NormalPriority,$c)))} +function bd(a){function b(b){return ad(b,a)}if(0<Kc.length){ad(Kc[0],a);for(var c=1;c<Kc.length;c++){var d=Kc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Lc&&ad(Lc,a);null!==Mc&&ad(Mc,a);null!==Nc&&ad(Nc,a);Oc.forEach(b);Pc.forEach(b);for(c=0;c<Qc.length;c++)d=Qc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Qc.length&&(c=Qc[0],null===c.blockedOn);)Vc(c),null===c.blockedOn&&Qc.shift()}var cd=ua.ReactCurrentBatchConfig,dd=!0; +function ed(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=1,fd(a,b,c,d)}finally{C=e,cd.transition=f}}function gd(a,b,c,d){var e=C,f=cd.transition;cd.transition=null;try{C=4,fd(a,b,c,d)}finally{C=e,cd.transition=f}} +function fd(a,b,c,d){if(dd){var e=Yc(a,b,c,d);if(null===e)hd(a,b,d,id,c),Sc(a,d);else if(Uc(e,a,b,c,d))d.stopPropagation();else if(Sc(a,d),b&4&&-1<Rc.indexOf(a)){for(;null!==e;){var f=Cb(e);null!==f&&Ec(f);f=Yc(a,b,c,d);null===f&&hd(a,b,d,id,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else hd(a,b,d,null,c)}}var id=null; +function Yc(a,b,c,d){id=null;a=xb(d);a=Wc(a);if(null!==a)if(b=Vb(a),null===b)a=null;else if(c=b.tag,13===c){a=Wb(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);id=a;return null} +function jd(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4; +case "message":switch(ec()){case fc:return 1;case gc:return 4;case hc:case ic:return 16;case jc:return 536870912;default:return 16}default:return 16}}var kd=null,ld=null,md=null;function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)} +function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1} +function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}A(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&& +(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b} +var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=A({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=A({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in +a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return"movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=A({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=A({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=A({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=A({},sd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=A({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape", +Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7", +119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd} +var Qd=A({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return"keypress"===a.type?od(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"=== +a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=A({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=A({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=A({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=A({},Ad,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0}, +deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=ia&&"CompositionEvent"in window,be=null;ia&&"documentMode"in document&&(be=document.documentMode);var ce=ia&&"TextEvent"in window&&!be,de=ia&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1; +function ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}} +function ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}} +var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!le[a.type]:"textarea"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a} +function ve(a,b){if("change"===a)return b}var we=!1;if(ia){var xe;if(ia){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));Jb(re,b)}} +function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae()}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge; +function Ie(a,b){if(He(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!ja.call(b,e)||!He(a[e],b[e]))return!1}return!0}function Je(a){for(;a&&a.firstChild;)a=a.firstChild;return a} +function Ke(a,b){var c=Je(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} +function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} +function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c, +d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}} +var Pe=ia&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1; +function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))} +function Ve(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Xe={},Ye={}; +ia&&(Ye=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);function Ze(a){if(Xe[a])return Xe[a];if(!We[a])return a;var b=We[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ye)return Xe[a]=b[c];return a}var $e=Ze("animationend"),af=Ze("animationiteration"),bf=Ze("animationstart"),cf=Ze("transitionend"),df=new Map,ef="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); +function ff(a,b){df.set(a,b);fa(b,[a])}for(var gf=0;gf<ef.length;gf++){var hf=ef[gf],jf=hf.toLowerCase(),kf=hf[0].toUpperCase()+hf.slice(1);ff(jf,"on"+kf)}ff($e,"onAnimationEnd");ff(af,"onAnimationIteration");ff(bf,"onAnimationStart");ff("dblclick","onDoubleClick");ff("focusin","onFocus");ff("focusout","onBlur");ff(cf,"onTransitionEnd");ha("onMouseEnter",["mouseout","mouseover"]);ha("onMouseLeave",["mouseout","mouseover"]);ha("onPointerEnter",["pointerout","pointerover"]); +ha("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")); +fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mf=new Set("cancel close invalid load scroll toggle".split(" ").concat(lf)); +function nf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Ub(d,b,void 0,a);a.currentTarget=null} +function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;nf(e,h,l);f=k}}}if(Qb)throw a=Rb,Qb=!1,Rb=null,a;} +function D(a,b){var c=b[of];void 0===c&&(c=b[of]=new Set);var d=a+"__bubble";c.has(d)||(pf(b,a,2,!1),c.add(d))}function qf(a,b,c){var d=0;b&&(d|=4);pf(c,a,d,b)}var rf="_reactListening"+Math.random().toString(36).slice(2);function sf(a){if(!a[rf]){a[rf]=!0;da.forEach(function(b){"selectionchange"!==b&&(mf.has(b)||qf(b,!1,a),qf(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[rf]||(b[rf]=!0,qf("selectionchange",!1,b))}} +function pf(a,b,c,d){switch(jd(b)){case 1:var e=ed;break;case 4:e=gd;break;default:e=fd}c=e.bind(null,b,c,a);e=void 0;!Lb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)} +function hd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=Wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Jb(function(){var d=f,e=xb(c),g=[]; +a:{var h=df.get(a);if(void 0!==h){var k=td,n=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":n="focus";k=Fd;break;case "focusout":n="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k= +Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case $e:case af:case bf:k=Hd;break;case cf:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td}var t=0!==(b&4),J=!t&&"scroll"===a,x=t?null!==h?h+"Capture":null:h;t=[];for(var w=d,u;null!== +w;){u=w;var F=u.stateNode;5===u.tag&&null!==F&&(u=F,null!==x&&(F=Kb(w,x),null!=F&&t.push(tf(w,F,u))));if(J)break;w=w.return}0<t.length&&(h=new k(h,n,null,c,e),g.push({event:h,listeners:t}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&c!==wb&&(n=c.relatedTarget||c.fromElement)&&(Wc(n)||n[uf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(n=c.relatedTarget||c.toElement,k=d,n=n?Wc(n):null,null!== +n&&(J=Vb(n),n!==J||5!==n.tag&&6!==n.tag))n=null}else k=null,n=d;if(k!==n){t=Bd;F="onMouseLeave";x="onMouseEnter";w="mouse";if("pointerout"===a||"pointerover"===a)t=Td,F="onPointerLeave",x="onPointerEnter",w="pointer";J=null==k?h:ue(k);u=null==n?h:ue(n);h=new t(F,w+"leave",k,c,e);h.target=J;h.relatedTarget=u;F=null;Wc(e)===d&&(t=new t(x,w+"enter",n,c,e),t.target=u,t.relatedTarget=J,F=t);J=F;if(k&&n)b:{t=k;x=n;w=0;for(u=t;u;u=vf(u))w++;u=0;for(F=x;F;F=vf(F))u++;for(;0<w-u;)t=vf(t),w--;for(;0<u-w;)x= +vf(x),u--;for(;w--;){if(t===x||null!==x&&t===x.alternate)break b;t=vf(t);x=vf(x)}t=null}else t=null;null!==k&&wf(g,h,k,t,!1);null!==n&&null!==J&&wf(g,J,n,t,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var na=ve;else if(me(h))if(we)na=Fe;else{na=De;var xa=Ce}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(na=Ee);if(na&&(na=na(a,d))){ne(g,na,c,e);break a}xa&&xa(a,h,d);"focusout"===a&&(xa=h._wrapperState)&& +xa.controlled&&"number"===h.type&&cb(h,"number",h.value)}xa=d?ue(d):window;switch(a){case "focusin":if(me(xa)||"true"===xa.contentEditable)Qe=xa,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=!0;break;case "contextmenu":case "mouseup":case "dragend":Te=!1;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e)}var $a;if(ae)b:{switch(a){case "compositionstart":var ba="onCompositionStart";break b;case "compositionend":ba="onCompositionEnd"; +break b;case "compositionupdate":ba="onCompositionUpdate";break b}ba=void 0}else ie?ge(a,c)&&(ba="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(ba="onCompositionStart");ba&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==ba?"onCompositionEnd"===ba&&ie&&($a=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=!0)),xa=oe(d,ba),0<xa.length&&(ba=new Ld(ba,a,null,c,e),g.push({event:ba,listeners:xa}),$a?ba.data=$a:($a=he(c),null!==$a&&(ba.data=$a))));if($a=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"), +0<d.length&&(e=new Ld("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=$a)}se(g,b)})}function tf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Kb(a,c),null!=f&&d.unshift(tf(a,f,e)),f=Kb(a,b),null!=f&&d.push(tf(a,f,e)));a=a.return}return d}function vf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null} +function wf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Kb(c,f),null!=k&&g.unshift(tf(c,k,h))):e||(k=Kb(c,f),null!=k&&g.push(tf(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}var xf=/\r\n?/g,yf=/\u0000|\uFFFD/g;function zf(a){return("string"===typeof a?a:""+a).replace(xf,"\n").replace(yf,"")}function Af(a,b,c){b=zf(b);if(zf(a)!==b&&c)throw Error(p(425));}function Bf(){} +var Cf=null,Df=null;function Ef(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html} +var Ff="function"===typeof setTimeout?setTimeout:void 0,Gf="function"===typeof clearTimeout?clearTimeout:void 0,Hf="function"===typeof Promise?Promise:void 0,Jf="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Hf?function(a){return Hf.resolve(null).then(a).catch(If)}:Ff;function If(a){setTimeout(function(){throw a;})} +function Kf(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=e.data,"/$"===c){if(0===d){a.removeChild(e);bd(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);bd(b)}function Lf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a} +function Mf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var Nf=Math.random().toString(36).slice(2),Of="__reactFiber$"+Nf,Pf="__reactProps$"+Nf,uf="__reactContainer$"+Nf,of="__reactEvents$"+Nf,Qf="__reactListeners$"+Nf,Rf="__reactHandles$"+Nf; +function Wc(a){var b=a[Of];if(b)return b;for(var c=a.parentNode;c;){if(b=c[uf]||c[Of]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Mf(a);null!==a;){if(c=a[Of])return c;a=Mf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[Of]||a[uf];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(p(33));}function Db(a){return a[Pf]||null}var Sf=[],Tf=-1;function Uf(a){return{current:a}} +function E(a){0>Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e} +function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||"Unknown",e));return A({},c,d)} +function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)} +function jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}eg=null;fg=!1}catch(e){throw null!==eg&&(eg=eg.slice(a+1)),ac(fc,jg),e;}finally{C=b,gg=!1}}return null}var kg=[],lg=0,mg=null,ng=0,og=[],pg=0,qg=null,rg=1,sg="";function tg(a,b){kg[lg++]=ng;kg[lg++]=mg;mg=a;ng=b} +function ug(a,b,c){og[pg++]=rg;og[pg++]=sg;og[pg++]=qg;qg=a;var d=rg;a=sg;var e=32-oc(d)-1;d&=~(1<<e);c+=1;var f=32-oc(b)+e;if(30<f){var g=e-e%5;f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;rg=1<<32-oc(b)+e|c<<e|d;sg=f+a}else rg=1<<f|c<<e|d,sg=a}function vg(a){null!==a.return&&(tg(a,1),ug(a,1,0))}function wg(a){for(;a===mg;)mg=kg[--lg],kg[lg]=null,ng=kg[--lg],kg[lg]=null;for(;a===qg;)qg=og[--pg],og[pg]=null,sg=og[--pg],og[pg]=null,rg=og[--pg],og[pg]=null}var xg=null,yg=null,I=!1,zg=null; +function Ag(a,b){var c=Bg(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)} +function Cg(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,xg=a,yg=Lf(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,xg=a,yg=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==qg?{id:rg,overflow:sg}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=Bg(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,xg=a,yg= +null,!0):!1;default:return!1}}function Dg(a){return 0!==(a.mode&1)&&0===(a.flags&128)}function Eg(a){if(I){var b=yg;if(b){var c=b;if(!Cg(a,b)){if(Dg(a))throw Error(p(418));b=Lf(c.nextSibling);var d=xg;b&&Cg(a,b)?Ag(d,c):(a.flags=a.flags&-4097|2,I=!1,xg=a)}}else{if(Dg(a))throw Error(p(418));a.flags=a.flags&-4097|2;I=!1;xg=a}}}function Fg(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;xg=a} +function Gg(a){if(a!==xg)return!1;if(!I)return Fg(a),I=!0,!1;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Ef(a.type,a.memoizedProps));if(b&&(b=yg)){if(Dg(a))throw Hg(),Error(p(418));for(;b;)Ag(a,b),b=Lf(b.nextSibling)}Fg(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(p(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){yg=Lf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}yg= +null}}else yg=xg?Lf(a.stateNode.nextSibling):null;return!0}function Hg(){for(var a=yg;a;)a=Lf(a.nextSibling)}function Ig(){yg=xg=null;I=!1}function Jg(a){null===zg?zg=[a]:zg.push(a)}var Kg=ua.ReactCurrentBatchConfig;function Lg(a,b){if(a&&a.defaultProps){b=A({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var Mg=Uf(null),Ng=null,Og=null,Pg=null;function Qg(){Pg=Og=Ng=null}function Rg(a){var b=Mg.current;E(Mg);a._currentValue=b} +function Sg(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}function Tg(a,b){Ng=a;Pg=Og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(Ug=!0),a.firstContext=null)} +function Vg(a){var b=a._currentValue;if(Pg!==a)if(a={context:a,memoizedValue:b,next:null},null===Og){if(null===Ng)throw Error(p(308));Og=a;Ng.dependencies={lanes:0,firstContext:a}}else Og=Og.next=a;return b}var Wg=null;function Xg(a){null===Wg?Wg=[a]:Wg.push(a)}function Yg(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,Xg(b)):(c.next=e.next,e.next=c);b.interleaved=c;return Zg(a,d)} +function Zg(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var $g=!1;function ah(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}} +function bh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function ch(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}} +function dh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return Zg(a,c)}e=d.interleaved;null===e?(b.next=b,Xg(d)):(b.next=e.next,e.next=b);d.interleaved=b;return Zg(a,c)}function eh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}} +function fh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next= +b;c.lastBaseUpdate=b} +function gh(a,b,c,d){var e=a.updateQueue;$g=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback, +next:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r="function"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:$g=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r; +h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);hh|=g;a.lanes=g;a.memoizedState=q}} +function ih(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(p(191,e));e.call(d)}}}var jh=(new aa.Component).refs;function kh(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:A({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)} +var nh={isMounted:function(a){return(a=a._reactInternals)?Vb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=L(),e=lh(a),f=ch(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=dh(a,f,e);null!==b&&(mh(b,a,e,d),eh(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=L(),e=lh(a),f=ch(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=dh(a,f,e);null!==b&&(mh(b,a,e,d),eh(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=L(),d= +lh(a),e=ch(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=dh(a,e,d);null!==b&&(mh(b,a,d,c),eh(b,a,d))}};function oh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Ie(c,d)||!Ie(e,f):!0} +function ph(a,b,c){var d=!1,e=Vf;var f=b.contextType;"object"===typeof f&&null!==f?f=Vg(f):(e=Zf(b)?Xf:H.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Yf(a,e):Vf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=nh;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b} +function qh(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&nh.enqueueReplaceState(b,b.state,null)} +function rh(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=jh;ah(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=Vg(f):(f=Zf(b)?Xf:H.current,e.context=Yf(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(kh(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state, +"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&nh.enqueueReplaceState(e,e.state,null),gh(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)} +function sh(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(p(309));var d=c.stateNode}if(!d)throw Error(p(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;b===jh&&(b=e.refs={});null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(p(284));if(!c._owner)throw Error(p(290,a));}return a} +function th(a,b){a=Object.prototype.toString.call(b);throw Error(p(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function uh(a){var b=a._init;return b(a._payload)} +function vh(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=wh(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&& +null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=xh(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===ya)return m(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ha&&uh(f)===b.type))return d=e(b,c.props),d.ref=sh(a,b,c),d.return=a,d;d=yh(c.type,c.key,c.props,null,a.mode,d);d.ref=sh(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag|| +b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=zh(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Ah(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b&&""!==b||"number"===typeof b)return b=xh(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case va:return c=yh(b.type,b.key,b.props,null,a.mode,c), +c.ref=sh(a,null,b),c.return=a,c;case wa:return b=zh(b,a.mode,c),b.return=a,b;case Ha:var d=b._init;return q(a,d(b._payload),c)}if(eb(b)||Ka(b))return b=Ah(b,a.mode,c,null),b.return=a,b;th(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case va:return c.key===e?k(a,b,c,d):null;case wa:return c.key===e?l(a,b,c,d):null;case Ha:return e=c._init,r(a, +b,e(c._payload),d)}if(eb(c)||Ka(c))return null!==e?null:m(a,b,c,d,null);th(a,c)}return null}function y(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case va:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,e);case wa:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e);case Ha:var f=d._init;return y(a,b,c,f(d._payload),e)}if(eb(d)||Ka(d))return a=a.get(c)||null,m(b,a,d,e,null);th(b,d)}return null} +function n(e,g,h,k){for(var l=null,m=null,u=g,w=g=0,x=null;null!==u&&w<h.length;w++){u.index>w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;w<h.length;w++)u=q(e,h[w],k),null!==u&&(g=f(u,g,w),null===m?l=u:m.sibling=u,m=u);I&&tg(e,w);return l}for(u=d(e,u);w<h.length;w++)x=y(u,e,w,h[w],k),null!==x&&(a&&null!==x.alternate&&u.delete(null=== +x.key?w:x.key),g=f(x,g,w),null===m?l=x:m.sibling=x,m=x);a&&u.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function t(e,g,h,k){var l=Ka(h);if("function"!==typeof l)throw Error(p(150));h=l.call(h);if(null==h)throw Error(p(151));for(var u=l=null,m=g,w=g=0,x=null,n=h.next();null!==m&&!n.done;w++,n=h.next()){m.index>w?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e, +m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k= +f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!== +d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d): +(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)} +function Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0); +function Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[]; +function Oh(){for(var a=0;a<Nh.length;a++)Nh[a]._workInProgressVersionPrimary=null;Nh.length=0}var Ph=ua.ReactCurrentDispatcher,Qh=ua.ReactCurrentBatchConfig,Rh=0,N=null,O=null,P=null,Sh=!1,Th=!1,Uh=0,Vh=0;function Q(){throw Error(p(321));}function Wh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0} +function Xh(a,b,c,d,e,f){Rh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;Ph.current=null===a||null===a.memoizedState?Yh:Zh;a=c(d,e);if(Th){f=0;do{Th=!1;Uh=0;if(25<=f)throw Error(p(301));f+=1;P=O=null;b.updateQueue=null;Ph.current=$h;a=c(d,e)}while(Th)}Ph.current=ai;b=null!==O&&null!==O.next;Rh=0;P=O=N=null;Sh=!1;if(b)throw Error(p(300));return a}function bi(){var a=0!==Uh;Uh=0;return a} +function ci(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function di(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(p(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P} +function ei(a,b){return"function"===typeof b?b(a):b} +function fi(a){var b=di(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,l=f;do{var m=l.lane;if((Rh&m)===m)null!==k&&(k=k.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d=l.hasEagerState?l.eagerState:a(d,l.action);else{var q={lane:m,action:l.action,hasEagerState:l.hasEagerState, +eagerState:l.eagerState,next:null};null===k?(h=k=q,g=d):k=k.next=q;N.lanes|=m;hh|=m}l=l.next}while(null!==l&&l!==f);null===k?g=d:k.next=h;He(d,b.memoizedState)||(Ug=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}a=c.interleaved;if(null!==a){e=a;do f=e.lane,N.lanes|=f,hh|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]} +function gi(a){var b=di(),c=b.queue;if(null===c)throw Error(p(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(Ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function hi(){} +function ii(a,b){var c=N,d=di(),e=b(),f=!He(d.memoizedState,e);f&&(d.memoizedState=e,Ug=!0);d=d.queue;ji(ki.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==P&&P.memoizedState.tag&1){c.flags|=2048;li(9,mi.bind(null,c,d,e,b),void 0,null);if(null===R)throw Error(p(349));0!==(Rh&30)||ni(c,b,e)}return e}function ni(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=N.updateQueue;null===b?(b={lastEffect:null,stores:null},N.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))} +function mi(a,b,c,d){b.value=c;b.getSnapshot=d;oi(b)&&pi(a)}function ki(a,b,c){return c(function(){oi(b)&&pi(a)})}function oi(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!He(a,c)}catch(d){return!0}}function pi(a){var b=Zg(a,1);null!==b&&mh(b,a,1,-1)} +function qi(a){var b=ci();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:a};b.queue=a;a=a.dispatch=ri.bind(null,N,a);return[b.memoizedState,a]} +function li(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null,stores:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function si(){return di().memoizedState}function ti(a,b,c,d){var e=ci();N.flags|=a;e.memoizedState=li(1|b,c,void 0,void 0===d?null:d)} +function ui(a,b,c,d){var e=di();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Wh(d,g.deps)){e.memoizedState=li(b,c,f,d);return}}N.flags|=a;e.memoizedState=li(1|b,c,f,d)}function vi(a,b){return ti(8390656,8,a,b)}function ji(a,b){return ui(2048,8,a,b)}function wi(a,b){return ui(4,2,a,b)}function xi(a,b){return ui(4,4,a,b)} +function yi(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function zi(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ui(4,4,yi.bind(null,b,a),c)}function Ai(){}function Bi(a,b){var c=di();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Wh(b,d[1]))return d[0];c.memoizedState=[a,b];return a} +function Ci(a,b){var c=di();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Wh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Di(a,b,c){if(0===(Rh&21))return a.baseState&&(a.baseState=!1,Ug=!0),a.memoizedState=c;He(c,b)||(c=yc(),N.lanes|=c,hh|=c,a.baseState=!0);return b}function Ei(a,b){var c=C;C=0!==c&&4>c?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState} +function Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}} +function ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}} +function Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}} +var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308, +4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b= +ci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d, +f,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0<c&&(b+="H"+c.toString(32));b+=":"}else c=Vh++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:!1},Zh={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:fi,useRef:si,useState:function(){return fi(ei)}, +useDebugValue:Ai,useDeferredValue:function(a){var b=di();return Di(b,O.memoizedState,a)},useTransition:function(){var a=fi(ei)[0],b=di().memoizedState;return[a,b]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1},$h={readContext:Vg,useCallback:Bi,useContext:Vg,useEffect:ji,useImperativeHandle:zi,useInsertionEffect:wi,useLayoutEffect:xi,useMemo:Ci,useReducer:gi,useRef:si,useState:function(){return gi(ei)},useDebugValue:Ai,useDeferredValue:function(a){var b=di();return null=== +O?b.memoizedState=a:Di(b,O.memoizedState,a)},useTransition:function(){var a=gi(ei)[0],b=di().memoizedState;return[a,b]},useMutableSource:hi,useSyncExternalStore:ii,useId:Fi,unstable_isNewReconciler:!1};function Ki(a,b){try{var c="",d=b;do c+=Pa(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}}function Li(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}} +function Mi(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Ni="function"===typeof WeakMap?WeakMap:Map;function Oi(a,b,c){c=ch(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Pi||(Pi=!0,Qi=d);Mi(a,b)};return c} +function Ri(a,b,c){c=ch(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};c.callback=function(){Mi(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){Mi(a,b);"function"!==typeof d&&(null===Si?Si=new Set([this]):Si.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c} +function Ti(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new Ni;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=Ui.bind(null,a,b,c),b.then(a,a))}function Vi(a){do{var b;if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?!0:!1:!0;if(b)return a;a=a.return}while(null!==a);return null} +function Wi(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=ch(-1,1),b.tag=2,dh(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}var Xi=ua.ReactCurrentOwner,Ug=!1;function Yi(a,b,c,d){b.child=null===a?Ch(b,null,c,d):Bh(b,a.child,c,d)} +function Zi(a,b,c,d,e){c=c.render;var f=b.ref;Tg(b,e);d=Xh(a,b,c,d,f,e);c=bi();if(null!==a&&!Ug)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,$i(a,b,e);I&&c&&vg(b);b.flags|=1;Yi(a,b,d,e);return b.child} +function aj(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!bj(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,cj(a,b,f,d,e);a=yh(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:Ie;if(c(g,d)&&a.ref===b.ref)return $i(a,b,e)}b.flags|=1;a=wh(f,d);a.ref=b.ref;a.return=b;return b.child=a} +function cj(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(Ie(f,d)&&a.ref===b.ref)if(Ug=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(Ug=!0);else return b.lanes=a.lanes,$i(a,b,e)}return dj(a,b,c,d,e)} +function ej(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(fj,gj),gj|=c;else{if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,G(fj,gj),gj|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;G(fj,gj);gj|=d}else null!== +f?(d=f.baseLanes|c,b.memoizedState=null):d=c,G(fj,gj),gj|=d;Yi(a,b,e,c);return b.child}function hj(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function dj(a,b,c,d,e){var f=Zf(c)?Xf:H.current;f=Yf(b,f);Tg(b,e);c=Xh(a,b,c,d,f,e);d=bi();if(null!==a&&!Ug)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,$i(a,b,e);I&&d&&vg(b);b.flags|=1;Yi(a,b,c,e);return b.child} +function ij(a,b,c,d,e){if(Zf(c)){var f=!0;cg(b)}else f=!1;Tg(b,e);if(null===b.stateNode)jj(a,b),ph(b,c,d),rh(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=Vg(l):(l=Zf(c)?Xf:H.current,l=Yf(b,l));var m=c.getDerivedStateFromProps,q="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps|| +(h!==d||k!==l)&&qh(b,g,d,l);$g=!1;var r=b.memoizedState;g.state=r;gh(b,d,g,e);k=b.memoizedState;h!==d||r!==k||Wf.current||$g?("function"===typeof m&&(kh(b,c,m,d),k=b.memoizedState),(h=$g||oh(b,c,h,d,r,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)): +("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;bh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:Lg(b.type,h);g.props=l;q=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=Vg(k):(k=Zf(c)?Xf:H.current,k=Yf(b,k));var y=c.getDerivedStateFromProps;(m="function"===typeof y||"function"===typeof g.getSnapshotBeforeUpdate)|| +"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==q||r!==k)&&qh(b,g,d,k);$g=!1;r=b.memoizedState;g.state=r;gh(b,d,g,e);var n=b.memoizedState;h!==q||r!==n||Wf.current||$g?("function"===typeof y&&(kh(b,c,y,d),n=b.memoizedState),(l=$g||oh(b,c,l,d,r,n,k)||!1)?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,n,k),"function"===typeof g.UNSAFE_componentWillUpdate&& +g.UNSAFE_componentWillUpdate(d,n,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=n),g.props=d,g.state=n,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r=== +a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=!1)}return kj(a,b,c,d,f,e)} +function kj(a,b,c,d,e,f){hj(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&dg(b,c,!1),$i(a,b,f);d=b.stateNode;Xi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Bh(b,a.child,null,f),b.child=Bh(b,null,h,f)):Yi(a,b,h,f);b.memoizedState=d.state;e&&dg(b,c,!0);return b.child}function lj(a){var b=a.stateNode;b.pendingContext?ag(a,b.pendingContext,b.pendingContext!==b.context):b.context&&ag(a,b.context,!1);Ih(a,b.containerInfo)} +function mj(a,b,c,d,e){Ig();Jg(e);b.flags|=256;Yi(a,b,c,d);return b.child}var nj={dehydrated:null,treeContext:null,retryLane:0};function oj(a){return{baseLanes:a,cachePool:null,transitions:null}} +function pj(a,b,c){var d=b.pendingProps,e=M.current,f=!1,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?!1:0!==(e&2));if(h)f=!0,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;G(M,e&1);if(null===a){Eg(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==f?(f.childLanes=0,f.pendingProps= +g):f=qj(g,d,0,null),a=Ah(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=oj(c),b.memoizedState=nj,a):rj(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return sj(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=wh(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=wh(h,f):(f=Ah(f,g,c,null),f.flags|=2);f.return= +b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?oj(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=nj;return d}f=a.child;a=f.sibling;d=wh(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d} +function rj(a,b){b=qj({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function tj(a,b,c,d){null!==d&&Jg(d);Bh(b,a.child,null,c);a=rj(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a} +function sj(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=Li(Error(p(422))),tj(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=qj({mode:"visible",children:d.children},e,0,null);f=Ah(f,e,g,null);f.flags|=2;d.return=b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Bh(b,a.child,null,g);b.child.memoizedState=oj(g);b.memoizedState=nj;return f}if(0===(b.mode&1))return tj(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset; +if(d)var h=d.dgst;d=h;f=Error(p(419));d=Li(f,d,void 0);return tj(a,b,g,d)}h=0!==(g&a.childLanes);if(Ug||h){d=R;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=32;break;case 536870912:e=268435456;break;default:e=0}e=0!==(e&(d.suspendedLanes|g))?0:e; +0!==e&&e!==f.retryLane&&(f.retryLane=e,Zg(a,e),mh(d,a,e,-1))}uj();d=Li(Error(p(421)));return tj(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=vj.bind(null,a),e._reactRetry=b,null;a=f.treeContext;yg=Lf(e.nextSibling);xg=b;I=!0;zg=null;null!==a&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=a.id,sg=a.overflow,qg=b);b=rj(b,d.children);b.flags|=4096;return b}function wj(a,b,c){a.lanes|=b;var d=a.alternate;null!==d&&(d.lanes|=b);Sg(a.return,b,c)} +function xj(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)} +function yj(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;Yi(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&wj(a,c,b);else if(19===a.tag)wj(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}G(M,d);if(0===(b.mode&1))b.memoizedState= +null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Mh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);xj(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Mh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}xj(b,!0,c,null,f);break;case "together":xj(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child} +function jj(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function $i(a,b,c){null!==a&&(b.dependencies=a.dependencies);hh|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(p(153));if(null!==b.child){a=b.child;c=wh(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=wh(a,a.pendingProps),c.return=b;c.sibling=null}return b.child} +function zj(a,b,c){switch(b.tag){case 3:lj(b);Ig();break;case 5:Kh(b);break;case 1:Zf(b.type)&&cg(b);break;case 4:Ih(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;G(Mg,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return G(M,M.current&1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return pj(a,b,c);G(M,M.current&1);a=$i(a,b,c);return null!==a?a.sibling:null}G(M,M.current&1);break;case 19:d=0!==(c& +b.childLanes);if(0!==(a.flags&128)){if(d)return yj(a,b,c);b.flags|=128}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);G(M,M.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,ej(a,b,c)}return $i(a,b,c)}var Aj,Bj,Cj,Dj; +Aj=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Bj=function(){}; +Cj=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;Hh(Eh.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "select":e=A({},e,{value:void 0});d=A({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=Bf)}ub(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===l){var h=e[l];for(g in h)h.hasOwnProperty(g)&& +(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ea.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l, +c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ea.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&D("scroll",a),f||h===k||(f=[])):(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",c);var l=f;if(b.updateQueue=l)b.flags|=4}};Dj=function(a,b,c,d){c!==d&&(b.flags|=4)}; +function Ej(a,b){if(!I)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}} +function S(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b} +function Fj(a,b,c){var d=b.pendingProps;wg(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(b),null;case 1:return Zf(b.type)&&$f(),S(b),null;case 3:d=b.stateNode;Jh();E(Wf);E(H);Oh();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)Gg(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&256)||(b.flags|=1024,null!==zg&&(Gj(zg),zg=null));Bj(a,b);S(b);return null;case 5:Lh(b);var e=Hh(Gh.current); +c=b.type;if(null!==a&&null!=b.stateNode)Cj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else{if(!d){if(null===b.stateNode)throw Error(p(166));S(b);return null}a=Hh(Eh.current);if(Gg(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Of]=b;d[Pf]=f;a=0!==(b.mode&1);switch(c){case "dialog":D("cancel",d);D("close",d);break;case "iframe":case "object":case "embed":D("load",d);break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],d);break;case "source":D("error",d);break;case "img":case "image":case "link":D("error", +d);D("load",d);break;case "details":D("toggle",d);break;case "input":Za(d,f);D("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};D("invalid",d);break;case "textarea":hb(d,f),D("invalid",d)}ub(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(!0!==f.suppressHydrationWarning&&Af(d.textContent, +h,a),e=["children",""+h]):ea.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&D("scroll",d)}switch(c){case "input":Va(d);db(d,f,!0);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Bf)}d=e;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=kb(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)): +"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case "dialog":D("cancel",a);D("close",a);e=d;break;case "iframe":case "object":case "embed":D("load",a);e=d;break;case "video":case "audio":for(e=0;e<lf.length;e++)D(lf[e],a);e=d;break;case "source":D("error",a);e=d;break;case "img":case "image":case "link":D("error", +a);D("load",a);e=d;break;case "details":D("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);D("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=A({},d,{value:void 0});D("invalid",a);break;case "textarea":hb(a,d);e=gb(a,d);D("invalid",a);break;default:e=d}ub(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?sb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&nb(a,k)):"children"===f?"string"===typeof k?("textarea"!== +c||""!==k)&&ob(a,k):"number"===typeof k&&ob(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ea.hasOwnProperty(f)?null!=k&&"onScroll"===f&&D("scroll",a):null!=k&&ta(a,f,k,g))}switch(c){case "input":Va(a);db(a,d,!1);break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue, +!0);break;default:"function"===typeof e.onClick&&(a.onclick=Bf)}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=!0;break a;default:d=!1}}d&&(b.flags|=4)}null!==b.ref&&(b.flags|=512,b.flags|=2097152)}S(b);return null;case 6:if(a&&null!=b.stateNode)Dj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(p(166));c=Hh(Gh.current);Hh(Eh.current);if(Gg(b)){d=b.stateNode;c=b.memoizedProps;d[Of]=b;if(f=d.nodeValue!==c)if(a= +xg,null!==a)switch(a.tag){case 3:Af(d.nodeValue,c,0!==(a.mode&1));break;case 5:!0!==a.memoizedProps.suppressHydrationWarning&&Af(d.nodeValue,c,0!==(a.mode&1))}f&&(b.flags|=4)}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Of]=b,b.stateNode=d}S(b);return null;case 13:E(M);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(I&&null!==yg&&0!==(b.mode&1)&&0===(b.flags&128))Hg(),Ig(),b.flags|=98560,f=!1;else if(f=Gg(b),null!==d&&null!==d.dehydrated){if(null=== +a){if(!f)throw Error(p(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(p(317));f[Of]=b}else Ig(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;S(b);f=!1}else null!==zg&&(Gj(zg),zg=null),f=!0;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(M.current&1)?0===T&&(T=3):uj()));null!==b.updateQueue&&(b.flags|=4);S(b);return null;case 4:return Jh(), +Bj(a,b),null===a&&sf(b.stateNode.containerInfo),S(b),null;case 10:return Rg(b.type._context),S(b),null;case 17:return Zf(b.type)&&$f(),S(b),null;case 19:E(M);f=b.memoizedState;if(null===f)return S(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Ej(f,!1);else{if(0!==T||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=Mh(a);if(null!==g){b.flags|=128;Ej(f,!1);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066, +g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;G(M,M.current&1|2);return b.child}a= +a.sibling}null!==f.tail&&B()>Hj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering= +b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));} +function Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(), +null;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1; +function Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+= +q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break; +case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n} +function Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}} +function Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag} +function Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}} +function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling} +function Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling} +function ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0; +Zj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!== +c.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}} +function dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:X=h.stateNode;Yj=!1;break a;case 3:X=h.stateNode.containerInfo;Yj=!0;break a;case 4:X=h.stateNode.containerInfo;Yj=!0;break a}h=h.return}if(null===X)throw Error(p(160));ak(f,g,e);X=null;Yj=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(l){W(e,b,l)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)ek(b,a),b=b.sibling} +function ek(a,b){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:dk(b,a);fk(a);if(d&4){try{Qj(3,a,a.return),Rj(3,a)}catch(t){W(a,a.return,t)}try{Qj(5,a,a.return)}catch(t){W(a,a.return,t)}}break;case 1:dk(b,a);fk(a);d&512&&null!==c&&Mj(c,c.return);break;case 5:dk(b,a);fk(a);d&512&&null!==c&&Mj(c,c.return);if(a.flags&32){var e=a.stateNode;try{ob(e,"")}catch(t){W(a,a.return,t)}}if(d&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==c?c.memoizedProps:f,h=a.type,k=a.updateQueue; +a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&ab(e,f);vb(h,g);var l=vb(h,f);for(g=0;g<k.length;g+=2){var m=k[g],q=k[g+1];"style"===m?sb(e,q):"dangerouslySetInnerHTML"===m?nb(e,q):"children"===m?ob(e,q):ta(e,m,q,l)}switch(h){case "input":bb(e,f);break;case "textarea":ib(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var y=f.value;null!=y?fb(e,!!f.multiple,y,!1):r!==!!f.multiple&&(null!=f.defaultValue?fb(e,!!f.multiple, +f.defaultValue,!0):fb(e,!!f.multiple,f.multiple?[]:"",!1))}e[Pf]=f}catch(t){W(a,a.return,t)}}break;case 6:dk(b,a);fk(a);if(d&4){if(null===a.stateNode)throw Error(p(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f}catch(t){W(a,a.return,t)}}break;case 3:dk(b,a);fk(a);if(d&4&&null!==c&&c.memoizedState.isDehydrated)try{bd(b.containerInfo)}catch(t){W(a,a.return,t)}break;case 4:dk(b,a);fk(a);break;case 13:dk(b,a);fk(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f|| +null!==e.alternate&&null!==e.alternate.memoizedState||(gk=B()));d&4&&bk(a);break;case 22:m=null!==c&&null!==c.memoizedState;a.mode&1?(U=(l=U)||m,dk(b,a),U=l):dk(b,a);fk(a);if(d&8192){l=null!==a.memoizedState;if((a.stateNode.isHidden=l)&&!m&&0!==(a.mode&1))for(V=a,m=a.child;null!==m;){for(q=V=m;null!==V;){r=V;y=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Qj(4,r,r.return);break;case 1:Mj(r,r.return);var n=r.stateNode;if("function"===typeof n.componentWillUnmount){d=r;c=r.return;try{b=d,n.props= +b.memoizedProps,n.state=b.memoizedState,n.componentWillUnmount()}catch(t){W(d,c,t)}}break;case 5:Mj(r,r.return);break;case 22:if(null!==r.memoizedState){hk(q);continue}}null!==y?(y.return=r,V=y):hk(q)}m=m.sibling}a:for(m=null,q=a;;){if(5===q.tag){if(null===m){m=q;try{e=q.stateNode,l?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=q.stateNode,k=q.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display= +rb("display",g))}catch(t){W(a,a.return,t)}}}else if(6===q.tag){if(null===m)try{q.stateNode.nodeValue=l?"":q.memoizedProps}catch(t){W(a,a.return,t)}}else if((22!==q.tag&&23!==q.tag||null===q.memoizedState||q===a)&&null!==q.child){q.child.return=q;q=q.child;continue}if(q===a)break a;for(;null===q.sibling;){if(null===q.return||q.return===a)break a;m===q&&(m=null);q=q.return}m===q&&(m=null);q.sibling.return=q.return;q=q.sibling}}break;case 19:dk(b,a);fk(a);d&4&&bk(a);break;case 21:break;default:dk(b, +a),fk(a)}}function fk(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Uj(c)){var d=c;break a}c=c.return}throw Error(p(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(ob(e,""),d.flags&=-33);var f=Vj(a);Xj(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Vj(a);Wj(a,h,g);break;default:throw Error(p(161));}}catch(k){W(a,a.return,k)}a.flags&=-3}b&4096&&(a.flags&=-4097)}function ik(a,b,c){V=a;jk(a,b,c)} +function jk(a,b,c){for(var d=0!==(a.mode&1);null!==V;){var e=V,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Kj;if(!g){var h=e.alternate,k=null!==h&&null!==h.memoizedState||U;h=Kj;var l=U;Kj=g;if((U=k)&&!l)for(V=e;null!==V;)g=V,k=g.child,22===g.tag&&null!==g.memoizedState?kk(e):null!==k?(k.return=g,V=k):kk(e);for(;null!==f;)V=f,jk(f,b,c),f=f.sibling;V=e;Kj=h;U=l}lk(a,b,c)}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,V=f):lk(a,b,c)}} +function lk(a){for(;null!==V;){var b=V;if(0!==(b.flags&8772)){var c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:U||Rj(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!U)if(null===c)d.componentDidMount();else{var e=b.elementType===b.type?c.memoizedProps:Lg(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var f=b.updateQueue;null!==f&&ih(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c= +b.child.stateNode;break;case 1:c=b.child.stateNode}ih(b,g,c)}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&c.focus();break;case "img":k.src&&(c.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var l=b.alternate;if(null!==l){var m=l.memoizedState;if(null!==m){var q=m.dehydrated;null!==q&&bd(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break; +default:throw Error(p(163));}U||b.flags&512&&Sj(b)}catch(r){W(b,b.return,r)}}if(b===a){V=null;break}c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}}function hk(a){for(;null!==V;){var b=V;if(b===a){V=null;break}var c=b.sibling;if(null!==c){c.return=b.return;V=c;break}V=b.return}} +function kk(a){for(;null!==V;){var b=V;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Rj(4,b)}catch(k){W(b,c,k)}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount()}catch(k){W(b,e,k)}}var f=b.return;try{Sj(b)}catch(k){W(b,f,k)}break;case 5:var g=b.return;try{Sj(b)}catch(k){W(b,g,k)}}}catch(k){W(b,b.return,k)}if(b===a){V=null;break}var h=b.sibling;if(null!==h){h.return=b.return;V=h;break}V=b.return}} +var mk=Math.ceil,nk=ua.ReactCurrentDispatcher,ok=ua.ReactCurrentOwner,pk=ua.ReactCurrentBatchConfig,K=0,R=null,Y=null,Z=0,gj=0,fj=Uf(0),T=0,qk=null,hh=0,rk=0,sk=0,tk=null,uk=null,gk=0,Hj=Infinity,vk=null,Pi=!1,Qi=null,Si=null,wk=!1,xk=null,yk=0,zk=0,Ak=null,Bk=-1,Ck=0;function L(){return 0!==(K&6)?B():-1!==Bk?Bk:Bk=B()} +function lh(a){if(0===(a.mode&1))return 1;if(0!==(K&2)&&0!==Z)return Z&-Z;if(null!==Kg.transition)return 0===Ck&&(Ck=yc()),Ck;a=C;if(0!==a)return a;a=window.event;a=void 0===a?16:jd(a.type);return a}function mh(a,b,c,d){if(50<zk)throw zk=0,Ak=null,Error(p(185));Ac(a,c,d);if(0===(K&2)||a!==R)a===R&&(0===(K&2)&&(rk|=c),4===T&&Dk(a,Z)),Ek(a,d),1===c&&0===K&&0===(b.mode&1)&&(Hj=B()+500,fg&&jg())} +function Ek(a,b){var c=a.callbackNode;wc(a,b);var d=uc(a,a===R?Z:0);if(0===d)null!==c&&bc(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&bc(c);if(1===b)0===a.tag?ig(Fk.bind(null,a)):hg(Fk.bind(null,a)),Jf(function(){0===(K&6)&&jg()}),c=null;else{switch(Dc(d)){case 1:c=fc;break;case 4:c=gc;break;case 16:c=hc;break;case 536870912:c=jc;break;default:c=hc}c=Gk(c,Hk.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}} +function Hk(a,b){Bk=-1;Ck=0;if(0!==(K&6))throw Error(p(327));var c=a.callbackNode;if(Ik()&&a.callbackNode!==c)return null;var d=uc(a,a===R?Z:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Jk(a,d);else{b=d;var e=K;K|=2;var f=Kk();if(R!==a||Z!==b)vk=null,Hj=B()+500,Lk(a,b);do try{Mk();break}catch(h){Nk(a,h)}while(1);Qg();nk.current=f;K=e;null!==Y?b=0:(R=null,Z=0,b=T)}if(0!==b){2===b&&(e=xc(a),0!==e&&(d=e,b=Ok(a,e)));if(1===b)throw c=qk,Lk(a,0),Dk(a,d),Ek(a,B()),c;if(6===b)Dk(a,d); +else{e=a.current.alternate;if(0===(d&30)&&!Pk(e)&&(b=Jk(a,d),2===b&&(f=xc(a),0!==f&&(d=f,b=Ok(a,f))),1===b))throw c=qk,Lk(a,0),Dk(a,d),Ek(a,B()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(p(345));case 2:Qk(a,uk,vk);break;case 3:Dk(a,d);if((d&130023424)===d&&(b=gk+500-B(),10<b)){if(0!==uc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){L();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Ff(Qk.bind(null,a,uk,vk),b);break}Qk(a,uk,vk);break;case 4:Dk(a,d);if((d&4194240)=== +d)break;b=a.eventTimes;for(e=-1;0<d;){var g=31-oc(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10<d){a.timeoutHandle=Ff(Qk.bind(null,a,uk,vk),d);break}Qk(a,uk,vk);break;case 5:Qk(a,uk,vk);break;default:throw Error(p(329));}}}Ek(a,B());return a.callbackNode===c?Hk.bind(null,a):null} +function Ok(a,b){var c=tk;a.current.memoizedState.isDehydrated&&(Lk(a,b).flags|=256);a=Jk(a,b);2!==a&&(b=uk,uk=c,null!==b&&Gj(b));return a}function Gj(a){null===uk?uk=a:uk.push.apply(uk,a)} +function Pk(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!He(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0} +function Dk(a,b){b&=~sk;b&=~rk;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-oc(b),d=1<<c;a[c]=-1;b&=~d}}function Fk(a){if(0!==(K&6))throw Error(p(327));Ik();var b=uc(a,0);if(0===(b&1))return Ek(a,B()),null;var c=Jk(a,b);if(0!==a.tag&&2===c){var d=xc(a);0!==d&&(b=d,c=Ok(a,d))}if(1===c)throw c=qk,Lk(a,0),Dk(a,b),Ek(a,B()),c;if(6===c)throw Error(p(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;Qk(a,uk,vk);Ek(a,B());return null} +function Rk(a,b){var c=K;K|=1;try{return a(b)}finally{K=c,0===K&&(Hj=B()+500,fg&&jg())}}function Sk(a){null!==xk&&0===xk.tag&&0===(K&6)&&Ik();var b=K;K|=1;var c=pk.transition,d=C;try{if(pk.transition=null,C=1,a)return a()}finally{C=d,pk.transition=c,K=b,0===(K&6)&&jg()}}function Ij(){gj=fj.current;E(fj)} +function Lk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Gf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;wg(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&$f();break;case 3:Jh();E(Wf);E(H);Oh();break;case 5:Lh(d);break;case 4:Jh();break;case 13:E(M);break;case 19:E(M);break;case 10:Rg(d.type._context);break;case 22:case 23:Ij()}c=c.return}R=a;Y=a=wh(a.current,null);Z=gj=b;T=0;qk=null;sk=rk=hh=0;uk=tk=null;if(null!==Wg){for(b= +0;b<Wg.length;b++)if(c=Wg[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g}c.pending=d}Wg=null}return a} +function Nk(a,b){do{var c=Y;try{Qg();Ph.current=ai;if(Sh){for(var d=N.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Sh=!1}Rh=0;P=O=N=null;Th=!1;Uh=0;ok.current=null;if(null===c||null===c.return){T=1;qk=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=Z;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k,m=h,q=m.tag;if(0===(m.mode&1)&&(0===q||11===q||15===q)){var r=m.alternate;r?(m.updateQueue=r.updateQueue,m.memoizedState=r.memoizedState, +m.lanes=r.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=Vi(g);if(null!==y){y.flags&=-257;Wi(y,g,h,f,b);y.mode&1&&Ti(f,l,b);b=y;k=l;var n=b.updateQueue;if(null===n){var t=new Set;t.add(k);b.updateQueue=t}else n.add(k);break a}else{if(0===(b&1)){Ti(f,l,b);uj();break a}k=Error(p(426))}}else if(I&&h.mode&1){var J=Vi(g);if(null!==J){0===(J.flags&65536)&&(J.flags|=256);Wi(J,g,h,f,b);Jg(Ki(k,h));break a}}f=k=Ki(k,h);4!==T&&(T=2);null===tk?tk=[f]:tk.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536; +b&=-b;f.lanes|=b;var x=Oi(f,k,b);fh(f,x);break a;case 1:h=k;var w=f.type,u=f.stateNode;if(0===(f.flags&128)&&("function"===typeof w.getDerivedStateFromError||null!==u&&"function"===typeof u.componentDidCatch&&(null===Si||!Si.has(u)))){f.flags|=65536;b&=-b;f.lanes|=b;var F=Ri(f,h,b);fh(f,F);break a}}f=f.return}while(null!==f)}Tk(c)}catch(na){b=na;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}function Kk(){var a=nk.current;nk.current=ai;return null===a?ai:a} +function uj(){if(0===T||3===T||2===T)T=4;null===R||0===(hh&268435455)&&0===(rk&268435455)||Dk(R,Z)}function Jk(a,b){var c=K;K|=2;var d=Kk();if(R!==a||Z!==b)vk=null,Lk(a,b);do try{Uk();break}catch(e){Nk(a,e)}while(1);Qg();K=c;nk.current=d;if(null!==Y)throw Error(p(261));R=null;Z=0;return T}function Uk(){for(;null!==Y;)Vk(Y)}function Mk(){for(;null!==Y&&!cc();)Vk(Y)}function Vk(a){var b=Wk(a.alternate,a,gj);a.memoizedProps=a.pendingProps;null===b?Tk(a):Y=b;ok.current=null} +function Tk(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=Fj(c,b,gj),null!==c){Y=c;return}}else{c=Jj(c,b);if(null!==c){c.flags&=32767;Y=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{T=6;Y=null;return}}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===T&&(T=5)}function Qk(a,b,c){var d=C,e=pk.transition;try{pk.transition=null,C=1,Xk(a,b,c,d)}finally{pk.transition=e,C=d}return null} +function Xk(a,b,c,d){do Ik();while(null!==xk);if(0!==(K&6))throw Error(p(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(p(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;Bc(a,f);a===R&&(Y=R=null,Z=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||wk||(wk=!0,Gk(hc,function(){Ik();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=pk.transition;pk.transition=null; +var g=C;C=1;var h=K;K|=4;ok.current=null;Pj(a,c);ek(c,a);Oe(Df);dd=!!Cf;Df=Cf=null;a.current=c;ik(c,a,e);dc();K=h;C=g;pk.transition=f}else a.current=c;wk&&(wk=!1,xk=a,yk=e);f=a.pendingLanes;0===f&&(Si=null);mc(c.stateNode,d);Ek(a,B());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Pi)throw Pi=!1,a=Qi,Qi=null,a;0!==(yk&1)&&0!==a.tag&&Ik();f=a.pendingLanes;0!==(f&1)?a===Ak?zk++:(zk=0,Ak=a):zk=0;jg();return null} +function Ik(){if(null!==xk){var a=Dc(yk),b=pk.transition,c=C;try{pk.transition=null;C=16>a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var l=h[k];for(V=l;null!==V;){var m=V;switch(m.tag){case 0:case 11:case 15:Qj(8,m,f)}var q=m.child;if(null!==q)q.return=m,V=q;else for(;null!==V;){m=V;var r=m.sibling,y=m.return;Tj(m);if(m=== +l){V=null;break}if(null!==r){r.return=y;V=r;break}V=y}}}var n=f.alternate;if(null!==n){var t=n.child;if(null!==t){n.child=null;do{var J=t.sibling;t.sibling=null;t=J}while(null!==t)}}V=f}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,V=g;else b:for(;null!==V;){f=V;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Qj(9,f,f.return)}var x=f.sibling;if(null!==x){x.return=f.return;V=x;break b}V=f.return}}var w=a.current;for(V=w;null!==V;){g=V;var u=g.child;if(0!==(g.subtreeFlags&2064)&&null!== +u)u.return=g,V=u;else b:for(g=w;null!==V;){h=V;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Rj(9,h)}}catch(na){W(h,h.return,na)}if(h===g){V=null;break b}var F=h.sibling;if(null!==F){F.return=h.return;V=F;break b}V=h.return}}K=e;jg();if(lc&&"function"===typeof lc.onPostCommitFiberRoot)try{lc.onPostCommitFiberRoot(kc,a)}catch(na){}d=!0}return d}finally{C=c,pk.transition=b}}return!1}function Yk(a,b,c){b=Ki(c,b);b=Oi(a,b,1);a=dh(a,b,1);b=L();null!==a&&(Ac(a,1,b),Ek(a,b))} +function W(a,b,c){if(3===a.tag)Yk(a,a,c);else for(;null!==b;){if(3===b.tag){Yk(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Si||!Si.has(d))){a=Ki(c,a);a=Ri(b,a,1);b=dh(b,a,1);a=L();null!==b&&(Ac(b,1,a),Ek(b,a));break}}b=b.return}} +function Ui(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=L();a.pingedLanes|=a.suspendedLanes&c;R===a&&(Z&c)===c&&(4===T||3===T&&(Z&130023424)===Z&&500>B()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)} +function ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk; +Wk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue= +null,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306, +d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState= +f,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32), +hj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps; +g=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return, +c,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c), +b.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)} +function al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)} +function $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2} +function wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext}; +c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c} +function yh(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11; +break a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a} +function zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b} +function bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData= +null}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}} +function el(a){if(!a)return Vf;a=a._reactInternals;a:{if(Vb(a)!==a||1!==a.tag)throw Error(p(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(Zf(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(p(171));}if(1===a.tag){var c=a.type;if(Zf(c))return bg(a,c,b)}return b} +function fl(a,b,c,d,e,f,g,h,k){a=cl(c,d,!0,a,e,f,g,h,k);a.context=el(null);c=a.current;d=L();e=lh(c);f=ch(d,e);f.callback=void 0!==b&&null!==b?b:null;dh(c,f,e);a.current.lanes=e;Ac(a,e,d);Ek(a,d);return a}function gl(a,b,c,d){var e=b.current,f=L(),g=lh(e);c=el(c);null===b.context?b.context=c:b.pendingContext=c;b=ch(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=dh(e,b,g);null!==a&&(mh(a,e,g,f),eh(a,e,g));return g} +function hl(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function il(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function jl(a,b){il(a,b);(a=a.alternate)&&il(a,b)}function kl(){return null}var ll="function"===typeof reportError?reportError:function(a){console.error(a)};function ml(a){this._internalRoot=a} +nl.prototype.render=ml.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(p(409));gl(a,b,null,null)};nl.prototype.unmount=ml.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;Sk(function(){gl(null,a,null,null)});b[uf]=null}};function nl(a){this._internalRoot=a} +nl.prototype.unstable_scheduleHydration=function(a){if(a){var b=Hc();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Qc.length&&0!==b&&b<Qc[c].priority;c++);Qc.splice(c,0,a);0===c&&Vc(a)}};function ol(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType)}function pl(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ql(){} +function rl(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=hl(g);f.call(a)}}var g=fl(b,d,a,0,null,!1,!1,"",ql);a._reactRootContainer=g;a[uf]=g.current;sf(8===a.nodeType?a.parentNode:a);Sk();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=hl(k);h.call(a)}}var k=cl(a,0,!1,null,null,!1,!1,"",ql);a._reactRootContainer=k;a[uf]=k.current;sf(8===a.nodeType?a.parentNode:a);Sk(function(){gl(b,k,c,d)});return k} +function sl(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=hl(g);h.call(a)}}gl(b,g,a,e)}else g=rl(c,b,a,e,d);return hl(g)}Ec=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=tc(b.pendingLanes);0!==c&&(Cc(b,c|1),Ek(b,B()),0===(K&6)&&(Hj=B()+500,jg()))}break;case 13:Sk(function(){var b=Zg(a,1);if(null!==b){var c=L();mh(b,a,1,c)}}),jl(a,1)}}; +Fc=function(a){if(13===a.tag){var b=Zg(a,134217728);if(null!==b){var c=L();mh(b,a,134217728,c)}jl(a,134217728)}};Gc=function(a){if(13===a.tag){var b=lh(a),c=Zg(a,b);if(null!==c){var d=L();mh(c,a,b,d)}jl(a,b)}};Hc=function(){return C};Ic=function(a,b){var c=C;try{return C=a,b()}finally{C=c}}; +yb=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(p(90));Wa(d);bb(d,e)}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Rk;Hb=Sk; +var tl={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Rk]},ul={findFiberByHostInstance:Wc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"}; +var vl={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Zb(a);return null===a?null:a.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance|| +kl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wl.isDisabled&&wl.supportsFiber)try{kc=wl.inject(vl),lc=wl}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tl; +exports.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ol(b))throw Error(p(200));return dl(a,b,null,c)};exports.createRoot=function(a,b){if(!ol(a))throw Error(p(299));var c=!1,d="",e=ll;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=cl(a,1,!1,null,null,c,!1,d,e);a[uf]=b.current;sf(8===a.nodeType?a.parentNode:a);return new ml(b)}; +exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(p(188));a=Object.keys(a).join(",");throw Error(p(268,a));}a=Zb(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a){return Sk(a)};exports.hydrate=function(a,b,c){if(!pl(b))throw Error(p(200));return sl(null,a,b,!0,c)}; +exports.hydrateRoot=function(a,b,c){if(!ol(a))throw Error(p(405));var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=ll;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=fl(b,null,a,1,null!=c?c:null,e,!1,f,g);a[uf]=b.current;sf(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c, +e);return new nl(b)};exports.render=function(a,b,c){if(!pl(b))throw Error(p(200));return sl(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!pl(a))throw Error(p(40));return a._reactRootContainer?(Sk(function(){sl(null,null,a,!1,function(){a._reactRootContainer=null;a[uf]=null})}),!0):!1};exports.unstable_batchedUpdates=Rk; +exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!pl(c))throw Error(p(200));if(null==a||void 0===a._reactInternals)throw Error(p(38));return sl(a,b,c,!1,d)};exports.version="18.2.0-next-9e3b772b8-20220608"; + + +/***/ }), + +/***/ "W24B": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createSpacing; }); +/* harmony import */ var _material_ui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XsxL"); + +var warnOnce; +function createSpacing() { + var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8; + + // Already transformed. + if (spacingInput.mui) { + return spacingInput; + } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout. + // Smaller components, such as icons and type, can align to a 4dp grid. + // https://material.io/design/layout/understanding-layout.html#usage + + + var transform = Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__["createUnarySpacing"])({ + spacing: spacingInput + }); + + var spacing = function spacing() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (false) {} + + if (args.length === 0) { + return transform(1); + } + + if (args.length === 1) { + return transform(args[0]); + } + + return args.map(function (argument) { + if (typeof argument === 'string') { + return argument; + } + + var output = transform(argument); + return typeof output === 'number' ? "".concat(output, "px") : output; + }).join(' '); + }; // Backward compatibility, to remove in v5. + + + Object.defineProperty(spacing, 'unit', { + get: function get() { + if (false) {} + + return spacingInput; + } + }); + spacing.mui = true; + return spacing; +} + +/***/ }), + +/***/ "W53A": +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__("ETne").document; +module.exports = document && document.documentElement; + + +/***/ }), + +/***/ "W6oR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var aFunction = __webpack_require__("TQc+"); +var toObject = __webpack_require__("05TQ"); +var fails = __webpack_require__("enc5"); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !__webpack_require__("QLBk")($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + + +/***/ }), + +/***/ "WAdv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getAppAttestationFromStore = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +/** + * Retrieve the app's attestation from the app's store + * /!\ This is a mock implementation that should never be called + * + * @param {string} nonce - the Nonce string retrieved from the stack + * @param {import("./typedefs").CertificationConfig} certificationConfig - Configuration to access the stores certification API + * @returns {Promise<import("./typedefs").AttestationResult>} the app's attestation + */ +var validateAppMock = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(nonce, certificationConfig) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + throw new Error("getAppAttestationFromStore can only be called from a React Native container"); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function validateAppMock(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +var getAppAttestationFromStore = validateAppMock; +exports.getAppAttestationFromStore = getAppAttestationFromStore; + +/***/ }), + +/***/ "WC1d": +/***/ (function(module, exports) { + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; + + +/***/ }), + +/***/ "WFZW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "width", function() { return width; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maxWidth", function() { return maxWidth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minWidth", function() { return minWidth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "height", function() { return height; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "maxHeight", function() { return maxHeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minHeight", function() { return minHeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sizeWidth", function() { return sizeWidth; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sizeHeight", function() { return sizeHeight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "boxSizing", function() { return boxSizing; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + + +function transform(value) { + return value <= 1 ? "".concat(value * 100, "%") : value; +} + +var width = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'width', + transform: transform +}); +var maxWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'maxWidth', + transform: transform +}); +var minWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'minWidth', + transform: transform +}); +var height = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'height', + transform: transform +}); +var maxHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'maxHeight', + transform: transform +}); +var minHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'minHeight', + transform: transform +}); +var sizeWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'size', + cssProperty: 'width', + transform: transform +}); +var sizeHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'size', + cssProperty: 'height', + transform: transform +}); +var boxSizing = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'boxSizing' +}); +var sizing = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing); +/* harmony default export */ __webpack_exports__["default"] = (sizing); + +/***/ }), + +/***/ "WHG9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); + + + + + + + +var styles = function styles(theme) { + return { + root: { + position: 'absolute', + height: 2, + bottom: 0, + width: '100%', + transition: theme.transitions.create() + }, + colorPrimary: { + backgroundColor: theme.palette.primary.main + }, + colorSecondary: { + backgroundColor: theme.palette.secondary.main + }, + vertical: { + height: '100%', + width: 2, + right: 0 + } + }; +}; +/** + * @ignore - internal component. + */ + +var TabIndicator = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TabIndicator(props, ref) { + var classes = props.classes, + className = props.className, + color = props.color, + orientation = props.orientation, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "orientation"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(color))], className, orientation === 'vertical' && classes.vertical), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'PrivateTabIndicator' +})(TabIndicator)); + +/***/ }), + +/***/ "WKSX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.7 String.prototype.fontcolor(color) +__webpack_require__("A7oe")('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + + +/***/ }), + +/***/ "WLJI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + boxSizing: 'border-box', + lineHeight: '48px', + listStyle: 'none', + color: theme.palette.text.secondary, + fontFamily: theme.typography.fontFamily, + fontWeight: theme.typography.fontWeightMedium, + fontSize: theme.typography.pxToRem(14) + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main + }, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit' + }, + + /* Styles applied to the inner `component` element if `disableGutters={false}`. */ + gutters: { + paddingLeft: 16, + paddingRight: 16 + }, + + /* Styles applied to the root element if `inset={true}`. */ + inset: { + paddingLeft: 72 + }, + + /* Styles applied to the root element if `disableSticky={false}`. */ + sticky: { + position: 'sticky', + top: 0, + zIndex: 1, + backgroundColor: 'inherit' + } + }; +}; +var ListSubheader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListSubheader(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'li' : _props$component, + _props$disableGutters = props.disableGutters, + disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, + _props$disableSticky = props.disableSticky, + disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky, + _props$inset = props.inset, + inset = _props$inset === void 0 ? false : _props$inset, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "component", "disableGutters", "disableSticky", "inset"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, color !== 'default' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiListSubheader' +})(ListSubheader)); + +/***/ }), + +/***/ "WLqI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWebviewContext", function() { return getWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); + +var SET_WEBVIEW_CONTEXT = 'SET_WEBVIEW_CONTEXT'; // selectors + +var getWebviewContext = function getWebviewContext(state) { + return state.webviewContext; +}; // actions + +var setWebviewContext = function setWebviewContext(payload) { + return { + type: SET_WEBVIEW_CONTEXT, + payload: payload + }; +}; // reducers + +var defaultState = { + webviewContext: undefined +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case SET_WEBVIEW_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + webviewContext: action.payload + }); + + default: + return state; + } +}; + +/***/ }), + +/***/ "WOYA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var orange = { + 50: '#fff3e0', + 100: '#ffe0b2', + 200: '#ffcc80', + 300: '#ffb74d', + 400: '#ffa726', + 500: '#ff9800', + 600: '#fb8c00', + 700: '#f57c00', + 800: '#ef6c00', + 900: '#e65100', + A100: '#ffd180', + A200: '#ffab40', + A400: '#ff9100', + A700: '#ff6d00' +}; +/* harmony default export */ __webpack_exports__["default"] = (orange); + +/***/ }), + +/***/ "WOzN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); +var callBound = __webpack_require__("KqZw"); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var IsArray = __webpack_require__("92Wp"); + +var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-call + +module.exports = function Call(F, V) { + var argumentsList = arguments.length > 2 ? arguments[2] : []; + if (!IsArray(argumentsList)) { + throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); + } + return $apply(F, V, argumentsList); +}; + + +/***/ }), + +/***/ "WPz0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("E8//"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'table-footer-group' + } +}; +var tablelvl2 = { + variant: 'footer' +}; +var defaultComponent = 'tfoot'; +var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableFooter(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? defaultComponent : _props$component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: tablelvl2 + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref, + role: Component === defaultComponent ? null : 'rowgroup' + }, other))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTableFooter' +})(TableFooter)); + +/***/ }), + +/***/ "WSXa": +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "WUED": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListItemAvatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bwm2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListItemAvatar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "WW2/": +/***/ (function(module, exports, __webpack_require__) { + +var apply = __webpack_require__("ZLBK"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; + + +/***/ }), + +/***/ "WWey": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Nm31"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + minWidth: 56, + color: theme.palette.action.active, + flexShrink: 0, + display: 'inline-flex' + }, + + /* Styles applied to the root element when the parent `ListItem` uses `alignItems="flex-start"`. */ + alignItemsFlexStart: { + marginTop: 8 + } + }; +}; +/** + * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`. + */ + +var ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListItemIcon(props, ref) { + var classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className"]); + + var context = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_List_ListContext__WEBPACK_IMPORTED_MODULE_6__["default"]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiListItemIcon' +})(ListItemIcon)); + +/***/ }), + +/***/ "WXXH": +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__("enc5")(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "WZRr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return toDate; }); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bKmd"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + +/** + * @name toDate + * @category Common Helpers + * @summary Convert the given argument to an instance of Date. + * + * @description + * Convert the given argument to an instance of Date. + * + * If the argument is an instance of Date, the function returns its clone. + * + * If the argument is a number, it is treated as a timestamp. + * + * If the argument is none of the above, the function returns Invalid Date. + * + * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. + * + * @param {Date|Number} argument - the value to convert + * @returns {Date} the parsed date in the local time zone + * @throws {TypeError} 1 argument required + * + * @example + * // Clone the date: + * const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Convert the timestamp to date: + * const result = toDate(1392098430000) + * //=> Tue Feb 11 2014 11:30:30 + */ + +function toDate(argument) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, arguments); + var argStr = Object.prototype.toString.call(argument); // Clone the date + + if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') { + // Prevent the date to lose the milliseconds when passed to new Date() in IE10 + return new Date(argument.getTime()); + } else if (typeof argument === 'number' || argStr === '[object Number]') { + return new Date(argument); + } else { + if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') { + // eslint-disable-next-line no-console + console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console + + console.warn(new Error().stack); + } + + return new Date(NaN); + } +} + +/***/ }), + +/***/ "WbV9": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("h99T"); +module.exports = __webpack_require__("WSXa").String.trimLeft; + + +/***/ }), + +/***/ "WjuR": +/***/ (function(module, exports) { + +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + + +/***/ }), + +/***/ "Wmhc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("kjpz"); + + + + + + + + +var styles = function styles(theme) { + var hidden = { + display: 'none' + }; + return theme.breakpoints.keys.reduce(function (acc, key) { + acc["only".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_4__["default"])(key))] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.only(key), hidden); + acc["".concat(key, "Up")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.up(key), hidden); + acc["".concat(key, "Down")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.breakpoints.down(key), hidden); + return acc; + }, {}); +}; +/** + * @ignore - internal component. + */ + + +function HiddenCss(props) { + var children = props.children, + classes = props.classes, + className = props.className, + only = props.only, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["children", "classes", "className", "only"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__["default"])(); + + if (false) { var unknownProps; } + + var clsx = []; + + if (className) { + clsx.push(className); + } + + for (var i = 0; i < theme.breakpoints.keys.length; i += 1) { + var breakpoint = theme.breakpoints.keys[i]; + var breakpointUp = props["".concat(breakpoint, "Up")]; + var breakpointDown = props["".concat(breakpoint, "Down")]; + + if (breakpointUp) { + clsx.push(classes["".concat(breakpoint, "Up")]); + } + + if (breakpointDown) { + clsx.push(classes["".concat(breakpoint, "Down")]); + } + } + + if (only) { + var onlyBreakpoints = Array.isArray(only) ? only : [only]; + onlyBreakpoints.forEach(function (breakpoint) { + clsx.push(classes["only".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_4__["default"])(breakpoint))]); + }); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: clsx.join(' ') + }, children); +} + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'PrivateHiddenCss' +})(HiddenCss)); + +/***/ }), + +/***/ "Wnee": +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__("rZ9V"), + Map = __webpack_require__("8CAL"), + MapCache = __webpack_require__("kNUc"); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; + + +/***/ }), + +/***/ "WnzN": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; + + +/***/ }), + +/***/ "Wr43": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + + +/***/ }), + +/***/ "Wsob": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/top.svg` to regenerate; + +function SvgTop(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 24 24" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M20.603 17.825a1.571 1.571 0 002.222-2.222l-9.428-9.428a1.571 1.571 0 00-2.222 0l-9.429 9.428a1.571 1.571 0 002.222 2.222l8.318-8.317 8.317 8.317z", + fillRule: "evenodd" + })); +} +var _default = SvgTop; +exports.default = _default; + +/***/ }), + +/***/ "WvZ1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerBackgroundTabDetection", function() { return registerBackgroundTabDetection; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("VjOD"); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("+2Xp"); + + + + +/** + * Add a listener that cancels and finishes a transaction when the global + * document is hidden. + */ +function registerBackgroundTabDetection() { + if (_types_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"] && _types_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].document) { + _types_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].document.addEventListener('visibilitychange', () => { + const activeTransaction = Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["getActiveTransaction"])() ; + if (_types_js__WEBPACK_IMPORTED_MODULE_2__["WINDOW"].document.hidden && activeTransaction) { + const statusType = 'cancelled'; + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log( + `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`, + ); + // We should not set status if it is already set, this prevent important statuses like + // error or data loss from being overwritten on transaction. + if (!activeTransaction.status) { + activeTransaction.setStatus(statusType); + } + activeTransaction.setTag('visibilitychange', 'document.hidden'); + activeTransaction.finish(); + } + }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('[Tracing] Could not set up background tab detection due to lack of global document'); + } +} + + +//# sourceMappingURL=backgroundtab.js.map + + +/***/ }), + +/***/ "Wysw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.themesList = void 0; + +var _qualification = __webpack_require__("DRJ+"); + +/** + * + * @param {Array<import("../../types").ItemsLabels>} labels - Array of items labels + * @returns {Array<import("../../types").QualificationAttributes>} + */ +var buildItemsByLabel = function buildItemsByLabel(labels) { + return labels.map(function (label) { + try { + return _qualification.Qualification.getByLabel(label); + } catch (e) { + console.log('error', e); // eslint-disable-line no-console + + return null; + } + }).filter(function (item) { + return item; + }); +}; +/** + * @type {Array<import("../../types").IdentityLabel>} + */ + + +var identityLabels = ['identity_photo', 'national_id_card', 'passport', 'residence_permit', 'electoral_card', 'family_record_book', 'birth_certificate', 'driver_license', 'citizen_registration_certificate', 'note_identity_document', 'other_identity_document']; +/** + * @type {Array<import("../../types").FamilyLabel>} + */ + +var familyLabels = ['family_record_book', 'birth_certificate', 'wedding', 'pacs', 'single_parent_benefit', 'divorce', 'large_family_card', 'caf', 'payment_proof_family_allowance', 'note_family_document', 'other_family_document']; +/** + * @type {Array<import("../../types").WorkStudyLabels>} + */ + +var workStudyLabels = ['diploma', 'work_contract', 'pay_sheet', 'unemployment_benefit', 'employment_center_certificate', 'pension', 'work_disability_recognition', 'gradebook', 'student_card', 'school_attendance_certificate', 'school_insurance_certificate', 'resume', 'motivation_letter', 'note_work_document', 'other_work_document']; +/** + * @type {Array<import("../../types").HealthLabels>} + */ + +var healthLabels = ['health_certificate', 'health_book', 'national_health_insurance_card', 'national_health_insurance_right_certificate', 'health_insurance_card', 'prescription', 'health_invoice', 'work_disability_recognition', 'pregnancy_medical_certificate', 'note_health_document', 'other_health_document']; +/** + * @type {Array<import("../../types").HomeLabels>} + */ + +var homeLabels = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'other_invoice', 'work_invoice', 'house_sale_agreeement', 'building_permit', 'technical_diagnostic_record', 'unfit_for_habitation_declaration', 'lease', 'rent_receipt', 'accommodation_proof', 'house_insurance', 'work_quote', 'note_house_document', 'other_house_document']; +/** + * @type {Array<import("../../types").TransportLabels>} + */ + +var transportLabels = ['driver_license', 'vehicle_registration', 'car_insurance', 'transport_card', 'mechanic_invoice', 'transport_invoice', 'note_transport_document', 'other_transport_document']; +/** + * @type {Array<import("../../types").ActivityLabels>} + */ + +var activityLabels = ['personal_sporting_licence', 'fidelity_card', 'library_card', 'note_activity_document', 'other_activity_document']; +/** + * @type {Array<import("../../types").FinanceLabels>} + */ + +var financeLabels = ['tax_return', 'tax_notice', 'tax_timetable', 'real_estate_tax', 'pay_sheet', 'receipt', 'single_parent_benefit', 'other_tax_document', 'bank_details', 'bank_statement', 'loan_agreement', 'payment_proof_family_allowance', 'note_finance', 'other_bank_document', 'other_revenue']; +/** + * @type {Array<import("../../types").InvoiceLabels>} + */ + +var invoiceLabels = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'appliance_invoice', 'web_service_invoice', 'restaurant_invoice', 'work_invoice', 'transport_invoice', 'health_invoice', 'note_invoice', 'other_invoice']; +/** + * @type {Array<import("../../types").OthersLabels>} + */ + +var othersLabels = ['other_administrative_document']; +/** + * @type {import("../../types").ThemesList} + */ + +var themesList = [{ + id: 'theme1', + label: 'identity', + icon: 'people', + items: buildItemsByLabel(identityLabels), + defaultItems: ['birth_certificate'] +}, { + id: 'theme2', + label: 'family', + icon: 'team', + items: buildItemsByLabel(familyLabels), + defaultItems: ['family_record_book'] +}, { + id: 'theme3', + label: 'work_study', + icon: 'company', + items: buildItemsByLabel(workStudyLabels) +}, { + id: 'theme4', + label: 'health', + icon: 'heart', + items: buildItemsByLabel(healthLabels) +}, { + id: 'theme5', + label: 'home', + icon: 'home', + items: buildItemsByLabel(homeLabels) +}, { + id: 'theme6', + label: 'transport', + icon: 'car', + items: buildItemsByLabel(transportLabels), + defaultItems: ['driver_license'] +}, { + id: 'theme7', + label: 'activity', + icon: 'compass', + items: buildItemsByLabel(activityLabels) +}, { + id: 'theme8', + label: 'finance', + icon: 'bank', + items: buildItemsByLabel(financeLabels) +}, { + id: 'theme9', + label: 'invoice', + icon: 'bill', + items: buildItemsByLabel(invoiceLabels) +}, { + id: 'theme10', + label: 'others', + icon: 'dots', + items: buildItemsByLabel(othersLabels) +}]; +exports.themesList = themesList; + +/***/ }), + +/***/ "X27e": +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__("Q6Yr")('keys'); +var uid = __webpack_require__("Jz0u"); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), + +/***/ "X6P4": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__("ZwQu"), + isArray = __webpack_require__("8u9v"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; + + +/***/ }), + +/***/ "X8hs": +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__("Mf+g"); + +var iterableToArray = __webpack_require__("T+E/"); + +var unsupportedIterableToArray = __webpack_require__("gbaz"); + +var nonIterableRest = __webpack_require__("gw87"); + +function _toArray(arr) { + return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); +} + +module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "XA6X": +/***/ (function(module, exports, __webpack_require__) { + +var baseSet = __webpack_require__("x0rR"); + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; + + +/***/ }), + +/***/ "XAJ7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/people.svg` to regenerate; + +function SvgPeople(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M8 9c2.21 0 4-2.015 4-4.5S10.21 0 8 0 4 2.015 4 4.5 5.79 9 8 9zm-8 5c0-1 2-4 4-4s1 1 4 1 2-1 4-1 4 3 4 4 0 2-1 2H1c-1 0-1-1-1-2z" + })); +} +var _default = SvgPeople; +exports.default = _default; + +/***/ }), + +/***/ "XF0z": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__("7wnO"); +var descriptor = __webpack_require__("nVWS"); +var setToStringTag = __webpack_require__("YoKN"); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__("XyXA")(IteratorPrototype, __webpack_require__("Yhpl")('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), + +/***/ "XIbb": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("L5XS") +var buildFormatLocale = __webpack_require__("SxiJ") + +/** + * @category Locales + * @summary Japanese locale. + * @author Thomas Eilmsteiner [@DeMuu]{@link https://github.com/DeMuu} + * @author Yamagishi Kazutoshi [@ykzts]{@link https://github.com/ykzts} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "XK5f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("sbbm"); +/* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("A2AU"); +/* harmony import */ var _utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("9Jz5"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("IU9S"); + + + + + + + + + + + +function nextItem(list, item, disableListWrap) { + if (list === item) { + return list.firstChild; + } + + if (item && item.nextElementSibling) { + return item.nextElementSibling; + } + + return disableListWrap ? null : list.firstChild; +} + +function previousItem(list, item, disableListWrap) { + if (list === item) { + return disableListWrap ? list.firstChild : list.lastChild; + } + + if (item && item.previousElementSibling) { + return item.previousElementSibling; + } + + return disableListWrap ? null : list.lastChild; +} + +function textCriteriaMatches(nextFocus, textCriteria) { + if (textCriteria === undefined) { + return true; + } + + var text = nextFocus.innerText; + + if (text === undefined) { + // jsdom doesn't support innerText + text = nextFocus.textContent; + } + + text = text.trim().toLowerCase(); + + if (text.length === 0) { + return false; + } + + if (textCriteria.repeating) { + return text[0] === textCriteria.keys[0]; + } + + return text.indexOf(textCriteria.keys.join('')) === 0; +} + +function moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) { + var wrappedOnce = false; + var nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false); + + while (nextFocus) { + // Prevent infinite loop. + if (nextFocus === list.firstChild) { + if (wrappedOnce) { + return; + } + + wrappedOnce = true; + } // Same logic as useAutocomplete.js + + + var nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true'; + + if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) { + // Move to the next element. + nextFocus = traversalFunction(list, nextFocus, disableListWrap); + } else { + nextFocus.focus(); + return; + } + } +} + +var useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"]; +/** + * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton. + * It's exposed to help customization of the [`Menu`](/api/menu/) component. If you + * use it separately you need to move focus into the component manually. Once + * the focus is placed inside the component it is fully keyboard accessible. + */ + +var MenuList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function MenuList(props, ref) { + var actions = props.actions, + _props$autoFocus = props.autoFocus, + autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus, + _props$autoFocusItem = props.autoFocusItem, + autoFocusItem = _props$autoFocusItem === void 0 ? false : _props$autoFocusItem, + children = props.children, + className = props.className, + _props$disabledItemsF = props.disabledItemsFocusable, + disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF, + _props$disableListWra = props.disableListWrap, + disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra, + onKeyDown = props.onKeyDown, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"]); + + var listRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var textCriteriaRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({ + keys: [], + repeating: true, + previousKeyMatched: true, + lastTime: null + }); + useEnhancedEffect(function () { + if (autoFocus) { + listRef.current.focus(); + } + }, [autoFocus]); + react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](actions, function () { + return { + adjustStyleForScrollbar: function adjustStyleForScrollbar(containerElement, theme) { + // Let's ignore that piece of logic if users are already overriding the width + // of the menu. + var noExplicitWidth = !listRef.current.style.width; + + if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) { + var scrollbarSize = "".concat(Object(_utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_8__["default"])(true), "px"); + listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize; + listRef.current.style.width = "calc(100% + ".concat(scrollbarSize, ")"); + } + + return listRef.current; + } + }; + }, []); + + var handleKeyDown = function handleKeyDown(event) { + var list = listRef.current; + var key = event.key; + /** + * @type {Element} - will always be defined since we are in a keydown handler + * attached to an element. A keydown event is either dispatched to the activeElement + * or document.body or document.documentElement. Only the first case will + * trigger this specific handler. + */ + + var currentFocus = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_6__["default"])(list).activeElement; + + if (key === 'ArrowDown') { + // Prevent scroll of the page + event.preventDefault(); + moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem); + } else if (key === 'ArrowUp') { + event.preventDefault(); + moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem); + } else if (key === 'Home') { + event.preventDefault(); + moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem); + } else if (key === 'End') { + event.preventDefault(); + moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem); + } else if (key.length === 1) { + var criteria = textCriteriaRef.current; + var lowerKey = key.toLowerCase(); + var currTime = performance.now(); + + if (criteria.keys.length > 0) { + // Reset + if (currTime - criteria.lastTime > 500) { + criteria.keys = []; + criteria.repeating = true; + criteria.previousKeyMatched = true; + } else if (criteria.repeating && lowerKey !== criteria.keys[0]) { + criteria.repeating = false; + } + } + + criteria.lastTime = currTime; + criteria.keys.push(lowerKey); + var keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria); + + if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) { + event.preventDefault(); + } else { + criteria.previousKeyMatched = false; + } + } + + if (onKeyDown) { + onKeyDown(event); + } + }; + + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (instance) { + // #StrictMode ready + listRef.current = react_dom__WEBPACK_IMPORTED_MODULE_5__["findDOMNode"](instance); + }, []); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(handleOwnRef, ref); + /** + * the index of the item should receive focus + * in a `variant="selectedMenu"` it's the first `selected` item + * otherwise it's the very first item. + */ + + var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead + // to check if there is a `selected` item. We're looking for the last `selected` + // item and use the first valid item as a fallback + + react__WEBPACK_IMPORTED_MODULE_2__["Children"].forEach(children, function (child, index) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return; + } + + if (false) {} + + if (!child.props.disabled) { + if (variant === 'selectedMenu' && child.props.selected) { + activeItemIndex = index; + } else if (activeItemIndex === -1) { + activeItemIndex = index; + } + } + }); + var items = react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child, index) { + if (index === activeItemIndex) { + var newChildProps = {}; + + if (autoFocusItem) { + newChildProps.autoFocus = true; + } + + if (child.props.tabIndex === undefined && variant === 'selectedMenu') { + newChildProps.tabIndex = 0; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, newChildProps); + } + + return child; + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_List__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + role: "menu", + ref: handleRef, + className: className, + onKeyDown: handleKeyDown, + tabIndex: autoFocus ? 0 : -1 + }, other), items); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (MenuList); + +/***/ }), + +/***/ "XMPp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _browsertracing_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("unBY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BROWSER_TRACING_INTEGRATION_ID", function() { return _browsertracing_js__WEBPACK_IMPORTED_MODULE_0__["BROWSER_TRACING_INTEGRATION_ID"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserTracing", function() { return _browsertracing_js__WEBPACK_IMPORTED_MODULE_0__["BrowserTracing"]; }); + +/* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("GDt/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function() { return _request_js__WEBPACK_IMPORTED_MODULE_1__["defaultRequestInstrumentationOptions"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "instrumentOutgoingRequests", function() { return _request_js__WEBPACK_IMPORTED_MODULE_1__["instrumentOutgoingRequests"]; }); + + + + +; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "XMSJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__("iXAc"); +__webpack_require__("2o28"); +module.exports = __webpack_require__("WSXa").Promise['finally']; + + +/***/ }), + +/***/ "XRBo": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("4ESo"); +var core = __webpack_require__("kdnj"); +var ctx = __webpack_require__("6b0M"); +var hide = __webpack_require__("pvYg"); +var has = __webpack_require__("QdZa"); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), + +/***/ "XROj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NativeMessenger = exports.DebugNativeMessenger = void 0; + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _postMe = __webpack_require__("L5KM"); + +var _api = __webpack_require__("VXXh"); + +var log = (0, _postMe.debug)('NativeMessenger'); +var NativeMessenger = /*#__PURE__*/(0, _createClass2.default)(function NativeMessenger(webviewRef) { + var _this = this; + + (0, _classCallCheck2.default)(this, NativeMessenger); + (0, _defineProperty2.default)(this, "injectJavaScript", void 0); + (0, _defineProperty2.default)(this, "listener", void 0); + (0, _defineProperty2.default)(this, "postMessage", function (message) { + try { + var _this$injectJavaScrip; + + var script = "window.postMessage(".concat(JSON.stringify(message), ")"); + (_this$injectJavaScrip = _this.injectJavaScript) === null || _this$injectJavaScrip === void 0 ? void 0 : _this$injectJavaScrip.call(_this, script); + } catch (error) { + log(_api.strings.noWebviewFound); + } + }); + (0, _defineProperty2.default)(this, "addMessageListener", function (listener) { + _this.listener = listener; + + var removeListener = function removeListener() { + return _this.listener = undefined; + }; + + return removeListener; + }); + (0, _defineProperty2.default)(this, "onMessage", function (data) { + if (!_this.listener) return log(_api.strings.noListenerFound); + + _this.listener({ + data: data + }); + }); + this.injectJavaScript = webviewRef.injectJavaScript; +}); +exports.NativeMessenger = NativeMessenger; + +var DebugNativeMessenger = function DebugNativeMessenger(messenger) { + return { + postMessage: function postMessage(message) { + message.action !== 'response' && log('- OUT', message); + messenger.postMessage(message); + }, + addMessageListener: function addMessageListener(listener) { + return messenger.addMessageListener(listener); + }, + onMessage: function onMessage(data) { + log('- IN', data); + messenger.onMessage(data); + } + }; +}; + +exports.DebugNativeMessenger = DebugNativeMessenger; + +/***/ }), + +/***/ "XST7": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BxMJ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StepLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "XUgK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useRadioGroup; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _RadioGroupContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pBCG"); + + +function useRadioGroup() { + return react__WEBPACK_IMPORTED_MODULE_0__["useContext"](_RadioGroupContext__WEBPACK_IMPORTED_MODULE_1__["default"]); +} + +/***/ }), + +/***/ "XXj1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.Collection = exports.isDocumentUpdateConflict = exports.isNoUsableIndexError = exports.isIndexNotUsedWarning = exports.isIndexConflictError = exports.isIndexNotFoundError = exports.dontThrowNotFoundError = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _types = __webpack_require__("uBBm"); + +/** + * Handler for error response which return a empty value for "not found" error + * + * @param {Error} error - An error + * @param {Array|object|null} data Data to return in case of "not found" error + * @returns {object} JsonAPI response with empty data in case of "not + * found" error. + */ +var dontThrowNotFoundError = function dontThrowNotFoundError(error) { + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + if (error.message.match(/not_found/)) { + var expectsCollection = Array.isArray(data); // Return expected JsonAPI attributes : collections are expecting + // meta, skip and next attribute + + return expectsCollection ? { + data: data, + meta: { + count: 0 + }, + skip: 0, + next: false + } : { + data: data + }; + } + + throw error; +}; +/** + * Helper to identify an index not found error + * + * @param {Error} error - An error + * @returns {Array|null} - Whether or not the error is an index not found error + */ + + +exports.dontThrowNotFoundError = dontThrowNotFoundError; + +var isIndexNotFoundError = function isIndexNotFoundError(error) { + return error.message.match(/no_index/); +}; +/** + * Helper to identify an index conflict + * + * @param {Error} error - An error + * @returns {Array|null} - Whether or not the error is an index conflict error + */ + + +exports.isIndexNotFoundError = isIndexNotFoundError; + +var isIndexConflictError = function isIndexConflictError(error) { + return error.message.match(/error_saving_ddoc/); +}; +/** + * Helper to identify a not used index + * + * @param {string} warning - The warning returned by CouchDB + * @returns {Array|null} Whether or not this is a not used index warning + */ + + +exports.isIndexConflictError = isIndexConflictError; + +var isIndexNotUsedWarning = function isIndexNotUsedWarning(warning) { + return warning.match(/was not used because it does not contain a valid index for this query/); +}; +/** + * Helper to identify a no usable index error + * + * @param {Error} error - An error + * @returns {Array|null} - Whether or not the error is a no usable index error + */ + + +exports.isIndexNotUsedWarning = isIndexNotUsedWarning; + +var isNoUsableIndexError = function isNoUsableIndexError(error) { + return error.message.match(/no_usable_index/); +}; +/** + * Helper to identify a document conflict + * + * @param {Error} error - An error + * @returns {Array|null} - Whether or not the error is a document conflict error + */ + + +exports.isNoUsableIndexError = isNoUsableIndexError; + +var isDocumentUpdateConflict = function isDocumentUpdateConflict(error) { + return error.message.match(/Document update conflict/); +}; +/** + * Utility class to abstract an regroup identical methods and logics for + * specific collections. + */ + + +exports.isDocumentUpdateConflict = isDocumentUpdateConflict; + +var Collection = /*#__PURE__*/function () { + function Collection() { + (0, _classCallCheck2.default)(this, Collection); + } + + (0, _createClass2.default)(Collection, null, [{ + key: "get", + + /** + * Utility method aimed to return only one document. + * + * @param {CozyStackClient} stackClient - CozyStackClient + * @param {string} endpoint - Stack endpoint + * @param {object} options - Options of the collection + * @param {Function} options.normalize Callback to normalize response data + * (default `data => data`) + * @param {string} [options.method=GET] - HTTP method + * @returns {Promise<object>} JsonAPI response containing normalized + * document as data attribute + */ + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(stackClient, endpoint, _ref) { + var _ref$normalize, normalize, _ref$method, method, resp; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref$normalize = _ref.normalize, normalize = _ref$normalize === void 0 ? function (data, response) { + return data; + } : _ref$normalize, _ref$method = _ref.method, method = _ref$method === void 0 ? 'GET' : _ref$method; + _context.prev = 1; + _context.next = 4; + return stackClient.fetchJSON(method, endpoint); + + case 4: + resp = _context.sent; + return _context.abrupt("return", { + data: normalize(resp.data, resp) + }); + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](1); + return _context.abrupt("return", dontThrowNotFoundError(_context.t0, null)); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 8]]); + })); + + function get(_x, _x2, _x3) { + return _get.apply(this, arguments); + } + + return get; + }() + }]); + return Collection; +}(); + +exports.Collection = Collection; +var _default = Collection; +exports.default = _default; + +/***/ }), + +/***/ "XdYc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__("LRPZ"); +var $includes = __webpack_require__("IHbp")(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +__webpack_require__("pebw")('includes'); + + +/***/ }), + +/***/ "XeXG": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "Xg8z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TablePagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("JiiU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TablePagination__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "XghD": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = __webpack_require__("LRPZ"); +var create = __webpack_require__("7wnO"); +var aFunction = __webpack_require__("TQc+"); +var anObject = __webpack_require__("eckd"); +var isObject = __webpack_require__("pFmr"); +var fails = __webpack_require__("enc5"); +var bind = __webpack_require__("1xNE"); +var rConstruct = (__webpack_require__("ETne").Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), + +/***/ "XkwL": +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__("Mf+g"); + +var iterableToArrayLimit = __webpack_require__("NMhh"); + +var unsupportedIterableToArray = __webpack_require__("gbaz"); + +var nonIterableRest = __webpack_require__("gw87"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "XqEJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/openwith.svg` to regenerate; + +function SvgOpenwith(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M9 0v2h3.5L6 8.5 7.5 10 14 3.5V7h2V1.003A.996.996 0 0014.997 0H9zM7 2V0H1.003A1 1 0 000 1v14c0 .552.445 1 1 1h14c.552 0 1-.438 1-1.003V9h-2v5H2V2h5z", + fillRule: "evenodd" + })); +} +var _default = SvgOpenwith; +exports.default = _default; + +/***/ }), + +/***/ "Xqvq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _defineProperty; }); +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; +} + +/***/ }), + +/***/ "XrMh": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; + + +/***/ }), + +/***/ "XsxL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _borders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("igaY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borders", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "border", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["border"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderTop", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderTop"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderRight", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderRight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderBottom", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderBottom"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderLeft", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderLeft"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderColor", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderColor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "borderRadius", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__["borderRadius"]; }); + +/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("UCvF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "breakpoints", function() { return _breakpoints__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("3pU+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return _compose__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _styleFunctionSx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("TctG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styleFunctionSx", function() { return _styleFunctionSx__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "css", function() { return _styleFunctionSx__WEBPACK_IMPORTED_MODULE_3__["css"]; }); + +/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("eaPh"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "display", function() { return _display__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _flexbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("0M3w"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexbox", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexBasis", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flexBasis"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexDirection", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flexDirection"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexWrap", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flexWrap"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "justifyContent", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["justifyContent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "alignItems", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["alignItems"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "alignContent", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["alignContent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "order", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["order"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flex", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flex"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexGrow", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flexGrow"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flexShrink", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["flexShrink"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "alignSelf", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["alignSelf"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "justifyItems", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["justifyItems"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "justifySelf", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__["justifySelf"]; }); + +/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("AdqI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "grid", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridGap", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridGap"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridColumnGap", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridColumnGap"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridRowGap", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridRowGap"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridColumn", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridColumn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridRow", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridRow"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridAutoFlow", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridAutoFlow"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridAutoColumns", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridAutoColumns"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridAutoRows", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridAutoRows"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridTemplateColumns", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridTemplateColumns"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridTemplateRows", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridTemplateRows"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridTemplateAreas", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridTemplateAreas"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gridArea", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__["gridArea"]; }); + +/* harmony import */ var _palette__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("sCdB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "palette", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__["color"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bgcolor", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__["bgcolor"]; }); + +/* harmony import */ var _positions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ezZO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "positions", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "position", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["position"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zIndex", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["zIndex"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "top", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["top"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "right", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["right"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bottom", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["bottom"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "left", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__["left"]; }); + +/* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("4GiZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shadows", function() { return _shadows__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _sizing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("WFZW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sizing", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "width", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["width"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxWidth", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["maxWidth"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minWidth", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["minWidth"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "height", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["height"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxHeight", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["maxHeight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minHeight", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["minHeight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sizeWidth", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["sizeWidth"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sizeHeight", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["sizeHeight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "boxSizing", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__["boxSizing"]; }); + +/* harmony import */ var _spacing__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("sDxG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "spacing", function() { return _spacing__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createUnarySpacing", function() { return _spacing__WEBPACK_IMPORTED_MODULE_11__["createUnarySpacing"]; }); + +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("1GsC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _style__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("NEcK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "typography", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontFamily", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["fontFamily"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontSize", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["fontSize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontStyle", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["fontStyle"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontWeight", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["fontWeight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "letterSpacing", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["letterSpacing"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineHeight", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["lineHeight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "textAlign", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__["textAlign"]; }); + +/** @license Material-UI v4.12.2 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "Xvne": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var reactIs = __webpack_require__("T7ls"); + +/** + * Copyright 2015, Yahoo! Inc. + * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +var REACT_STATICS = { + childContextTypes: true, + contextType: true, + contextTypes: true, + defaultProps: true, + displayName: true, + getDefaultProps: true, + getDerivedStateFromError: true, + getDerivedStateFromProps: true, + mixins: true, + propTypes: true, + type: true +}; +var KNOWN_STATICS = { + name: true, + length: true, + prototype: true, + caller: true, + callee: true, + arguments: true, + arity: true +}; +var FORWARD_REF_STATICS = { + '$$typeof': true, + render: true, + defaultProps: true, + displayName: true, + propTypes: true +}; +var MEMO_STATICS = { + '$$typeof': true, + compare: true, + defaultProps: true, + displayName: true, + propTypes: true, + type: true +}; +var TYPE_STATICS = {}; +TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; +TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; + +function getStatics(component) { + // React v16.11 and below + if (reactIs.isMemo(component)) { + return MEMO_STATICS; + } // React v16.12 and above + + + return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; +} + +var defineProperty = Object.defineProperty; +var getOwnPropertyNames = Object.getOwnPropertyNames; +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var getPrototypeOf = Object.getPrototypeOf; +var objectPrototype = Object.prototype; +function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { + if (typeof sourceComponent !== 'string') { + // don't hoist over string (html) components + if (objectPrototype) { + var inheritedComponent = getPrototypeOf(sourceComponent); + + if (inheritedComponent && inheritedComponent !== objectPrototype) { + hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); + } + } + + var keys = getOwnPropertyNames(sourceComponent); + + if (getOwnPropertySymbols) { + keys = keys.concat(getOwnPropertySymbols(sourceComponent)); + } + + var targetStatics = getStatics(targetComponent); + var sourceStatics = getStatics(sourceComponent); + + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + + if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { + var descriptor = getOwnPropertyDescriptor(sourceComponent, key); + + try { + // Avoid failures from read-only properties + defineProperty(targetComponent, key, descriptor); + } catch (e) {} + } + } + } + + return targetComponent; +} + +module.exports = hoistNonReactStatics; + + +/***/ }), + +/***/ "XyWS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _internal_svg_icons_ArrowDownward__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("l3U2"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + cursor: 'pointer', + display: 'inline-flex', + justifyContent: 'flex-start', + flexDirection: 'inherit', + alignItems: 'center', + '&:focus': { + color: theme.palette.text.secondary + }, + '&:hover': { + color: theme.palette.text.secondary, + '& $icon': { + opacity: 0.5 + } + }, + '&$active': { + color: theme.palette.text.primary, + // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045 + '&& $icon': { + opacity: 1, + color: theme.palette.text.secondary + } + } + }, + + /* Pseudo-class applied to the root element if `active={true}`. */ + active: {}, + + /* Styles applied to the icon component. */ + icon: { + fontSize: 18, + marginRight: 4, + marginLeft: 4, + opacity: 0, + transition: theme.transitions.create(['opacity', 'transform'], { + duration: theme.transitions.duration.shorter + }), + userSelect: 'none' + }, + + /* Styles applied to the icon component if `direction="desc"`. */ + iconDirectionDesc: { + transform: 'rotate(0deg)' + }, + + /* Styles applied to the icon component if `direction="asc"`. */ + iconDirectionAsc: { + transform: 'rotate(180deg)' + } + }; +}; +/** + * A button based label for placing inside `TableCell` for column sorting. + */ + +var TableSortLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableSortLabel(props, ref) { + var _props$active = props.active, + active = _props$active === void 0 ? false : _props$active, + children = props.children, + classes = props.classes, + className = props.className, + _props$direction = props.direction, + direction = _props$direction === void 0 ? 'asc' : _props$direction, + _props$hideSortIcon = props.hideSortIcon, + hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon, + _props$IconComponent = props.IconComponent, + IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDownward__WEBPACK_IMPORTED_MODULE_5__["default"] : _props$IconComponent, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "children", "classes", "className", "direction", "hideSortIcon", "IconComponent"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, active && classes.active), + component: "span", + disableRipple: true, + ref: ref + }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](IconComponent, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.icon, classes["iconDirection".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(direction))]) + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiTableSortLabel' +})(TableSortLabel)); + +/***/ }), + +/***/ "XyXA": +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__("GwHQ"); +var createDesc = __webpack_require__("nVWS"); +module.exports = __webpack_require__("WXXH") ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ "Y/FK": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function checkDCE() { + /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ + if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' + ) { + return; + } + if (false) {} + try { + // Verify that the code above has been dead code eliminated (DCE'd). + __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); + } catch (err) { + // DevTools shouldn't crash React, no matter what. + // We should still report in case we break this code. + console.error(err); + } +} + +if (true) { + // DCE check should happen before ReactDOM bundle executes so that + // DevTools can report bad minification during injection. + checkDCE(); + module.exports = __webpack_require__("VxLx"); +} else {} + + +/***/ }), + +/***/ "Y/JY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * @param typeMap [Object] Map of MIME type -> Array[extensions] + * @param ... + */ +function Mime() { + this._types = Object.create(null); + this._extensions = Object.create(null); + + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); +} + +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * If a type declares an extension that has already been defined, an error will + * be thrown. To suppress this error and force the extension to be associated + * with the new type, pass `force`=true. Alternatively, you may prefix the + * extension with "*" to map the type to extension, without mapping the + * extension to the type. + * + * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); + * + * + * @param map (Object) type definitions + * @param force (Boolean) if true, force overriding of existing definitions + */ +Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + + // '*' prefix = not the preferred type for this extension. So fixup the + // extension, and skip it. + if (ext[0] === '*') { + continue; + } + + if (!force && (ext in this._types)) { + throw new Error( + 'Attempt to change mapping for "' + ext + + '" extension from "' + this._types[ext] + '" to "' + type + + '". Pass `force=true` to allow this, otherwise remove "' + ext + + '" from the list of extensions for "' + type + '".' + ); + } + + this._types[ext] = type; + } + + // Use first extension as default + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); + } + } +}; + +/** + * Lookup a mime type based on extension + */ +Mime.prototype.getType = function(path) { + path = String(path); + let last = path.replace(/^.*[/\\]/, '').toLowerCase(); + let ext = last.replace(/^.*\./, '').toLowerCase(); + + let hasPath = last.length < path.length; + let hasDot = ext.length < last.length - 1; + + return (hasDot || !hasPath) && this._types[ext] || null; +}; + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; +}; + +module.exports = Mime; + + +/***/ }), + +/***/ "Y2Dv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutsShape", function() { return timeoutsShape; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classNamesShape", function() { return classNamesShape; }); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var timeoutsShape = false ? undefined : null; +var classNamesShape = false ? undefined : null; + +/***/ }), + +/***/ "Y4T/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getChildMapping", function() { return getChildMapping; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeChildMappings", function() { return mergeChildMappings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInitialChildMapping", function() { return getInitialChildMapping; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNextChildMapping", function() { return getNextChildMapping; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * Given `this.props.children`, return an object mapping key to child. + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ + +function getChildMapping(children, mapFn) { + var mapper = function mapper(child) { + return mapFn && Object(react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"])(child) ? mapFn(child) : child; + }; + + var result = Object.create(null); + if (children) react__WEBPACK_IMPORTED_MODULE_0__["Children"].map(children, function (c) { + return c; + }).forEach(function (child) { + // run the map function here instead so that the key is the computed one + result[child.key] = mapper(child); + }); + return result; +} +/** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + +function mergeChildMappings(prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + return key in next ? next[key] : prev[key]; + } // For each key of `next`, the list of keys to insert before that key in + // the combined list + + + var nextKeysPending = Object.create(null); + var pendingKeys = []; + + for (var prevKey in prev) { + if (prevKey in next) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + + for (var nextKey in next) { + if (nextKeysPending[nextKey]) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey); + } + } + + childMapping[nextKey] = getValueForKey(nextKey); + } // Finally, add the keys which didn't appear before any key in `next` + + + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; +} + +function getProp(child, prop, props) { + return props[prop] != null ? props[prop] : child.props[prop]; +} + +function getInitialChildMapping(props, onExited) { + return getChildMapping(props.children, function (child) { + return Object(react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: true, + appear: getProp(child, 'appear', props), + enter: getProp(child, 'enter', props), + exit: getProp(child, 'exit', props) + }); + }); +} +function getNextChildMapping(nextProps, prevChildMapping, onExited) { + var nextChildMapping = getChildMapping(nextProps.children); + var children = mergeChildMappings(prevChildMapping, nextChildMapping); + Object.keys(children).forEach(function (key) { + var child = children[key]; + if (!Object(react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"])(child)) return; + var hasPrev = (key in prevChildMapping); + var hasNext = (key in nextChildMapping); + var prevChild = prevChildMapping[key]; + var isLeaving = Object(react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"])(prevChild) && !prevChild.props.in; // item is new (entering) + + if (hasNext && (!hasPrev || isLeaving)) { + // console.log('entering', key) + children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: true, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); + } else if (!hasNext && hasPrev && !isLeaving) { + // item is old (exiting) + // console.log('leaving', key) + children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(child, { + in: false + }); + } else if (hasNext && hasPrev && Object(react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"])(prevChild)) { + // item hasn't changed transition states + // copy over the last transition props; + // console.log('unchanged', key) + children[key] = Object(react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(child, { + onExited: onExited.bind(null, child), + in: prevChild.props.in, + exit: getProp(child, 'exit', nextProps), + enter: getProp(child, 'enter', nextProps) + }); + } + }); + return children; +} + +/***/ }), + +/***/ "Y5iN": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + standalone: { + one: 'weniger als eine Sekunde', + other: 'weniger als {{count}} Sekunden' + }, + withPreposition: { + one: 'weniger als einer Sekunde', + other: 'weniger als {{count}} Sekunden' + } + }, + + xSeconds: { + standalone: { + one: 'eine Sekunde', + other: '{{count}} Sekunden' + }, + withPreposition: { + one: 'einer Sekunde', + other: '{{count}} Sekunden' + } + }, + + halfAMinute: { + standalone: 'eine halbe Minute', + withPreposition: 'einer halben Minute' + }, + + lessThanXMinutes: { + standalone: { + one: 'weniger als eine Minute', + other: 'weniger als {{count}} Minuten' + }, + withPreposition: { + one: 'weniger als einer Minute', + other: 'weniger als {{count}} Minuten' + } + }, + + xMinutes: { + standalone: { + one: 'eine Minute', + other: '{{count}} Minuten' + }, + withPreposition: { + one: 'einer Minute', + other: '{{count}} Minuten' + } + }, + + aboutXHours: { + standalone: { + one: 'etwa eine Stunde', + other: 'etwa {{count}} Stunden' + }, + withPreposition: { + one: 'etwa einer Stunde', + other: 'etwa {{count}} Stunden' + } + }, + + xHours: { + standalone: { + one: 'eine Stunde', + other: '{{count}} Stunden' + }, + withPreposition: { + one: 'einer Stunde', + other: '{{count}} Stunden' + } + }, + + xDays: { + standalone: { + one: 'ein Tag', + other: '{{count}} Tage' + }, + withPreposition: { + one: 'einem Tag', + other: '{{count}} Tagen' + } + + }, + + aboutXMonths: { + standalone: { + one: 'etwa ein Monat', + other: 'etwa {{count}} Monate' + }, + withPreposition: { + one: 'etwa einem Monat', + other: 'etwa {{count}} Monaten' + } + }, + + xMonths: { + standalone: { + one: 'ein Monat', + other: '{{count}} Monate' + }, + withPreposition: { + one: 'einem Monat', + other: '{{count}} Monaten' + } + }, + + aboutXYears: { + standalone: { + one: 'etwa ein Jahr', + other: 'etwa {{count}} Jahre' + }, + withPreposition: { + one: 'etwa einem Jahr', + other: 'etwa {{count}} Jahren' + } + }, + + xYears: { + standalone: { + one: 'ein Jahr', + other: '{{count}} Jahre' + }, + withPreposition: { + one: 'einem Jahr', + other: '{{count}} Jahren' + } + }, + + overXYears: { + standalone: { + one: 'mehr als ein Jahr', + other: 'mehr als {{count}} Jahre' + }, + withPreposition: { + one: 'mehr als einem Jahr', + other: 'mehr als {{count}} Jahren' + } + }, + + almostXYears: { + standalone: { + one: 'fast ein Jahr', + other: 'fast {{count}} Jahre' + }, + withPreposition: { + one: 'fast einem Jahr', + other: 'fast {{count}} Jahren' + } + } + } + + function localize (token, count, options) { + options = options || {} + + var usageGroup = options.addSuffix + ? distanceInWordsLocale[token].withPreposition + : distanceInWordsLocale[token].standalone + + var result + if (typeof usageGroup === 'string') { + result = usageGroup + } else if (count === 1) { + result = usageGroup.one + } else { + result = usageGroup.other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'in ' + result + } else { + return 'vor ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "Y70I": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return isPlainObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return deepmerge; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("j9Ms"); + + +function isPlainObject(item) { + return item && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__["default"])(item) === 'object' && item.constructor === Object; +} +function deepmerge(target, source) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { + clone: true + }; + var output = options.clone ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, target) : target; + + if (isPlainObject(target) && isPlainObject(source)) { + Object.keys(source).forEach(function (key) { + // Avoid prototype pollution + if (key === '__proto__') { + return; + } + + if (isPlainObject(source[key]) && key in target) { + output[key] = deepmerge(target[key], source[key], options); + } else { + output[key] = source[key]; + } + }); + } + + return output; +} + +/***/ }), + +/***/ "YB5c": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Day Helpers + * @summary Add the specified number of days to the given date. + * + * @description + * Add the specified number of days to the given date. + * + * @param {Date|String|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be added + * @returns {Date} the new date with the days added + * + * @example + * // Add 10 days to 1 September 2014: + * var result = addDays(new Date(2014, 8, 1), 10) + * //=> Thu Sep 11 2014 00:00:00 + */ +function addDays (dirtyDate, dirtyAmount) { + var date = parse(dirtyDate) + var amount = Number(dirtyAmount) + date.setDate(date.getDate() + amount) + return date +} + +module.exports = addDays + + +/***/ }), + +/***/ "YG3o": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__("9DvV"); + + +/***/ }), + +/***/ "YIwv": +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__("+IXE"); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; + + +/***/ }), + +/***/ "YJcZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.formatBytes = exports.slugify = exports.sleep = exports.attempt = exports.uri = void 0; + +/** + * @function + * @description Template tag function for URIs encoding + * + * Will automatically apply `encodeURIComponent` to template literal placeholders + * + * @example + * ``` + * const safe = uri`/data/${doctype}/_all_docs?limit=${limit}` + * ``` + * + * @private + */ +var uri = function uri(strings) { + var parts = [strings[0]]; + + for (var i = 0; i < (arguments.length <= 1 ? 0 : arguments.length - 1); i++) { + parts.push(encodeURIComponent(i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]) + strings[i + 1]); + } + + return parts.join(''); +}; +/** + * @function + * @description Helps to avoid nested try/catch when using async/await + * + * Inspired by a Go pattern: http://blog.grossman.io/how-to-write-async-await-without-try-catch-blocks-in-javascript/ + * + * @example + * ``` + * if (await attempt(collection.all()) return + * await sleep(1000) + * if (await attempt(collection.all()) return + * await sleep(1000) + * return + * ``` + * + * @private + */ + + +exports.uri = uri; + +var attempt = function attempt(promise) { + return promise.then(function () { + return true; + }).catch(function () { + return false; + }); +}; +/** + * @function + * @description Helps to avoid nested try/catch when using async/await — see documentation for attempt + * @private + */ + + +exports.attempt = attempt; + +var sleep = function sleep(time, args) { + return new Promise(function (resolve) { + setTimeout(resolve, time, args); + }); +}; + +exports.sleep = sleep; + +var slugify = function slugify(text) { + return text.toString().toLowerCase().replace(/\s+/g, '-') // Replace spaces with - + .replace(/[^\w-]+/g, '') // Remove all non-word chars + .replace(/--+/g, '-') // Replace multiple - with single - + .replace(/^-+/, '') // Trim - from start of text + .replace(/-+$/, ''); +}; // Trim - from end of text + + +exports.slugify = slugify; + +var formatBytes = function formatBytes(bytes) { + var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; + if (bytes === 0) return '0 Bytes'; + var k = 1024; + var dm = decimals < 0 ? 0 : decimals; + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + var i = Math.floor(Math.log(bytes) / Math.log(k)); + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; +}; + +exports.formatBytes = formatBytes; + +/***/ }), + +/***/ "YJhN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var MAX_SAFE_INTEGER = __webpack_require__("1pxY"); + +var ToIntegerOrInfinity = __webpack_require__("upfM"); + +module.exports = function ToLength(argument) { + var len = ToIntegerOrInfinity(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; + + +/***/ }), + +/***/ "YKyv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("jlvQ"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("kjpz"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("xOGQ"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("IU9S"); + + + + + + + + + + +function getScale(value) { + return "scale(".concat(value, ", ").concat(Math.pow(value, 2), ")"); +} + +var styles = { + entering: { + opacity: 1, + transform: getScale(1) + }, + entered: { + opacity: 1, + transform: 'none' + } +}; +/** + * The Grow transition is used by the [Tooltip](/components/tooltips/) and + * [Popover](/components/popover/) components. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ + +var Grow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Grow(props, ref) { + var children = props.children, + _props$disableStrictM = props.disableStrictModeCompat, + disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? 'auto' : _props$timeout, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__["Transition"] : _props$TransitionComp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]); + + var timer = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + var autoTimeout = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__["default"])(); + var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; + var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__["default"])(children.ref, ref); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__["default"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef); + + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (nodeOrAppearing, maybeAppearing) { + if (callback) { + var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], + _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), + node = _ref2[0], + isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. + + + if (isAppearing === undefined) { + callback(node); + } else { + callback(node, isAppearing); + } + } + }; + }; + + var handleEntering = normalizedTransitionCallback(onEntering); + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__["reflow"])(node); // So the animation always start from the start. + + var _getTransitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'enter' + }), + transitionDuration = _getTransitionProps.duration, + delay = _getTransitionProps.delay; + + var duration; + + if (timeout === 'auto') { + duration = theme.transitions.getAutoHeightDuration(node.clientHeight); + autoTimeout.current = duration; + } else { + duration = transitionDuration; + } + + node.style.transition = [theme.transitions.create('opacity', { + duration: duration, + delay: delay + }), theme.transitions.create('transform', { + duration: duration * 0.666, + delay: delay + })].join(','); + + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(onEntered); + var handleExiting = normalizedTransitionCallback(onExiting); + var handleExit = normalizedTransitionCallback(function (node) { + var _getTransitionProps2 = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'exit' + }), + transitionDuration = _getTransitionProps2.duration, + delay = _getTransitionProps2.delay; + + var duration; + + if (timeout === 'auto') { + duration = theme.transitions.getAutoHeightDuration(node.clientHeight); + autoTimeout.current = duration; + } else { + duration = transitionDuration; + } + + node.style.transition = [theme.transitions.create('opacity', { + duration: duration, + delay: delay + }), theme.transitions.create('transform', { + duration: duration * 0.666, + delay: delay || duration * 0.333 + })].join(','); + node.style.opacity = '0'; + node.style.transform = getScale(0.75); + + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(onExited); + + var addEndListener = function addEndListener(nodeOrNext, maybeNext) { + var next = enableStrictModeCompat ? nodeOrNext : maybeNext; + + if (timeout === 'auto') { + timer.current = setTimeout(next, autoTimeout.current || 0); + } + }; + + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + return function () { + clearTimeout(timer.current); + }; + }, []); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + appear: true, + in: inProp, + nodeRef: enableStrictModeCompat ? nodeRef : undefined, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + addEndListener: addEndListener, + timeout: timeout === 'auto' ? null : timeout + }, other), function (state, childProps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + opacity: 0, + transform: getScale(0.75), + visibility: state === 'exited' && !inProp ? 'hidden' : undefined + }, styles[state], style, children.props.style), + ref: handleRef + }, childProps)); + }); +}); + false ? undefined : void 0; +Grow.muiSupportAuto = true; +/* harmony default export */ __webpack_exports__["default"] = (Grow); + +/***/ }), + +/***/ "YUW9": +/***/ (function(module, exports, __webpack_require__) { + +var Set = __webpack_require__("rYRw"), + noop = __webpack_require__("JNQl"), + setToArray = __webpack_require__("4Fdj"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; + + +/***/ }), + +/***/ "YYsG": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'] + var monthsFull = ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'] + var weekdays2char = ['do', 'lu', 'ma', 'me', 'gi', 've', 'sa'] + var weekdays3char = ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'] + var weekdaysFull = ['domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + 'º' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "Ycmd": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_MINUTE_DOCTYPE = void 0; +var ENEDIS_MINUTE_DOCTYPE = 'com.grandlyon.enedis.minute'; +exports.ENEDIS_MINUTE_DOCTYPE = ENEDIS_MINUTE_DOCTYPE; + +/***/ }), + +/***/ "Yfzq": +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__("AJH6"); +var createDesc = __webpack_require__("nVWS"); +var toIObject = __webpack_require__("764U"); +var toPrimitive = __webpack_require__("Tven"); +var has = __webpack_require__("00OQ"); +var IE8_DOM_DEFINE = __webpack_require__("vBoz"); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__("WXXH") ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), + +/***/ "YhHV": +/***/ (function(module, exports, __webpack_require__) { + +var memoizeCapped = __webpack_require__("08s0"); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; + + +/***/ }), + +/***/ "Yhpl": +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__("Q6Yr")('wks'); +var uid = __webpack_require__("Jz0u"); +var Symbol = __webpack_require__("ETne").Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), + +/***/ "YiVU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("j9Ms"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rDuK"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("fWYq"); +/* harmony import */ var _Menu_Menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("Cw3s"); +/* harmony import */ var _InputBase_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("MIMv"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("9sWd"); + + + + + + + + + + + + + + + + + +function areEqualValues(a, b) { + if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__["default"])(b) === 'object' && b !== null) { + return a === b; + } + + return String(a) === String(b); +} + +function isEmpty(display) { + return display == null || typeof display === 'string' && !display.trim(); +} +/** + * @ignore - internal component. + */ + + +var SelectInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["forwardRef"](function SelectInput(props, ref) { + var ariaLabel = props['aria-label'], + autoFocus = props.autoFocus, + autoWidth = props.autoWidth, + children = props.children, + classes = props.classes, + className = props.className, + defaultValue = props.defaultValue, + disabled = props.disabled, + displayEmpty = props.displayEmpty, + IconComponent = props.IconComponent, + inputRefProp = props.inputRef, + labelId = props.labelId, + _props$MenuProps = props.MenuProps, + MenuProps = _props$MenuProps === void 0 ? {} : _props$MenuProps, + multiple = props.multiple, + name = props.name, + onBlur = props.onBlur, + onChange = props.onChange, + onClose = props.onClose, + onFocus = props.onFocus, + onOpen = props.onOpen, + openProp = props.open, + readOnly = props.readOnly, + renderValue = props.renderValue, + _props$SelectDisplayP = props.SelectDisplayProps, + SelectDisplayProps = _props$SelectDisplayP === void 0 ? {} : _props$SelectDisplayP, + tabIndexProp = props.tabIndex, + type = props.type, + valueProp = props.value, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["aria-label", "autoFocus", "autoWidth", "children", "classes", "className", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"]); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_14__["default"])({ + controlled: valueProp, + default: defaultValue, + name: 'Select' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_useControlled, 2), + value = _useControlled2[0], + setValue = _useControlled2[1]; + + var inputRef = react__WEBPACK_IMPORTED_MODULE_5__["useRef"](null); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"](null), + displayNode = _React$useState[0], + setDisplayNode = _React$useState[1]; + + var _React$useRef = react__WEBPACK_IMPORTED_MODULE_5__["useRef"](openProp != null), + isOpenControlled = _React$useRef.current; + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_5__["useState"](), + menuMinWidthState = _React$useState2[0], + setMenuMinWidthState = _React$useState2[1]; + + var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_5__["useState"](false), + openState = _React$useState3[0], + setOpenState = _React$useState3[1]; + + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_13__["default"])(ref, inputRefProp); + react__WEBPACK_IMPORTED_MODULE_5__["useImperativeHandle"](handleRef, function () { + return { + focus: function focus() { + displayNode.focus(); + }, + node: inputRef.current, + value: value + }; + }, [displayNode, value]); + react__WEBPACK_IMPORTED_MODULE_5__["useEffect"](function () { + if (autoFocus && displayNode) { + displayNode.focus(); + } + }, [autoFocus, displayNode]); + react__WEBPACK_IMPORTED_MODULE_5__["useEffect"](function () { + if (displayNode) { + var label = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_9__["default"])(displayNode).getElementById(labelId); + + if (label) { + var handler = function handler() { + if (getSelection().isCollapsed) { + displayNode.focus(); + } + }; + + label.addEventListener('click', handler); + return function () { + label.removeEventListener('click', handler); + }; + } + } + + return undefined; + }, [labelId, displayNode]); + + var update = function update(open, event) { + if (open) { + if (onOpen) { + onOpen(event); + } + } else if (onClose) { + onClose(event); + } + + if (!isOpenControlled) { + setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth); + setOpenState(open); + } + }; + + var handleMouseDown = function handleMouseDown(event) { + // Ignore everything but left-click + if (event.button !== 0) { + return; + } // Hijack the default focus behavior. + + + event.preventDefault(); + displayNode.focus(); + update(true, event); + }; + + var handleClose = function handleClose(event) { + update(false, event); + }; + + var childrenArray = react__WEBPACK_IMPORTED_MODULE_5__["Children"].toArray(children); // Support autofill. + + var handleChange = function handleChange(event) { + var index = childrenArray.map(function (child) { + return child.props.value; + }).indexOf(event.target.value); + + if (index === -1) { + return; + } + + var child = childrenArray[index]; + setValue(child.props.value); + + if (onChange) { + onChange(event, child); + } + }; + + var handleItemClick = function handleItemClick(child) { + return function (event) { + if (!multiple) { + update(false, event); + } + + var newValue; + + if (multiple) { + newValue = Array.isArray(value) ? value.slice() : []; + var itemIndex = value.indexOf(child.props.value); + + if (itemIndex === -1) { + newValue.push(child.props.value); + } else { + newValue.splice(itemIndex, 1); + } + } else { + newValue = child.props.value; + } + + if (child.props.onClick) { + child.props.onClick(event); + } + + if (value === newValue) { + return; + } + + setValue(newValue); + + if (onChange) { + event.persist(); // Preact support, target is read only property on a native event. + + Object.defineProperty(event, 'target', { + writable: true, + value: { + value: newValue, + name: name + } + }); + onChange(event, child); + } + }; + }; + + var handleKeyDown = function handleKeyDown(event) { + if (!readOnly) { + var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by + // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html + 'Enter']; + + if (validKeys.indexOf(event.key) !== -1) { + event.preventDefault(); + update(true, event); + } + } + }; + + var open = displayNode !== null && (isOpenControlled ? openProp : openState); + + var handleBlur = function handleBlur(event) { + // if open event.stopImmediatePropagation + if (!open && onBlur) { + event.persist(); // Preact support, target is read only property on a native event. + + Object.defineProperty(event, 'target', { + writable: true, + value: { + value: value, + name: name + } + }); + onBlur(event); + } + }; + + delete other['aria-invalid']; + var display; + var displaySingle; + var displayMultiple = []; + var computeDisplay = false; + var foundMatch = false; // No need to display any value if the field is empty. + + if (Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_12__["isFilled"])({ + value: value + }) || displayEmpty) { + if (renderValue) { + display = renderValue(value); + } else { + computeDisplay = true; + } + } + + var items = childrenArray.map(function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["isValidElement"](child)) { + return null; + } + + if (false) {} + + var selected; + + if (multiple) { + if (!Array.isArray(value)) { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_4__["formatMuiErrorMessage"])(2)); + } + + selected = value.some(function (v) { + return areEqualValues(v, child.props.value); + }); + + if (selected && computeDisplay) { + displayMultiple.push(child.props.children); + } + } else { + selected = areEqualValues(value, child.props.value); + + if (selected && computeDisplay) { + displaySingle = child.props.children; + } + } + + if (selected) { + foundMatch = true; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["cloneElement"](child, { + 'aria-selected': selected ? 'true' : undefined, + onClick: handleItemClick(child), + onKeyUp: function onKeyUp(event) { + if (event.key === ' ') { + // otherwise our MenuItems dispatches a click event + // it's not behavior of the native <option> and causes + // the select to close immediately since we open on space keydown + event.preventDefault(); + } + + if (child.props.onKeyUp) { + child.props.onKeyUp(event); + } + }, + role: 'option', + selected: selected, + value: undefined, + // The value is most likely not a valid HTML attribute. + 'data-value': child.props.value // Instead, we provide it as a data attribute. + + }); + }); + + if (false) {} + + if (computeDisplay) { + display = multiple ? displayMultiple.join(', ') : displaySingle; + } // Avoid performing a layout computation in the render method. + + + var menuMinWidth = menuMinWidthState; + + if (!autoWidth && isOpenControlled && displayNode) { + menuMinWidth = displayNode.clientWidth; + } + + var tabIndex; + + if (typeof tabIndexProp !== 'undefined') { + tabIndex = tabIndexProp; + } else { + tabIndex = disabled ? null : 0; + } + + var buttonId = SelectDisplayProps.id || (name ? "mui-component-select-".concat(name) : undefined); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](react__WEBPACK_IMPORTED_MODULE_5__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_8__["default"])(classes.root, // TODO v5: merge root and select + classes.select, classes.selectMenu, classes[variant], className, disabled && classes.disabled), + ref: setDisplayNode, + tabIndex: tabIndex, + role: "button", + "aria-disabled": disabled ? 'true' : undefined, + "aria-expanded": open ? 'true' : undefined, + "aria-haspopup": "listbox", + "aria-label": ariaLabel, + "aria-labelledby": [labelId, buttonId].filter(Boolean).join(' ') || undefined, + onKeyDown: handleKeyDown, + onMouseDown: disabled || readOnly ? null : handleMouseDown, + onBlur: handleBlur, + onFocus: onFocus + }, SelectDisplayProps, { + // The id is required for proper a11y + id: buttonId + }), isEmpty(display) ? + /*#__PURE__*/ + // eslint-disable-next-line react/no-danger + react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", { + dangerouslySetInnerHTML: { + __html: '​' + } + }) : display), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + value: Array.isArray(value) ? value.join(',') : value, + name: name, + ref: inputRef, + "aria-hidden": true, + onChange: handleChange, + tabIndex: -1, + className: classes.nativeInput, + autoFocus: autoFocus + }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](IconComponent, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_8__["default"])(classes.icon, classes["icon".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(variant))], open && classes.iconOpen, disabled && classes.disabled) + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_Menu_Menu__WEBPACK_IMPORTED_MODULE_11__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + id: "menu-".concat(name || ''), + anchorEl: displayNode, + open: open, + onClose: handleClose + }, MenuProps, { + MenuListProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + 'aria-labelledby': labelId, + role: 'listbox', + disableListWrap: true + }, MenuProps.MenuListProps), + PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, MenuProps.PaperProps, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + minWidth: menuMinWidth + }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null) + }) + }), items)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (SelectInput); + +/***/ }), + +/***/ "Yik/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__("r0Co"); +var getPolyfill = __webpack_require__("hDBM"); + +module.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + define(String.prototype, { trim: polyfill }, { + trim: function testTrim() { + return String.prototype.trim !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ "Yivq": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var hide = __webpack_require__("XyXA"); +var uid = __webpack_require__("Jz0u"); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + + +/***/ }), + +/***/ "Ykzz": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getCreatedByApp = exports.hasBeenUpdatedByApp = void 0; + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var hasBeenUpdatedByApp = function hasBeenUpdatedByApp(doc, appSlug) { + var updatedByApps = (0, _get.default)(doc, 'cozyMetadata.updatedByApps'); + return Boolean(updatedByApps && updatedByApps.find(function (x) { + return x.slug === appSlug; + })); +}; + +exports.hasBeenUpdatedByApp = hasBeenUpdatedByApp; + +var getCreatedByApp = function getCreatedByApp(doc) { + return (0, _get.default)(doc, 'cozyMetadata.createdByApp'); +}; + +exports.getCreatedByApp = getCreatedByApp; + +/***/ }), + +/***/ "YlHc": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.16 Math.fround(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { fround: __webpack_require__("PPOs") }); + + +/***/ }), + +/***/ "Ynj+": +/***/ (function(module, exports, __webpack_require__) { + +var isArrayLike = __webpack_require__("yTJ1"), + isObjectLike = __webpack_require__("S5PF"); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; + + +/***/ }), + +/***/ "YoKN": +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__("GwHQ").f; +var has = __webpack_require__("00OQ"); +var TAG = __webpack_require__("Yhpl")('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), + +/***/ "YrPm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__("npFJ")(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__("sVxE"); +var hasOwn = __webpack_require__("H8OS"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "Yzjc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "severityFromString", function() { return severityFromString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "severityLevelFromString", function() { return severityLevelFromString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validSeverityLevels", function() { return validSeverityLevels; }); +// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either +// +// a) moving `validSeverityLevels` to `@sentry/types`, +// b) moving the`SeverityLevel` type here, or +// c) importing `validSeverityLevels` from here into `@sentry/types`. +// +// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would +// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the +// type, reminding anyone who changes it to change this list also, will have to do. + +const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug']; + +/** + * Converts a string-based level into a member of the deprecated {@link Severity} enum. + * + * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead. + * + * @param level String representation of Severity + * @returns Severity + */ +function severityFromString(level) { + return severityLevelFromString(level) ; +} + +/** + * Converts a string-based level into a `SeverityLevel`, normalizing it along the way. + * + * @param level String representation of desired `SeverityLevel`. + * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level. + */ +function severityLevelFromString(level) { + return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ; +} + + +//# sourceMappingURL=severity.js.map + + +/***/ }), + +/***/ "Z/lq": +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__("kTya"), + keysIn = __webpack_require__("+aIf"); + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +module.exports = toPlainObject; + + +/***/ }), + +/***/ "Z2AA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return InboundFilters; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_mergeOptions", function() { return _mergeOptions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_shouldDropEvent", function() { return _shouldDropEvent; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +// "Script error." is hard coded into browsers for errors that it can't read. +// this is the result of a script being pulled in from an external domain and CORS. +const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; + +/** Options for the InboundFilters integration */ + +/** Inbound filters configurable by the user */ +class InboundFilters { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'InboundFilters';} + + /** + * @inheritDoc + */ + __init() {this.name = InboundFilters.id;} + + constructor( _options = {}) {;this._options = _options;InboundFilters.prototype.__init.call(this);} + + /** + * @inheritDoc + */ + setupOnce(addGlobalEventProcessor, getCurrentHub) { + const eventProcess = (event) => { + const hub = getCurrentHub(); + if (hub) { + const self = hub.getIntegration(InboundFilters); + if (self) { + const client = hub.getClient(); + const clientOptions = client ? client.getOptions() : {}; + const options = _mergeOptions(self._options, clientOptions); + return _shouldDropEvent(event, options) ? null : event; + } + } + return event; + }; + + eventProcess.id = this.name; + addGlobalEventProcessor(eventProcess); + } +} InboundFilters.__initStatic(); + +/** JSDoc */ +function _mergeOptions( + internalOptions = {}, + clientOptions = {}, +) { + return { + allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])], + denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])], + ignoreErrors: [ + ...(internalOptions.ignoreErrors || []), + ...(clientOptions.ignoreErrors || []), + ...DEFAULT_IGNORE_ERRORS, + ], + ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true, + }; +} + +/** JSDoc */ +function _shouldDropEvent(event, options) { + if (options.ignoreInternal && _isSentryError(event)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])(event)}`); + return true; + } + if (_isIgnoredError(event, options.ignoreErrors)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn( + `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])(event)}`, + ); + return true; + } + if (_isDeniedUrl(event, options.denyUrls)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn( + `Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])( + event, + )}.\nUrl: ${_getEventFilterUrl(event)}`, + ); + return true; + } + if (!_isAllowedUrl(event, options.allowUrls)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn( + `Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])( + event, + )}.\nUrl: ${_getEventFilterUrl(event)}`, + ); + return true; + } + return false; +} + +function _isIgnoredError(event, ignoreErrors) { + if (!ignoreErrors || !ignoreErrors.length) { + return false; + } + + return _getPossibleEventMessages(event).some(message => Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["stringMatchesSomePattern"])(message, ignoreErrors)); +} + +function _isDeniedUrl(event, denyUrls) { + // TODO: Use Glob instead? + if (!denyUrls || !denyUrls.length) { + return false; + } + const url = _getEventFilterUrl(event); + return !url ? false : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["stringMatchesSomePattern"])(url, denyUrls); +} + +function _isAllowedUrl(event, allowUrls) { + // TODO: Use Glob instead? + if (!allowUrls || !allowUrls.length) { + return true; + } + const url = _getEventFilterUrl(event); + return !url ? true : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["stringMatchesSomePattern"])(url, allowUrls); +} + +function _getPossibleEventMessages(event) { + if (event.message) { + return [event.message]; + } + if (event.exception) { + try { + const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {}; + return [`${value}`, `${type}: ${value}`]; + } catch (oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error(`Cannot extract message for event ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])(event)}`); + return []; + } + } + return []; +} + +function _isSentryError(event) { + try { + // @ts-ignore can't be a sentry error if undefined + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return event.exception.values[0].type === 'SentryError'; + } catch (e) { + // ignore + } + return false; +} + +function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + const frame = frames[i]; + + if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') { + return frame.filename || null; + } + } + + return null; +} + +function _getEventFilterUrl(event) { + try { + let frames; + try { + // @ts-ignore we only care about frames if the whole thing here is defined + frames = event.exception.values[0].stacktrace.frames; + } catch (e) { + // ignore + } + return frames ? _getLastValidUrl(frames) : null; + } catch (oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error(`Cannot extract url for event ${Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getEventDescription"])(event)}`); + return null; + } +} + + +//# sourceMappingURL=inboundfilters.js.map + + +/***/ }), + +/***/ "Z3Ar": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_YEAR_DOCTYPE = void 0; +var ENEDIS_YEAR_DOCTYPE = 'com.grandlyon.enedis.year'; +exports.ENEDIS_YEAR_DOCTYPE = ENEDIS_YEAR_DOCTYPE; + +/***/ }), + +/***/ "Z4qh": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: { + standalone: 'manje od 1 sekunde', + withPrepositionAgo: 'manje od 1 sekunde', + withPrepositionIn: 'manje od 1 sekundu' + }, + dual: 'manje od {{count}} sekunde', + other: 'manje od {{count}} sekundi' + }, + + xSeconds: { + one: { + standalone: '1 sekunda', + withPrepositionAgo: '1 sekunde', + withPrepositionIn: '1 sekundu' + }, + dual: '{{count}} sekunde', + other: '{{count}} sekundi' + }, + + halfAMinute: 'pola minute', + + lessThanXMinutes: { + one: { + standalone: 'manje od 1 minute', + withPrepositionAgo: 'manje od 1 minute', + withPrepositionIn: 'manje od 1 minutu' + }, + dual: 'manje od {{count}} minute', + other: 'manje od {{count}} minuta' + }, + + xMinutes: { + one: { + standalone: '1 minuta', + withPrepositionAgo: '1 minute', + withPrepositionIn: '1 minutu' + }, + dual: '{{count}} minute', + other: '{{count}} minuta' + }, + + aboutXHours: { + one: { + standalone: 'oko 1 sat', + withPrepositionAgo: 'oko 1 sat', + withPrepositionIn: 'oko 1 sat' + }, + dual: 'oko {{count}} sata', + other: 'oko {{count}} sati' + }, + + xHours: { + one: { + standalone: '1 sat', + withPrepositionAgo: '1 sat', + withPrepositionIn: '1 sat' + }, + dual: '{{count}} sata', + other: '{{count}} sati' + }, + + xDays: { + one: { + standalone: '1 dan', + withPrepositionAgo: '1 dan', + withPrepositionIn: '1 dan' + }, + dual: '{{count}} dana', + other: '{{count}} dana' + }, + + aboutXMonths: { + one: { + standalone: 'oko 1 mjesec', + withPrepositionAgo: 'oko 1 mjesec', + withPrepositionIn: 'oko 1 mjesec' + }, + dual: 'oko {{count}} mjeseca', + other: 'oko {{count}} mjeseci' + }, + + xMonths: { + one: { + standalone: '1 mjesec', + withPrepositionAgo: '1 mjesec', + withPrepositionIn: '1 mjesec' + }, + dual: '{{count}} mjeseca', + other: '{{count}} mjeseci' + }, + + aboutXYears: { + one: { + standalone: 'oko 1 godinu', + withPrepositionAgo: 'oko 1 godinu', + withPrepositionIn: 'oko 1 godinu' + }, + dual: 'oko {{count}} godine', + other: 'oko {{count}} godina' + }, + + xYears: { + one: { + standalone: '1 godina', + withPrepositionAgo: '1 godine', + withPrepositionIn: '1 godinu' + }, + dual: '{{count}} godine', + other: '{{count}} godina' + }, + + overXYears: { + one: { + standalone: 'preko 1 godinu', + withPrepositionAgo: 'preko 1 godinu', + withPrepositionIn: 'preko 1 godinu' + }, + dual: 'preko {{count}} godine', + other: 'preko {{count}} godina' + }, + + almostXYears: { + one: { + standalone: 'gotovo 1 godinu', + withPrepositionAgo: 'gotovo 1 godinu', + withPrepositionIn: 'gotovo 1 godinu' + }, + dual: 'gotovo {{count}} godine', + other: 'gotovo {{count}} godina' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + if (options.addSuffix) { + if (options.comparison > 0) { + result = distanceInWordsLocale[token].one.withPrepositionIn + } else { + result = distanceInWordsLocale[token].one.withPrepositionAgo + } + } else { + result = distanceInWordsLocale[token].one.standalone + } + } else if ( + count % 10 > 1 && count % 10 < 5 && // if last digit is between 2 and 4 + String(count).substr(-2, 1) !== '1' // unless the 2nd to last digit is "1" + ) { + result = distanceInWordsLocale[token].dual.replace('{{count}}', count) + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'za ' + result + } else { + return 'prije ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "Z6pf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var formats = __webpack_require__("4eKc"); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; + + +/***/ }), + +/***/ "ZFuC": +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__("wWEB"); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; + + +/***/ }), + +/***/ "ZGFV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "memoBuilder", function() { return memoBuilder; }); +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/** + * Helper to decycle json objects + */ +function memoBuilder() { + const hasWeakSet = typeof WeakSet === 'function'; + const inner = hasWeakSet ? new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) { + if (inner.has(obj)) { + return true; + } + inner.add(obj); + return false; + } + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < inner.length; i++) { + const value = inner[i]; + if (value === obj) { + return true; + } + } + inner.push(obj); + return false; + } + + function unmemoize(obj) { + if (hasWeakSet) { + inner.delete(obj); + } else { + for (let i = 0; i < inner.length; i++) { + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } + } + } + return [memoize, unmemoize]; +} + + +//# sourceMappingURL=memo.js.map + + +/***/ }), + +/***/ "ZGxo": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.properId = void 0; + +var properId = function properId(doc) { + return doc.id || doc._id; +}; + +exports.properId = properId; + +/***/ }), + +/***/ "ZLBK": +/***/ (function(module, exports) { + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; + + +/***/ }), + +/***/ "ZN96": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _get2 = _interopRequireDefault(__webpack_require__("/yh+")); + +var _set = _interopRequireDefault(__webpack_require__("XA6X")); + +var _dsl = __webpack_require__("v2kV"); + +var _Association2 = _interopRequireDefault(__webpack_require__("urEX")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var HasOne = /*#__PURE__*/function (_Association) { + (0, _inherits2.default)(HasOne, _Association); + + var _super = _createSuper(HasOne); + + function HasOne() { + (0, _classCallCheck2.default)(this, HasOne); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(HasOne, [{ + key: "add", + + /** + * Add the relationship to the target document + * + * @param {import("../types").CozyClientDocument} doc - Document to add as a relationship + * @returns {import("../types").CozyClientDocument} The saved target document + */ + value: function add(doc) { + this.setRelationship(doc); + return this.save(this.target); + } + /** + * Remove the relationship from the target document + * + * @returns {import("../types").CozyClientDocument} The saved target document + */ + + }, { + key: "remove", + value: function remove() { + this.setRelationship(undefined); + return this.save(this.target); + } + }, { + key: "setRelationship", + value: function setRelationship(doc) { + if (doc && doc._type !== this.doctype) { + throw new Error("Tried to associate a ".concat(doc._type, " document to a HasOne relationship on ").concat(this.doctype, " document")); + } + + var path = "relationships[".concat(this.name, "].data"); + + if (doc) { + (0, _set.default)(this.target, path, { + _id: doc._id, + _type: doc._type + }); + } else { + (0, _set.default)(this.target, path, undefined); + } + } + }, { + key: "set", + value: function set(doc) { + _logger.default.warn('set is deprecated for has-one relationships. Use `add` instead.'); + + this.setRelationship(doc); + } + }, { + key: "unset", + value: function unset() { + _logger.default.warn('unset is deprecated for has-one relationships. Use `remove` instead.'); + + this.setRelationship(undefined); + } + }, { + key: "dehydrate", + value: function dehydrate(doc) { + if (!this.raw) { + return doc; + } + + return _objectSpread(_objectSpread({}, doc), {}, { + relationships: _objectSpread(_objectSpread({}, doc.relationships), {}, (0, _defineProperty2.default)({}, this.name, { + data: this.raw + })) + }); + } + }, { + key: "raw", + get: function get() { + return (0, _get2.default)(this.target, "relationships[".concat(this.name, "].data"), null); + } + }, { + key: "data", + get: function get() { + if (!this.raw) { + return null; + } + + return this.get(this.doctype, this.raw._id); + } + /** + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - The query params + * + * @returns {import("../types").CozyClientDocument | QueryDefinition} + */ + + }], [{ + key: "query", + value: function query(document, client, assoc) { + var relationship = (0, _get2.default)(document, "relationships.".concat(assoc.name, ".data"), {}); + + if (!relationship || !relationship._id) { + return null; + } + + return (0, _dsl.Q)(assoc.doctype).getById(relationship._id); + } + }]); + return HasOne; +}(_Association2.default); + +exports.default = HasOne; + +/***/ }), + +/***/ "ZP3U": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _slicedToArray; }); +/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("889z"); +/* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fZ9F"); +/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("LBaW"); +/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("J19X"); + + + + +function _slicedToArray(arr, i) { + return Object(_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr, i) || Object(_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); +} + +/***/ }), + +/***/ "ZTWm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var cyan = { + 50: '#e0f7fa', + 100: '#b2ebf2', + 200: '#80deea', + 300: '#4dd0e1', + 400: '#26c6da', + 500: '#00bcd4', + 600: '#00acc1', + 700: '#0097a7', + 800: '#00838f', + 900: '#006064', + A100: '#84ffff', + A200: '#18ffff', + A400: '#00e5ff', + A700: '#00b8d4' +}; +/* harmony default export */ __webpack_exports__["default"] = (cyan); + +/***/ }), + +/***/ "ZU7L": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__("lB3x"); +var anObject = __webpack_require__("eckd"); +var $flags = __webpack_require__("+TZB"); +var DESCRIPTORS = __webpack_require__("WXXH"); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + __webpack_require__("iNsi")(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (__webpack_require__("enc5")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + + +/***/ }), + +/***/ "ZUXf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); + +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var makeMutationsObject = function makeMutationsObject(mutations, client, props) { + return _merge.default.apply(void 0, (0, _toConsumableArray2.default)(mutations.map(function (mutations) { + return typeof mutations === 'function' ? mutations(client, props) : mutations; + }))); +}; +/** + * @function + * @description HOC to provide mutations to components. Needs client in context or as prop. + * @deprecated Prefer to use withClient and access directly the client. + * @param {Array<Function>} mutations One ore more mutations, which are function + * taking CozyClient as parameter and returning an object containing one or + * more mutations as attributes. + * @returns {Function} - Component that will receive mutations as props + */ + + +var withMutations = function withMutations() { + for (var _len = arguments.length, mutations = new Array(_len), _key = 0; _key < _len; _key++) { + mutations[_key] = arguments[_key]; + } + + return function (WrappedComponent) { + var wrappedDisplayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + + var Wrapper = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(Wrapper, _Component); + + var _super = _createSuper(Wrapper); + + function Wrapper(props, context) { + var _this; + + (0, _classCallCheck2.default)(this, Wrapper); + _this = _super.call(this, props, context); + var client = props.client || context.client; + + _logger.default.warn("Deprecation: withMutations will be removed in the near future, prefer to use withClient to access the client. See https://github.com/cozy/cozy-client/pull/638 for more information."); + + if (!client) { + throw new Error("Could not find \"client\" in either the context or props of ".concat(wrappedDisplayName)); + } + + _this.mutations = _objectSpread({ + createDocument: client.create.bind(client), + saveDocument: client.save.bind(client), + deleteDocument: client.destroy.bind(client) + }, makeMutationsObject(mutations, client, props)); + return _this; + } + + (0, _createClass2.default)(Wrapper, [{ + key: "render", + value: function render() { + return /*#__PURE__*/_react.default.createElement(WrappedComponent, (0, _extends2.default)({}, this.mutations, this.props)); + } + }]); + return Wrapper; + }(_react.Component); + + (0, _defineProperty2.default)(Wrapper, "contextTypes", { + client: _propTypes.default.object + }); + Wrapper.displayName = "WithMutations(".concat(wrappedDisplayName, ")"); + return Wrapper; + }; +}; + +var _default = withMutations; +exports.default = _default; + +/***/ }), + +/***/ "ZV7m": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = createWebStorage; + +var _getStorage = __webpack_require__("LVeX"); + +var _getStorage2 = _interopRequireDefault(_getStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createWebStorage(type) { + var storage = (0, _getStorage2.default)(type); + return { + getItem: function getItem(key) { + return new Promise(function (resolve, reject) { + resolve(storage.getItem(key)); + }); + }, + setItem: function setItem(key, item) { + return new Promise(function (resolve, reject) { + resolve(storage.setItem(key, item)); + }); + }, + removeItem: function removeItem(key) { + return new Promise(function (resolve, reject) { + resolve(storage.removeItem(key)); + }); + } + }; +} + +/***/ }), + +/***/ "ZYYc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.start = start; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _objectSpread2 = _interopRequireDefault(__webpack_require__("qAtN")); + +var _helpers = __webpack_require__("6cet"); + +var dom = _interopRequireWildcard(__webpack_require__("w+m+")); + +var _listener = _interopRequireDefault(__webpack_require__("wsII")); + +/** + * Keeps only http://domain:port/ + */ +var extractOrigin = function extractOrigin(url) { + return url.split('/', 3).join('/'); +}; +/** + * Creates the intent iframe and reacts to its messages. + * + * 1. Converts done/error/cancel/exposeFrameRemoval into Promise resolve/reject + * 2. Handles resize to style the DOM element holding the intent + * 3. Handles compose to create a child intent + * 4. Manages the lifecycle of the iframe. It is inserted into the DOM + * at the beginning and removed when the intent has completed. + */ + + +function start(createIntent, intent, element, data) { + var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + var receiver, iframe; + + var destroy = function destroy() { + iframe && dom.remove(iframe); + receiver && receiver.stopListening(); + }; + + var onComplete = function onComplete() { + destroy(); + }; + + var prom = new Promise(function (resolve, reject) { + var service = (0, _helpers.pickService)(intent, options.filterServices); + iframe = dom.insertIntentIframe(intent, element, service.href, options.onReadyCallback); + var serviceOrigin = extractOrigin(service.href); + receiver = new _listener.default({ + intentId: intent.id, + origin: serviceOrigin, + onReady: function onReady(event) { + event.source.postMessage(data, event.origin); + }, + onDone: function onDone(event) { + resolve(event.data.document); + onComplete(); + }, + onCancel: function onCancel() { + resolve(null); + onComplete(); + }, + onError: function onError(errorOrEvent) { + reject(errorOrEvent instanceof Event ? _helpers.errorSerializer.deserialize(errorOrEvent.data.error) : errorOrEvent); + onComplete(); + }, + onResize: function onResize(event) { + var _event$data = event.data, + transition = _event$data.transition, + dimensions = _event$data.dimensions; + dom.applyStyle(element, (0, _objectSpread2.default)({ + transition: transition + }, dimensions)); + }, + onExposeFrameRemoval: function onExposeFrameRemoval(event) { + resolve({ + document: event.document, + removeIntentIframe: function removeIntentIframe() { + return dom.remove(iframe); + } + }); + }, + onCompose: function () { + var _onCompose = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(event) { + var _event$data2, action, doctype, data, source, origin, intent, doc; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _event$data2 = event.data, action = _event$data2.action, doctype = _event$data2.doctype, data = _event$data2.data; + source = event.source, origin = event.origin; // Let start to name `type` as `doctype`, as `event.data` already have a `type` attribute. + + _context.next = 4; + return createIntent(action, doctype, data); + + case 4: + intent = _context.sent; + dom.hide(iframe); + _context.prev = 6; + _context.next = 9; + return start(createIntent, intent, element, (0, _objectSpread2.default)({}, data, { + exposeIntentFrameRemoval: false + })); + + case 9: + doc = _context.sent; + source.postMessage(doc, origin); + + case 11: + _context.prev = 11; + dom.show(iframe); + return _context.finish(11); + + case 14: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[6,, 11, 14]]); + })); + + function onCompose(_x) { + return _onCompose.apply(this, arguments); + } + + return onCompose; + }() + }); + receiver.listen(); + }); + prom.destroy = destroy; + return prom; +} + +/***/ }), + +/***/ "ZZVX": +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__("87D/"), + isMasked = __webpack_require__("+IPG"), + isObject = __webpack_require__("06hQ"), + toSource = __webpack_require__("zvTh"); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; + + +/***/ }), + +/***/ "Zb9F": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__("WXXH"), 'Object', { defineProperty: __webpack_require__("GwHQ").f }); + + +/***/ }), + +/***/ "ZbWQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("PFyx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _SvgIcon__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "ZhqA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSubscription", function() { return createSubscription; }); +/* harmony import */ var _batch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qy6m"); + // encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants + +function createListenerCollection() { + var batch = Object(_batch__WEBPACK_IMPORTED_MODULE_0__["getBatch"])(); + var first = null; + var last = null; + return { + clear: function clear() { + first = null; + last = null; + }, + notify: function notify() { + batch(function () { + var listener = first; + + while (listener) { + listener.callback(); + listener = listener.next; + } + }); + }, + get: function get() { + var listeners = []; + var listener = first; + + while (listener) { + listeners.push(listener); + listener = listener.next; + } + + return listeners; + }, + subscribe: function subscribe(callback) { + var isSubscribed = true; + var listener = last = { + callback: callback, + next: null, + prev: last + }; + + if (listener.prev) { + listener.prev.next = listener; + } else { + first = listener; + } + + return function unsubscribe() { + if (!isSubscribed || first === null) return; + isSubscribed = false; + + if (listener.next) { + listener.next.prev = listener.prev; + } else { + last = listener.prev; + } + + if (listener.prev) { + listener.prev.next = listener.next; + } else { + first = listener.next; + } + }; + } + }; +} + +var nullListeners = { + notify: function notify() {}, + get: function get() { + return []; + } +}; +function createSubscription(store, parentSub) { + var unsubscribe; + var listeners = nullListeners; + + function addNestedSub(listener) { + trySubscribe(); + return listeners.subscribe(listener); + } + + function notifyNestedSubs() { + listeners.notify(); + } + + function handleChangeWrapper() { + if (subscription.onStateChange) { + subscription.onStateChange(); + } + } + + function isSubscribed() { + return Boolean(unsubscribe); + } + + function trySubscribe() { + if (!unsubscribe) { + unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); + listeners = createListenerCollection(); + } + } + + function tryUnsubscribe() { + if (unsubscribe) { + unsubscribe(); + unsubscribe = undefined; + listeners.clear(); + listeners = nullListeners; + } + } + + var subscription = { + addNestedSub: addNestedSub, + notifyNestedSubs: notifyNestedSubs, + handleChangeWrapper: handleChangeWrapper, + isSubscribed: isSubscribed, + trySubscribe: trySubscribe, + tryUnsubscribe: tryUnsubscribe, + getListeners: function getListeners() { + return listeners; + } + }; + return subscription; +} + +/***/ }), + +/***/ "Zidy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("b+/j"); +/* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("SRIV"); +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("NFku"); + + + + + + + + + // Link a style sheet with a component. +// It does not modify the component passed to it; +// instead, it returns a new component, with a `classes` property. + +var withStyles = function withStyles(stylesOrCreator) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return function (Component) { + var defaultTheme = options.defaultTheme, + _options$withTheme = options.withTheme, + withTheme = _options$withTheme === void 0 ? false : _options$withTheme, + name = options.name, + stylesOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["defaultTheme", "withTheme", "name"]); + + if (false) {} + + var classNamePrefix = name; + + if (false) { var displayName; } + + var useStyles = Object(_makeStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + defaultTheme: defaultTheme, + Component: Component, + name: name || Component.displayName, + classNamePrefix: classNamePrefix + }, stylesOptions)); + var WithStyles = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function WithStyles(props, ref) { + var classesProp = props.classes, + innerRef = props.innerRef, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "innerRef"]); // The wrapper receives only user supplied props, which could be a subset of + // the actual props Component might receive due to merging with defaultProps. + // So copying it here would give us the same result in the wrapper as well. + + + var classes = useStyles(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, Component.defaultProps, props)); + var theme; + var more = other; + + if (typeof name === 'string' || withTheme) { + // name and withTheme are invariant in the outer scope + // eslint-disable-next-line react-hooks/rules-of-hooks + theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_8__["default"])() || defaultTheme; + + if (name) { + more = Object(_getThemeProps__WEBPACK_IMPORTED_MODULE_7__["default"])({ + theme: theme, + name: name, + props: other + }); + } // Provide the theme to the wrapped component. + // So we don't have to use the `withTheme()` Higher-order Component. + + + if (withTheme && !more.theme) { + more.theme = theme; + } + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: innerRef || ref, + classes: classes + }, more)); + }); + false ? undefined : void 0; + + if (false) {} + + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(WithStyles, Component); + + if (false) {} + + return WithStyles; + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (withStyles); + +/***/ }), + +/***/ "ZmJ+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locations", function() { return locations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getJsApiName", function() { return getJsApiName; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getReactApiName", function() { return getReactApiName; }); +var locations = ['left', 'center', 'right', 'search']; + +var upperFirstLetter = function upperFirstLetter(val) { + return val[0].toUpperCase() + val.slice(1); +}; + +var getJsApiName = function getJsApiName(location) { + return "setBar".concat(upperFirstLetter(location)); +}; +var getReactApiName = function getReactApiName(location) { + return "Bar".concat(upperFirstLetter(location)); +}; + +/***/ }), + +/***/ "ZnQe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("csMb"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ll/m"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("sbbm"); +/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("wniO"); +/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("bH5F"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("UPk3"); +/* harmony import */ var _styles_zIndex__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("kshm"); +/* harmony import */ var _ModalManager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("KdLj"); +/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("+buf"); +/* harmony import */ var _SimpleBackdrop__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("o2e7"); + + + + + + + + + + + + + + + + + + +function getContainer(container) { + container = typeof container === 'function' ? container() : container; + return react_dom__WEBPACK_IMPORTED_MODULE_3__["findDOMNode"](container); +} + +function getHasTransition(props) { + return props.children ? props.children.props.hasOwnProperty('in') : false; +} // A modal manager used to track and manage the state of open Modals. +// Modals don't open on the server so this won't conflict with concurrent requests. + + +var defaultManager = new _ModalManager__WEBPACK_IMPORTED_MODULE_14__["default"](); +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'fixed', + zIndex: theme.zIndex.modal, + right: 0, + bottom: 0, + top: 0, + left: 0 + }, + + /* Styles applied to the root element if the `Modal` has exited. */ + hidden: { + visibility: 'hidden' + } + }; +}; +/** + * Modal is a lower-level construct that is leveraged by the following components: + * + * - [Dialog](/api/dialog/) + * - [Drawer](/api/drawer/) + * - [Menu](/api/menu/) + * - [Popover](/api/popover/) + * + * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component + * rather than directly using Modal. + * + * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals). + */ + +var Modal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Modal(inProps, ref) { + var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__["useTheme"])(); + var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__["getThemeProps"])({ + name: 'MuiModal', + props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, inProps), + theme: theme + }); + + var _props$BackdropCompon = props.BackdropComponent, + BackdropComponent = _props$BackdropCompon === void 0 ? _SimpleBackdrop__WEBPACK_IMPORTED_MODULE_16__["default"] : _props$BackdropCompon, + BackdropProps = props.BackdropProps, + children = props.children, + _props$closeAfterTran = props.closeAfterTransition, + closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran, + container = props.container, + _props$disableAutoFoc = props.disableAutoFocus, + disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc, + _props$disableBackdro = props.disableBackdropClick, + disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro, + _props$disableEnforce = props.disableEnforceFocus, + disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce, + _props$disableEscapeK = props.disableEscapeKeyDown, + disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK, + _props$disablePortal = props.disablePortal, + disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal, + _props$disableRestore = props.disableRestoreFocus, + disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore, + _props$disableScrollL = props.disableScrollLock, + disableScrollLock = _props$disableScrollL === void 0 ? false : _props$disableScrollL, + _props$hideBackdrop = props.hideBackdrop, + hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop, + _props$keepMounted = props.keepMounted, + keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted, + _props$manager = props.manager, + manager = _props$manager === void 0 ? defaultManager : _props$manager, + onBackdropClick = props.onBackdropClick, + onClose = props.onClose, + onEscapeKeyDown = props.onEscapeKeyDown, + onRendered = props.onRendered, + open = props.open, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["BackdropComponent", "BackdropProps", "children", "closeAfterTransition", "container", "disableAutoFocus", "disableBackdropClick", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onEscapeKeyDown", "onRendered", "open"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](true), + exited = _React$useState[0], + setExited = _React$useState[1]; + + var modal = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({}); + var mountNodeRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var modalRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_11__["default"])(modalRef, ref); + var hasTransition = getHasTransition(props); + + var getDoc = function getDoc() { + return Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__["default"])(mountNodeRef.current); + }; + + var getModal = function getModal() { + modal.current.modalRef = modalRef.current; + modal.current.mountNode = mountNodeRef.current; + return modal.current; + }; + + var handleMounted = function handleMounted() { + manager.mount(getModal(), { + disableScrollLock: disableScrollLock + }); // Fix a bug on Chrome where the scroll isn't initially 0. + + modalRef.current.scrollTop = 0; + }; + + var handleOpen = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_12__["default"])(function () { + var resolvedContainer = getContainer(container) || getDoc().body; + manager.add(getModal(), resolvedContainer); // The element was already mounted. + + if (modalRef.current) { + handleMounted(); + } + }); + var isTopModal = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + return manager.isTopModal(getModal()); + }, [manager]); + var handlePortalRef = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_12__["default"])(function (node) { + mountNodeRef.current = node; + + if (!node) { + return; + } + + if (onRendered) { + onRendered(); + } + + if (open && isTopModal()) { + handleMounted(); + } else { + Object(_ModalManager__WEBPACK_IMPORTED_MODULE_14__["ariaHidden"])(modalRef.current, true); + } + }); + var handleClose = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + manager.remove(getModal()); + }, [manager]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + return function () { + handleClose(); + }; + }, [handleClose]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (open) { + handleOpen(); + } else if (!hasTransition || !closeAfterTransition) { + handleClose(); + } + }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]); + + if (!keepMounted && !open && (!hasTransition || exited)) { + return null; + } + + var handleEnter = function handleEnter() { + setExited(false); + }; + + var handleExited = function handleExited() { + setExited(true); + + if (closeAfterTransition) { + handleClose(); + } + }; + + var handleBackdropClick = function handleBackdropClick(event) { + if (event.target !== event.currentTarget) { + return; + } + + if (onBackdropClick) { + onBackdropClick(event); + } + + if (!disableBackdropClick && onClose) { + onClose(event, 'backdropClick'); + } + }; + + var handleKeyDown = function handleKeyDown(event) { + // The handler doesn't take event.defaultPrevented into account: + // + // event.preventDefault() is meant to stop default behaviours like + // clicking a checkbox to check it, hitting a button to submit a form, + // and hitting left arrow to move the cursor in a text input etc. + // Only special HTML elements have these default behaviors. + if (event.key !== 'Escape' || !isTopModal()) { + return; + } + + if (onEscapeKeyDown) { + onEscapeKeyDown(event); + } + + if (!disableEscapeKeyDown) { + // Swallow the event, in case someone is listening for the escape key on the body. + event.stopPropagation(); + + if (onClose) { + onClose(event, 'escapeKeyDown'); + } + } + }; + + var inlineStyle = styles(theme || { + zIndex: _styles_zIndex__WEBPACK_IMPORTED_MODULE_13__["default"] + }); + var childProps = {}; + + if (children.props.tabIndex === undefined) { + childProps.tabIndex = children.props.tabIndex || '-1'; + } // It's a Transition like component + + + if (hasTransition) { + childProps.onEnter = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__["default"])(handleEnter, children.props.onEnter); + childProps.onExited = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__["default"])(handleExited, children.props.onExited); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Portal__WEBPACK_IMPORTED_MODULE_9__["default"], { + ref: handlePortalRef, + container: container, + disablePortal: disablePortal + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + ref: handleRef, + onKeyDown: handleKeyDown, + role: "presentation" + }, other, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, inlineStyle.root, !open && exited ? inlineStyle.hidden : {}, other.style) + }), hideBackdrop ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](BackdropComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + open: open, + onClick: handleBackdropClick + }, BackdropProps)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_15__["default"], { + disableEnforceFocus: disableEnforceFocus, + disableAutoFocus: disableAutoFocus, + disableRestoreFocus: disableRestoreFocus, + getDoc: getDoc, + isEnabled: isTopModal, + open: open + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](children, childProps)))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Modal); + +/***/ }), + +/***/ "ZoqY": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("HKTt") +var buildFormatLocale = __webpack_require__("L1Oa") + +/** + * @category Locales + * @summary Chinese Simplified locale. + * @author tonypai [@tpai]{@link https://github.com/tpai} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "ZpFK": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.7 String.prototype.includes(searchString, position = 0) + +var $export = __webpack_require__("LRPZ"); +var context = __webpack_require__("OdrC"); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * __webpack_require__("5cT/")(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ "ZrPw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useFormControl", function() { return useFormControl; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + */ + +var FormControlContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); + +if (false) {} + +function useFormControl() { + return react__WEBPACK_IMPORTED_MODULE_0__["useContext"](FormControlContext); +} +/* harmony default export */ __webpack_exports__["default"] = (FormControlContext); + +/***/ }), + +/***/ "Zs9j": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("5ZEc"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'block', + textAlign: 'inherit', + width: '100%', + '&:hover $focusHighlight': { + opacity: theme.palette.action.hoverOpacity + }, + '&$focusVisible $focusHighlight': { + opacity: 0.12 + } + }, + + /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */ + focusVisible: {}, + + /* Styles applied to the overlay that covers the action area when it is keyboard focused. */ + focusHighlight: { + overflow: 'hidden', + pointerEvents: 'none', + position: 'absolute', + top: 0, + right: 0, + bottom: 0, + left: 0, + borderRadius: 'inherit', + opacity: 0, + backgroundColor: 'currentcolor', + transition: theme.transitions.create('opacity', { + duration: theme.transitions.duration.short + }) + } + }; +}; +var CardActionArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CardActionArea(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + focusVisibleClassName = props.focusVisibleClassName, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "focusVisibleClassName"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(focusVisibleClassName, classes.focusVisible), + ref: ref + }, other), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.focusHighlight + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiCardActionArea' +})(CardActionArea)); + +/***/ }), + +/***/ "Zvb3": +/***/ (function(module, exports) { + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} + +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "ZwQu": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"), + getRawTag = __webpack_require__("gzBq"), + objectToString = __webpack_require__("CJ9k"); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; + + +/***/ }), + +/***/ "ZxWb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = ({ + disabled: false +}); + +/***/ }), + +/***/ "ZyOJ": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseIntersection = __webpack_require__("Rs/3"), + baseRest = __webpack_require__("Ce+n"), + castArrayLikeObject = __webpack_require__("aP7c"); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; + + +/***/ }), + +/***/ "ZySd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + padding: theme.spacing(1, 2, 2) + } + }; +}; +var AccordionDetails = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function AccordionDetails(props, ref) { + var classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiAccordionDetails' +})(AccordionDetails)); + +/***/ }), + +/***/ "a1Fv": +/***/ (function(module, exports, __webpack_require__) { + +var setPrototypeOf = __webpack_require__("4dPT"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) setPrototypeOf(subClass, superClass); +} + +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "a5Cf": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("2oAD") +var buildFormatLocale = __webpack_require__("jVdS") + +/** + * @category Locales + * @summary Slovak locale. + * @author Marek Suscak [@mareksuscak]{@link https://github.com/mareksuscak} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "a6fU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/devices.svg` to regenerate; + +function SvgDevices(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M9.734 5.995c0-.55.45-.995.99-.995h4.02a1 1 0 01.99.995v8.01c0 .55-.451.995-.99.995h-4.02a1 1 0 01-.99-.995v-8.01zm2 1.005v6h2V7h-2zm-11-5.002c0-.551.447-.998.998-.998h11.003c.552 0 .999.444.999 1v1h-11v6h5v4H.73c-.55 0-.858-.417-.68-.95L.733 10V1.998z" + })); +} +var _default = SvgDevices; +exports.default = _default; + +/***/ }), + +/***/ "a8Zm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCurrentApp", function() { return isCurrentApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getApps", function() { return getApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHomeApp", function() { return getHomeApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingApps", function() { return isFetchingApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasFetched", function() { return hasFetched; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteApp", function() { return deleteApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "receiveApp", function() { return receiveApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfos", function() { return setInfos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchApps", function() { return fetchApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultApp", function() { return setDefaultApp; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("jTJl"); +/* harmony import */ var lodash_unionwith__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("9k8N"); +/* harmony import */ var lodash_unionwith__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_unionwith__WEBPACK_IMPORTED_MODULE_4__); + + + + + // constants + +var DELETE_APP = 'DELETE_APP'; +var RECEIVE_APP = 'RECEIVE_APP'; +var RECEIVE_APP_LIST = 'RECEIVE_APP_LIST'; +var RECEIVE_HOME_APP = 'RECEIVE_HOME_APP'; +var FETCH_APPS = 'FETCH_APPS'; +var FETCH_APPS_FAILURE = 'FETCH_APPS_FAILURE'; +var SET_INFOS = 'SET_INFOS'; +var isCurrentApp = function isCurrentApp(state, app) { + return app.slug === state.appSlug; +}; // selectors + +var getApps = function getApps(state) { + if (!state.apps) return []; + return state.apps; +}; +var getHomeApp = function getHomeApp(state) { + return state.homeApp; +}; +var isFetchingApps = function isFetchingApps(state) { + return state ? state.isFetching : false; +}; +var hasFetched = function hasFetched(state) { + return state.hasFetched; +}; // actions + +var deleteApp = function deleteApp(app) { + return { + type: DELETE_APP, + app: app + }; +}; +var receiveApp = function receiveApp(app) { + return { + type: RECEIVE_APP, + app: app + }; +}; + +var receiveAppList = function receiveAppList(apps) { + return { + type: RECEIVE_APP_LIST, + apps: apps + }; +}; + +var receiveHomeApp = function receiveHomeApp(homeApp) { + return { + type: RECEIVE_HOME_APP, + homeApp: homeApp + }; +}; + +var setInfos = function setInfos(appName, appNamePrefix, appSlug) { + return { + type: SET_INFOS, + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug + }; +}; // actions async + +var fetchApps = function fetchApps() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch) { + var rawAppList, apps; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + dispatch({ + type: FETCH_APPS + }); + _context.next = 4; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.apps(); + + case 4: + rawAppList = _context.sent; + apps = rawAppList.map(mapApp); + + if (rawAppList.length) { + _context.next = 8; + break; + } + + throw new Error('No installed apps found by the bar'); + + case 8: + _context.next = 10; + return dispatch(setDefaultApp(apps)); + + case 10: + _context.next = 12; + return dispatch(receiveAppList(apps)); + + case 12: + _context.next = 18; + break; + + case 14: + _context.prev = 14; + _context.t0 = _context["catch"](0); + dispatch({ + type: FETCH_APPS_FAILURE + }); // eslint-disable-next-line no-console + + console.warn(_context.t0.message ? _context.t0.message : _context.t0); + + case 18: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 14]]); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); +}; +/** + * + * @param {Array} appsList + */ + +var setDefaultApp = function setDefaultApp(appsList) { + return /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(dispatch) { + var HOME_APP_SLUG, homeApp; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + HOME_APP_SLUG = 'home'; + homeApp = findAppInArray(HOME_APP_SLUG, appsList); + + if (!homeApp) { + _context2.next = 5; + break; + } + + return _context2.abrupt("return", dispatch(receiveHomeApp(homeApp))); + + case 5: + _context2.next = 10; + break; + + case 7: + _context2.prev = 7; + _context2.t0 = _context2["catch"](0); + // eslint-disable-next-line no-console + console.warn("Cozy-bar cannot fetch home app data: ".concat(_context2.t0.message)); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[0, 7]]); + })); + + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + apps: [], + homeApp: null, + isFetching: true, + appName: null, + appNamePrefix: null, + appSlug: null, + hasFetched: false +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_APPS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_APPS_FAILURE: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false + }); + + case RECEIVE_APP: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + apps: lodash_unionwith__WEBPACK_IMPORTED_MODULE_4___default()(state.apps, [mapApp(action.app)], function (appA, appB) { + return appA.slug === appB.slug; + }) + }); + + case RECEIVE_APP_LIST: + { + var appsList = action.apps.map(function (app) { + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, app, { + isCurrentApp: isCurrentApp(state, app) + }); + }); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false, + hasFetched: true, + apps: appsList + }); + } + + case RECEIVE_HOME_APP: + { + var homeApp = action.homeApp; + return isCurrentApp(state, homeApp) ? _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + homeApp: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, homeApp, { + isCurrentApp: true + }) + }) : _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + homeApp: homeApp + }); + } + + case DELETE_APP: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + apps: state.apps.filter(function (app) { + return app.slug !== action.app.slug; + }) + }); + + case SET_INFOS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + appName: action.appName, + appNamePrefix: action.appNamePrefix, + appSlug: action.appSlug + }); + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); // helpers + +var camelCasify = function camelCasify(object) { + return !!object && Object.keys(object).reduce(function (acc, key) { + var camelCaseKey = key.split('_').map(function (segment, index) { + return index ? segment.charAt(0).toUpperCase() + segment.slice(1) : segment; + }).join(''); + acc[camelCaseKey] = object[key]; + return acc; + }, {}); +}; + +var mapApp = function mapApp(app) { + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, app, camelCasify(app.attributes), { + href: app.links && app.links.related + }); +}; + +var findAppInArray = function findAppInArray(appSlug, apps) { + return apps.find(function (app) { + return app.slug === appSlug; + }); +}; + +/***/ }), + +/***/ "aB24": +/***/ (function(module, exports, __webpack_require__) { + +var arrayAggregator = __webpack_require__("l+XL"), + baseAggregator = __webpack_require__("HIuA"), + baseIteratee = __webpack_require__("JF7T"), + isArray = __webpack_require__("8u9v"); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; + + +/***/ }), + +/***/ "aBQA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3Vsr"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "aBal": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIntegrationsToSetup", function() { return getIntegrationsToSetup; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "installedIntegrations", function() { return installedIntegrations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setupIntegrations", function() { return setupIntegrations; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("l3L7"); +/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Hk8K"); + + + + +const installedIntegrations = []; + +/** Map of integrations assigned to a client */ + +/** + * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to + * preseve the order of integrations in the array. + * + * @private + */ +function filterDuplicates(integrations) { + const integrationsByName = {}; + + integrations.forEach(currentInstance => { + const { name } = currentInstance; + + const existingInstance = integrationsByName[name]; + + // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a + // default instance to overwrite an existing user instance + if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) { + return; + } + + integrationsByName[name] = currentInstance; + }); + + return Object.values(integrationsByName); +} + +/** Gets integrations to install */ +function getIntegrationsToSetup(options) { + const defaultIntegrations = options.defaultIntegrations || []; + const userIntegrations = options.integrations; + + // We flag default instances, so that later we can tell them apart from any user-created instances of the same class + defaultIntegrations.forEach(integration => { + integration.isDefaultInstance = true; + }); + + let integrations; + + if (Array.isArray(userIntegrations)) { + integrations = [...defaultIntegrations, ...userIntegrations]; + } else if (typeof userIntegrations === 'function') { + integrations = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["arrayify"])(userIntegrations(defaultIntegrations)); + } else { + integrations = defaultIntegrations; + } + + const finalIntegrations = filterDuplicates(integrations); + + // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or + // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event + // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore + // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array. + const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug'); + if (debugIndex !== -1) { + const [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + + return finalIntegrations; +} + +/** + * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default + * integrations are added unless they were already provided before. + * @param integrations array of integration instances + * @param withDefault should enable default integrations + */ +function setupIntegrations(integrations) { + const integrationIndex = {}; + + integrations.forEach(integration => { + integrationIndex[integration.name] = integration; + + if (installedIntegrations.indexOf(integration.name) === -1) { + integration.setupOnce(_scope_js__WEBPACK_IMPORTED_MODULE_2__["addGlobalEventProcessor"], _hub_js__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"]); + installedIntegrations.push(integration.name); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`Integration installed: ${integration.name}`); + } + }); + + return integrationIndex; +} + + +//# sourceMappingURL=integration.js.map + + +/***/ }), + +/***/ "aG6e": +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__("Ce+n"), + unzip = __webpack_require__("mcWW"); + +/** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ +var zip = baseRest(unzip); + +module.exports = zip; + + +/***/ }), + +/***/ "aKmJ": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("pFmr"); +var document = __webpack_require__("ETne").document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ "aKsV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OJkG"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + color: theme.palette.text.secondary + }, theme.typography.body1, { + lineHeight: 1, + padding: 0, + '&$focused': { + color: theme.palette.primary.main + }, + '&$disabled': { + color: theme.palette.text.disabled + }, + '&$error': { + color: theme.palette.error.main + } + }), + + /* Styles applied to the root element if the color is secondary. */ + colorSecondary: { + '&$focused': { + color: theme.palette.secondary.main + } + }, + + /* Pseudo-class applied to the root element if `focused={true}`. */ + focused: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Pseudo-class applied to the root element if `filled={true}`. */ + filled: {}, + + /* Pseudo-class applied to the root element if `required={true}`. */ + required: {}, + + /* Styles applied to the asterisk element. */ + asterisk: { + '&$error': { + color: theme.palette.error.main + } + } + }; +}; +var FormLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FormLabel(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + color = props.color, + _props$component = props.component, + Component = _props$component === void 0 ? 'label' : _props$component, + disabled = props.disabled, + error = props.error, + filled = props.filled, + focused = props.focused, + required = props.required, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["children", "classes", "className", "color", "component", "disabled", "error", "filled", "focused", "required"]); + + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__["default"])(); + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['color', 'required', 'focused', 'disabled', 'error', 'filled'] + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fcs.filled && classes.filled, fcs.focused && classes.focused, fcs.required && classes.required), + ref: ref + }, other), children, fcs.required && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + "aria-hidden": true, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.asterisk, fcs.error && classes.error) + }, "\u2009", '*')); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiFormLabel' +})(FormLabel)); + +/***/ }), + +/***/ "aOi9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = __webpack_require__("yx3C")(); + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; + + +/***/ }), + +/***/ "aP7c": +/***/ (function(module, exports, __webpack_require__) { + +var isArrayLikeObject = __webpack_require__("Ynj+"); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; + + +/***/ }), + +/***/ "aPY+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _functiontostring_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mWT8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return _functiontostring_js__WEBPACK_IMPORTED_MODULE_0__["FunctionToString"]; }); + +/* harmony import */ var _inboundfilters_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Z2AA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return _inboundfilters_js__WEBPACK_IMPORTED_MODULE_1__["InboundFilters"]; }); + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "aPjV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("jiof"); +/* harmony import */ var _NotchedOutline__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("1mWX"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); + + + + + + + + + +var styles = function styles(theme) { + var borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'; + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + borderRadius: theme.shape.borderRadius, + '&:hover $notchedOutline': { + borderColor: theme.palette.text.primary + }, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + '&:hover $notchedOutline': { + borderColor: borderColor + } + }, + '&$focused $notchedOutline': { + borderColor: theme.palette.primary.main, + borderWidth: 2 + }, + '&$error $notchedOutline': { + borderColor: theme.palette.error.main + }, + '&$disabled $notchedOutline': { + borderColor: theme.palette.action.disabled + } + }, + + /* Styles applied to the root element if the color is secondary. */ + colorSecondary: { + '&$focused $notchedOutline': { + borderColor: theme.palette.secondary.main + } + }, + + /* Styles applied to the root element if the component is focused. */ + focused: {}, + + /* Styles applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `startAdornment` is provided. */ + adornedStart: { + paddingLeft: 14 + }, + + /* Styles applied to the root element if `endAdornment` is provided. */ + adornedEnd: { + paddingRight: 14 + }, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Styles applied to the `input` element if `margin="dense"`. */ + marginDense: {}, + + /* Styles applied to the root element if `multiline={true}`. */ + multiline: { + padding: '18.5px 14px', + '&$marginDense': { + paddingTop: 10.5, + paddingBottom: 10.5 + } + }, + + /* Styles applied to the `NotchedOutline` element. */ + notchedOutline: { + borderColor: borderColor + }, + + /* Styles applied to the `input` element. */ + input: { + padding: '18.5px 14px', + '&:-webkit-autofill': { + WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset', + WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff', + caretColor: theme.palette.type === 'light' ? null : '#fff', + borderRadius: 'inherit' + } + }, + + /* Styles applied to the `input` element if `margin="dense"`. */ + inputMarginDense: { + paddingTop: 10.5, + paddingBottom: 10.5 + }, + + /* Styles applied to the `input` element if `multiline={true}`. */ + inputMultiline: { + padding: 0 + }, + + /* Styles applied to the `input` element if `startAdornment` is provided. */ + inputAdornedStart: { + paddingLeft: 0 + }, + + /* Styles applied to the `input` element if `endAdornment` is provided. */ + inputAdornedEnd: { + paddingRight: 0 + } + }; +}; +var OutlinedInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function OutlinedInput(props, ref) { + var classes = props.classes, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$inputComponent = props.inputComponent, + inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent, + label = props.label, + _props$labelWidth = props.labelWidth, + labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth, + _props$multiline = props.multiline, + multiline = _props$multiline === void 0 ? false : _props$multiline, + notched = props.notched, + _props$type = props.type, + type = _props$type === void 0 ? 'text' : _props$type, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "fullWidth", "inputComponent", "label", "labelWidth", "multiline", "notched", "type"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_InputBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + renderSuffix: function renderSuffix(state) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_NotchedOutline__WEBPACK_IMPORTED_MODULE_7__["default"], { + className: classes.notchedOutline, + label: label, + labelWidth: labelWidth, + notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused) + }); + }, + classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, classes, { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.underline), + notchedOutline: null + }), + fullWidth: fullWidth, + inputComponent: inputComponent, + multiline: multiline, + ref: ref, + type: type + }, other)); +}); + false ? undefined : void 0; +OutlinedInput.muiName = 'Input'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiOutlinedInput' +})(OutlinedInput)); + +/***/ }), + +/***/ "aTyc": +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__("ARbH"); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), + +/***/ "aUjI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("R9Wl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDomElement", function() { return _browser_js__WEBPACK_IMPORTED_MODULE_0__["getDomElement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLocationHref", function() { return _browser_js__WEBPACK_IMPORTED_MODULE_0__["getLocationHref"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "htmlTreeAsString", function() { return _browser_js__WEBPACK_IMPORTED_MODULE_0__["htmlTreeAsString"]; }); + +/* harmony import */ var _dsn_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("xUYW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsnFromString", function() { return _dsn_js__WEBPACK_IMPORTED_MODULE_1__["dsnFromString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsnToString", function() { return _dsn_js__WEBPACK_IMPORTED_MODULE_1__["dsnToString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeDsn", function() { return _dsn_js__WEBPACK_IMPORTED_MODULE_1__["makeDsn"]; }); + +/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("FSf8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SentryError", function() { return _error_js__WEBPACK_IMPORTED_MODULE_2__["SentryError"]; }); + +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7bZ2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GLOBAL_OBJ", function() { return _worldwide_js__WEBPACK_IMPORTED_MODULE_3__["GLOBAL_OBJ"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getGlobalObject", function() { return _worldwide_js__WEBPACK_IMPORTED_MODULE_3__["getGlobalObject"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getGlobalSingleton", function() { return _worldwide_js__WEBPACK_IMPORTED_MODULE_3__["getGlobalSingleton"]; }); + +/* harmony import */ var _instrument_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("5hN5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addInstrumentationHandler", function() { return _instrument_js__WEBPACK_IMPORTED_MODULE_4__["addInstrumentationHandler"]; }); + +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("99IF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDOMError", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isDOMError"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDOMException", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isDOMException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isElement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isError"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isErrorEvent", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isErrorEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEvent", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isInstanceOf", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isInstanceOf"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNaN", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isNaN"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPlainObject", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isPlainObject"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPrimitive", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isPrimitive"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isRegExp"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSyntheticEvent", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isSyntheticEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThenable", function() { return _is_js__WEBPACK_IMPORTED_MODULE_5__["isThenable"]; }); + +/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("loS6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONSOLE_LEVELS", function() { return _logger_js__WEBPACK_IMPORTED_MODULE_6__["CONSOLE_LEVELS"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "consoleSandbox", function() { return _logger_js__WEBPACK_IMPORTED_MODULE_6__["consoleSandbox"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return _logger_js__WEBPACK_IMPORTED_MODULE_6__["logger"]; }); + +/* harmony import */ var _memo_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ZGFV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "memoBuilder", function() { return _memo_js__WEBPACK_IMPORTED_MODULE_7__["memoBuilder"]; }); + +/* harmony import */ var _misc_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("gU0J"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addContextToFrame", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["addContextToFrame"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addExceptionMechanism", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["addExceptionMechanism"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addExceptionTypeValue", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["addExceptionTypeValue"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arrayify", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["arrayify"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "checkOrSetAlreadyCaught", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["checkOrSetAlreadyCaught"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getEventDescription", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["getEventDescription"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseSemver", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["parseSemver"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "uuid4", function() { return _misc_js__WEBPACK_IMPORTED_MODULE_8__["uuid4"]; }); + +/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("5Ysx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dynamicRequire", function() { return _node_js__WEBPACK_IMPORTED_MODULE_9__["dynamicRequire"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNodeEnv", function() { return _node_js__WEBPACK_IMPORTED_MODULE_9__["isNodeEnv"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "loadModule", function() { return _node_js__WEBPACK_IMPORTED_MODULE_9__["loadModule"]; }); + +/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("7myG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return _normalize_js__WEBPACK_IMPORTED_MODULE_10__["normalize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "normalizeToSize", function() { return _normalize_js__WEBPACK_IMPORTED_MODULE_10__["normalizeToSize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "walk", function() { return _normalize_js__WEBPACK_IMPORTED_MODULE_10__["walk"]; }); + +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("pt+A"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addNonEnumerableProperty", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["addNonEnumerableProperty"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "convertToPlainObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["convertToPlainObject"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["dropUndefinedKeys"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["extractExceptionKeysForMessage"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fill", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["fill"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOriginalFunction", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["getOriginalFunction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "markFunctionWrapped", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["markFunctionWrapped"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "objectify", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["objectify"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "urlEncode", function() { return _object_js__WEBPACK_IMPORTED_MODULE_11__["urlEncode"]; }); + +/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("xgvS"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "basename", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["basename"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dirname", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["dirname"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isAbsolute", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["isAbsolute"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "join", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["join"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "normalizePath", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["normalizePath"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "relative", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["relative"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resolve", function() { return _path_js__WEBPACK_IMPORTED_MODULE_12__["resolve"]; }); + +/* harmony import */ var _promisebuffer_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("gBKU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makePromiseBuffer", function() { return _promisebuffer_js__WEBPACK_IMPORTED_MODULE_13__["makePromiseBuffer"]; }); + +/* harmony import */ var _requestdata_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("if98"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRequestDataToEvent", function() { return _requestdata_js__WEBPACK_IMPORTED_MODULE_14__["addRequestDataToEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addRequestDataToTransaction", function() { return _requestdata_js__WEBPACK_IMPORTED_MODULE_14__["addRequestDataToTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractPathForTransaction", function() { return _requestdata_js__WEBPACK_IMPORTED_MODULE_14__["extractPathForTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractRequestData", function() { return _requestdata_js__WEBPACK_IMPORTED_MODULE_14__["extractRequestData"]; }); + +/* harmony import */ var _severity_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("Yzjc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "severityFromString", function() { return _severity_js__WEBPACK_IMPORTED_MODULE_15__["severityFromString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "severityLevelFromString", function() { return _severity_js__WEBPACK_IMPORTED_MODULE_15__["severityLevelFromString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "validSeverityLevels", function() { return _severity_js__WEBPACK_IMPORTED_MODULE_15__["validSeverityLevels"]; }); + +/* harmony import */ var _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("7SIe"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStackParser", function() { return _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__["createStackParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getFunctionName", function() { return _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__["getFunctionName"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nodeStackLineParser", function() { return _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__["nodeStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackParserFromStackParserOptions", function() { return _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__["stackParserFromStackParserOptions"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stripSentryFramesAndReverse", function() { return _stacktrace_js__WEBPACK_IMPORTED_MODULE_16__["stripSentryFramesAndReverse"]; }); + +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("7UWH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "escapeStringForRegex", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["escapeStringForRegex"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMatchingPattern", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["isMatchingPattern"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "safeJoin", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["safeJoin"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "snipLine", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["snipLine"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stringMatchesSomePattern", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["stringMatchesSomePattern"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "truncate", function() { return _string_js__WEBPACK_IMPORTED_MODULE_17__["truncate"]; }); + +/* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("PVZM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isNativeFetch", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["isNativeFetch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsDOMError", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsDOMError"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsDOMException", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsDOMException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsErrorEvent", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsErrorEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsFetch", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsFetch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsHistory", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsHistory"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsNativeFetch", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsNativeFetch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsReferrerPolicy", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsReferrerPolicy"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "supportsReportingObserver", function() { return _supports_js__WEBPACK_IMPORTED_MODULE_18__["supportsReportingObserver"]; }); + +/* harmony import */ var _syncpromise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("fGX8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SyncPromise", function() { return _syncpromise_js__WEBPACK_IMPORTED_MODULE_19__["SyncPromise"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rejectedSyncPromise", function() { return _syncpromise_js__WEBPACK_IMPORTED_MODULE_19__["rejectedSyncPromise"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resolvedSyncPromise", function() { return _syncpromise_js__WEBPACK_IMPORTED_MODULE_19__["resolvedSyncPromise"]; }); + +/* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("VkL2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_browserPerformanceTimeOriginMode", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["_browserPerformanceTimeOriginMode"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "browserPerformanceTimeOrigin", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["browserPerformanceTimeOrigin"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dateTimestampInSeconds", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["dateTimestampInSeconds"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestampInSeconds", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["timestampInSeconds"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestampWithMs", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["timestampWithMs"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "usingPerformanceAPI", function() { return _time_js__WEBPACK_IMPORTED_MODULE_20__["usingPerformanceAPI"]; }); + +/* harmony import */ var _tracing_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("speo"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function() { return _tracing_js__WEBPACK_IMPORTED_MODULE_21__["TRACEPARENT_REGEXP"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function() { return _tracing_js__WEBPACK_IMPORTED_MODULE_21__["extractTraceparentData"]; }); + +/* harmony import */ var _env_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("hk1d"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBrowserBundle", function() { return _env_js__WEBPACK_IMPORTED_MODULE_22__["isBrowserBundle"]; }); + +/* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("EYYg"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addItemToEnvelope", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["addItemToEnvelope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createAttachmentEnvelopeItem", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["createAttachmentEnvelopeItem"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createEnvelope", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["createEnvelope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "envelopeItemTypeToDataCategory", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["envelopeItemTypeToDataCategory"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forEachEnvelopeItem", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["forEachEnvelopeItem"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "serializeEnvelope", function() { return _envelope_js__WEBPACK_IMPORTED_MODULE_23__["serializeEnvelope"]; }); + +/* harmony import */ var _clientreport_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("57ZE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createClientReportEnvelope", function() { return _clientreport_js__WEBPACK_IMPORTED_MODULE_24__["createClientReportEnvelope"]; }); + +/* harmony import */ var _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("3zUp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_RETRY_AFTER", function() { return _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__["DEFAULT_RETRY_AFTER"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disabledUntil", function() { return _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__["disabledUntil"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isRateLimited", function() { return _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__["isRateLimited"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseRetryAfterHeader", function() { return _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__["parseRetryAfterHeader"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateRateLimits", function() { return _ratelimit_js__WEBPACK_IMPORTED_MODULE_25__["updateRateLimits"]; }); + +/* harmony import */ var _baggage_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("3bBg"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BAGGAGE_HEADER_NAME", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["BAGGAGE_HEADER_NAME"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAX_BAGGAGE_STRING_LENGTH", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["MAX_BAGGAGE_STRING_LENGTH"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SENTRY_BAGGAGE_KEY_PREFIX", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["SENTRY_BAGGAGE_KEY_PREFIX"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SENTRY_BAGGAGE_KEY_PREFIX_REGEX", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["SENTRY_BAGGAGE_KEY_PREFIX_REGEX"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "baggageHeaderToDynamicSamplingContext", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["baggageHeaderToDynamicSamplingContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dynamicSamplingContextToSentryBaggageHeader", function() { return _baggage_js__WEBPACK_IMPORTED_MODULE_26__["dynamicSamplingContextToSentryBaggageHeader"]; }); + +/* harmony import */ var _url_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("dZZ2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getNumberOfUrlSegments", function() { return _url_js__WEBPACK_IMPORTED_MODULE_27__["getNumberOfUrlSegments"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseUrl", function() { return _url_js__WEBPACK_IMPORTED_MODULE_27__["parseUrl"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function() { return _url_js__WEBPACK_IMPORTED_MODULE_27__["stripUrlQueryAndFragment"]; }); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "aXTZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.normalizeApp = exports.APPS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _get3 = _interopRequireDefault(__webpack_require__("/yh+")); + +var _registry = __webpack_require__("J3p3"); + +var _Collection = _interopRequireDefault(__webpack_require__("XXj1")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _errors = __webpack_require__("twUa"); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var APPS_DOCTYPE = 'io.cozy.apps'; +exports.APPS_DOCTYPE = APPS_DOCTYPE; + +var normalizeApp = function normalizeApp(app, doctype) { + return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, app.attributes), app), (0, _DocumentCollection2.normalizeDoc)(app, doctype)), {}, { + id: app.id // ignores any 'id' attribute in the manifest + + }); +}; +/** + * Extends `DocumentCollection` API along with specific methods for `io.cozy.apps`. + */ + + +exports.normalizeApp = normalizeApp; + +var AppCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(AppCollection, _DocumentCollection); + + var _super = _createSuper(AppCollection); + + function AppCollection(stackClient) { + var _this; + + (0, _classCallCheck2.default)(this, AppCollection); + _this = _super.call(this, APPS_DOCTYPE, stackClient); + _this.endpoint = '/apps/'; + return _this; + } + + (0, _createClass2.default)(AppCollection, [{ + key: "get", + value: function () { + var _get2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(idArg, query) { + var _this2 = this; + + var id, sources, dataFetchers, _iterator, _step, source, res, data; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (idArg.indexOf('/') > -1) { + id = idArg.split('/')[1]; + } else { + _logger.default.warn("Deprecated: in next versions of cozy-client, it will not be possible to query apps/konnectors only with id, please use the form ".concat(this.doctype, "/").concat(idArg, "\n\n- Q('io.cozy.apps').getById('banks')\n+ Q('io.cozy.apps').getById('io.cozy.apps/banks')")); + + id = idArg; + } + + if (!(query && query.sources && (!Array.isArray(query.sources) || query.sources.length === 0))) { + _context.next = 3; + break; + } + + throw new Error('Invalid "sources" attribute passed in query, please use an array with at least one element.'); + + case 3: + sources = (0, _get3.default)(query, 'sources', ['stack']); + dataFetchers = { + stack: function stack() { + return _Collection.default.get(_this2.stackClient, "".concat(_this2.endpoint).concat(encodeURIComponent(id)), { + normalize: function normalize(data) { + return normalizeApp(data, _this2.doctype); + } + }); + }, + registry: function registry() { + return _this2.stackClient.fetchJSON('GET', _registry.registryEndpoint + id); + } + }; + _iterator = _createForOfIteratorHelper(sources); + _context.prev = 6; + + _iterator.s(); + + case 8: + if ((_step = _iterator.n()).done) { + _context.next = 27; + break; + } + + source = _step.value; + _context.prev = 10; + _context.next = 13; + return dataFetchers[source](); + + case 13: + res = _context.sent; + + if (!(source !== 'registry')) { + _context.next = 16; + break; + } + + return _context.abrupt("return", res); + + case 16: + _logger.default.warn("The use of source registry is deprecated since it can polute the io.cozy.apps slice. For exemple, if we request data from the registry, than the app will be present in the io.cozy.apps slice and then the isInstalled() will return true.\n\n Use Q('io.cozy.apps_registry) instead"); + + data = (0, _registry.transformRegistryFormatToStackFormat)(res); + return _context.abrupt("return", { + data: normalizeApp(data, this.doctype) + }); + + case 21: + _context.prev = 21; + _context.t0 = _context["catch"](10); + + if (!(source === sources[sources.length - 1])) { + _context.next = 25; + break; + } + + throw _context.t0; + + case 25: + _context.next = 8; + break; + + case 27: + _context.next = 32; + break; + + case 29: + _context.prev = 29; + _context.t1 = _context["catch"](6); + + _iterator.e(_context.t1); + + case 32: + _context.prev = 32; + + _iterator.f(); + + return _context.finish(32); + + case 35: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[6, 29, 32, 35], [10, 21]]); + })); + + function get(_x, _x2) { + return _get2.apply(this, arguments); + } + + return get; + }() + /** + * Lists all apps, without filters. + * + * The returned documents are not paginated by the stack. + * + * @returns {{data, meta, skip, next}} The JSON API conformant response. + * @throws {FetchError} + */ + + }, { + key: "all", + value: function () { + var _all = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var _this3 = this; + + var resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this.stackClient.fetchJSON('GET', this.endpoint); + + case 2: + resp = _context2.sent; + return _context2.abrupt("return", { + data: resp.data.map(function (app) { + return normalizeApp(app, _this3.doctype); + }), + meta: { + count: resp.meta.count + }, + skip: 0, + next: false + }); + + case 4: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function all() { + return _all.apply(this, arguments); + } + + return all; + }() + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + throw new Error('create() method is not available for applications'); + + case 1: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + function create() { + return _create.apply(this, arguments); + } + + return create; + }() + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() { + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + throw new Error('update() method is not available for applications'); + + case 1: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + + function update() { + return _update.apply(this, arguments); + } + + return update; + }() + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + throw new Error('destroy() method is not available for applications'); + + case 1: + case "end": + return _context5.stop(); + } + } + }, _callee5); + })); + + function destroy() { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + }]); + return AppCollection; +}(_DocumentCollection2.default); + +AppCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = AppCollection; +exports.default = _default; + +/***/ }), + +/***/ "aY11": +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if (typeof window === "object") g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), + +/***/ "abT5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createTypography; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); + + + + +function round(value) { + return Math.round(value * 1e5) / 1e5; +} + +var warnedOnce = false; + +function roundWithDeprecationWarning(value) { + if (false) {} + + return round(value); +} + +var caseAllCaps = { + textTransform: 'uppercase' +}; +var defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif'; +/** + * @see @link{https://material.io/design/typography/the-type-system.html} + * @see @link{https://material.io/design/typography/understanding-typography.html} + */ + +function createTypography(palette, typography) { + var _ref = typeof typography === 'function' ? typography(palette) : typography, + _ref$fontFamily = _ref.fontFamily, + fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily, + _ref$fontSize = _ref.fontSize, + fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize, + _ref$fontWeightLight = _ref.fontWeightLight, + fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight, + _ref$fontWeightRegula = _ref.fontWeightRegular, + fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula, + _ref$fontWeightMedium = _ref.fontWeightMedium, + fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium, + _ref$fontWeightBold = _ref.fontWeightBold, + fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold, + _ref$htmlFontSize = _ref.htmlFontSize, + htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize, + allVariants = _ref.allVariants, + pxToRem2 = _ref.pxToRem, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]); + + if (false) {} + + var coef = fontSize / 14; + + var pxToRem = pxToRem2 || function (size) { + return "".concat(size / htmlFontSize * coef, "rem"); + }; + + var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + fontFamily: fontFamily, + fontWeight: fontWeight, + fontSize: pxToRem(size), + // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/ + lineHeight: lineHeight + }, fontFamily === defaultFontFamily ? { + letterSpacing: "".concat(round(letterSpacing / size), "em") + } : {}, casing, allVariants); + }; + + var variants = { + h1: buildVariant(fontWeightLight, 96, 1.167, -1.5), + h2: buildVariant(fontWeightLight, 60, 1.2, -0.5), + h3: buildVariant(fontWeightRegular, 48, 1.167, 0), + h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25), + h5: buildVariant(fontWeightRegular, 24, 1.334, 0), + h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15), + subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15), + subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1), + body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15), + body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15), + button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps), + caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4), + overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps) + }; + return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__["deepmerge"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + htmlFontSize: htmlFontSize, + pxToRem: pxToRem, + round: roundWithDeprecationWarning, + // TODO v5: remove + fontFamily: fontFamily, + fontSize: fontSize, + fontWeightLight: fontWeightLight, + fontWeightRegular: fontWeightRegular, + fontWeightMedium: fontWeightMedium, + fontWeightBold: fontWeightBold + }, variants), other, { + clone: false // No need to clone deep + + }); +} + +/***/ }), + +/***/ "afhL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("5ZEc"); +/* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("XST7"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("/iOI"); + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + width: '100%', + padding: '24px 16px', + margin: '-24px -16px', + boxSizing: 'content-box' + }, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + horizontal: {}, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + justifyContent: 'flex-start', + padding: '8px', + margin: '-8px' + }, + + /* Styles applied to the `ButtonBase` touch-ripple. */ + touchRipple: { + color: 'rgba(0, 0, 0, 0.3)' + } +}; +var StepButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function StepButton(props, ref) { + var active = props.active, + alternativeLabel = props.alternativeLabel, + children = props.children, + classes = props.classes, + className = props.className, + completed = props.completed, + disabled = props.disabled, + expanded = props.expanded, + icon = props.icon, + last = props.last, + optional = props.optional, + orientation = props.orientation, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "disabled", "expanded", "icon", "last", "optional", "orientation"]); + + var childProps = { + active: active, + alternativeLabel: alternativeLabel, + completed: completed, + disabled: disabled, + icon: icon, + optional: optional, + orientation: orientation + }; + var child = Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(children, ['StepLabel']) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](children, childProps) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_StepLabel__WEBPACK_IMPORTED_MODULE_7__["default"], childProps, children); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + focusRipple: true, + disabled: disabled, + TouchRippleProps: { + className: classes.touchRipple + }, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[orientation], className), + ref: ref + }, other), child); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiStepButton' +})(StepButton)); + +/***/ }), + +/***/ "afv6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PROFILETYPE_DOCTYPE = void 0; +var PROFILETYPE_DOCTYPE = 'com.grandlyon.ecolyo.profiletype'; +exports.PROFILETYPE_DOCTYPE = PROFILETYPE_DOCTYPE; + +/***/ }), + +/***/ "agfW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("BDc3"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _InputLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "ajN4": +/***/ (function(module, exports) { + +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; + + +/***/ }), + +/***/ "ak+c": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) {} + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + +/***/ }), + +/***/ "akxm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var getPolyfill = __webpack_require__("UxrS"); +var define = __webpack_require__("r0Co"); + +module.exports = function shimEntries() { + var polyfill = getPolyfill(); + define(Object, { entries: polyfill }, { + entries: function testEntries() { + return Object.entries !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ "aloe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableFooter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("WPz0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableFooter__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "aloy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createConnect", function() { return createConnect; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6vz+"); +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dCuL"); +/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("iAzp"); +/* harmony import */ var _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("OL02"); +/* harmony import */ var _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("hl+/"); +/* harmony import */ var _mergeProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("KstQ"); +/* harmony import */ var _selectorFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("olFG"); + + +var _excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]; + + + + + + +/* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + +function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); + }; +} + +function strictEqual(a, b) { + return a === b; +} // createConnect with default args builds the 'official' connect behavior. Calling it with +// different options opens up some testing and extensibility scenarios + + +function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__["default"] : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__["default"] : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areMergedPropsE, + extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref3, _excluded); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return "Connect(" + name + ")"; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual + }, extraOptions)); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/createConnect()); + +/***/ }), + +/***/ "apCG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("kk+1"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TabScrollButton__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "aqRq": +/***/ (function(module, exports) { + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; + + +/***/ }), + +/***/ "asPl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _internal_svg_icons_Cancel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7hhC"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("qSOI"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("fWYq"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("5ZEc"); + + + + + + + + + + + + +var styles = function styles(theme) { + var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700]; + var deleteIconColor = Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.text.primary, 0.26); + return { + /* Styles applied to the root element. */ + root: { + fontFamily: theme.typography.fontFamily, + fontSize: theme.typography.pxToRem(13), + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + height: 32, + color: theme.palette.getContrastText(backgroundColor), + backgroundColor: backgroundColor, + borderRadius: 32 / 2, + whiteSpace: 'nowrap', + transition: theme.transitions.create(['background-color', 'box-shadow']), + // label will inherit this from root, then `clickable` class overrides this for both + cursor: 'default', + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + textDecoration: 'none', + border: 'none', + // Remove `button` border + padding: 0, + // Remove `button` padding + verticalAlign: 'middle', + boxSizing: 'border-box', + '&$disabled': { + opacity: 0.5, + pointerEvents: 'none' + }, + '& $avatar': { + marginLeft: 5, + marginRight: -6, + width: 24, + height: 24, + color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300], + fontSize: theme.typography.pxToRem(12) + }, + '& $avatarColorPrimary': { + color: theme.palette.primary.contrastText, + backgroundColor: theme.palette.primary.dark + }, + '& $avatarColorSecondary': { + color: theme.palette.secondary.contrastText, + backgroundColor: theme.palette.secondary.dark + }, + '& $avatarSmall': { + marginLeft: 4, + marginRight: -4, + width: 18, + height: 18, + fontSize: theme.typography.pxToRem(10) + } + }, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: { + height: 24 + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + backgroundColor: theme.palette.primary.main, + color: theme.palette.primary.contrastText + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + backgroundColor: theme.palette.secondary.main, + color: theme.palette.secondary.contrastText + }, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */ + clickable: { + userSelect: 'none', + WebkitTapHighlightColor: 'transparent', + cursor: 'pointer', + '&:hover, &:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(backgroundColor, 0.08) + }, + '&:active': { + boxShadow: theme.shadows[1] + } + }, + + /* Styles applied to the root element if `onClick` and `color="primary"` is defined or `clickable={true}`. */ + clickableColorPrimary: { + '&:hover, &:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(theme.palette.primary.main, 0.08) + } + }, + + /* Styles applied to the root element if `onClick` and `color="secondary"` is defined or `clickable={true}`. */ + clickableColorSecondary: { + '&:hover, &:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(theme.palette.secondary.main, 0.08) + } + }, + + /* Styles applied to the root element if `onDelete` is defined. */ + deletable: { + '&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(backgroundColor, 0.08) + } + }, + + /* Styles applied to the root element if `onDelete` and `color="primary"` is defined. */ + deletableColorPrimary: { + '&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(theme.palette.primary.main, 0.2) + } + }, + + /* Styles applied to the root element if `onDelete` and `color="secondary"` is defined. */ + deletableColorSecondary: { + '&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["emphasize"])(theme.palette.secondary.main, 0.2) + } + }, + + /* Styles applied to the root element if `variant="outlined"`. */ + outlined: { + backgroundColor: 'transparent', + border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'), + '$clickable&:hover, $clickable&:focus, $deletable&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.text.primary, theme.palette.action.hoverOpacity) + }, + '& $avatar': { + marginLeft: 4 + }, + '& $avatarSmall': { + marginLeft: 2 + }, + '& $icon': { + marginLeft: 4 + }, + '& $iconSmall': { + marginLeft: 2 + }, + '& $deleteIcon': { + marginRight: 5 + }, + '& $deleteIconSmall': { + marginRight: 3 + } + }, + + /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ + outlinedPrimary: { + color: theme.palette.primary.main, + border: "1px solid ".concat(theme.palette.primary.main), + '$clickable&:hover, $clickable&:focus, $deletable&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity) + } + }, + + /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ + outlinedSecondary: { + color: theme.palette.secondary.main, + border: "1px solid ".concat(theme.palette.secondary.main), + '$clickable&:hover, $clickable&:focus, $deletable&:focus': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity) + } + }, + // TODO v5: remove + + /* Styles applied to the `avatar` element. */ + avatar: {}, + + /* Styles applied to the `avatar` element if `size="small"`. */ + avatarSmall: {}, + + /* Styles applied to the `avatar` element if `color="primary"`. */ + avatarColorPrimary: {}, + + /* Styles applied to the `avatar` element if `color="secondary"`. */ + avatarColorSecondary: {}, + + /* Styles applied to the `icon` element. */ + icon: { + color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300], + marginLeft: 5, + marginRight: -6 + }, + + /* Styles applied to the `icon` element if `size="small"`. */ + iconSmall: { + width: 18, + height: 18, + marginLeft: 4, + marginRight: -4 + }, + + /* Styles applied to the `icon` element if `color="primary"`. */ + iconColorPrimary: { + color: 'inherit' + }, + + /* Styles applied to the `icon` element if `color="secondary"`. */ + iconColorSecondary: { + color: 'inherit' + }, + + /* Styles applied to the label `span` element. */ + label: { + overflow: 'hidden', + textOverflow: 'ellipsis', + paddingLeft: 12, + paddingRight: 12, + whiteSpace: 'nowrap' + }, + + /* Styles applied to the label `span` element if `size="small"`. */ + labelSmall: { + paddingLeft: 8, + paddingRight: 8 + }, + + /* Styles applied to the `deleteIcon` element. */ + deleteIcon: { + WebkitTapHighlightColor: 'transparent', + color: deleteIconColor, + height: 22, + width: 22, + cursor: 'pointer', + margin: '0 5px 0 -6px', + '&:hover': { + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(deleteIconColor, 0.4) + } + }, + + /* Styles applied to the `deleteIcon` element if `size="small"`. */ + deleteIconSmall: { + height: 16, + width: 16, + marginRight: 4, + marginLeft: -4 + }, + + /* Styles applied to the deleteIcon element if `color="primary"` and `variant="default"`. */ + deleteIconColorPrimary: { + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.contrastText, 0.7), + '&:hover, &:active': { + color: theme.palette.primary.contrastText + } + }, + + /* Styles applied to the deleteIcon element if `color="secondary"` and `variant="default"`. */ + deleteIconColorSecondary: { + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.contrastText, 0.7), + '&:hover, &:active': { + color: theme.palette.secondary.contrastText + } + }, + + /* Styles applied to the deleteIcon element if `color="primary"` and `variant="outlined"`. */ + deleteIconOutlinedColorPrimary: { + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, 0.7), + '&:hover, &:active': { + color: theme.palette.primary.main + } + }, + + /* Styles applied to the deleteIcon element if `color="secondary"` and `variant="outlined"`. */ + deleteIconOutlinedColorSecondary: { + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, 0.7), + '&:hover, &:active': { + color: theme.palette.secondary.main + } + } + }; +}; + +function isDeleteKeyboardEvent(keyboardEvent) { + return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete'; +} +/** + * Chips represent complex entities in small blocks, such as a contact. + */ + + +var Chip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Chip(props, ref) { + var avatarProp = props.avatar, + classes = props.classes, + className = props.className, + clickableProp = props.clickable, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + ComponentProp = props.component, + deleteIconProp = props.deleteIcon, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + iconProp = props.icon, + label = props.label, + onClick = props.onClick, + onDelete = props.onDelete, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'default' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["avatar", "classes", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant"]); + + var chipRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__["default"])(chipRef, ref); + + var handleDeleteIconClick = function handleDeleteIconClick(event) { + // Stop the event from bubbling up to the `Chip` + event.stopPropagation(); + + if (onDelete) { + onDelete(event); + } + }; + + var handleKeyDown = function handleKeyDown(event) { + // Ignore events from children of `Chip`. + if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) { + // will be handled in keyUp, otherwise some browsers + // might init navigation + event.preventDefault(); + } + + if (onKeyDown) { + onKeyDown(event); + } + }; + + var handleKeyUp = function handleKeyUp(event) { + // Ignore events from children of `Chip`. + if (event.currentTarget === event.target) { + if (onDelete && isDeleteKeyboardEvent(event)) { + onDelete(event); + } else if (event.key === 'Escape' && chipRef.current) { + chipRef.current.blur(); + } + } + + if (onKeyUp) { + onKeyUp(event); + } + }; + + var clickable = clickableProp !== false && onClick ? true : clickableProp; + var small = size === 'small'; + var Component = ComponentProp || (clickable ? _ButtonBase__WEBPACK_IMPORTED_MODULE_11__["default"] : 'div'); + var moreProps = Component === _ButtonBase__WEBPACK_IMPORTED_MODULE_11__["default"] ? { + component: 'div' + } : {}; + var deleteIcon = null; + + if (onDelete) { + var customClasses = Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(color !== 'default' && (variant === "default" ? classes["deleteIconColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))] : classes["deleteIconOutlinedColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))]), small && classes.deleteIconSmall); + deleteIcon = deleteIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](deleteIconProp) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](deleteIconProp, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(deleteIconProp.props.className, classes.deleteIcon, customClasses), + onClick: handleDeleteIconClick + }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_Cancel__WEBPACK_IMPORTED_MODULE_5__["default"], { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.deleteIcon, customClasses), + onClick: handleDeleteIconClick + }); + } + + var avatar = null; + + if (avatarProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](avatarProp)) { + avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](avatarProp, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes["avatarColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))]) + }); + } + + var icon = null; + + if (iconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](iconProp)) { + icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](iconProp, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes["iconColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))]) + }); + } + + if (false) {} + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + role: clickable || onDelete ? 'button' : undefined, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, color !== 'default' && [classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))], clickable && classes["clickableColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))], onDelete && classes["deletableColor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(color))]], variant !== "default" && [classes.outlined, { + 'primary': classes.outlinedPrimary, + 'secondary': classes.outlinedSecondary + }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable), + "aria-disabled": disabled ? true : undefined, + tabIndex: clickable || onDelete ? 0 : undefined, + onClick: onClick, + onKeyDown: handleKeyDown, + onKeyUp: handleKeyUp, + ref: handleRef + }, moreProps, other), avatar || icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.label, small && classes.labelSmall) + }, label), deleteIcon); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiChip' +})(Chip)); + +/***/ }), + +/***/ "atB9": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + + +/***/ }), + +/***/ "ator": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("2X0w"); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ "auXt": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rDuK"); + + + +var useEnhancedEffect = typeof window !== 'undefined' && "production" !== 'test' ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"]; +/** + * NoSsr purposely removes components from the subject of Server Side Rendering (SSR). + * + * This component can be useful in a variety of situations: + * - Escape hatch for broken dependencies not supporting SSR. + * - Improve the time-to-first paint on the client by only rendering above the fold. + * - Reduce the rendering time on the server. + * - Under too heavy server load, you can turn on service degradation. + */ + +function NoSsr(props) { + var children = props.children, + _props$defer = props.defer, + defer = _props$defer === void 0 ? false : _props$defer, + _props$fallback = props.fallback, + fallback = _props$fallback === void 0 ? null : _props$fallback; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](false), + mountedState = _React$useState[0], + setMountedState = _React$useState[1]; + + useEnhancedEffect(function () { + if (!defer) { + setMountedState(true); + } + }, [defer]); + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (defer) { + setMountedState(true); + } + }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component. + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, mountedState ? children : fallback); +} + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (NoSsr); + +/***/ }), + +/***/ "aumV": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("pFmr"); +var isArray = __webpack_require__("j2SL"); +var SPECIES = __webpack_require__("Yhpl")('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), + +/***/ "axfH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("C/f8"); + + + +function isClassComponent(elementType) { + // elementType.prototype?.isReactComponent + var _elementType$prototyp = elementType.prototype, + prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp; + return Boolean(prototype.isReactComponent); +} + +function acceptingRef(props, propName, componentName, location, propFullName) { + var element = props[propName]; + var safePropName = propFullName || propName; + + if (element == null) { + return null; + } + + var warningHint; + var elementType = element.type; + /** + * Blacklisting instead of whitelisting + * + * Blacklisting will miss some components, such as React.Fragment. Those will at least + * trigger a warning in React. + * We can't whitelist because there is no safe way to detect React.forwardRef + * or class components. "Safe" means there's no public API. + * + */ + + if (typeof elementType === 'function' && !isClassComponent(elementType)) { + warningHint = 'Did you accidentally use a plain function component for an element instead?'; + } + + if (warningHint !== undefined) { + return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://mui.com/r/caveat-with-refs-guide'); + } + + return null; +} + +var elementAcceptingRef = Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__["default"])(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.element, acceptingRef); +elementAcceptingRef.isRequired = Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__["default"])(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.element.isRequired, acceptingRef); +/* harmony default export */ __webpack_exports__["default"] = (elementAcceptingRef); + +/***/ }), + +/***/ "az50": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("wWNu"); + + + + +var warnedOnce = false; +/** + * Dialog will responsively be full screen *at or below* the given breakpoint + * (defaults to 'sm' for mobile devices). + * Notice that this Higher-order Component is incompatible with server-side rendering. + */ + +var withMobileDialog = function withMobileDialog() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return function (Component) { + if (false) {} + + var _options$breakpoint = options.breakpoint, + breakpoint = _options$breakpoint === void 0 ? 'sm' : _options$breakpoint; + + function WithMobileDialog(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + fullScreen: Object(_withWidth__WEBPACK_IMPORTED_MODULE_3__["isWidthDown"])(breakpoint, props.width) + }, props)); + } + + false ? undefined : void 0; + return Object(_withWidth__WEBPACK_IMPORTED_MODULE_3__["default"])()(WithMobileDialog); + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (withMobileDialog); + +/***/ }), + +/***/ "b+/j": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3MFU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "b/Qy": +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./en.json": "22V2", + "./fr.json": "lIGy" +}; + + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = "b/Qy"; + +/***/ }), + +/***/ "b/Th": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("fY06"); + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + marginBottom: 12 + } +}; +var DialogContentText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["forwardRef"](function DialogContentText(props, ref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_4__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + component: "p", + variant: "body1", + color: "textSecondary", + ref: ref + }, props)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__["default"])(styles, { + name: 'MuiDialogContentText' +})(DialogContentText)); + +/***/ }), + +/***/ "b0ha": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RuleList", function() { return RuleList; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SheetsManager", function() { return SheetsManager; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SheetsRegistry", function() { return SheetsRegistry; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return createJss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createGenerateId", function() { return createGenerateId; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRule", function() { return createRule; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDynamicStyles", function() { return getDynamicStyles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasCSSTOMSupport", function() { return hasCSSTOMSupport; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sheets", function() { return sheets; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toCssValue", function() { return toCssValue; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var is_in_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("wjhL"); +/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("FiJW"); +/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("j3u0"); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("I4/v"); +/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("muMs"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("6vz+"); + + + + + + + + +var plainObjectConstrurctor = {}.constructor; +function cloneStyle(style) { + if (style == null || typeof style !== 'object') return style; + if (Array.isArray(style)) return style.map(cloneStyle); + if (style.constructor !== plainObjectConstrurctor) return style; + var newStyle = {}; + + for (var name in style) { + newStyle[name] = cloneStyle(style[name]); + } + + return newStyle; +} + +/** + * Create a rule instance. + */ + +function createRule(name, decl, options) { + if (name === void 0) { + name = 'unnamed'; + } + + var jss = options.jss; + var declCopy = cloneStyle(decl); + var rule = jss.plugins.onCreateRule(name, declCopy, options); + if (rule) return rule; // It is an at-rule and it has no instance. + + if (name[0] === '@') { + false ? undefined : void 0; + } + + return null; +} + +var join = function join(value, by) { + var result = ''; + + for (var i = 0; i < value.length; i++) { + // Remove !important from the value, it will be readded later. + if (value[i] === '!important') break; + if (result) result += by; + result += value[i]; + } + + return result; +}; +/** + * Converts JSS array value to a CSS string. + * + * `margin: [['5px', '10px']]` > `margin: 5px 10px;` + * `border: ['1px', '2px']` > `border: 1px, 2px;` + * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;` + * `color: ['red', !important]` > `color: red !important;` + */ + + +var toCssValue = function toCssValue(value, ignoreImportant) { + if (ignoreImportant === void 0) { + ignoreImportant = false; + } + + if (!Array.isArray(value)) return value; + var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. + + if (Array.isArray(value[0])) { + for (var i = 0; i < value.length; i++) { + if (value[i] === '!important') break; + if (cssValue) cssValue += ', '; + cssValue += join(value[i], ' '); + } + } else cssValue = join(value, ', '); // Add !important, because it was ignored. + + + if (!ignoreImportant && value[value.length - 1] === '!important') { + cssValue += ' !important'; + } + + return cssValue; +}; + +function getWhitespaceSymbols(options) { + if (options && options.format === false) { + return { + linebreak: '', + space: '' + }; + } + + return { + linebreak: '\n', + space: ' ' + }; +} + +/** + * Indent a string. + * http://jsperf.com/array-join-vs-for + */ + +function indentStr(str, indent) { + var result = ''; + + for (var index = 0; index < indent; index++) { + result += ' '; + } + + return result + str; +} +/** + * Converts a Rule to CSS string. + */ + + +function toCss(selector, style, options) { + if (options === void 0) { + options = {}; + } + + var result = ''; + if (!style) return result; + var _options = options, + _options$indent = _options.indent, + indent = _options$indent === void 0 ? 0 : _options$indent; + var fallbacks = style.fallbacks; + + if (options.format === false) { + indent = -Infinity; + } + + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak, + space = _getWhitespaceSymbols.space; + + if (selector) indent++; // Apply fallbacks first. + + if (fallbacks) { + // Array syntax {fallbacks: [{prop: value}]} + if (Array.isArray(fallbacks)) { + for (var index = 0; index < fallbacks.length; index++) { + var fallback = fallbacks[index]; + + for (var prop in fallback) { + var value = fallback[prop]; + + if (value != null) { + if (result) result += linebreak; + result += indentStr(prop + ":" + space + toCssValue(value) + ";", indent); + } + } + } + } else { + // Object syntax {fallbacks: {prop: value}} + for (var _prop in fallbacks) { + var _value = fallbacks[_prop]; + + if (_value != null) { + if (result) result += linebreak; + result += indentStr(_prop + ":" + space + toCssValue(_value) + ";", indent); + } + } + } + } + + for (var _prop2 in style) { + var _value2 = style[_prop2]; + + if (_value2 != null && _prop2 !== 'fallbacks') { + if (result) result += linebreak; + result += indentStr(_prop2 + ":" + space + toCssValue(_value2) + ";", indent); + } + } // Allow empty style in this case, because properties will be added dynamically. + + + if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined. + + if (!selector) return result; + indent--; + if (result) result = "" + linebreak + result + linebreak; + return indentStr("" + selector + space + "{" + result, indent) + indentStr('}', indent); +} + +var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g; +var nativeEscape = typeof CSS !== 'undefined' && CSS.escape; +var escape = (function (str) { + return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1'); +}); + +var BaseStyleRule = +/*#__PURE__*/ +function () { + function BaseStyleRule(key, style, options) { + this.type = 'style'; + this.isProcessed = false; + var sheet = options.sheet, + Renderer = options.Renderer; + this.key = key; + this.options = options; + this.style = style; + if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer(); + } + /** + * Get or set a style property. + */ + + + var _proto = BaseStyleRule.prototype; + + _proto.prop = function prop(name, value, options) { + // It's a getter. + if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed. + + var force = options ? options.force : false; + if (!force && this.style[name] === value) return this; + var newValue = value; + + if (!options || options.process !== false) { + newValue = this.options.jss.plugins.onChangeValue(value, name, this); + } + + var isEmpty = newValue == null || newValue === false; + var isDefined = name in this.style; // Value is empty and wasn't defined before. + + if (isEmpty && !isDefined && !force) return this; // We are going to remove this value. + + var remove = isEmpty && isDefined; + if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true. + + if (this.renderable && this.renderer) { + if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue); + return this; + } + + var sheet = this.options.sheet; + + if (sheet && sheet.attached) { + false ? undefined : void 0; + } + + return this; + }; + + return BaseStyleRule; +}(); +var StyleRule = +/*#__PURE__*/ +function (_BaseStyleRule) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__["default"])(StyleRule, _BaseStyleRule); + + function StyleRule(key, style, options) { + var _this; + + _this = _BaseStyleRule.call(this, key, style, options) || this; + var selector = options.selector, + scoped = options.scoped, + sheet = options.sheet, + generateId = options.generateId; + + if (selector) { + _this.selectorText = selector; + } else if (scoped !== false) { + _this.id = generateId(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__["default"])(_this)), sheet); + _this.selectorText = "." + escape(_this.id); + } + + return _this; + } + /** + * Set selector string. + * Attention: use this with caution. Most browsers didn't implement + * selectorText setter, so this may result in rerendering of entire Style Sheet. + */ + + + var _proto2 = StyleRule.prototype; + + /** + * Apply rule to an element inline. + */ + _proto2.applyTo = function applyTo(renderable) { + var renderer = this.renderer; + + if (renderer) { + var json = this.toJSON(); + + for (var prop in json) { + renderer.setProperty(renderable, prop, json[prop]); + } + } + + return this; + } + /** + * Returns JSON representation of the rule. + * Fallbacks are not supported. + * Useful for inline styles. + */ + ; + + _proto2.toJSON = function toJSON() { + var json = {}; + + for (var prop in this.style) { + var value = this.style[prop]; + if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value); + } + + return json; + } + /** + * Generates a CSS string. + */ + ; + + _proto2.toString = function toString(options) { + var sheet = this.options.sheet; + var link = sheet ? sheet.options.link : false; + var opts = link ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + allowEmpty: true + }) : options; + return toCss(this.selectorText, this.style, opts); + }; + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(StyleRule, [{ + key: "selector", + set: function set(selector) { + if (selector === this.selectorText) return; + this.selectorText = selector; + var renderer = this.renderer, + renderable = this.renderable; + if (!renderable || !renderer) return; + var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule. + + if (!hasChanged) { + renderer.replaceRule(renderable, this); + } + } + /** + * Get selector string. + */ + , + get: function get() { + return this.selectorText; + } + }]); + + return StyleRule; +}(BaseStyleRule); +var pluginStyleRule = { + onCreateRule: function onCreateRule(key, style, options) { + if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') { + return null; + } + + return new StyleRule(key, style, options); + } +}; + +var defaultToStringOptions = { + indent: 1, + children: true +}; +var atRegExp = /@([\w-]+)/; +/** + * Conditional rule for @media, @supports + */ + +var ConditionalRule = +/*#__PURE__*/ +function () { + function ConditionalRule(key, styles, options) { + this.type = 'conditional'; + this.isProcessed = false; + this.key = key; + var atMatch = key.match(atRegExp); + this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate. + + this.query = options.name || "@" + this.at; + this.options = options; + this.rules = new RuleList(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + parent: this + })); + + for (var name in styles) { + this.rules.add(name, styles[name]); + } + + this.rules.process(); + } + /** + * Get a rule. + */ + + + var _proto = ConditionalRule.prototype; + + _proto.getRule = function getRule(name) { + return this.rules.get(name); + } + /** + * Get index of a rule. + */ + ; + + _proto.indexOf = function indexOf(rule) { + return this.rules.indexOf(rule); + } + /** + * Create and register rule, run plugins. + */ + ; + + _proto.addRule = function addRule(name, style, options) { + var rule = this.rules.add(name, style, options); + if (!rule) return null; + this.options.jss.plugins.onProcessRule(rule); + return rule; + } + /** + * Replace rule, run plugins. + */ + ; + + _proto.replaceRule = function replaceRule(name, style, options) { + var newRule = this.rules.replace(name, style, options); + if (newRule) this.options.jss.plugins.onProcessRule(newRule); + return newRule; + } + /** + * Generates a CSS string. + */ + ; + + _proto.toString = function toString(options) { + if (options === void 0) { + options = defaultToStringOptions; + } + + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak; + + if (options.indent == null) options.indent = defaultToStringOptions.indent; + if (options.children == null) options.children = defaultToStringOptions.children; + + if (options.children === false) { + return this.query + " {}"; + } + + var children = this.rules.toString(options); + return children ? this.query + " {" + linebreak + children + linebreak + "}" : ''; + }; + + return ConditionalRule; +}(); +var keyRegExp = /@media|@supports\s+/; +var pluginConditionalRule = { + onCreateRule: function onCreateRule(key, styles, options) { + return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null; + } +}; + +var defaultToStringOptions$1 = { + indent: 1, + children: true +}; +var nameRegExp = /@keyframes\s+([\w-]+)/; +/** + * Rule for @keyframes + */ + +var KeyframesRule = +/*#__PURE__*/ +function () { + function KeyframesRule(key, frames, options) { + this.type = 'keyframes'; + this.at = '@keyframes'; + this.isProcessed = false; + var nameMatch = key.match(nameRegExp); + + if (nameMatch && nameMatch[1]) { + this.name = nameMatch[1]; + } else { + this.name = 'noname'; + false ? undefined : void 0; + } + + this.key = this.type + "-" + this.name; + this.options = options; + var scoped = options.scoped, + sheet = options.sheet, + generateId = options.generateId; + this.id = scoped === false ? this.name : escape(generateId(this, sheet)); + this.rules = new RuleList(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + parent: this + })); + + for (var name in frames) { + this.rules.add(name, frames[name], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + parent: this + })); + } + + this.rules.process(); + } + /** + * Generates a CSS string. + */ + + + var _proto = KeyframesRule.prototype; + + _proto.toString = function toString(options) { + if (options === void 0) { + options = defaultToStringOptions$1; + } + + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak; + + if (options.indent == null) options.indent = defaultToStringOptions$1.indent; + if (options.children == null) options.children = defaultToStringOptions$1.children; + + if (options.children === false) { + return this.at + " " + this.id + " {}"; + } + + var children = this.rules.toString(options); + if (children) children = "" + linebreak + children + linebreak; + return this.at + " " + this.id + " {" + children + "}"; + }; + + return KeyframesRule; +}(); +var keyRegExp$1 = /@keyframes\s+/; +var refRegExp = /\$([\w-]+)/g; + +var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) { + if (typeof val === 'string') { + return val.replace(refRegExp, function (match, name) { + if (name in keyframes) { + return keyframes[name]; + } + + false ? undefined : void 0; + return match; + }); + } + + return val; +}; +/** + * Replace the reference for a animation name. + */ + + +var replaceRef = function replaceRef(style, prop, keyframes) { + var value = style[prop]; + var refKeyframe = findReferencedKeyframe(value, keyframes); + + if (refKeyframe !== value) { + style[prop] = refKeyframe; + } +}; + +var pluginKeyframesRule = { + onCreateRule: function onCreateRule(key, frames, options) { + return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null; + }, + // Animation name ref replacer. + onProcessStyle: function onProcessStyle(style, rule, sheet) { + if (rule.type !== 'style' || !sheet) return style; + if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes); + if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes); + return style; + }, + onChangeValue: function onChangeValue(val, prop, rule) { + var sheet = rule.options.sheet; + + if (!sheet) { + return val; + } + + switch (prop) { + case 'animation': + return findReferencedKeyframe(val, sheet.keyframes); + + case 'animation-name': + return findReferencedKeyframe(val, sheet.keyframes); + + default: + return val; + } + } +}; + +var KeyframeRule = +/*#__PURE__*/ +function (_BaseStyleRule) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__["default"])(KeyframeRule, _BaseStyleRule); + + function KeyframeRule() { + return _BaseStyleRule.apply(this, arguments) || this; + } + + var _proto = KeyframeRule.prototype; + + /** + * Generates a CSS string. + */ + _proto.toString = function toString(options) { + var sheet = this.options.sheet; + var link = sheet ? sheet.options.link : false; + var opts = link ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + allowEmpty: true + }) : options; + return toCss(this.key, this.style, opts); + }; + + return KeyframeRule; +}(BaseStyleRule); +var pluginKeyframeRule = { + onCreateRule: function onCreateRule(key, style, options) { + if (options.parent && options.parent.type === 'keyframes') { + return new KeyframeRule(key, style, options); + } + + return null; + } +}; + +var FontFaceRule = +/*#__PURE__*/ +function () { + function FontFaceRule(key, style, options) { + this.type = 'font-face'; + this.at = '@font-face'; + this.isProcessed = false; + this.key = key; + this.style = style; + this.options = options; + } + /** + * Generates a CSS string. + */ + + + var _proto = FontFaceRule.prototype; + + _proto.toString = function toString(options) { + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak; + + if (Array.isArray(this.style)) { + var str = ''; + + for (var index = 0; index < this.style.length; index++) { + str += toCss(this.at, this.style[index]); + if (this.style[index + 1]) str += linebreak; + } + + return str; + } + + return toCss(this.at, this.style, options); + }; + + return FontFaceRule; +}(); +var keyRegExp$2 = /@font-face/; +var pluginFontFaceRule = { + onCreateRule: function onCreateRule(key, style, options) { + return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null; + } +}; + +var ViewportRule = +/*#__PURE__*/ +function () { + function ViewportRule(key, style, options) { + this.type = 'viewport'; + this.at = '@viewport'; + this.isProcessed = false; + this.key = key; + this.style = style; + this.options = options; + } + /** + * Generates a CSS string. + */ + + + var _proto = ViewportRule.prototype; + + _proto.toString = function toString(options) { + return toCss(this.key, this.style, options); + }; + + return ViewportRule; +}(); +var pluginViewportRule = { + onCreateRule: function onCreateRule(key, style, options) { + return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null; + } +}; + +var SimpleRule = +/*#__PURE__*/ +function () { + function SimpleRule(key, value, options) { + this.type = 'simple'; + this.isProcessed = false; + this.key = key; + this.value = value; + this.options = options; + } + /** + * Generates a CSS string. + */ + // eslint-disable-next-line no-unused-vars + + + var _proto = SimpleRule.prototype; + + _proto.toString = function toString(options) { + if (Array.isArray(this.value)) { + var str = ''; + + for (var index = 0; index < this.value.length; index++) { + str += this.key + " " + this.value[index] + ";"; + if (this.value[index + 1]) str += '\n'; + } + + return str; + } + + return this.key + " " + this.value + ";"; + }; + + return SimpleRule; +}(); +var keysMap = { + '@charset': true, + '@import': true, + '@namespace': true +}; +var pluginSimpleRule = { + onCreateRule: function onCreateRule(key, value, options) { + return key in keysMap ? new SimpleRule(key, value, options) : null; + } +}; + +var plugins = [pluginStyleRule, pluginConditionalRule, pluginKeyframesRule, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule]; + +var defaultUpdateOptions = { + process: true +}; +var forceUpdateOptions = { + force: true, + process: true + /** + * Contains rules objects and allows adding/removing etc. + * Is used for e.g. by `StyleSheet` or `ConditionalRule`. + */ + +}; + +var RuleList = +/*#__PURE__*/ +function () { + // Rules registry for access by .get() method. + // It contains the same rule registered by name and by selector. + // Original styles object. + // Used to ensure correct rules order. + function RuleList(options) { + this.map = {}; + this.raw = {}; + this.index = []; + this.counter = 0; + this.options = options; + this.classes = options.classes; + this.keyframes = options.keyframes; + } + /** + * Create and register rule. + * + * Will not render after Style Sheet was rendered the first time. + */ + + + var _proto = RuleList.prototype; + + _proto.add = function add(name, decl, ruleOptions) { + var _this$options = this.options, + parent = _this$options.parent, + sheet = _this$options.sheet, + jss = _this$options.jss, + Renderer = _this$options.Renderer, + generateId = _this$options.generateId, + scoped = _this$options.scoped; + + var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + classes: this.classes, + parent: parent, + sheet: sheet, + jss: jss, + Renderer: Renderer, + generateId: generateId, + scoped: scoped, + name: name, + keyframes: this.keyframes, + selector: undefined + }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but + // `sheet.addRule()` opens the door for any duplicate rule name. When this happens + // we need to make the key unique within this RuleList instance scope. + + + var key = name; + + if (name in this.raw) { + key = name + "-d" + this.counter++; + } // We need to save the original decl before creating the rule + // because cache plugin needs to use it as a key to return a cached rule. + + + this.raw[key] = decl; + + if (key in this.classes) { + // E.g. rules inside of @media container + options.selector = "." + escape(this.classes[key]); + } + + var rule = createRule(key, decl, options); + if (!rule) return null; + this.register(rule); + var index = options.index === undefined ? this.index.length : options.index; + this.index.splice(index, 0, rule); + return rule; + } + /** + * Replace rule. + * Create a new rule and remove old one instead of overwriting + * because we want to invoke onCreateRule hook to make plugins work. + */ + ; + + _proto.replace = function replace(name, decl, ruleOptions) { + var oldRule = this.get(name); + var oldIndex = this.index.indexOf(oldRule); + + if (oldRule) { + this.remove(oldRule); + } + + var options = ruleOptions; + if (oldIndex !== -1) options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ruleOptions, { + index: oldIndex + }); + return this.add(name, decl, options); + } + /** + * Get a rule by name or selector. + */ + ; + + _proto.get = function get(nameOrSelector) { + return this.map[nameOrSelector]; + } + /** + * Delete a rule. + */ + ; + + _proto.remove = function remove(rule) { + this.unregister(rule); + delete this.raw[rule.key]; + this.index.splice(this.index.indexOf(rule), 1); + } + /** + * Get index of a rule. + */ + ; + + _proto.indexOf = function indexOf(rule) { + return this.index.indexOf(rule); + } + /** + * Run `onProcessRule()` plugins on every rule. + */ + ; + + _proto.process = function process() { + var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop + // we end up with very hard-to-track-down side effects. + + this.index.slice(0).forEach(plugins.onProcessRule, plugins); + } + /** + * Register a rule in `.map`, `.classes` and `.keyframes` maps. + */ + ; + + _proto.register = function register(rule) { + this.map[rule.key] = rule; + + if (rule instanceof StyleRule) { + this.map[rule.selector] = rule; + if (rule.id) this.classes[rule.key] = rule.id; + } else if (rule instanceof KeyframesRule && this.keyframes) { + this.keyframes[rule.name] = rule.id; + } + } + /** + * Unregister a rule. + */ + ; + + _proto.unregister = function unregister(rule) { + delete this.map[rule.key]; + + if (rule instanceof StyleRule) { + delete this.map[rule.selector]; + delete this.classes[rule.key]; + } else if (rule instanceof KeyframesRule) { + delete this.keyframes[rule.name]; + } + } + /** + * Update the function values with a new data. + */ + ; + + _proto.update = function update() { + var name; + var data; + var options; + + if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') { + name = arguments.length <= 0 ? undefined : arguments[0]; + data = arguments.length <= 1 ? undefined : arguments[1]; + options = arguments.length <= 2 ? undefined : arguments[2]; + } else { + data = arguments.length <= 0 ? undefined : arguments[0]; + options = arguments.length <= 1 ? undefined : arguments[1]; + name = null; + } + + if (name) { + this.updateOne(this.get(name), data, options); + } else { + for (var index = 0; index < this.index.length; index++) { + this.updateOne(this.index[index], data, options); + } + } + } + /** + * Execute plugins, update rule props. + */ + ; + + _proto.updateOne = function updateOne(rule, data, options) { + if (options === void 0) { + options = defaultUpdateOptions; + } + + var _this$options2 = this.options, + plugins = _this$options2.jss.plugins, + sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule. + + if (rule.rules instanceof RuleList) { + rule.rules.update(data, options); + return; + } + + var style = rule.style; + plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook. + + if (options.process && style && style !== rule.style) { + // We need to run the plugins in case new `style` relies on syntax plugins. + plugins.onProcessStyle(rule.style, rule, sheet); // Update and add props. + + for (var prop in rule.style) { + var nextValue = rule.style[prop]; + var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule. + // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here. + + if (nextValue !== prevValue) { + rule.prop(prop, nextValue, forceUpdateOptions); + } + } // Remove props. + + + for (var _prop in style) { + var _nextValue = rule.style[_prop]; + var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule. + // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here. + + if (_nextValue == null && _nextValue !== _prevValue) { + rule.prop(_prop, null, forceUpdateOptions); + } + } + } + } + /** + * Convert rules to a CSS string. + */ + ; + + _proto.toString = function toString(options) { + var str = ''; + var sheet = this.options.sheet; + var link = sheet ? sheet.options.link : false; + + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak; + + for (var index = 0; index < this.index.length; index++) { + var rule = this.index[index]; + var css = rule.toString(options); // No need to render an empty rule. + + if (!css && !link) continue; + if (str) str += linebreak; + str += css; + } + + return str; + }; + + return RuleList; +}(); + +var StyleSheet = +/*#__PURE__*/ +function () { + function StyleSheet(styles, options) { + this.attached = false; + this.deployed = false; + this.classes = {}; + this.keyframes = {}; + this.options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + sheet: this, + parent: this, + classes: this.classes, + keyframes: this.keyframes + }); + + if (options.Renderer) { + this.renderer = new options.Renderer(this); + } + + this.rules = new RuleList(this.options); + + for (var name in styles) { + this.rules.add(name, styles[name]); + } + + this.rules.process(); + } + /** + * Attach renderable to the render tree. + */ + + + var _proto = StyleSheet.prototype; + + _proto.attach = function attach() { + if (this.attached) return this; + if (this.renderer) this.renderer.attach(); + this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached. + + if (!this.deployed) this.deploy(); + return this; + } + /** + * Remove renderable from render tree. + */ + ; + + _proto.detach = function detach() { + if (!this.attached) return this; + if (this.renderer) this.renderer.detach(); + this.attached = false; + return this; + } + /** + * Add a rule to the current stylesheet. + * Will insert a rule also after the stylesheet has been rendered first time. + */ + ; + + _proto.addRule = function addRule(name, decl, options) { + var queue = this.queue; // Plugins can create rules. + // In order to preserve the right order, we need to queue all `.addRule` calls, + // which happen after the first `rules.add()` call. + + if (this.attached && !queue) this.queue = []; + var rule = this.rules.add(name, decl, options); + if (!rule) return null; + this.options.jss.plugins.onProcessRule(rule); + + if (this.attached) { + if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet. + // It will be inserted all together when .attach is called. + + if (queue) queue.push(rule);else { + this.insertRule(rule); + + if (this.queue) { + this.queue.forEach(this.insertRule, this); + this.queue = undefined; + } + } + return rule; + } // We can't add rules to a detached style node. + // We will redeploy the sheet once user will attach it. + + + this.deployed = false; + return rule; + } + /** + * Replace a rule in the current stylesheet. + */ + ; + + _proto.replaceRule = function replaceRule(nameOrSelector, decl, options) { + var oldRule = this.rules.get(nameOrSelector); + if (!oldRule) return this.addRule(nameOrSelector, decl, options); + var newRule = this.rules.replace(nameOrSelector, decl, options); + + if (newRule) { + this.options.jss.plugins.onProcessRule(newRule); + } + + if (this.attached) { + if (!this.deployed) return newRule; // Don't replace / delete rule directly if there is no stringified version yet. + // It will be inserted all together when .attach is called. + + if (this.renderer) { + if (!newRule) { + this.renderer.deleteRule(oldRule); + } else if (oldRule.renderable) { + this.renderer.replaceRule(oldRule.renderable, newRule); + } + } + + return newRule; + } // We can't replace rules to a detached style node. + // We will redeploy the sheet once user will attach it. + + + this.deployed = false; + return newRule; + } + /** + * Insert rule into the StyleSheet + */ + ; + + _proto.insertRule = function insertRule(rule) { + if (this.renderer) { + this.renderer.insertRule(rule); + } + } + /** + * Create and add rules. + * Will render also after Style Sheet was rendered the first time. + */ + ; + + _proto.addRules = function addRules(styles, options) { + var added = []; + + for (var name in styles) { + var rule = this.addRule(name, styles[name], options); + if (rule) added.push(rule); + } + + return added; + } + /** + * Get a rule by name or selector. + */ + ; + + _proto.getRule = function getRule(nameOrSelector) { + return this.rules.get(nameOrSelector); + } + /** + * Delete a rule by name. + * Returns `true`: if rule has been deleted from the DOM. + */ + ; + + _proto.deleteRule = function deleteRule(name) { + var rule = typeof name === 'object' ? name : this.rules.get(name); + + if (!rule || // Style sheet was created without link: true and attached, in this case we + // won't be able to remove the CSS rule from the DOM. + this.attached && !rule.renderable) { + return false; + } + + this.rules.remove(rule); + + if (this.attached && rule.renderable && this.renderer) { + return this.renderer.deleteRule(rule.renderable); + } + + return true; + } + /** + * Get index of a rule. + */ + ; + + _proto.indexOf = function indexOf(rule) { + return this.rules.indexOf(rule); + } + /** + * Deploy pure CSS string to a renderable. + */ + ; + + _proto.deploy = function deploy() { + if (this.renderer) this.renderer.deploy(); + this.deployed = true; + return this; + } + /** + * Update the function values with a new data. + */ + ; + + _proto.update = function update() { + var _this$rules; + + (_this$rules = this.rules).update.apply(_this$rules, arguments); + + return this; + } + /** + * Updates a single rule. + */ + ; + + _proto.updateOne = function updateOne(rule, data, options) { + this.rules.updateOne(rule, data, options); + return this; + } + /** + * Convert rules to a CSS string. + */ + ; + + _proto.toString = function toString(options) { + return this.rules.toString(options); + }; + + return StyleSheet; +}(); + +var PluginsRegistry = +/*#__PURE__*/ +function () { + function PluginsRegistry() { + this.plugins = { + internal: [], + external: [] + }; + this.registry = {}; + } + + var _proto = PluginsRegistry.prototype; + + /** + * Call `onCreateRule` hooks and return an object if returned by a hook. + */ + _proto.onCreateRule = function onCreateRule(name, decl, options) { + for (var i = 0; i < this.registry.onCreateRule.length; i++) { + var rule = this.registry.onCreateRule[i](name, decl, options); + if (rule) return rule; + } + + return null; + } + /** + * Call `onProcessRule` hooks. + */ + ; + + _proto.onProcessRule = function onProcessRule(rule) { + if (rule.isProcessed) return; + var sheet = rule.options.sheet; + + for (var i = 0; i < this.registry.onProcessRule.length; i++) { + this.registry.onProcessRule[i](rule, sheet); + } + + if (rule.style) this.onProcessStyle(rule.style, rule, sheet); + rule.isProcessed = true; + } + /** + * Call `onProcessStyle` hooks. + */ + ; + + _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) { + for (var i = 0; i < this.registry.onProcessStyle.length; i++) { + rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet); + } + } + /** + * Call `onProcessSheet` hooks. + */ + ; + + _proto.onProcessSheet = function onProcessSheet(sheet) { + for (var i = 0; i < this.registry.onProcessSheet.length; i++) { + this.registry.onProcessSheet[i](sheet); + } + } + /** + * Call `onUpdate` hooks. + */ + ; + + _proto.onUpdate = function onUpdate(data, rule, sheet, options) { + for (var i = 0; i < this.registry.onUpdate.length; i++) { + this.registry.onUpdate[i](data, rule, sheet, options); + } + } + /** + * Call `onChangeValue` hooks. + */ + ; + + _proto.onChangeValue = function onChangeValue(value, prop, rule) { + var processedValue = value; + + for (var i = 0; i < this.registry.onChangeValue.length; i++) { + processedValue = this.registry.onChangeValue[i](processedValue, prop, rule); + } + + return processedValue; + } + /** + * Register a plugin. + */ + ; + + _proto.use = function use(newPlugin, options) { + if (options === void 0) { + options = { + queue: 'external' + }; + } + + var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref. + + if (plugins.indexOf(newPlugin) !== -1) { + return; + } + + plugins.push(newPlugin); + this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) { + for (var name in plugin) { + if (name in registry) { + registry[name].push(plugin[name]); + } else { + false ? undefined : void 0; + } + } + + return registry; + }, { + onCreateRule: [], + onProcessRule: [], + onProcessStyle: [], + onProcessSheet: [], + onChangeValue: [], + onUpdate: [] + }); + }; + + return PluginsRegistry; +}(); + +/** + * Sheets registry to access all instances in one place. + */ + +var SheetsRegistry = +/*#__PURE__*/ +function () { + function SheetsRegistry() { + this.registry = []; + } + + var _proto = SheetsRegistry.prototype; + + /** + * Register a Style Sheet. + */ + _proto.add = function add(sheet) { + var registry = this.registry; + var index = sheet.options.index; + if (registry.indexOf(sheet) !== -1) return; + + if (registry.length === 0 || index >= this.index) { + registry.push(sheet); + return; + } // Find a position. + + + for (var i = 0; i < registry.length; i++) { + if (registry[i].options.index > index) { + registry.splice(i, 0, sheet); + return; + } + } + } + /** + * Reset the registry. + */ + ; + + _proto.reset = function reset() { + this.registry = []; + } + /** + * Remove a Style Sheet. + */ + ; + + _proto.remove = function remove(sheet) { + var index = this.registry.indexOf(sheet); + this.registry.splice(index, 1); + } + /** + * Convert all attached sheets to a CSS string. + */ + ; + + _proto.toString = function toString(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + attached = _ref.attached, + options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__["default"])(_ref, ["attached"]); + + var _getWhitespaceSymbols = getWhitespaceSymbols(options), + linebreak = _getWhitespaceSymbols.linebreak; + + var css = ''; + + for (var i = 0; i < this.registry.length; i++) { + var sheet = this.registry[i]; + + if (attached != null && sheet.attached !== attached) { + continue; + } + + if (css) css += linebreak; + css += sheet.toString(options); + } + + return css; + }; + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(SheetsRegistry, [{ + key: "index", + + /** + * Current highest index number. + */ + get: function get() { + return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index; + } + }]); + + return SheetsRegistry; +}(); + +/** + * This is a global sheets registry. Only DomRenderer will add sheets to it. + * On the server one should use an own SheetsRegistry instance and add the + * sheets to it, because you need to make sure to create a new registry for + * each request in order to not leak sheets across requests. + */ + +var sheets = new SheetsRegistry(); + +/* eslint-disable */ + +/** + * Now that `globalThis` is available on most platforms + * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility) + * we check for `globalThis` first. `globalThis` is necessary for jss + * to run in Agoric's secure version of JavaScript (SES). Under SES, + * `globalThis` exists, but `window`, `self`, and `Function('return + * this')()` are all undefined for security reasons. + * + * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + */ +var globalThis$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' && window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : Function('return this')(); + +var ns = '2f1acc6c3a606b082e5eef5e54414ffb'; +if (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify +// the current version with just one short number and use it for classes generation +// we use a counter. Also it is more accurate, because user can manually reevaluate +// the module. + +var moduleId = globalThis$1[ns]++; + +var maxRules = 1e10; +/** + * Returns a function which generates unique class names based on counters. + * When new generator function is created, rule counter is reseted. + * We need to reset the rule counter for SSR for each request. + */ + +var createGenerateId = function createGenerateId(options) { + if (options === void 0) { + options = {}; + } + + var ruleCounter = 0; + + var generateId = function generateId(rule, sheet) { + ruleCounter += 1; + + if (ruleCounter > maxRules) { + false ? undefined : void 0; + } + + var jssId = ''; + var prefix = ''; + + if (sheet) { + if (sheet.options.classNamePrefix) { + prefix = sheet.options.classNamePrefix; + } + + if (sheet.options.jss.id != null) { + jssId = String(sheet.options.jss.id); + } + } + + if (options.minify) { + // Using "c" because a number can't be the first char in a class name. + return "" + (prefix || 'c') + moduleId + jssId + ruleCounter; + } + + return prefix + rule.key + "-" + moduleId + (jssId ? "-" + jssId : '') + "-" + ruleCounter; + }; + + return generateId; +}; + +/** + * Cache the value from the first time a function is called. + */ + +var memoize = function memoize(fn) { + var value; + return function () { + if (!value) value = fn(); + return value; + }; +}; +/** + * Get a style property value. + */ + + +var getPropertyValue = function getPropertyValue(cssRule, prop) { + try { + // Support CSSTOM. + if (cssRule.attributeStyleMap) { + return cssRule.attributeStyleMap.get(prop); + } + + return cssRule.style.getPropertyValue(prop); + } catch (err) { + // IE may throw if property is unknown. + return ''; + } +}; +/** + * Set a style property. + */ + + +var setProperty = function setProperty(cssRule, prop, value) { + try { + var cssValue = value; + + if (Array.isArray(value)) { + cssValue = toCssValue(value, true); + + if (value[value.length - 1] === '!important') { + cssRule.style.setProperty(prop, cssValue, 'important'); + return true; + } + } // Support CSSTOM. + + + if (cssRule.attributeStyleMap) { + cssRule.attributeStyleMap.set(prop, cssValue); + } else { + cssRule.style.setProperty(prop, cssValue); + } + } catch (err) { + // IE may throw if property is unknown. + return false; + } + + return true; +}; +/** + * Remove a style property. + */ + + +var removeProperty = function removeProperty(cssRule, prop) { + try { + // Support CSSTOM. + if (cssRule.attributeStyleMap) { + cssRule.attributeStyleMap.delete(prop); + } else { + cssRule.style.removeProperty(prop); + } + } catch (err) { + false ? undefined : void 0; + } +}; +/** + * Set the selector. + */ + + +var setSelector = function setSelector(cssRule, selectorText) { + cssRule.selectorText = selectorText; // Return false if setter was not successful. + // Currently works in chrome only. + + return cssRule.selectorText === selectorText; +}; +/** + * Gets the `head` element upon the first call and caches it. + * We assume it can't be null. + */ + + +var getHead = memoize(function () { + return document.querySelector('head'); +}); +/** + * Find attached sheet with an index higher than the passed one. + */ + +function findHigherSheet(registry, options) { + for (var i = 0; i < registry.length; i++) { + var sheet = registry[i]; + + if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) { + return sheet; + } + } + + return null; +} +/** + * Find attached sheet with the highest index. + */ + + +function findHighestSheet(registry, options) { + for (var i = registry.length - 1; i >= 0; i--) { + var sheet = registry[i]; + + if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) { + return sheet; + } + } + + return null; +} +/** + * Find a comment with "jss" inside. + */ + + +function findCommentNode(text) { + var head = getHead(); + + for (var i = 0; i < head.childNodes.length; i++) { + var node = head.childNodes[i]; + + if (node.nodeType === 8 && node.nodeValue.trim() === text) { + return node; + } + } + + return null; +} +/** + * Find a node before which we can insert the sheet. + */ + + +function findPrevNode(options) { + var registry = sheets.registry; + + if (registry.length > 0) { + // Try to insert before the next higher sheet. + var sheet = findHigherSheet(registry, options); + + if (sheet && sheet.renderer) { + return { + parent: sheet.renderer.element.parentNode, + node: sheet.renderer.element + }; + } // Otherwise insert after the last attached. + + + sheet = findHighestSheet(registry, options); + + if (sheet && sheet.renderer) { + return { + parent: sheet.renderer.element.parentNode, + node: sheet.renderer.element.nextSibling + }; + } + } // Try to find a comment placeholder if registry is empty. + + + var insertionPoint = options.insertionPoint; + + if (insertionPoint && typeof insertionPoint === 'string') { + var comment = findCommentNode(insertionPoint); + + if (comment) { + return { + parent: comment.parentNode, + node: comment.nextSibling + }; + } // If user specifies an insertion point and it can't be found in the document - + // bad specificity issues may appear. + + + false ? undefined : void 0; + } + + return false; +} +/** + * Insert style element into the DOM. + */ + + +function insertStyle(style, options) { + var insertionPoint = options.insertionPoint; + var nextNode = findPrevNode(options); + + if (nextNode !== false && nextNode.parent) { + nextNode.parent.insertBefore(style, nextNode.node); + return; + } // Works with iframes and any node types. + + + if (insertionPoint && typeof insertionPoint.nodeType === 'number') { + var insertionPointElement = insertionPoint; + var parentNode = insertionPointElement.parentNode; + if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else false ? undefined : void 0; + return; + } + + getHead().appendChild(style); +} +/** + * Read jss nonce setting from the page if the user has set it. + */ + + +var getNonce = memoize(function () { + var node = document.querySelector('meta[property="csp-nonce"]'); + return node ? node.getAttribute('content') : null; +}); + +var _insertRule = function insertRule(container, rule, index) { + try { + if ('insertRule' in container) { + container.insertRule(rule, index); + } // Keyframes rule. + else if ('appendRule' in container) { + container.appendRule(rule); + } + } catch (err) { + false ? undefined : void 0; + return false; + } + + return container.cssRules[index]; +}; + +var getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) { + var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong + + if (index === undefined || index > maxIndex) { + // eslint-disable-next-line no-param-reassign + return maxIndex; + } + + return index; +}; + +var createStyle = function createStyle() { + var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we + // insert rules after we insert the style tag. + // It seems to kick-off the source order specificity algorithm. + + el.textContent = '\n'; + return el; +}; + +var DomRenderer = +/*#__PURE__*/ +function () { + // Will be empty if link: true option is not set, because + // it is only for use together with insertRule API. + function DomRenderer(sheet) { + this.getPropertyValue = getPropertyValue; + this.setProperty = setProperty; + this.removeProperty = removeProperty; + this.setSelector = setSelector; + this.hasInsertedRules = false; + this.cssRules = []; + // There is no sheet when the renderer is used from a standalone StyleRule. + if (sheet) sheets.add(sheet); + this.sheet = sheet; + + var _ref = this.sheet ? this.sheet.options : {}, + media = _ref.media, + meta = _ref.meta, + element = _ref.element; + + this.element = element || createStyle(); + this.element.setAttribute('data-jss', ''); + if (media) this.element.setAttribute('media', media); + if (meta) this.element.setAttribute('data-meta', meta); + var nonce = getNonce(); + if (nonce) this.element.setAttribute('nonce', nonce); + } + /** + * Insert style element into render tree. + */ + + + var _proto = DomRenderer.prototype; + + _proto.attach = function attach() { + // In the case the element node is external and it is already in the DOM. + if (this.element.parentNode || !this.sheet) return; + insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()` + // most browsers create a new CSSStyleSheet, except of all IEs. + + var deployed = Boolean(this.sheet && this.sheet.deployed); + + if (this.hasInsertedRules && deployed) { + this.hasInsertedRules = false; + this.deploy(); + } + } + /** + * Remove style element from render tree. + */ + ; + + _proto.detach = function detach() { + if (!this.sheet) return; + var parentNode = this.element.parentNode; + if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed. + // Though IE will keep them and we need a consistent behavior. + + if (this.sheet.options.link) { + this.cssRules = []; + this.element.textContent = '\n'; + } + } + /** + * Inject CSS string into element. + */ + ; + + _proto.deploy = function deploy() { + var sheet = this.sheet; + if (!sheet) return; + + if (sheet.options.link) { + this.insertRules(sheet.rules); + return; + } + + this.element.textContent = "\n" + sheet.toString() + "\n"; + } + /** + * Insert RuleList into an element. + */ + ; + + _proto.insertRules = function insertRules(rules, nativeParent) { + for (var i = 0; i < rules.index.length; i++) { + this.insertRule(rules.index[i], i, nativeParent); + } + } + /** + * Insert a rule into element. + */ + ; + + _proto.insertRule = function insertRule(rule, index, nativeParent) { + if (nativeParent === void 0) { + nativeParent = this.element.sheet; + } + + if (rule.rules) { + var parent = rule; + var latestNativeParent = nativeParent; + + if (rule.type === 'conditional' || rule.type === 'keyframes') { + var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first. + + + latestNativeParent = _insertRule(nativeParent, parent.toString({ + children: false + }), _insertionIndex); + + if (latestNativeParent === false) { + return false; + } + + this.refCssRule(rule, _insertionIndex, latestNativeParent); + } + + this.insertRules(parent.rules, latestNativeParent); + return latestNativeParent; + } + + var ruleStr = rule.toString(); + if (!ruleStr) return false; + var insertionIndex = getValidRuleInsertionIndex(nativeParent, index); + + var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex); + + if (nativeRule === false) { + return false; + } + + this.hasInsertedRules = true; + this.refCssRule(rule, insertionIndex, nativeRule); + return nativeRule; + }; + + _proto.refCssRule = function refCssRule(rule, index, cssRule) { + rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules + // like rules inside media queries or keyframes + + if (rule.options.parent instanceof StyleSheet) { + this.cssRules.splice(index, 0, cssRule); + } + } + /** + * Delete a rule. + */ + ; + + _proto.deleteRule = function deleteRule(cssRule) { + var sheet = this.element.sheet; + var index = this.indexOf(cssRule); + if (index === -1) return false; + sheet.deleteRule(index); + this.cssRules.splice(index, 1); + return true; + } + /** + * Get index of a CSS Rule. + */ + ; + + _proto.indexOf = function indexOf(cssRule) { + return this.cssRules.indexOf(cssRule); + } + /** + * Generate a new CSS rule and replace the existing one. + */ + ; + + _proto.replaceRule = function replaceRule(cssRule, rule) { + var index = this.indexOf(cssRule); + if (index === -1) return false; + this.element.sheet.deleteRule(index); + this.cssRules.splice(index, 1); + return this.insertRule(rule, index); + } + /** + * Get all rules elements. + */ + ; + + _proto.getRules = function getRules() { + return this.element.sheet.cssRules; + }; + + return DomRenderer; +}(); + +var instanceCounter = 0; + +var Jss = +/*#__PURE__*/ +function () { + function Jss(options) { + this.id = instanceCounter++; + this.version = "10.9.0"; + this.plugins = new PluginsRegistry(); + this.options = { + id: { + minify: false + }, + createGenerateId: createGenerateId, + Renderer: is_in_browser__WEBPACK_IMPORTED_MODULE_1__["default"] ? DomRenderer : null, + plugins: [] + }; + this.generateId = createGenerateId({ + minify: false + }); + + for (var i = 0; i < plugins.length; i++) { + this.plugins.use(plugins[i], { + queue: 'internal' + }); + } + + this.setup(options); + } + /** + * Prepares various options, applies plugins. + * Should not be used twice on the same instance, because there is no plugins + * deduplication logic. + */ + + + var _proto = Jss.prototype; + + _proto.setup = function setup(options) { + if (options === void 0) { + options = {}; + } + + if (options.createGenerateId) { + this.options.createGenerateId = options.createGenerateId; + } + + if (options.id) { + this.options.id = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.options.id, options.id); + } + + if (options.createGenerateId || options.id) { + this.generateId = this.options.createGenerateId(this.options.id); + } + + if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint; + + if ('Renderer' in options) { + this.options.Renderer = options.Renderer; + } // eslint-disable-next-line prefer-spread + + + if (options.plugins) this.use.apply(this, options.plugins); + return this; + } + /** + * Create a Style Sheet. + */ + ; + + _proto.createStyleSheet = function createStyleSheet(styles, options) { + if (options === void 0) { + options = {}; + } + + var _options = options, + index = _options.index; + + if (typeof index !== 'number') { + index = sheets.index === 0 ? 0 : sheets.index + 1; + } + + var sheet = new StyleSheet(styles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + jss: this, + generateId: options.generateId || this.generateId, + insertionPoint: this.options.insertionPoint, + Renderer: this.options.Renderer, + index: index + })); + this.plugins.onProcessSheet(sheet); + return sheet; + } + /** + * Detach the Style Sheet and remove it from the registry. + */ + ; + + _proto.removeStyleSheet = function removeStyleSheet(sheet) { + sheet.detach(); + sheets.remove(sheet); + return this; + } + /** + * Create a rule without a Style Sheet. + * [Deprecated] will be removed in the next major version. + */ + ; + + _proto.createRule = function createRule$1(name, style, options) { + if (style === void 0) { + style = {}; + } + + if (options === void 0) { + options = {}; + } + + // Enable rule without name for inline styles. + if (typeof name === 'object') { + return this.createRule(undefined, name, style); + } + + var ruleOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, options, { + name: name, + jss: this, + Renderer: this.options.Renderer + }); + + if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId; + if (!ruleOptions.classes) ruleOptions.classes = {}; + if (!ruleOptions.keyframes) ruleOptions.keyframes = {}; + + var rule = createRule(name, style, ruleOptions); + + if (rule) this.plugins.onProcessRule(rule); + return rule; + } + /** + * Register plugin. Passed function will be invoked with a rule instance. + */ + ; + + _proto.use = function use() { + var _this = this; + + for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { + plugins[_key] = arguments[_key]; + } + + plugins.forEach(function (plugin) { + _this.plugins.use(plugin); + }); + return this; + }; + + return Jss; +}(); + +var createJss = function createJss(options) { + return new Jss(options); +}; + +/** + * SheetsManager is like a WeakMap which is designed to count StyleSheet + * instances and attach/detach automatically. + * Used in react-jss. + */ + +var SheetsManager = +/*#__PURE__*/ +function () { + function SheetsManager() { + this.length = 0; + this.sheets = new WeakMap(); + } + + var _proto = SheetsManager.prototype; + + _proto.get = function get(key) { + var entry = this.sheets.get(key); + return entry && entry.sheet; + }; + + _proto.add = function add(key, sheet) { + if (this.sheets.has(key)) return; + this.length++; + this.sheets.set(key, { + sheet: sheet, + refs: 0 + }); + }; + + _proto.manage = function manage(key) { + var entry = this.sheets.get(key); + + if (entry) { + if (entry.refs === 0) { + entry.sheet.attach(); + } + + entry.refs++; + return entry.sheet; + } + + Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__["default"])(false, "[JSS] SheetsManager: can't find sheet to manage"); + return undefined; + }; + + _proto.unmanage = function unmanage(key) { + var entry = this.sheets.get(key); + + if (entry) { + if (entry.refs > 0) { + entry.refs--; + if (entry.refs === 0) entry.sheet.detach(); + } + } else { + Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__["default"])(false, "SheetsManager: can't find sheet to unmanage"); + } + }; + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(SheetsManager, [{ + key: "size", + get: function get() { + return this.length; + } + }]); + + return SheetsManager; +}(); + +/** +* Export a constant indicating if this browser has CSSTOM support. +* https://developers.google.com/web/updates/2018/03/cssom +*/ +var hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS; + +/** + * Extracts a styles object with only props that contain function values. + */ +function getDynamicStyles(styles) { + var to = null; + + for (var key in styles) { + var value = styles[key]; + var type = typeof value; + + if (type === 'function') { + if (!to) to = {}; + to[key] = value; + } else if (type === 'object' && value !== null && !Array.isArray(value)) { + var extracted = getDynamicStyles(value); + + if (extracted) { + if (!to) to = {}; + to[key] = extracted; + } + } + } + + return to; +} + +/** + * A better abstraction over CSS. + * + * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present + * @website https://github.com/cssinjs/jss + * @license MIT + */ +var index = createJss(); + +/* harmony default export */ __webpack_exports__["default"] = (index); + + + +/***/ }), + +/***/ "b7bY": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Module +exports.push([module.i, "[role=banner] .coz-sep-flex {\n margin: 0;\n border: none;\n flex: 1 0;\n}\n\n[role=banner] .blurry {\n opacity: .5;\n filter: blur(5px);\n}\n\n[role=banner] [data-icon] {\n background-repeat: no-repeat;\n background-position: 0 50%;\n padding-left: calc(16px + .5em);\n}\n\n[role=banner] .u-flex-grow {\n display: flex;\n flex-grow: 1;\n}\n\n/* Spinner */\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n\n/* Progress bar */\n[role=banner] progress[value] {\n /* Reset the default appearance */\n appearance: none;\n background-color: var(--paleGrey);\n border: solid 1px var(--silver);\n border-radius: 2px;\n color: var(--dodgerBlue);\n}\n\n[role=banner] progress[value]::-webkit-progress-bar {\n background: var(--paleGrey);\n border-radius: 2px;\n}\n\n[role=banner] progress[value]::-webkit-progress-value {\n background: var(--dodgerBlue);\n border-radius: 1px;\n}\n\n[role=banner] progress[value]::-moz-progress-bar {\n background: var(--dodgerBlue);\n border-radius: 1px;\n}\n\n/* Errors */\n[role=banner] .coz-nav--error {\n margin: 0 0 .1em 0;\n font-weight: normal;\n font-size: .875em;\n color: var(--pomegranate);\n}\n\n/* Claudy loading */\n[role=banner] .coz-claudy [data-claudy-loading=true]::before {\n position: absolute;\n content: '';\n width: 100%;\n height: 100%;\n bottom: 0;\n right: 0;\n background: none;\n border-radius: 100%;\n border: .2em solid var(--scienceBlue);\n border-right: .2em solid white;\n box-sizing: border-box;\n animation: 1s linear infinite spin;\n}\n\n[role=banner] {\n position: fixed;\n top: 0;\n left: 0;\n z-index: var(--z-index-bar);\n display: flex;\n align-items: stretch;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 100%;\n min-height: 3em;\n font-family: Lato, sans-serif;\n font-size: 1rem;\n}\n\n@media (min-width: 64rem) {\n [role=banner] {\n position: relative;\n }\n}\n\n[role=banner] .coz-bar-wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n[role=banner] .coz-bar-container {\n display: flex;\n height: 3rem;\n width: 100%;\n padding: 0 1.25em 0 1em;\n box-sizing: border-box;\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-container {\n padding: 0 1em 0 0;\n }\n}\n\n[role=banner] .coz-bar-title {\n display: flex;\n margin: 0;\n align-items: center;\n min-width: 8em;\n font-size: 1.5em;\n font-weight: normal;\n color: var(--charcoalGrey);\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-title {\n font-size: 1.25em\n }\n}\n\n[role=banner] .coz-bar-title img {\n margin-right: .45em;\n}\n\n[role=banner] .coz-bar-title span {\n margin-right: .25em;\n}\n\n[role=banner] .coz-bar-title strong {\n font-weight: bold;\n}\n\n@media (max-width: 30em) {\n [role=banner] .coz-bar-hide-sm {\n display: none;\n }\n\n [role=banner] .coz-bar-title strong {\n padding: 0;\n text-transform: capitalize;\n }\n}\n\n[role=banner] .coz-bar-btn {\n padding: 0;\n border: none;\n background-color: transparent;\n background-position: center;\n flex: 0 0 2.5rem;\n cursor: pointer;\n}\n\n[role=banner] .coz-bar-burger {\n margin-right: 0.25em;\n}\n\n@media (min-width: 48.0625em) {\n [role=banner] .coz-bar-burger,\n [role=banner] .coz-drawer-wrapper {\n display: none;\n }\n}\n\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-hide-sm {\n display: none;\n }\n}\n\n@media (max-width: 63.9375rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 6rem;\n }\n\n [role=banner] .coz-bar-banner {\n font-size: 14px;\n transition: none;\n transition-delay: none;\n }\n\n [role=banner] .coz-bar-banner-button {\n max-width: 7rem;\n }\n}\n\n@media (max-width: 30rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 7rem;\n }\n\n [role=banner] .coz-bar-banner {\n height: auto;\n font-size: 13px;\n }\n}\n\n@media (max-width: 18rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 8rem;\n }\n}\n\n[role=banner] .coz-bar-banner.unmounted {\n height: 0;\n}\n\n[role=banner] .coz-bar-banner {\n display: flex;\n background: var(--dodgerBlue);\n box-sizing: border-box;\n width: 100%;\n height: 3rem;\n padding: 0 1rem 0 1rem;\n justify-content: space-between;\n align-items: center;\n color: white;\n overflow: hidden;\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.06);\n transition: height 1s;\n transition-delay: 1s;\n}\n\n[role=banner] .coz-bar-banner-button,\n[role=banner] .coz-bar-banner-button:hover,\n[role=banner] .coz-bar-banner-button:visited\n[role=banner] .coz-bar-banner-button:active\n[role=banner] .coz-bar-banner-button:focus {\n border-color: white!important;\n min-height: 2rem;\n height: 2rem;\n flex-shrink: 0;\n max-width: 10rem;\n}\n\n[role=banner] .coz-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n position: relative;\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-nav {\n display: none;\n }\n}\n\n[role=banner] [aria-controls][aria-busy]::after {\n position: relative;\n top: .12em;\n margin: 0 .355em;\n font-size: .875em;\n}\n\n[role=banner] [aria-controls][aria-busy=true] {\n padding-right: 0;\n}\n\n[role=banner] .coz-nav [aria-controls][data-icon] {\n padding-left: calc(1.25em + 16px + .5em);\n background-position: 1em calc(50% - 1px);\n}\n\n/* POP */\n[role=banner] .coz-nav-pop[aria-hidden=true] {\n display: flex;\n transform: scale(0);\n opacity: 0;\n transition: .2s transform ease-in, .1s opacity ease-in;\n}\n\n[role=banner] .coz-nav-pop {\n position: absolute;\n top: calc(100% - .25em);\n box-sizing: border-box;\n min-width: 100%;\n max-height: calc(100vh - 4rem);\n overflow-y: auto;\n background-color: #fff;\n border-radius: 8px;\n border: solid 1px rgba(50, 54, 63, 0.12);\n box-shadow: 0 1px 3px 0 rgba(50, 54, 63, 0.19), 0 6px 18px 0 rgba(50, 54, 63, 0.19);\n opacity: 1;\n transform: scale(1);\n transform-origin: 80% 0%;\n transition: .2s transform cubic-bezier(0.2, 0.75, 0.3, 1.15);\n /* hide scrollbars */\n -ms-overflow-style: none; /* IE 10+ */\n}\n\n[role=banner] .coz-nav-pop::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group {\n padding: 8px 0 8px 0;;\n margin: 0;\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group:last-of-type {\n border-radius: 0 0 8px 8px;\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group:first-of-type {\n border-radius: 8px 8px 0 0;\n}\n\n[role=banner] .coz-nav-pop .coz-nav-group {\n border-bottom: solid 1px var(--silver);\n}\n\n[role=banner] .coz-nav-pop .coz-nav-group:last-child {\n border: 0;\n}\n\n/* Force pointer on clickable elements*/\n[role=banner] a[role=menuitem],\n[role=banner] button[role=menuitem] {\n cursor: pointer;\n border-left: 4px solid transparent;\n}\n\n[role=banner] a[role=menuitem]:hover,\n[role=banner] a[role=menuitem]:focus,\n[role=banner] button[role=menuitem]:hover,\n[role=banner] button[role=menuitem]:focus {\n background-color: var(--paleGrey);\n}\n\n[role=banner] [role=menuitem][aria-busy=true]::after {\n right: 1.5em;\n top: .5em;\n}\n\n[role=banner] .coz-drawer-wrapper [role=menuitem][aria-busy=true]::after {\n top: .8em;\n}\n\n/* nav group */\n\n[role=banner] .coz-nav-group.coz-nav--error {\n padding: 0.75em;\n min-width: 20em;\n}\n\n[role=banner] div[role=menuitem]:not([data-icon]) {\n margin: 0;\n padding-left: 1.5em;\n}\n\n[role=banner] .coz-nav-apps-btns {\n display: flex;\n align-items: center;\n font-size: 1rem;\n text-decoration: none;\n border: none;\n background-color: transparent;\n line-height: 1rem;\n}\n\n[role=banner] .coz-nav-apps-btns-main {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 3rem;\n margin: 0 .75rem;\n padding: 0;\n background-color: transparent;\n border: none;\n color: black;\n font-size: 1rem;\n}\n\n[role=banner] .coz-nav-apps-btns-main:hover,\n[role=banner] .coz-nav-apps-btns-main:focus,\n[role=banner] .coz-nav-apps-btns-main:active {\n cursor: pointer;\n color: black;\n}\n\n[role=banner] .coz-nav-apps-btns-main[disabled]:hover,\n[role=banner] .coz-nav-apps-btns-main[disabled]:focus,\n[role=banner] .coz-nav-apps-btns-main[disabled]:active {\n cursor: default;\n}\n\n[role=banner] .coz-nav-app-name {\n margin: 0 .4rem;\n font-weight: bold;\n}\n\n[role=banner] .coz-nav-apps-btns-sep {\n height: 1.75rem;\n background-color: #d8d8d8;\n width: 1px;\n}\n\n[role=banner] .coz-nav-apps-btns-home {\n height: 2rem;\n margin-right: .75rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home.--is-flagship {\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n justify-content: center;\n margin-right: .25rem;\n width: 3rem;\n}\n\n\n[role=banner] .coz-nav-apps-btns-home-svg {\n max-width: 2rem;\n max-height: 2rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home,\n[role=banner] .coz-nav-apps-btns-home[href]:visited {\n color: var(--dodgerBlue);\n}\n\n[role=banner] .coz-nav-apps-btns-home[href]:hover,\n[role=banner] .coz-nav-apps-btns-home[href]:active,\n[role=banner] .coz-nav-apps-btns-home[href]:focus {\n color: var(--scienceBlue);\n}\n\n[role=banner] .coz-nav-apps-btns.--currentHome .coz-nav-apps-btns-main {\n margin-left: 0;\n}\n\n[role=banner] .coz-nav-apps-btns.--currentHome .coz-nav-apps-btns-home {\n margin-right: 0;\n}\n\n/* POP */\n[role=banner] .coz-nav-pop--apps {\n width: 20rem;\n max-height: 29.5rem;\n left: 3.5rem;\n transform-origin: 10% 0%;\n}\n\n[role=banner] .coz-nav .--currentHome+.coz-nav-pop--apps {\n left: 0;\n}\n\n/* POP CONTENT */\n\n[role=banner] .coz-nav-pop--apps .coz-nav-pop-content {\n display: flex;\n flex-direction: column;\n /* pop size less pop border size*/\n max-height: calc(29.5rem - 2px);\n width: 100%;\n}\n\n@media (max-height: 21rem) {\n [role=banner] .coz-nav-pop--apps {\n max-height: calc(100vh - 4rem)\n }\n\n [role=banner] .coz-nav-pop--apps .coz-nav-pop-content {\n max-height: calc(100vh - 4rem - 2px);\n }\n}\n\n\n[role=banner] .coz-nav-pop--apps .coz-nav-pop-content .coz-nav-group {\n flex-grow: 1;\n flex-shrink: 1;\n overflow-y: auto;\n}\n\n[role=banner] .coz-nav-apps-item {\n display: flex;\n}\n\n/* current app item */\n[role=banner] .coz-nav-apps-item.--current a[role=menuitem] {\n font-weight: bold;\n background-color: var(--paleGrey);\n border-left: 4px solid var(--dodgerBlue)\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem],\n[role=banner] [role=menuitem].coz-apps-home-btn {\n display: flex;\n box-sizing: border-box;\n justify-content: flex-start;\n flex-shrink: 0;\n align-items: center;\n width: 100%;\n height: 3rem;\n /* we remove the left border from the padding */\n padding: .5rem 1rem .5rem calc(1rem - 4px);\n color: var(--charcoalGrey);\n text-decoration: none;\n outline: none;\n}\n\n[role=banner] .coz-nav-apps-item:first-of-type [role=menuitem] {\n margin-top: .5rem;\n}\n\n[role=banner] .coz-nav-apps-item:last-of-type [role=menuitem] {\n margin-bottom: .5rem;\n}\n\n[role=banner] .coz-nav-apps-item-icon {\n margin-right: .5rem;\n height: 2rem;\n width: 2rem;\n /* force svg inline to be 2rem */\n min-width: 2rem;\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem] .coz-label {\n padding-right: .5rem;\n width: 100%;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn {\n display: flex;\n margin-top: 0;\n color: #5d6165;\n font-weight: bold;\n font-size: 14px;\n justify-content: center;\n align-items: center;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn.--mobile>span {\n display: flex;\n justify-content: flex-start;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn svg {\n width: 1rem;\n height: 1rem;\n margin-right: .5rem;\n}\n\n@keyframes barPlaceHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n\n 80% {\n background-position: 20rem 0;\n }\n\n 80.1% {\n background-position: -20rem 0;\n }\n\n 100% {\n background-position: -20rem 0;\n }\n}\n\n[role=banner] .coz-loading-placeholder {\n display: inline-block;\n width: 100%;\n height: 100%;\n min-height: 1em;\n animation: barPlaceHolderShimmer 1s linear infinite;\n animation-delay: .1s;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n background-position: -20rem 0;\n background-image: linear-gradient(to right, var(--silver) 0, var(--paleGrey) 50%, var(--silver) 100%);\n background-size: 20rem 10rem;\n background-repeat: no-repeat;\n background-color: var(--silver);\n border-radius: .15rem;\n margin: .1rem 0;\n}\n\n\n[role=banner] .coz-nav-apps-item-icon.coz-loading-placeholder {\n width: 2rem;\n height: 2rem;\n margin: 0 1rem;\n display: block;\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem] .coz-label.coz-loading-placeholder {\n height: 1em;\n width: 7rem;\n}\n\n[role=banner] .coz-nav-apps-btns.--loading {\n width: 12rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home.coz-loading-placeholder {\n height: 2rem;\n width: 2rem;\n border-radius: 2rem;\n background-color: var(--silver);\n flex-shrink: 0;\n}\n\n[role=banner] .coz-nav-apps-btns-main.coz-loading-placeholder {\n height: 1.5rem;\n margin: 0;\n background-color: var(--silver);\n}\n[role=banner] .coz-nav-settings-btn {\n color: var(--slateGrey);\n}\n[role=banner] .coz-nav-settings-btn:hover,\n[role=banner] .coz-nav-settings-btn:focus {\n background-color: var(--paleGrey);\n box-shadow: inset 0 -1px 0 0 var(--silver);\n color: var(--charcoalGrey);\n}\n\n[role=banner] .coz-nav-pop--settings {\n right: 0;\n}\n\n[role=banner] .coz-nav-settings-item [role=menuitem] {\n display: flex;\n box-sizing: border-box;\n margin: 0;\n width: 100%;\n padding: 0.8rem 16px;\n border: none;\n background-color: transparent;\n text-align: left;\n font-size: 1rem;\n white-space: nowrap;\n color: var(--charcoalGrey);\n text-decoration: none;\n outline: none;\n}\n\n[role=banner] .coz-nav-settings-item {\n display: flex;\n}\n\n[role=banner] .coz-nav-settings-item .coz-nav-settings-item-btn[role=menuitem] > span > span {\n margin-right: auto;\n}\n\n[role=banner] .coz-nav-settings-item .coz-nav-settings-item-btn-external-icon {\n margin-left: auto;\n padding-left: 16px;\n}\n[role=banner] [role=menuitem][data-icon=icon-storage] {\n background-position: 1.5em calc(.8em + 1px);\n}\n\n[role=banner] .coz-nav-storage {\n display: flex;\n flex-direction: column;\n align-items: left;\n padding-top: .5em;\n color: var(--coolGrey);\n}\n\n[role=banner] .coz-nav-storage-text {\n margin: 0 0 .1em 0;\n font-weight: normal;\n font-size: .875em;\n}\n\n[role=banner] .cozy-nav-storage-bar {\n height: .5em;\n margin: .2em 0 .1em 0;\n}\n\n[role=banner] .coz-drawer-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100%;\n display: flex;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=true] {\n pointer-events: none;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] {\n pointer-events: auto;\n}\n\n[role=banner] .coz-drawer-wrapper::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--charcoalGrey);\n opacity: 0;\n transition: opacity .2s ease-out .1s;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false]::before {\n opacity: .5;\n transition: opacity .2s ease-out;\n}\n\n[role=banner] .coz-drawer-wrapper aside {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 90%;\n max-width: 30em;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n transform: translateX(-100%);\n transform-origin: 0% 0%;\n}\n\n[role=banner] .coz-drawer-wrapper aside.with-transition {\n transition: transform .2s ease-out;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] aside {\n transform: translateX(0%);\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] aside.with-transition {\n transition: transform .3s cubic-bezier(0.2, 0.75, 0.3, 1.0);\n}\n\n[role=banner] .coz-drawer-wrapper ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n[role=banner] .coz-drawer-wrapper nav hr {\n margin: 0;\n border: none;\n border-bottom: solid 1px var(--silver);\n}\n\n[role=banner] .coz-drawer-wrapper .coz-nav-icon {\n margin-right: .5em;\n}\n\n[role=banner] .coz-drawer--apps {\n flex: 0 1 100%;\n /* IMPORTANT: on Chrome, the `overflow-y: scroll` property on .coz-drawer--apps prevented\n swipe events to be dispatched correctly ; the `touch-action: pan-y` fixes the problem\n see https://greensock.com/forums/topic/17546-draggable-text-elements-with-overflow/ */\n overflow-y: scroll;\n touch-action: pan-y;\n position: relative;\n overflow-x: hidden;\n}\n\n[role=banner] .coz-drawer--apps ul li {\n flex: 0 0 100%;\n max-width: 100%;\n}\n\n[role=banner] .coz-drawer--apps ul:last-of-type + hr {\n display: none;\n}\n\n[role=banner] .coz-drawer--apps [role=menuitem] {\n display: flex;\n flex-direction: row;\n padding: .3em .3em .3em 1.3em;\n height: 3rem;\n}\n\n[role=banner] .coz-drawer--apps .coz-nav-item img {\n width: 2rem;\n margin-right: .5rem;\n max-height: 2rem;\n}\n\n\n[role=banner] .coz-drawer--apps .coz-nav-category {\n font-size: 1em;\n padding: 2em 2em .5em;\n margin: 0;\n}\n\n[role=banner] .coz-drawer--settings {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n/* /!\\ Trick to prevent application from scrolling in the background when the drawer is opened */\n[role=banner][data-drawer-visible=true] + [role=application] {\n position: fixed;\n width: 100%;\n}\n\n[role=banner] .coz-claudy {\n position: fixed;\n bottom: 5em;\n right: 2em;\n}\n\n@media (min-width: 64em) {\n [role=banner] .coz-claudy {\n bottom: 2em;\n }\n}\n\n[role=banner] .coz-claudy-icon {\n width: 3.5em;\n height: 3.5em;\n border-radius: 100%;\n border: none;\n background-color: var(--dodgerBlue);\n box-shadow: 0 1px 3px 0 rgba(50, 54, 63, 0.19), 0 6px 18px 0 rgba(50, 54, 63, 0.39);\n animation: none;\n cursor: pointer;\n opacity: .5;\n transition: all .2s ease-out;\n outline: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n[role=banner] .coz-claudy-icon:hover,\n[role=banner] .coz-claudy-icon:focus,\n[role=banner] .coz-claudy-icon:active,\n[role=banner] .coz-claudy [data-claudy-opened=true] {\n animation: none;\n transform: scale(1.1);\n opacity: 1;\n transition: all .2s ease-out;\n}\n\n[role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n position: fixed;\n bottom: 9.5em;\n right: 2em;\n width: 25em;\n border-radius: .3em;\n background: white;\n transform-origin: 100% 100% 0;\n transform: scale(0) translateY(6em);\n filter: drop-shadow(0 4px 6px rgba(50, 54, 63, 0.5));\n opacity: 0;\n transition: .2s transform ease-in, .1s opacity ease-in;\n}\n\n[role=banner] .coz-claudy--opened .coz-claudy-intent-wrapper {\n transform: scale(1) translateY(0);\n opacity: 1;\n transition: .2s transform cubic-bezier(0.2, 0.75, 0.3, 1.15), .1s opacity ease-in;\n}\n\n[role=banner] .coz-claudy-intent-wrapper::after {\n position: fixed;\n content: '';\n right: 3em;\n width: 0;\n height: 0;\n /* Make it a bit taller to avoid browser spacing issue\n between it and the tooltip */\n border-bottom: .8em solid transparent;\n border-right: 1.5em solid white;\n bottom: -.6em;\n}\n\n[role=banner] .coz-claudy .coz-claudy-intent-wrapper .coz-intent{\n width: 100%;\n height: 100%;\n border: none;\n border-radius: .3em;\n}\n\n@media (min-width: 64em) {\n [role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n bottom: 6.5em;\n }\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n width: calc(100% - 2em);\n height: calc(100% - 2em)!important; /* overwritte intent setSize here */\n right: 1em;\n top: 1em;\n transform-origin: 50% 50% 0;\n }\n\n [role=banner] .coz-claudy-intent-wrapper::after {\n display: none;\n }\n}\n\n[role=banner] .coz-bar-wrapper {\n box-shadow: inset 0 -1px 0 0 var(--silver);\n --cozBarThemePrimaryColor: var(--primaryColor);\n --cozBarThemePrimaryContrastTextColor: var(--primaryContrastTextColor);\n}\n[role=banner] .coz-bar-wrapper .coz-nav-apps-btns {\n color: var(--slateGrey);\n}\n[role=banner] .coz-bar-wrapper .coz-bar-burger {\n color: var(--coolGrey);\n}\n@media (max-width: 64em) {\n [role=banner] .coz-bar-wrapper {\n background-color: var(--white);\n }\n}\n@media (max-width: 48em) {\n [role=banner] .coz-bar-wrapper.coz-theme-primary {\n box-shadow: inherit;\n background-color: var(--cozBarThemePrimaryColor);\n }\n [role=banner] .coz-bar-wrapper.coz-theme-primary .coz-nav-apps-btns,\n [role=banner] .coz-bar-wrapper.coz-theme-primary .coz-bar-burger {\n color: var(--cozBarThemePrimaryContrastTextColor);\n }\n}\n:root {\n --invertedBackgroundColor: #297ef2;\n --invertedContrastTextColor: #fff;\n}\n.CozyTheme--inverted {\n --primaryTextColor: #fff;\n --secondaryTextColor: rgba(255,255,255,0.64);\n --disabledTextColor: rgba(255,255,255,0.4);\n --hintTextColor: rgba(255,255,255,0.4);\n --iconTextColor: #fff;\n --actionColorActive: #fff;\n --actionColorHover: rgba(255,255,255,0.08);\n --actionColorSelected: rgba(255,255,255,0.16);\n --actionColorDisabled: rgba(255,255,255,0.32);\n --actionColorDisabledBackground: rgba(255,255,255,0.12);\n --actionColorFocus: rgba(255,255,255,0.24);\n --actionColorGhost: rgba(255,255,255,0.08);\n --actionColorHoverGhost: rgba(255,255,255,0.16);\n --dividerColor: rgba(255,255,255,0.16);\n --borderMainColor: rgba(255,255,255,0.24);\n --borderDisabledColor: rgba(255,255,255,0.12);\n --borderGhostColor: rgba(255,255,255,0.48);\n --borderGhostDisabledColor: rgba(255,255,255,0.24);\n --paperBackgroundColor: #297ef2;\n --defaultBackgroundColor: #579eff;\n --contrastBackgroundColor: rgba(255,255,255,0.12);\n --primaryColorLight: #fff;\n --primaryColor: #fff;\n --primaryColorDark: #eaf3ff;\n --primaryContrastTextColor: #297ef2;\n --secondaryColorLight: #f8eefd;\n --secondaryColor: #ecd7f7;\n --secondaryColorDark: #deb8f0;\n --secondaryContrastTextColor: rgba(29,33,42,0.9);\n --errorColorLight: #ffecec;\n --errorColor: #ffd3d3;\n --errorColorDark: #ffb9b9;\n --errorColorContrastText: rgba(29,33,42,0.9);\n --errorBackground: #d31f1f;\n --warningColorLight: #fff3dd;\n --warningColor: #ffe4b5;\n --warningColorDark: #ffd58b;\n --warningColorContrastText: rgba(29,33,42,0.9);\n --successColorLight: #e3ffe7;\n --successColor: #c0f4c6;\n --successColorDark: #97eca1;\n --successColorContrastText: rgba(29,33,42,0.9);\n --infoColorLight: #d4feff;\n --infoColor: #affdff;\n --infoColorDark: #86f5f7;\n --infoColorContrastText: rgba(29,33,42,0.9);\n/*\n The CSS variables below are historic and we should strive not to\n use them. Prefer to use directly semantic colors above.\n */\n --iconColor: currentColor;\n --textIconColor: #fff;\n --actionMenuIconColor: #fff;\n --barIconColor: #fff;\n --barIconColorDisabled: rgba(255,255,255,0.88);\n --spinnerColor: #fff;\n --linkColor: #fff;\n --linkColorActive: #fff;\n --linkTextDecoration: underline;\n --regularButtonPrimaryColor: #fff;\n --regularButtonSecondaryColor: #fff;\n --regularButtonActiveColor: rgba(255,255,255,0.88);\n --regularButtonConstrastColor: #297ef2;\n --secondaryButtonPrimaryColor: #297ef2;\n --secondaryButtonSecondaryColor: #fff;\n --secondaryButtonActiveColor: rgba(255,255,255,0.24);\n --secondaryButtonContrastColor: #fff;\n --dividerColor2: rgba(255,255,255,0.16);\n}\nhtml {\n/*\n Grey\n\n Stylus: grey0 - #FFFFFF, CSS: var(--grey0)\n Stylus: grey50 - #f9fafb, CSS: var(--grey50)\n Stylus: grey100 - #f4f5f6, CSS: var(--grey100)\n Stylus: grey200 - #eceff1, CSS: var(--grey200)\n Stylus: grey300 - #dde0e3, CSS: var(--grey300)\n Stylus: grey400 - #bfc3c7, CSS: var(--grey400)\n Stylus: grey500 - #9da2a6, CSS: var(--grey500)\n Stylus: grey600 - #7c8086, CSS: var(--grey600)\n Stylus: grey700 - #5d6169, CSS: var(--grey700)\n Stylus: grey800 - #3e424a, CSS: var(--grey800)\n Stylus: grey900 - #1d212a, CSS: var(--grey900)\n Stylus: greyA100 - #d3d6d8, CSS: var(--greyA100)\n Stylus: greyA200 - #a7abaf, CSS: var(--greyA200)\n Stylus: greyA400 - #2c3039, CSS: var(--greyA400)\n Stylus: greyA700 - #5d6169, CSS: var(--greyA700)\n Stylus: white - #FFFFFF, CSS: var(--white)\n Stylus: paleGrey - #F5F6F7, CSS: var(--paleGrey)\n Stylus: silver - #D6D8Da, CSS: var(--silver)\n Stylus: coolGrey - #95999D, CSS: var(--coolGrey)\n Stylus: slateGrey - #5D6165, CSS: var(--slateGrey)\n Stylus: charcoalGrey - #32363F, CSS: var(--charcoalGrey)\n Stylus: black - #000000, CSS: var(--black)\n\n Styleguide Settings.colors.grey\n */\n --grey0: #fff;\n --grey50: #f9fafb;\n --grey100: #f4f5f6;\n --grey200: #eceff1;\n --grey300: #dde0e3;\n --grey400: #bfc3c7;\n --grey500: #9da2a6;\n --grey600: #7c8086;\n --grey700: #5d6169;\n --grey800: #3e424a;\n --grey900: #1d212a;\n --greyA100: #d3d6d8;\n --greyA200: #a7abaf;\n --greyA400: #2c3039;\n --greyA700: #5d6169;\n --white: #fff;\n --paleGrey: #f5f6f7;\n --silver: #d6d8da;\n --coolGrey: #95999d;\n --slateGrey: #5d6165;\n --charcoalGrey: #32363f;\n --black: #000;\n --overlay: rgba(50,54,63,0.5);\n/*\n Blue\n\n Stylus: zircon - #F5FAFF, CSS: var(--zircon)\n Stylus: dodgerBlue - #297EF2, CSS: var(--dodgerBlue)\n Stylus: scienceBlue - #0B61D6, CSS: var(--scienceBlue)\n\n Styleguide Settings.colors.blue\n */\n --zircon: #f5faff;\n --dodgerBlue: #297ef2;\n --scienceBlue: #0b61d6;\n/*\n Green\n\n Stylus: weirdGreen - #40DE8E, CSS: var(--weirdGreen)\n Stylus: emerald - #35CE68, CSS: var(--emerald)\n Stylus: malachite - #08b442, CSS: var(--malachite)\n\n Styleguide Settings.colors.green\n */\n --weirdGreen: #40de8e;\n --emerald: #35ce68;\n --malachite: #08b442;\n/*\n Orange\n\n Stylus: mango - #FF962F, CSS: var(--mango)\n\n Styleguide Settings.colors.orange\n */\n --mango: #ff962f;\n/*\n Red\n\n Stylus: chablis - #FFF2F2, CSS: var(--chablis)\n Stylus: yourPink - #FDCBCB, CSS: var(--yourPink)\n Stylus: fuchsia - #FC4C83, CSS: var(--fuchsia)\n Stylus: pomegranate - #F52D2D, CSS: var(--pomegranate)\n Stylus: monza - #DD0505, CSS: var(--monza)\n\n Styleguide Settings.colors.red\n */\n --chablis: #fff2f2;\n --yourPink: #fdcbcb;\n --fuchsia: #fc4c83;\n --pomegranate: #f52d2d;\n --monza: #dd0505;\n}\nhtml,\n.CozyTheme--normal {\n/*\n Primary colors\n\n Stylus: primaryColorLightest - #B3D3FF, CSS: var(--primaryColorLightest)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColorLightest: #b3d3ff;\n --primaryColorLight: #579eff;\n --primaryColor: #297ef2;\n --primaryColorDark: #0f5cc7;\n --primaryContrastTextColor: #fff;\n/*\n Secondary colors\n\n Stylus: secondaryColorLightest - #FFD3D3, CSS: var(--secondaryColorLightest)\n Stylus: secondaryColorLight - #F96B6B, CSS: var(--secondaryColorLight)\n Stylus: secondaryColor - #EA3F3F, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #D31F1F, CSS: var(--secondaryColorDark)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColorLightest: #ffd3d3;\n --secondaryColorLight: #f96b6b;\n --secondaryColor: #ea3f3f;\n --secondaryColorDark: #d31f1f;\n --secondaryContrastTextColor: #fff;\n/*\n Background colors\n\n Stylus: primaryBackgroundLight - #F7FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F4F5F6, CSS: var(--defaultBackgroundColor)\n Stylus: contrastBackgroundColor - #F5F5F6, CSS: var(--contrastBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #f7faff;\n --paperBackgroundColor: #fff;\n --defaultBackgroundColor: #f4f5f6;\n --contrastBackgroundColor: rgba(29,33,42,0.048);\n/*\n Text colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: primaryTextColor - #383B43, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #9D9EA1, CSS: var(--secondaryTextColor)\n Stylus: disabledTextColor - #BEBFC1, CSS: var(--disabledTextColor)\n Stylus: hintTextColor - #BEBFC1, CSS: var(--hintTextColor)\n Stylus: iconTextColor - #66686D, CSS: var(--iconTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor: rgba(29,33,42,0.9);\n --secondaryTextColor: rgba(29,33,42,0.48);\n --disabledTextColor: rgba(29,33,42,0.32);\n --hintTextColor: rgba(29,33,42,0.32);\n --iconTextColor: rgba(29,33,42,0.72);\n/*\n Action colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: actionColorActive - #8A8C90, CSS: var(--actionColorActive)\n Stylus: actionColorHover - #F7F7F7, CSS: var(--actionColorHover)\n Stylus: actionColorSelected - #EFEFF0, CSS: var(--actionColorSelected)\n Stylus: actionColorDisabled - #CFCFD1, CSS: var(--actionColorDisabled)\n Stylus: actionColorDisabledBackground - #E7E7E8, CSS: var(--actionColorDisabledBackground)\n Stylus: actionColorFocus - #E7E7E8, CSS: var(--actionColorFocus)\n Stylus: actionColorGhost - #EFEFF0, CSS: var(--actionColorGhost)\n Stylus: actionColorHoverGhost - #DFE0E0, CSS: var(--actionColorHoverGhost)\n\n Styleguide Settings.theme.action\n */\n --actionColorActive: rgba(29,33,42,0.56);\n --actionColorHover: rgba(29,33,42,0.04);\n --actionColorSelected: rgba(29,33,42,0.08);\n --actionColorDisabled: rgba(29,33,42,0.24);\n --actionColorDisabledBackground: rgba(29,33,42,0.12);\n --actionColorFocus: rgba(29,33,42,0.12);\n --actionColorGhost: rgba(29,33,42,0.08);\n --actionColorHoverGhost: rgba(29,33,42,0.16);\n/*\n Border colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: borderMainColor - #DFE0E0, CSS: var(--borderMainColor)\n Stylus: borderDisabledColor - #EFEFF0, CSS: var(--borderDisabledColor)\n Stylus: borderGhostColor - #9D9EA1, CSS: var(--borderGhostColor)\n Stylus: borderGhostDisabledColor - #DFE0E0, CSS: var(--borderGhostDisabledColor)\n\n Styleguide Settings.theme.border\n */\n --borderMainColor: rgba(29,33,42,0.16);\n --borderDisabledColor: rgba(29,33,42,0.08);\n --borderGhostColor: rgba(29,33,42,0.48);\n --borderGhostDisabledColor: rgba(29,33,42,0.16);\n/*\n Divider colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.divider\n */\n --dividerColor: rgba(29,33,42,0.12);\n/*\n Success colors\n\n Stylus: successColorLight - #38C949, CSS: var(--successColorLight)\n Stylus: successColor - #09AE1C, CSS: var(--successColor)\n Stylus: successColorDark - #018711, CSS: var(--successColorDark)\n Stylus: successColorContrastText - #FFF, CSS: var(--successColorContrastText)\n\n Styleguide Settings.theme.success\n */\n --successColorLight: #38c949;\n --successColor: #09ae1c;\n --successColorDark: #018711;\n --successColorContrastText: #fff;\n/*\n Warning colors\n\n Stylus: warningColorLight - #EFA82F, CSS: var(--warningColorLight)\n Stylus: warningColor - #CB8100, CSS: var(--warningColor)\n Stylus: warningColorDark - #986100, CSS: var(--warningColorDark)\n Stylus: warningColorContrastText - #FFF, CSS: var(--warningColorContrastText)\n\n Styleguide Settings.theme.warning\n */\n --warningColorLight: #efa82d;\n --warningColor: #cb8100;\n --warningColorDark: #986100;\n --warningColorContrastText: #fff;\n/*\n Error colors\n\n Stylus: errorColorLightest - #FFECEC, CSS: var(--errorColorLightest)\n Stylus: errorColorLight - #F96B6B, CSS: var(--errorColorLight)\n Stylus: errorColor - #EA3F3F, CSS: var(--errorColor)\n Stylus: errorColorDark - #D31F1F, CSS: var(--errorColorDark)\n Stylus: errorBackground - #FFECEC, CSS: var(--errorBackground)\n Stylus: errorColorContrastText - #FFF, CSS: var(--errorColorContrastText)\n\n Styleguide Settings.theme.error\n */\n --errorColorLightest: #ffecec;\n --errorColorLight: #f96b6b;\n --errorColor: #ea3f3f;\n --errorColorDark: #d31f1f;\n --errorBackground: #ffecec;\n --errorColorContrastText: #fff;\n/*\n Info colors\n\n Stylus: infoColorLight - #0EC4C7, CSS: var(--infoColorLight)\n Stylus: infoColor - #009FA2, CSS: var(--infoColor)\n Stylus: infoColorDark - #007578, CSS: var(--infoColorDark)\n Stylus: infoColorContrastText - #FFF, CSS: var(--infoColorContrastText)\n\n Styleguide Settings.theme.info\n */\n --infoColorLight: #0ec4c7;\n --infoColor: #009fa2;\n --infoColorDark: #007578;\n --infoColorContrastText: #fff;\n/*\n ---------------------------------------------------------------------\n */\n/*\n The CSS variables below are historic and we should strive not to\n use them. Prefer to use directly semantic colors above.\n */\n --spinnerColor: var(--primaryColor);\n --linkColor: var(--primaryColor);\n --linkTextDecoration: none;\n --linkColorActive: var(--primaryColorDark);\n --invertedTabsActiveTextColor: var(--primaryContrastTextColor);\n --invertedTabsInactiveTextColor: var(--primaryContrastTextColor);\n --invertedTabsIndicatorColor: var(--primaryContrastTextColor);\n --invertedTabsBackgroundColor: var(--primaryColor);\n --regularButtonPrimaryColor: var(--primaryColor);\n --regularButtonSecondaryColor: var(--primaryColor);\n --regularButtonActiveColor: var(--primaryColorDark);\n --regularButtonConstrastColor: var(--primaryContrastTextColor);\n --secondaryButtonPrimaryColor: #fff;\n --secondaryButtonSecondaryColor: var(--silver);\n --secondaryButtonActiveColor: var(--silver);\n --secondaryButtonContrastColor: var(--black);\n --dividerColor2: var(--coolGrey);\n --iconColor: currentColor;\n --textIconColor: var(--charcoalGrey);\n --actionMenuIconColor: var(--slateGrey);\n --neutralBackground: var(--paleGrey);\n --buttonTextTransform: uppercase;\n --buttonBorderRadius: 0.125rem;\n --navTextColor: var(--slateGrey);\n --navTextActiveColor: var(--slateGrey);\n --navTextHoverColor: var(--charcoalGrey);\n --alertErrorColor: #fff;\n --alertErrorBackgroundColor: var(--errorColor);\n --alertSuccessColor: #fff;\n --alertSuccessBackgroundColor: var(--successColor);\n --alertInfoColor: #fff;\n --alertInfoBackgroundColor: var(--slateGrey);\n}\nhtml {\n --zIndex-below: -1;\n --zIndex-app: 0;\n --zIndex-low: 1;\n --zIndex-alertMobile: 10;\n --zIndex-nav: 20;\n --zIndex-bar: 21;\n --zIndex-selection: 30;\n --zIndex-popover: 40;\n --zIndex-overlay: 50;\n --zIndex-fileActionMenu: 60;\n --zIndex-drawer: 60;\n --zIndex-modal: 70;\n --zindex-alert: 80;\n}\n.u-visuallyhidden,\n.coz-bar-hidden {\n position: absolute !important;\n border: 0 !important;\n width: 0.063rem !important;\n height: 0.063rem !important;\n overflow: hidden !important;\n padding: 0 !important;\n white-space: nowrap !important;\n clip: rect(0.063rem, 0.063rem, 0.063rem, 0.063rem) !important;\n clip-path: inset(50%) !important;\n}\n.u-hide {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n .u-hide--mob {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n .u-hide--tablet {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n .u-hide--desk {\n display: none !important;\n }\n}\n.u-dn {\n display: none;\n}\n.u-di {\n display: inline;\n}\n.u-db {\n display: block;\n}\n.u-dib {\n display: inline-block;\n}\n.u-dit {\n display: inline-table;\n}\n.u-dt {\n display: table;\n}\n.u-dtc {\n display: table-cell;\n}\n.u-dt-row {\n display: table-row;\n}\n.u-dt-row-group {\n display: table-row-group;\n}\n.u-dt-column {\n display: table-column;\n}\n.u-dt-column-group {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n .u-dn-t {\n display: none;\n }\n .u-di-t {\n display: inline;\n }\n .u-db-t {\n display: block;\n }\n .u-dib-t {\n display: inline-block;\n }\n .u-dit-t {\n display: inline-table;\n }\n .u-dt-t {\n display: table;\n }\n .u-dtc-t {\n display: table-cell;\n }\n .u-dt-row-t {\n display: table-row;\n }\n .u-dt-row-group-t {\n display: table-row-group;\n }\n .u-dt-column-t {\n display: table-column;\n }\n .u-dt-column-group-t {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n .u-dn-s {\n display: none;\n }\n .u-di-s {\n display: inline;\n }\n .u-db-s {\n display: block;\n }\n .u-dib-s {\n display: inline-block;\n }\n .u-dit-s {\n display: inline-table;\n }\n .u-dt-s {\n display: table;\n }\n .u-dtc-s {\n display: table-cell;\n }\n .u-dt-row-s {\n display: table-row;\n }\n .u-dt-row-group-s {\n display: table-row-group;\n }\n .u-dt-column-s {\n display: table-column;\n }\n .u-dt-column-group-s {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n .u-dn-m {\n display: none;\n }\n .u-di-m {\n display: inline;\n }\n .u-db-m {\n display: block;\n }\n .u-dib-m {\n display: inline-block;\n }\n .u-dit-m {\n display: inline-table;\n }\n .u-dt-m {\n display: table;\n }\n .u-dtc-m {\n display: table-cell;\n }\n .u-dt-row-m {\n display: table-row;\n }\n .u-dt-row-group-m {\n display: table-row-group;\n }\n .u-dt-column-m {\n display: table-column;\n }\n .u-dt-column-group-m {\n display: table-column-group;\n }\n}\n.u-p-0 {\n padding: 0 !important;\n}\n.u-pt-0 {\n padding-top: 0 !important;\n}\n.u-pb-0 {\n padding-bottom: 0 !important;\n}\n.u-pl-0 {\n padding-left: 0 !important;\n}\n.u-pr-0 {\n padding-right: 0 !important;\n}\n.u-pv-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n.u-ph-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n.u-p-1 {\n padding: 1rem !important;\n}\n.u-pt-1 {\n padding-top: 1rem !important;\n}\n.u-pb-1 {\n padding-bottom: 1rem !important;\n}\n.u-pl-1 {\n padding-left: 1rem !important;\n}\n.u-pr-1 {\n padding-right: 1rem !important;\n}\n.u-pv-1 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n.u-ph-1 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n}\n.u-p-2 {\n padding: 2rem !important;\n}\n.u-pt-2 {\n padding-top: 2rem !important;\n}\n.u-pb-2 {\n padding-bottom: 2rem !important;\n}\n.u-pl-2 {\n padding-left: 2rem !important;\n}\n.u-pr-2 {\n padding-right: 2rem !important;\n}\n.u-pv-2 {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n}\n.u-ph-2 {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n}\n.u-p-3 {\n padding: 3rem !important;\n}\n.u-pt-3 {\n padding-top: 3rem !important;\n}\n.u-pb-3 {\n padding-bottom: 3rem !important;\n}\n.u-pl-3 {\n padding-left: 3rem !important;\n}\n.u-pr-3 {\n padding-right: 3rem !important;\n}\n.u-pv-3 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n.u-ph-3 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n}\n.u-p-auto {\n padding: auto !important;\n}\n.u-pt-auto {\n padding-top: auto !important;\n}\n.u-pb-auto {\n padding-bottom: auto !important;\n}\n.u-pl-auto {\n padding-left: auto !important;\n}\n.u-pr-auto {\n padding-right: auto !important;\n}\n.u-pv-auto {\n padding-top: auto !important;\n padding-bottom: auto !important;\n}\n.u-ph-auto {\n padding-left: auto !important;\n padding-right: auto !important;\n}\n.u-p-half {\n padding: 0.5rem !important;\n}\n.u-pt-half {\n padding-top: 0.5rem !important;\n}\n.u-pb-half {\n padding-bottom: 0.5rem !important;\n}\n.u-pl-half {\n padding-left: 0.5rem !important;\n}\n.u-pr-half {\n padding-right: 0.5rem !important;\n}\n.u-pv-half {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n.u-ph-half {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n}\n.u-p-1-half {\n padding: 1.5rem !important;\n}\n.u-pt-1-half {\n padding-top: 1.5rem !important;\n}\n.u-pb-1-half {\n padding-bottom: 1.5rem !important;\n}\n.u-pl-1-half {\n padding-left: 1.5rem !important;\n}\n.u-pr-1-half {\n padding-right: 1.5rem !important;\n}\n.u-pv-1-half {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n.u-ph-1-half {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n}\n.u-p-2-half {\n padding: 2.5rem !important;\n}\n.u-pt-2-half {\n padding-top: 2.5rem !important;\n}\n.u-pb-2-half {\n padding-bottom: 2.5rem !important;\n}\n.u-pl-2-half {\n padding-left: 2.5rem !important;\n}\n.u-pr-2-half {\n padding-right: 2.5rem !important;\n}\n.u-pv-2-half {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n}\n.u-ph-2-half {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n}\n.u-m-0 {\n margin: 0 !important;\n}\n.u-mt-0 {\n margin-top: 0 !important;\n}\n.u-mb-0 {\n margin-bottom: 0 !important;\n}\n.u-ml-0 {\n margin-left: 0 !important;\n}\n.u-mr-0 {\n margin-right: 0 !important;\n}\n.u-mv-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n.u-mh-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n}\n.u-m-1 {\n margin: 1rem !important;\n}\n.u-mt-1 {\n margin-top: 1rem !important;\n}\n.u-mb-1 {\n margin-bottom: 1rem !important;\n}\n.u-ml-1 {\n margin-left: 1rem !important;\n}\n.u-mr-1 {\n margin-right: 1rem !important;\n}\n.u-mv-1 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n.u-mh-1 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n}\n.u-m-2 {\n margin: 2rem !important;\n}\n.u-mt-2 {\n margin-top: 2rem !important;\n}\n.u-mb-2 {\n margin-bottom: 2rem !important;\n}\n.u-ml-2 {\n margin-left: 2rem !important;\n}\n.u-mr-2 {\n margin-right: 2rem !important;\n}\n.u-mv-2 {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n}\n.u-mh-2 {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n}\n.u-m-3 {\n margin: 3rem !important;\n}\n.u-mt-3 {\n margin-top: 3rem !important;\n}\n.u-mb-3 {\n margin-bottom: 3rem !important;\n}\n.u-ml-3 {\n margin-left: 3rem !important;\n}\n.u-mr-3 {\n margin-right: 3rem !important;\n}\n.u-mv-3 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n.u-mh-3 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n}\n.u-m-auto {\n margin: auto !important;\n}\n.u-mt-auto {\n margin-top: auto !important;\n}\n.u-mb-auto {\n margin-bottom: auto !important;\n}\n.u-ml-auto {\n margin-left: auto !important;\n}\n.u-mr-auto {\n margin-right: auto !important;\n}\n.u-mv-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n.u-mh-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.u-m-half {\n margin: 0.5rem !important;\n}\n.u-mt-half {\n margin-top: 0.5rem !important;\n}\n.u-mb-half {\n margin-bottom: 0.5rem !important;\n}\n.u-ml-half {\n margin-left: 0.5rem !important;\n}\n.u-mr-half {\n margin-right: 0.5rem !important;\n}\n.u-mv-half {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n.u-mh-half {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n}\n.u-m-1-half {\n margin: 1.5rem !important;\n}\n.u-mt-1-half {\n margin-top: 1.5rem !important;\n}\n.u-mb-1-half {\n margin-bottom: 1.5rem !important;\n}\n.u-ml-1-half {\n margin-left: 1.5rem !important;\n}\n.u-mr-1-half {\n margin-right: 1.5rem !important;\n}\n.u-mv-1-half {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n.u-mh-1-half {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n}\n.u-m-2-half {\n margin: 2.5rem !important;\n}\n.u-mt-2-half {\n margin-top: 2.5rem !important;\n}\n.u-mb-2-half {\n margin-bottom: 2.5rem !important;\n}\n.u-ml-2-half {\n margin-left: 2.5rem !important;\n}\n.u-mr-2-half {\n margin-right: 2.5rem !important;\n}\n.u-mv-2-half {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n}\n.u-mh-2-half {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-p-0-t {\n padding: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-0-t {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-0-t {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-0-t {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-0-t {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-0-t {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-0-t {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-1-t {\n padding: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-1-t {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-1-t {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-1-t {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-1-t {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-1-t {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-1-t {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-2-t {\n padding: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-2-t {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-2-t {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-2-t {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-2-t {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-2-t {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-2-t {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-3-t {\n padding: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-3-t {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-3-t {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-3-t {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-3-t {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-3-t {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-3-t {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-auto-t {\n padding: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-auto-t {\n padding-top: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-auto-t {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-auto-t {\n padding-left: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-auto-t {\n padding-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-auto-t {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-auto-t {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-half-t {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-half-t {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-half-t {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-half-t {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-half-t {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-half-t {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-half-t {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-1-half-t {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-1-half-t {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-1-half-t {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-1-half-t {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-1-half-t {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-1-half-t {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-1-half-t {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-2-half-t {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-2-half-t {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-2-half-t {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-2-half-t {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-2-half-t {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-2-half-t {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-2-half-t {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-0-t {\n margin: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-0-t {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-0-t {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-0-t {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-0-t {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-0-t {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-0-t {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-1-t {\n margin: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-1-t {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-1-t {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-1-t {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-1-t {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-1-t {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-1-t {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-2-t {\n margin: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-2-t {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-2-t {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-2-t {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-2-t {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-2-t {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-2-t {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-3-t {\n margin: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-3-t {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-3-t {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-3-t {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-3-t {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-3-t {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-3-t {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-auto-t {\n margin: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-auto-t {\n margin-top: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-auto-t {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-auto-t {\n margin-left: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-auto-t {\n margin-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-auto-t {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-auto-t {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-half-t {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-half-t {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-half-t {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-half-t {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-half-t {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-half-t {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-half-t {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-1-half-t {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-1-half-t {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-1-half-t {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-1-half-t {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-1-half-t {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-1-half-t {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-1-half-t {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-2-half-t {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-2-half-t {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-2-half-t {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-2-half-t {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-2-half-t {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-2-half-t {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-2-half-t {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-0-s {\n padding: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-0-s {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-0-s {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-0-s {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-0-s {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-0-s {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-0-s {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-1-s {\n padding: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-1-s {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-1-s {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-1-s {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-1-s {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-1-s {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-1-s {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-2-s {\n padding: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-2-s {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-2-s {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-2-s {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-2-s {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-2-s {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-2-s {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-3-s {\n padding: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-3-s {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-3-s {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-3-s {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-3-s {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-3-s {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-3-s {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-auto-s {\n padding: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-auto-s {\n padding-top: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-auto-s {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-auto-s {\n padding-left: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-auto-s {\n padding-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-auto-s {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-auto-s {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-half-s {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-half-s {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-half-s {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-half-s {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-half-s {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-half-s {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-half-s {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-1-half-s {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-1-half-s {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-1-half-s {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-1-half-s {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-1-half-s {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-1-half-s {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-1-half-s {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-2-half-s {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-2-half-s {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-2-half-s {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-2-half-s {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-2-half-s {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-2-half-s {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-2-half-s {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-0-s {\n margin: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-0-s {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-0-s {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-0-s {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-0-s {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-0-s {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-0-s {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-1-s {\n margin: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-1-s {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-1-s {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-1-s {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-1-s {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-1-s {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-1-s {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-2-s {\n margin: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-2-s {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-2-s {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-2-s {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-2-s {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-2-s {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-2-s {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-3-s {\n margin: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-3-s {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-3-s {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-3-s {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-3-s {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-3-s {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-3-s {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-auto-s {\n margin: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-auto-s {\n margin-top: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-auto-s {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-auto-s {\n margin-left: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-auto-s {\n margin-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-auto-s {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-auto-s {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-half-s {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-half-s {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-half-s {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-half-s {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-half-s {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-half-s {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-half-s {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-1-half-s {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-1-half-s {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-1-half-s {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-1-half-s {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-1-half-s {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-1-half-s {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-1-half-s {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-2-half-s {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-2-half-s {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-2-half-s {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-2-half-s {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-2-half-s {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-2-half-s {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-2-half-s {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-0-m {\n padding: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-0-m {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-0-m {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-0-m {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-0-m {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-0-m {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-0-m {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-1-m {\n padding: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-1-m {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-1-m {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-1-m {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-1-m {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-1-m {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-1-m {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-2-m {\n padding: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-2-m {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-2-m {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-2-m {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-2-m {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-2-m {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-2-m {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-3-m {\n padding: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-3-m {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-3-m {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-3-m {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-3-m {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-3-m {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-3-m {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-auto-m {\n padding: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-auto-m {\n padding-top: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-auto-m {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-auto-m {\n padding-left: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-auto-m {\n padding-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-auto-m {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-auto-m {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-half-m {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-half-m {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-half-m {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-half-m {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-half-m {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-half-m {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-half-m {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-1-half-m {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-1-half-m {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-1-half-m {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-1-half-m {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-1-half-m {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-1-half-m {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-1-half-m {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-2-half-m {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-2-half-m {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-2-half-m {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-2-half-m {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-2-half-m {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-2-half-m {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-2-half-m {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-0-m {\n margin: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-0-m {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-0-m {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-0-m {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-0-m {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-0-m {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-0-m {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-1-m {\n margin: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-1-m {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-1-m {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-1-m {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-1-m {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-1-m {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-1-m {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-2-m {\n margin: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-2-m {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-2-m {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-2-m {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-2-m {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-2-m {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-2-m {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-3-m {\n margin: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-3-m {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-3-m {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-3-m {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-3-m {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-3-m {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-3-m {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-auto-m {\n margin: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-auto-m {\n margin-top: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-auto-m {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-auto-m {\n margin-left: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-auto-m {\n margin-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-auto-m {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-auto-m {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-half-m {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-half-m {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-half-m {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-half-m {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-half-m {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-half-m {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-half-m {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-1-half-m {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-1-half-m {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-1-half-m {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-1-half-m {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-1-half-m {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-1-half-m {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-1-half-m {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-2-half-m {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-2-half-m {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-2-half-m {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-2-half-m {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-2-half-m {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-2-half-m {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-2-half-m {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n.u-pos-absolute {\n position: absolute;\n}\n.u-pos-relative {\n position: relative;\n}\n.u-pos-fixed {\n position: fixed;\n}\n.u-pos-sticky {\n position: sticky;\n}\n.u-pos-static {\n position: static;\n}\n@media (max-width: 30rem) {\n .u-pos-absolute-t {\n position: absolute;\n }\n .u-pos-relative-t {\n position: relative;\n }\n .u-pos-fixed-t {\n position: fixed;\n }\n .u-pos-sticky-t {\n position: sticky;\n }\n .u-pos-static-t {\n position: static;\n }\n}\n@media (max-width: 48rem) {\n .u-pos-absolute-s {\n position: absolute;\n }\n .u-pos-relative-s {\n position: relative;\n }\n .u-pos-fixed-s {\n position: fixed;\n }\n .u-pos-sticky-s {\n position: sticky;\n }\n .u-pos-static-s {\n position: static;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pos-absolute-m {\n position: absolute;\n }\n .u-pos-relative-m {\n position: relative;\n }\n .u-pos-fixed-m {\n position: fixed;\n }\n .u-pos-sticky-m {\n position: sticky;\n }\n .u-pos-static-m {\n position: static;\n }\n}\n.u-top-m {\n top: 1rem;\n}\n.u-top-xs {\n top: 0.5rem;\n}\n.u-top-s {\n top: 0.75rem;\n}\n.u-top-l {\n top: 1.5rem;\n}\n.u-top-xl {\n top: 2rem;\n}\n.u-top-xxl {\n top: 3rem;\n}\n.u-top-0 {\n top: 0;\n}\n.u-bottom-m {\n bottom: 1rem;\n}\n.u-bottom-xs {\n bottom: 0.5rem;\n}\n.u-bottom-s {\n bottom: 0.75rem;\n}\n.u-bottom-l {\n bottom: 1.5rem;\n}\n.u-bottom-xl {\n bottom: 2rem;\n}\n.u-bottom-xxl {\n bottom: 3rem;\n}\n.u-bottom-0 {\n bottom: 0;\n}\n.u-left-m {\n left: 1rem;\n}\n.u-left-xs {\n left: 0.5rem;\n}\n.u-left-s {\n left: 0.75rem;\n}\n.u-left-l {\n left: 1.5rem;\n}\n.u-left-xl {\n left: 2rem;\n}\n.u-left-xxl {\n left: 3rem;\n}\n.u-left-0 {\n left: 0;\n}\n.u-right-m {\n right: 1rem;\n}\n.u-right-xs {\n right: 0.5rem;\n}\n.u-right-s {\n right: 0.75rem;\n}\n.u-right-l {\n right: 1.5rem;\n}\n.u-right-xl {\n right: 2rem;\n}\n.u-right-xxl {\n right: 3rem;\n}\n.u-right-0 {\n right: 0;\n}\n.u-miw-1 {\n min-width: 1rem !important;\n}\n.u-maw-1 {\n max-width: 1rem !important;\n}\n.u-mih-1 {\n min-height: 1rem !important;\n}\n.u-mah-1 {\n max-height: 1rem !important;\n}\n.u-miw-2 {\n min-width: 2rem !important;\n}\n.u-maw-2 {\n max-width: 2rem !important;\n}\n.u-mih-2 {\n min-height: 2rem !important;\n}\n.u-mah-2 {\n max-height: 2rem !important;\n}\n.u-miw-3 {\n min-width: 4rem !important;\n}\n.u-maw-3 {\n max-width: 4rem !important;\n}\n.u-mih-3 {\n min-height: 4rem !important;\n}\n.u-mah-3 {\n max-height: 4rem !important;\n}\n.u-miw-4 {\n min-width: 8rem !important;\n}\n.u-maw-4 {\n max-width: 8rem !important;\n}\n.u-mih-4 {\n min-height: 8rem !important;\n}\n.u-mah-4 {\n max-height: 8rem !important;\n}\n.u-miw-5 {\n min-width: 16rem !important;\n}\n.u-maw-5 {\n max-width: 16rem !important;\n}\n.u-mih-5 {\n min-height: 16rem !important;\n}\n.u-mah-5 {\n max-height: 16rem !important;\n}\n.u-miw-6 {\n min-width: 32rem !important;\n}\n.u-maw-6 {\n max-width: 32rem !important;\n}\n.u-mih-6 {\n min-height: 32rem !important;\n}\n.u-mah-6 {\n max-height: 32rem !important;\n}\n.u-miw-7 {\n min-width: 48rem !important;\n}\n.u-maw-7 {\n max-width: 48rem !important;\n}\n.u-mih-7 {\n min-height: 48rem !important;\n}\n.u-mah-7 {\n max-height: 48rem !important;\n}\n.u-miw-8 {\n min-width: 64rem !important;\n}\n.u-maw-8 {\n max-width: 64rem !important;\n}\n.u-mih-8 {\n min-height: 64rem !important;\n}\n.u-mah-8 {\n max-height: 64rem !important;\n}\n.u-miw-9 {\n min-width: 96rem !important;\n}\n.u-maw-9 {\n max-width: 96rem !important;\n}\n.u-mih-9 {\n min-height: 96rem !important;\n}\n.u-mah-9 {\n max-height: 96rem !important;\n}\n.u-miw-100 {\n min-width: 100% !important;\n}\n.u-maw-100 {\n max-width: 100% !important;\n}\n.u-mih-100 {\n min-height: 100% !important;\n}\n.u-mah-100 {\n max-height: 100% !important;\n}\n.u-maw-none {\n max-width: none !important;\n}\n.u-mah-none {\n max-height: none !important;\n}\n.u-miw-auto {\n min-width: auto !important;\n}\n.u-mih-auto {\n min-height: auto !important;\n}\n.u-miw-half {\n min-width: 0.5rem !important;\n}\n.u-maw-half {\n max-width: 0.5rem !important;\n}\n.u-mih-half {\n min-height: 0.5rem !important;\n}\n.u-mah-half {\n max-height: 0.5rem !important;\n}\n.u-miw-1-half {\n min-width: 1.5rem !important;\n}\n.u-maw-1-half {\n max-width: 1.5rem !important;\n}\n.u-mih-1-half {\n min-height: 1.5rem !important;\n}\n.u-mah-1-half {\n max-height: 1.5rem !important;\n}\n.u-miw-2-half {\n min-width: 2.5rem !important;\n}\n.u-maw-2-half {\n max-width: 2.5rem !important;\n}\n.u-mih-2-half {\n min-height: 2.5rem !important;\n}\n.u-mah-2-half {\n max-height: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-miw-1-t {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-1-t {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-1-t {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-1-t {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-2-t {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-2-t {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-2-t {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-2-t {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-3-t {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-3-t {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-3-t {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-3-t {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-4-t {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-4-t {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-4-t {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-4-t {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-5-t {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-5-t {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-5-t {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-5-t {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-6-t {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-6-t {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-6-t {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-6-t {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-7-t {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-7-t {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-7-t {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-7-t {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-8-t {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-8-t {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-8-t {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-8-t {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-9-t {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-9-t {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-9-t {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-9-t {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-100-t {\n min-width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-100-t {\n max-width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-100-t {\n min-height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-100-t {\n max-height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-none-t {\n max-width: none !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-none-t {\n max-height: none !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-auto-t {\n min-width: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-auto-t {\n min-height: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-half-t {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-half-t {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-half-t {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-half-t {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-1-half-t {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-1-half-t {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-1-half-t {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-1-half-t {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-2-half-t {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-2-half-t {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-2-half-t {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-2-half-t {\n max-height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-1-s {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-1-s {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-1-s {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-1-s {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-2-s {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-2-s {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-2-s {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-2-s {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-3-s {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-3-s {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-3-s {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-3-s {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-4-s {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-4-s {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-4-s {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-4-s {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-5-s {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-5-s {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-5-s {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-5-s {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-6-s {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-6-s {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-6-s {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-6-s {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-7-s {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-7-s {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-7-s {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-7-s {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-8-s {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-8-s {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-8-s {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-8-s {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-9-s {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-9-s {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-9-s {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-9-s {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-100-s {\n min-width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-100-s {\n max-width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-100-s {\n min-height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-100-s {\n max-height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-none-s {\n max-width: none !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-none-s {\n max-height: none !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-auto-s {\n min-width: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-auto-s {\n min-height: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-half-s {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-half-s {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-half-s {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-half-s {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-1-half-s {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-1-half-s {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-1-half-s {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-1-half-s {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-2-half-s {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-2-half-s {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-2-half-s {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-2-half-s {\n max-height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-1-m {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-1-m {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-1-m {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-1-m {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-2-m {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-2-m {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-2-m {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-2-m {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-3-m {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-3-m {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-3-m {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-3-m {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-4-m {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-4-m {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-4-m {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-4-m {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-5-m {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-5-m {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-5-m {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-5-m {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-6-m {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-6-m {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-6-m {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-6-m {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-7-m {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-7-m {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-7-m {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-7-m {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-8-m {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-8-m {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-8-m {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-8-m {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-9-m {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-9-m {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-9-m {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-9-m {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-100-m {\n min-width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-100-m {\n max-width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-100-m {\n min-height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-100-m {\n max-height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-none-m {\n max-width: none !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-none-m {\n max-height: none !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-auto-m {\n min-width: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-auto-m {\n min-height: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-half-m {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-half-m {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-half-m {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-half-m {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-1-half-m {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-1-half-m {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-1-half-m {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-1-half-m {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-2-half-m {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-2-half-m {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-2-half-m {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-2-half-m {\n max-height: 2.5rem !important;\n }\n}\n.u-w-1 {\n width: 1rem !important;\n}\n.u-h-1 {\n height: 1rem !important;\n}\n.u-w-2 {\n width: 2rem !important;\n}\n.u-h-2 {\n height: 2rem !important;\n}\n.u-w-3 {\n width: 4rem !important;\n}\n.u-h-3 {\n height: 4rem !important;\n}\n.u-w-4 {\n width: 8rem !important;\n}\n.u-h-4 {\n height: 8rem !important;\n}\n.u-w-5 {\n width: 16rem !important;\n}\n.u-h-5 {\n height: 16rem !important;\n}\n.u-w-6 {\n width: 32rem !important;\n}\n.u-h-6 {\n height: 32rem !important;\n}\n.u-w-7 {\n width: 48rem !important;\n}\n.u-h-7 {\n height: 48rem !important;\n}\n.u-w-8 {\n width: 64rem !important;\n}\n.u-h-8 {\n height: 64rem !important;\n}\n.u-w-9 {\n width: 96rem !important;\n}\n.u-h-9 {\n height: 96rem !important;\n}\n.u-w-100 {\n width: 100% !important;\n}\n.u-h-100 {\n height: 100% !important;\n}\n.u-w-auto {\n width: auto !important;\n}\n.u-h-auto {\n height: auto !important;\n}\n.u-w-half {\n width: 0.5rem !important;\n}\n.u-h-half {\n height: 0.5rem !important;\n}\n.u-w-1-half {\n width: 1.5rem !important;\n}\n.u-h-1-half {\n height: 1.5rem !important;\n}\n.u-w-2-half {\n width: 2.5rem !important;\n}\n.u-h-2-half {\n height: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-w-1-t {\n width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-1-t {\n height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-2-t {\n width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-2-t {\n height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-3-t {\n width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-3-t {\n height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-4-t {\n width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-4-t {\n height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-5-t {\n width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-5-t {\n height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-6-t {\n width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-6-t {\n height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-7-t {\n width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-7-t {\n height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-8-t {\n width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-8-t {\n height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-9-t {\n width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-9-t {\n height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-100-t {\n width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-100-t {\n height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-auto-t {\n width: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-auto-t {\n height: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-half-t {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-half-t {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-1-half-t {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-1-half-t {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-2-half-t {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-2-half-t {\n height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-1-s {\n width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-1-s {\n height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-2-s {\n width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-2-s {\n height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-3-s {\n width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-3-s {\n height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-4-s {\n width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-4-s {\n height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-5-s {\n width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-5-s {\n height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-6-s {\n width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-6-s {\n height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-7-s {\n width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-7-s {\n height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-8-s {\n width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-8-s {\n height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-9-s {\n width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-9-s {\n height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-100-s {\n width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-100-s {\n height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-auto-s {\n width: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-auto-s {\n height: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-half-s {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-half-s {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-1-half-s {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-1-half-s {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-2-half-s {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-2-half-s {\n height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-1-m {\n width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-1-m {\n height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-2-m {\n width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-2-m {\n height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-3-m {\n width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-3-m {\n height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-4-m {\n width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-4-m {\n height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-5-m {\n width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-5-m {\n height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-6-m {\n width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-6-m {\n height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-7-m {\n width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-7-m {\n height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-8-m {\n width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-8-m {\n height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-9-m {\n width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-9-m {\n height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-100-m {\n width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-100-m {\n height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-auto-m {\n width: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-auto-m {\n height: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-half-m {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-half-m {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-1-half-m {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-1-half-m {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-2-half-m {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-2-half-m {\n height: 2.5rem !important;\n }\n}\n@-moz-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-webkit-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-o-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-moz-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@-webkit-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@-o-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n.u-visuallyhidden,\n.coz-bar-hidden {\n position: absolute !important;\n border: 0 !important;\n width: 0.063rem !important;\n height: 0.063rem !important;\n overflow: hidden !important;\n padding: 0 !important;\n white-space: nowrap !important;\n clip: rect(0.063rem, 0.063rem, 0.063rem, 0.063rem) !important;\n clip-path: inset(50%) !important;\n}\n.u-hide {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n .u-hide--mob {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n .u-hide--tablet {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n .u-hide--desk {\n display: none !important;\n }\n}\n.u-dn {\n display: none;\n}\n.u-di {\n display: inline;\n}\n.u-db {\n display: block;\n}\n.u-dib {\n display: inline-block;\n}\n.u-dit {\n display: inline-table;\n}\n.u-dt {\n display: table;\n}\n.u-dtc {\n display: table-cell;\n}\n.u-dt-row {\n display: table-row;\n}\n.u-dt-row-group {\n display: table-row-group;\n}\n.u-dt-column {\n display: table-column;\n}\n.u-dt-column-group {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n .u-dn-t {\n display: none;\n }\n .u-di-t {\n display: inline;\n }\n .u-db-t {\n display: block;\n }\n .u-dib-t {\n display: inline-block;\n }\n .u-dit-t {\n display: inline-table;\n }\n .u-dt-t {\n display: table;\n }\n .u-dtc-t {\n display: table-cell;\n }\n .u-dt-row-t {\n display: table-row;\n }\n .u-dt-row-group-t {\n display: table-row-group;\n }\n .u-dt-column-t {\n display: table-column;\n }\n .u-dt-column-group-t {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n .u-dn-s {\n display: none;\n }\n .u-di-s {\n display: inline;\n }\n .u-db-s {\n display: block;\n }\n .u-dib-s {\n display: inline-block;\n }\n .u-dit-s {\n display: inline-table;\n }\n .u-dt-s {\n display: table;\n }\n .u-dtc-s {\n display: table-cell;\n }\n .u-dt-row-s {\n display: table-row;\n }\n .u-dt-row-group-s {\n display: table-row-group;\n }\n .u-dt-column-s {\n display: table-column;\n }\n .u-dt-column-group-s {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n .u-dn-m {\n display: none;\n }\n .u-di-m {\n display: inline;\n }\n .u-db-m {\n display: block;\n }\n .u-dib-m {\n display: inline-block;\n }\n .u-dit-m {\n display: inline-table;\n }\n .u-dt-m {\n display: table;\n }\n .u-dtc-m {\n display: table-cell;\n }\n .u-dt-row-m {\n display: table-row;\n }\n .u-dt-row-group-m {\n display: table-row-group;\n }\n .u-dt-column-m {\n display: table-column;\n }\n .u-dt-column-group-m {\n display: table-column-group;\n }\n}\n.u-black {\n color: var(--black) !important;\n}\n.u-charcoalGrey {\n color: var(--charcoalGrey) !important;\n}\n.u-coolGrey {\n color: var(--coolGrey) !important;\n}\n.u-silver {\n color: var(--silver) !important;\n}\n.u-slateGrey {\n color: var(--slateGrey) !important;\n}\n.u-lightishPurple {\n color: #b449e7 !important;\n}\n.u-dodgerBlue {\n color: #297ef2 !important;\n}\n.u-overlay {\n color: var(--overlay) !important;\n}\n.u-paleGrey {\n color: var(--paleGrey) !important;\n}\n.u-monza {\n color: #dd0505 !important;\n}\n.u-pomegranate {\n color: #f52d2d !important;\n}\n.u-primaryBackgroundLight {\n color: var(--primaryBackgroundLight) !important;\n}\n.u-primaryColor {\n color: var(--primaryColor) !important;\n}\n.u-primaryColorLight {\n color: var(--primaryColorLight) !important;\n}\n.u-primaryContrastTextColor {\n color: var(--primaryContrastTextColor) !important;\n}\n.u-error {\n color: var(--errorColor) !important;\n}\n.u-errorBackground {\n color: var(--errorBackground) !important;\n}\n.u-success {\n color: var(--successColor) !important;\n}\n.u-warning {\n color: var(--warningColor) !important;\n}\n.u-info {\n color: var(--infoColor) !important;\n}\n.u-weirdGreen {\n color: #40de8e !important;\n}\n.u-white {\n color: var(--white) !important;\n}\n.u-breakword {\n word-break: break-word;\n}\n.u-ellipsis {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.u-spacellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n}\n@media (max-width: 30rem) {\n .u-spacellipsis-t {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 48rem) {\n .u-spacellipsis-s {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 63.938rem) {\n .u-spacellipsis-m {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n.u-midellipsis {\n display: flex;\n flex-wrap: nowrap;\n}\n.u-midellipsis > * {\n display: inline-block;\n max-width: 50%;\n overflow: hidden;\n white-space: pre;\n}\n.u-midellipsis > :first-child {\n text-overflow: ellipsis;\n}\n.u-midellipsis > :last-child {\n text-overflow: clip;\n direction: rtl;\n}\n@supports (text-overflow: '[...]') {\n .u-midellipsis > :first-child {\n text-overflow: '[...]';\n }\n}\n.u-link:link {\n color: var(--linkColor) !important;\n text-decoration: var(--linkTextDecoration) !important;\n}\n.u-link:visited,\n.u-link:active,\n.u-link:hover,\n.u-link:focus {\n color: var(--linkColorActive) !important;\n}\n.u-lh-tiny {\n line-height: 1 !important;\n}\n.u-lh-xsmall {\n line-height: 1.1 !important;\n}\n.u-lh-small {\n line-height: 1.2 !important;\n}\n.u-lh-medium {\n line-height: 1.3 !important;\n}\n.u-lh-large {\n line-height: 1.4 !important;\n}\n.u-lh-xlarge {\n line-height: 1.5 !important;\n}\n.u-fz-tiny {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n}\n.u-fz-xsmall {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n}\n.u-fz-small {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n}\n.u-fz-medium {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n}\n.u-fz-large {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n}\n@media (max-width: 30rem) {\n .u-fz-tiny-t {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-t {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-t {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-t {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-t {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-fz-tiny-s {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-s {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-s {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-s {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-s {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fz-tiny-m {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-m {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-m {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-m {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-m {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n.u-ta-left {\n text-align: left !important;\n}\n.u-ta-right {\n text-align: right !important;\n}\n.u-ta-center {\n text-align: center !important;\n}\n.u-ta-justify {\n text-align: justify !important;\n}\n@media (max-width: 30rem) {\n .u-ta-left-t {\n text-align: left !important;\n }\n .u-ta-right-t {\n text-align: right !important;\n }\n .u-ta-center-t {\n text-align: center !important;\n }\n .u-ta-justify-t {\n text-align: justify !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ta-left-s {\n text-align: left !important;\n }\n .u-ta-right-s {\n text-align: right !important;\n }\n .u-ta-center-s {\n text-align: center !important;\n }\n .u-ta-justify-s {\n text-align: justify !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ta-left-m {\n text-align: left !important;\n }\n .u-ta-right-m {\n text-align: right !important;\n }\n .u-ta-center-m {\n text-align: center !important;\n }\n .u-ta-justify-m {\n text-align: justify !important;\n }\n}\n.u-fs-normal {\n font-style: normal !important;\n}\n.u-fs-italic {\n font-style: italic !important;\n}\n@media (max-width: 30rem) {\n .u-fs-normal-t {\n font-style: normal !important;\n }\n .u-fs-italic-t {\n font-style: italic !important;\n }\n}\n@media (max-width: 48rem) {\n .u-fs-normal-s {\n font-style: normal !important;\n }\n .u-fs-italic-s {\n font-style: italic !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fs-normal-m {\n font-style: normal !important;\n }\n .u-fs-italic-m {\n font-style: italic !important;\n }\n}\n.u-fw-normal {\n font-weight: normal;\n}\n.u-fw-bold {\n font-weight: bold;\n}\n@media (max-width: 30rem) {\n .u-fw-normal-t {\n font-weight: normal;\n }\n .u-fw-bold-t {\n font-weight: bold;\n }\n}\n@media (max-width: 48rem) {\n .u-fw-normal-s {\n font-weight: normal;\n }\n .u-fw-bold-s {\n font-weight: bold;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fw-normal-m {\n font-weight: normal;\n }\n .u-fw-bold-m {\n font-weight: bold;\n }\n}\n@media (pointer: coarse) {\n}\n:root {\n --z-index-bar: 21;\n --z-index-selection: 30;\n --z-index-over-selection: 31;\n}\n", ""]); + + + +/***/ }), + +/***/ "b7lF": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.KonnectorUpdate = exports.KonnectorError = void 0; +var KonnectorError; +exports.KonnectorError = KonnectorError; +(function (KonnectorError) { + KonnectorError["LOGIN_FAILED"] = "LOGIN_FAILED"; + KonnectorError["USER_ACTION_NEEDED"] = "USER_ACTION_NEEDED"; + KonnectorError["TERMS_VERSION_MISMATCH"] = "TERMS_VERSION_MISMATCH"; + KonnectorError["CHALLENGE_ASKED"] = "CHALLENGE_ASKED"; + KonnectorError["UNKNOWN_ERROR"] = "UNKNOWN_ERROR"; + KonnectorError["CRITICAL"] = "exit status 1"; + KonnectorError["MISSING_SECRET"] = "Cannot read property 'secret' of null"; +})(KonnectorError || (exports.KonnectorError = KonnectorError = {})); +var KonnectorUpdate; +exports.KonnectorUpdate = KonnectorUpdate; +(function (KonnectorUpdate) { + KonnectorUpdate["ERROR_UPDATE"] = "error_update"; + KonnectorUpdate["ERROR_UPDATE_OAUTH"] = "error_update_oauth"; + KonnectorUpdate["LOGIN_FAILED"] = "login_failed"; + KonnectorUpdate["ERROR_CONSENT_FORM_GAS"] = "error_consent_form_gas"; +})(KonnectorUpdate || (exports.KonnectorUpdate = KonnectorUpdate = {})); + +/***/ }), + +/***/ "b7tc": +/***/ (function(module, exports, __webpack_require__) { + +var arrayFilter = __webpack_require__("FpGR"), + stubArray = __webpack_require__("lZWV"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; + + +/***/ }), + +/***/ "bAfp": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var $task = __webpack_require__("GuUT"); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + + +/***/ }), + +/***/ "bAmC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "useAppLinkWithStoreFallback", { + enumerable: true, + get: function get() { + return _useAppLinkWithStoreFallback.default; + } +}); +Object.defineProperty(exports, "useCapabilities", { + enumerable: true, + get: function get() { + return _useCapabilities.default; + } +}); +Object.defineProperty(exports, "useFetchShortcut", { + enumerable: true, + get: function get() { + return _useFetchShortcut.default; + } +}); +Object.defineProperty(exports, "useClient", { + enumerable: true, + get: function get() { + return _useClient.default; + } +}); +Object.defineProperty(exports, "useQuery", { + enumerable: true, + get: function get() { + return _useQuery.default; + } +}); +Object.defineProperty(exports, "useAppsInMaintenance", { + enumerable: true, + get: function get() { + return _useAppsInMaintenance.default; + } +}); +Object.defineProperty(exports, "useQueryAll", { + enumerable: true, + get: function get() { + return _useQueryAll.default; + } +}); + +var _useAppLinkWithStoreFallback = _interopRequireDefault(__webpack_require__("UImY")); + +var _useCapabilities = _interopRequireDefault(__webpack_require__("SxtW")); + +var _useFetchShortcut = _interopRequireDefault(__webpack_require__("oucL")); + +var _useClient = _interopRequireDefault(__webpack_require__("CHrb")); + +var _useQuery = _interopRequireDefault(__webpack_require__("Q2MS")); + +var _useAppsInMaintenance = _interopRequireDefault(__webpack_require__("4M1+")); + +var _useQueryAll = _interopRequireDefault(__webpack_require__("Mql4")); + +/***/ }), + +/***/ "bG6h": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _RadioGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1AJk"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _useRadioGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("XUgK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useRadioGroup", function() { return _useRadioGroup__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + + + + +/***/ }), + +/***/ "bH5F": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createChainedFunction; }); +/** + * Safe chained function + * + * Will only create a new function if needed, + * otherwise will pass back existing functions or null. + * + * @param {function} functions to chain + * @returns {function|null} + */ +function createChainedFunction() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + return funcs.reduce(function (acc, func) { + if (func == null) { + return acc; + } + + if (false) {} + + return function chainedFunction() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + acc.apply(this, args); + func.apply(this, args); + }; + }, function () {}); +} + +/***/ }), + +/***/ "bJ2n": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SCHEMAS_DOCTYPE = void 0; +var SCHEMAS_DOCTYPE = 'com.grandlyon.ecolyo.schemas'; +exports.SCHEMAS_DOCTYPE = SCHEMAS_DOCTYPE; + +/***/ }), + +/***/ "bKmd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return requiredArgs; }); +function requiredArgs(required, args) { + if (args.length < required) { + throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present'); + } +} + +/***/ }), + +/***/ "bMjX": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XK5f"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _MenuList__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "bMlu": +/***/ (function(module, exports, __webpack_require__) { + +var startOfDay = __webpack_require__("6VwF") + +var MILLISECONDS_IN_MINUTE = 60000 +var MILLISECONDS_IN_DAY = 86400000 + +/** + * @category Day Helpers + * @summary Get the number of calendar days between the given dates. + * + * @description + * Get the number of calendar days between the given dates. + * + * @param {Date|String|Number} dateLeft - the later date + * @param {Date|String|Number} dateRight - the earlier date + * @returns {Number} the number of calendar days + * + * @example + * // How many calendar days are between + * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? + * var result = differenceInCalendarDays( + * new Date(2012, 6, 2, 0, 0), + * new Date(2011, 6, 2, 23, 0) + * ) + * //=> 366 + */ +function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) { + var startOfDayLeft = startOfDay(dirtyDateLeft) + var startOfDayRight = startOfDay(dirtyDateRight) + + var timestampLeft = startOfDayLeft.getTime() - + startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE + var timestampRight = startOfDayRight.getTime() - + startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE + + // Round the number of days to the nearest integer + // because the number of milliseconds in a day is not constant + // (e.g. it's different in the day of the daylight saving time clock shift) + return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) +} + +module.exports = differenceInCalendarDays + + +/***/ }), + +/***/ "bNb6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _asyncNullishCoalesce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("vtbU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_asyncNullishCoalesce", function() { return _asyncNullishCoalesce_js__WEBPACK_IMPORTED_MODULE_0__["_asyncNullishCoalesce"]; }); + +/* harmony import */ var _asyncOptionalChain_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("+vQC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_asyncOptionalChain", function() { return _asyncOptionalChain_js__WEBPACK_IMPORTED_MODULE_1__["_asyncOptionalChain"]; }); + +/* harmony import */ var _asyncOptionalChainDelete_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("blQu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_asyncOptionalChainDelete", function() { return _asyncOptionalChainDelete_js__WEBPACK_IMPORTED_MODULE_2__["_asyncOptionalChainDelete"]; }); + +/* harmony import */ var _createNamedExportFrom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/bLz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_createNamedExportFrom", function() { return _createNamedExportFrom_js__WEBPACK_IMPORTED_MODULE_3__["_createNamedExportFrom"]; }); + +/* harmony import */ var _createStarExport_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Hnrj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_createStarExport", function() { return _createStarExport_js__WEBPACK_IMPORTED_MODULE_4__["_createStarExport"]; }); + +/* harmony import */ var _interopDefault_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("eaDT"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_interopDefault", function() { return _interopDefault_js__WEBPACK_IMPORTED_MODULE_5__["_interopDefault"]; }); + +/* harmony import */ var _interopNamespace_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("DuFP"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_interopNamespace", function() { return _interopNamespace_js__WEBPACK_IMPORTED_MODULE_6__["_interopNamespace"]; }); + +/* harmony import */ var _interopNamespaceDefaultOnly_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("FFd5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_interopNamespaceDefaultOnly", function() { return _interopNamespaceDefaultOnly_js__WEBPACK_IMPORTED_MODULE_7__["_interopNamespaceDefaultOnly"]; }); + +/* harmony import */ var _interopRequireDefault_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("+hsk"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_interopRequireDefault", function() { return _interopRequireDefault_js__WEBPACK_IMPORTED_MODULE_8__["_interopRequireDefault"]; }); + +/* harmony import */ var _interopRequireWildcard_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("OedU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_interopRequireWildcard", function() { return _interopRequireWildcard_js__WEBPACK_IMPORTED_MODULE_9__["_interopRequireWildcard"]; }); + +/* harmony import */ var _nullishCoalesce_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("LYR+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_nullishCoalesce", function() { return _nullishCoalesce_js__WEBPACK_IMPORTED_MODULE_10__["_nullishCoalesce"]; }); + +/* harmony import */ var _optionalChain_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("48N2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_optionalChain", function() { return _optionalChain_js__WEBPACK_IMPORTED_MODULE_11__["_optionalChain"]; }); + +/* harmony import */ var _optionalChainDelete_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("A3W/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_optionalChainDelete", function() { return _optionalChainDelete_js__WEBPACK_IMPORTED_MODULE_12__["_optionalChainDelete"]; }); + + + + + + + + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "bU5U": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ACCOUNTS_DOCTYPE = void 0; +var ACCOUNTS_DOCTYPE = 'io.cozy.accounts'; +exports.ACCOUNTS_DOCTYPE = ACCOUNTS_DOCTYPE; + +/***/ }), + +/***/ "bWtM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lomp"); +/* harmony import */ var _node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nOWK"); +/* harmony import */ var _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1__); + + +var symbol = new _node_modules_svg_baker_runtime_browser_symbol_js__WEBPACK_IMPORTED_MODULE_0___default.a({ + "id": "CHALLENGE0001-0_32cac73d8033f2f365dd39736a486f89", + "use": "CHALLENGE0001-0_32cac73d8033f2f365dd39736a486f89-usage", + "viewBox": "0 0 180 180", + "content": "<symbol viewBox=\"0 0 180 180\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" id=\"CHALLENGE0001-0_32cac73d8033f2f365dd39736a486f89\">\n<path d=\"M27.104 136.638C27.104 133.582 51.1392 130.781 63.1568 129.762C82.2283 127.47 108.064 130.346 118.096 132.18C130.636 134.472 152.505 136.638 152.505 138.93C152.505 141.222 135.958 144.278 136.742 146.57C137.525 148.862 151.721 148.098 152.505 151.154C153.289 154.21 147.183 151.104 147.183 157.266C147.183 161.086 155.387 157.447 155.387 161.267C155.387 165.087 100.777 168.726 99.9934 164.906C99.2097 161.086 113.317 161.85 113.317 157.266C113.317 152.682 49.833 155.738 49.833 151.154C49.833 146.57 76.4807 148.862 75.6969 144.278C74.9132 139.694 27.104 140.458 27.104 136.638Z\" fill=\"#406591\" />\n<path d=\"M33.8165 126.792L17.4082 90.9922H165.829L147.183 129.776C141.714 132.759 123.317 138.427 93.4832 137.234C63.6499 136.041 41.2749 129.776 33.8165 126.792Z\" fill=\"#ABDDED\" />\n<mask id=\"CHALLENGE0001-0_32cac73d8033f2f365dd39736a486f89_mask0\" mask-type=\"alpha\" maskUnits=\"userSpaceOnUse\" x=\"17\" y=\"90\" width=\"149\" height=\"48\">\n<path d=\"M33.8165 126.792L17.4082 90.9922H165.829L147.183 129.776C141.714 132.759 123.317 138.427 93.4832 137.234C63.6499 136.041 41.2749 129.776 33.8165 126.792Z\" fill=\"#ABDDED\" />\n</mask>\n<g mask=\"url(#CHALLENGE0001-0_32cac73d8033f2f365dd39736a486f89_mask0)\">\n<path d=\"M116.604 122.317L135.25 102.18H124.062L116.604 122.317Z\" fill=\"#89C8DC\" />\n<path d=\"M109.146 123.809C112.875 129.029 120.333 139.62 120.333 140.217H82.2959L95.7209 123.809C98.7042 125.3 104.82 128.433 105.417 129.029C106.013 129.626 108.151 125.797 109.146 123.809Z\" fill=\"#88C8DC\" />\n<path d=\"M35.3082 132.759L25.6124 93.9755L24.1207 90.9922H17.4082L35.3082 132.759Z\" fill=\"#88C8DC\" />\n<path d=\"M142.708 122.317V99.9418L153.15 95.4668L142.708 122.317Z\" fill=\"#5DADC7\" />\n<path d=\"M80.8038 139.472L89.008 110.384L44.258 105.909L42.0205 118.588L44.258 139.472H80.8038Z\" fill=\"#88C8DC\" />\n<path d=\"M42.0205 135.742L32.3247 92.4834L45.7497 96.2126L46.4955 135.742H42.0205Z\" fill=\"#5DADC7\" />\n</g>\n<path d=\"M42.0207 79.8048C33.8165 83.0368 17.1098 89.6498 15.9165 90.2465L27.8498 96.959H33.8165L46.4957 110.384L86.7707 112.621L152.404 99.1965L166.575 90.2465L156.879 79.8048L99.4498 74.584L42.0207 79.8048Z\" fill=\"white\" />\n<path d=\"M121.079 75.3299V74.5841L116.604 71.6008V93.9758H135.995C143.454 93.9758 142.708 90.9924 142.708 88.7549V75.3299C142.708 69.3633 139.724 69.3633 135.995 69.3633C132.266 69.3633 131.52 73.0924 131.52 75.3299C131.52 79.0591 131.52 79.8049 127.791 79.8049C124.062 79.8049 121.079 79.8049 121.079 75.3299Z\" fill=\"#A6BEC1\" />\n<path d=\"M62.1788 75.3299V74.5841L66.6538 71.6008V93.9758H47.2621C39.8038 93.9758 40.5496 90.9924 40.5496 88.7549V75.3299C40.5496 69.3633 43.533 69.3633 47.2621 69.3633C50.9913 69.3633 51.7371 73.0924 51.7371 75.3299C51.7371 79.0591 51.7371 79.8049 55.4663 79.8049C59.1955 79.8049 62.1788 79.8049 62.1788 75.3299Z\" fill=\"#A6BEC1\" />\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M91.2454 51.6182C75.5758 51.6182 62.7175 60.9441 61.4121 73.527V93.9753H121.079V73.527C119.773 60.9441 106.915 51.6182 91.2454 51.6182Z\" fill=\"#A6BEC1\" />\n<path d=\"M118.095 53.7007C116.604 45.4965 65.8869 44.0049 64.3952 53.7007C62.9036 63.3965 67.3786 96.959 67.3786 96.959C67.3786 100.254 70.0499 102.926 73.3452 102.926H79.3357C81.7134 102.926 83.5661 100.864 83.313 98.4998L80.8036 75.0666C80.8036 77.2715 85.4785 79.059 91.2452 79.059C97.012 79.059 101.687 77.2715 101.687 75.0666L99.1775 98.4998C98.9244 100.864 100.777 102.926 103.155 102.926H109.145C112.441 102.926 115.112 100.254 115.112 96.959C115.112 96.959 119.587 61.9049 118.095 53.7007Z\" fill=\"#C8D6D8\" />\n<path d=\"M118.096 54.6425H64.3955C65.5704 44.903 77.1428 37.6846 91.2455 37.6846C105.348 37.6846 116.921 44.903 118.096 54.6425Z\" fill=\"#C8D6D8\" />\n<path d=\"M109.314 32.0318C109.314 35.6158 110.619 40.2013 107.808 43.3371C104.497 47.03 96.6421 48.9897 91.2456 48.9897C85.849 48.9897 77.9937 46.3128 74.6829 42.6198C71.8717 39.4841 73.1773 35.6158 73.1773 32.0318C73.1773 24.2272 81.2667 20.7266 91.2456 20.7266C101.224 20.7266 109.314 24.2272 109.314 32.0318Z\" fill=\"#DDE4E4\" />\n<ellipse cx=\"75.7005\" cy=\"23.553\" rx=\"5.65263\" ry=\"5.65263\" fill=\"#DDE4E4\" />\n<path d=\"M78.5271 23.5529C78.5271 21.9919 77.2618 20.7266 75.7008 20.7266C74.1399 20.7266 72.8745 21.9919 72.8745 23.5529C72.8745 25.1138 74.1399 26.3792 75.7008 26.3792C75.7008 24.8183 76.9662 23.5529 78.5271 23.5529Z\" fill=\"#FFA9E2\" />\n<ellipse cx=\"106.79\" cy=\"23.553\" rx=\"5.65263\" ry=\"5.65263\" fill=\"#DDE4E4\" />\n<path d=\"M81.3535 43.3373C81.3535 38.6546 85.7824 34.8584 91.2456 34.8584C96.7089 34.8584 101.138 38.6546 101.138 43.3373C101.138 51.8163 96.7089 51.8163 91.2456 51.8163C85.7824 51.8163 81.3535 51.8163 81.3535 43.3373Z\" fill=\"white\" />\n<path d=\"M106.79 26.3792C108.351 26.3792 109.616 25.1138 109.616 23.5529C109.616 21.9919 108.351 20.7266 106.79 20.7266C105.229 20.7266 103.964 21.9919 103.964 23.5529C105.525 23.5529 106.79 24.8183 106.79 26.3792Z\" fill=\"#FFA9E2\" />\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M91.2454 41.2178C91.6356 41.2178 91.952 41.5341 91.952 41.9244C91.952 45.0493 89.8668 47.8419 87.0059 47.8419C86.6157 47.8419 86.2993 47.5256 86.2993 47.1354C86.2993 46.7451 86.6157 46.4288 87.0059 46.4288C88.8278 46.4288 90.5388 44.5553 90.5388 41.9244C90.5388 41.5341 90.8551 41.2178 91.2454 41.2178Z\" fill=\"#3C6775\" />\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M91.2459 41.2178C90.8556 41.2178 90.5393 41.5341 90.5393 41.9244C90.5393 45.0493 92.6244 47.8419 95.4853 47.8419C95.8755 47.8419 96.1919 47.5256 96.1919 47.1354C96.1919 46.7451 95.8755 46.4288 95.4853 46.4288C93.6634 46.4288 91.9524 44.5553 91.9524 41.9244C91.9524 41.5341 91.6361 41.2178 91.2459 41.2178Z\" fill=\"#3C6775\" />\n<path d=\"M87.6766 39.4951C87.2709 40.4666 89.4562 42.5864 91.2455 42.5864C93.0348 42.5864 95.3082 40.4225 94.8143 39.4951C94.3204 38.5677 93.4536 37.9053 91.2455 37.9053C89.0374 37.9053 88.0824 38.5236 87.6766 39.4951Z\" fill=\"#040404\" />\n<ellipse cx=\"83.7871\" cy=\"31.3257\" rx=\"1.49167\" ry=\"1.49167\" fill=\"#121212\" />\n<ellipse cx=\"98.7036\" cy=\"31.3257\" rx=\"1.49167\" ry=\"1.49167\" fill=\"#121212\" />\n</symbol>" +}); +var result = _node_modules_svg_sprite_loader_runtime_browser_sprite_build_js__WEBPACK_IMPORTED_MODULE_1___default.a.add(symbol); +/* harmony default export */ __webpack_exports__["default"] = (symbol); + +/***/ }), + +/***/ "bXxj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.8 String.prototype.fontsize(size) +__webpack_require__("A7oe")('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + + +/***/ }), + +/***/ "bY23": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("nlfi"); +__webpack_require__("bAfp"); +__webpack_require__("wIu5"); +module.exports = __webpack_require__("WSXa"); + + +/***/ }), + +/***/ "bYvh": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), + +/***/ "bZiz": +/***/ (function(module, exports, __webpack_require__) { + +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = __webpack_require__("LRPZ"); + +$export($export.P, 'Function', { bind: __webpack_require__("1xNE") }); + + +/***/ }), + +/***/ "bchS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableContainer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oJbo"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableContainer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "bhKv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.getPermissionsFor = void 0; + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _FileCollection = __webpack_require__("H7FL"); + +var _utils = __webpack_require__("YJcZ"); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/permissions/doctype/", "/shared-by-link"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/permissions/", ""]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/permissions/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var normalizePermission = function normalizePermission(perm) { + return (0, _DocumentCollection2.normalizeDoc)(perm, 'io.cozy.permissions'); +}; +/** + * Implements `DocumentCollection` API along with specific methods for `io.cozy.permissions`. + */ + + +var PermissionCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(PermissionCollection, _DocumentCollection); + + var _super = _createSuper(PermissionCollection); + + function PermissionCollection() { + (0, _classCallCheck2.default)(this, PermissionCollection); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(PermissionCollection, [{ + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(id) { + var resp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.stackClient.fetchJSON('GET', (0, _utils.uri)(_templateObject(), id)); + + case 2: + resp = _context.sent; + return _context.abrupt("return", { + data: normalizePermission(resp.data) + }); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * Create a new set of permissions + * It can also associates one or more codes to it, via the codes parameter + * + * @param {object} permission - permission to create + * @param {string} permission.codes A comma separed list of values (defaulted to code) + * @param {string} permission.ttl Make the codes expire after a delay (bigduration format) + * @param {boolean} permission.tiny If set to true then the generated shortcode will be 6 digits + * Cozy-Stack has a few conditions to be able to use this tiny shortcode ATM you have to specifiy + * a ttl < 1h, but it can change. + * see https://docs.cozy.io/en/cozy-stack/permissions/#post-permissions for exact informations + * + * bigduration format: https://github.com/justincampbell/bigduration/blob/master/README.md + * @see https://docs.cozy.io/en/cozy-stack/permissions/#post-permissions + * + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref) { + var _id, _type, _ref$codes, codes, ttl, tiny, attributes, searchParams, resp; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _id = _ref._id, _type = _ref._type, _ref$codes = _ref.codes, codes = _ref$codes === void 0 ? 'code' : _ref$codes, ttl = _ref.ttl, tiny = _ref.tiny, attributes = (0, _objectWithoutProperties2.default)(_ref, ["_id", "_type", "codes", "ttl", "tiny"]); + searchParams = new URLSearchParams(); + searchParams.append('codes', codes); + if (ttl) searchParams.append('ttl', ttl); + if (tiny) searchParams.append('tiny', true); + _context2.next = 7; + return this.stackClient.fetchJSON('POST', "/permissions?".concat(searchParams), { + data: { + type: 'io.cozy.permissions', + attributes: attributes + } + }); + + case 7: + resp = _context2.sent; + return _context2.abrupt("return", { + data: normalizePermission(resp.data) + }); + + case 9: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function create(_x2) { + return _create.apply(this, arguments); + } + + return create; + }() + /** + * Adds a permission to the given document. Document type must be + * `io.cozy.apps`, `io.cozy.konnectors` or `io.cozy.permissions` + * + * @param {object} document - Document which receives the permission + * @param {object} permission - Describes the permission + * @returns {Promise} + * + * @example + * ``` + * const permissions = await client + * .collection('io.cozy.permissions') + * .add(konnector, { + * folder: { + * type: 'io.cozy.files', + * verbs: ['GET', 'PUT'], + * values: [`io.cozy.files.bc57b60eb2954537b0dcdc6ebd8e9d23`] + * } + * }) + * ``` + */ + + }, { + key: "add", + value: function () { + var _add = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(document, permission) { + var endpoint, resp; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.t0 = document._type; + _context3.next = _context3.t0 === 'io.cozy.apps' ? 3 : _context3.t0 === 'io.cozy.konnectors' ? 5 : _context3.t0 === 'io.cozy.permissions' ? 7 : 9; + break; + + case 3: + endpoint = "/permissions/apps/".concat(document.slug); + return _context3.abrupt("break", 10); + + case 5: + endpoint = "/permissions/konnectors/".concat(document.slug); + return _context3.abrupt("break", 10); + + case 7: + endpoint = "/permissions/".concat(document._id); + return _context3.abrupt("break", 10); + + case 9: + throw new Error('Permissions can only be added on existing permissions, apps and konnectors.'); + + case 10: + _context3.next = 12; + return this.stackClient.fetchJSON('PATCH', endpoint, { + data: { + type: 'io.cozy.permissions', + attributes: { + permissions: permission + } + } + }); + + case 12: + resp = _context3.sent; + return _context3.abrupt("return", { + data: normalizePermission(resp.data) + }); + + case 14: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function add(_x3, _x4) { + return _add.apply(this, arguments); + } + + return add; + }() + }, { + key: "destroy", + value: function destroy(permission) { + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject2(), permission.id)); + } + }, { + key: "findLinksByDoctype", + value: function () { + var _findLinksByDoctype = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(doctype) { + var resp; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return this.stackClient.fetchJSON('GET', (0, _utils.uri)(_templateObject3(), doctype)); + + case 2: + resp = _context4.sent; + return _context4.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: resp.data.map(normalizePermission) + })); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function findLinksByDoctype(_x5) { + return _findLinksByDoctype.apply(this, arguments); + } + + return findLinksByDoctype; + }() + /** + * + * @deprecated + */ + + }, { + key: "findApps", + value: function () { + var _findApps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() { + var resp; + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _logger.default.warn("PermissionCollection.findApps will be removed in next version of cozy-client. \n\n You can use AppCollection.all() instead \n\n or even better client.query(Q('io.cozy.apps'), {as: 'io.cozy.apps'})"); + + _context5.next = 3; + return this.stackClient.fetchJSON('GET', '/apps/'); + + case 3: + resp = _context5.sent; + return _context5.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: resp.data.map(function (a) { + return _objectSpread({ + _id: a.id + }, a); + }) + })); + + case 5: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function findApps() { + return _findApps.apply(this, arguments); + } + + return findApps; + }() + /** + * Create a share link + * + * @param {{_id, _type}} document - cozy document + * @param {object} options - options + * @param {string[]} options.verbs - explicit permissions to use + */ + + }, { + key: "createSharingLink", + value: function () { + var _createSharingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(document) { + var options, + verbs, + resp, + _args6 = arguments; + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {}; + verbs = options.verbs; + _context6.next = 4; + return this.stackClient.fetchJSON('POST', "/permissions?codes=email", { + data: { + type: 'io.cozy.permissions', + attributes: { + permissions: getPermissionsFor(document, true, verbs ? { + verbs: verbs + } : {}) + } + } + }); + + case 4: + resp = _context6.sent; + return _context6.abrupt("return", { + data: normalizePermission(resp.data) + }); + + case 6: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function createSharingLink(_x6) { + return _createSharingLink.apply(this, arguments); + } + + return createSharingLink; + }() + /** + * Follow the next link to fetch the next permissions + * + * @param {object} permissions JSON-API based permissions document + */ + + }, { + key: "fetchPermissionsByLink", + value: function () { + var _fetchPermissionsByLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(permissions) { + var resp; + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + if (!(permissions.links && permissions.links.next)) { + _context7.next = 5; + break; + } + + _context7.next = 3; + return this.stackClient.fetchJSON('GET', permissions.links.next); + + case 3: + resp = _context7.sent; + return _context7.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: resp.data.map(normalizePermission) + })); + + case 5: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function fetchPermissionsByLink(_x7) { + return _fetchPermissionsByLink.apply(this, arguments); + } + + return fetchPermissionsByLink; + }() + /** + * + * @param {object} document Cozy doc + * @returns {object} with all the permissions + */ + + }, { + key: "fetchAllLinks", + value: function () { + var _fetchAllLinks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(document) { + var allLinks, resp, _allLinks$data; + + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return this.findLinksByDoctype(document._type); + + case 2: + allLinks = _context8.sent; + resp = allLinks; + + case 4: + if (!(resp.links && resp.links.next)) { + _context8.next = 11; + break; + } + + _context8.next = 7; + return this.fetchPermissionsByLink(resp); + + case 7: + resp = _context8.sent; + + (_allLinks$data = allLinks.data).push.apply(_allLinks$data, (0, _toConsumableArray2.default)(resp.data)); + + _context8.next = 4; + break; + + case 11: + return _context8.abrupt("return", allLinks); + + case 12: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function fetchAllLinks(_x8) { + return _fetchAllLinks.apply(this, arguments); + } + + return fetchAllLinks; + }() + /** + * Destroy a sharing link and the related permissions + * + * @param {object} document - document to revoke sharing link + */ + + }, { + key: "revokeSharingLink", + value: function () { + var _revokeSharingLink = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(document) { + var allLinks, links, _iterator, _step, perm; + + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return this.fetchAllLinks(document); + + case 2: + allLinks = _context9.sent; + links = allLinks.data.filter(function (perm) { + return isPermissionRelatedTo(perm, document); + }); + _iterator = _createForOfIteratorHelper(links); + _context9.prev = 5; + + _iterator.s(); + + case 7: + if ((_step = _iterator.n()).done) { + _context9.next = 13; + break; + } + + perm = _step.value; + _context9.next = 11; + return this.destroy(perm); + + case 11: + _context9.next = 7; + break; + + case 13: + _context9.next = 18; + break; + + case 15: + _context9.prev = 15; + _context9.t0 = _context9["catch"](5); + + _iterator.e(_context9.t0); + + case 18: + _context9.prev = 18; + + _iterator.f(); + + return _context9.finish(18); + + case 21: + case "end": + return _context9.stop(); + } + } + }, _callee9, this, [[5, 15, 18, 21]]); + })); + + function revokeSharingLink(_x9) { + return _revokeSharingLink.apply(this, arguments); + } + + return revokeSharingLink; + }() + /** + * async getOwnPermissions - deprecated: please use fetchOwnPermissions instead + * + * @typedef {object} Permission + * + * @returns {Permission} permission + */ + + }, { + key: "getOwnPermissions", + value: function () { + var _getOwnPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() { + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _logger.default.warn('getOwnPermissions is deprecated, please use fetchOwnPermissions instead'); + + return _context10.abrupt("return", this.fetchOwnPermissions()); + + case 2: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function getOwnPermissions() { + return _getOwnPermissions.apply(this, arguments); + } + + return getOwnPermissions; + }() + /** + * async fetchOwnPermissions - Fetches permissions + * + * @typedef {object} Permission + * + * @returns {Permission} permission + */ + + }, { + key: "fetchOwnPermissions", + value: function () { + var _fetchOwnPermissions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() { + var resp; + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.next = 2; + return this.stackClient.fetchJSON('GET', '/permissions/self'); + + case 2: + resp = _context11.sent; + return _context11.abrupt("return", { + data: normalizePermission(resp.data), + included: resp.included ? resp.included.map(normalizePermission) : [] + }); + + case 4: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function fetchOwnPermissions() { + return _fetchOwnPermissions.apply(this, arguments); + } + + return fetchOwnPermissions; + }() + }]); + return PermissionCollection; +}(_DocumentCollection2.default); +/** + * Build a permission set + * + * @param {{_id, _type}} document - cozy document + * @param {boolean} publicLink - are the permissions for a public link ? + * @param {object} options - options + * @param {string[]} options.verbs - explicit permissions to use + * @returns {object} permissions object that can be sent through /permissions/* + */ + + +var getPermissionsFor = function getPermissionsFor(document) { + var publicLink = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var _id = document._id, + _type = document._type; + var verbs = options.verbs ? options.verbs : publicLink ? ['GET'] : ['ALL']; // TODO: this works for albums, but it needs to be generalized and integrated + // with cozy-client ; some sort of doctype "schema" will be needed here + + return (0, _FileCollection.isFile)(document) ? { + files: { + type: 'io.cozy.files', + verbs: verbs, + values: [_id] + } + } : { + collection: { + type: _type, + verbs: verbs, + values: [_id] + }, + files: { + type: 'io.cozy.files', + verbs: verbs, + values: ["".concat(_type, "/").concat(_id)], + selector: 'referenced_by' + } + }; +}; + +exports.getPermissionsFor = getPermissionsFor; +PermissionCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; + +var isPermissionRelatedTo = function isPermissionRelatedTo(perm, document) { + var _id = document._id; + return (0, _FileCollection.isFile)(document) ? perm.attributes.permissions.files.values.indexOf(_id) !== -1 : perm.attributes.permissions.collection.values.indexOf(_id) !== -1; +}; + +var _default = PermissionCollection; +exports.default = _default; + +/***/ }), + +/***/ "bk6B": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isPlainObject; }); +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; +} + +/***/ }), + +/***/ "bkoc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.computeChildrenArgs = exports.getQueryAttributes = exports.default = exports.fetchQuery = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _react = __webpack_require__("ivGQ"); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); + +var _ObservableQuery = _interopRequireDefault(__webpack_require__("TGEi")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var dummyState = {}; // Need to have this since Query and ObservableQuery might come from +// two different incompatible versions of cozy-client. This is kept +// for backward compatibility + +var fetchQuery = function fetchQuery(client, query) { + if (query.fetch) { + return query.fetch(); + } else { + return client.query(query.definition, { + as: query.queryId + }); + } +}; +/** + * Get attributes that will be assigned to the instance of a Query + */ + + +exports.fetchQuery = fetchQuery; + +var getQueryAttributes = function getQueryAttributes(client, props) { + // Methods bound to the client + var createDocument = client.create.bind(client); + var saveDocument = client.save.bind(client); + var deleteDocument = client.destroy.bind(client); + var getAssociation = client.getAssociation.bind(client); // Methods on ObservableQuery + + var queryDefinition = typeof props.query === 'function' ? props.query(client, props) : props.query; + var observableQuery = client.makeObservableQuery(queryDefinition, props); + var fetchMore = observableQuery.fetchMore.bind(observableQuery); // Mutations + + var propMutations = props.mutations, + rest = (0, _objectWithoutProperties2.default)(props, ["mutations"]); + var mutations = typeof propMutations === 'function' ? propMutations(client, observableQuery, rest) : propMutations; // If the query comes from a CozyClient that it too old, which may happen + // in the bar, we do not have query.fetch + + var fetch = observableQuery.fetch ? observableQuery.fetch.bind(observableQuery) : null; + return { + client: client, + observableQuery: observableQuery, + queryDefinition: queryDefinition, + createDocument: createDocument, + saveDocument: saveDocument, + deleteDocument: deleteDocument, + getAssociation: getAssociation, + fetchMore: fetchMore, + fetch: fetch, + mutations: mutations + }; +}; + +exports.getQueryAttributes = getQueryAttributes; + +var computeChildrenArgs = function computeChildrenArgs(queryAttributes) { + var observableQuery = queryAttributes.observableQuery, + fetchMore = queryAttributes.fetchMore, + fetch = queryAttributes.fetch, + createDocument = queryAttributes.createDocument, + saveDocument = queryAttributes.saveDocument, + deleteDocument = queryAttributes.deleteDocument, + getAssociation = queryAttributes.getAssociation, + mutations = queryAttributes.mutations; + return [_objectSpread({ + fetchMore: fetchMore, + fetch: fetch + }, observableQuery.currentResult()), _objectSpread({ + createDocument: createDocument, + saveDocument: saveDocument, + deleteDocument: deleteDocument, + getAssociation: getAssociation + }, mutations)]; +}; + +exports.computeChildrenArgs = computeChildrenArgs; + +var Query = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(Query, _Component); + + var _super = _createSuper(Query); + + function Query(props, context) { + var _this; + + (0, _classCallCheck2.default)(this, Query); + _this = _super.call(this, props, context); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onQueryChange", function () { + _this.recomputeChildrenArgs(); + + _this.setState(dummyState); + }); + var client = context.client; + + if (!context.client) { + throw new Error('Query should be used with client in context (use CozyProvider to set context)'); + } + /** + * Current client + * + * @type {CozyClient} + */ + + + _this.client = client; + /** + * Observable query to connect store to query + * + * @type {ObservableQuery} + */ + + _this.observableQuery = null; + /** + * Callback to unsubscribe from observable query + * + * @type {Function} + */ + + _this.queryUnsubscribe = null; + Object.assign((0, _assertThisInitialized2.default)(_this), getQueryAttributes(client, props)); + + _this.recomputeChildrenArgs(); + + return _this; + } + + (0, _createClass2.default)(Query, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.queryUnsubscribe = this.observableQuery.subscribe(this.onQueryChange); + + if (this.props.enabled !== false) { + this.executeQueryRespectingFetchPolicy(); + } + } + }, { + key: "executeQueryRespectingFetchPolicy", + value: function executeQueryRespectingFetchPolicy() { + if (this.props.fetchPolicy) { + var queryState = this.client.getQueryFromState(this.props.as); + + if (this.props.fetchPolicy && typeof this.props.fetchPolicy === 'function' && this.props.fetchPolicy(queryState)) { + fetchQuery(this.client, this.observableQuery); + } + } else { + fetchQuery(this.client, this.observableQuery); + } + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (prevProps.enabled === false && this.props.enabled !== false) { + this.executeQueryRespectingFetchPolicy(); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + if (this.queryUnsubscribe) { + this.queryUnsubscribe(); + } + } + }, { + key: "recomputeChildrenArgs", + value: function recomputeChildrenArgs() { + this.childrenArgs = computeChildrenArgs(this); + } + }, { + key: "render", + value: function render() { + var children = this.props.children; // @ts-ignore + + return children(this.childrenArgs[0], this.childrenArgs[1]); + } + }]); + return Query; +}(_react.Component); + +exports.default = Query; +Query.contextTypes = { + client: _propTypes.default.object, + store: _propTypes.default.object +}; +var queryPropType = _propTypes.default.object; +Query.propTypes = { + /** Query definition that will be executed and observed */ + query: _propTypes.default.oneOfType([_propTypes.default.func, queryPropType]).isRequired, + + /** If set to false, query won't be executed */ + enabled: _propTypes.default.bool, + + /** Name of the query */ + as: _propTypes.default.string, + + /** Function called with the data from the query */ + children: _propTypes.default.func.isRequired, + + /** + * Decides if the query is fetched at mount time. If not present + * the query is always fetched at mount time. Receives the current + * state of the query from the store as 1st argument. + * + * @example + * If you want to only fetch queries that are older than 30 seconds: + + * ```js + * const cache30s = ({ lastUpdate }) => { + * return !lastUpdate || (Date.now() - 30 * 1000 > lastUpdate) + * } + * <Query fetchPolicy={cache30s} ... /> + * ``` + */ + fetchPolicy: _propTypes.default.func +}; +Query.defaultProps = { + enabled: true +}; + +/***/ }), + +/***/ "blQu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_asyncOptionalChainDelete", function() { return _asyncOptionalChainDelete; }); +/* harmony import */ var _asyncOptionalChain_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+vQC"); + + +/** + * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, + * descriptors, and functions, in cases where the value of the expression is to be deleted. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See + * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 + * + * @param ops Array result of expression conversion + * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable + * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which + * case `false`. + */ +// eslint-disable-next-line @sentry-internal/sdk/no-async-await +async function _asyncOptionalChainDelete(ops) { + const result = (await Object(_asyncOptionalChain_js__WEBPACK_IMPORTED_MODULE_0__["_asyncOptionalChain"])(ops)) ; + // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case, + // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in + // which case we return whatever the `delete` returned, which will be a boolean. + return result == null ? true : (result ); +} + +// Sucrase version: +// async function asyncOptionalChainDelete(ops) { +// const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops); +// return result == null ? true : result; +// } + + +//# sourceMappingURL=_asyncOptionalChainDelete.js.map + + +/***/ }), + +/***/ "blYM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("csMb"); +/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6Wbw"); + + + + +var styled = function styled(Component) { + var componentCreator = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__["styled"])(Component); + return function (style, options) { + return componentCreator(style, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__["default"] + }, options)); + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (styled); + +/***/ }), + +/***/ "bm8m": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), + +/***/ "boOw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isMatchingIndex = exports.getIndexFields = exports.transformSort = exports.getIndexNameFromFields = exports.normalizeDesignDoc = void 0; + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _head = _interopRequireDefault(__webpack_require__("2WYM")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _isEqual = _interopRequireDefault(__webpack_require__("+KM7")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef {Object} MangoPartialFilter + */ + +/** + * @typedef {object} MangoSelector + */ + +/** + * @typedef {Array<object>} MangoSort + */ + +/** + * @typedef {object} MangoQueryOptions + * @property {MangoSelector} [selector] Selector + * @property {MangoSort} [sort] The sorting parameters + * @property {Array<string>} [fields] The fields to return + * @property {Array<string>} [partialFilterFields] The partial filter fields + * @property {number|null} [limit] For pagination, the number of results to return + * @property {number|null} [skip] For skip-based pagination, the number of referenced files to skip + * @property {string|null} [indexId] The _id of the CouchDB index to use for this request + * @property {string|null} [bookmark] For bookmark-based pagination, the document _id to start from + * @property {Array<string>} [indexedFields] + * @property {string} [use_index] Name of the index to use + * @property {boolean} [execution_stats] If true, we request the stats from Couch + * @property {MangoPartialFilter|null} [partialFilter] An optional partial filter + */ + +/** + * Attributes representing a design doc + * + * @typedef {object} DesignDoc + * + * @property {string} _id - Id of the design doc. Can be named, e.g. '_design/by_indexed_attribute' or not, e.g. '_design/12345' + * @property {string} language - The index language. Can be 'query' for mango index or 'javascript' for views. + * @property {object} views - Views definition, i.e. the index. + * @property {string} _rev - Rev version + */ +var normalizeDesignDoc = function normalizeDesignDoc(designDoc) { + var id = designDoc._id || designDoc.id; + return _objectSpread({ + id: id, + _id: id + }, designDoc.doc); +}; +/** + * Name an index, based on its indexed fields and partial filter. + * + * It follows this naming convention: + * `by_{indexed_field1}_and_{indexed_field2}_filter_{partial_filter_field1}_and_{partial_filter_field2} + * + * @param {Array<string>} fields - The indexed fields + * @param {object} params - The additional params + * @param {Array<string>=} params.partialFilterFields - The partial filter fields + * @returns {string} The index name, built from the fields + */ + + +exports.normalizeDesignDoc = normalizeDesignDoc; + +var getIndexNameFromFields = function getIndexNameFromFields(fields) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + partialFilterFields = _ref.partialFilterFields; + + var indexName = "by_".concat(fields.join('_and_')); + return partialFilterFields ? "".concat(indexName, "_filter_").concat(partialFilterFields.join('_and_')) : indexName; +}; +/** + * Transform sort into Array + * + * @param {MangoSort} sort - The sorting parameters + * @returns {MangoSort} + */ + + +exports.getIndexNameFromFields = getIndexNameFromFields; + +var transformSort = function transformSort(sort) { + if (!sort || Array.isArray(sort)) { + return sort; + } + + throw Error('Passing an object to the "sort" is not supported'); +}; +/** + * Compute fields that should be indexed for a mango + * query to work + * + * + * @returns {Array} - Fields to index + */ + + +exports.transformSort = transformSort; + +var getIndexFields = function getIndexFields( +/** @type {MangoQueryOptions} */ +_ref2) { + var selector = _ref2.selector, + partialFilter = _ref2.partialFilter, + _ref2$sort = _ref2.sort, + sort = _ref2$sort === void 0 ? [] : _ref2$sort; + return Array.from(new Set([].concat((0, _toConsumableArray2.default)(sort.map(function (sortOption) { + return (0, _head.default)(Object.keys(sortOption)); + })), (0, _toConsumableArray2.default)(selector ? Object.keys(selector) : []), (0, _toConsumableArray2.default)(partialFilter ? Object.keys(partialFilter) : [])))); +}; +/** + * Check if an index is matching the given fields + * + * @param {DesignDoc} index - The index to check + * @param {Array} fields - The fields that the index must have + * @param {object} partialFilter - An optional partial filter + * @returns {boolean} True if the index is matches the given fields + */ + + +exports.getIndexFields = getIndexFields; + +var isMatchingIndex = function isMatchingIndex(index, fields, partialFilter) { + var viewId = Object.keys((0, _get.default)(index, "views"))[0]; + var fieldsInIndex = Object.keys((0, _get.default)(index, "views.".concat(viewId, ".map.fields"))); + + if ((0, _isEqual.default)(fieldsInIndex, fields)) { + var partialFilterInIndex = (0, _get.default)(index, "views.".concat(viewId, ".map.partial_filter_selector")); + + if (!partialFilter && !partialFilterInIndex) { + return true; + } + + if ((0, _isEqual.default)(partialFilter, partialFilterInIndex)) { + return true; + } + } + + return false; +}; + +exports.isMatchingIndex = isMatchingIndex; + +/***/ }), + +/***/ "boZ1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + flex: '1 1 auto', + WebkitOverflowScrolling: 'touch', + // Add iOS momentum scrolling. + overflowY: 'auto', + padding: '8px 24px', + '&:first-child': { + // dialog without title + paddingTop: 20 + } + }, + + /* Styles applied to the root element if `dividers={true}`. */ + dividers: { + padding: '16px 24px', + borderTop: "1px solid ".concat(theme.palette.divider), + borderBottom: "1px solid ".concat(theme.palette.divider) + } + }; +}; +var DialogContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function DialogContent(props, ref) { + var classes = props.classes, + className = props.className, + _props$dividers = props.dividers, + dividers = _props$dividers === void 0 ? false : _props$dividers, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "dividers"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, dividers && classes.dividers), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiDialogContent' +})(DialogContent)); + +/***/ }), + +/***/ "brbn": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; + + +/***/ }), + +/***/ "bvMo": +/***/ (function(module, exports) { + +module.exports = function cmp (a, b) { + var pa = a.split('.'); + var pb = b.split('.'); + for (var i = 0; i < 3; i++) { + var na = Number(pa[i]); + var nb = Number(pb[i]); + if (na > nb) return 1; + if (nb > na) return -1; + if (!isNaN(na) && isNaN(nb)) return 1; + if (isNaN(na) && !isNaN(nb)) return -1; + } + return 0; +}; + + +/***/ }), + +/***/ "bwib": +/***/ (function(module, exports, __webpack_require__) { + +var copyObject = __webpack_require__("kTya"), + getSymbols = __webpack_require__("b7tc"); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; + + +/***/ }), + +/***/ "bwm2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Nm31"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + minWidth: 56, + flexShrink: 0 + }, + + /* Styles applied to the root element when the parent `ListItem` uses `alignItems="flex-start"`. */ + alignItemsFlexStart: { + marginTop: 8 + } +}; +/** + * A simple wrapper to apply `List` styles to an `Avatar`. + */ + +var ListItemAvatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListItemAvatar(props, ref) { + var classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className"]); + + var context = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_List_ListContext__WEBPACK_IMPORTED_MODULE_6__["default"]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiListItemAvatar' +})(ListItemAvatar)); + +/***/ }), + +/***/ "c/eY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.initTranslation = exports.extend = exports._polyglot = void 0; +var _nodePolyglot = _interopRequireDefault(__webpack_require__("pFjr")); +var _I18n = __webpack_require__("nUfk"); +var _polyglot; +exports._polyglot = _polyglot; +var initTranslation = function initTranslation(lang, dictRequire, context) { + var defaultLang = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _I18n.DEFAULT_LANG; + exports._polyglot = _polyglot = new _nodePolyglot.default({ + phrases: dictRequire(defaultLang), + locale: defaultLang + }); // Load global locales + + if (lang && lang !== defaultLang) { + try { + var dict = dictRequire(lang); + _polyglot.extend(dict); + _polyglot.locale(lang); + } catch (e) { + console.warn("The dict phrases for \"".concat(lang, "\" can't be loaded")); + } + } // Load context locales + + if (context) { + try { + var _dict = dictRequire(lang, context); + _polyglot.extend(_dict); + } catch (e) { + console.warn("The context ".concat(context, " cannot be loaded for lang ").concat(lang)); + } + } + return _polyglot; +}; +exports.initTranslation = initTranslation; +var extend = function extend(dict) { + return _polyglot && _polyglot.extend(dict); +}; +exports.extend = extend; + +/***/ }), + +/***/ "c20g": +/***/ (function(module, exports, __webpack_require__) { + +var baseUniq = __webpack_require__("VHLe"); + +/** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ +function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; +} + +module.exports = uniqWith; + + +/***/ }), + +/***/ "c4+P": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'block', + backgroundSize: 'cover', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center' + }, + + /* Styles applied to the root element if `component="video, audio, picture, iframe, or img"`. */ + media: { + width: '100%' + }, + + /* Styles applied to the root element if `component="picture or img"`. */ + img: { + // ⚠️ object-fit is not supported by IE 11. + objectFit: 'cover' + } +}; +var MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img']; +var CardMedia = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CardMedia(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + image = props.image, + src = props.src, + style = props.style, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "component", "image", "src", "style"]); + + var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1; + var composedStyle = !isMediaComponent && image ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + backgroundImage: "url(\"".concat(image, "\")") + }, style) : style; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, isMediaComponent && classes.media, "picture img".indexOf(Component) !== -1 && classes.img), + ref: ref, + style: composedStyle, + src: isMediaComponent ? image || src : undefined + }, other), children); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiCardMedia' +})(CardMedia)); + +/***/ }), + +/***/ "c8SR": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("fWYq"); + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + textAlign: 'center', + flex: '0 0 auto', + fontSize: theme.typography.pxToRem(24), + padding: 12, + borderRadius: '50%', + overflow: 'visible', + // Explicitly set the default value to solve a bug on IE 11. + color: theme.palette.action.active, + transition: theme.transitions.create('background-color', { + duration: theme.transitions.duration.shortest + }), + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.action.active, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + }, + '&$disabled': { + backgroundColor: 'transparent', + color: theme.palette.action.disabled + } + }, + + /* Styles applied to the root element if `edge="start"`. */ + edgeStart: { + marginLeft: -12, + '$sizeSmall&': { + marginLeft: -3 + } + }, + + /* Styles applied to the root element if `edge="end"`. */ + edgeEnd: { + marginRight: -12, + '$sizeSmall&': { + marginRight: -3 + } + }, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit' + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: { + padding: 3, + fontSize: theme.typography.pxToRem(18) + }, + + /* Styles applied to the children container element. */ + label: { + width: '100%', + display: 'flex', + alignItems: 'inherit', + justifyContent: 'inherit' + } + }; +}; +/** + * Refer to the [Icons](/components/icons/) section of the documentation + * regarding the available icon options. + */ + +var IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function IconButton(props, ref) { + var _props$edge = props.edge, + edge = _props$edge === void 0 ? false : _props$edge, + children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableFocusRi = props.disableFocusRipple, + disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, color !== 'default' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__["default"])(color))], disabled && classes.disabled, size === "small" && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__["default"])(size))], { + 'start': classes.edgeStart, + 'end': classes.edgeEnd + }[edge]), + centerRipple: true, + focusRipple: !disableFocusRipple, + disabled: disabled, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.label + }, children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiIconButton' +})(IconButton)); + +/***/ }), + +/***/ "cA5E": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var amber = { + 50: '#fff8e1', + 100: '#ffecb3', + 200: '#ffe082', + 300: '#ffd54f', + 400: '#ffca28', + 500: '#ffc107', + 600: '#ffb300', + 700: '#ffa000', + 800: '#ff8f00', + 900: '#ff6f00', + A100: '#ffe57f', + A200: '#ffd740', + A400: '#ffc400', + A700: '#ffab00' +}; +/* harmony default export */ __webpack_exports__["default"] = (amber); + +/***/ }), + +/***/ "cEgd": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'] + var monthsFull = ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'] + var weekdays2char = ['일', '월', '화', '수', '목', '금', '토'] + var weekdays3char = ['일', '월', '화', '수', '목', '금', '토'] + var weekdaysFull = ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'] + var meridiemUppercase = ['오전', '오후'] + var meridiemLowercase = ['오전', '오후'] + var meridiemFull = ['오전', '오후'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '일' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "cIqN": +/***/ (function(module, exports, __webpack_require__) { + +var createFlow = __webpack_require__("RF/d"); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; + + +/***/ }), + +/***/ "cPxT": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var AccessToken = /*#__PURE__*/function () { + function AccessToken(dataArg) { + (0, _classCallCheck2.default)(this, AccessToken); + var data = dataArg; + if (typeof data === 'string') data = JSON.parse(data); + this.tokenType = data.token_type || data.tokenType; + this.accessToken = data.access_token || data.accessToken; + this.refreshToken = data.refresh_token || data.refreshToken; + this.scope = data.scope; + } + + (0, _createClass2.default)(AccessToken, [{ + key: "toAuthHeader", + value: function toAuthHeader() { + return 'Bearer ' + this.accessToken; + } + }, { + key: "toBasicAuth", + value: function toBasicAuth() { + return "user:".concat(this.accessToken, "@"); + } + }, { + key: "toJSON", + value: function toJSON() { + return { + tokenType: this.tokenType, + accessToken: this.accessToken, + refreshToken: this.refreshToken, + scope: this.scope + }; + } + }, { + key: "toString", + value: function toString() { + return JSON.stringify(this.toJSON()); + } + /** + * Get the access token string + * + * @see CozyStackClient.getAccessToken + * @returns {string} token + */ + + }, { + key: "getAccessToken", + value: function getAccessToken() { + return this.accessToken; + } + }]); + return AccessToken; +}(); + +exports.default = AccessToken; + +/***/ }), + +/***/ "cSIU": +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__("Tusy"); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; + + +/***/ }), + +/***/ "cTIL": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // http://new.gramota.ru/spravka/buro/search-answer?s=242637 + var monthsShort = ['янв.', 'фев.', 'март', 'апр.', 'май', 'июнь', 'июль', 'авг.', 'сент.', 'окт.', 'нояб.', 'дек.'] + var monthsFull = ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'] + var monthsGenitive = ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'] + var weekdays2char = ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'] + var weekdays3char = ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'суб'] + var weekdaysFull = ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'] + var meridiem = ['ночи', 'утра', 'дня', 'вечера'] + + var formatters = { + // Month: янв., фев., ..., дек. + 'MMM': function (date) { + return monthsShort[date.getMonth()] + }, + + // Month: январь, февраль, ..., декабрь + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: вс, пн, ..., сб + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: вск, пнд, ..., суб + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: воскресенье, понедельник, ..., суббота + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // Time of day: ночи, утра, дня, вечера + 'A': function (date) { + var hours = date.getHours() + if (hours >= 17) { + return meridiem[3] + } else if (hours >= 12) { + return meridiem[2] + } else if (hours >= 4) { + return meridiem[1] + } else { + return meridiem[0] + } + }, + + 'Do': function (date, formatters) { + return formatters.D(date) + '-е' + }, + + 'Wo': function (date, formatters) { + return formatters.W(date) + '-я' + } + } + + formatters.a = formatters.A + formatters.aa = formatters.A + + // Generate ordinal version of formatters: M -> Mo, DDD -> DDDo, etc. + var ordinalFormatters = ['M', 'DDD', 'd', 'Q'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return formatters[formatterToken](date) + '-й' + } + }) + + // Generate formatters like 'D MMMM', + // where month is in the genitive case: января, февраля, ..., декабря + var monthsGenitiveFormatters = ['D', 'Do', 'DD'] + monthsGenitiveFormatters.forEach(function (formatterToken) { + formatters[formatterToken + ' MMMM'] = function (date, commonFormatters) { + var formatter = formatters[formatterToken] || commonFormatters[formatterToken] + return formatter(date, commonFormatters) + ' ' + monthsGenitive[date.getMonth()] + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "cY9H": +/***/ (function(module, exports) { + +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; + + +/***/ }), + +/***/ "cdL5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("PKog"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + height: 1, + margin: 0, + // Reset browser default style. + border: 'none', + flexShrink: 0, + backgroundColor: theme.palette.divider + }, + + /* Styles applied to the root element if `absolute={true}`. */ + absolute: { + position: 'absolute', + bottom: 0, + left: 0, + width: '100%' + }, + + /* Styles applied to the root element if `variant="inset"`. */ + inset: { + marginLeft: 72 + }, + + /* Styles applied to the root element if `light={true}`. */ + light: { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.divider, 0.08) + }, + + /* Styles applied to the root element if `variant="middle"`. */ + middle: { + marginLeft: theme.spacing(2), + marginRight: theme.spacing(2) + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + height: '100%', + width: 1 + }, + + /* Styles applied to the root element if `flexItem={true}`. */ + flexItem: { + alignSelf: 'stretch', + height: 'auto' + } + }; +}; +var Divider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Divider(props, ref) { + var _props$absolute = props.absolute, + absolute = _props$absolute === void 0 ? false : _props$absolute, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'hr' : _props$component, + _props$flexItem = props.flexItem, + flexItem = _props$flexItem === void 0 ? false : _props$flexItem, + _props$light = props.light, + light = _props$light === void 0 ? false : _props$light, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + _props$role = props.role, + role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'fullWidth' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["absolute", "classes", "className", "component", "flexItem", "light", "orientation", "role", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical), + role: role, + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiDivider' +})(Divider)); + +/***/ }), + +/***/ "cdPs": +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__("Ikrg"); +var ITERATOR = __webpack_require__("Yhpl")('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), + +/***/ "chDU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/***/ }), + +/***/ "cjAe": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("GMq6"), + stubFalse = __webpack_require__("vCDb"); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("9YbP")(module))) + +/***/ }), + +/***/ "cozM": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Common Helpers + * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. + * + * @description + * Compare the two dates and return -1 if the first date is after the second, + * 1 if the first date is before the second or 0 if dates are equal. + * + * @param {Date|String|Number} dateLeft - the first date to compare + * @param {Date|String|Number} dateRight - the second date to compare + * @returns {Number} the result of the comparison + * + * @example + * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: + * var result = compareDesc( + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ) + * //=> 1 + * + * @example + * // Sort the array of dates in reverse chronological order: + * var result = [ + * new Date(1995, 6, 2), + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ].sort(compareDesc) + * //=> [ + * // Sun Jul 02 1995 00:00:00, + * // Mon Jul 10 1989 00:00:00, + * // Wed Feb 11 1987 00:00:00 + * // ] + */ +function compareDesc (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var timeLeft = dateLeft.getTime() + var dateRight = parse(dirtyDateRight) + var timeRight = dateRight.getTime() + + if (timeLeft > timeRight) { + return -1 + } else if (timeLeft < timeRight) { + return 1 + } else { + return 0 + } +} + +module.exports = compareDesc + + +/***/ }), + +/***/ "cqny": +/***/ (function(module, exports, __webpack_require__) { + +var basePickBy = __webpack_require__("d7eO"), + hasIn = __webpack_require__("QlLD"); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; + + +/***/ }), + +/***/ "cqxY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + +var $export = __webpack_require__("LRPZ"); +var toLength = __webpack_require__("yhnj"); +var context = __webpack_require__("OdrC"); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * __webpack_require__("5cT/")(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + + +/***/ }), + +/***/ "csMb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rDuK"); +/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pqMe"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createGenerateClassName", function() { return _createGenerateClassName__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("/Mg5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStyles", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("SRIV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getThemeProps", function() { return _getThemeProps__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("q4sm"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "jssPreset", function() { return _jssPreset__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("b+/j"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeStyles", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("SoMK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeClasses", function() { return _mergeClasses__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("H34K"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheets", function() { return _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("hY2D"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styled", function() { return _styled__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("6P1f"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesProvider", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sheetsManager", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__["sheetsManager"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesContext", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__["StylesContext"]; }); + +/* harmony import */ var _ThemeProvider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("SV6h"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThemeProvider", function() { return _ThemeProvider__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("NFku"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useTheme", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("0L9m"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withStyles", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("MCx/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withThemeCreator", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_13__["withThemeCreator"]; }); + +/** @license Material-UI v4.11.5 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/* eslint-disable import/export */ + +/* Warning if there are several instances of @material-ui/styles */ + +if (false) {} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "cszB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2Ggn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListItemText__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "cuZE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REMOTE_ORG_ECOLYO_AGENT_REC = exports.REMOTE_ORG_ECOLYO_AGENT = void 0; +var REMOTE_ORG_ECOLYO_AGENT = '/remote/org.ecolyo.agent'; +exports.REMOTE_ORG_ECOLYO_AGENT = REMOTE_ORG_ECOLYO_AGENT; +var REMOTE_ORG_ECOLYO_AGENT_REC = '/remote/org.ecolyo.agent.rec'; +exports.REMOTE_ORG_ECOLYO_AGENT_REC = REMOTE_ORG_ECOLYO_AGENT_REC; + +/***/ }), + +/***/ "cwpO": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? +Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; +function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; +exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; +exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; +exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; + + +/***/ }), + +/***/ "czPI": +/***/ (function(module, exports, __webpack_require__) { + +var baseCreate = __webpack_require__("wfDR"), + baseLodash = __webpack_require__("ajN4"); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; + + +/***/ }), + +/***/ "d7eO": +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__("+Bmy"), + baseSet = __webpack_require__("x0rR"), + castPath = __webpack_require__("+ERu"); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; + + +/***/ }), + +/***/ "d9PM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var teal = { + 50: '#e0f2f1', + 100: '#b2dfdb', + 200: '#80cbc4', + 300: '#4db6ac', + 400: '#26a69a', + 500: '#009688', + 600: '#00897b', + 700: '#00796b', + 800: '#00695c', + 900: '#004d40', + A100: '#a7ffeb', + A200: '#64ffda', + A400: '#1de9b6', + A700: '#00bfa5' +}; +/* harmony default export */ __webpack_exports__["default"] = (teal); + +/***/ }), + +/***/ "dAcl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + userSelect: 'none', + fontSize: theme.typography.pxToRem(24), + width: '1em', + height: '1em', + // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541 + // To remove at some point. + overflow: 'hidden', + flexShrink: 0 + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main + }, + + /* Styles applied to the root element if `color="action"`. */ + colorAction: { + color: theme.palette.action.active + }, + + /* Styles applied to the root element if `color="error"`. */ + colorError: { + color: theme.palette.error.main + }, + + /* Styles applied to the root element if `color="disabled"`. */ + colorDisabled: { + color: theme.palette.action.disabled + }, + + /* Styles applied to the root element if `fontSize="inherit"`. */ + fontSizeInherit: { + fontSize: 'inherit' + }, + + /* Styles applied to the root element if `fontSize="small"`. */ + fontSizeSmall: { + fontSize: theme.typography.pxToRem(20) + }, + + /* Styles applied to the root element if `fontSize="large"`. */ + fontSizeLarge: { + fontSize: theme.typography.pxToRem(36) + } + }; +}; +var Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Icon(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'inherit' : _props$color, + _props$component = props.component, + Component = _props$component === void 0 ? 'span' : _props$component, + _props$fontSize = props.fontSize, + fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "component", "fontSize"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])('material-icons', classes.root, className, color !== 'inherit' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(color))], fontSize !== 'default' && fontSize !== 'medium' && classes["fontSize".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(fontSize))]), + "aria-hidden": true, + ref: ref + }, other)); +}); + false ? undefined : void 0; +Icon.muiName = 'Icon'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiIcon' +})(Icon)); + +/***/ }), + +/***/ "dCuL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return connectAdvanced; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6vz+"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ZhqA"); +/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("L/yQ"); +/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("umgW"); + + +var _excluded = ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"], + _excluded2 = ["reactReduxForwardedRef"]; + + + + + + // Define some constant arrays just to avoid re-creating these + +var EMPTY_ARRAY = []; +var NO_SUBSCRIPTION_ARRAY = [null, null]; + +var stringifyComponent = function stringifyComponent(Comp) { + try { + return JSON.stringify(Comp); + } catch (err) { + return String(Comp); + } +}; + +function storeStateUpdatesReducer(state, action) { + var updateCount = state[1]; + return [action.payload, updateCount + 1]; +} + +function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { + Object(_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_6__["useIsomorphicLayoutEffect"])(function () { + return effectFunc.apply(void 0, effectArgs); + }, dependencies); +} + +function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) { + // We want to capture the wrapper props and child props we used for later comparisons + lastWrapperProps.current = wrapperProps; + lastChildProps.current = actualChildProps; + renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update + + if (childPropsFromStoreUpdate.current) { + childPropsFromStoreUpdate.current = null; + notifyNestedSubs(); + } +} + +function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) { + // If we're not subscribed to the store, nothing to do here + if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts + + var didUnsubscribe = false; + var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component + + var checkForUpdates = function checkForUpdates() { + if (didUnsubscribe) { + // Don't run stale listeners. + // Redux doesn't guarantee unsubscriptions happen until next dispatch. + return; + } + + var latestStoreState = store.getState(); + var newChildProps, error; + + try { + // Actually run the selector with the most recent store state and wrapper props + // to determine what the child props should be + newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); + } catch (e) { + error = e; + lastThrownError = e; + } + + if (!error) { + lastThrownError = null; + } // If the child props haven't changed, nothing to do here - cascade the subscription update + + + if (newChildProps === lastChildProps.current) { + if (!renderIsScheduled.current) { + notifyNestedSubs(); + } + } else { + // Save references to the new child props. Note that we track the "child props from store update" + // as a ref instead of a useState/useReducer because we need a way to determine if that value has + // been processed. If this went into useState/useReducer, we couldn't clear out the value without + // forcing another re-render, which we don't want. + lastChildProps.current = newChildProps; + childPropsFromStoreUpdate.current = newChildProps; + renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render + + forceComponentUpdateDispatch({ + type: 'STORE_UPDATED', + payload: { + error: error + } + }); + } + }; // Actually subscribe to the nearest connected ancestor (or store) + + + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); // Pull data from the store after first render in case the store has + // changed since we began. + + checkForUpdates(); + + var unsubscribeWrapper = function unsubscribeWrapper() { + didUnsubscribe = true; + subscription.tryUnsubscribe(); + subscription.onStateChange = null; + + if (lastThrownError) { + // It's possible that we caught an error due to a bad mapState function, but the + // parent re-rendered without this component and we're about to unmount. + // This shouldn't happen as long as we do top-down subscriptions correctly, but + // if we ever do those wrong, this throw will surface the error in our tests. + // In that case, throw the error from here so it doesn't get lost. + throw lastThrownError; + } + }; + + return unsubscribeWrapper; +} + +var initStateUpdates = function initStateUpdates() { + return [null, 0]; +}; + +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + _ref2$forwardRef = _ref2.forwardRef, + forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, + _ref2$context = _ref2.context, + context = _ref2$context === void 0 ? _Context__WEBPACK_IMPORTED_MODULE_7__["ReactReduxContext"] : _ref2$context, + connectOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref2, _excluded); + + if (false) { var customStoreWarningMessage; } + + var Context = context; + return function wrapWithConnect(WrappedComponent) { + if (false) {} + + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent + }); + + var pure = connectOptions.pure; + + function createChildSelector(store) { + return selectorFactory(store.dispatch, selectorFactoryOptions); + } // If we aren't running in "pure" mode, we don't want to memoize values. + // To avoid conditionally calling hooks, we fall back to a tiny wrapper + // that just executes the given callback immediately. + + + var usePureOnlyMemo = pure ? react__WEBPACK_IMPORTED_MODULE_3__["useMemo"] : function (callback) { + return callback(); + }; + + function ConnectFunction(props) { + var _useMemo = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + // Distinguish between actual "data" props that were passed to the wrapper component, + // and values needed to control behavior (forwarded refs, alternate context instances). + // To maintain the wrapperProps object reference, memoize this destructuring. + var reactReduxForwardedRef = props.reactReduxForwardedRef, + wrapperProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(props, _excluded2); + + return [props.context, reactReduxForwardedRef, wrapperProps]; + }, [props]), + propsContext = _useMemo[0], + reactReduxForwardedRef = _useMemo[1], + wrapperProps = _useMemo[2]; + + var ContextToUse = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. + // Memoize the check that determines which context instance we should use. + return propsContext && propsContext.Consumer && Object(react_is__WEBPACK_IMPORTED_MODULE_4__["isContextConsumer"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(propsContext.Consumer, null)) ? propsContext : Context; + }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available + + var contextValue = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(ContextToUse); // The store _must_ exist as either a prop or in context. + // We'll check to see if it _looks_ like a Redux store first. + // This allows us to pass through a `store` prop that is just a plain value. + + var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); + var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); + + if (false) {} // Based on the previous check, one of these must be true + + + var store = didStoreComeFromProps ? props.store : contextValue.store; + var childPropsSelector = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + // The child props selector needs the store reference as an input. + // Re-create this selector whenever the store changes. + return createChildSelector(store); + }, [store]); + + var _useMemo2 = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + // This Subscription's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + var subscription = Object(_utils_Subscription__WEBPACK_IMPORTED_MODULE_5__["createSubscription"])(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `subscription` will then be null. This can + // probably be avoided if Subscription's listeners logic is changed to not call listeners + // that have been unsubscribed in the middle of the notification loop. + + // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `subscription` will then be null. This can + // probably be avoided if Subscription's listeners logic is changed to not call listeners + // that have been unsubscribed in the middle of the notification loop. + var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); + return [subscription, notifyNestedSubs]; + }, [store, didStoreComeFromProps, contextValue]), + subscription = _useMemo2[0], + notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, + // and memoize that value to avoid unnecessary context updates. + + + var overriddenContextValue = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + if (didStoreComeFromProps) { + // This component is directly subscribed to a store from props. + // We don't want descendants reading from this store - pass down whatever + // the existing context value is from the nearest connected ancestor. + return contextValue; + } // Otherwise, put this component's subscription instance into context, so that + // connected descendants won't update until after this component is done + + + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, contextValue, { + subscription: subscription + }); + }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update + // causes a change to the calculated child component props (or we caught an error in mapState) + + var _useReducer = Object(react__WEBPACK_IMPORTED_MODULE_3__["useReducer"])(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates), + _useReducer$ = _useReducer[0], + previousStateUpdateResult = _useReducer$[0], + forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards + + + if (previousStateUpdateResult && previousStateUpdateResult.error) { + throw previousStateUpdateResult.error; + } // Set up refs to coordinate values between the subscription effect and the render logic + + + var lastChildProps = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(); + var lastWrapperProps = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(wrapperProps); + var childPropsFromStoreUpdate = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(); + var renderIsScheduled = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(false); + var actualChildProps = usePureOnlyMemo(function () { + // Tricky logic here: + // - This render may have been triggered by a Redux store update that produced new child props + // - However, we may have gotten new wrapper props after that + // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. + // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. + // So, we'll use the child props from store update only if the wrapper props are the same as last time. + if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { + return childPropsFromStoreUpdate.current; + } // TODO We're reading the store directly in render() here. Bad idea? + // This will likely cause Bad Things (TM) to happen in Concurrent Mode. + // Note that we do this because on renders _not_ caused by store updates, we need the latest store state + // to determine what the child props should be. + + + return childPropsSelector(store.getState(), wrapperProps); + }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns + // about useLayoutEffect in SSR, so we try to detect environment and fall back to + // just useEffect instead to avoid the warning, since neither will run anyway. + + useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes + + useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component. + // We memoize the elements for the rendered child component as an optimization. + + var renderedWrappedComponent = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, actualChildProps, { + ref: reactReduxForwardedRef + })); + }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering + // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. + + var renderedChild = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () { + if (shouldHandleStateChanges) { + // If this component is subscribed to store updates, we need to pass its own + // subscription instance down to our descendants. That means rendering the same + // Context instance, and putting a different value into the context. + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ContextToUse.Provider, { + value: overriddenContextValue + }, renderedWrappedComponent); + } + + return renderedWrappedComponent; + }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); + return renderedChild; + } // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed. + + + var Connect = pure ? react__WEBPACK_IMPORTED_MODULE_3___default.a.memo(ConnectFunction) : ConnectFunction; + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = ConnectFunction.displayName = displayName; + + if (forwardRef) { + var forwarded = react__WEBPACK_IMPORTED_MODULE_3___default.a.forwardRef(function forwardConnectRef(props, ref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(Connect, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { + reactReduxForwardedRef: ref + })); + }); + forwarded.displayName = displayName; + forwarded.WrappedComponent = WrappedComponent; + return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(forwarded, WrappedComponent); + } + + return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Connect, WrappedComponent); + }; +} + +/***/ }), + +/***/ "dJq6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SessionFlusher", function() { return SessionFlusher; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("l3L7"); + + + +/** + * @inheritdoc + */ +class SessionFlusher { + __init() {this.flushTimeout = 60;} + __init2() {this._pendingAggregates = {};} + + __init3() {this._isEnabled = true;} + + constructor(client, attrs) {;SessionFlusher.prototype.__init.call(this);SessionFlusher.prototype.__init2.call(this);SessionFlusher.prototype.__init3.call(this); + this._client = client; + // Call to setInterval, so that flush is called every 60 seconds + this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1000); + this._sessionAttrs = attrs; + } + + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + const sessionAggregates = this.getSessionAggregates(); + if (sessionAggregates.aggregates.length === 0) { + return; + } + this._pendingAggregates = {}; + this._client.sendSession(sessionAggregates); + } + + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + const aggregates = Object.keys(this._pendingAggregates).map((key) => { + return this._pendingAggregates[parseInt(key)]; + }); + + const sessionAggregates = { + attrs: this._sessionAttrs, + aggregates, + }; + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dropUndefinedKeys"])(sessionAggregates); + } + + /** JSDoc */ + close() { + clearInterval(this._intervalId); + this._isEnabled = false; + this.flush(); + } + + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) { + return; + } + const scope = Object(_hub_js__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])().getScope(); + const requestSession = scope && scope.getRequestSession(); + + if (requestSession && requestSession.status) { + this._incrementSessionStatusCount(requestSession.status, new Date()); + // This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in + // case captureRequestSession is called more than once to prevent double count + if (scope) { + scope.setRequestSession(undefined); + } + /* eslint-enable @typescript-eslint/no-unsafe-member-access */ + } + } + + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + // Truncate minutes and seconds on Session Started attribute to have one minute bucket keys + const sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + + // corresponds to aggregated sessions in one specific minute bucket + // for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1} + const aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + if (!aggregationCounts.started) { + aggregationCounts.started = new Date(sessionStartedTrunc).toISOString(); + } + + switch (status) { + case 'errored': + aggregationCounts.errored = (aggregationCounts.errored || 0) + 1; + return aggregationCounts.errored; + case 'ok': + aggregationCounts.exited = (aggregationCounts.exited || 0) + 1; + return aggregationCounts.exited; + default: + aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1; + return aggregationCounts.crashed; + } + } +} + + +//# sourceMappingURL=sessionflusher.js.map + + +/***/ }), + +/***/ "dL5o": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("iaIa")('Array'); + + +/***/ }), + +/***/ "dLbP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FiJW"); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b0ha"); + + + +var now = Date.now(); +var fnValuesNs = "fnValues" + now; +var fnRuleNs = "fnStyle" + ++now; + +var functionPlugin = function functionPlugin() { + return { + onCreateRule: function onCreateRule(name, decl, options) { + if (typeof decl !== 'function') return null; + var rule = Object(jss__WEBPACK_IMPORTED_MODULE_1__["createRule"])(name, {}, options); + rule[fnRuleNs] = decl; + return rule; + }, + onProcessStyle: function onProcessStyle(style, rule) { + // We need to extract function values from the declaration, so that we can keep core unaware of them. + // We need to do that only once. + // We don't need to extract functions on each style update, since this can happen only once. + // We don't support function values inside of function rules. + if (fnValuesNs in rule || fnRuleNs in rule) return style; + var fnValues = {}; + + for (var prop in style) { + var value = style[prop]; + if (typeof value !== 'function') continue; + delete style[prop]; + fnValues[prop] = value; + } + + rule[fnValuesNs] = fnValues; + return style; + }, + onUpdate: function onUpdate(data, rule, sheet, options) { + var styleRule = rule; + var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object + // will be returned from that function. + + if (fnRule) { + // Empty object will remove all currently defined props + // in case function rule returns a falsy value. + styleRule.style = fnRule(data) || {}; + + if (false) { var prop; } + } + + var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values. + + if (fnValues) { + for (var _prop in fnValues) { + styleRule.prop(_prop, fnValues[_prop](data), options); + } + } + } + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (functionPlugin); + + +/***/ }), + +/***/ "dMYP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.useWebviewIntent = void 0; + +var _react = __webpack_require__("ivGQ"); + +var _view = __webpack_require__("7zRI"); + +var useWebviewIntent = function useWebviewIntent() { + return (0, _react.useContext)(_view.WebviewContext); +}; + +exports.useWebviewIntent = useWebviewIntent; + +/***/ }), + +/***/ "dNxw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isWebviewSourceBaseUrl = isWebviewSourceBaseUrl; + +function isWebviewSourceBaseUrl(webviewSource) { + return Boolean(webviewSource.html); +} + +/***/ }), + +/***/ "dRmG": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +__webpack_require__("95RP"); +var redefine = __webpack_require__("iNsi"); +var hide = __webpack_require__("XyXA"); +var fails = __webpack_require__("enc5"); +var defined = __webpack_require__("etLA"); +var wks = __webpack_require__("Yhpl"); +var regexpExec = __webpack_require__("Cf+5"); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$<a>') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + + +/***/ }), + +/***/ "dS4D": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'moins d’une seconde', + other: 'moins de {{count}} secondes' + }, + + xSeconds: { + one: '1 seconde', + other: '{{count}} secondes' + }, + + halfAMinute: '30 secondes', + + lessThanXMinutes: { + one: 'moins d’une minute', + other: 'moins de {{count}} minutes' + }, + + xMinutes: { + one: '1 minute', + other: '{{count}} minutes' + }, + + aboutXHours: { + one: 'environ 1 heure', + other: 'environ {{count}} heures' + }, + + xHours: { + one: '1 heure', + other: '{{count}} heures' + }, + + xDays: { + one: '1 jour', + other: '{{count}} jours' + }, + + aboutXMonths: { + one: 'environ 1 mois', + other: 'environ {{count}} mois' + }, + + xMonths: { + one: '1 mois', + other: '{{count}} mois' + }, + + aboutXYears: { + one: 'environ 1 an', + other: 'environ {{count}} ans' + }, + + xYears: { + one: '1 an', + other: '{{count}} ans' + }, + + overXYears: { + one: 'plus d’un an', + other: 'plus de {{count}} ans' + }, + + almostXYears: { + one: 'presqu’un an', + other: 'presque {{count}} ans' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'dans ' + result + } else { + return 'il y a ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "dW8k": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return add; }); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Dsef"); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("koGf"); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("WZRr"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("bKmd"); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("CUab"); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + + + + + + + +/** + * @name add + * @category Common Helpers + * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. + * + * @description + * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * + * | Key | Description | + * |----------------|------------------------------------| + * | years | Amount of years to be added | + * | months | Amount of months to be added | + * | weeks | Amount of weeks to be added | + * | days | Amount of days to be added | + * | hours | Amount of hours to be added | + * | minutes | Amount of minutes to be added | + * | seconds | Amount of seconds to be added | + * + * All values default to 0 + * + * @returns {Date} the new date with the seconds added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add the following duration to 1 September 2014, 10:19:50 + * const result = add(new Date(2014, 8, 1, 10, 19, 50), { + * years: 2, + * months: 9, + * weeks: 1, + * days: 7, + * hours: 5, + * minutes: 9, + * seconds: 30, + * }) + * //=> Thu Jun 15 2017 15:29:20 + */ +function add(dirtyDate, duration) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(2, arguments); + if (!duration || _typeof(duration) !== 'object') return new Date(NaN); + var years = duration.years ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.years) : 0; + var months = duration.months ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.months) : 0; + var weeks = duration.weeks ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.weeks) : 0; + var days = duration.days ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.days) : 0; + var hours = duration.hours ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.hours) : 0; + var minutes = duration.minutes ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.minutes) : 0; + var seconds = duration.seconds ? Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(duration.seconds) : 0; // Add years and months + + var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(dirtyDate); + var dateWithMonths = months || years ? Object(_addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(date, months + years * 12) : date; // Add weeks and days + + var dateWithDays = days || weeks ? Object(_addDays_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds + + var minutesToAdd = minutes + hours * 60; + var secondsToAdd = seconds + minutesToAdd * 60; + var msToAdd = secondsToAdd * 1000; + var finalDate = new Date(dateWithDays.getTime() + msToAdd); + return finalDate; +} + +/***/ }), + +/***/ "dWv3": +/***/ (function(module, exports) { + +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; + + +/***/ }), + +/***/ "dZCX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var toInteger = __webpack_require__("HzFX"); +var aNumberValue = __webpack_require__("aTyc"); +var repeat = __webpack_require__("lFqA"); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !__webpack_require__("enc5")(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + + +/***/ }), + +/***/ "dZZ2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNumberOfUrlSegments", function() { return getNumberOfUrlSegments; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseUrl", function() { return parseUrl; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function() { return stripUrlQueryAndFragment; }); +/** + * Parses string form of URL into an object + * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B + * // intentionally using regex and not <a/> href parsing trick because React Native and other + * // environments where DOM might not be available + * @returns parsed URL object + */ +function parseUrl(url) + + { + if (!url) { + return {}; + } + + const match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + + if (!match) { + return {}; + } + + // coerce to undefined values to empty string so we don't get 'undefined' + const query = match[6] || ''; + const fragment = match[8] || ''; + return { + host: match[4], + path: match[5], + protocol: match[2], + relative: match[5] + query + fragment, // everything minus origin + }; +} + +/** + * Strip the query string and fragment off of a given URL or path (if present) + * + * @param urlPath Full URL or path, including possible query string and/or fragment + * @returns URL or path without query string or fragment + */ +function stripUrlQueryAndFragment(urlPath) { + // eslint-disable-next-line no-useless-escape + return urlPath.split(/[\?#]/, 1)[0]; +} + +/** + * Returns number of URL segments of a passed string URL. + */ +function getNumberOfUrlSegments(url) { + // split at '/' or at '\/' to split regex urls correctly + return url.split(/\\?\//).filter(s => s.length > 0 && s !== ',').length; +} + + +//# sourceMappingURL=url.js.map + + +/***/ }), + +/***/ "dZpp": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 26.1.5 Reflect.enumerate(target) +var $export = __webpack_require__("LRPZ"); +var anObject = __webpack_require__("eckd"); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +__webpack_require__("XF0z")(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + + +/***/ }), + +/***/ "dlno": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isCordova = void 0; + +// cordova +var isCordova = function isCordova() { + return typeof window !== 'undefined' && window.cordova !== undefined; +}; + +exports.isCordova = isCordova; + +/***/ }), + +/***/ "dodI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__); + + + +var StorageData = function StorageData(_ref) { + var t = _ref.t, + data = _ref.data; + var diskQuota = Number.isInteger(data.quota) ? (data.quota / (1000 * 1000 * 1000)).toFixed(2) : data.quota; + var diskUsage = Number.isInteger(data.usage) ? (data.usage / (1000 * 1000 * 1000)).toFixed(2) : data.usage; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-storage" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", { + className: "coz-nav-storage-text" + }, t('storage_phrase', { + diskUsage: diskUsage, + diskQuota: diskQuota + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("progress", { + className: "cozy-nav-storage-bar", + value: diskUsage, + max: diskQuota, + min: "0" + })); +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__["translate"])()(StorageData)); + +/***/ }), + +/***/ "duM2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OJkG"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + color: theme.palette.text.secondary + }, theme.typography.caption, { + textAlign: 'left', + marginTop: 3, + margin: 0, + '&$disabled': { + color: theme.palette.text.disabled + }, + '&$error': { + color: theme.palette.error.main + } + }), + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `margin="dense"`. */ + marginDense: { + marginTop: 4 + }, + + /* Styles applied to the root element if `variant="filled"` or `variant="outlined"`. */ + contained: { + marginLeft: 14, + marginRight: 14 + }, + + /* Pseudo-class applied to the root element if `focused={true}`. */ + focused: {}, + + /* Pseudo-class applied to the root element if `filled={true}`. */ + filled: {}, + + /* Pseudo-class applied to the root element if `required={true}`. */ + required: {} + }; +}; +var FormHelperText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FormHelperText(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'p' : _props$component, + disabled = props.disabled, + error = props.error, + filled = props.filled, + focused = props.focused, + margin = props.margin, + required = props.required, + variant = props.variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["children", "classes", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"]); + + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__["default"])(); + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['variant', 'margin', 'disabled', 'error', 'filled', 'focused', 'required'] + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, (fcs.variant === 'filled' || fcs.variant === 'outlined') && classes.contained, className, fcs.disabled && classes.disabled, fcs.error && classes.error, fcs.filled && classes.filled, fcs.focused && classes.focused, fcs.required && classes.required, fcs.margin === 'dense' && classes.marginDense), + ref: ref + }, other), children === ' ' ? + /*#__PURE__*/ + // eslint-disable-next-line react/no-danger + react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + dangerouslySetInnerHTML: { + __html: '​' + } + }) : children); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiFormHelperText' +})(FormHelperText)); + +/***/ }), + +/***/ "dw92": +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__("HzFX"); +var defined = __webpack_require__("etLA"); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), + +/***/ "dxoH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUnitless", function() { return isUnitless; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnit", function() { return getUnit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toUnitless", function() { return toUnitless; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertLength", function() { return convertLength; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alignProperty", function() { return alignProperty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontGrid", function() { return fontGrid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "responsiveProperty", function() { return responsiveProperty; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); + +function isUnitless(value) { + return String(parseFloat(value)).length === String(value).length; +} // Ported from Compass +// https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss +// Emulate the sass function "unit" + +function getUnit(input) { + return String(input).match(/[\d.\-+]*\s*(.*)/)[1] || ''; +} // Emulate the sass function "unitless" + +function toUnitless(length) { + return parseFloat(length); +} // Convert any CSS <length> or <percentage> value to any another. +// From https://github.com/KyleAMathews/convert-css-length + +function convertLength(baseFontSize) { + return function (length, toUnit) { + var fromUnit = getUnit(length); // Optimize for cases where `from` and `to` units are accidentally the same. + + if (fromUnit === toUnit) { + return length; + } // Convert input length to pixels. + + + var pxLength = toUnitless(length); + + if (fromUnit !== 'px') { + if (fromUnit === 'em') { + pxLength = toUnitless(length) * toUnitless(baseFontSize); + } else if (fromUnit === 'rem') { + pxLength = toUnitless(length) * toUnitless(baseFontSize); + return length; + } + } // Convert length in pixels to the output unit + + + var outputLength = pxLength; + + if (toUnit !== 'px') { + if (toUnit === 'em') { + outputLength = pxLength / toUnitless(baseFontSize); + } else if (toUnit === 'rem') { + outputLength = pxLength / toUnitless(baseFontSize); + } else { + return length; + } + } + + return parseFloat(outputLength.toFixed(5)) + toUnit; + }; +} +function alignProperty(_ref) { + var size = _ref.size, + grid = _ref.grid; + var sizeBelow = size - size % grid; + var sizeAbove = sizeBelow + grid; + return size - sizeBelow < sizeAbove - size ? sizeBelow : sizeAbove; +} // fontGrid finds a minimal grid (in rem) for the fontSize values so that the +// lineHeight falls under a x pixels grid, 4px in the case of Material Design, +// without changing the relative line height + +function fontGrid(_ref2) { + var lineHeight = _ref2.lineHeight, + pixels = _ref2.pixels, + htmlFontSize = _ref2.htmlFontSize; + return pixels / (lineHeight * htmlFontSize); +} +/** + * generate a responsive version of a given CSS property + * @example + * responsiveProperty({ + * cssProperty: 'fontSize', + * min: 15, + * max: 20, + * unit: 'px', + * breakpoints: [300, 600], + * }) + * + * // this returns + * + * { + * fontSize: '15px', + * '@media (min-width:300px)': { + * fontSize: '17.5px', + * }, + * '@media (min-width:600px)': { + * fontSize: '20px', + * }, + * } + * + * @param {Object} params + * @param {string} params.cssProperty - The CSS property to be made responsive + * @param {number} params.min - The smallest value of the CSS property + * @param {number} params.max - The largest value of the CSS property + * @param {string} [params.unit] - The unit to be used for the CSS property + * @param {Array.number} [params.breakpoints] - An array of breakpoints + * @param {number} [params.alignStep] - Round scaled value to fall under this grid + * @returns {Object} responsive styles for {params.cssProperty} + */ + +function responsiveProperty(_ref3) { + var cssProperty = _ref3.cssProperty, + min = _ref3.min, + max = _ref3.max, + _ref3$unit = _ref3.unit, + unit = _ref3$unit === void 0 ? 'rem' : _ref3$unit, + _ref3$breakpoints = _ref3.breakpoints, + breakpoints = _ref3$breakpoints === void 0 ? [600, 960, 1280] : _ref3$breakpoints, + _ref3$transform = _ref3.transform, + transform = _ref3$transform === void 0 ? null : _ref3$transform; + + var output = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, cssProperty, "".concat(min).concat(unit)); + + var factor = (max - min) / breakpoints[breakpoints.length - 1]; + breakpoints.forEach(function (breakpoint) { + var value = min + factor * breakpoint; + + if (transform !== null) { + value = transform(value); + } + + output["@media (min-width:".concat(breakpoint, "px)")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, cssProperty, "".concat(Math.round(value * 10000) / 10000).concat(unit)); + }); + return output; +} + +/***/ }), + +/***/ "dz/2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var lightGreen = { + 50: '#f1f8e9', + 100: '#dcedc8', + 200: '#c5e1a5', + 300: '#aed581', + 400: '#9ccc65', + 500: '#8bc34a', + 600: '#7cb342', + 700: '#689f38', + 800: '#558b2f', + 900: '#33691e', + A100: '#ccff90', + A200: '#b2ff59', + A400: '#76ff03', + A700: '#64dd17' +}; +/* harmony default export */ __webpack_exports__["default"] = (lightGreen); + +/***/ }), + +/***/ "dz5Z": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__("bm8m"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), + +/***/ "e1g5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* eslint-disable */ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +/* harmony default export */ __webpack_exports__["default"] = (typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')()); + +/***/ }), + +/***/ "e3C4": +/***/ (function(module, exports) { + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; + + +/***/ }), + +/***/ "e52Y": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_MAXPOWER_DOCTYPE = void 0; +var ENEDIS_MAXPOWER_DOCTYPE = 'com.grandlyon.enedis.maxpower'; +exports.ENEDIS_MAXPOWER_DOCTYPE = ENEDIS_MAXPOWER_DOCTYPE; + +/***/ }), + +/***/ "e7+3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasSafariPlugin = exports.hasNetworkInformationPlugin = exports.hasInAppBrowserPlugin = exports.hasDevicePlugin = void 0; + +var _cordova = __webpack_require__("I/47"); + +var hasDevicePlugin = function hasDevicePlugin() { + return (0, _cordova.isCordova)() && window.device !== undefined; +}; + +exports.hasDevicePlugin = hasDevicePlugin; + +var hasInAppBrowserPlugin = function hasInAppBrowserPlugin() { + return (0, _cordova.isCordova)() && window.cordova.InAppBrowser !== undefined; +}; + +exports.hasInAppBrowserPlugin = hasInAppBrowserPlugin; + +var hasSafariPlugin = function hasSafariPlugin() { + return new Promise(function (resolve) { + if (!(0, _cordova.isCordova)() || window.SafariViewController === undefined) { + resolve(false); + return; + } + + window.SafariViewController.isAvailable(function (available) { + return resolve(available); + }); + }); +}; +/** + * Check if the Cordova's cordova-plugin-network-information plugin is installed + * @see https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/ + * @returns {boolean} + */ + + +exports.hasSafariPlugin = hasSafariPlugin; + +var hasNetworkInformationPlugin = function hasNetworkInformationPlugin() { + return (0, _cordova.isCordova)() && window.navigator.connection !== undefined; +}; + +exports.hasNetworkInformationPlugin = hasNetworkInformationPlugin; + +/***/ }), + +/***/ "e9eL": +/***/ (function(module, exports, __webpack_require__) { + +var baseCreate = __webpack_require__("wfDR"), + baseLodash = __webpack_require__("ajN4"); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; + + +/***/ }), + +/***/ "eA9r": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "eBwq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` +/* globals document: false */ +var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {}; + +module.exports = reflectApply + ? function isCallable(value) { + if (value === documentDotAll) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value); + } + : function isCallable(value) { + if (value === documentDotAll) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; + }; + + +/***/ }), + +/***/ "eCKa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.AppIcon = void 0; +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _classnames = _interopRequireDefault(__webpack_require__("1ytp")); +var _cozyClient = __webpack_require__("xEu0"); +var _Icon = _interopRequireWildcard(__webpack_require__("AHiN")); +var _Cube = _interopRequireDefault(__webpack_require__("UvGa")); +var _palette = _interopRequireDefault(__webpack_require__("f78X")); +var _proptypes = __webpack_require__("kqkg"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} +var styles = { + "c-loading-placeholder": "styles__c-loading-placeholder___3L6Gz", + "placeHolderShimmer": "styles__placeHolderShimmer___3Rei_", + "c-app-icon": "styles__c-app-icon___2_O40", + "c-app-icon-default": "styles__c-app-icon-default___3CEmt" +}; +var DONE = 'done'; +var ERRORED = 'errored'; +var FETCHING = 'fetching'; +var AppIcon = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(AppIcon, _Component); + var _super = _createSuper(AppIcon); + function AppIcon(props, context) { + var _this; + (0, _classCallCheck2.default)(this, AppIcon); + _this = _super.call(this, props, context); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", { + error: null, + icon: null, + status: _this.props.client ? FETCHING : ERRORED + }); + _this.isUnmounting = false; + _this.handleError = _this.handleError.bind((0, _assertThisInitialized2.default)(_this)); + _this.fetchIcon = _this.fetchIcon.bind((0, _assertThisInitialized2.default)(_this)); + return _this; + } + (0, _createClass2.default)(AppIcon, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.isUnmounting = true; + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.isUnmounting = false; + this.load(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.fetchIcon !== prevProps.fetchIcon) { + this.load(); + } + } + }, { + key: "fetchIcon", + value: function fetchIcon() { + var _this$props = this.props, + app = _this$props.app, + type = _this$props.type, + priority = _this$props.priority, + client = _this$props.client; + return client.getStackClient().getIconURL({ + type: type, + slug: app.slug || app, + appData: app, + priority: priority + }); + } + }, { + key: "handleError", + value: function handleError() { + this.setState({ + status: ERRORED + }); + } + }, { + key: "load", + value: function () { + var _load = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var _this$props2, app, fetchIcon, onReady, client, loadFn, loadedUrl, loadError, domain, secure, cozyURL; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _this$props2 = this.props, app = _this$props2.app, fetchIcon = _this$props2.fetchIcon, onReady = _this$props2.onReady, client = _this$props2.client; + loadFn = fetchIcon || this.fetchIcon; + _context.prev = 2; + if (client) { + cozyURL = new URL(client.getStackClient().uri); + domain = cozyURL.host; + secure = cozyURL.protocol === 'https:'; + } + _context.next = 6; + return loadFn(app, domain, secure); + case 6: + loadedUrl = _context.sent; + _context.next = 12; + break; + case 9: + _context.prev = 9; + _context.t0 = _context["catch"](2); + loadError = _context.t0; + case 12: + if (!this.isUnmounting) { + this.setState({ + error: loadError, + icon: loadedUrl, + status: loadError ? ERRORED : DONE + }); + if (typeof onReady === 'function') { + onReady(); + } + } + case 13: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[2, 9]]); + })); + function load() { + return _load.apply(this, arguments); + } + return load; + }() + }, { + key: "render", + value: function render() { + var _this$props3 = this.props, + alt = _this$props3.alt, + className = _this$props3.className, + fallbackIcon = _this$props3.fallbackIcon; + var _this$state = this.state, + icon = _this$state.icon, + status = _this$state.status; + switch (status) { + case FETCHING: + return /*#__PURE__*/_react.default.createElement("div", { + role: "progressbar", + className: (0, _classnames.default)(styles['c-loading-placeholder'], styles['c-app-icon'], className) + }); + case DONE: + return /*#__PURE__*/_react.default.createElement("img", { + alt: alt, + className: (0, _classnames.default)(styles['c-app-icon'], className), + onError: this.handleError, + ref: this.props.iconRef, + src: icon + }); + case ERRORED: + default: + return /*#__PURE__*/_react.default.createElement(_Icon.default, { + className: (0, _classnames.default)(styles['c-app-icon'], styles['c-app-icon-default'], className), + height: "100%", + icon: fallbackIcon || _Cube.default, + width: "100%", + color: _palette.default['coolGrey'], + iconRef: this.props.iconRef + }); + } + } + }]); + return AppIcon; +}(_react.Component); +exports.AppIcon = AppIcon; +AppIcon.propTypes = { + alt: _propTypes.default.string, + /** Required if fetchIcon is not provided */ + app: _propTypes.default.oneOfType([_proptypes.AppDoctype, _propTypes.default.string]), + /** Icon to fallback on error (optional), default cube icon */ + fallbackIcon: _Icon.iconPropType, + /** Custom implementation of how to fetch icon */ + fetchIcon: _propTypes.default.func, + client: _propTypes.default.object.isRequired, + className: _propTypes.default.string, + onReady: _propTypes.default.func, + /** Type of application */ + type: _propTypes.default.oneOf(['app', 'konnector']), + /** First source to fetch the icon. If nothing is found, there is a second try with the other source */ + priority: _propTypes.default.oneOf(['stack', 'registry']) +}; +AppIcon.defaultProps = { + type: 'app', + priority: 'stack' +}; +var _default = (0, _cozyClient.withClient)(AppIcon); +exports.default = _default; + +/***/ }), + +/***/ "eDV5": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.clientContext = void 0; + +var _react = __webpack_require__("ivGQ"); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var clientContext = /*#__PURE__*/(0, _react.createContext)({ + /** @type {CozyClient|null} */ + client: null, + store: null +}); +exports.clientContext = clientContext; +var _default = clientContext; +exports.default = _default; + +/***/ }), + +/***/ "eEzp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" +}), 'IndeterminateCheckBox')); + +/***/ }), + +/***/ "eHS2": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.2 Number.isFinite(number) +var $export = __webpack_require__("LRPZ"); +var _isFinite = __webpack_require__("ETne").isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + + +/***/ }), + +/***/ "eNUr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StepContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4Rfx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StepContent__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "eOBx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifySubselectors; }); +/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("uEAC"); + + +function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { + Object(_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + } + } +} + +function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); +} + +/***/ }), + +/***/ "eOEn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3N1e"); +/* harmony import */ var _RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("/hc2"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("PKog"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("bH5F"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("OY/u"); +/* harmony import */ var _RadioGroup_useRadioGroup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("XUgK"); + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + color: theme.palette.text.secondary + }, + + /* Pseudo-class applied to the root element if `checked={true}`. */ + checked: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + '&$checked': { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.action.disabled + } + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + '&$checked': { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.action.disabled + } + } + }; +}; +var defaultCheckedIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__["default"], { + checked: true +}); +var defaultIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__["default"], null); +var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Radio(props, ref) { + var checkedProp = props.checked, + classes = props.classes, + _props$color = props.color, + color = _props$color === void 0 ? 'secondary' : _props$color, + nameProp = props.name, + onChangeProp = props.onChange, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["checked", "classes", "color", "name", "onChange", "size"]); + + var radioGroup = Object(_RadioGroup_useRadioGroup__WEBPACK_IMPORTED_MODULE_12__["default"])(); + var checked = checkedProp; + var onChange = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__["default"])(onChangeProp, radioGroup && radioGroup.onChange); + var name = nameProp; + + if (radioGroup) { + if (typeof checked === 'undefined') { + checked = radioGroup.value === props.value; + } + + if (typeof name === 'undefined') { + name = radioGroup.name; + } + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + color: color, + type: "radio", + icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](defaultIcon, { + fontSize: size === 'small' ? 'small' : 'medium' + }), + checkedIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](defaultCheckedIcon, { + fontSize: size === 'small' ? 'small' : 'medium' + }), + classes: { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__["default"])(color))]), + checked: classes.checked, + disabled: classes.disabled + }, + name: name, + checked: checked, + onChange: onChange, + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__["default"])(styles, { + name: 'MuiRadio' +})(Radio)); + +/***/ }), + +/***/ "eP5l": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +function _default(fn, duration, keyFn) { + var memo = {}; + return function (arg) { + var key = keyFn(arg); + var memoInfo = memo[key]; + var uptodate = memoInfo && memoInfo.result && memoInfo.date - Date.now() < duration; + if (!uptodate) { + memo[key] = { + result: fn(arg), + date: Date.now() + }; + } + return memo[key].result; + }; +} + +/***/ }), + +/***/ "ePT4": +/***/ (function(module, exports, __webpack_require__) { + +var baseUnset = __webpack_require__("OQB6"), + isIndex = __webpack_require__("9yx8"); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; + + +/***/ }), + +/***/ "eSMJ": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; + + +/***/ }), + +/***/ "eUFy": +/***/ (function(module, exports, __webpack_require__) { + +var map = { + "./en": "2maa", + "./en.json": "2maa", + "./fr": "Hsuv", + "./fr.json": "Hsuv" +}; + + +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = "eUFy"; + +/***/ }), + +/***/ "eVKw": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("rDuK"); +/* harmony import */ var _useTheme_ThemeContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("q384"); +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("NFku"); +/* harmony import */ var _nested__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("9Rvm"); + + + + + + + // To support composition of theme. + +function mergeOuterLocalTheme(outerTheme, localTheme) { + if (typeof localTheme === 'function') { + var mergedTheme = localTheme(outerTheme); + + if (false) {} + + return mergedTheme; + } + + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, outerTheme, localTheme); +} +/** + * This component takes a `theme` prop. + * It makes the `theme` available down the React tree thanks to React context. + * This component should preferably be used at **the root of your component tree**. + */ + + +function ThemeProvider(props) { + var children = props.children, + localTheme = props.theme; + var outerTheme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_5__["default"])(); + + if (false) {} + + var theme = react__WEBPACK_IMPORTED_MODULE_1___default.a.useMemo(function () { + var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme); + + if (output != null) { + output[_nested__WEBPACK_IMPORTED_MODULE_6__["default"]] = outerTheme !== null; + } + + return output; + }, [localTheme, outerTheme]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_useTheme_ThemeContext__WEBPACK_IMPORTED_MODULE_4__["default"].Provider, { + value: theme + }, children); +} + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ThemeProvider); + +/***/ }), + +/***/ "eaDT": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_interopDefault", function() { return _interopDefault; }); +/** + * Unwraps a module if it has been wrapped in an object under the key `default`. + * + * Adapted from Rollup (https://github.com/rollup/rollup) + * + * @param requireResult The result of calling `require` on a module + * @returns The full module, unwrapped if necessary. + */ +function _interopDefault(requireResult) { + return requireResult.__esModule ? (requireResult.default ) : requireResult; +} + +// Rollup version: +// function _interopDefault(e) { +// return e && e.__esModule ? e['default'] : e; +// } + + +//# sourceMappingURL=_interopDefault.js.map + + +/***/ }), + +/***/ "eaPh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayPrint", function() { return displayPrint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayRaw", function() { return displayRaw; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "overflow", function() { return overflow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "textOverflow", function() { return textOverflow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visibility", function() { return visibility; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whiteSpace", function() { return whiteSpace; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var displayPrint = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'displayPrint', + cssProperty: false, + transform: function transform(value) { + return { + '@media print': { + display: value + } + }; + } +}); +var displayRaw = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'display' +}); +var overflow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'overflow' +}); +var textOverflow = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'textOverflow' +}); +var visibility = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'visibility' +}); +var whiteSpace = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'whiteSpace' +}); +/* harmony default export */ __webpack_exports__["default"] = (Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace)); + +/***/ }), + +/***/ "eckd": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("pFmr"); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), + +/***/ "edLT": +/***/ (function(module, exports, __webpack_require__) { + +var getTag = __webpack_require__("FqJm"), + isObjectLike = __webpack_require__("S5PF"); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; + + +/***/ }), + +/***/ "efAt": +/***/ (function(module, exports, __webpack_require__) { + +var baseUniq = __webpack_require__("VHLe"); + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ +function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; +} + +module.exports = uniq; + + +/***/ }), + +/***/ "enc5": +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), + +/***/ "eowO": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var strong = __webpack_require__("GlOB"); +var validate = __webpack_require__("LEB8"); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = __webpack_require__("BjNV")(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + + +/***/ }), + +/***/ "epYH": +/***/ (function(module, exports) { + +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; + +/***/ }), + +/***/ "eqjb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "body", function() { return body; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("OY/u"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rDuK"); + + + + + +var html = { + WebkitFontSmoothing: 'antialiased', + // Antialiasing. + MozOsxFontSmoothing: 'grayscale', + // Antialiasing. + // Change from `box-sizing: content-box` so that `width` + // is not affected by `padding` or `border`. + boxSizing: 'border-box' +}; +var body = function body(theme) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + color: theme.palette.text.primary + }, theme.typography.body2, { + backgroundColor: theme.palette.background.default, + '@media print': { + // Save printer ink. + backgroundColor: theme.palette.common.white + } + }); +}; +var styles = function styles(theme) { + return { + '@global': { + html: html, + '*, *::before, *::after': { + boxSizing: 'inherit' + }, + 'strong, b': { + fontWeight: theme.typography.fontWeightBold + }, + body: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + margin: 0 + }, body(theme), { + // Add support for document.body.requestFullScreen(). + // Other elements, if background transparent, are not supported. + '&::backdrop': { + backgroundColor: theme.palette.background.default + } + }) + } + }; +}; +/** + * Kickstart an elegant, consistent, and simple baseline to build upon. + */ + +function CssBaseline(props) { + /* eslint-disable no-unused-vars */ + var _props$children = props.children, + children = _props$children === void 0 ? null : _props$children, + classes = props.classes; + /* eslint-enable no-unused-vars */ + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, children); +} + + false ? undefined : void 0; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__["default"])(styles, { + name: 'MuiCssBaseline' +})(CssBaseline)); + +/***/ }), + +/***/ "etLA": +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ "euRm": +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__("ETne").parseFloat; +var $trim = __webpack_require__("V+ek").trim; + +module.exports = 1 / $parseFloat(__webpack_require__("870Y") + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), + +/***/ "euUg": +/***/ (function(module, exports) { + +function _typeof(obj) { + "@babel/helpers - typeof"; + + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); +} + +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "euuj": +/***/ (function(module, exports, __webpack_require__) { + +var MapCache = __webpack_require__("kNUc"); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Expose `MapCache`. +memoize.Cache = MapCache; + +module.exports = memoize; + + +/***/ }), + +/***/ "ezZO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "position", function() { return position; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zIndex", function() { return zIndex; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "top", function() { return top; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "right", function() { return right; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bottom", function() { return bottom; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "left", function() { return left; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var position = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'position' +}); +var zIndex = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'zIndex', + themeKey: 'zIndex' +}); +var top = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'top' +}); +var right = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'right' +}); +var bottom = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'bottom' +}); +var left = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'left' +}); +/* harmony default export */ __webpack_exports__["default"] = (Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(position, zIndex, top, right, bottom, left)); + +/***/ }), + +/***/ "ezjQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.QUIZ_DOCTYPE = void 0; +var QUIZ_DOCTYPE = 'com.grandlyon.ecolyo.quiz'; +exports.QUIZ_DOCTYPE = QUIZ_DOCTYPE; + +/***/ }), + +/***/ "f0gi": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("UPk3"); + + + + +var useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"]; +/** + * @ignore - internal component. + */ + +function Ripple(props) { + var classes = props.classes, + _props$pulsate = props.pulsate, + pulsate = _props$pulsate === void 0 ? false : _props$pulsate, + rippleX = props.rippleX, + rippleY = props.rippleY, + rippleSize = props.rippleSize, + inProp = props.in, + _props$onExited = props.onExited, + onExited = _props$onExited === void 0 ? function () {} : _props$onExited, + timeout = props.timeout; + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](false), + leaving = _React$useState[0], + setLeaving = _React$useState[1]; + + var rippleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate); + var rippleStyles = { + width: rippleSize, + height: rippleSize, + top: -(rippleSize / 2) + rippleY, + left: -(rippleSize / 2) + rippleX + }; + var childClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate); + var handleExited = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_3__["default"])(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority + + useEnhancedEffect(function () { + if (!inProp) { + // react-transition-group#onExit + setLeaving(true); // react-transition-group#onExited + + var timeoutId = setTimeout(handleExited, timeout); + return function () { + clearTimeout(timeoutId); + }; + } + + return undefined; + }, [handleExited, inProp, timeout]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { + className: rippleClassName, + style: rippleStyles + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { + className: childClassName + })); +} + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Ripple); + +/***/ }), + +/***/ "f0m3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UserActionState = void 0; +var UserActionState; +exports.UserActionState = UserActionState; +(function (UserActionState) { + UserActionState[UserActionState["UNSTARTED"] = 0] = "UNSTARTED"; + UserActionState[UserActionState["ONGOING"] = 1] = "ONGOING"; + UserActionState[UserActionState["NOTIFICATION"] = 2] = "NOTIFICATION"; + UserActionState[UserActionState["DONE"] = 3] = "DONE"; +})(UserActionState || (exports.UserActionState = UserActionState = {})); + +/***/ }), + +/***/ "f2KQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14g+"); + + +/** + * Inits the React SDK + */ +function init(options) { + options._metadata = options._metadata || {}; + options._metadata.sdk = options._metadata.sdk || { + name: 'sentry.javascript.react', + packages: [ + { + name: 'npm:@sentry/react', + version: _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"], + }, + ], + version: _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"], + }; + Object(_sentry_browser__WEBPACK_IMPORTED_MODULE_0__["init"])(options); +} + + +//# sourceMappingURL=sdk.js.map + + +/***/ }), + +/***/ "f4Ug": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingQueries", function() { return isFetchingQueries; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cozyClientCanCheckPremium", function() { return cozyClientCanCheckPremium; }); +/* harmony import */ var _lib_stack_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Kwqu"); + +var isFetchingQueries = function isFetchingQueries(requests) { + return requests.some(function (request) { + return request.fetchStatus === 'loading'; + }); +}; +var cozyClientCanCheckPremium = function cozyClientCanCheckPremium() { + return Object(_lib_stack_client__WEBPACK_IMPORTED_MODULE_0__["compareClientVersion"])('8.3.0'); +}; + +/***/ }), + +/***/ "f6/b": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CozyClient = void 0; + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var SnapshotObject = function SnapshotObject(attrs) { + (0, _classCallCheck2.default)(this, SnapshotObject); + Object.assign(this, attrs); +}; + +var CozyClient = /*#__PURE__*/function (_SnapshotObject) { + (0, _inherits2.default)(CozyClient, _SnapshotObject); + + var _super = _createSuper(CozyClient); + + function CozyClient() { + (0, _classCallCheck2.default)(this, CozyClient); + return _super.apply(this, arguments); + } + + return CozyClient; +}(SnapshotObject); + +exports.CozyClient = CozyClient; + +/***/ }), + +/***/ "f78X": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// GENERATED AUTOMATICALLY FROM stylus/settings/palette.json +module.exports = { + black: 'var(--black)', + white: 'var(--white)', + paleGrey: 'var(--paleGrey)', + silver: 'var(--silver)', + coolGrey: 'var(--coolGrey)', + slateGrey: 'var(--slateGrey)', + charcoalGrey: 'var(--charcoalGrey)', + overlay: 'var(--overlay)', + primaryColor: 'var(--primaryColor)', + primaryColorLight: 'var(--primaryColorLight)', + primaryContrastTextColor: 'var(--primaryContrastTextColor)', + success: 'var(--successColor)', + warning: 'var(--warningColor)', + error: 'var(--errorColor)', + info: 'var(--infoColor)', + errorBackground: 'var(--errorBackground)', + primaryBackgroundLight: 'var(--primaryBackgroundLight)', + neutralBackground: 'var(--neutralBackground)', + zircon: '#F5FAFF', + frenchPass: '#C2DCFF', + dodgerBlue: '#297EF2', + scienceBlue: '#0B61D6', + puertoRico: '#0DCBCF', + grannyApple: '#DEF7E7', + emerald: '#35CE68', + malachite: '#08b442', + seafoamGreen: '#3DA67E', + brightSun: '#FFC644', + texasRose: '#FFAE5F', + chablis: '#FFF2F2', + yourPink: '#FDCBCB', + fuchsia: '#FC4C83', + pomegranate: '#F52D2D', + monza: '#DD0505', + portage: '#9169F2', + azure: '#1FA8F1', + melon: '#FD7461', + blazeOrange: '#FC6D00', + mango: '#FF962F', + pumpkinOrange: '#FF7F1B', + lavender: '#C2ADF4', + darkPeriwinkle: '#6984CE', + purpley: '#7F6BEE', + lightishPurple: '#B449E7', + barney: '#922BC2', + weirdGreen: '#40DE8E' +}; + +/***/ }), + +/***/ "f8cG": +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__("qeDk"); +var gOPS = __webpack_require__("9xp8"); +var anObject = __webpack_require__("eckd"); +var Reflect = __webpack_require__("ETne").Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), + +/***/ "f9kN": +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), + +/***/ "fA2o": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UserQuizState = exports.UserQuestionState = exports.CustomQuestionType = void 0; +var UserQuizState; +exports.UserQuizState = UserQuizState; +(function (UserQuizState) { + UserQuizState[UserQuizState["UNLOCKED"] = 0] = "UNLOCKED"; + UserQuizState[UserQuizState["ONGOING"] = 1] = "ONGOING"; + UserQuizState[UserQuizState["DONE"] = 2] = "DONE"; +})(UserQuizState || (exports.UserQuizState = UserQuizState = {})); +var CustomQuestionType; +exports.CustomQuestionType = CustomQuestionType; +(function (CustomQuestionType) { + CustomQuestionType[CustomQuestionType["DATE"] = 0] = "DATE"; + CustomQuestionType[CustomQuestionType["MAXDATA"] = 1] = "MAXDATA"; + CustomQuestionType[CustomQuestionType["AVERAGE"] = 2] = "AVERAGE"; +})(CustomQuestionType || (exports.CustomQuestionType = CustomQuestionType = {})); +var UserQuestionState; +exports.UserQuestionState = UserQuestionState; +(function (UserQuestionState) { + UserQuestionState[UserQuestionState["UNLOCKED"] = 0] = "UNLOCKED"; + UserQuestionState[UserQuestionState["CORRECT"] = 1] = "CORRECT"; + UserQuestionState[UserQuestionState["UNCORRECT"] = 2] = "UNCORRECT"; +})(UserQuestionState || (exports.UserQuestionState = UserQuestionState = {})); + +/***/ }), + +/***/ "fD61": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.22 Math.log2(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + + +/***/ }), + +/***/ "fGX8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyncPromise", function() { return SyncPromise; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rejectedSyncPromise", function() { return rejectedSyncPromise; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolvedSyncPromise", function() { return resolvedSyncPromise; }); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("99IF"); + + +/* eslint-disable @typescript-eslint/explicit-function-return-type */ + +/** SyncPromise internal states */ +var States; (function (States) { + /** Pending */ + const PENDING = 0; States[States["PENDING"] = PENDING] = "PENDING"; + /** Resolved / OK */ + const RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED"; + /** Rejected / Error */ + const REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED"; +})(States || (States = {})); + +// Overloads so we can call resolvedSyncPromise without arguments and generic argument + +/** + * Creates a resolved sync promise. + * + * @param value the value to resolve the promise with + * @returns the resolved sync promise + */ +function resolvedSyncPromise(value) { + return new SyncPromise(resolve => { + resolve(value); + }); +} + +/** + * Creates a rejected sync promise. + * + * @param value the value to reject the promise with + * @returns the rejected sync promise + */ +function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); +} + +/** + * Thenable class that behaves like a Promise and follows it's interface + * but is not async internally + */ +class SyncPromise { + __init() {this._state = States.PENDING;} + __init2() {this._handlers = [];} + + constructor( + executor, + ) {;SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);SyncPromise.prototype.__init5.call(this);SyncPromise.prototype.__init6.call(this); + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + + /** JSDoc */ + then( + onfulfilled, + onrejected, + ) { + return new SyncPromise((resolve, reject) => { + this._handlers.push([ + false, + result => { + if (!onfulfilled) { + // TODO: ¯\_(ツ)_/¯ + // TODO: FIXME + resolve(result ); + } else { + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + } + }, + reason => { + if (!onrejected) { + reject(reason); + } else { + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + }, + ]); + this._executeHandlers(); + }); + } + + /** JSDoc */ + catch( + onrejected, + ) { + return this.then(val => val, onrejected); + } + + /** JSDoc */ + finally(onfinally) { + return new SyncPromise((resolve, reject) => { + let val; + let isRejected; + + return this.then( + value => { + isRejected = false; + val = value; + if (onfinally) { + onfinally(); + } + }, + reason => { + isRejected = true; + val = reason; + if (onfinally) { + onfinally(); + } + }, + ).then(() => { + if (isRejected) { + reject(val); + return; + } + + resolve(val ); + }); + }); + } + + /** JSDoc */ + __init3() {this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + };} + + /** JSDoc */ + __init4() {this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + };} + + /** JSDoc */ + __init5() {this._setResult = (state, value) => { + if (this._state !== States.PENDING) { + return; + } + + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_0__["isThenable"])(value)) { + void (value ).then(this._resolve, this._reject); + return; + } + + this._state = state; + this._value = value; + + this._executeHandlers(); + };} + + /** JSDoc */ + __init6() {this._executeHandlers = () => { + if (this._state === States.PENDING) { + return; + } + + const cachedHandlers = this._handlers.slice(); + this._handlers = []; + + cachedHandlers.forEach(handler => { + if (handler[0]) { + return; + } + + if (this._state === States.RESOLVED) { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + handler[1](this._value ); + } + + if (this._state === States.REJECTED) { + handler[2](this._value); + } + + handler[0] = true; + }); + };} +} + + +//# sourceMappingURL=syncpromise.js.map + + +/***/ }), + +/***/ "fIGU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHorizontal", function() { return isHorizontal; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnchor", function() { return getAnchor; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("q3D2"); +/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("UHhX"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("pBYl"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("VHzf"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("V6W0"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("kjpz"); + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the root element if `variant="permanent or persistent"`. */ + docked: { + flex: '0 0 auto' + }, + + /* Styles applied to the `Paper` component. */ + paper: { + overflowY: 'auto', + display: 'flex', + flexDirection: 'column', + height: '100%', + flex: '1 0 auto', + zIndex: theme.zIndex.drawer, + WebkitOverflowScrolling: 'touch', + // Add iOS momentum scrolling. + // temporary style + position: 'fixed', + top: 0, + // We disable the focus ring for mouse, touch and keyboard users. + // At some point, it would be better to keep it for keyboard users. + // :focus-ring CSS pseudo-class will help. + outline: 0 + }, + + /* Styles applied to the `Paper` component if `anchor="left"`. */ + paperAnchorLeft: { + left: 0, + right: 'auto' + }, + + /* Styles applied to the `Paper` component if `anchor="right"`. */ + paperAnchorRight: { + left: 'auto', + right: 0 + }, + + /* Styles applied to the `Paper` component if `anchor="top"`. */ + paperAnchorTop: { + top: 0, + left: 0, + bottom: 'auto', + right: 0, + height: 'auto', + maxHeight: '100%' + }, + + /* Styles applied to the `Paper` component if `anchor="bottom"`. */ + paperAnchorBottom: { + top: 'auto', + left: 0, + bottom: 0, + right: 0, + height: 'auto', + maxHeight: '100%' + }, + + /* Styles applied to the `Paper` component if `anchor="left"` and `variant` is not "temporary". */ + paperAnchorDockedLeft: { + borderRight: "1px solid ".concat(theme.palette.divider) + }, + + /* Styles applied to the `Paper` component if `anchor="top"` and `variant` is not "temporary". */ + paperAnchorDockedTop: { + borderBottom: "1px solid ".concat(theme.palette.divider) + }, + + /* Styles applied to the `Paper` component if `anchor="right"` and `variant` is not "temporary". */ + paperAnchorDockedRight: { + borderLeft: "1px solid ".concat(theme.palette.divider) + }, + + /* Styles applied to the `Paper` component if `anchor="bottom"` and `variant` is not "temporary". */ + paperAnchorDockedBottom: { + borderTop: "1px solid ".concat(theme.palette.divider) + }, + + /* Styles applied to the `Modal` component. */ + modal: {} + }; +}; +var oppositeDirection = { + left: 'right', + right: 'left', + top: 'down', + bottom: 'up' +}; +function isHorizontal(anchor) { + return ['left', 'right'].indexOf(anchor) !== -1; +} +function getAnchor(theme, anchor) { + return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor; +} +var defaultTransitionDuration = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__["duration"].leavingScreen +}; +/** + * The props of the [Modal](/api/modal/) component are available + * when `variant="temporary"` is set. + */ + +var Drawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Drawer(props, ref) { + var _props$anchor = props.anchor, + anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor, + BackdropProps = props.BackdropProps, + children = props.children, + classes = props.classes, + className = props.className, + _props$elevation = props.elevation, + elevation = _props$elevation === void 0 ? 16 : _props$elevation, + _props$ModalProps = props.ModalProps; + _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps; + + var BackdropPropsProp = _props$ModalProps.BackdropProps, + ModalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_props$ModalProps, ["BackdropProps"]), + onClose = props.onClose, + _props$open = props.open, + open = _props$open === void 0 ? false : _props$open, + _props$PaperProps = props.PaperProps, + PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps, + SlideProps = props.SlideProps, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Slide__WEBPACK_IMPORTED_MODULE_8__["default"] : _props$TransitionComp, + _props$transitionDura = props.transitionDuration, + transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'temporary' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["anchor", "BackdropProps", "children", "classes", "className", "elevation", "ModalProps", "onClose", "open", "PaperProps", "SlideProps", "TransitionComponent", "transitionDuration", "variant"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_12__["default"])(); // Let's assume that the Drawer will always be rendered on user space. + // We use this state is order to skip the appear transition during the + // initial mount of the component. + + var mounted = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](false); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + mounted.current = true; + }, []); + var anchor = getAnchor(theme, anchorProp); + var drawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + elevation: variant === 'temporary' ? elevation : 0, + square: true + }, PaperProps, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.paper, classes["paperAnchor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(anchor))], PaperProps.className, variant !== 'temporary' && classes["paperAnchorDocked".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__["default"])(anchor))]) + }), children); + + if (variant === 'permanent') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.docked, className), + ref: ref + }, other), drawer); + } + + var slidingDrawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: open, + direction: oppositeDirection[anchor], + timeout: transitionDuration, + appear: mounted.current + }, SlideProps), drawer); + + if (variant === 'persistent') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.docked, className), + ref: ref + }, other), slidingDrawer); + } // variant === temporary + + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Modal__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, BackdropProps, BackdropPropsProp, { + transitionDuration: transitionDuration + }), + BackdropComponent: _Backdrop__WEBPACK_IMPORTED_MODULE_6__["default"], + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes.modal, className), + open: open, + onClose: onClose, + ref: ref + }, other, ModalProps), slidingDrawer); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiDrawer', + flip: false +})(Drawer)); + +/***/ }), + +/***/ "fL2G": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/email.svg` to regenerate; + +function SvgEmail(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M0 2.999A.998.998 0 011 2h14c.552 0 1 .443 1 .999V5L8 8 0 5V2.999zM0 7l8 3 8-3v7.003c0 .55-.445.997-1 .997H1c-.552 0-1-.453-1-.997V7z" + })); +} +var _default = SvgEmail; +exports.default = _default; + +/***/ }), + +/***/ "fNHd": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Month Helpers + * @summary Get the number of calendar months between the given dates. + * + * @description + * Get the number of calendar months between the given dates. + * + * @param {Date|String|Number} dateLeft - the later date + * @param {Date|String|Number} dateRight - the earlier date + * @returns {Number} the number of calendar months + * + * @example + * // How many calendar months are between 31 January 2014 and 1 September 2014? + * var result = differenceInCalendarMonths( + * new Date(2014, 8, 1), + * new Date(2014, 0, 31) + * ) + * //=> 8 + */ +function differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var dateRight = parse(dirtyDateRight) + + var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear() + var monthDiff = dateLeft.getMonth() - dateRight.getMonth() + + return yearDiff * 12 + monthDiff +} + +module.exports = differenceInCalendarMonths + + +/***/ }), + +/***/ "fO1A": +/***/ (function(module, exports) { + +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; + + +/***/ }), + +/***/ "fOHp": +/***/ (function(module, exports) { + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; + + +/***/ }), + +/***/ "fPEb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nFpy"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rDuK"); +/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3+Qv"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("VHzf"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("OY/u"); +/* harmony import */ var _ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("lsN8"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("9sWd"); + + + + + + + + + + + + + + +var styles = function styles(theme) { + var transition = { + duration: theme.transitions.duration.shortest + }; + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + transition: theme.transitions.create(['margin'], transition), + '&:before': { + position: 'absolute', + left: 0, + top: -1, + right: 0, + height: 1, + content: '""', + opacity: 1, + backgroundColor: theme.palette.divider, + transition: theme.transitions.create(['opacity', 'background-color'], transition) + }, + '&:first-child': { + '&:before': { + display: 'none' + } + }, + '&$expanded': { + margin: '16px 0', + '&:first-child': { + marginTop: 0 + }, + '&:last-child': { + marginBottom: 0 + }, + '&:before': { + opacity: 0 + } + }, + '&$expanded + &': { + '&:before': { + display: 'none' + } + }, + '&$disabled': { + backgroundColor: theme.palette.action.disabledBackground + } + }, + + /* Styles applied to the root element if `square={false}`. */ + rounded: { + borderRadius: 0, + '&:first-child': { + borderTopLeftRadius: theme.shape.borderRadius, + borderTopRightRadius: theme.shape.borderRadius + }, + '&:last-child': { + borderBottomLeftRadius: theme.shape.borderRadius, + borderBottomRightRadius: theme.shape.borderRadius, + // Fix a rendering issue on Edge + '@supports (-ms-ime-align: auto)': { + borderBottomLeftRadius: 0, + borderBottomRightRadius: 0 + } + } + }, + + /* Styles applied to the root element if `expanded={true}`. */ + expanded: {}, + + /* Styles applied to the root element if `disabled={true}`. */ + disabled: {} + }; +}; +var warnedOnce = false; +/** + * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention. + * + * You should use `import { Accordion } from '@material-ui/core'` + * or `import Accordion from '@material-ui/core/Accordion'`. + */ + +var ExpansionPanel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function ExpansionPanel(props, ref) { + if (false) {} + + var childrenProp = props.children, + classes = props.classes, + className = props.className, + _props$defaultExpande = props.defaultExpanded, + defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + expandedProp = props.expanded, + onChange = props.onChange, + _props$square = props.square, + square = _props$square === void 0 ? false : _props$square, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_9__["default"] : _props$TransitionComp, + TransitionProps = props.TransitionProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__["default"])(props, ["children", "classes", "className", "defaultExpanded", "disabled", "expanded", "onChange", "square", "TransitionComponent", "TransitionProps"]); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_13__["default"])({ + controlled: expandedProp, + default: defaultExpanded, + name: 'ExpansionPanel', + state: 'expanded' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_useControlled, 2), + expanded = _useControlled2[0], + setExpandedState = _useControlled2[1]; + + var handleChange = react__WEBPACK_IMPORTED_MODULE_4__["useCallback"](function (event) { + setExpandedState(!expanded); + + if (onChange) { + onChange(event, !expanded); + } + }, [expanded, onChange, setExpandedState]); + + var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_4__["Children"].toArray(childrenProp), + _React$Children$toArr2 = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_React$Children$toArr), + summary = _React$Children$toArr2[0], + children = _React$Children$toArr2.slice(1); + + var contextValue = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { + return { + expanded: expanded, + disabled: disabled, + toggle: handleChange + }; + }, [expanded, disabled, handleChange]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_10__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded), + ref: ref, + square: square + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_12__["default"].Provider, { + value: contextValue + }, summary), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: expanded, + timeout: "auto" + }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", { + "aria-labelledby": summary.props.id, + id: summary.props['aria-controls'], + role: "region" + }, children))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__["default"])(styles, { + name: 'MuiExpansionPanel' +})(ExpansionPanel)); + +/***/ }), + +/***/ "fQxh": +/***/ (function(module, exports) { + +var commonFormatterKeys = [ + 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd', + 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG', + 'H', 'HH', 'h', 'hh', 'm', 'mm', + 's', 'ss', 'S', 'SS', 'SSS', + 'Z', 'ZZ', 'X', 'x' +] + +function buildFormattingTokensRegExp (formatters) { + var formatterKeys = [] + for (var key in formatters) { + if (formatters.hasOwnProperty(key)) { + formatterKeys.push(key) + } + } + + var formattingTokens = commonFormatterKeys + .concat(formatterKeys) + .sort() + .reverse() + var formattingTokensRegExp = new RegExp( + '(\\[[^\\[]*\\])|(\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g' + ) + + return formattingTokensRegExp +} + +module.exports = buildFormattingTokensRegExp + + +/***/ }), + +/***/ "fWYq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return capitalize; }); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rDuK"); + +// It should to be noted that this function isn't equivalent to `text-transform: capitalize`. +// +// A strict capitalization should uppercase the first letter of each word a the sentence. +// We only handle the first word. +function capitalize(string) { + if (typeof string !== 'string') { + throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__["formatMuiErrorMessage"])(7)); + } + + return string.charAt(0).toUpperCase() + string.slice(1); +} + +/***/ }), + +/***/ "fY06": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hbca"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Typography__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "fZ9F": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _iterableToArrayLimit; }); +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; +} + +/***/ }), + +/***/ "fb/G": +/***/ (function(module, exports, __webpack_require__) { + +var baseFindKey = __webpack_require__("cY9H"), + baseForOwn = __webpack_require__("i91D"), + baseIteratee = __webpack_require__("JF7T"); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; + + +/***/ }), + +/***/ "fbfW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsConstant", function() { return wrapMapToPropsConstant; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDependsOnOwnProps", function() { return getDependsOnOwnProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsFunc", function() { return wrapMapToPropsFunc; }); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("D++w"); + +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. + +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// + +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (false) {} + return props; + }; + + return proxy; + }; +} + +/***/ }), + +/***/ "fj8j": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isExpiringSoon = exports.isExpired = exports.computeExpirationNoticeLink = exports.computeExpirationNoticeDate = exports.computeExpirationDate = exports.isExpiring = void 0; + +var _add = _interopRequireDefault(__webpack_require__("dW8k")); + +var _sub = _interopRequireDefault(__webpack_require__("IQ1l")); + +/** + * @typedef {import("../types").IOCozyFile} IOCozyFile + */ +var PERSONAL_SPORTING_LICENCE_PERIOD_DAYS = 365; +var PERSONAL_SPORTING_LICENCE_NOTICE_PERIOD_DAYS = 15; +var EXPIRATION_LINK_BY_LABEL = { + national_id_card: 'https://www.service-public.fr/particuliers/vosdroits/N358', + residence_permit: 'https://www.service-public.fr/particuliers/vosdroits/N110', + passport: 'https://www.service-public.fr/particuliers/vosdroits/N360', + driver_license: 'https://permisdeconduire.ants.gouv.fr/demarches-en-ligne/perte-vol-deterioration-fin-de-validite-ou-changement-d-etat-civil' +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if a given file is a national id card, is French, has an expiration date set and has a notice period set + */ + +var isExpiringFrenchNationalIdCard = function isExpiringFrenchNationalIdCard(file) { + var _file$metadata, _file$metadata$qualif, _file$metadata2, _file$metadata3, _file$metadata4; + + var label = (_file$metadata = file.metadata) === null || _file$metadata === void 0 ? void 0 : (_file$metadata$qualif = _file$metadata.qualification) === null || _file$metadata$qualif === void 0 ? void 0 : _file$metadata$qualif.label; + var country = (_file$metadata2 = file.metadata) === null || _file$metadata2 === void 0 ? void 0 : _file$metadata2.country; + var expirationDate = (_file$metadata3 = file.metadata) === null || _file$metadata3 === void 0 ? void 0 : _file$metadata3.expirationDate; + var noticePeriod = (_file$metadata4 = file.metadata) === null || _file$metadata4 === void 0 ? void 0 : _file$metadata4.noticePeriod; + + if (label === 'national_id_card' && (!country || country === 'fr') && expirationDate && noticePeriod) { + return true; + } + + return false; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if a given file has an expiration date set and a notice period set + */ + + +var isExpiringGeneric = function isExpiringGeneric(file) { + var _file$metadata5, _file$metadata6; + + var expirationDate = (_file$metadata5 = file.metadata) === null || _file$metadata5 === void 0 ? void 0 : _file$metadata5.expirationDate; + var noticePeriod = (_file$metadata6 = file.metadata) === null || _file$metadata6 === void 0 ? void 0 : _file$metadata6.noticePeriod; + + if (expirationDate && noticePeriod) { + return true; + } + + return false; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if a given file is a sporting license, has a reference date set or a creation date if not + */ + + +var isExpiringPersonalSportingLicense = function isExpiringPersonalSportingLicense(file) { + var _file$metadata7, _file$metadata7$quali, _file$metadata8; + + var label = (_file$metadata7 = file.metadata) === null || _file$metadata7 === void 0 ? void 0 : (_file$metadata7$quali = _file$metadata7.qualification) === null || _file$metadata7$quali === void 0 ? void 0 : _file$metadata7$quali.label; + var referencedDate = (_file$metadata8 = file.metadata) === null || _file$metadata8 === void 0 ? void 0 : _file$metadata8.referencedDate; + var created_at = file.created_at; + + if (label === 'personal_sporting_licence' && (referencedDate || created_at)) { + return true; + } + + return false; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if a given file matches one of the known types of expiring papers + */ + + +var isExpiring = function isExpiring(file) { + if (isExpiringFrenchNationalIdCard(file)) { + return true; + } + + if (isExpiringGeneric(file)) { + return true; + } + + if (isExpiringPersonalSportingLicense(file)) { + return true; + } + + return false; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {Date | null} Expiration date + * @description Computes et returns the expiration date of the given file, or null if it is not expiring + */ + + +exports.isExpiring = isExpiring; + +var computeExpirationDate = function computeExpirationDate(file) { + if (isExpiringFrenchNationalIdCard(file) || isExpiringGeneric(file)) { + var _file$metadata9; + + var expirationDate = (_file$metadata9 = file.metadata) === null || _file$metadata9 === void 0 ? void 0 : _file$metadata9.expirationDate; + return new Date(expirationDate); + } + + if (isExpiringPersonalSportingLicense(file)) { + var _file$metadata10; + + var referencedDate = (_file$metadata10 = file.metadata) === null || _file$metadata10 === void 0 ? void 0 : _file$metadata10.referencedDate; + var created_at = file.created_at; + return (0, _add.default)(new Date(referencedDate !== null && referencedDate !== void 0 ? referencedDate : created_at), { + days: PERSONAL_SPORTING_LICENCE_PERIOD_DAYS + }); + } + + return null; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {number | null} Expiration notice period in days + * @description Computes et returns the expiration notice period of the given file, or null if it is not expiring + */ + + +exports.computeExpirationDate = computeExpirationDate; + +var computeExpirationNoticePeriodInDays = function computeExpirationNoticePeriodInDays(file) { + if (isExpiringFrenchNationalIdCard(file) || isExpiringGeneric(file)) { + var _file$metadata11; + + var noticePeriodInDays = (_file$metadata11 = file.metadata) === null || _file$metadata11 === void 0 ? void 0 : _file$metadata11.noticePeriod; + return parseInt(noticePeriodInDays, 10); + } + + if (isExpiringPersonalSportingLicense(file)) { + return PERSONAL_SPORTING_LICENCE_NOTICE_PERIOD_DAYS; + } + + return null; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {Date | null} Expiration notice date + * @description Computes et returns the expiration notice date of the given file, or null if it is not expiring + */ + + +var computeExpirationNoticeDate = function computeExpirationNoticeDate(file) { + var expirationDate = computeExpirationDate(file); + + if (expirationDate == null) { + return null; + } + + var noticePeriodInDays = computeExpirationNoticePeriodInDays(file); + + if (noticePeriodInDays == null) { + return null; + } + + return (0, _sub.default)(expirationDate, { + days: noticePeriodInDays + }); +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {string | null} Expiration notice link + * @description Computes and returns the expiration notice link of the given file, or null if it has none + */ + + +exports.computeExpirationNoticeDate = computeExpirationNoticeDate; + +var computeExpirationNoticeLink = function computeExpirationNoticeLink(file) { + var _file$metadata12, _file$metadata12$qual; + + var qualificationLabel = (_file$metadata12 = file.metadata) === null || _file$metadata12 === void 0 ? void 0 : (_file$metadata12$qual = _file$metadata12.qualification) === null || _file$metadata12$qual === void 0 ? void 0 : _file$metadata12$qual.label; + if (!qualificationLabel) return null; + return EXPIRATION_LINK_BY_LABEL[qualificationLabel] || null; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if the given file is expiring and if today is after its expiration date + */ + + +exports.computeExpirationNoticeLink = computeExpirationNoticeLink; + +var isExpired = function isExpired(file) { + var now = new Date(); + var expirationDate = computeExpirationDate(file); + var isExpired = expirationDate != null && expirationDate <= now; + return isExpired; +}; +/** + * @param {IOCozyFile} file - io.cozy.files document + * @returns {boolean} + * @description Tells if the given file is expiring and if today is between its expiration notice date and its expiration date + */ + + +exports.isExpired = isExpired; + +var isExpiringSoon = function isExpiringSoon(file) { + var now = new Date(); + var expirationDate = computeExpirationDate(file); + var expirationNoticeDate = computeExpirationNoticeDate(file); + var isExpiringSoon = expirationDate != null && expirationNoticeDate != null && expirationNoticeDate <= now && now < expirationDate; + return isExpiringSoon; +}; + +exports.isExpiringSoon = isExpiringSoon; + +/***/ }), + +/***/ "flbY": +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__("EEoB"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; + + +/***/ }), + +/***/ "fpPt": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + padding: theme.spacing(1, 2, 2) + } + }; +}; +var warnedOnce = false; +/** + * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention. + * + * You should use `import { AccordionDetails } from '@material-ui/core'` + * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`. + */ + +var ExpansionPanelDetails = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ExpansionPanelDetails(props, ref) { + if (false) {} + + var classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiExpansionPanelDetails' +})(ExpansionPanelDetails)); + +/***/ }), + +/***/ "fpcP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Apollo", function() { return Apollo; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +/** Tracing integration for Apollo */ +class Apollo {constructor() { Apollo.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'Apollo';} + + /** + * @inheritDoc + */ + __init() {this.name = Apollo.id;} + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + const pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"]) + +('apollo-server-core'); + + if (!pkg) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Apollo Integration was unable to require apollo-server-core package.'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('Apollo Integration is skipped because of instrumenter configuration.'); + return; + } + + /** + * Iterate over resolvers of the ApolloServer instance before schemas are constructed. + */ + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig) { + return function () { + if (!this.config.resolvers) { + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + if (this.config.schema) { + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.', + ); + } else if (this.config.modules) { + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.', + ); + } + + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Skipping tracing as no resolvers found on the `ApolloServer` instance.'); + } + + return orig.call(this); + } + + const resolvers = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["arrayify"])(this.config.resolvers); + + this.config.resolvers = resolvers.map(model => { + Object.keys(model).forEach(resolverGroupName => { + Object.keys(model[resolverGroupName]).forEach(resolverName => { + if (typeof model[resolverGroupName][resolverName] !== 'function') { + return; + } + + wrapResolver(model, resolverGroupName, resolverName, getCurrentHub); + }); + }); + + return model; + }); + + return orig.call(this); + }; + }); + } +}Apollo.__initStatic(); + +/** + * Wrap a single resolver which can be a parent of other resolvers and/or db operations. + */ +function wrapResolver( + model, + resolverGroupName, + resolverName, + getCurrentHub, +) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(model[resolverGroupName], resolverName, function (orig) { + return function ( ...args) { + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ + description: `${resolverGroupName}.${resolverName}`, + op: 'graphql.resolve', + })]); + + const rv = orig.call(this, ...args); + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(rv)) { + return rv.then((res) => { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]); + return res; + }); + } + + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + + return rv; + }; + }); +} + + +//# sourceMappingURL=apollo.js.map + + +/***/ }), + +/***/ "frDN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__("Z6pf"); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var defaults = { + allowDots: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictNullHandling: false +}; + +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; + +var parseArrayValue = function (val, options) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { + return val.split(','); + } + + return val; +}; + +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') + +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; + + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } + + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); + } + + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } + + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options, valuesParsed); +}; + +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + + return { + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); + } + + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; + + +/***/ }), + +/***/ "fx5b": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("y9Ml"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.typography.body1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({ + minHeight: 48, + paddingTop: 6, + paddingBottom: 6, + boxSizing: 'border-box', + width: 'auto', + overflow: 'hidden', + whiteSpace: 'nowrap' + }, theme.breakpoints.up('sm'), { + minHeight: 'auto' + })), + // TODO v5: remove + + /* Styles applied to the root element if `disableGutters={false}`. */ + gutters: {}, + + /* Styles applied to the root element if `selected={true}`. */ + selected: {}, + + /* Styles applied to the root element if dense. */ + dense: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.typography.body2, { + minHeight: 'auto' + }) + }; +}; +var MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function MenuItem(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + component = _props$component === void 0 ? 'li' : _props$component, + _props$disableGutters = props.disableGutters, + disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, + ListItemClasses = props.ListItemClasses, + _props$role = props.role, + role = _props$role === void 0 ? 'menuitem' : _props$role, + selected = props.selected, + tabIndexProp = props.tabIndex, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["classes", "className", "component", "disableGutters", "ListItemClasses", "role", "selected", "tabIndex"]); + + var tabIndex; + + if (!props.disabled) { + tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_ListItem__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + button: true, + role: role, + tabIndex: tabIndex, + component: component, + selected: selected, + disableGutters: disableGutters, + classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({ + dense: classes.dense + }, ListItemClasses), + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className, selected && classes.selected, !disableGutters && classes.gutters), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiMenuItem' +})(MenuItem)); + +/***/ }), + +/***/ "fxkC": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("A6Uc") +var buildFormatLocale = __webpack_require__("+c4x") + +/** + * @category Locales + * @summary English locale. + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "fyVG": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + +/***/ }), + +/***/ "g01W": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TRIGGERS_DOCTYPE = void 0; +var TRIGGERS_DOCTYPE = 'io.cozy.triggers'; +exports.TRIGGERS_DOCTYPE = TRIGGERS_DOCTYPE; + +/***/ }), + +/***/ "g3eI": +/***/ (function(module, exports, __webpack_require__) { + +var _typeof = __webpack_require__("euUg")["default"]; + +var assertThisInitialized = __webpack_require__("J/YY"); + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + + return assertThisInitialized(self); +} + +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "g4Ul": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.user = exports.paper = exports.dacc = exports.sharing = exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0; + +var trigger = _interopRequireWildcard(__webpack_require__("Tso9")); + +exports.trigger = trigger; + +var instance = _interopRequireWildcard(__webpack_require__("vWU+")); + +exports.instance = instance; + +var applications = _interopRequireWildcard(__webpack_require__("4HHt")); + +exports.applications = applications; + +var file = _interopRequireWildcard(__webpack_require__("0nAg")); + +exports.file = file; + +var folder = _interopRequireWildcard(__webpack_require__("HbL2")); + +exports.folder = folder; + +var account = _interopRequireWildcard(__webpack_require__("V9T3")); + +exports.account = account; + +var note = _interopRequireWildcard(__webpack_require__("pgHW")); + +exports.note = note; + +var permission = _interopRequireWildcard(__webpack_require__("jOHY")); + +exports.permission = permission; + +var utils = _interopRequireWildcard(__webpack_require__("Ykzz")); + +exports.utils = utils; + +var contact = _interopRequireWildcard(__webpack_require__("DWnN")); + +exports.contact = contact; + +var document = _interopRequireWildcard(__webpack_require__("tIE6")); + +exports.document = document; + +var timeseries = _interopRequireWildcard(__webpack_require__("7yia")); + +exports.timeseries = timeseries; + +var sharing = _interopRequireWildcard(__webpack_require__("T3WX")); + +exports.sharing = sharing; + +var dacc = _interopRequireWildcard(__webpack_require__("QZGM")); + +exports.dacc = dacc; + +var paper = _interopRequireWildcard(__webpack_require__("fj8j")); + +exports.paper = paper; + +var user = _interopRequireWildcard(__webpack_require__("7MuN")); + +exports.user = user; +// For backward compatibility before 9.0.0 +var triggers = trigger; +exports.triggers = triggers; +var accounts = account; +exports.accounts = accounts; + +/***/ }), + +/***/ "g6ov": +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__("1del"), + isArray = __webpack_require__("8u9v"); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; + + +/***/ }), + +/***/ "g7S5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableHead__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("O/3r"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableHead__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "gBKU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makePromiseBuffer", function() { return makePromiseBuffer; }); +/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FSf8"); +/* harmony import */ var _syncpromise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fGX8"); + + + +/** + * Creates an new PromiseBuffer object with the specified limit + * @param limit max number of promises that can be stored in the buffer + */ +function makePromiseBuffer(limit) { + const buffer = []; + + function isReady() { + return limit === undefined || buffer.length < limit; + } + + /** + * Remove a promise from the queue. + * + * @param task Can be any PromiseLike<T> + * @returns Removed promise. + */ + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + + /** + * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment. + * + * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task: + * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor + * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By + * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer + * limit check. + * @returns The original promise. + */ + function add(taskProducer) { + if (!isReady()) { + return Object(_syncpromise_js__WEBPACK_IMPORTED_MODULE_1__["rejectedSyncPromise"])(new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('Not adding Promise because buffer limit was reached.')); + } + + // start the task and add its promise to the queue + const task = taskProducer(); + if (buffer.indexOf(task) === -1) { + buffer.push(task); + } + void task + .then(() => remove(task)) + // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike` + // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't + // have promises, so TS has to polyfill when down-compiling.) + .then(null, () => + remove(task).then(null, () => { + // We have to add another catch here because `remove()` starts a new promise chain. + }), + ); + return task; + } + + /** + * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or + * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to + * `true`. + * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and + * `false` otherwise + */ + function drain(timeout) { + return new _syncpromise_js__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"]((resolve, reject) => { + let counter = buffer.length; + + if (!counter) { + return resolve(true); + } + + // wait for `timeout` ms and then resolve to `false` (if not cancelled first) + const capturedSetTimeout = setTimeout(() => { + if (timeout && timeout > 0) { + resolve(false); + } + }, timeout); + + // if all promises resolve in time, cancel the timer and resolve to `true` + buffer.forEach(item => { + void Object(_syncpromise_js__WEBPACK_IMPORTED_MODULE_1__["resolvedSyncPromise"])(item).then(() => { + // eslint-disable-next-line no-plusplus + if (!--counter) { + clearTimeout(capturedSetTimeout); + resolve(true); + } + }, reject); + }); + }); + } + + return { + $: buffer, + add, + drain, + }; +} + + +//# sourceMappingURL=promisebuffer.js.map + + +/***/ }), + +/***/ "gFOj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; }); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MLyG"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); +} + +/***/ }), + +/***/ "gHE0": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("JAuI") +var buildFormatLocale = __webpack_require__("j1sQ") + +/** + * @category Locales + * @summary Romanian locale. + * @author Sergiu Munteanu [@jsergiu]{@link https://github.com/jsergiu} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "gJ74": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useTheme; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _ThemeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("q384"); + + +function useTheme() { + var theme = react__WEBPACK_IMPORTED_MODULE_0___default.a.useContext(_ThemeContext__WEBPACK_IMPORTED_MODULE_1__["default"]); + + if (false) {} + + return theme; +} + +/***/ }), + +/***/ "gOYI": +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__("GMq6"); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; + + +/***/ }), + +/***/ "gRKh": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Mostrar el menu lateral\",\"profile\":\"Perfil\",\"connectedDevices\":\"Aparatos conectados\",\"storage\":\"Espacio en el disco\",\"storage_phrase\":\"%{diskUsage} Go de %{diskQuota} Go\",\"view_offers\":\"Ver ofertas\",\"view_my_offer\":\"Mi oferta\",\"help\":\"Ayuda\",\"logout\":\"Desconectar\",\"soon\":\"pronto\",\"error_UnavailableStack\":\"Conexión a la stack imposible ( se agotó el tiempo para la conexión ).\",\"error_UnauthorizedStack\":\"Faltan algunos permisos, la aplicación no puede acceder a los recursos solicitados.\",\"no_apps\":\"No se han encontrado aplicaciones en su Cozy.\",\"menu\":{\"apps\":\"Aplicaciones\",\"settings\":\"Parámetros\",\"home_mobile\":\"Regresar a Inicio...\",\"home\":\"Regresar a Inicio\",\"home_title\":\"Inicio\"},\"Categories\":{\"cozy\":\"Aplicaciones Cozy\",\"partners\":\"Aplicaciones de asociados\",\"ptnb\":\"expPTNB\",\"others\":\"Otras aplicaciones\"},\"claudy\":{\"title\":\"¿Cómo utilizar su Cozy?\"},\"permsModal\":{\"title\":\"Acceder a su Cozy desde su aplicación\",\"description\":\"Autorizar a %{app} para mostrar sus aplicaciones Cozy en este aparato\",\"button\":\"Autorizar el acceso\"},\"comingSoon\":{\"store\":{\"title\":\"En breve, la aplicación Store estará disponible en su Cozy\",\"description\":\"Gracias a Cozy Store usted podrá instalar en su Cozy las aplicaciones que desee.\"}},\"banner\":{\"tos-updated\":{\"description\":\"Para cumplir con el RGPD, Cozy Cloud ha actualizado sus Condiciones de utilización que entraron en vigor desde el 25 de mayo de 2018.\",\"CTA\":\"Leerlo ahora\"}}}"); + +/***/ }), + +/***/ "gRM1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("9a3J"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ll/m"); + + +// A grid component using the following libs as inspiration. +// +// For the implementation: +// - https://getbootstrap.com/docs/4.3/layout/grid/ +// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css +// - https://github.com/roylee0704/react-flexbox-grid +// - https://material.angularjs.org/latest/layout/introduction +// +// Follow this flexbox Guide to better understand the underlying model: +// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/ + + + + + + +var SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; +var GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + +function generateGrid(globalStyles, theme, breakpoint) { + var styles = {}; + GRID_SIZES.forEach(function (size) { + var key = "grid-".concat(breakpoint, "-").concat(size); + + if (size === true) { + // For the auto layouting + styles[key] = { + flexBasis: 0, + flexGrow: 1, + maxWidth: '100%' + }; + return; + } + + if (size === 'auto') { + styles[key] = { + flexBasis: 'auto', + flexGrow: 0, + maxWidth: 'none' + }; + return; + } // Keep 7 significant numbers. + + + var width = "".concat(Math.round(size / 12 * 10e7) / 10e5, "%"); // Close to the bootstrap implementation: + // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41 + + styles[key] = { + flexBasis: width, + flexGrow: 0, + maxWidth: width + }; + }); // No need for a media query for the first size. + + if (breakpoint === 'xs') { + Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])(globalStyles, styles); + } else { + globalStyles[theme.breakpoints.up(breakpoint)] = styles; + } +} + +function getOffset(val) { + var div = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var parse = parseFloat(val); + return "".concat(parse / div).concat(String(val).replace(String(parse), '') || 'px'); +} + +function generateGutter(theme, breakpoint) { + var styles = {}; + SPACINGS.forEach(function (spacing) { + var themeSpacing = theme.spacing(spacing); + + if (themeSpacing === 0) { + return; + } + + styles["spacing-".concat(breakpoint, "-").concat(spacing)] = { + margin: "-".concat(getOffset(themeSpacing, 2)), + width: "calc(100% + ".concat(getOffset(themeSpacing), ")"), + '& > $item': { + padding: getOffset(themeSpacing, 2) + } + }; + }); + return styles; +} // Default CSS values +// flex: '0 1 auto', +// flexDirection: 'row', +// alignItems: 'flex-start', +// flexWrap: 'nowrap', +// justifyContent: 'flex-start', + + +var styles = function styles(theme) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the root element if `container={true}`. */ + container: { + boxSizing: 'border-box', + display: 'flex', + flexWrap: 'wrap', + width: '100%' + }, + + /* Styles applied to the root element if `item={true}`. */ + item: { + boxSizing: 'border-box', + margin: '0' // For instance, it's useful when used with a `figure` element. + + }, + + /* Styles applied to the root element if `zeroMinWidth={true}`. */ + zeroMinWidth: { + minWidth: 0 + }, + + /* Styles applied to the root element if `direction="column"`. */ + 'direction-xs-column': { + flexDirection: 'column' + }, + + /* Styles applied to the root element if `direction="column-reverse"`. */ + 'direction-xs-column-reverse': { + flexDirection: 'column-reverse' + }, + + /* Styles applied to the root element if `direction="row-reverse"`. */ + 'direction-xs-row-reverse': { + flexDirection: 'row-reverse' + }, + + /* Styles applied to the root element if `wrap="nowrap"`. */ + 'wrap-xs-nowrap': { + flexWrap: 'nowrap' + }, + + /* Styles applied to the root element if `wrap="reverse"`. */ + 'wrap-xs-wrap-reverse': { + flexWrap: 'wrap-reverse' + }, + + /* Styles applied to the root element if `alignItems="center"`. */ + 'align-items-xs-center': { + alignItems: 'center' + }, + + /* Styles applied to the root element if `alignItems="flex-start"`. */ + 'align-items-xs-flex-start': { + alignItems: 'flex-start' + }, + + /* Styles applied to the root element if `alignItems="flex-end"`. */ + 'align-items-xs-flex-end': { + alignItems: 'flex-end' + }, + + /* Styles applied to the root element if `alignItems="baseline"`. */ + 'align-items-xs-baseline': { + alignItems: 'baseline' + }, + + /* Styles applied to the root element if `alignContent="center"`. */ + 'align-content-xs-center': { + alignContent: 'center' + }, + + /* Styles applied to the root element if `alignContent="flex-start"`. */ + 'align-content-xs-flex-start': { + alignContent: 'flex-start' + }, + + /* Styles applied to the root element if `alignContent="flex-end"`. */ + 'align-content-xs-flex-end': { + alignContent: 'flex-end' + }, + + /* Styles applied to the root element if `alignContent="space-between"`. */ + 'align-content-xs-space-between': { + alignContent: 'space-between' + }, + + /* Styles applied to the root element if `alignContent="space-around"`. */ + 'align-content-xs-space-around': { + alignContent: 'space-around' + }, + + /* Styles applied to the root element if `justifyContent="center"`. */ + 'justify-content-xs-center': { + justifyContent: 'center' + }, + + /* Styles applied to the root element if `justifyContent="flex-end"`. */ + 'justify-content-xs-flex-end': { + justifyContent: 'flex-end' + }, + + /* Styles applied to the root element if `justifyContent="space-between"`. */ + 'justify-content-xs-space-between': { + justifyContent: 'space-between' + }, + + /* Styles applied to the root element if `justifyContent="space-around"`. */ + 'justify-content-xs-space-around': { + justifyContent: 'space-around' + }, + + /* Styles applied to the root element if `justifyContent="space-evenly"`. */ + 'justify-content-xs-space-evenly': { + justifyContent: 'space-evenly' + } + }, generateGutter(theme, 'xs'), theme.breakpoints.keys.reduce(function (accumulator, key) { + // Use side effect over immutability for better performance. + generateGrid(accumulator, theme, key); + return accumulator; + }, {})); +}; +var Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Grid(props, ref) { + var _props$alignContent = props.alignContent, + alignContent = _props$alignContent === void 0 ? 'stretch' : _props$alignContent, + _props$alignItems = props.alignItems, + alignItems = _props$alignItems === void 0 ? 'stretch' : _props$alignItems, + classes = props.classes, + classNameProp = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$container = props.container, + container = _props$container === void 0 ? false : _props$container, + _props$direction = props.direction, + direction = _props$direction === void 0 ? 'row' : _props$direction, + _props$item = props.item, + item = _props$item === void 0 ? false : _props$item, + justify = props.justify, + _props$justifyContent = props.justifyContent, + justifyContent = _props$justifyContent === void 0 ? 'flex-start' : _props$justifyContent, + _props$lg = props.lg, + lg = _props$lg === void 0 ? false : _props$lg, + _props$md = props.md, + md = _props$md === void 0 ? false : _props$md, + _props$sm = props.sm, + sm = _props$sm === void 0 ? false : _props$sm, + _props$spacing = props.spacing, + spacing = _props$spacing === void 0 ? 0 : _props$spacing, + _props$wrap = props.wrap, + wrap = _props$wrap === void 0 ? 'wrap' : _props$wrap, + _props$xl = props.xl, + xl = _props$xl === void 0 ? false : _props$xl, + _props$xs = props.xs, + xs = _props$xs === void 0 ? false : _props$xs, + _props$zeroMinWidth = props.zeroMinWidth, + zeroMinWidth = _props$zeroMinWidth === void 0 ? false : _props$zeroMinWidth, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["alignContent", "alignItems", "classes", "className", "component", "container", "direction", "item", "justify", "justifyContent", "lg", "md", "sm", "spacing", "wrap", "xl", "xs", "zeroMinWidth"]); + + var className = Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classNameProp, container && [classes.container, spacing !== 0 && classes["spacing-xs-".concat(String(spacing))]], item && classes.item, zeroMinWidth && classes.zeroMinWidth, direction !== 'row' && classes["direction-xs-".concat(String(direction))], wrap !== 'wrap' && classes["wrap-xs-".concat(String(wrap))], alignItems !== 'stretch' && classes["align-items-xs-".concat(String(alignItems))], alignContent !== 'stretch' && classes["align-content-xs-".concat(String(alignContent))], (justify || justifyContent) !== 'flex-start' && classes["justify-content-xs-".concat(String(justify || justifyContent))], xs !== false && classes["grid-xs-".concat(String(xs))], sm !== false && classes["grid-sm-".concat(String(sm))], md !== false && classes["grid-md-".concat(String(md))], lg !== false && classes["grid-lg-".concat(String(lg))], xl !== false && classes["grid-xl-".concat(String(xl))]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: className, + ref: ref + }, other)); +}); + false ? undefined : void 0; +var StyledGrid = Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiGrid' +})(Grid); + +if (false) { var requireProp; } + +/* harmony default export */ __webpack_exports__["default"] = (StyledGrid); + +/***/ }), + +/***/ "gU0J": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addContextToFrame", function() { return addContextToFrame; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addExceptionMechanism", function() { return addExceptionMechanism; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addExceptionTypeValue", function() { return addExceptionTypeValue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayify", function() { return arrayify; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkOrSetAlreadyCaught", function() { return checkOrSetAlreadyCaught; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEventDescription", function() { return getEventDescription; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSemver", function() { return parseSemver; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uuid4", function() { return uuid4; }); +/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pt+A"); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7UWH"); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7bZ2"); + + + + +/** + * UUID4 generator + * + * @returns string Generated UUID4. + */ +function uuid4() { + const gbl = _worldwide_js__WEBPACK_IMPORTED_MODULE_2__["GLOBAL_OBJ"] ; + const crypto = gbl.crypto || gbl.msCrypto; + + if (crypto && crypto.randomUUID) { + return crypto.randomUUID().replace(/-/g, ''); + } + + const getRandomByte = + crypto && crypto.getRandomValues ? () => crypto.getRandomValues(new Uint8Array(1))[0] : () => Math.random() * 16; + + // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 + // Concatenating the following numbers as strings results in '10000000100040008000100000000000' + return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c => + // eslint-disable-next-line no-bitwise + ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16), + ); +} + +function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : undefined; +} + +/** + * Extracts either message or type+value from an event that can be used for user-facing logs + * @returns event's description + */ +function getEventDescription(event) { + const { message, event_id: eventId } = event; + if (message) { + return message; + } + + const firstException = getFirstException(event); + if (firstException) { + if (firstException.type && firstException.value) { + return `${firstException.type}: ${firstException.value}`; + } + return firstException.type || firstException.value || eventId || '<unknown>'; + } + return eventId || '<unknown>'; +} + +/** + * Adds exception values, type and value to an synthetic Exception. + * @param event The event to modify. + * @param value Value of the exception. + * @param type Type of the exception. + * @hidden + */ +function addExceptionTypeValue(event, value, type) { + const exception = (event.exception = event.exception || {}); + const values = (exception.values = exception.values || []); + const firstException = (values[0] = values[0] || {}); + if (!firstException.value) { + firstException.value = value || ''; + } + if (!firstException.type) { + firstException.type = type || 'Error'; + } +} + +/** + * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed. + * + * @param event The event to modify. + * @param newMechanism Mechanism data to add to the event. + * @hidden + */ +function addExceptionMechanism(event, newMechanism) { + const firstException = getFirstException(event); + if (!firstException) { + return; + } + + const defaultMechanism = { type: 'generic', handled: true }; + const currentMechanism = firstException.mechanism; + firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; + + if (newMechanism && 'data' in newMechanism) { + const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } +} + +// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string +const SEMVER_REGEXP = + /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + +/** + * Represents Semantic Versioning object + */ + +/** + * Parses input into a SemVer interface + * @param input string representation of a semver version + */ +function parseSemver(input) { + const match = input.match(SEMVER_REGEXP) || []; + const major = parseInt(match[1], 10); + const minor = parseInt(match[2], 10); + const patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? undefined : major, + minor: isNaN(minor) ? undefined : minor, + patch: isNaN(patch) ? undefined : patch, + prerelease: match[4], + }; +} + +/** + * This function adds context (pre/post/line) lines to the provided frame + * + * @param lines string[] containing all lines + * @param frame StackFrame that will be mutated + * @param linesOfContext number of context lines we want to add pre/post + */ +function addContextToFrame(lines, frame, linesOfContext = 5) { + const lineno = frame.lineno || 0; + const maxLines = lines.length; + const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); + + frame.pre_context = lines + .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) + .map((line) => Object(_string_js__WEBPACK_IMPORTED_MODULE_1__["snipLine"])(line, 0)); + + frame.context_line = Object(_string_js__WEBPACK_IMPORTED_MODULE_1__["snipLine"])(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); + + frame.post_context = lines + .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) + .map((line) => Object(_string_js__WEBPACK_IMPORTED_MODULE_1__["snipLine"])(line, 0)); +} + +/** + * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object + * in question), and marks it captured if not. + * + * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and + * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so + * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because + * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not + * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This + * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we + * see it. + * + * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on + * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent + * object wrapper forms so that this check will always work. However, because we need to flag the exact object which + * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification + * must be done before the exception captured. + * + * @param A thrown exception to check or flag as having been seen + * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen) + */ +function checkOrSetAlreadyCaught(exception) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (exception && (exception ).__sentry_captured__) { + return true; + } + + try { + // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the + // `ExtraErrorData` integration + Object(_object_js__WEBPACK_IMPORTED_MODULE_0__["addNonEnumerableProperty"])(exception , '__sentry_captured__', true); + } catch (err) { + // `exception` is a primitive, so we can't mark it seen + } + + return false; +} + +/** + * Checks whether the given input is already an array, and if it isn't, wraps it in one. + * + * @param maybeArray Input to turn into an array, if necessary + * @returns The input, if already an array, or an array with the input as the only element, if not + */ +function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; +} + + +//# sourceMappingURL=misc.js.map + + +/***/ }), + +/***/ "gYS1": +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__("wWEB"); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; + + +/***/ }), + +/***/ "gal2": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.nativeLinkOpen = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _plugins = __webpack_require__("e7+3"); + +var nativeLinkOpen = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { + var url, target, options; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + url = _ref.url; + _context.next = 3; + return (0, _plugins.hasSafariPlugin)(); + + case 3: + _context.t0 = _context.sent; + + if (!_context.t0) { + _context.next = 6; + break; + } + + _context.t0 = window.SafariViewController; + + case 6: + if (!_context.t0) { + _context.next = 10; + break; + } + + window.SafariViewController.show({ + url: url, + transition: 'curl' + }, function (result) { + if (result.event === 'closed') { + window.SafariViewController.hide(); + } + }, function () { + window.SafariViewController.hide(); + }); + _context.next = 11; + break; + + case 10: + if ((0, _plugins.hasInAppBrowserPlugin)()) { + target = '_blank'; + options = 'clearcache=yes,zoom=no'; + window.cordova.InAppBrowser.open(url, target, options); + } else { + window.location = url; + } + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function nativeLinkOpen(_x) { + return _ref2.apply(this, arguments); + }; +}(); + +exports.nativeLinkOpen = nativeLinkOpen; + +/***/ }), + +/***/ "gbaz": +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__("iwVW"); + +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); +} + +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "gc+w": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setContent", function() { return setContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsetContent", function() { return unsetContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return setLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchApps", function() { return fetchApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfos", function() { return setInfos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchSettingsData", function() { return fetchSettingsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logOut", function() { return logOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchContext", function() { return fetchContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContent", function() { return getContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocale", function() { return getLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return getTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getApps", function() { return getApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHomeApp", function() { return getHomeApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingApps", function() { return isFetchingApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCurrentApp", function() { return isCurrentApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasFetched", function() { return hasFetched; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStorageData", function() { return getStorageData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingsAppURL", function() { return getSettingsAppURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSettingsBusy", function() { return isSettingsBusy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingSettings", function() { return isFetchingSettings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHelpLink", function() { return getHelpLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClaudyActions", function() { return getClaudyActions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldEnableClaudy", function() { return shouldEnableClaudy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWebviewContext", function() { return getWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRealtimeCreate", function() { return onRealtimeCreate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRealtimeDelete", function() { return onRealtimeDelete; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducers", function() { return reducers; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("iNHL"); +/* harmony import */ var _content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/mIL"); +/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("iAYT"); +/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("52+2"); +/* harmony import */ var _unserializable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("WLqI"); +/* harmony import */ var _apps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("a8Zm"); +/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("oEaH"); +/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("tlql"); + + + + + + + + + +var proxy = function proxy(attr, method) { + return function (state) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return method.apply(void 0, [state[attr]].concat(args)); + }; +}; + +var setContent = _content__WEBPACK_IMPORTED_MODULE_1__["setContent"]; +var unsetContent = _content__WEBPACK_IMPORTED_MODULE_1__["unsetContent"]; +var setLocale = _locale__WEBPACK_IMPORTED_MODULE_2__["setLocale"]; +var setTheme = _theme__WEBPACK_IMPORTED_MODULE_3__["setTheme"]; +var setWebviewContext = _unserializable__WEBPACK_IMPORTED_MODULE_4__["setWebviewContext"]; +var fetchApps = _apps__WEBPACK_IMPORTED_MODULE_5__["fetchApps"]; +var setInfos = _apps__WEBPACK_IMPORTED_MODULE_5__["setInfos"]; +var fetchSettingsData = _settings__WEBPACK_IMPORTED_MODULE_6__["fetchSettingsData"]; +var logOut = _settings__WEBPACK_IMPORTED_MODULE_6__["logOut"]; +var fetchContext = _context__WEBPACK_IMPORTED_MODULE_7__["fetchContext"]; + +var getContent = proxy('content', _content__WEBPACK_IMPORTED_MODULE_1__["getContent"]); +var getLocale = proxy('locale', _locale__WEBPACK_IMPORTED_MODULE_2__["getLocale"]); +var getTheme = proxy('theme', _theme__WEBPACK_IMPORTED_MODULE_3__["getTheme"]); +var getApps = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["getApps"]); +var getHomeApp = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["getHomeApp"]); +var isFetchingApps = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["isFetchingApps"]); +var isCurrentApp = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["isCurrentApp"]); +var hasFetched = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["hasFetched"]); +var getStorageData = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["getStorageData"]); +var getSettingsAppURL = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["getSettingsAppURL"]); +var isSettingsBusy = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["isSettingsBusy"]); +var isFetchingSettings = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["isFetchingSettings"]); +var getHelpLink = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["getHelpLink"]); +var getClaudyActions = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["getClaudyActions"]); +var shouldEnableClaudy = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["shouldEnableClaudy"]); +var getWebviewContext = proxy('unserializable', _unserializable__WEBPACK_IMPORTED_MODULE_4__["getWebviewContext"]); // realtime handlers + +var onRealtimeCreate = _apps__WEBPACK_IMPORTED_MODULE_5__["receiveApp"]; +var onRealtimeDelete = _apps__WEBPACK_IMPORTED_MODULE_5__["deleteApp"]; +var reducers = { + apps: _apps__WEBPACK_IMPORTED_MODULE_5__["default"], + content: _content__WEBPACK_IMPORTED_MODULE_1__["reducer"], + context: _context__WEBPACK_IMPORTED_MODULE_7__["default"], + locale: _locale__WEBPACK_IMPORTED_MODULE_2__["reducer"], + settings: _settings__WEBPACK_IMPORTED_MODULE_6__["default"], + theme: _theme__WEBPACK_IMPORTED_MODULE_3__["reducer"], + unserializable: _unserializable__WEBPACK_IMPORTED_MODULE_4__["reducer"] +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(redux__WEBPACK_IMPORTED_MODULE_0__["combineReducers"])(reducers)); + +/***/ }), + +/***/ "ggwg": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("DjJv")(false); +// Module +exports.push([module.i, "/** BLACK **/\n/** RED **/\n/** YELLOW **/\n/** ORANGE **/\n/** BLUE **/\n/** GREEN **/\n/** WHITE **/\n/** GREY **/\n/** App colors **/\n/** TABS GRADIENT **/\n/** SCROLLBAR **/\n.unsubscribe-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n max-width: 450px;\n margin: auto;\n padding: 2rem;\n text-align: center;\n}\n.unsubscribe-container .head {\n color: #e3b82a;\n}\n.unsubscribe-container .question {\n color: #ffffff;\n}", ""]); + + + +/***/ }), + +/***/ "gis9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z" +}), 'KeyboardArrowLeft')); + +/***/ }), + +/***/ "gjWG": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("XdYc"); +module.exports = __webpack_require__("WSXa").Array.includes; + + +/***/ }), + +/***/ "gl4Q": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $at = __webpack_require__("dw92")(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + + +/***/ }), + +/***/ "goLa": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "gr/X": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Zoom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Ix7K"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Zoom__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "gsPm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131; +if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")} +function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H; +exports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n}; +exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1}; +exports.typeOf=y; + + +/***/ }), + +/***/ "gw87": +/***/ (function(module, exports) { + +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."); +} + +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "gwok": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleFunction", function() { return styleFunction; }); +/* harmony import */ var _material_ui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XsxL"); +/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("blYM"); + + +var styleFunction = Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__["styleFunctionSx"])(Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__["compose"])(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__["borders"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["display"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["flexbox"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["grid"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["positions"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["palette"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["shadows"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["sizing"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["spacing"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__["typography"])); +/** + * @ignore - do not document. + */ + +var Box = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_1__["default"])('div')(styleFunction, { + name: 'MuiBox' +}); +/* harmony default export */ __webpack_exports__["default"] = (Box); + +/***/ }), + +/***/ "gzBq": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), + +/***/ "h+8B": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ "h/ey": +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__("Jz0u")('meta'); +var isObject = __webpack_require__("pFmr"); +var has = __webpack_require__("00OQ"); +var setDesc = __webpack_require__("GwHQ").f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__("enc5")(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), + +/***/ "h/ya": +/***/ (function(module) { + +module.exports = JSON.parse("{\"qualifications\":[{\"label\":\"identity_photo\",\"purpose\":\"attestation\",\"subjects\":[\"identity\"]},{\"label\":\"national_id_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"passport\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"residence_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"immigration\",\"subjects\":[\"permit\",\"identity\"]},{\"label\":\"family_record_book\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"birth_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\",\"family\"]},{\"label\":\"driver_license\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"permit\",\"driving\"]},{\"label\":\"other_identity_document\",\"purpose\":\"attestation\",\"subjects\":[\"identity\"]},{\"label\":\"wedding\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"pacs\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"divorce\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"large_family_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"transport\",\"subjects\":[\"right\"]},{\"label\":\"caf\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"family\",\"subjects\":[\"right\"]},{\"label\":\"other_family_document\",\"subjects\":[\"family\"]},{\"label\":\"diploma\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"achievement\"]},{\"label\":\"work_contract\",\"purpose\":\"contract\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"employment\"]},{\"label\":\"pay_sheet\",\"purpose\":\"attestation\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"revenues\"]},{\"label\":\"fidelity_card\",\"sourceCategory\":\"shopping\"},{\"label\":\"library_card\",\"sourceCategory\":\"individual\"},{\"label\":\"single_parent_benefit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"family\",\"subjects\":[\"revenues\"]},{\"label\":\"transport_card\",\"sourceCategory\":\"transport\",\"subjects\":[\"vehicule\"]},{\"label\":\"electoral_card\",\"sourceCategory\":\"gov\"},{\"label\":\"employment_center_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"employment\"]},{\"label\":\"unemployment_benefit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"pension\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"other_revenue\",\"purpose\":\"attestation\",\"subjects\":[\"revenues\"]},{\"label\":\"gradebook\",\"purpose\":\"report\",\"sourceCategory\":\"education\",\"subjects\":[\"history\"]},{\"label\":\"student_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"identity\",\"right\",\"employment\",\"education\"]},{\"label\":\"resume\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"motivation_letter\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"other_work_document\",\"purpose\":\"employment\"},{\"label\":\"health_book\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"capacity\",\"vaccine\"]},{\"label\":\"health_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"capacity\",\"vaccine\"]},{\"label\":\"pregnancy_medical_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"pregnancy\"]},{\"label\":\"work_disability_recognition\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"right\"]},{\"label\":\"national_health_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"national_health_insurance_right_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"health\",\"subjects\":[\"right\",\"insurance\"]},{\"label\":\"health_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"prescription\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"right\",\"medecine\"]},{\"label\":\"health_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"health\"},{\"label\":\"other_health_document\",\"subjects\":[\"health\"]},{\"label\":\"vehicle_registration\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"vehicule\",\"identity\",\"right\"]},{\"label\":\"car_insurance\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"insurance\",\"car\"]},{\"label\":\"mechanic_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"transport_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"other_transport_document\",\"sourceCategory\":\"transport\"},{\"label\":\"house_sale_agreeement\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"real_estate_tax\",\"purpose\":\"invoice\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"tax\",\"house\"]},{\"label\":\"building_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"permit\",\"house\"]},{\"label\":\"technical_diagnostic_record\",\"purpose\":\"report\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"compliance\",\"house\"]},{\"label\":\"lease\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"rent_receipt\",\"purpose\":\"invoice\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"house_insurance\",\"purpose\":\"contract\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"insurance\",\"house\"]},{\"label\":\"work_quote\",\"purpose\":\"description\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"work_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"other_house_document\",\"subjects\":[\"house\"]},{\"label\":\"phone_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"mobile\"},{\"label\":\"isp_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"internet\",\"subjects\":[\"subscription\"]},{\"label\":\"telecom_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\"},{\"label\":\"energy_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"energy\"},{\"label\":\"water_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"water\"},{\"label\":\"energy_contract\",\"purpose\":\"contract\",\"sourceCategory\":\"energy\"},{\"label\":\"appliance_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"retail\"},{\"label\":\"web_service_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"web\"},{\"label\":\"restaurant_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"alimentation\"},{\"label\":\"grocery_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"shopping\"},{\"label\":\"other_invoice\",\"purpose\":\"invoice\"},{\"label\":\"tax_return\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_notice\",\"purpose\":\"invoice\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_timetable\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"other_tax_document\",\"subjects\":[\"tax\"]},{\"label\":\"bank_details\",\"purpose\":\"attestation\",\"sourceCategory\":\"bank\",\"subjects\":[\"bank_account\"]},{\"label\":\"bank_statement\",\"purpose\":\"report\",\"sourceCategory\":\"bank\",\"subjects\":[\"history\"]},{\"label\":\"loan_agreement\",\"purpose\":\"contract\",\"sourceCategory\":\"bank\"},{\"label\":\"other_bank_document\",\"sourceCategory\":\"bank\"},{\"label\":\"receipt\",\"purpose\":\"report\"},{\"label\":\"payment_proof_family_allowance\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"subvention\"]},{\"label\":\"school_attendance_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"identity\",\"right\",\"education\"]},{\"label\":\"school_insurance_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"education\",\"insurance\"]},{\"label\":\"unfit_for_habitation_declaration\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"compliance\"]},{\"label\":\"accommodation_proof\",\"purpose\":\"attestation\",\"sourceCategory\":\"individual\",\"subjects\":[\"address\"]},{\"label\":\"citizen_registration_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"achievement\",\"education\"]},{\"label\":\"personal_sporting_licence\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"sport\",\"subjects\":[\"permit\",\"invoice\"]},{\"label\":\"other_activity_document\",\"sourceSubCategory\":\"sport\",\"subjects\":[\"permit\",\"invoice\"]},{\"label\":\"other_administrative_document\"},{\"label\":\"note_identity_document\"},{\"label\":\"note_family_document\"},{\"label\":\"note_work_document\"},{\"label\":\"note_health_document\"},{\"label\":\"note_house_document\"},{\"label\":\"note_transport_document\"},{\"label\":\"note_activity_document\"},{\"label\":\"note_finance\"},{\"label\":\"note_invoice\"}],\"purposeKnownValues\":[\"attestation\",\"contract\",\"invoice\",\"report\",\"description\",\"evaluation\",\"employment\"],\"sourceCategoryKnownValues\":[\"bank\",\"insurance\",\"retail\",\"telecom\",\"energy\",\"water\",\"health\",\"gov\",\"association\",\"education\",\"employer\",\"transport\",\"goods\",\"alimentation\",\"building\",\"real_estate\",\"web\",\"individual\",\"shopping\"],\"sourceSubCategoryKnownValues\":[\"civil_registration\",\"immigration\",\"transport\",\"family\",\"tax\",\"health\",\"real_estate\",\"mobile\",\"internet\",\"citizen\",\"sport\"],\"subjectsKnownValues\":[\"identity\",\"permit\",\"family\",\"address\",\"driving\",\"right\",\"subvention\",\"achievement\",\"degree\",\"work\",\"employment\",\"revenues\",\"history\",\"insurance\",\"medical_act\",\"vehicule\",\"car\",\"moto\",\"truck\",\"boat\",\"subscription\",\"buy/sale\",\"house\",\"compliance\",\"building\",\"food\",\"real_estate\",\"tax\",\"address\",\"education\",\"statement\",\"course\",\"internet\",\"phone\",\"vaccine\",\"capacity\",\"health\",\"drugs\",\"child\",\"pregnancy\",\"bank_account\"]}"); + +/***/ }), + +/***/ "h3bs": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function sign(number) { + return number >= 0 ? 1 : -1; +}; + + +/***/ }), + +/***/ "h7EV": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['яну', 'фев', 'мар', 'апр', 'май', 'юни', 'юли', 'авг', 'сеп', 'окт', 'ное', 'дек'] + var monthsFull = ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември'] + var weekdays2char = ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'] + var weekdays3char = ['нед', 'пон', 'вто', 'сря', 'чет', 'пет', 'съб'] + var weekdaysFull = ['неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота'] + var meridiem = ['сутринта', 'на обяд', 'следобед', 'вечерта'] + + var timeOfDay = function (date) { + var hours = date.getHours() + if (hours >= 4 && hours < 12) { + return meridiem[0] + } else if (hours >= 12 && hours < 14) { + return meridiem[1] + } else if (hours >= 14 && hours < 17) { + return meridiem[2] + } else { + return meridiem[3] + } + } + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': timeOfDay, + + // am, pm + 'a': timeOfDay, + + // a.m., p.m. + 'aa': timeOfDay + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var rem100 = number % 100 + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + '-ви' + case 2: + return number + '-ри' + } + } + return number + '-и' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "h7wD": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'manje od sekunde', + other: 'manje od {{count}} sekundi' + }, + + xSeconds: { + one: '1 sekund', + other: '{{count}} sekunde' + }, + + halfAMinute: 'pola minuta', + + lessThanXMinutes: { + one: 'manje od minute', + other: 'manje od {{count}} minuta' + }, + + xMinutes: { + one: '1 minut', + other: '{{count}} minute' + }, + + aboutXHours: { + one: 'oko 1 sat', + other: 'oko {{count}} sata' + }, + + xHours: { + one: '1 sat', + other: '{{count}} sati' + }, + + xDays: { + one: '1 dan', + other: '{{count}} dani' + }, + + aboutXMonths: { + one: 'oko 1 mesec', + other: 'oko {{count}} meseca' + }, + + xMonths: { + one: '1 mesec', + other: '{{count}} meseci' + }, + + aboutXYears: { + one: 'oko 1 godine', + other: 'oko {{count}} godina' + }, + + xYears: { + one: '1 godina', + other: '{{count}} godine' + }, + + overXYears: { + one: 'više od 1 godine', + other: 'više od {{count}} godina' + }, + + almostXYears: { + one: 'skoro 1 godinu', + other: 'skoro {{count}} godina' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'za ' + result + } else { + return result + ' pre' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "h99T": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__("V+ek")('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + + +/***/ }), + +/***/ "hDBM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__("7i6R"); + +var zeroWidthSpace = '\u200b'; +var mongolianVowelSeparator = '\u180E'; + +module.exports = function getPolyfill() { + if ( + String.prototype.trim + && zeroWidthSpace.trim() === zeroWidthSpace + && mongolianVowelSeparator.trim() === mongolianVowelSeparator + && ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator) + && (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_') + ) { + return String.prototype.trim; + } + return implementation; +}; + + +/***/ }), + +/***/ "hGls": +/***/ (function(module, exports) { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; + + +/***/ }), + +/***/ "hHTF": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); +var _core = __webpack_require__("rMFn"); +var Sentry = _interopRequireWildcard(__webpack_require__("5QCN")); +var _CHALLENGE = _interopRequireDefault(__webpack_require__("bWtM")); +var _StyledIcon = _interopRequireDefault(__webpack_require__("VP3k")); +var _Loader = _interopRequireDefault(__webpack_require__("6oIw")); +var _cozyClient = __webpack_require__("xEu0"); +var _I18n = __webpack_require__("nUfk"); +var _react2 = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _profile = _interopRequireDefault(__webpack_require__("uCkj")); +__webpack_require__("kilN"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +var Unsubscribe = function Unsubscribe() { + var _useI18n = (0, _I18n.useI18n)(), + t = _useI18n.t; + var client = (0, _cozyClient.useClient)(); + var _useState = (0, _react2.useState)(true), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + isLoading = _useState2[0], + setIsLoading = _useState2[1]; + var _useState3 = (0, _react2.useState)(), + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), + status = _useState4[0], + setStatus = _useState4[1]; + var profileService = (0, _react2.useMemo)(function () { + return new _profile.default(client); + }, [client]); + var updateSubscription = (0, _react2.useCallback)(function (value) { + setIsLoading(true); + profileService.updateProfile({ + sendAnalysisNotification: value + }).then(function () { + setStatus(value ? 'subscribed' : 'unsubscribed'); + }).catch(function (err) { + setStatus('error'); + console.error(err); + Sentry.captureException('Failed to unsubscribe'); + }).finally(function () { + setIsLoading(false); + }); + }, [profileService]); + (0, _react2.useEffect)(function () { + updateSubscription(false); + }, [updateSubscription]); + return /*#__PURE__*/_react2.default.createElement("div", { + className: "unsubscribe-container" + }, isLoading && /*#__PURE__*/_react2.default.createElement(_Loader.default, null), !isLoading && /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement(_StyledIcon.default, { + className: "profile-icon", + icon: _CHALLENGE.default, + size: 250 + }), /*#__PURE__*/_react2.default.createElement("div", { + className: "text-20-bold head" + }, t("unsubscribe.".concat(status))), status === 'unsubscribed' && /*#__PURE__*/_react2.default.createElement("div", { + className: "text-16-normal question" + }, t('unsubscribe.content')), status !== 'subscribed' && status !== 'error' && /*#__PURE__*/_react2.default.createElement(_core.Button, { + className: "btnPrimary", + onClick: function onClick() { + return updateSubscription(true); + } + }, t('unsubscribe.button_subscribe')), /*#__PURE__*/_react2.default.createElement(_core.Button, { + className: "btnSecondary", + onClick: function onClick() { + return window.location.replace('/'); + } + }, t('unsubscribe.button_home')))); +}; +var _default = Unsubscribe; +exports.default = _default; + +/***/ }), + +/***/ "hIBh": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"), + root = __webpack_require__("GMq6"); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; + + +/***/ }), + +/***/ "hJxD": +/***/ (function(module, exports, __webpack_require__) { + +// TODO(Babel 8): Remove this file. + +var runtime = __webpack_require__("0E3h")(); +module.exports = runtime; + +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + if (typeof globalThis === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} + + +/***/ }), + +/***/ "hMBH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _BottomNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ulpC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _BottomNavigation__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "hO0W": +/***/ (function(module, exports) { + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "hSCZ": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = __webpack_require__("GwHQ"); +var $export = __webpack_require__("LRPZ"); +var anObject = __webpack_require__("eckd"); +var toPrimitive = __webpack_require__("Tven"); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * __webpack_require__("enc5")(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + + +/***/ }), + +/***/ "hY2D": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("zWJc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _styled__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "hbca": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fWYq"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + margin: 0 + }, + + /* Styles applied to the root element if `variant="body2"`. */ + body2: theme.typography.body2, + + /* Styles applied to the root element if `variant="body1"`. */ + body1: theme.typography.body1, + + /* Styles applied to the root element if `variant="caption"`. */ + caption: theme.typography.caption, + + /* Styles applied to the root element if `variant="button"`. */ + button: theme.typography.button, + + /* Styles applied to the root element if `variant="h1"`. */ + h1: theme.typography.h1, + + /* Styles applied to the root element if `variant="h2"`. */ + h2: theme.typography.h2, + + /* Styles applied to the root element if `variant="h3"`. */ + h3: theme.typography.h3, + + /* Styles applied to the root element if `variant="h4"`. */ + h4: theme.typography.h4, + + /* Styles applied to the root element if `variant="h5"`. */ + h5: theme.typography.h5, + + /* Styles applied to the root element if `variant="h6"`. */ + h6: theme.typography.h6, + + /* Styles applied to the root element if `variant="subtitle1"`. */ + subtitle1: theme.typography.subtitle1, + + /* Styles applied to the root element if `variant="subtitle2"`. */ + subtitle2: theme.typography.subtitle2, + + /* Styles applied to the root element if `variant="overline"`. */ + overline: theme.typography.overline, + + /* Styles applied to the root element if `variant="srOnly"`. Only accessible to screen readers. */ + srOnly: { + position: 'absolute', + height: 1, + width: 1, + overflow: 'hidden' + }, + + /* Styles applied to the root element if `align="left"`. */ + alignLeft: { + textAlign: 'left' + }, + + /* Styles applied to the root element if `align="center"`. */ + alignCenter: { + textAlign: 'center' + }, + + /* Styles applied to the root element if `align="right"`. */ + alignRight: { + textAlign: 'right' + }, + + /* Styles applied to the root element if `align="justify"`. */ + alignJustify: { + textAlign: 'justify' + }, + + /* Styles applied to the root element if `nowrap={true}`. */ + noWrap: { + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the root element if `gutterBottom={true}`. */ + gutterBottom: { + marginBottom: '0.35em' + }, + + /* Styles applied to the root element if `paragraph={true}`. */ + paragraph: { + marginBottom: 16 + }, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit' + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main + }, + + /* Styles applied to the root element if `color="textPrimary"`. */ + colorTextPrimary: { + color: theme.palette.text.primary + }, + + /* Styles applied to the root element if `color="textSecondary"`. */ + colorTextSecondary: { + color: theme.palette.text.secondary + }, + + /* Styles applied to the root element if `color="error"`. */ + colorError: { + color: theme.palette.error.main + }, + + /* Styles applied to the root element if `display="inline"`. */ + displayInline: { + display: 'inline' + }, + + /* Styles applied to the root element if `display="block"`. */ + displayBlock: { + display: 'block' + } + }; +}; +var defaultVariantMapping = { + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + subtitle1: 'h6', + subtitle2: 'h6', + body1: 'p', + body2: 'p' +}; +var Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Typography(props, ref) { + var _props$align = props.align, + align = _props$align === void 0 ? 'inherit' : _props$align, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'initial' : _props$color, + component = props.component, + _props$display = props.display, + display = _props$display === void 0 ? 'initial' : _props$display, + _props$gutterBottom = props.gutterBottom, + gutterBottom = _props$gutterBottom === void 0 ? false : _props$gutterBottom, + _props$noWrap = props.noWrap, + noWrap = _props$noWrap === void 0 ? false : _props$noWrap, + _props$paragraph = props.paragraph, + paragraph = _props$paragraph === void 0 ? false : _props$paragraph, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'body1' : _props$variant, + _props$variantMapping = props.variantMapping, + variantMapping = _props$variantMapping === void 0 ? defaultVariantMapping : _props$variantMapping, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["align", "classes", "className", "color", "component", "display", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"]); + + var Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span'; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, variant !== 'inherit' && classes[variant], color !== 'initial' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(color))], noWrap && classes.noWrap, gutterBottom && classes.gutterBottom, paragraph && classes.paragraph, align !== 'inherit' && classes["align".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(align))], display !== 'initial' && classes["display".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__["default"])(display))]), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTypography' +})(Typography)); + +/***/ }), + +/***/ "helD": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _react = __webpack_require__("ivGQ"); + +// @ts-nocheck +var useIsMounted = function useIsMounted() { + var mounted = (0, _react.useRef)(); + (0, _react.useEffect)(function () { + mounted.current = true; + return function () { + mounted.current = false; + }; + }, []); + return mounted; +}; + +var _default = useIsMounted; +exports.default = _default; + +/***/ }), + +/***/ "hhFM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var lightBlue = { + 50: '#e1f5fe', + 100: '#b3e5fc', + 200: '#81d4fa', + 300: '#4fc3f7', + 400: '#29b6f6', + 500: '#03a9f4', + 600: '#039be5', + 700: '#0288d1', + 800: '#0277bd', + 900: '#01579b', + A100: '#80d8ff', + A200: '#40c4ff', + A400: '#00b0ff', + A700: '#0091ea' +}; +/* harmony default export */ __webpack_exports__["default"] = (lightBlue); + +/***/ }), + +/***/ "hhFU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSelectorHook", function() { return createSelectorHook; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSelector", function() { return useSelector; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("xDKL"); +/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ZhqA"); +/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("L/yQ"); +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("umgW"); + + + + + + +var refEquality = function refEquality(a, b) { + return a === b; +}; + +function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) { + var _useReducer = Object(react__WEBPACK_IMPORTED_MODULE_0__["useReducer"])(function (s) { + return s + 1; + }, 0), + forceRender = _useReducer[1]; + + var subscription = Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () { + return Object(_utils_Subscription__WEBPACK_IMPORTED_MODULE_2__["createSubscription"])(store, contextSub); + }, [store, contextSub]); + var latestSubscriptionCallbackError = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(); + var latestSelector = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(); + var latestStoreState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(); + var latestSelectedState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(); + var storeState = store.getState(); + var selectedState; + + try { + if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) { + var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references + + if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) { + selectedState = newSelectedState; + } else { + selectedState = latestSelectedState.current; + } + } else { + selectedState = latestSelectedState.current; + } + } catch (err) { + if (latestSubscriptionCallbackError.current) { + err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n"; + } + + throw err; + } + + Object(_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__["useIsomorphicLayoutEffect"])(function () { + latestSelector.current = selector; + latestStoreState.current = storeState; + latestSelectedState.current = selectedState; + latestSubscriptionCallbackError.current = undefined; + }); + Object(_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__["useIsomorphicLayoutEffect"])(function () { + function checkForUpdates() { + try { + var newStoreState = store.getState(); // Avoid calling selector multiple times if the store's state has not changed + + if (newStoreState === latestStoreState.current) { + return; + } + + var _newSelectedState = latestSelector.current(newStoreState); + + if (equalityFn(_newSelectedState, latestSelectedState.current)) { + return; + } + + latestSelectedState.current = _newSelectedState; + latestStoreState.current = newStoreState; + } catch (err) { + // we ignore all errors here, since when the component + // is re-rendered, the selectors are called again, and + // will throw again, if neither props nor store state + // changed + latestSubscriptionCallbackError.current = err; + } + + forceRender(); + } + + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); + checkForUpdates(); + return function () { + return subscription.tryUnsubscribe(); + }; + }, [store, subscription]); + return selectedState; +} +/** + * Hook factory, which creates a `useSelector` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. + * @returns {Function} A `useSelector` hook bound to the specified context. + */ + + +function createSelectorHook(context) { + if (context === void 0) { + context = _components_Context__WEBPACK_IMPORTED_MODULE_4__["ReactReduxContext"]; + } + + var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_4__["ReactReduxContext"] ? _useReduxContext__WEBPACK_IMPORTED_MODULE_1__["useReduxContext"] : function () { + return Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(context); + }; + return function useSelector(selector, equalityFn) { + if (equalityFn === void 0) { + equalityFn = refEquality; + } + + if (false) {} + + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store, + contextSub = _useReduxContext.subscription; + + var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub); + Object(react__WEBPACK_IMPORTED_MODULE_0__["useDebugValue"])(selectedState); + return selectedState; + }; +} +/** + * A hook to access the redux store's state. This hook takes a selector function + * as an argument. The selector is called with the store state. + * + * This hook takes an optional equality comparison function as the second parameter + * that allows you to customize the way the selected state is compared to determine + * whether the component needs to be re-rendered. + * + * @param {Function} selector the selector function + * @param {Function=} equalityFn the function that will be used to determine equality + * + * @returns {any} the selected state + * + * @example + * + * import React from 'react' + * import { useSelector } from 'react-redux' + * + * export const CounterComponent = () => { + * const counter = useSelector(state => state.counter) + * return <div>{counter}</div> + * } + */ + +var useSelector = /*#__PURE__*/createSelectorHook(); + +/***/ }), + +/***/ "hi0n": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.34 Math.trunc(x) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + + +/***/ }), + +/***/ "hk1d": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowserBundle", function() { return isBrowserBundle; }); +/* + * This module exists for optimizations in the build process through rollup and terser. We define some global + * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these + * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will + * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to + * `logger` and preventing node-related code from appearing in browser bundles. + * + * Attention: + * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by + * users. These fags should live in their respective packages, as we identified user tooling (specifically webpack) + * having issues tree-shaking these constants across package boundaries. + * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want + * users to be able to shake away expressions that it guards. + */ + +/** + * Figures out if we're building a browser bundle. + * + * @returns true if this is a browser bundle build. + */ +function isBrowserBundle() { + return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__; +} + + +//# sourceMappingURL=env.js.map + + +/***/ }), + +/***/ "hl+/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsFunction", function() { return whenMapStateToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsMissing", function() { return whenMapStateToPropsIsMissing; }); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4P2O"); + +function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsFunc"])(mapStateToProps, 'mapStateToProps') : undefined; +} +function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsConstant"])(function () { + return {}; + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); + +/***/ }), + +/***/ "hlA/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("JsRB"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'table', + width: '100%', + borderCollapse: 'collapse', + borderSpacing: 0, + '& caption': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.typography.body2, { + padding: theme.spacing(2), + color: theme.palette.text.secondary, + textAlign: 'left', + captionSide: 'bottom' + }) + }, + + /* Styles applied to the root element if `stickyHeader={true}`. */ + stickyHeader: { + borderCollapse: 'separate' + } + }; +}; +var defaultComponent = 'table'; +var Table = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Table(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? defaultComponent : _props$component, + _props$padding = props.padding, + padding = _props$padding === void 0 ? 'normal' : _props$padding, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + _props$stickyHeader = props.stickyHeader, + stickyHeader = _props$stickyHeader === void 0 ? false : _props$stickyHeader, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["classes", "className", "component", "padding", "size", "stickyHeader"]); + + var table = react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () { + return { + padding: padding, + size: size, + stickyHeader: stickyHeader + }; + }, [padding, size, stickyHeader]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_TableContext__WEBPACK_IMPORTED_MODULE_7__["default"].Provider, { + value: table + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + role: Component === defaultComponent ? null : 'table', + ref: ref, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, stickyHeader && classes.stickyHeader) + }, other))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiTable' +})(Table)); + +/***/ }), + +/***/ "hscW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.certifyFlagship = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _storeAttestation = __webpack_require__("WAdv"); + +/** + * Request a challenge from the Stack that can be used to request the app attestation from the app store + * + * @param {CozyClient} client - the CozyClient instance + * @returns {Promise<string>} - the Nonce string returned by the stack + */ +var getStackChallenge = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var stackClient, result; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + stackClient = client.getStackClient(); + _context.next = 4; + return stackClient.fetchJSON('POST', "/auth/clients/".concat(stackClient.oauthOptions.clientID, "/challenge"), null, { + headers: { + Authorization: stackClient.registrationAccessTokenToAuthHeader() + } + }); + + case 4: + result = _context.sent; + return _context.abrupt("return", result.nonce); + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](0); + throw new Error('[FLAGSHIP_CERTIFICATION] Something went wrong while requesting a challenge from CozyStack:\n' + _context.t0.message); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 8]]); + })); + + return function getStackChallenge(_x) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Give the app attestation to the Stack + * + * @param {import("./typedefs").AttestationResult} appAttestation - the app attestation that was returned by the app store + * @param {string} nonce - the Nonce string retrieved from the stack + * @param {CozyClient} client - the CozyClient instance + */ + + +var giveAppAttestationToStack = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(appAttestation, nonce, client) { + var platform, attestation, keyId, stackClient; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + platform = appAttestation.platform, attestation = appAttestation.attestation, keyId = appAttestation.keyId; + stackClient = client.getStackClient(); + _context2.next = 5; + return stackClient.fetchJSON('POST', "/auth/clients/".concat(stackClient.oauthOptions.clientID, "/attestation"), { + platform: platform, + attestation: attestation, + challenge: nonce, + keyId: keyId + }, { + headers: { + Authorization: stackClient.registrationAccessTokenToAuthHeader() + } + }); + + case 5: + _context2.next = 10; + break; + + case 7: + _context2.prev = 7; + _context2.t0 = _context2["catch"](0); + throw new Error('[FLAGSHIP_CERTIFICATION] Something went wrong while giving attestation to CozyStack:\n' + _context2.t0.message); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[0, 7]]); + })); + + return function giveAppAttestationToStack(_x2, _x3, _x4) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Verify app's identity and integrity so the Stack can trust it + * Verification is done on Stack side by using information from the app's store (Google Play or Apple AppStore) + * + * @param {import("./typedefs").CertificationConfig} certificationConfig - the required configuration to access the stores API + * @param {CozyClient} client - the CozyClient instance + */ + + +var certifyFlagship = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(certificationConfig, client) { + var stackChallengeNonce, appAttestation; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (certificationConfig) { + _context3.next = 2; + break; + } + + throw new Error('[FLAGSHIP_CERTIFICATION] Certification configuration is not set'); + + case 2: + _context3.prev = 2; + _context3.next = 5; + return getStackChallenge(client); + + case 5: + stackChallengeNonce = _context3.sent; + _context3.next = 8; + return (0, _storeAttestation.getAppAttestationFromStore)(stackChallengeNonce, certificationConfig); + + case 8: + appAttestation = _context3.sent; + _context3.next = 11; + return giveAppAttestationToStack(appAttestation, stackChallengeNonce, client); + + case 11: + _context3.next = 17; + break; + + case 13: + _context3.prev = 13; + _context3.t0 = _context3["catch"](2); + console.warn("[FLAGSHIP_CERTIFICATION] Certification for URI \"".concat(client.stackClient.uri, "\" failed but the cozy-stack will continue with 2FA certification")); + console.warn(_context3.t0.message); + + case 17: + case "end": + return _context3.stop(); + } + } + }, _callee3, null, [[2, 13]]); + })); + + return function certifyFlagship(_x5, _x6) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.certifyFlagship = certifyFlagship; + +/***/ }), + +/***/ "huDi": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_startChild", function() { return _startChild; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMeasurementValue", function() { return isMeasurementValue; }); +/** + * Checks if a given value is a valid measurement value. + */ +function isMeasurementValue(value) { + return typeof value === 'number' && isFinite(value); +} + +/** + * Helper function to start child on transactions. This function will make sure that the transaction will + * use the start timestamp of the created child span if it is earlier than the transactions actual + * start timestamp. + */ +function _startChild(transaction, { startTimestamp, ...ctx }) { + if (startTimestamp && transaction.startTimestamp > startTimestamp) { + transaction.startTimestamp = startTimestamp; + } + + return transaction.startChild({ + startTimestamp, + ...ctx, + }); +} + + +//# sourceMappingURL=utils.js.map + + +/***/ }), + +/***/ "huhy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PKog"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); +/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3N1e"); + + +// @inheritedComponent IconButton + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + width: 34 + 12 * 2, + height: 14 + 12 * 2, + overflow: 'hidden', + padding: 12, + boxSizing: 'border-box', + position: 'relative', + flexShrink: 0, + zIndex: 0, + // Reset the stacking context. + verticalAlign: 'middle', + // For correct alignment with the text. + '@media print': { + colorAdjust: 'exact' + } + }, + + /* Styles applied to the root element if `edge="start"`. */ + edgeStart: { + marginLeft: -8 + }, + + /* Styles applied to the root element if `edge="end"`. */ + edgeEnd: { + marginRight: -8 + }, + + /* Styles applied to the internal `SwitchBase` component's `root` class. */ + switchBase: { + position: 'absolute', + top: 0, + left: 0, + zIndex: 1, + // Render above the focus ripple. + color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400], + transition: theme.transitions.create(['left', 'transform'], { + duration: theme.transitions.duration.shortest + }), + '&$checked': { + transform: 'translateX(20px)' + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + opacity: 0.5 + }, + '&$disabled + $track': { + opacity: theme.palette.type === 'light' ? 0.12 : 0.1 + } + }, + + /* Styles applied to the internal SwitchBase component's root element if `color="primary"`. */ + colorPrimary: { + '&$checked': { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + backgroundColor: theme.palette.primary.main + }, + '&$disabled + $track': { + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white + } + }, + + /* Styles applied to the internal SwitchBase component's root element if `color="secondary"`. */ + colorSecondary: { + '&$checked': { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + backgroundColor: theme.palette.secondary.main + }, + '&$disabled + $track': { + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white + } + }, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: { + width: 40, + height: 24, + padding: 7, + '& $thumb': { + width: 16, + height: 16 + }, + '& $switchBase': { + padding: 4, + '&$checked': { + transform: 'translateX(16px)' + } + } + }, + + /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */ + checked: {}, + + /* Pseudo-class applied to the internal SwitchBase component's disabled class. */ + disabled: {}, + + /* Styles applied to the internal SwitchBase component's input element. */ + input: { + left: '-100%', + width: '300%' + }, + + /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */ + thumb: { + boxShadow: theme.shadows[1], + backgroundColor: 'currentColor', + width: 20, + height: 20, + borderRadius: '50%' + }, + + /* Styles applied to the track element. */ + track: { + height: '100%', + width: '100%', + borderRadius: 14 / 2, + zIndex: -1, + transition: theme.transitions.create(['opacity', 'background-color'], { + duration: theme.transitions.duration.shortest + }), + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white, + opacity: theme.palette.type === 'light' ? 0.38 : 0.3 + } + }; +}; +var Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Switch(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'secondary' : _props$color, + _props$edge = props.edge, + edge = _props$edge === void 0 ? false : _props$edge, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "edge", "size"]); + + var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.thumb + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, { + 'start': classes.edgeStart, + 'end': classes.edgeEnd + }[edge], size === "small" && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + type: "checkbox", + icon: icon, + checkedIcon: icon, + classes: { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.switchBase, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(color))]), + input: classes.input, + checked: classes.checked, + disabled: classes.disabled + }, + ref: ref + }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.track + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiSwitch' +})(Switch)); + +/***/ }), + +/***/ "hw9v": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"), + cache = false; + +var logger = new Transform(); + +logger.write = function(name, level, args) { + if(typeof window == 'undefined' || typeof JSON == 'undefined' || !JSON.stringify || !JSON.parse) return; + try { + if(!cache) { cache = (window.localStorage.minilog ? JSON.parse(window.localStorage.minilog) : []); } + cache.push([ new Date().toString(), name, level, args ]); + window.localStorage.minilog = JSON.stringify(cache); + } catch(e) {} +}; + +module.exports = logger; + +/***/ }), + +/***/ "hwCY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/globe.svg` to regenerate; + +function SvgGlobe(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M7.889 13.999L7 10 6 9 4 6l-.355-2.128A6 6 0 007.888 14zm.238-11.998L10 3.5V5L8 6.5l-1.5 1 .5 1 3 .5 1 1v1.5l-1.549 2.323A6 6 0 008.127 2.001zM8 16A8 8 0 118 0a8 8 0 010 16z" + })); +} +var _default = SvgGlobe; +exports.default = _default; + +/***/ }), + +/***/ "hxGs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var deepPurple = { + 50: '#ede7f6', + 100: '#d1c4e9', + 200: '#b39ddb', + 300: '#9575cd', + 400: '#7e57c2', + 500: '#673ab7', + 600: '#5e35b1', + 700: '#512da8', + 800: '#4527a0', + 900: '#311b92', + A100: '#b388ff', + A200: '#7c4dff', + A400: '#651fff', + A700: '#6200ea' +}; +/* harmony default export */ __webpack_exports__["default"] = (deepPurple); + +/***/ }), + +/***/ "hy/i": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("YKyv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Grow__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "hzy8": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; + + +/***/ }), + +/***/ "i0G1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UserDuelState = void 0; +var UserDuelState; +exports.UserDuelState = UserDuelState; +(function (UserDuelState) { + UserDuelState[UserDuelState["LOCKED"] = 0] = "LOCKED"; + UserDuelState[UserDuelState["UNLOCKED"] = 1] = "UNLOCKED"; + UserDuelState[UserDuelState["ONGOING"] = 2] = "ONGOING"; + UserDuelState[UserDuelState["DONE"] = 3] = "DONE"; + UserDuelState[UserDuelState["NO_REF_PERIOD_VALID"] = 4] = "NO_REF_PERIOD_VALID"; +})(UserDuelState || (exports.UserDuelState = UserDuelState = {})); + +/***/ }), + +/***/ "i5Eg": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOffsetTop", function() { return getOffsetTop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOffsetLeft", function() { return getOffsetLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NFPV"); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("vFJ3"); +/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("sbbm"); +/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("JGNw"); +/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("bH5F"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("ll/m"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("OY/u"); +/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("q3D2"); +/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("hy/i"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("VHzf"); + + + + + + + + + + + + + + + + +function getOffsetTop(rect, vertical) { + var offset = 0; + + if (typeof vertical === 'number') { + offset = vertical; + } else if (vertical === 'center') { + offset = rect.height / 2; + } else if (vertical === 'bottom') { + offset = rect.height; + } + + return offset; +} +function getOffsetLeft(rect, horizontal) { + var offset = 0; + + if (typeof horizontal === 'number') { + offset = horizontal; + } else if (horizontal === 'center') { + offset = rect.width / 2; + } else if (horizontal === 'right') { + offset = rect.width; + } + + return offset; +} + +function getTransformOriginValue(transformOrigin) { + return [transformOrigin.horizontal, transformOrigin.vertical].map(function (n) { + return typeof n === 'number' ? "".concat(n, "px") : n; + }).join(' '); +} // Sum the scrollTop between two elements. + + +function getScrollParent(parent, child) { + var element = child; + var scrollTop = 0; + + while (element && element !== parent) { + element = element.parentElement; + scrollTop += element.scrollTop; + } + + return scrollTop; +} + +function getAnchorEl(anchorEl) { + return typeof anchorEl === 'function' ? anchorEl() : anchorEl; +} + +var styles = { + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the `Paper` component. */ + paper: { + position: 'absolute', + overflowY: 'auto', + overflowX: 'hidden', + // So we see the popover when it's empty. + // It's most likely on issue on userland. + minWidth: 16, + minHeight: 16, + maxWidth: 'calc(100% - 32px)', + maxHeight: 'calc(100% - 32px)', + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0 + } +}; +var Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Popover(props, ref) { + var action = props.action, + anchorEl = props.anchorEl, + _props$anchorOrigin = props.anchorOrigin, + anchorOrigin = _props$anchorOrigin === void 0 ? { + vertical: 'top', + horizontal: 'left' + } : _props$anchorOrigin, + anchorPosition = props.anchorPosition, + _props$anchorReferenc = props.anchorReference, + anchorReference = _props$anchorReferenc === void 0 ? 'anchorEl' : _props$anchorReferenc, + children = props.children, + classes = props.classes, + className = props.className, + containerProp = props.container, + _props$elevation = props.elevation, + elevation = _props$elevation === void 0 ? 8 : _props$elevation, + getContentAnchorEl = props.getContentAnchorEl, + _props$marginThreshol = props.marginThreshold, + marginThreshold = _props$marginThreshol === void 0 ? 16 : _props$marginThreshol, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + open = props.open, + _props$PaperProps = props.PaperProps, + PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps, + _props$transformOrigi = props.transformOrigin, + transformOrigin = _props$transformOrigi === void 0 ? { + vertical: 'top', + horizontal: 'left' + } : _props$transformOrigi, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_14__["default"] : _props$TransitionComp, + _props$transitionDura = props.transitionDuration, + transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura, + _props$TransitionProp = props.TransitionProps, + TransitionProps = _props$TransitionProp === void 0 ? {} : _props$TransitionProp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "classes", "className", "container", "elevation", "getContentAnchorEl", "marginThreshold", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "open", "PaperProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"]); + + var paperRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); // Returns the top/left offset of the position + // to attach to on the anchor element (or body if none is provided) + + var getAnchorOffset = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (contentAnchorOffset) { + if (anchorReference === 'anchorPosition') { + if (false) {} + + return anchorPosition; + } + + var resolvedAnchorEl = getAnchorEl(anchorEl); // If an anchor element wasn't provided, just use the parent body element of this Popover + + var anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__["default"])(paperRef.current).body; + var anchorRect = anchorElement.getBoundingClientRect(); + + if (false) { var box; } + + var anchorVertical = contentAnchorOffset === 0 ? anchorOrigin.vertical : 'center'; + return { + top: anchorRect.top + getOffsetTop(anchorRect, anchorVertical), + left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal) + }; + }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]); // Returns the vertical offset of inner content to anchor the transform on if provided + + var getContentAnchorOffset = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (element) { + var contentAnchorOffset = 0; + + if (getContentAnchorEl && anchorReference === 'anchorEl') { + var contentAnchorEl = getContentAnchorEl(element); + + if (contentAnchorEl && element.contains(contentAnchorEl)) { + var scrollTop = getScrollParent(element, contentAnchorEl); + contentAnchorOffset = contentAnchorEl.offsetTop + contentAnchorEl.clientHeight / 2 - scrollTop || 0; + } // != the default value + + + if (false) {} + } + + return contentAnchorOffset; + }, [anchorOrigin.vertical, anchorReference, getContentAnchorEl]); // Return the base transform origin using the element + // and taking the content anchor offset into account if in use + + var getTransformOrigin = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (elemRect) { + var contentAnchorOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + return { + vertical: getOffsetTop(elemRect, transformOrigin.vertical) + contentAnchorOffset, + horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal) + }; + }, [transformOrigin.horizontal, transformOrigin.vertical]); + var getPositioningStyle = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (element) { + // Check if the parent has requested anchoring on an inner content node + var contentAnchorOffset = getContentAnchorOffset(element); + var elemRect = { + width: element.offsetWidth, + height: element.offsetHeight + }; // Get the transform origin point on the element itself + + var elemTransformOrigin = getTransformOrigin(elemRect, contentAnchorOffset); + + if (anchorReference === 'none') { + return { + top: null, + left: null, + transformOrigin: getTransformOriginValue(elemTransformOrigin) + }; + } // Get the offset of of the anchoring element + + + var anchorOffset = getAnchorOffset(contentAnchorOffset); // Calculate element positioning + + var top = anchorOffset.top - elemTransformOrigin.vertical; + var left = anchorOffset.left - elemTransformOrigin.horizontal; + var bottom = top + elemRect.height; + var right = left + elemRect.width; // Use the parent window of the anchorEl if provided + + var containerWindow = Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__["default"])(getAnchorEl(anchorEl)); // Window thresholds taking required margin into account + + var heightThreshold = containerWindow.innerHeight - marginThreshold; + var widthThreshold = containerWindow.innerWidth - marginThreshold; // Check if the vertical axis needs shifting + + if (top < marginThreshold) { + var diff = top - marginThreshold; + top -= diff; + elemTransformOrigin.vertical += diff; + } else if (bottom > heightThreshold) { + var _diff = bottom - heightThreshold; + + top -= _diff; + elemTransformOrigin.vertical += _diff; + } + + if (false) {} // Check if the horizontal axis needs shifting + + + if (left < marginThreshold) { + var _diff2 = left - marginThreshold; + + left -= _diff2; + elemTransformOrigin.horizontal += _diff2; + } else if (right > widthThreshold) { + var _diff3 = right - widthThreshold; + + left -= _diff3; + elemTransformOrigin.horizontal += _diff3; + } + + return { + top: "".concat(Math.round(top), "px"), + left: "".concat(Math.round(left), "px"), + transformOrigin: getTransformOriginValue(elemTransformOrigin) + }; + }, [anchorEl, anchorReference, getAnchorOffset, getContentAnchorOffset, getTransformOrigin, marginThreshold]); + var setPositioningStyles = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + var element = paperRef.current; + + if (!element) { + return; + } + + var positioning = getPositioningStyle(element); + + if (positioning.top !== null) { + element.style.top = positioning.top; + } + + if (positioning.left !== null) { + element.style.left = positioning.left; + } + + element.style.transformOrigin = positioning.transformOrigin; + }, [getPositioningStyle]); + + var handleEntering = function handleEntering(element, isAppearing) { + if (onEntering) { + onEntering(element, isAppearing); + } + + setPositioningStyles(); + }; + + var handlePaperRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (instance) { + // #StrictMode ready + paperRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__["findDOMNode"](instance); + }, []); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (open) { + setPositioningStyles(); + } + }); + react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](action, function () { + return open ? { + updatePosition: function updatePosition() { + setPositioningStyles(); + } + } : null; + }, [open, setPositioningStyles]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (!open) { + return undefined; + } + + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__["default"])(function () { + setPositioningStyles(); + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [open, setPositioningStyles]); + var transitionDuration = transitionDurationProp; + + if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) { + transitionDuration = undefined; + } // If the container prop is provided, use that + // If the anchorEl prop is provided, use its parent body element as the container + // If neither are provided let the Modal take care of choosing the container + + + var container = containerProp || (anchorEl ? Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__["default"])(getAnchorEl(anchorEl)).body : undefined); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Modal__WEBPACK_IMPORTED_MODULE_13__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + container: container, + open: open, + ref: ref, + BackdropProps: { + invisible: true + }, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.root, className) + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + appear: true, + in: open, + onEnter: onEnter, + onEntered: onEntered, + onExit: onExit, + onExited: onExited, + onExiting: onExiting, + timeout: transitionDuration + }, TransitionProps, { + onEntering: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__["default"])(handleEntering, TransitionProps.onEntering) + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_15__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + elevation: elevation, + ref: handlePaperRef + }, PaperProps, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.paper, PaperProps.className) + }), children))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_12__["default"])(styles, { + name: 'MuiPopover' +})(Popover)); + +/***/ }), + +/***/ "i5Ys": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEventEnvelope", function() { return createEventEnvelope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSessionEnvelope", function() { return createSessionEnvelope; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +/** Extract sdk info from from the API metadata */ +function getSdkMetadataForEnvelopeHeader(metadata) { + if (!metadata || !metadata.sdk) { + return; + } + const { name, version } = metadata.sdk; + return { name, version }; +} + +/** + * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key. + * Merge with existing data if any. + **/ +function enhanceEventWithSdkInfo(event, sdkInfo) { + if (!sdkInfo) { + return event; + } + event.sdk = event.sdk || {}; + event.sdk.name = event.sdk.name || sdkInfo.name; + event.sdk.version = event.sdk.version || sdkInfo.version; + event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])]; + event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])]; + return event; +} + +/** Creates an envelope from a Session */ +function createSessionEnvelope( + session, + dsn, + metadata, + tunnel, +) { + const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); + const envelopeHeaders = { + sent_at: new Date().toISOString(), + ...(sdkInfo && { sdk: sdkInfo }), + ...(!!tunnel && { dsn: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dsnToString"])(dsn) }), + }; + + const envelopeItem = + 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session]; + + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["createEnvelope"])(envelopeHeaders, [envelopeItem]); +} + +/** + * Create an Envelope from an event. + */ +function createEventEnvelope( + event, + dsn, + metadata, + tunnel, +) { + const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); + const eventType = event.type || 'event'; + + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + + const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + + // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to + // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may + // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid + // of this `delete`, lest we miss putting it back in the next time the property is in use.) + delete event.sdkProcessingMetadata; + + const eventItem = [{ type: eventType }, event]; + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["createEnvelope"])(envelopeHeaders, [eventItem]); +} + +function createEventEnvelopeHeaders( + event, + sdkInfo, + tunnel, + dsn, +) { + const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + + return { + event_id: event.event_id , + sent_at: new Date().toISOString(), + ...(sdkInfo && { sdk: sdkInfo }), + ...(!!tunnel && { dsn: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dsnToString"])(dsn) }), + ...(event.type === 'transaction' && + dynamicSamplingContext && { + trace: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dropUndefinedKeys"])({ ...dynamicSamplingContext }), + }), + }; +} + + +//# sourceMappingURL=envelope.js.map + + +/***/ }), + +/***/ "i91D": +/***/ (function(module, exports, __webpack_require__) { + +var baseFor = __webpack_require__("rlNI"), + keys = __webpack_require__("NHjt"); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; + + +/***/ }), + +/***/ "iAYT": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_LOCALE", function() { return SET_LOCALE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return setLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocale", function() { return getLocale; }); +var SET_LOCALE = 'SET_LOCALE'; // action creator + +var setLocale = function setLocale(lang) { + return { + type: SET_LOCALE, + lang: lang + }; +}; + +var getDefaultLang = function getDefaultLang() { + return document.documentElement.getAttribute('lang') || 'en'; +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultLang(); + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (action.type === SET_LOCALE) { + return action.lang; + } else { + return state; + } +}; // selector + +var getLocale = function getLocale(state) { + return state; +}; + +/***/ }), + +/***/ "iAsL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("jTJl"); +/* harmony import */ var _ClaudyIcon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("AkUS"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("AHiN"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + +var Claudy = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Claudy, _Component); + + var _super = _createSuper(Claudy); + + function Claudy(props, context) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Claudy); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggle", function () { + if (!_this.props.opened && !_this.intentWrapperRef.childNodes.length) { + _this.setState({ + isLoading: true + }); // init Claudy intent + + + _this.intents.create('CLAUDY', 'io.cozy.settings', { + exposeIntentFrameRemoval: true + }).start(_this.intentWrapperRef, function () { + _this.setState({ + isLoading: false, + isActive: true + }); + + _this.props.onToggle(); // toggle claudy when the intent is loaded + + }).then(function (_ref) { + var removeIntentIframe = _ref.removeIntentIframe; + + // exposeFrameRemoval intent event + // remove the intent frame at the end of the menu closing transition + var closedListener = function closedListener(e) { + if (e.propertyName === 'transform') { + removeIntentIframe(); + + _this.setState({ + isActive: false + }); + + e.target.removeEventListener('transitionend', closedListener); + } + }; + + _this.intentWrapperRef.addEventListener('transitionend', closedListener, false); + + _this.props.onToggle(); + }); + } else { + _this.setState({ + isActive: !_this.state.isActive + }); + + _this.props.onToggle(); + } + }); + + _this.store = context.barStore; + _this.state = { + isLoading: false, + isActive: false + }; + _this.intents = Object(_lib_stack__WEBPACK_IMPORTED_MODULE_8__["getIntents"])(); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Claudy, [{ + key: "UNSAFE_componentWillReceiveProps", + value: function UNSAFE_componentWillReceiveProps(nextProps) { + if (nextProps.claudyFired) this.toggle(); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var opened = this.props.opened; + var _this$state = this.state, + isLoading = _this$state.isLoading, + isActive = _this$state.isActive; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-claudy ".concat(opened ? 'coz-claudy--opened' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("button", { + type: "button", + className: "coz-claudy-icon coz-bar-hide-sm", + "data-claudy-opened": isActive, + "data-claudy-loading": isLoading, + onClick: this.toggle, + "aria-haspopup": "true", + "aria-expanded": isActive + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10___default.a, { + icon: _ClaudyIcon__WEBPACK_IMPORTED_MODULE_9__["default"], + height: "32", + width: "32" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-claudy-intent-wrapper", + ref: function ref(wrapper) { + _this2.intentWrapperRef = wrapper; + } + })); + } + }]); + + return Claudy; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +/* harmony default export */ __webpack_exports__["default"] = (Claudy); + +/***/ }), + +/***/ "iAzp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return shallowEqual; }); +function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +/***/ }), + +/***/ "iHhZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("PKog"); +/* harmony import */ var _internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("qR/I"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); + + + + + + + + + +var styles = function styles(theme) { + return { + root: { + display: 'flex', + marginLeft: theme.spacing(0.5), + marginRight: theme.spacing(0.5), + backgroundColor: theme.palette.grey[100], + color: theme.palette.grey[700], + borderRadius: 2, + cursor: 'pointer', + '&:hover, &:focus': { + backgroundColor: theme.palette.grey[200] + }, + '&:active': { + boxShadow: theme.shadows[0], + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__["emphasize"])(theme.palette.grey[200], 0.12) + } + }, + icon: { + width: 24, + height: 16 + } + }; +}; +/** + * @ignore - internal component. + */ + + +function BreadcrumbCollapsed(props) { + var classes = props.classes, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + component: "li", + className: classes.root, + focusRipple: true + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__["default"], { + className: classes.icon + })); +} + + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_4__["default"])(styles, { + name: 'PrivateBreadcrumbCollapsed' +})(BreadcrumbCollapsed)); + +/***/ }), + +/***/ "iLqq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__("eckd"); +var toLength = __webpack_require__("yhnj"); +var advanceStringIndex = __webpack_require__("mNB+"); +var regExpExec = __webpack_require__("PA8a"); + +// @@match logic +__webpack_require__("dRmG")('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), + +/***/ "iNHL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6ORS"); + + +/** + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js + * + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes + * during build. + * @param {number} code + */ +function formatProdErrorMessage(code) { + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; +} + +// Inlined version of the `symbol-observable` polyfill +var $$observable = (function () { + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; +})(); + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var randomString = function randomString() { + return Math.random().toString(36).substring(7).split('').join('.'); +}; + +var ActionTypes = { + INIT: "@@redux/INIT" + randomString(), + REPLACE: "@@redux/REPLACE" + randomString(), + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); + } +}; + +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = obj; + + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(obj) === proto; +} + +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of +function miniKindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + var type = typeof val; + + switch (type) { + case 'boolean': + case 'string': + case 'number': + case 'symbol': + case 'function': + { + return type; + } + } + + if (Array.isArray(val)) return 'array'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + var constructorName = ctorName(val); + + switch (constructorName) { + case 'Symbol': + case 'Promise': + case 'WeakMap': + case 'WeakSet': + case 'Map': + case 'Set': + return constructorName; + } // other + + + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +} + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isError(val) { + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; +} + +function kindOf(val) { + var typeOfVal = typeof val; + + if (false) {} + + return typeOfVal; +} + +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + +function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { + throw new Error( true ? formatProdErrorMessage(0) : undefined); + } + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error( true ? formatProdErrorMessage(1) : undefined); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(2) : undefined); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + /** + * This makes a shallow copy of currentListeners so we can use + * nextListeners as a temporary list while dispatching. + * + * This prevents any bugs around consumers calling + * subscribe/unsubscribe in the middle of a dispatch. + */ + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + + + function getState() { + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(3) : undefined); + } + + return currentState; + } + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + + + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error( true ? formatProdErrorMessage(4) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(5) : undefined); + } + + var isSubscribed = true; + ensureCanMutateNextListeners(); + nextListeners.push(listener); + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(6) : undefined); + } + + isSubscribed = false; + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + currentListeners = null; + }; + } + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + + + function dispatch(action) { + if (!isPlainObject(action)) { + throw new Error( true ? formatProdErrorMessage(7) : undefined); + } + + if (typeof action.type === 'undefined') { + throw new Error( true ? formatProdErrorMessage(8) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(9) : undefined); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + + + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(10) : undefined); + } + + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. + // Any reducers that existed in both the new and old rootReducer + // will receive the previous state. This effectively populates + // the new state tree with any relevant data from the old one. + + dispatch({ + type: ActionTypes.REPLACE + }); + } + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + + + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object' || observer === null) { + throw new Error( true ? formatProdErrorMessage(11) : undefined); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { + unsubscribe: unsubscribe + }; + } + }, _ref[$$observable] = function () { + return this; + }, _ref; + } // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + + + dispatch({ + type: ActionTypes.INIT + }); + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[$$observable] = observable, _ref2; +} + +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + } catch (e) {} // eslint-disable-line no-empty + +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!isPlainObject(inputState)) { + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + if (action && action.type === ActionTypes.REPLACE) return; + + if (unexpectedKeys.length > 0) { + return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); + } +} + +function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: ActionTypes.INIT + }); + + if (typeof initialState === 'undefined') { + throw new Error( true ? formatProdErrorMessage(12) : undefined); + } + + if (typeof reducer(undefined, { + type: ActionTypes.PROBE_UNKNOWN_ACTION() + }) === 'undefined') { + throw new Error( true ? formatProdErrorMessage(13) : undefined); + } + }); +} +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + + +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) {} + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same + // keys multiple times. + + var unexpectedKeyCache; + + if (false) {} + + var shapeAssertionError; + + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination(state, action) { + if (state === void 0) { + state = {}; + } + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (false) { var warningMessage; } + + var hasChanged = false; + var nextState = {}; + + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + + if (typeof nextStateForKey === 'undefined') { + var actionType = action && action.type; + throw new Error( true ? formatProdErrorMessage(14) : undefined); + } + + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; + return hasChanged ? nextState : state; + }; +} + +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(this, arguments)); + }; +} +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass an action creator as the first argument, + * and get a dispatch wrapped function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + + +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( true ? formatProdErrorMessage(16) : undefined); + } + + var boundActionCreators = {}; + + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + + return boundActionCreators; +} + +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ +function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(void 0, arguments)); + }; + }); +} + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + +function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function () { + var store = createStore.apply(void 0, arguments); + + var _dispatch = function dispatch() { + throw new Error( true ? formatProdErrorMessage(15) : undefined); + }; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = compose.apply(void 0, chain)(store.dispatch); + return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { + dispatch: _dispatch + }); + }; + }; +} + +/* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + +function isCrushed() {} + +if (false) {} + + + + +/***/ }), + +/***/ "iNsi": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var hide = __webpack_require__("XyXA"); +var has = __webpack_require__("00OQ"); +var SRC = __webpack_require__("Jz0u")('src'); +var $toString = __webpack_require__("7wxI"); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +__webpack_require__("WSXa").inspectSource = function (it) { + return $toString.call(it); +}; + +(module.exports = function (O, key, val, safe) { + var isFunction = typeof val == 'function'; + if (isFunction) has(val, 'name') || hide(val, 'name', key); + if (O[key] === val) return; + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if (O === global) { + O[key] = val; + } else if (!safe) { + delete O[key]; + hide(O, key, val); + } else if (O[key]) { + O[key] = val; + } else { + hide(O, key, val); + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString() { + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); + + +/***/ }), + +/***/ "iOQm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var m = __webpack_require__("Y/FK"); +if (true) { + exports.createRoot = m.createRoot; + exports.hydrateRoot = m.hydrateRoot; +} else { var i; } + + +/***/ }), + +/***/ "iQWc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("jlvQ"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("V6W0"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("kjpz"); +/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("xOGQ"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("IU9S"); + + + + + + + + + + +var styles = { + entering: { + opacity: 1 + }, + entered: { + opacity: 1 + } +}; +var defaultTimeout = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__["duration"].leavingScreen +}; +/** + * The Fade transition is used by the [Modal](/components/modal/) component. + * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. + */ + +var Fade = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Fade(props, ref) { + var children = props.children, + _props$disableStrictM = props.disableStrictModeCompat, + disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM, + inProp = props.in, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + style = props.style, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__["Transition"] : _props$TransitionComp, + _props$timeout = props.timeout, + timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["children", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "TransitionComponent", "timeout"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat; + var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(children.ref, ref); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__["default"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef); + + var normalizedTransitionCallback = function normalizedTransitionCallback(callback) { + return function (nodeOrAppearing, maybeAppearing) { + if (callback) { + var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing], + _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2), + node = _ref2[0], + isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value. + + + if (isAppearing === undefined) { + callback(node); + } else { + callback(node, isAppearing); + } + } + }; + }; + + var handleEntering = normalizedTransitionCallback(onEntering); + var handleEnter = normalizedTransitionCallback(function (node, isAppearing) { + Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["reflow"])(node); // So the animation always start from the start. + + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'enter' + }); + node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); + node.style.transition = theme.transitions.create('opacity', transitionProps); + + if (onEnter) { + onEnter(node, isAppearing); + } + }); + var handleEntered = normalizedTransitionCallback(onEntered); + var handleExiting = normalizedTransitionCallback(onExiting); + var handleExit = normalizedTransitionCallback(function (node) { + var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__["getTransitionProps"])({ + style: style, + timeout: timeout + }, { + mode: 'exit' + }); + node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); + node.style.transition = theme.transitions.create('opacity', transitionProps); + + if (onExit) { + onExit(node); + } + }); + var handleExited = normalizedTransitionCallback(onExited); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + appear: true, + in: inProp, + nodeRef: enableStrictModeCompat ? nodeRef : undefined, + onEnter: handleEnter, + onEntered: handleEntered, + onEntering: handleEntering, + onExit: handleExit, + onExited: handleExited, + onExiting: handleExiting, + timeout: timeout + }, other), function (state, childProps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + opacity: 0, + visibility: state === 'exited' && !inProp ? 'hidden' : undefined + }, styles[state], style, children.props.style), + ref: handleRef + }, childProps)); + }); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Fade); + +/***/ }), + +/***/ "iW8z": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $reduce = __webpack_require__("Hg8A"); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + + +/***/ }), + +/***/ "iXAc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__("RqGj"); +var global = __webpack_require__("ETne"); +var ctx = __webpack_require__("DnF+"); +var classof = __webpack_require__("MrcW"); +var $export = __webpack_require__("LRPZ"); +var isObject = __webpack_require__("pFmr"); +var aFunction = __webpack_require__("TQc+"); +var anInstance = __webpack_require__("/Ytg"); +var forOf = __webpack_require__("QTPW"); +var speciesConstructor = __webpack_require__("iyRu"); +var task = __webpack_require__("GuUT").set; +var microtask = __webpack_require__("AMIv")(); +var newPromiseCapabilityModule = __webpack_require__("D81i"); +var perform = __webpack_require__("t4T6"); +var userAgent = __webpack_require__("Wr43"); +var promiseResolve = __webpack_require__("jOpP"); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__("Yhpl")('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__("UDoN")($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__("YoKN")($Promise, PROMISE); +__webpack_require__("iaIa")(PROMISE); +Wrapper = __webpack_require__("WSXa")[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__("V06o")(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + + +/***/ }), + +/***/ "iaIa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("ETne"); +var dP = __webpack_require__("GwHQ"); +var DESCRIPTORS = __webpack_require__("WXXH"); +var SPECIES = __webpack_require__("Yhpl")('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + + +/***/ }), + +/***/ "ibCj": +/***/ (function(module, exports) { + +exports = module.exports = stringify +exports.getSerialize = serializer + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) +} + +function serializer(replacer, cycleReplacer) { + var stack = [], keys = [] + + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]" + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" + } + + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this) + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) + } + else stack.push(value) + + return replacer == null ? value : replacer.call(this, key, value) + } +} + + +/***/ }), + +/***/ "icJ4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REACT_MOUNT_OP", function() { return REACT_MOUNT_OP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REACT_RENDER_OP", function() { return REACT_RENDER_OP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REACT_UPDATE_OP", function() { return REACT_UPDATE_OP; }); +const REACT_RENDER_OP = 'ui.react.render'; + +const REACT_UPDATE_OP = 'ui.react.update'; + +const REACT_MOUNT_OP = 'ui.react.mount'; + + +//# sourceMappingURL=constants.js.map + + +/***/ }), + +/***/ "if98": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRequestDataToEvent", function() { return addRequestDataToEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRequestDataToTransaction", function() { return addRequestDataToTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractPathForTransaction", function() { return extractPathForTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractRequestData", function() { return extractRequestData; }); +/* harmony import */ var _buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("99IF"); +/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7myG"); +/* harmony import */ var _url_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dZZ2"); + + + + + +const DEFAULT_INCLUDES = { + ip: false, + request: true, + transaction: true, + user: true, +}; +const DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url']; +const DEFAULT_USER_INCLUDES = ['id', 'username', 'email']; + +/** + * Sets parameterized route as transaction name e.g.: `GET /users/:id` + * Also adds more context data on the transaction from the request + */ +function addRequestDataToTransaction( + transaction, + req, + deps, +) { + if (!transaction) return; + if (!transaction.metadata.source || transaction.metadata.source === 'url') { + // Attempt to grab a parameterized route off of the request + transaction.setName(...extractPathForTransaction(req, { path: true, method: true })); + } + transaction.setData('url', req.originalUrl || req.url); + if (req.baseUrl) { + transaction.setData('baseUrl', req.baseUrl); + } + transaction.setData('query', extractQueryParams(req, deps)); +} + +/** + * Extracts a complete and parameterized path from the request object and uses it to construct transaction name. + * If the parameterized transaction name cannot be extracted, we fall back to the raw URL. + * + * Additionally, this function determines and returns the transaction name source + * + * eg. GET /mountpoint/user/:id + * + * @param req A request object + * @param options What to include in the transaction name (method, path, or a custom route name to be + * used instead of the request's route) + * + * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url') + */ +function extractPathForTransaction( + req, + options = {}, +) { + const method = req.method && req.method.toUpperCase(); + + let path = ''; + let source = 'url'; + + // Check to see if there's a parameterized route we can use (as there is in Express) + if (options.customRoute || req.route) { + path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`; + source = 'route'; + } + + // Otherwise, just take the original URL + else if (req.originalUrl || req.url) { + path = Object(_url_js__WEBPACK_IMPORTED_MODULE_3__["stripUrlQueryAndFragment"])(req.originalUrl || req.url || ''); + } + + let name = ''; + if (options.method && method) { + name += method; + } + if (options.method && options.path) { + name += ' '; + } + if (options.path && path) { + name += path; + } + + return [name, source]; +} + +/** JSDoc */ +function extractTransaction(req, type) { + switch (type) { + case 'path': { + return extractPathForTransaction(req, { path: true })[0]; + } + case 'handler': { + return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || '<anonymous>'; + } + case 'methodPath': + default: { + return extractPathForTransaction(req, { path: true, method: true })[0]; + } + } +} + +/** JSDoc */ +function extractUserData( + user + +, + keys, +) { + const extractedUser = {}; + const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES; + + attributes.forEach(key => { + if (user && key in user) { + extractedUser[key] = user[key]; + } + }); + + return extractedUser; +} + +/** + * Normalize data from the request object, accounting for framework differences. + * + * @param req The request object from which to extract data + * @param options.include An optional array of keys to include in the normalized data. Defaults to + * DEFAULT_REQUEST_INCLUDES if not provided. + * @param options.deps Injected, platform-specific dependencies + * @returns An object containing normalized request data + */ +function extractRequestData( + req, + options + +, +) { + const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {}; + const requestData = {}; + + // headers: + // node, express, koa, nextjs: req.headers + const headers = (req.headers || {}) + +; + // method: + // node, express, koa, nextjs: req.method + const method = req.method; + // host: + // express: req.hostname in > 4 and req.host in < 4 + // koa: req.host + // node, nextjs: req.headers.host + const host = req.hostname || req.host || headers.host || '<no host>'; + // protocol: + // node, nextjs: <n/a> + // express, koa: req.protocol + const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http'; + // url (including path and query string): + // node, express: req.originalUrl + // koa, nextjs: req.url + const originalUrl = req.originalUrl || req.url || ''; + // absolute url + const absoluteUrl = `${protocol}://${host}${originalUrl}`; + include.forEach(key => { + switch (key) { + case 'headers': { + requestData.headers = headers; + break; + } + case 'method': { + requestData.method = method; + break; + } + case 'url': { + requestData.url = absoluteUrl; + break; + } + case 'cookies': { + // cookies: + // node, express, koa: req.headers.cookie + // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + requestData.cookies = + // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || (headers.cookie && deps && deps.cookie && deps.cookie.parse(headers.cookie)) || {}; + break; + } + case 'query_string': { + // query string: + // node: req.url (raw) + // express, koa, nextjs: req.query + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + requestData.query_string = extractQueryParams(req, deps); + break; + } + case 'data': { + if (method === 'GET' || method === 'HEAD') { + break; + } + // body data: + // express, koa, nextjs: req.body + // + // when using node by itself, you have to read the incoming stream(see + // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know + // where they're going to store the final result, so they'll have to capture this data themselves + if (req.body !== undefined) { + requestData.data = Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isString"])(req.body) ? req.body : JSON.stringify(Object(_normalize_js__WEBPACK_IMPORTED_MODULE_2__["normalize"])(req.body)); + } + break; + } + default: { + if ({}.hasOwnProperty.call(req, key)) { + requestData[key] = (req )[key]; + } + } + } + }); + + return requestData; +} + +/** + * Options deciding what parts of the request to use when enhancing an event + */ + +/** + * Add data from the given request to the given event + * + * @param event The event to which the request data will be added + * @param req Request object + * @param options.include Flags to control what data is included + * @param options.deps Injected platform-specific dependencies + * @hidden + */ +function addRequestDataToEvent( + event, + req, + options, +) { + const include = { + ...DEFAULT_INCLUDES, + ...Object(_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([options, 'optionalAccess', _ => _.include]), + }; + + if (include.request) { + const extractedRequestData = Array.isArray(include.request) + ? extractRequestData(req, { include: include.request, deps: Object(_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([options, 'optionalAccess', _2 => _2.deps]) }) + : extractRequestData(req, { deps: Object(_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([options, 'optionalAccess', _3 => _3.deps]) }); + + event.request = { + ...event.request, + ...extractedRequestData, + }; + } + + if (include.user) { + const extractedUser = req.user && Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isPlainObject"])(req.user) ? extractUserData(req.user, include.user) : {}; + + if (Object.keys(extractedUser).length) { + event.user = { + ...event.user, + ...extractedUser, + }; + } + } + + // client ip: + // node, nextjs: req.socket.remoteAddress + // express, koa: req.ip + if (include.ip) { + const ip = req.ip || (req.socket && req.socket.remoteAddress); + if (ip) { + event.user = { + ...event.user, + ip_address: ip, + }; + } + } + + if (include.transaction && !event.transaction) { + // TODO do we even need this anymore? + // TODO make this work for nextjs + event.transaction = extractTransaction(req, include.transaction); + } + + return event; +} + +function extractQueryParams( + req, + deps, +) { + // url (including path and query string): + // node, express: req.originalUrl + // koa, nextjs: req.url + let originalUrl = req.originalUrl || req.url || ''; + + if (!originalUrl) { + return; + } + + // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and + // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use. + if (originalUrl.startsWith('/')) { + originalUrl = `http://dogs.are.great${originalUrl}`; + } + + return ( + req.query || + (typeof URL !== undefined && new URL(originalUrl).search.replace('?', '')) || + // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node + (deps && deps.url && deps.url.parse(originalUrl).query) || + undefined + ); +} + + +//# sourceMappingURL=requestdata.js.map + + +/***/ }), + +/***/ "igaY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "border", function() { return border; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderTop", function() { return borderTop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderRight", function() { return borderRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderBottom", function() { return borderBottom; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderLeft", function() { return borderLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderColor", function() { return borderColor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "borderRadius", function() { return borderRadius; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + + +function getBorder(value) { + if (typeof value !== 'number') { + return value; + } + + return "".concat(value, "px solid"); +} + +var border = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'border', + themeKey: 'borders', + transform: getBorder +}); +var borderTop = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderTop', + themeKey: 'borders', + transform: getBorder +}); +var borderRight = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderRight', + themeKey: 'borders', + transform: getBorder +}); +var borderBottom = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderBottom', + themeKey: 'borders', + transform: getBorder +}); +var borderLeft = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderLeft', + themeKey: 'borders', + transform: getBorder +}); +var borderColor = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderColor', + themeKey: 'palette' +}); +var borderRadius = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'borderRadius', + themeKey: 'shape' +}); +var borders = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius); +/* harmony default export */ __webpack_exports__["default"] = (borders); + +/***/ }), + +/***/ "igy2": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), + +/***/ "ii0b": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__("pIQI")(); +} + + +/***/ }), + +/***/ "ik7V": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transaction", function() { return Transaction; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("aUjI"); +/* harmony import */ var _span_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("tH0f"); + + + + + +/** JSDoc */ +class Transaction extends _span_js__WEBPACK_IMPORTED_MODULE_3__["Span"] { + + /** + * The reference to the current hub. + */ + + __init() {this._measurements = {};} + + __init2() {this._contexts = {};} + + __init3() {this._frozenDynamicSamplingContext = undefined;} + + /** + * This constructor should never be called manually. Those instrumenting tracing should use + * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`. + * @internal + * @hideconstructor + * @hidden + */ + constructor(transactionContext, hub) { + super(transactionContext);Transaction.prototype.__init.call(this);Transaction.prototype.__init2.call(this);Transaction.prototype.__init3.call(this);; + + this._hub = hub || Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])(); + + this._name = transactionContext.name || ''; + + this.metadata = { + source: 'custom', + ...transactionContext.metadata, + spanMetadata: {}, + changes: [], + propagations: 0, + }; + + this._trimEnd = transactionContext.trimEnd; + + // this is because transactions are also spans, and spans have a transaction pointer + this.transaction = this; + + // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means + // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means) + const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext; + if (incomingDynamicSamplingContext) { + // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext` + this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext }; + } + } + + /** Getter for `name` property */ + get name() { + return this._name; + } + + /** Setter for `name` property, which also sets `source` as custom */ + set name(newName) { + this.setName(newName); + } + + /** + * JSDoc + */ + setName(name, source = 'custom') { + // `source` could change without the name changing if we discover that an unparameterized route is actually + // parameterized by virtue of having no parameters in its path + if (name !== this.name || source !== this.metadata.source) { + this.metadata.changes.push({ + // log previous source + source: this.metadata.source, + timestamp: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["timestampInSeconds"])(), + propagations: this.metadata.propagations, + }); + } + + this._name = name; + this.metadata.source = source; + } + + /** + * Attaches SpanRecorder to the span itself + * @param maxlen maximum number of spans that can be recorded + */ + initSpanRecorder(maxlen = 1000) { + if (!this.spanRecorder) { + this.spanRecorder = new _span_js__WEBPACK_IMPORTED_MODULE_3__["SpanRecorder"](maxlen); + } + this.spanRecorder.add(this); + } + + /** + * @inheritDoc + */ + setContext(key, context) { + if (context === null) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this._contexts[key]; + } else { + this._contexts[key] = context; + } + } + + /** + * @inheritDoc + */ + setMeasurement(name, value, unit = '') { + this._measurements[name] = { value, unit }; + } + + /** + * @inheritDoc + */ + setMetadata(newMetadata) { + this.metadata = { ...this.metadata, ...newMetadata }; + } + + /** + * @inheritDoc + */ + finish(endTimestamp) { + // This transaction is already finished, so we should not flush it again. + if (this.endTimestamp !== undefined) { + return undefined; + } + + if (!this.name) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].warn('Transaction has no name, falling back to `<unlabeled transaction>`.'); + this.name = '<unlabeled transaction>'; + } + + // just sets the end timestamp + super.finish(endTimestamp); + + if (this.sampled !== true) { + // At this point if `sampled !== true` we want to discard the transaction. + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.'); + + const client = this._hub.getClient(); + if (client) { + client.recordDroppedEvent('sample_rate', 'transaction'); + } + + return undefined; + } + + const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : []; + + if (this._trimEnd && finishedSpans.length > 0) { + this.endTimestamp = finishedSpans.reduce((prev, current) => { + if (prev.endTimestamp && current.endTimestamp) { + return prev.endTimestamp > current.endTimestamp ? prev : current; + } + return prev; + }).endTimestamp; + } + + const metadata = this.metadata; + + const transaction = { + contexts: { + ...this._contexts, + // We don't want to override trace context + trace: this.getTraceContext(), + }, + spans: finishedSpans, + start_timestamp: this.startTimestamp, + tags: this.tags, + timestamp: this.endTimestamp, + transaction: this.name, + type: 'transaction', + sdkProcessingMetadata: { + ...metadata, + dynamicSamplingContext: this.getDynamicSamplingContext(), + }, + ...(metadata.source && { + transaction_info: { + source: metadata.source, + changes: metadata.changes, + propagations: metadata.propagations, + }, + }), + }; + + const hasMeasurements = Object.keys(this._measurements).length > 0; + + if (hasMeasurements) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].log( + '[Measurements] Adding measurements to transaction', + JSON.stringify(this._measurements, undefined, 2), + ); + transaction.measurements = this._measurements; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__["logger"].log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`); + + return this._hub.captureEvent(transaction); + } + + /** + * @inheritDoc + */ + toContext() { + const spanContext = super.toContext(); + + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["dropUndefinedKeys"])({ + ...spanContext, + name: this.name, + trimEnd: this._trimEnd, + }); + } + + /** + * @inheritDoc + */ + updateWithContext(transactionContext) { + super.updateWithContext(transactionContext); + + this.name = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(transactionContext.name, () => ( '')); + + this._trimEnd = transactionContext.trimEnd; + + return this; + } + + /** + * @inheritdoc + * + * @experimental + */ + getDynamicSamplingContext() { + if (this._frozenDynamicSamplingContext) { + return this._frozenDynamicSamplingContext; + } + + const hub = this._hub || Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])(); + const client = hub && hub.getClient(); + + if (!client) return {}; + + const { environment, release } = client.getOptions() || {}; + const { publicKey: public_key } = client.getDsn() || {}; + + const maybeSampleRate = this.metadata.sampleRate; + const sample_rate = maybeSampleRate !== undefined ? maybeSampleRate.toString() : undefined; + + const scope = hub.getScope(); + const { segment: user_segment } = (scope && scope.getUser()) || {}; + + const source = this.metadata.source; + + // We don't want to have a transaction name in the DSC if the source is "url" because URLs might contain PII + const transaction = source && source !== 'url' ? this.name : undefined; + + const dsc = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__["dropUndefinedKeys"])({ + environment, + release, + transaction, + user_segment, + public_key, + trace_id: this.traceId, + sample_rate, + }); + + // Uncomment if we want to make DSC immutable + // this._frozenDynamicSamplingContext = dsc; + + return dsc; + } +} + + +//# sourceMappingURL=transaction.js.map + + +/***/ }), + +/***/ "ipV0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + flexDirection: 'column', + flexWrap: 'wrap' + }, + + /* Styles applied to the root element if `row={true}`. */ + row: { + flexDirection: 'row' + } +}; +/** + * `FormGroup` wraps controls such as `Checkbox` and `Switch`. + * It provides compact row layout. + * For the `Radio`, you should be using the `RadioGroup` component instead of this one. + */ + +var FormGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FormGroup(props, ref) { + var classes = props.classes, + className = props.className, + _props$row = props.row, + row = _props$row === void 0 ? false : _props$row, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "row"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, row && classes.row), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiFormGroup' +})(FormGroup)); + +/***/ }), + +/***/ "ivGQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__("1Xb9"); +} else {} + + +/***/ }), + +/***/ "iwVW": +/***/ (function(module, exports) { + +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; +} + +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "iyRu": +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__("eckd"); +var aFunction = __webpack_require__("TQc+"); +var SPECIES = __webpack_require__("Yhpl")('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), + +/***/ "j0hM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _dataload = __webpack_require__("RR6/"); +Object.keys(_dataload).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _dataload[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _dataload[key]; + } + }); +}); +var _ecogesture = __webpack_require__("GsEq"); +Object.keys(_ecogesture).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _ecogesture[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ecogesture[key]; + } + }); +}); +var _ecogestureForm = __webpack_require__("PSw8"); +Object.keys(_ecogestureForm).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _ecogestureForm[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ecogestureForm[key]; + } + }); +}); +var _fluid = __webpack_require__("2ld/"); +Object.keys(_fluid).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _fluid[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _fluid[key]; + } + }); +}); +var _fluidSlug = __webpack_require__("M3cl"); +Object.keys(_fluidSlug).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _fluidSlug[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _fluidSlug[key]; + } + }); +}); +var _jobState = __webpack_require__("m505"); +Object.keys(_jobState).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _jobState[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _jobState[key]; + } + }); +}); +var _konnectorStatus = __webpack_require__("b7lF"); +Object.keys(_konnectorStatus).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _konnectorStatus[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _konnectorStatus[key]; + } + }); +}); +var _profileType = __webpack_require__("z6Eu"); +Object.keys(_profileType).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _profileType[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _profileType[key]; + } + }); +}); +var _screen = __webpack_require__("xXd7"); +Object.keys(_screen).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _screen[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _screen[key]; + } + }); +}); +var _sgeStep = __webpack_require__("D2nQ"); +Object.keys(_sgeStep).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _sgeStep[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _sgeStep[key]; + } + }); +}); +var _timeStep = __webpack_require__("TBgN"); +Object.keys(_timeStep).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _timeStep[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _timeStep[key]; + } + }); +}); +var _usageEvent = __webpack_require__("vGhx"); +Object.keys(_usageEvent).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _usageEvent[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _usageEvent[key]; + } + }); +}); +var _usageEventProperties = __webpack_require__("C6U7"); +Object.keys(_usageEventProperties).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _usageEventProperties[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _usageEventProperties[key]; + } + }); +}); +var _userAction = __webpack_require__("f0m3"); +Object.keys(_userAction).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _userAction[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _userAction[key]; + } + }); +}); +var _userChallenge = __webpack_require__("wHIf"); +Object.keys(_userChallenge).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _userChallenge[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _userChallenge[key]; + } + }); +}); +var _userDuel = __webpack_require__("i0G1"); +Object.keys(_userDuel).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _userDuel[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _userDuel[key]; + } + }); +}); +var _userExploration = __webpack_require__("525Y"); +Object.keys(_userExploration).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _userExploration[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _userExploration[key]; + } + }); +}); +var _userQuiz = __webpack_require__("fA2o"); +Object.keys(_userQuiz).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _userQuiz[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _userQuiz[key]; + } + }); +}); + +/***/ }), + +/***/ "j1sQ": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in Romanian language the weekdays and months should be in the lowercase. + var months3char = ['ian', 'feb', 'mar', 'apr', 'mai', 'iun', 'iul', 'aug', 'sep', 'oct', 'noi', 'dec'] + var monthsFull = ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'] + var weekdays2char = ['du', 'lu', 'ma', 'mi', 'jo', 'vi', 'sâ'] + var weekdays3char = ['dum', 'lun', 'mar', 'mie', 'joi', 'vin', 'sâm'] + var weekdaysFull = ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbăta'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number.toString() +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "j2SL": +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__("ARbH"); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), + +/***/ "j2pP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" +}), 'KeyboardArrowRight')); + +/***/ }), + +/***/ "j3u0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createClass; }); +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} + +/***/ }), + +/***/ "j8DG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fY06"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ZrPw"); + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + height: '0.01em', + // Fix IE 11 flexbox alignment. To remove at some point. + maxHeight: '2em', + alignItems: 'center', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the root element if `variant="filled"`. */ + filled: { + '&$positionStart:not($hiddenLabel)': { + marginTop: 16 + } + }, + + /* Styles applied to the root element if `position="start"`. */ + positionStart: { + marginRight: 8 + }, + + /* Styles applied to the root element if `position="end"`. */ + positionEnd: { + marginLeft: 8 + }, + + /* Styles applied to the root element if `disablePointerEvents=true`. */ + disablePointerEvents: { + pointerEvents: 'none' + }, + + /* Styles applied if the adornment is used inside <FormControl hiddenLabel />. */ + hiddenLabel: {}, + + /* Styles applied if the adornment is used inside <FormControl margin="dense" />. */ + marginDense: {} +}; +var InputAdornment = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function InputAdornment(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disablePointer = props.disablePointerEvents, + disablePointerEvents = _props$disablePointer === void 0 ? false : _props$disablePointer, + _props$disableTypogra = props.disableTypography, + disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra, + position = props.position, + variantProp = props.variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"]); + + var muiFormControl = Object(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__["useFormControl"])() || {}; + var variant = variantProp; + + if (variantProp && muiFormControl.variant) { + if (false) {} + } + + if (muiFormControl && !variant) { + variant = muiFormControl.variant; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__["default"].Provider, { + value: null + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, position === 'end' ? classes.positionEnd : classes.positionStart, disablePointerEvents && classes.disablePointerEvents, muiFormControl.hiddenLabel && classes.hiddenLabel, variant === 'filled' && classes.filled, muiFormControl.margin === 'dense' && classes.marginDense), + ref: ref + }, other), typeof children === 'string' && !disableTypography ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_5__["default"], { + color: "textSecondary" + }, children) : children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiInputAdornment' +})(InputAdornment)); + +/***/ }), + +/***/ "j9Ms": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; }); +function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); +} + +/***/ }), + +/***/ "j9eE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _AccordionSummary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7Y53"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _AccordionSummary__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "j9ud": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.typography.button, { + boxSizing: 'border-box', + minHeight: 36, + transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], { + duration: theme.transitions.duration.short + }), + borderRadius: '50%', + padding: 0, + minWidth: 0, + width: 56, + height: 56, + boxShadow: theme.shadows[6], + '&:active': { + boxShadow: theme.shadows[12] + }, + color: theme.palette.getContrastText(theme.palette.grey[300]), + backgroundColor: theme.palette.grey[300], + '&:hover': { + backgroundColor: theme.palette.grey.A100, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: theme.palette.grey[300] + }, + '&$disabled': { + backgroundColor: theme.palette.action.disabledBackground + }, + textDecoration: 'none' + }, + '&$focusVisible': { + boxShadow: theme.shadows[6] + }, + '&$disabled': { + color: theme.palette.action.disabled, + boxShadow: theme.shadows[0], + backgroundColor: theme.palette.action.disabledBackground + } + }), + + /* Styles applied to the span element that wraps the children. */ + label: { + width: '100%', + // assure the correct width for iOS Safari + display: 'inherit', + alignItems: 'inherit', + justifyContent: 'inherit' + }, + + /* Styles applied to the root element if `color="primary"`. */ + primary: { + color: theme.palette.primary.contrastText, + backgroundColor: theme.palette.primary.main, + '&:hover': { + backgroundColor: theme.palette.primary.dark, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: theme.palette.primary.main + } + } + }, + + /* Styles applied to the root element if `color="secondary"`. */ + secondary: { + color: theme.palette.secondary.contrastText, + backgroundColor: theme.palette.secondary.main, + '&:hover': { + backgroundColor: theme.palette.secondary.dark, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: theme.palette.secondary.main + } + } + }, + + /* Styles applied to the root element if `variant="extended"`. */ + extended: { + borderRadius: 48 / 2, + padding: '0 16px', + width: 'auto', + minHeight: 'auto', + minWidth: 48, + height: 48, + '&$sizeSmall': { + width: 'auto', + padding: '0 8px', + borderRadius: 34 / 2, + minWidth: 34, + height: 34 + }, + '&$sizeMedium': { + width: 'auto', + padding: '0 16px', + borderRadius: 40 / 2, + minWidth: 40, + height: 40 + } + }, + + /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */ + focusVisible: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit' + }, + + /* Styles applied to the root element if `size="small"``. */ + sizeSmall: { + width: 40, + height: 40 + }, + + /* Styles applied to the root element if `size="medium"``. */ + sizeMedium: { + width: 48, + height: 48 + } + }; +}; +var Fab = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Fab(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$component = props.component, + component = _props$component === void 0 ? 'button' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableFocusRi = props.disableFocusRipple, + disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, + focusVisibleClassName = props.focusVisibleClassName, + _props$size = props.size, + size = _props$size === void 0 ? 'large' : _props$size, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'circular' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["children", "classes", "className", "color", "component", "disabled", "disableFocusRipple", "focusVisibleClassName", "size", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, size !== 'large' && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))], disabled && classes.disabled, variant === 'extended' && classes.extended, { + 'primary': classes.primary, + 'secondary': classes.secondary, + 'inherit': classes.colorInherit + }[color]), + component: component, + disabled: disabled, + focusRipple: !disableFocusRipple, + focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.focusVisible, focusVisibleClassName), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.label + }, children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiFab' +})(Fab)); + +/***/ }), + +/***/ "jFsP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getEmojiByCountry = void 0; +var emojiCountry = { + fr: '🇫🇷' +}; +/** + * @param {string} country - fr, en, etc + * @param {Function} t - Translation function + * @returns {string} - Emoji of country + */ + +var getEmojiByCountry = function getEmojiByCountry(country, t) { + if (country === 'stranger') return t('country.stranger'); + return emojiCountry[country]; +}; + +exports.getEmojiByCountry = getEmojiByCountry; + +/***/ }), + +/***/ "jI5P": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +__webpack_require__("0hnX"); + +var _global = _interopRequireDefault(__webpack_require__("7Z2w")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +if (_global["default"]._babelPolyfill && typeof console !== "undefined" && console.warn) { + console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended " + "and may have consequences if different versions of the polyfills are applied sequentially. " + "If you do need to load the polyfill more than once, use @babel/polyfill/noConflict " + "instead to bypass the warning."); +} + +_global["default"]._babelPolyfill = true; + +/***/ }), + +/***/ "jIgY": +/***/ (function(module, exports) { + +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; + + +/***/ }), + +/***/ "jMfu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("YrPm"); +var callBound = __webpack_require__("KqZw"); +var inspect = __webpack_require__("6O9A"); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + /* + * Initialize the linked list as an empty node, so that we don't have + * to special-case handling of the first node: we can always refer to + * it as (previous node).next, instead of something like (list).head + */ + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; + + +/***/ }), + +/***/ "jOEl": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("qeVT") +var buildFormatLocale = __webpack_require__("9c+d") + +/** + * @category Locales + * @summary Czech locale. + * @author David Rus [@davidrus]{@link https://github.com/davidrus} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "jOHY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isReadOnly = isReadOnly; +exports.fetchOwn = fetchOwn; +exports.isForType = isForType; +exports.isDocumentReadOnly = isDocumentReadOnly; +exports.isShortcutCreatedOnTheRecipientCozy = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _intersection = _interopRequireDefault(__webpack_require__("ZyOJ")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _dsl = __webpack_require__("v2kV"); + +var _file = __webpack_require__("0nAg"); + +var _const = __webpack_require__("P3Kl"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef {object} Document - Couchdb document like an io.cozy.files + * @property {string} _id + * @property {string} id + * @property {string} _type + * @property {string} type + */ + +/** + * @typedef {('ALL'|'GET'|'PATCH'|'POST'|'PUT'|'DELETE')} PermissionVerb + */ + +/** + * @typedef {object} PermissionItem + * @property {PermissionVerb[]} verbs - ALL, GET, PUT, PATCH, DELETE, POST… + * @property {string} selector - defaults to `id` + * @property {string[]} values + * @property {string} type - a couch db database like 'io.cozy.files' + */ + +/** + * Is this permission read only ? + * + * @private + * @param {PermissionItem} perm - permission node in a io.cozy.permissions document + * @param {object} options - Options + * @param {PermissionVerb[]} [options.writability] - Writability + * @returns {boolean} true if the note should be displayed read-only + */ +function isReadOnly(perm) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$writability = options.writability, + writability = _options$writability === void 0 ? ['PATCH', 'POST', 'PUT', 'DELETE'] : _options$writability; + return perm.verbs && // no verbs is equivalent to ['ALL'] + perm.verbs.length > 0 && // empty array is equivalent to ['ALL'] + (0, _intersection.default)(perm.verbs, ['ALL'].concat((0, _toConsumableArray2.default)(writability))).length === 0; +} +/** + * Fetches the list of permissions blocks + * + * @param {CozyClient} client - + * @returns {Promise<PermissionItem[]>} list of permissions + */ + + +function fetchOwn(_x) { + return _fetchOwn.apply(this, arguments); +} +/** + * Checks if the permission item is about a specific doctype + * + * @param {PermissionItem} permission - + * @param {string} type - doctype + */ + + +function _fetchOwn() { + _fetchOwn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var collection, data, permissions; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + collection = client.collection('io.cozy.permissions'); + _context.next = 3; + return collection.fetchOwnPermissions(); + + case 3: + data = _context.sent; + permissions = (0, _get.default)(data, 'data.attributes.permissions'); + + if (permissions) { + _context.next = 7; + break; + } + + throw "Can't get self permissions"; + + case 7: + return _context.abrupt("return", Object.values(permissions)); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + return _fetchOwn.apply(this, arguments); +} + +function isForType(permission, type) { + return permission.type === type || permission.type + '.*' === type; +} +/** + * Finds the permission block for the the file + * in the permissions owned by the current cozy-client. + * + * Iterates through parent folders if needed + * until we can find the permissions attached to the share + * + * @private + * @param {object} options - Options + * @param {Document} options.document - a couchdb document + * @param {CozyClient} options.client - A cozy client + * @param {PermissionItem[]} options.permissions - + * @returns {Promise<PermissionItem|undefined>} the corresponding permission block + */ + + +function findPermissionFor(_x2) { + return _findPermissionFor2.apply(this, arguments); +} + +function _findPermissionFor2() { + _findPermissionFor2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(options) { + var document, client, permissions, id, type, doc, definedPermissions, perms, getFile, _getFile, _findPermissionFor, _findPermissionFor3; + + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _findPermissionFor3 = function _findPermissionFor5() { + _findPermissionFor3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref) { + var doc, client, perms, perm, parentId, parentFolder; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + doc = _ref.doc, client = _ref.client, perms = _ref.perms; + perm = perms.find(function (perm) { + if (perm.values) { + var selector = perm.selector || 'id'; + var value = doc[selector]; + return perm.values.includes(value); + } else { + return true; + } + }); + + if (!perm) { + _context3.next = 6; + break; + } + + return _context3.abrupt("return", perm); + + case 6: + if (!(type === _const.DOCTYPE_FILES)) { + _context3.next = 16; + break; + } + + // for files, we recursively try to check for parent folders + parentId = (0, _file.getParentFolderId)(doc); + _context3.t0 = parentId; + + if (!_context3.t0) { + _context3.next = 13; + break; + } + + _context3.next = 12; + return getFile(parentId); + + case 12: + _context3.t0 = _context3.sent; + + case 13: + parentFolder = _context3.t0; + + if (!parentFolder) { + _context3.next = 16; + break; + } + + return _context3.abrupt("return", _findPermissionFor({ + doc: parentFolder, + perms: perms, + client: client + })); + + case 16: + return _context3.abrupt("return", undefined); + + case 17: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + return _findPermissionFor3.apply(this, arguments); + }; + + _findPermissionFor = function _findPermissionFor4(_x5) { + return _findPermissionFor3.apply(this, arguments); + }; + + _getFile = function _getFile3() { + _getFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) { + var query, data; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + query = (0, _dsl.Q)(_const.DOCTYPE_FILES).getById(id); + _context2.next = 3; + return client.query(query); + + case 3: + data = _context2.sent; + return _context2.abrupt("return", data && data.data); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + return _getFile.apply(this, arguments); + }; + + getFile = function _getFile2(_x4) { + return _getFile.apply(this, arguments); + }; + + document = options.document, client = options.client, permissions = options.permissions; + id = document._id || document.id; + type = document._type || document.type; + doc = _objectSpread(_objectSpread({}, document), {}, { + id: id, + type: type + }); + + if (!permissions) { + _context4.next = 12; + break; + } + + _context4.t0 = permissions; + _context4.next = 15; + break; + + case 12: + _context4.next = 14; + return fetchOwn(client); + + case 14: + _context4.t0 = _context4.sent; + + case 15: + definedPermissions = _context4.t0; + perms = definedPermissions.filter(function (p) { + return isForType(p, type); + }); + return _context4.abrupt("return", _findPermissionFor({ + doc: doc, + client: client, + perms: perms + })); + + case 18: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + return _findPermissionFor2.apply(this, arguments); +} + +function isDocumentReadOnly(_x3) { + return _isDocumentReadOnly.apply(this, arguments); +} +/** + * When a cozy to cozy sharing is created Cozy's stack creates a + * shortcut in `/Inbox of sharing` on the recipient's cozy to have a + * quick access even when the sharing is not accepted yet. + * + * However, this file is created only if the stack knows the URL of the cozy. + * This is not always the case. + * + * This method is here to tell us if the shortcut's file is created + * on the recipient's cozy. It can be used to make an UI distinction between the + * both situation. + * + * @typedef {object} Permission + * @property {object} data Permission document + * @property {Array} included Member information from the sharing + * + * @param {Permission} permission From getOwnPermissions mainly + */ + + +function _isDocumentReadOnly() { + _isDocumentReadOnly = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(args) { + var document, client, writability, _args$permissions, permissions, perm; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + document = args.document; + client = args.client; + writability = args.writability; + _args$permissions = args.permissions; + + if (!(_args$permissions === void 0)) { + _context5.next = 10; + break; + } + + _context5.next = 7; + return fetchOwn(client); + + case 7: + _context5.t0 = _context5.sent; + _context5.next = 11; + break; + + case 10: + _context5.t0 = _args$permissions; + + case 11: + permissions = _context5.t0; + + if (!(permissions.length <= 1)) { + _context5.next = 16; + break; + } + + _context5.t1 = permissions[0] // shortcut because most of time, there will be only one permission block + ; + _context5.next = 19; + break; + + case 16: + _context5.next = 18; + return findPermissionFor({ + document: document, + client: client, + permissions: permissions + }); + + case 18: + _context5.t1 = _context5.sent; + + case 19: + perm = _context5.t1; + + if (!perm) { + _context5.next = 24; + break; + } + + return _context5.abrupt("return", isReadOnly(perm, { + writability: writability + })); + + case 24: + _logger.default.warn("can't find the document in current attached permissions"); + + return _context5.abrupt("return", undefined); + + case 26: + case "end": + return _context5.stop(); + } + } + }, _callee5); + })); + return _isDocumentReadOnly.apply(this, arguments); +} + +var isShortcutCreatedOnTheRecipientCozy = function isShortcutCreatedOnTheRecipientCozy(permission) { + if (!permission.included) return false; + var sharingMember = permission.included.find(function (item) { + return item.type === 'io.cozy.sharings.members'; + }); + + if (sharingMember && sharingMember.attributes.instance) { + return true; + } + + return false; +}; + +exports.isShortcutCreatedOnTheRecipientCozy = isShortcutCreatedOnTheRecipientCozy; + +/***/ }), + +/***/ "jOpP": +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__("eckd"); +var isObject = __webpack_require__("pFmr"); +var newPromiseCapability = __webpack_require__("D81i"); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + + +/***/ }), + +/***/ "jPZ6": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.10 Object.is(value1, value2) +var $export = __webpack_require__("LRPZ"); +$export($export.S, 'Object', { is: __webpack_require__("NMJ8") }); + + +/***/ }), + +/***/ "jTJl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cozyFetchJSON", function() { return cozyFetchJSON; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIntents", function() { return getIntents; }); +/* harmony import */ var _stack_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Kwqu"); +/** + * This file served as a proxy between the old internal stack client from the + * bar and the new stack-client included in cozy-client. It is no longer + * necessary as there is no more internal-client. It is there only temporarily + * and should be removed as soon as possible. + * + * @TODO remove this and update the tests. + */ + +/** + * Reference to the current client depending + * on which one has been initialized + * + * @private + */ + +var stack; +/** + * Get the current stack client (legacy or cozy-client based) + * based on which one has been initialized + * + * @returns {Object} functions to call the stack + */ + +var current = function current() { + if (!stack) { + throw new Error('client not initialized in cozy-bar'); + } + + return stack; +}; +/** + * Initializes the functions to call the cozy stack + * + * It can be initialized either with a cozy-client instance + * or a { cozyURL, ssl, token } tupple. + * + * @function + * @param {Object} arg + * @param {Object} arg.cozyClient - a cozy client instance + * @param {string} arg.cozyURL - URL or domain of the stack + * @param {boolean} arg.ssl - Tells if we should use a secure protocol + * required if cozyURL does not have a protocol + * @param {string} arg.token - Access token for the stack + * @param {Function} arg.onCreateApp + * @param {Function} arg.onDeleteApp + * @param {Boolean} arg.isPublic + * @returns {Promise} + */ + + +var init = function init(options) { + stack = _stack_client__WEBPACK_IMPORTED_MODULE_0__["default"]; + return stack.init(options); +}; + +var get = { + app: function app() { + var _current$get; + + return (_current$get = current().get).app.apply(_current$get, arguments); + }, + apps: function apps() { + var _current$get2; + + return (_current$get2 = current().get).apps.apply(_current$get2, arguments); + }, + context: function context() { + var _current$get3; + + return (_current$get3 = current().get).context.apply(_current$get3, arguments); + }, + storageData: function storageData() { + var _current$get4; + + return (_current$get4 = current().get).storageData.apply(_current$get4, arguments); + }, + iconProps: function iconProps() { + var _current$get5; + + return (_current$get5 = current().get).iconProps.apply(_current$get5, arguments); + }, + cozyURL: function cozyURL() { + var _current$get6; + + return (_current$get6 = current().get).cozyURL.apply(_current$get6, arguments); + }, + settingsAppURL: function settingsAppURL() { + var _current$get7; + + return (_current$get7 = current().get).settingsAppURL.apply(_current$get7, arguments); + } +}; +var stackProxy = { + init: init, + get: get, + updateAccessToken: function updateAccessToken() { + var _current; + + return (_current = current()).updateAccessToken.apply(_current, arguments); + }, + logout: function logout() { + var _current2; + + return (_current2 = current()).logout.apply(_current2, arguments); + }, + cozyFetchJSON: function cozyFetchJSON() { + var _current3; + + return (_current3 = current()).cozyFetchJSON.apply(_current3, arguments); + }, + // useful to connect some getters outside of this file without exposing + // directly the private stack variable + getStack: current, + getIntents: function getIntents() { + return current().get.intents(); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (stackProxy); +var cozyFetchJSON = stackProxy.cozyFetchJSON, + getIntents = stackProxy.getIntents; + + +/***/ }), + +/***/ "jUvS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayLikeToArray; }); +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; +} + +/***/ }), + +/***/ "jVdS": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'] + var weekdays2char = ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'] + var weekdays3char = ['neď', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'] + var weekdaysFull = ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: jan, feb, ..., dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: január, február, ..., december + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: ne, po, ..., so + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: neď, pon, ..., sob + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: neďeľa, pondelok, ..., sobota + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "jaXZ": +/***/ (function(module, exports, __webpack_require__) { + +var compareAscending = __webpack_require__("YIwv"); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; + + +/***/ }), + +/***/ "jaz0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ServerStyleSheets; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("FkRJ"); +/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("j3u0"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("b0ha"); +/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("6P1f"); +/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("pqMe"); + + + + + + + + +var ServerStyleSheets = /*#__PURE__*/function () { + function ServerStyleSheets() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ServerStyleSheets); + + this.options = options; + } + + Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(ServerStyleSheets, [{ + key: "collect", + value: function collect(children) { + // This is needed in order to deduplicate the injection of CSS in the page. + var sheetsManager = new Map(); // This is needed in order to inject the critical CSS. + + this.sheetsRegistry = new jss__WEBPACK_IMPORTED_MODULE_4__["SheetsRegistry"](); // A new class name generator + + var generateClassName = Object(_createGenerateClassName__WEBPACK_IMPORTED_MODULE_6__["default"])(); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_StylesProvider__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + sheetsManager: sheetsManager, + serverGenerateClassName: generateClassName, + sheetsRegistry: this.sheetsRegistry + }, this.options), children); + } + }, { + key: "toString", + value: function toString() { + return this.sheetsRegistry ? this.sheetsRegistry.toString() : ''; + } + }, { + key: "getStyleElement", + value: function getStyleElement(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement('style', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + id: 'jss-server-side', + key: 'jss-server-side', + dangerouslySetInnerHTML: { + __html: this.toString() + } + }, props)); + } + }]); + + return ServerStyleSheets; +}(); + + + +/***/ }), + +/***/ "jcOJ": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.13 Object.isSealed(O) +var isObject = __webpack_require__("pFmr"); + +__webpack_require__("80eX")('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + + +/***/ }), + +/***/ "jd52": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.11 Object.isExtensible(O) +var isObject = __webpack_require__("pFmr"); + +__webpack_require__("80eX")('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + + +/***/ }), + +/***/ "jdmM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REMOTE_ORG_ECOLYO_DJU = void 0; +var REMOTE_ORG_ECOLYO_DJU = '/remote/org.ecolyo.dju_v2'; +exports.REMOTE_ORG_ECOLYO_DJU = REMOTE_ORG_ECOLYO_DJU; + +/***/ }), + +/***/ "jeSS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $defineProperty = __webpack_require__("GwHQ"); +var createDesc = __webpack_require__("nVWS"); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + + +/***/ }), + +/***/ "jgQC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.11 String.prototype.small() +__webpack_require__("A7oe")('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + + +/***/ }), + +/***/ "jiHV": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'less than a second', + other: 'less than {{count}} seconds' + }, + + xSeconds: { + one: '1 second', + other: '{{count}} seconds' + }, + + halfAMinute: 'half a minute', + + lessThanXMinutes: { + one: 'less than a minute', + other: 'less than {{count}} minutes' + }, + + xMinutes: { + one: '1 minute', + other: '{{count}} minutes' + }, + + aboutXHours: { + one: 'about 1 hour', + other: 'about {{count}} hours' + }, + + xHours: { + one: '1 hour', + other: '{{count}} hours' + }, + + xDays: { + one: '1 day', + other: '{{count}} days' + }, + + aboutXMonths: { + one: 'about 1 month', + other: 'about {{count}} months' + }, + + xMonths: { + one: '1 month', + other: '{{count}} months' + }, + + aboutXYears: { + one: 'about 1 year', + other: 'about {{count}} years' + }, + + xYears: { + one: '1 year', + other: '{{count}} years' + }, + + overXYears: { + one: 'over 1 year', + other: 'over {{count}} years' + }, + + almostXYears: { + one: 'almost 1 year', + other: 'almost {{count}} years' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'in ' + result + } else { + return result + ' ago' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "jiRl": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("zthh") +var buildFormatLocale = __webpack_require__("qi+F") + +/** + * @category Locales + * @summary Spanish locale. + * @author Juan Angosto [@juanangosto]{@link https://github.com/juanangosto} + * @author Guillermo Grau [@guigrpa]{@link https://github.com/guigrpa} + * @author Fernando Agüero [@fjaguero]{@link https://github.com/fjaguero} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "jiof": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("/a52"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _InputBase__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "jlvQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _CSSTransition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("AhYZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSTransition", function() { return _CSSTransition__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _ReplaceTransition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("BBeL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaceTransition", function() { return _ReplaceTransition__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _SwitchTransition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rqvO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SwitchTransition", function() { return _SwitchTransition__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _TransitionGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("nJpz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransitionGroup", function() { return _TransitionGroup__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("lbMJ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return _Transition__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ZxWb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + + + + + + + + +/***/ }), + +/***/ "jm00": +/***/ (function(module, exports) { + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} + +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "joyL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Ds3E"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TextareaAutosize__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "jpom": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP_REC = exports.REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP = void 0; +var REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP = '/remote/org.ecolyo.agent.custom.popup'; +exports.REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP = REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP; +var REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP_REC = '/remote/org.ecolyo.agent.custom.popup.rec'; +exports.REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP_REC = REMOTE_ORG_ECOLYO_AGENT_CUSTOM_POPUP_REC; + +/***/ }), + +/***/ "jy+r": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function() { return addBreadcrumb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "captureEvent", function() { return captureEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "captureException", function() { return captureException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "captureMessage", function() { return captureMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configureScope", function() { return configureScope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return setContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExtra", function() { return setExtra; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExtras", function() { return setExtras; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTag", function() { return setTag; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTags", function() { return setTags; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUser", function() { return setUser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startTransaction", function() { return startTransaction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withScope", function() { return withScope; }); +/* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("l3L7"); + + +// Note: All functions in this file are typed with a return value of `ReturnType<Hub[HUB_FUNCTION]>`, +// where HUB_FUNCTION is some method on the Hub class. +// +// This is done to make sure the top level SDK methods stay in sync with the hub methods. +// Although every method here has an explicit return type, some of them (that map to void returns) do not +// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable. + +/** + * Captures an exception event and sends it to Sentry. + * + * @param exception An exception-like object. + * @param captureContext Additional scope data to apply to exception event. + * @returns The generated eventId. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types +function captureException(exception, captureContext) { + return Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().captureException(exception, { captureContext }); +} + +/** + * Captures a message event and sends it to Sentry. + * + * @param message The message to send to Sentry. + * @param Severity Define the level of the message. + * @returns The generated eventId. + */ +function captureMessage( + message, + // eslint-disable-next-line deprecation/deprecation + captureContext, +) { + // This is necessary to provide explicit scopes upgrade, without changing the original + // arity of the `captureMessage(message, level)` method. + const level = typeof captureContext === 'string' ? captureContext : undefined; + const context = typeof captureContext !== 'string' ? { captureContext } : undefined; + return Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().captureMessage(message, level, context); +} + +/** + * Captures a manually created event and sends it to Sentry. + * + * @param event The event to send to Sentry. + * @returns The generated eventId. + */ +function captureEvent(event, hint) { + return Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().captureEvent(event, hint); +} + +/** + * Callback to set context information onto the scope. + * @param callback Callback function that receives Scope. + */ +function configureScope(callback) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().configureScope(callback); +} + +/** + * Records a new breadcrumb which will be attached to future events. + * + * Breadcrumbs will be added to subsequent events to provide more context on + * user's actions prior to an error or crash. + * + * @param breadcrumb The breadcrumb to record. + */ +function addBreadcrumb(breadcrumb) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().addBreadcrumb(breadcrumb); +} + +/** + * Sets context data with the given name. + * @param name of the context + * @param context Any kind of data. This data will be normalized. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setContext(name, context) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setContext(name, context); +} + +/** + * Set an object that will be merged sent as extra data with the event. + * @param extras Extras object to merge into current context. + */ +function setExtras(extras) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setExtras(extras); +} + +/** + * Set key:value that will be sent as extra data with the event. + * @param key String of extra + * @param extra Any kind of data. This data will be normalized. + */ +function setExtra(key, extra) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setExtra(key, extra); +} + +/** + * Set an object that will be merged sent as tags data with the event. + * @param tags Tags context object to merge into current context. + */ +function setTags(tags) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setTags(tags); +} + +/** + * Set key:value that will be sent as tags data with the event. + * + * Can also be used to unset a tag, by passing `undefined`. + * + * @param key String key of tag + * @param value Value of tag + */ +function setTag(key, value) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setTag(key, value); +} + +/** + * Updates user context information for future events. + * + * @param user User context object to be set in the current context. Pass `null` to unset the user. + */ +function setUser(user) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().setUser(user); +} + +/** + * Creates a new scope with and executes the given operation within. + * The scope is automatically removed once the operation + * finishes or throws. + * + * This is essentially a convenience function for: + * + * pushScope(); + * callback(); + * popScope(); + * + * @param callback that will be enclosed into push/popScope. + */ +function withScope(callback) { + Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().withScope(callback); +} + +/** + * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. + * + * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a + * new child span within the transaction or any span, call the respective `.startChild()` method. + * + * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. + * + * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its + * finished child spans will be sent to Sentry. + * + * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call + * `startTransaction` directly on the hub. + * + * @param context Properties of the new `Transaction`. + * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent + * default values). See {@link Options.tracesSampler}. + * + * @returns The transaction which was just started + */ +function startTransaction( + context, + customSamplingContext, +) { + return Object(_hub_js__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().startTransaction({ ...context }, customSamplingContext); +} + + +//# sourceMappingURL=exports.js.map + + +/***/ }), + +/***/ "jyuR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EGL_MONTH_DOCTYPE = void 0; +var EGL_MONTH_DOCTYPE = 'com.grandlyon.egl.month'; +exports.EGL_MONTH_DOCTYPE = EGL_MONTH_DOCTYPE; + +/***/ }), + +/***/ "k/LV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + padding: 8 + }, + + /* Styles applied to the root element if `disableSpacing={false}`. */ + spacing: { + '& > :not(:first-child)': { + marginLeft: 8 + } + } +}; +var CardActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CardActions(props, ref) { + var _props$disableSpacing = props.disableSpacing, + disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing, + classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["disableSpacing", "classes", "className"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, !disableSpacing && classes.spacing), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiCardActions' +})(CardActions)); + +/***/ }), + +/***/ "k0TX": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.33 Math.tanh(x) +var $export = __webpack_require__("LRPZ"); +var expm1 = __webpack_require__("2uU8"); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + + +/***/ }), + +/***/ "k1vQ": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ +(function(window, document, exportName, undefined) { + 'use strict'; + +var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = document.createElement('div'); + +var TYPE_FUNCTION = 'function'; + +var round = Math.round; +var abs = Math.abs; +var now = Date.now; + +/** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ +function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); +} + +/** + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; +} + +/** + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; + } + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } +} + +/** + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ +function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function() { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ +var assign; +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; +} else { + assign = Object.assign; +} + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ +var extend = deprecate(function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; +}, 'extend', 'Use `assign`.'); + +/** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +var merge = deprecate(function merge(dest, src) { + return extend(dest, src, true); +}, 'merge', 'Use `assign`.'); + +/** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign(childP, properties); + } +} + +/** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} + +/** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} + +/** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; + } + return false; +} + +/** + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; + } + i++; + } + return -1; + } +} + +/** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } + + return results; +} + +/** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ +function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; + } + return undefined; +} + +/** + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} + +/** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); +} + +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + +var SUPPORT_TOUCH = ('ontouchstart' in window); +var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; + +var COMPUTE_INTERVAL = 25; + +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; + +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; + +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; + +/** + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ +function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + +} + +Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function() { }, + + /** + * bind the events + */ + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + + /** + * unbind the events + */ + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } +}; + +/** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); +} + +/** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + + manager.recognize(input); + manager.session.prevInput = input; +} + +/** + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; + + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + + computeIntervalInputData(session, input); + + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} + +function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); +} + +/** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; + + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} + +/** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; +} + +/** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +function getCenter(pointers) { + var pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} + +/** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} + +/** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} + +/** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); +} + +/** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} + +/** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} + +/** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} + +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; + +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + +/** + * Mouse events input + * @constructor + * @extends Input + */ +function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; + + this.pressed = false; // mousedown state + + Input.apply(this, arguments); +} + +inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down + if (!this.pressed) { + return; + } + + if (eventType & INPUT_END) { + this.pressed = false; + } + + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +}); + +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL +}; + +// in IE10 the pointer types is defined as an enum +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; + +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; +} + +/** + * Pointer events input + * @constructor + * @extends Input + */ +function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + + Input.apply(this, arguments); + + this.store = (this.manager.session.pointerEvents = []); +} + +inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; + + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + + var isTouch = (pointerType == INPUT_TYPE_TOUCH); + + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +}); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Touch events input + * @constructor + * @extends Input + */ +function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; + + Input.apply(this, arguments); +} + +inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + + if (!this.started) { + return; + } + + var touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + + return [all, changed]; +} + +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Multi-user touch events input + * @constructor + * @extends Input + */ +function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; + + Input.apply(this, arguments); +} + +inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); + +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; +} + +/** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + +var DEDUP_TIMEOUT = 2500; +var DEDUP_DISTANCE = 25; + +function TouchMouseInput() { + Input.apply(this, arguments); + + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); + + this.primaryTouch = null; + this.lastTouches = []; +} + +inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); + + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } + + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; + } + + this.callback(manager, inputEvent, inputData); + }, + + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +}); + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} + +function setLastTouch(eventData) { + var touch = eventData.changedPointers[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = {x: touch.clientX, y: touch.clientY}; + this.lastTouches.push(lastTouch); + var lts = this.lastTouches; + var removeLastTouch = function() { + var i = lts.indexOf(lastTouch); + if (i > -1) { + lts.splice(i, 1); + } + }; + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + +function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; +} + +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + +// magical touchAction value +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; +var TOUCH_ACTION_MAP = getTouchActionProps(); + +/** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +function TouchAction(manager, value) { + this.manager = manager; + this.set(value); +} + +TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, + + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, + + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + + if (hasNone) { + //do not prevent defaults if this is a tap gesture + + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, + + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +}; + +/** + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; +} + +function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + var touchMap = {}; + var cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { + + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} + +/** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); + + this.id = uniqueId(); + + this.manager = null; + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + + this.state = STATE_POSSIBLE; + + this.simultaneous = {}; + this.requireFail = []; +} + +Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + assign(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, + + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, + + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, + + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, + + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, + + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; + + function emit(event) { + self.manager.emit(event, input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }, + + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, + + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } +}; + +/** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} + +/** + * direction cons to string + * @param {Const} direction + * @returns {String} + */ +function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} + +/** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; +} + +/** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +function AttrRecognizer() { + Recognizer.apply(this, arguments); +} + +inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, + + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, + + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; + + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +}); + +/** + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function PanRecognizer() { + AttrRecognizer.apply(this, arguments); + + this.pX = null; + this.pY = null; +} + +inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, + + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, + + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, + + emit: function(input) { + + this.pX = input.deltaX; + this.pY = input.deltaY; + + var direction = directionStr(input.direction); + + if (direction) { + input.additionalEvent = this.options.event + direction; + } + this._super.emit.call(this, input); + } +}); + +/** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + + emit: function(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + this._super.emit.call(this, input); + } +}); + +/** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +function PressRecognizer() { + Recognizer.apply(this, arguments); + + this._timer = null; + this._input = null; +} + +inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 251, // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low + }, + + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, + + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +}); + +/** + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ +function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); +} + +inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, + + attrTest: function(input) { + var direction = this.options.direction; + var velocity; + + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + + return this._super.attrTest.call(this, input) && + direction & input.offsetDirection && + input.distance > this.options.threshold && + input.maxPointers == this.options.pointers && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, + + emit: function(input) { + var direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } +}); + +/** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +function TapRecognizer() { + Recognizer.apply(this, arguments); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + + this._timer = null; + this._input = null; + this.count = 0; +} + +inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 9, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, + + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, + + process: function(input) { + var options = this.options; + + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + + this.reset(); + + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } + + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + + this.pTime = input.timeStamp; + this.pCenter = input.center; + + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, + + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, + + reset: function() { + clearTimeout(this._timer); + }, + + emit: function() { + if (this.state == STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +}); + +/** + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); +} + +/** + * @const {string} + */ +Hammer.VERSION = '2.0.7'; + +/** + * default settings + * @namespace + */ +Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + + /** + * @type {Boolean} + * @default true + */ + enable: true, + + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, {enable: false}], + [PinchRecognizer, {enable: false}, ['rotate']], + [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], + [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], + [TapRecognizer], + [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], + [PressRecognizer] + ], + + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } +}; + +var STOP = 1; +var FORCED_STOP = 2; + +/** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Manager(element, options) { + this.options = assign({}, Hammer.defaults, options || {}); + + this.options.inputTarget = this.options.inputTarget || element; + + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + + toggleCssProps(this, true); + + each(this.options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); +} + +Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + assign(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + + var recognizer; + var recognizers = this.recognizers; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } + + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, + + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, + + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } + + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; + }, + + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } + + recognizer = this.get(recognizer); + + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }, + + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + if (events === undefined) { + return; + } + if (handler === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + if (events === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; + + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } +}; + +/** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + var element = manager.element; + if (!element.style) { + return; + } + var prop; + each(manager.options.cssProps, function(value, name) { + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ''; + } + }); + if (!add) { + manager.oldCssProps = {}; + } +} + +/** + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + +assign(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + assign: assign, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed +}); + +// this prevents errors when Hammer is loaded in the presence of an AMD +// style loader but by script tag, not by the loader. +var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line +freeGlobal.Hammer = Hammer; + +if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return Hammer; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else {} + +})(window, document, 'Hammer'); + + +/***/ }), + +/***/ "k2CL": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = __webpack_require__("LRPZ"); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + + +/***/ }), + +/***/ "k31y": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ll/m"); +/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("q3D2"); +/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("UHhX"); +/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("NeVb"); +/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("V6W0"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("VHzf"); + + + + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + '@media print': { + // Use !important to override the Modal inline-style. + position: 'absolute !important' + } + }, + + /* Styles applied to the container element if `scroll="paper"`. */ + scrollPaper: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center' + }, + + /* Styles applied to the container element if `scroll="body"`. */ + scrollBody: { + overflowY: 'auto', + overflowX: 'hidden', + textAlign: 'center', + '&:after': { + content: '""', + display: 'inline-block', + verticalAlign: 'middle', + height: '100%', + width: '0' + } + }, + + /* Styles applied to the container element. */ + container: { + height: '100%', + '@media print': { + height: 'auto' + }, + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0 + }, + + /* Styles applied to the `Paper` component. */ + paper: { + margin: 32, + position: 'relative', + overflowY: 'auto', + // Fix IE 11 issue, to remove at some point. + '@media print': { + overflowY: 'visible', + boxShadow: 'none' + } + }, + + /* Styles applied to the `Paper` component if `scroll="paper"`. */ + paperScrollPaper: { + display: 'flex', + flexDirection: 'column', + maxHeight: 'calc(100% - 64px)' + }, + + /* Styles applied to the `Paper` component if `scroll="body"`. */ + paperScrollBody: { + display: 'inline-block', + verticalAlign: 'middle', + textAlign: 'left' // 'initial' doesn't work on IE 11 + + }, + + /* Styles applied to the `Paper` component if `maxWidth=false`. */ + paperWidthFalse: { + maxWidth: 'calc(100% - 64px)' + }, + + /* Styles applied to the `Paper` component if `maxWidth="xs"`. */ + paperWidthXs: { + maxWidth: Math.max(theme.breakpoints.values.xs, 444), + '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), { + maxWidth: 'calc(100% - 64px)' + }) + }, + + /* Styles applied to the `Paper` component if `maxWidth="sm"`. */ + paperWidthSm: { + maxWidth: theme.breakpoints.values.sm, + '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), { + maxWidth: 'calc(100% - 64px)' + }) + }, + + /* Styles applied to the `Paper` component if `maxWidth="md"`. */ + paperWidthMd: { + maxWidth: theme.breakpoints.values.md, + '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), { + maxWidth: 'calc(100% - 64px)' + }) + }, + + /* Styles applied to the `Paper` component if `maxWidth="lg"`. */ + paperWidthLg: { + maxWidth: theme.breakpoints.values.lg, + '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), { + maxWidth: 'calc(100% - 64px)' + }) + }, + + /* Styles applied to the `Paper` component if `maxWidth="xl"`. */ + paperWidthXl: { + maxWidth: theme.breakpoints.values.xl, + '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), { + maxWidth: 'calc(100% - 64px)' + }) + }, + + /* Styles applied to the `Paper` component if `fullWidth={true}`. */ + paperFullWidth: { + width: 'calc(100% - 64px)' + }, + + /* Styles applied to the `Paper` component if `fullScreen={true}`. */ + paperFullScreen: { + margin: 0, + width: '100%', + maxWidth: '100%', + height: '100%', + maxHeight: 'none', + borderRadius: 0, + '&$paperScrollBody': { + margin: 0, + maxWidth: '100%' + } + } + }; +}; +var defaultTransitionDuration = { + enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_12__["duration"].enteringScreen, + exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_12__["duration"].leavingScreen +}; +/** + * Dialogs are overlaid modal paper based components with a backdrop. + */ + +var Dialog = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Dialog(props, ref) { + var BackdropProps = props.BackdropProps, + children = props.children, + classes = props.classes, + className = props.className, + _props$disableBackdro = props.disableBackdropClick, + disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro, + _props$disableEscapeK = props.disableEscapeKeyDown, + disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK, + _props$fullScreen = props.fullScreen, + fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$maxWidth = props.maxWidth, + maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth, + onBackdropClick = props.onBackdropClick, + onClose = props.onClose, + onEnter = props.onEnter, + onEntered = props.onEntered, + onEntering = props.onEntering, + onEscapeKeyDown = props.onEscapeKeyDown, + onExit = props.onExit, + onExited = props.onExited, + onExiting = props.onExiting, + open = props.open, + _props$PaperComponent = props.PaperComponent, + PaperComponent = _props$PaperComponent === void 0 ? _Paper__WEBPACK_IMPORTED_MODULE_13__["default"] : _props$PaperComponent, + _props$PaperProps = props.PaperProps, + PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps, + _props$scroll = props.scroll, + scroll = _props$scroll === void 0 ? 'paper' : _props$scroll, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Fade__WEBPACK_IMPORTED_MODULE_11__["default"] : _props$TransitionComp, + _props$transitionDura = props.transitionDuration, + transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura, + TransitionProps = props.TransitionProps, + ariaDescribedby = props['aria-describedby'], + ariaLabelledby = props['aria-labelledby'], + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["BackdropProps", "children", "classes", "className", "disableBackdropClick", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClose", "onEnter", "onEntered", "onEntering", "onEscapeKeyDown", "onExit", "onExited", "onExiting", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps", "aria-describedby", "aria-labelledby"]); + + var mouseDownTarget = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](); + + var handleMouseDown = function handleMouseDown(event) { + mouseDownTarget.current = event.target; + }; + + var handleBackdropClick = function handleBackdropClick(event) { + // Ignore the events not coming from the "backdrop" + // We don't want to close the dialog when clicking the dialog content. + if (event.target !== event.currentTarget) { + return; + } // Make sure the event starts and ends on the same DOM element. + + + if (event.target !== mouseDownTarget.current) { + return; + } + + mouseDownTarget.current = null; + + if (onBackdropClick) { + onBackdropClick(event); + } + + if (!disableBackdropClick && onClose) { + onClose(event, 'backdropClick'); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_Modal__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + BackdropComponent: _Backdrop__WEBPACK_IMPORTED_MODULE_10__["default"], + BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + transitionDuration: transitionDuration + }, BackdropProps), + closeAfterTransition: true + }, disableBackdropClick ? { + disableBackdropClick: disableBackdropClick + } : {}, { + disableEscapeKeyDown: disableEscapeKeyDown, + onEscapeKeyDown: onEscapeKeyDown, + onClose: onClose, + open: open, + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + appear: true, + in: open, + timeout: transitionDuration, + onEnter: onEnter, + onEntering: onEntering, + onEntered: onEntered, + onExit: onExit, + onExiting: onExiting, + onExited: onExited, + role: "none presentation" + }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.container, classes["scroll".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(scroll))]), + onMouseUp: handleBackdropClick, + onMouseDown: handleMouseDown + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](PaperComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + elevation: 24, + role: "dialog", + "aria-describedby": ariaDescribedby, + "aria-labelledby": ariaLabelledby + }, PaperProps, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.paper, classes["paperScroll".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(scroll))], classes["paperWidth".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth) + }), children)))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiDialog' +})(Dialog)); + +/***/ }), + +/***/ "k6oj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var toObject = __webpack_require__("05TQ"); +var toPrimitive = __webpack_require__("Tven"); + +$export($export.P + $export.F * __webpack_require__("enc5")(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + + +/***/ }), + +/***/ "k8qK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldDisableAutoInstrumentation", function() { return shouldDisableAutoInstrumentation; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); + + +/** + * Check if Sentry auto-instrumentation should be disabled. + * + * @param getCurrentHub A method to fetch the current hub + * @returns boolean + */ +function shouldDisableAutoInstrumentation(getCurrentHub) { + const clientOptions = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([getCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]); + const instrumenter = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([clientOptions, 'optionalAccess', _6 => _6.instrumenter]) || 'sentry'; + + return instrumenter !== 'sentry'; +} + + +//# sourceMappingURL=node-utils.js.map + + +/***/ }), + +/***/ "kMOt": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppItemPlaceholder", function() { return AppItemPlaceholder; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var AppItemPlaceholder = function AppItemPlaceholder() { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", { + className: "coz-nav-apps-item" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { + role: "menuitem", + disabled: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-apps-item-icon coz-loading-placeholder" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", { + className: "coz-label coz-loading-placeholder" + }))); +}; +/* harmony default export */ __webpack_exports__["default"] = (AppItemPlaceholder); + +/***/ }), + +/***/ "kNUc": +/***/ (function(module, exports, __webpack_require__) { + +var mapCacheClear = __webpack_require__("OvQD"), + mapCacheDelete = __webpack_require__("gYS1"), + mapCacheGet = __webpack_require__("u7v4"), + mapCacheHas = __webpack_require__("ZFuC"), + mapCacheSet = __webpack_require__("NmSH"); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; + + +/***/ }), + +/***/ "kNwn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlobalHandlers", function() { return GlobalHandlers; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Bp2Q"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("uDQB"); + + + + + +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ + +/** Global handlers */ +class GlobalHandlers { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'GlobalHandlers';} + + /** + * @inheritDoc + */ + __init() {this.name = GlobalHandlers.id;} + + /** JSDoc */ + + /** + * Stores references functions to installing handlers. Will set to undefined + * after they have been run so that they are not used twice. + */ + __init2() {this._installFunc = { + onerror: _installGlobalOnErrorHandler, + onunhandledrejection: _installGlobalOnUnhandledRejectionHandler, + };} + + /** JSDoc */ + constructor(options) {;GlobalHandlers.prototype.__init.call(this);GlobalHandlers.prototype.__init2.call(this); + this._options = { + onerror: true, + onunhandledrejection: true, + ...options, + }; + } + /** + * @inheritDoc + */ + setupOnce() { + Error.stackTraceLimit = 50; + const options = this._options; + + // We can disable guard-for-in as we construct the options object above + do checks against + // `this._installFunc` for the property. + // eslint-disable-next-line guard-for-in + for (const key in options) { + const installFunc = this._installFunc[key ]; + if (installFunc && options[key ]) { + globalHandlerLog(key); + installFunc(); + this._installFunc[key ] = undefined; + } + } + } +} GlobalHandlers.__initStatic(); + +/** JSDoc */ +function _installGlobalOnErrorHandler() { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])( + 'error', + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (data) => { + const [hub, stackParser, attachStacktrace] = getHubAndOptions(); + if (!hub.getIntegration(GlobalHandlers)) { + return; + } + const { msg, url, line, column, error } = data; + if (Object(_helpers_js__WEBPACK_IMPORTED_MODULE_3__["shouldIgnoreOnError"])() || (error && error.__sentry_own_request__)) { + return; + } + + const event = + error === undefined && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isString"])(msg) + ? _eventFromIncompleteOnError(msg, url, line, column) + : _enhanceEventWithInitialFrame( + Object(_eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__["eventFromUnknownInput"])(stackParser, error || msg, undefined, attachStacktrace, false), + url, + line, + column, + ); + + event.level = 'error'; + + addMechanismAndCapture(hub, error, event, 'onerror'); + }, + ); +} + +/** JSDoc */ +function _installGlobalOnUnhandledRejectionHandler() { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])( + 'unhandledrejection', + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (e) => { + const [hub, stackParser, attachStacktrace] = getHubAndOptions(); + if (!hub.getIntegration(GlobalHandlers)) { + return; + } + let error = e; + + // dig the object of the rejection out of known event types + try { + // PromiseRejectionEvents store the object of the rejection under 'reason' + // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent + if ('reason' in e) { + error = e.reason; + } + // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents + // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into + // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec + // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and + // https://github.com/getsentry/sentry-javascript/issues/2380 + else if ('detail' in e && 'reason' in e.detail) { + error = e.detail.reason; + } + } catch (_oO) { + // no-empty + } + + if (Object(_helpers_js__WEBPACK_IMPORTED_MODULE_3__["shouldIgnoreOnError"])() || (error && error.__sentry_own_request__)) { + return true; + } + + const event = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isPrimitive"])(error) + ? _eventFromRejectionWithPrimitive(error) + : Object(_eventbuilder_js__WEBPACK_IMPORTED_MODULE_2__["eventFromUnknownInput"])(stackParser, error, undefined, attachStacktrace, true); + + event.level = 'error'; + + addMechanismAndCapture(hub, error, event, 'onunhandledrejection'); + return; + }, + ); +} + +/** + * Create an event from a promise rejection where the `reason` is a primitive. + * + * @param reason: The `reason` property of the promise rejection + * @returns An Event object with an appropriate `exception` value + */ +function _eventFromRejectionWithPrimitive(reason) { + return { + exception: { + values: [ + { + type: 'UnhandledRejection', + // String() is needed because the Primitive type includes symbols (which can't be automatically stringified) + value: `Non-Error promise rejection captured with value: ${String(reason)}`, + }, + ], + }, + }; +} + +/** + * This function creates a stack from an old, error-less onerror handler. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _eventFromIncompleteOnError(msg, url, line, column) { + const ERROR_TYPES_RE = + /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i; + + // If 'message' is ErrorEvent, get real message from inside + let message = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isErrorEvent"])(msg) ? msg.message : msg; + let name = 'Error'; + + const groups = message.match(ERROR_TYPES_RE); + if (groups) { + name = groups[1]; + message = groups[2]; + } + + const event = { + exception: { + values: [ + { + type: name, + value: message, + }, + ], + }, + }; + + return _enhanceEventWithInitialFrame(event, url, line, column); +} + +/** JSDoc */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _enhanceEventWithInitialFrame(event, url, line, column) { + // event.exception + const e = (event.exception = event.exception || {}); + // event.exception.values + const ev = (e.values = e.values || []); + // event.exception.values[0] + const ev0 = (ev[0] = ev[0] || {}); + // event.exception.values[0].stacktrace + const ev0s = (ev0.stacktrace = ev0.stacktrace || {}); + // event.exception.values[0].stacktrace.frames + const ev0sf = (ev0s.frames = ev0s.frames || []); + + const colno = isNaN(parseInt(column, 10)) ? undefined : column; + const lineno = isNaN(parseInt(line, 10)) ? undefined : line; + const filename = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isString"])(url) && url.length > 0 ? url : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getLocationHref"])(); + + // event.exception.values[0].stacktrace.frames + if (ev0sf.length === 0) { + ev0sf.push({ + colno, + filename, + function: '?', + in_app: true, + lineno, + }); + } + + return event; +} + +function globalHandlerLog(type) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(`Global Handler attached: ${type}`); +} + +function addMechanismAndCapture(hub, error, event, type) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionMechanism"])(event, { + handled: false, + type, + }); + hub.captureEvent(event, { + originalException: error, + }); +} + +function getHubAndOptions() { + const hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])(); + const client = hub.getClient(); + const options = (client && client.getOptions()) || { + stackParser: () => [], + attachStacktrace: false, + }; + return [hub, options.stackParser, options.attachStacktrace]; +} + + +//# sourceMappingURL=globalhandlers.js.map + + +/***/ }), + +/***/ "kPjA": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("+5Qr") +var buildFormatLocale = __webpack_require__("y4fA") + +/** + * @category Locales + * @summary Finnish locale. + * @author Pyry-Samuli Lahti [@Pyppe]{@link https://github.com/Pyppe} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "kSPP": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqualDeep = __webpack_require__("Cz70"), + isObjectLike = __webpack_require__("S5PF"); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; + + +/***/ }), + +/***/ "kSXV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $some = __webpack_require__("7NDg")(3); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "kTya": +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__("D8Vt"), + baseAssignValue = __webpack_require__("mKCr"); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; + + +/***/ }), + +/***/ "kchN": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["FunctionToString"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hub", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["Hub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["InboundFilters"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["SDK_VERSION"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["Scope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["addBreadcrumb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["addGlobalEventProcessor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureEvent", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["captureEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureException", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["captureException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureMessage", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["captureMessage"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "configureScope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["configureScope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransport", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["createTransport"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCurrentHub", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["getHubFromCarrier"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeMain", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["makeMain"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtra", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setExtra"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtras", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setExtras"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTag", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setTag"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTags", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setTags"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUser", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["setUser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startTransaction", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["startTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withScope", function() { return _sentry_core__WEBPACK_IMPORTED_MODULE_0__["withScope"]; }); + +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("uDQB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WINDOW", function() { return _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"]; }); + +/* harmony import */ var _client_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Tyf5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserClient", function() { return _client_js__WEBPACK_IMPORTED_MODULE_2__["BrowserClient"]; }); + +/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("9Qlz"); +/* harmony import */ var _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("wR54"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chromeStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["chromeStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackLineParsers", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["defaultStackLineParsers"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultStackParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["defaultStackParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geckoStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["geckoStackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera10StackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["opera10StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "opera11StackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["opera11StackLineParser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "winjsStackLineParser", function() { return _stack_parsers_js__WEBPACK_IMPORTED_MODULE_4__["winjsStackLineParser"]; }); + +/* harmony import */ var _sdk_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("sfhW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "close", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["close"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["defaultIntegrations"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["flush"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLoad", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["forceLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "init", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["init"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastEventId", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["lastEventId"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["onLoad"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "showReportDialog", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["showReportDialog"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_5__["wrap"]; }); + +/* harmony import */ var _integrations_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("4fos"); + + + + + + + + +; + +; +; +//# sourceMappingURL=exports.js.map + + +/***/ }), + +/***/ "kdnj": +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), + +/***/ "ke25": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseClient", function() { return BaseClient; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2kdj"); +/* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("i5Ys"); +/* harmony import */ var _integration_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("aBal"); +/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Hk8K"); +/* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("xTjI"); + + + + + + + +const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; + +/** + * Base implementation for all JavaScript SDK clients. + * + * Call the constructor with the corresponding options + * specific to the client subclass. To access these options later, use + * {@link Client.getOptions}. + * + * If a Dsn is specified in the options, it will be parsed and stored. Use + * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is + * invalid, the constructor will throw a {@link SentryException}. Note that + * without a valid Dsn, the SDK will not send any events to Sentry. + * + * Before sending an event, it is passed through + * {@link BaseClient._prepareEvent} to add SDK information and scope data + * (breadcrumbs and context). To add more custom information, override this + * method and extend the resulting prepared event. + * + * To issue automatically created events (e.g. via instrumentation), use + * {@link Client.captureEvent}. It will prepare the event and pass it through + * the callback lifecycle. To issue auto-breadcrumbs, use + * {@link Client.addBreadcrumb}. + * + * @example + * class NodeClient extends BaseClient<NodeOptions> { + * public constructor(options: NodeOptions) { + * super(options); + * } + * + * // ... + * } + */ +class BaseClient { + /** Options passed to the SDK. */ + + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + + /** Array of set up integrations. */ + __init() {this._integrations = {};} + + /** Indicates whether this client's integrations have been set up. */ + __init2() {this._integrationsInitialized = false;} + + /** Number of calls being processed */ + __init3() {this._numProcessing = 0;} + + /** Holds flushable */ + __init4() {this._outcomes = {};} + + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) {;BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this); + this._options = options; + if (options.dsn) { + this._dsn = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["makeDsn"])(options.dsn); + const url = Object(_api_js__WEBPACK_IMPORTED_MODULE_1__["getEnvelopeEndpointWithUrlEncodedAuth"])(this._dsn, options); + this._transport = options.transport({ + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url, + }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('No DSN provided, client will not do anything.'); + } + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception, hint, scope) { + // ensure we haven't captured this very object before + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["checkOrSetAlreadyCaught"])(exception)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(ALREADY_SEEN_ERROR); + return; + } + + let eventId; + this._process( + this.eventFromException(exception, hint) + .then(event => this._captureEvent(event, hint, scope)) + .then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureMessage( + message, + // eslint-disable-next-line deprecation/deprecation + level, + hint, + scope, + ) { + let eventId; + + const promisedEvent = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isPrimitive"])(message) + ? this.eventFromMessage(String(message), level, hint) + : this.eventFromException(message, hint); + + this._process( + promisedEvent + .then(event => this._captureEvent(event, hint, scope)) + .then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + // ensure we haven't captured this very object before + if (hint && hint.originalException && Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["checkOrSetAlreadyCaught"])(hint.originalException)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(ALREADY_SEEN_ERROR); + return; + } + + let eventId; + + this._process( + this._captureEvent(event, hint, scope).then(result => { + eventId = result; + }), + ); + + return eventId; + } + + /** + * @inheritDoc + */ + captureSession(session) { + if (!this._isEnabled()) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('SDK not enabled, will not capture session.'); + return; + } + + if (!(typeof session.release === 'string')) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Discarded session because of missing or non-string release'); + } else { + this.sendSession(session); + // After sending, we set init false to indicate it's not the first occurrence + Object(_session_js__WEBPACK_IMPORTED_MODULE_5__["updateSession"])(session, { init: false }); + } + } + + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + + /** + * @inheritDoc + */ + flush(timeout) { + const transport = this._transport; + if (transport) { + return this._isClientDoneProcessing(timeout).then(clientFinished => { + return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed); + }); + } else { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["resolvedSyncPromise"])(true); + } + } + + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then(result => { + this.getOptions().enabled = false; + return result; + }); + } + + /** + * Sets up the integrations + */ + setupIntegrations() { + if (this._isEnabled() && !this._integrationsInitialized) { + this._integrations = Object(_integration_js__WEBPACK_IMPORTED_MODULE_3__["setupIntegrations"])(this._options.integrations); + this._integrationsInitialized = true; + } + } + + /** + * Gets an installed integration by its `id`. + * + * @returns The installed integration or `undefined` if no integration with that `id` was installed. + */ + getIntegrationById(integrationId) { + return this._integrations[integrationId]; + } + + /** + * @inheritDoc + */ + getIntegration(integration) { + try { + return (this._integrations[integration.id] ) || null; + } catch (_oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(`Cannot retrieve integration ${integration.id} from the current Client`); + return null; + } + } + + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + if (this._dsn) { + let env = Object(_envelope_js__WEBPACK_IMPORTED_MODULE_2__["createEventEnvelope"])(event, this._dsn, this._options._metadata, this._options.tunnel); + + for (const attachment of hint.attachments || []) { + env = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addItemToEnvelope"])( + env, + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["createAttachmentEnvelopeItem"])( + attachment, + this._options.transportOptions && this._options.transportOptions.textEncoder, + ), + ); + } + + this._sendEnvelope(env); + } + } + + /** + * @inheritDoc + */ + sendSession(session) { + if (this._dsn) { + const env = Object(_envelope_js__WEBPACK_IMPORTED_MODULE_2__["createSessionEnvelope"])(session, this._dsn, this._options._metadata, this._options.tunnel); + this._sendEnvelope(env); + } + } + + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category) { + if (this._options.sendClientReports) { + // We want to track each category (error, transaction, session) separately + // but still keep the distinction between different type of outcomes. + // We could use nested maps, but it's much easier to read and type this way. + // A correct type for map-based implementation if we want to go that route + // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>` + // With typescript 4.1 we could even use template literal types + const key = `${reason}:${category}`; + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`Adding outcome: "${key}"`); + + // The following works because undefined + 1 === NaN and NaN is falsy + this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session, event) { + let crashed = false; + let errored = false; + const exceptions = event.exception && event.exception.values; + + if (exceptions) { + errored = true; + + for (const ex of exceptions) { + const mechanism = ex.mechanism; + if (mechanism && mechanism.handled === false) { + crashed = true; + break; + } + } + } + + // A session is updated and that session update is sent in only one of the two following scenarios: + // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update + // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update + const sessionNonTerminal = session.status === 'ok'; + const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed); + + if (shouldUpdateAndSend) { + Object(_session_js__WEBPACK_IMPORTED_MODULE_5__["updateSession"])(session, { + ...(crashed && { status: 'crashed' }), + errors: session.errors || Number(errored || crashed), + }); + this.captureSession(session); + } + } + + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SyncPromise"](resolve => { + let ticked = 0; + const tick = 1; + + const interval = setInterval(() => { + if (this._numProcessing == 0) { + clearInterval(interval); + resolve(true); + } else { + ticked += tick; + if (timeout && ticked >= timeout) { + clearInterval(interval); + resolve(false); + } + } + }, tick); + }); + } + + /** Determines whether this SDK is enabled and a valid Dsn is present. */ + _isEnabled() { + return this.getOptions().enabled !== false && this._dsn !== undefined; + } + + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, scope) { + const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = this.getOptions(); + const prepared = { + ...event, + event_id: event.event_id || hint.event_id || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["uuid4"])(), + timestamp: event.timestamp || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dateTimestampInSeconds"])(), + }; + + this._applyClientOptions(prepared); + this._applyIntegrationsMetadata(prepared); + + // If we have scope given to us, use it as the base for further modifications. + // This allows us to prevent unnecessary copying of data if `captureContext` is not provided. + let finalScope = scope; + if (hint.captureContext) { + finalScope = _scope_js__WEBPACK_IMPORTED_MODULE_4__["Scope"].clone(finalScope).update(hint.captureContext); + } + + // We prepare the result here with a resolved Event. + let result = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["resolvedSyncPromise"])(prepared); + + // This should be the last thing called, since we want that + // {@link Hub.addEventProcessor} gets the finished prepared event. + // + // We need to check for the existence of `finalScope.getAttachments` + // because `getAttachments` can be undefined if users are using an older version + // of `@sentry/core` that does not have the `getAttachments` method. + // See: https://github.com/getsentry/sentry-javascript/issues/5229 + if (finalScope && finalScope.getAttachments) { + // Collect attachments from the hint and scope + const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()]; + + if (attachments.length) { + hint.attachments = attachments; + } + + // In case we have a hub we reassign it. + result = finalScope.applyToEvent(prepared, hint); + } + + return result.then(evt => { + if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { + return this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth); + } + return evt; + }); + } + + /** + * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. + * Normalized keys: + * - `breadcrumbs.data` + * - `user` + * - `contexts` + * - `extra` + * @param event Event + * @returns Normalized event + */ + _normalizeEvent(event, depth, maxBreadth) { + if (!event) { + return null; + } + + const normalized = { + ...event, + ...(event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map(b => ({ + ...b, + ...(b.data && { + data: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(b.data, depth, maxBreadth), + }), + })), + }), + ...(event.user && { + user: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(event.user, depth, maxBreadth), + }), + ...(event.contexts && { + contexts: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(event.contexts, depth, maxBreadth), + }), + ...(event.extra && { + extra: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(event.extra, depth, maxBreadth), + }), + }; + + // event.contexts.trace stores information about a Transaction. Similarly, + // event.spans[] stores information about child Spans. Given that a + // Transaction is conceptually a Span, normalization should apply to both + // Transactions and Spans consistently. + // For now the decision is to skip normalization of Transactions and Spans, + // so this block overwrites the normalized event to add back the original + // Transaction information prior to normalization. + if (event.contexts && event.contexts.trace && normalized.contexts) { + normalized.contexts.trace = event.contexts.trace; + + // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it + if (event.contexts.trace.data) { + normalized.contexts.trace.data = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(event.contexts.trace.data, depth, maxBreadth); + } + } + + // event.spans[].data may contain circular/dangerous data so we need to normalize it + if (event.spans) { + normalized.spans = event.spans.map(span => { + // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable + if (span.data) { + span.data = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["normalize"])(span.data, depth, maxBreadth); + } + return span; + }); + } + + return normalized; + } + + /** + * Enhances event using the client configuration. + * It takes care of all "static" values like environment, release and `dist`, + * as well as truncating overly long values. + * @param event event instance to be enhanced + */ + _applyClientOptions(event) { + const options = this.getOptions(); + const { environment, release, dist, maxValueLength = 250 } = options; + + if (!('environment' in event)) { + event.environment = 'environment' in options ? environment : 'production'; + } + + if (event.release === undefined && release !== undefined) { + event.release = release; + } + + if (event.dist === undefined && dist !== undefined) { + event.dist = dist; + } + + if (event.message) { + event.message = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["truncate"])(event.message, maxValueLength); + } + + const exception = event.exception && event.exception.values && event.exception.values[0]; + if (exception && exception.value) { + exception.value = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["truncate"])(exception.value, maxValueLength); + } + + const request = event.request; + if (request && request.url) { + request.url = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["truncate"])(request.url, maxValueLength); + } + } + + /** + * This function adds all used integrations to the SDK info in the event. + * @param event The event that will be filled with all integrations. + */ + _applyIntegrationsMetadata(event) { + const integrationsArray = Object.keys(this._integrations); + if (integrationsArray.length > 0) { + event.sdk = event.sdk || {}; + event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray]; + } + } + + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + finalEvent => { + return finalEvent.event_id; + }, + reason => { + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for + // control flow, log just the message (no stack) as a log-level log. + const sentryError = reason ; + if (sentryError.logLevel === 'log') { + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(sentryError.message); + } else { + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(sentryError); + } + } + return undefined; + }, + ); + } + + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, scope) { + const options = this.getOptions(); + const { sampleRate } = options; + + if (!this._isEnabled()) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["rejectedSyncPromise"])(new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('SDK not enabled, will not capture event.', 'log')); + } + + const isTransaction = event.type === 'transaction'; + const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend'; + const beforeSendProcessor = options[beforeSendProcessorName]; + + // 1.0 === 100% events are sent + // 0.0 === 0% events are sent + // Sampling for transaction happens somewhere else + if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) { + this.recordDroppedEvent('sample_rate', 'error'); + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["rejectedSyncPromise"])( + new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + 'log', + ), + ); + } + + return this._prepareEvent(event, hint, scope) + .then(prepared => { + if (prepared === null) { + this.recordDroppedEvent('event_processor', event.type || 'error'); + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]('An event processor returned `null`, will not send event.', 'log'); + } + + const isInternalException = hint.data && (hint.data ).__sentry__ === true; + if (isInternalException || !beforeSendProcessor) { + return prepared; + } + + const beforeSendResult = beforeSendProcessor(prepared, hint); + return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName); + }) + .then(processedEvent => { + if (processedEvent === null) { + this.recordDroppedEvent('before_send', event.type || 'error'); + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`\`${beforeSendProcessorName}\` returned \`null\`, will not send event.`, 'log'); + } + + const session = scope && scope.getSession(); + if (!isTransaction && session) { + this._updateSessionFromEvent(session, processedEvent); + } + + // None of the Sentry built event processor will update transaction name, + // so if the transaction name has been changed by an event processor, we know + // it has to come from custom event processor added by a user + const transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + const source = 'custom'; + processedEvent.transaction_info = { + ...transactionInfo, + source, + changes: [ + ...transactionInfo.changes, + { + source, + // use the same timestamp as the processed event. + timestamp: processedEvent.timestamp , + propagations: transactionInfo.propagations, + }, + ], + }; + } + + this.sendEvent(processedEvent, hint); + return processedEvent; + }) + .then(null, reason => { + if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]) { + throw reason; + } + + this.captureException(reason, { + data: { + __sentry__: true, + }, + originalException: reason , + }); + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"]( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`, + ); + }); + } + + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing += 1; + void promise.then( + value => { + this._numProcessing -= 1; + return value; + }, + reason => { + this._numProcessing -= 1; + return reason; + }, + ); + } + + /** + * @inheritdoc + */ + _sendEnvelope(envelope) { + if (this._transport && this._dsn) { + this._transport.send(envelope).then(null, reason => { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Error while sending event:', reason); + }); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].error('Transport disabled'); + } + } + + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + const outcomes = this._outcomes; + this._outcomes = {}; + return Object.keys(outcomes).map(key => { + const [reason, category] = key.split(':') ; + return { + reason, + category, + quantity: outcomes[key], + }; + }); + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + +} + +/** + * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so. + */ +function _validateBeforeSendResult( + beforeSendResult, + beforeSendProcessorName, +) { + const invalidValueError = `\`${beforeSendProcessorName}\` must return \`null\` or a valid event.`; + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isThenable"])(beforeSendResult)) { + return beforeSendResult.then( + event => { + if (!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(event) && event !== null) { + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"](invalidValueError); + } + return event; + }, + e => { + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`\`${beforeSendProcessorName}\` rejected with ${e}`); + }, + ); + } else if (!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isPlainObject"])(beforeSendResult) && beforeSendResult !== null) { + throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["SentryError"](invalidValueError); + } + return beforeSendResult; +} + + +//# sourceMappingURL=baseclient.js.map + + +/***/ }), + +/***/ "keUb": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("sE3O"); +module.exports = __webpack_require__("WSXa").Array.flatMap; + + +/***/ }), + +/***/ "kilN": +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__("ggwg"); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__("HkU0")(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ "kjpz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useTheme; }); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("csMb"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6Wbw"); + + + +function useTheme() { + var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__["useTheme"])() || _defaultTheme__WEBPACK_IMPORTED_MODULE_2__["default"]; + + if (false) {} + + return theme; +} + +/***/ }), + +/***/ "kk+1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("gis9"); +/* harmony import */ var _internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("j2pP"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("5ZEc"); + + + +/* eslint-disable jsx-a11y/aria-role */ + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + width: 40, + flexShrink: 0, + opacity: 0.8, + '&$disabled': { + opacity: 0 + } + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + width: '100%', + height: 40, + '& svg': { + transform: 'rotate(90deg)' + } + }, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {} +}; + +var _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__["default"], { + fontSize: "small" +}); + +var _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__["default"], { + fontSize: "small" +}); + +var TabScrollButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TabScrollButton(props, ref) { + var classes = props.classes, + classNameProp = props.className, + direction = props.direction, + orientation = props.orientation, + disabled = props.disabled, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "direction", "orientation", "disabled"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_8__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + component: "div", + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical), + ref: ref, + role: null, + tabIndex: null + }, other), direction === 'left' ? _ref : _ref2); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiTabScrollButton' +})(TabScrollButton)); + +/***/ }), + +/***/ "kkqC": +/***/ (function(module, exports, __webpack_require__) { + +var WeakMap = __webpack_require__("Q92J"); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; + + +/***/ }), + +/***/ "koGf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addMonths; }); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CUab"); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("WZRr"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bKmd"); + + + +/** + * @name addMonths + * @category Month Helpers + * @summary Add the specified number of months to the given date. + * + * @description + * Add the specified number of months to the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the months added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 5 months to 1 September 2014: + * const result = addMonths(new Date(2014, 8, 1), 5) + * //=> Sun Feb 01 2015 00:00:00 + */ + +function addMonths(dirtyDate, dirtyAmount) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(2, arguments); + var date = Object(_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate); + var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyAmount); + + if (isNaN(amount)) { + return new Date(NaN); + } + + if (!amount) { + // If 0 months, no-op to avoid changing times in the hour before end of DST + return date; + } + + var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for + // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and + // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we + // want except that dates will wrap around the end of a month, meaning that + // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So + // we'll default to the end of the desired month by adding 1 to the desired + // month and using a date of 0 to back up one day to the end of the desired + // month. + + var endOfDesiredMonth = new Date(date.getTime()); + endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0); + var daysInMonth = endOfDesiredMonth.getDate(); + + if (dayOfMonth >= daysInMonth) { + // If we're already at the end of the month, then this is the correct date + // and we're done. + return endOfDesiredMonth; + } else { + // Otherwise, we now know that setting the original day-of-month value won't + // cause an overflow, so set the desired day-of-month. Note that we can't + // just set the date of `endOfDesiredMonth` because that object may have had + // its time changed in the unusual case where where a DST transition was on + // the last day of the month and its local time was in the hour skipped or + // repeated next to a DST transition. So we use `date` instead which is + // guaranteed to still have the original time. + date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth); + return date; + } +} + +/***/ }), + +/***/ "kobI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var pink = { + 50: '#fce4ec', + 100: '#f8bbd0', + 200: '#f48fb1', + 300: '#f06292', + 400: '#ec407a', + 500: '#e91e63', + 600: '#d81b60', + 700: '#c2185b', + 800: '#ad1457', + 900: '#880e4f', + A100: '#ff80ab', + A200: '#ff4081', + A400: '#f50057', + A700: '#c51162' +}; +/* harmony default export */ __webpack_exports__["default"] = (pink); + +/***/ }), + +/***/ "kpAa": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("duM2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FormHelperText__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "kqkg": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FileDoctype = exports.AppDoctype = void 0; +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var AppDoctype = _propTypes.default.shape({ + name: _propTypes.default.string, + slug: _propTypes.default.string, + developer: _propTypes.default.object, + links: _propTypes.default.shape({ + icon: _propTypes.default.string + }), + latest_version: _propTypes.default.shape({ + version: _propTypes.default.string + }) +}); +exports.AppDoctype = AppDoctype; +var FileDoctype = _propTypes.default.shape({ + _id: _propTypes.default.string, + class: _propTypes.default.string, + mime: _propTypes.default.string, + name: _propTypes.default.string +}); +exports.FileDoctype = FileDoctype; + +/***/ }), + +/***/ "kshm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// We need to centralize the zIndex definitions as they work +// like global values in the browser. +var zIndex = { + mobileStepper: 1000, + speedDial: 1050, + appBar: 1100, + drawer: 1200, + modal: 1300, + snackbar: 1400, + tooltip: 1500 +}; +/* harmony default export */ __webpack_exports__["default"] = (zIndex); + +/***/ }), + +/***/ "ku/n": +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__("764U"); +var gOPN = __webpack_require__("qeDk").f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), + +/***/ "kzOt": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Millisecond Helpers + * @summary Get the number of milliseconds between the given dates. + * + * @description + * Get the number of milliseconds between the given dates. + * + * @param {Date|String|Number} dateLeft - the later date + * @param {Date|String|Number} dateRight - the earlier date + * @returns {Number} the number of milliseconds + * + * @example + * // How many milliseconds are between + * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? + * var result = differenceInMilliseconds( + * new Date(2014, 6, 2, 12, 30, 21, 700), + * new Date(2014, 6, 2, 12, 30, 20, 600) + * ) + * //=> 1100 + */ +function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var dateRight = parse(dirtyDateRight) + return dateLeft.getTime() - dateRight.getTime() +} + +module.exports = differenceInMilliseconds + + +/***/ }), + +/***/ "l+XL": +/***/ (function(module, exports) { + +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; + + +/***/ }), + +/***/ "l/Lm": +/***/ (function(module, exports, __webpack_require__) { + +var LazyWrapper = __webpack_require__("czPI"), + getData = __webpack_require__("FsUY"), + getFuncName = __webpack_require__("lk8G"), + lodash = __webpack_require__("U9vJ"); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; + + +/***/ }), + +/***/ "l1+s": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december'] + var weekdays2char = ['ne', 'po', 'to', 'sr', 'če', 'pe', 'so'] + var weekdays3char = ['ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob'] + var weekdaysFull = ['nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "l2/n": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.normalizeSettings = exports.SETTINGS_DOCTYPE = void 0; + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +var _utils = __webpack_require__("YJcZ"); + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var SETTINGS_DOCTYPE = 'io.cozy.settings'; +/** + * Normalizing a document for SettingsCollection context + * + * @param {object} doc - Document to normalize + * @returns {object} normalized document + */ + +exports.SETTINGS_DOCTYPE = SETTINGS_DOCTYPE; + +var normalizeSettings = function normalizeSettings(doc) { + var normDoc = (0, _DocumentCollection2.normalizeDoc)(doc, SETTINGS_DOCTYPE); + return _objectSpread(_objectSpread({}, normDoc), normDoc.attributes); +}; +/** + * Implements `DocumentCollection` API to interact with the /settings endpoint of the stack + */ + + +exports.normalizeSettings = normalizeSettings; + +var SettingsCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(SettingsCollection, _DocumentCollection); + + var _super = _createSuper(SettingsCollection); + + function SettingsCollection(stackClient) { + (0, _classCallCheck2.default)(this, SettingsCollection); + return _super.call(this, SETTINGS_DOCTYPE, stackClient); + } + /** + * async get - Calls a route on the /settings API + * + * @param {string} id The setting id to call, eg `io.cozy.settings.instance` for `instance` route or `io.cozy.settings.context` for `context`route + * @returns {object} The response from the route + */ + + + (0, _createClass2.default)(SettingsCollection, [{ + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(id) { + var _resp, path, resp; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(id === 'io.cozy.settings.bitwarden')) { + _context.next = 5; + break; + } + + _context.next = 3; + return this.stackClient.fetchJSON('GET', '/data/io.cozy.settings/io.cozy.settings.bitwarden'); + + case 3: + _resp = _context.sent; + return _context.abrupt("return", { + data: _DocumentCollection2.default.normalizeDoctypeJsonApi(SETTINGS_DOCTYPE)(_resp, _resp) + }); + + case 5: + if (id.startsWith('io.cozy.settings.')) { + path = id.substring(17); + } else { + _logger.default.warn("Deprecated: in next versions of cozy-client, it will not be possible to query settings with an incomplete id\n\n- Q('io.cozy.settings').getById('instance')\n+ Q('io.cozy.settings').getById('io.cozy.settings.instance')"); + + path = id; + } + + _context.next = 8; + return this.stackClient.fetchJSON('GET', "/settings/".concat(path)); + + case 8: + resp = _context.sent; + return _context.abrupt("return", { + data: normalizeSettings(_objectSpread({ + id: "/settings/".concat(path) + }, resp.data)) + }); + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * Updates a settings document + * + * @param {object} document - Document to update. Do not forget the _id attribute + */ + + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(document) { + var resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!(document._id === 'io.cozy.settings.instance')) { + _context2.next = 6; + break; + } + + _context2.next = 3; + return this.stackClient.fetchJSON('PUT', '/settings/instance', { + data: document + }); + + case 3: + resp = _context2.sent; + _context2.next = 9; + break; + + case 6: + _context2.next = 8; + return this.stackClient.fetchJSON('PUT', (0, _utils.uri)(_templateObject(), this.doctype, document._id), document); + + case 8: + resp = _context2.sent; + + case 9: + return _context2.abrupt("return", { + data: normalizeSettings(resp.data) + }); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function update(_x2) { + return _update.apply(this, arguments); + } + + return update; + }() + }]); + return SettingsCollection; +}(_DocumentCollection2.default); + +SettingsCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = SettingsCollection; +exports.default = _default; + +/***/ }), + +/***/ "l3L7": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "API_VERSION", function() { return API_VERSION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hub", function() { return Hub; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentHub", function() { return getCurrentHub; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function() { return getHubFromCarrier; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMainCarrier", function() { return getMainCarrier; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeMain", function() { return makeMain; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setHubOnCarrier", function() { return setHubOnCarrier; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Hk8K"); +/* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("xTjI"); + + + + +const NIL_EVENT_ID = '00000000000000000000000000000000'; + +/** + * API compatibility version of this hub. + * + * WARNING: This number should only be increased when the global interface + * changes and new methods are introduced. + * + * @hidden + */ +const API_VERSION = 4; + +/** + * Default maximum number of breadcrumbs added to an event. Can be overwritten + * with {@link Options.maxBreadcrumbs}. + */ +const DEFAULT_BREADCRUMBS = 100; + +/** + * A layer in the process stack. + * @hidden + */ + +/** + * @inheritDoc + */ +class Hub { + /** Is a {@link Layer}[] containing the client and scope */ + __init() {this._stack = [{}];} + + /** Contains the last event id of a captured event. */ + + /** + * Creates a new instance of the hub, will push one {@link Layer} into the + * internal stack on creation. + * + * @param client bound to the hub. + * @param scope bound to the hub. + * @param version number, higher number means higher priority. + */ + constructor(client, scope = new _scope_js__WEBPACK_IMPORTED_MODULE_1__["Scope"](), _version = API_VERSION) {;this._version = _version;Hub.prototype.__init.call(this); + this.getStackTop().scope = scope; + if (client) { + this.bindClient(client); + } + } + + /** + * @inheritDoc + */ + isOlderThan(version) { + return this._version < version; + } + + /** + * @inheritDoc + */ + bindClient(client) { + const top = this.getStackTop(); + top.client = client; + if (client && client.setupIntegrations) { + client.setupIntegrations(); + } + } + + /** + * @inheritDoc + */ + pushScope() { + // We want to clone the content of prev scope + const scope = _scope_js__WEBPACK_IMPORTED_MODULE_1__["Scope"].clone(this.getScope()); + this.getStack().push({ + client: this.getClient(), + scope, + }); + return scope; + } + + /** + * @inheritDoc + */ + popScope() { + if (this.getStack().length <= 1) return false; + return !!this.getStack().pop(); + } + + /** + * @inheritDoc + */ + withScope(callback) { + const scope = this.pushScope(); + try { + callback(scope); + } finally { + this.popScope(); + } + } + + /** + * @inheritDoc + */ + getClient() { + return this.getStackTop().client ; + } + + /** Returns the scope of the top stack. */ + getScope() { + return this.getStackTop().scope; + } + + /** Returns the scope stack for domains or the process. */ + getStack() { + return this._stack; + } + + /** Returns the topmost scope layer in the order domain > local > process. */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception, hint) { + const syntheticException = new Error('Sentry syntheticException'); + this._lastEventId = + this._withClient((client, scope) => { + return client.captureException( + exception, + { + originalException: exception, + syntheticException, + ...hint, + }, + scope, + ); + }) || NIL_EVENT_ID; + return this._lastEventId; + } + + /** + * @inheritDoc + */ + captureMessage( + message, + // eslint-disable-next-line deprecation/deprecation + level, + hint, + ) { + const syntheticException = new Error(message); + this._lastEventId = + this._withClient((client, scope) => { + return client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + }, + scope, + ); + }) || NIL_EVENT_ID; + return this._lastEventId; + } + + /** + * @inheritDoc + */ + captureEvent(event, hint) { + const clientId = + this._withClient((client, scope) => { + return client.captureEvent(event, { ...hint }, scope); + }) || NIL_EVENT_ID; + + if (event.type !== 'transaction') { + this._lastEventId = clientId; + } + + return clientId; + } + + /** + * @inheritDoc + */ + lastEventId() { + return this._lastEventId; + } + + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, hint) { + const { scope, client } = this.getStackTop(); + + if (!scope || !client) return; + + // eslint-disable-next-line @typescript-eslint/unbound-method + const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = + (client.getOptions && client.getOptions()) || {}; + + if (maxBreadcrumbs <= 0) return; + + const timestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dateTimestampInSeconds"])(); + const mergedBreadcrumb = { timestamp, ...breadcrumb }; + const finalBreadcrumb = beforeBreadcrumb + ? (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["consoleSandbox"])(() => beforeBreadcrumb(mergedBreadcrumb, hint)) ) + : mergedBreadcrumb; + + if (finalBreadcrumb === null) return; + + scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs); + } + + /** + * @inheritDoc + */ + setUser(user) { + const scope = this.getScope(); + if (scope) scope.setUser(user); + } + + /** + * @inheritDoc + */ + setTags(tags) { + const scope = this.getScope(); + if (scope) scope.setTags(tags); + } + + /** + * @inheritDoc + */ + setExtras(extras) { + const scope = this.getScope(); + if (scope) scope.setExtras(extras); + } + + /** + * @inheritDoc + */ + setTag(key, value) { + const scope = this.getScope(); + if (scope) scope.setTag(key, value); + } + + /** + * @inheritDoc + */ + setExtra(key, extra) { + const scope = this.getScope(); + if (scope) scope.setExtra(key, extra); + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + setContext(name, context) { + const scope = this.getScope(); + if (scope) scope.setContext(name, context); + } + + /** + * @inheritDoc + */ + configureScope(callback) { + const { scope, client } = this.getStackTop(); + if (scope && client) { + callback(scope); + } + } + + /** + * @inheritDoc + */ + run(callback) { + const oldHub = makeMain(this); + try { + callback(this); + } finally { + makeMain(oldHub); + } + } + + /** + * @inheritDoc + */ + getIntegration(integration) { + const client = this.getClient(); + if (!client) return null; + try { + return client.getIntegration(integration); + } catch (_oO) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(`Cannot retrieve integration ${integration.id} from the current Hub`); + return null; + } + } + + /** + * @inheritDoc + */ + startTransaction(context, customSamplingContext) { + return this._callExtensionMethod('startTransaction', context, customSamplingContext); + } + + /** + * @inheritDoc + */ + traceHeaders() { + return this._callExtensionMethod('traceHeaders'); + } + + /** + * @inheritDoc + */ + captureSession(endSession = false) { + // both send the update and pull the session from the scope + if (endSession) { + return this.endSession(); + } + + // only send the update + this._sendSessionUpdate(); + } + + /** + * @inheritDoc + */ + endSession() { + const layer = this.getStackTop(); + const scope = layer && layer.scope; + const session = scope && scope.getSession(); + if (session) { + Object(_session_js__WEBPACK_IMPORTED_MODULE_2__["closeSession"])(session); + } + this._sendSessionUpdate(); + + // the session is over; take it off of the scope + if (scope) { + scope.setSession(); + } + } + + /** + * @inheritDoc + */ + startSession(context) { + const { scope, client } = this.getStackTop(); + const { release, environment } = (client && client.getOptions()) || {}; + + // Will fetch userAgent if called from browser sdk + const { userAgent } = _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"].navigator || {}; + + const session = Object(_session_js__WEBPACK_IMPORTED_MODULE_2__["makeSession"])({ + release, + environment, + ...(scope && { user: scope.getUser() }), + ...(userAgent && { userAgent }), + ...context, + }); + + if (scope) { + // End existing session if there's one + const currentSession = scope.getSession && scope.getSession(); + if (currentSession && currentSession.status === 'ok') { + Object(_session_js__WEBPACK_IMPORTED_MODULE_2__["updateSession"])(currentSession, { status: 'exited' }); + } + this.endSession(); + + // Afterwards we set the new session on the scope + scope.setSession(session); + } + + return session; + } + + /** + * Returns if default PII should be sent to Sentry and propagated in ourgoing requests + * when Tracing is used. + */ + shouldSendDefaultPii() { + const client = this.getClient(); + const options = client && client.getOptions(); + return Boolean(options && options.sendDefaultPii); + } + + /** + * Sends the current Session on the scope + */ + _sendSessionUpdate() { + const { scope, client } = this.getStackTop(); + if (!scope) return; + + const session = scope.getSession(); + if (session) { + if (client && client.captureSession) { + client.captureSession(session); + } + } + } + + /** + * Internal helper function to call a method on the top client if it exists. + * + * @param method The method to call on the client. + * @param args Arguments to pass to the client function. + */ + _withClient(callback) { + const { scope, client } = this.getStackTop(); + return client && callback(client, scope); + } + + /** + * Calls global extension method and binding current instance to the function call + */ + // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _callExtensionMethod(method, ...args) { + const carrier = getMainCarrier(); + const sentry = carrier.__SENTRY__; + if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { + return sentry.extensions[method].apply(this, args); + } + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn(`Extension method ${method} couldn't be found, doing nothing.`); + } +} + +/** + * Returns the global shim registry. + * + * FIXME: This function is problematic, because despite always returning a valid Carrier, + * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check + * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there. + **/ +function getMainCarrier() { + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"].__SENTRY__ = _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"].__SENTRY__ || { + extensions: {}, + hub: undefined, + }; + return _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"]; +} + +/** + * Replaces the current main hub with the passed one on the global object + * + * @returns The old replaced hub + */ +function makeMain(hub) { + const registry = getMainCarrier(); + const oldHub = getHubFromCarrier(registry); + setHubOnCarrier(registry, hub); + return oldHub; +} + +/** + * Returns the default hub instance. + * + * If a hub is already registered in the global carrier but this module + * contains a more recent version, it replaces the registered version. + * Otherwise, the currently registered hub will be returned. + */ +function getCurrentHub() { + // Get main carrier (global for every environment) + const registry = getMainCarrier(); + + // If there's no hub, or its an old API, assign a new one + if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) { + setHubOnCarrier(registry, new Hub()); + } + + // Prefer domains over global if they are there (applicable only to Node environment) + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["isNodeEnv"])()) { + return getHubFromActiveDomain(registry); + } + // Return hub that lives on a global object + return getHubFromCarrier(registry); +} + +/** + * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist + * @returns discovered hub + */ +function getHubFromActiveDomain(registry) { + try { + const sentry = getMainCarrier().__SENTRY__; + const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active; + + // If there's no active domain, just return global hub + if (!activeDomain) { + return getHubFromCarrier(registry); + } + + // If there's no hub on current domain, or it's an old API, assign a new one + if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) { + const registryHubTopStack = getHubFromCarrier(registry).getStackTop(); + setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope_js__WEBPACK_IMPORTED_MODULE_1__["Scope"].clone(registryHubTopStack.scope))); + } + + // Return hub that lives on a domain + return getHubFromCarrier(activeDomain); + } catch (_Oo) { + // Return hub that lives on a global object + return getHubFromCarrier(registry); + } +} + +/** + * This will tell whether a carrier has a hub on it or not + * @param carrier object + */ +function hasHubOnCarrier(carrier) { + return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub); +} + +/** + * This will create a new {@link Hub} and add to the passed object on + * __SENTRY__.hub. + * @param carrier object + * @hidden + */ +function getHubFromCarrier(carrier) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getGlobalSingleton"])('hub', () => new Hub(), carrier); +} + +/** + * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute + * @param carrier object + * @param hub Hub + * @returns A boolean indicating success or failure + */ +function setHubOnCarrier(carrier, hub) { + if (!carrier) return false; + const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {}); + __SENTRY__.hub = hub; + return true; +} + + +//# sourceMappingURL=hub.js.map + + +/***/ }), + +/***/ "l3U2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" +}), 'ArrowDownward')); + +/***/ }), + +/***/ "l5wl": +/***/ (function(module, exports, __webpack_require__) { + +var assignMergeValue = __webpack_require__("LmJ2"), + cloneBuffer = __webpack_require__("rPTK"), + cloneTypedArray = __webpack_require__("oAY9"), + copyArray = __webpack_require__("MbtP"), + initCloneObject = __webpack_require__("QLTc"), + isArguments = __webpack_require__("6ZUk"), + isArray = __webpack_require__("8u9v"), + isArrayLikeObject = __webpack_require__("Ynj+"), + isBuffer = __webpack_require__("cjAe"), + isFunction = __webpack_require__("87D/"), + isObject = __webpack_require__("06hQ"), + isPlainObject = __webpack_require__("JZOQ"), + isTypedArray = __webpack_require__("HvXq"), + safeGet = __webpack_require__("IfZr"), + toPlainObject = __webpack_require__("Z/lq"); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; + + +/***/ }), + +/***/ "l81d": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("UPk3"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ll/m"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("y78O"); +/* harmony import */ var _TouchRipple__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("5V4Q"); + + + + + + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + position: 'relative', + WebkitTapHighlightColor: 'transparent', + backgroundColor: 'transparent', + // Reset default value + // We disable the focus ring for mouse, touch and keyboard users. + outline: 0, + border: 0, + margin: 0, + // Remove the margin in Safari + borderRadius: 0, + padding: 0, + // Remove the padding in Firefox + cursor: 'pointer', + userSelect: 'none', + verticalAlign: 'middle', + '-moz-appearance': 'none', + // Reset + '-webkit-appearance': 'none', + // Reset + textDecoration: 'none', + // So we take precedent over the style of a native <a /> element. + color: 'inherit', + '&::-moz-focus-inner': { + borderStyle: 'none' // Remove Firefox dotted outline. + + }, + '&$disabled': { + pointerEvents: 'none', + // Disable link interactions + cursor: 'default' + }, + '@media print': { + colorAdjust: 'exact' + } + }, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Pseudo-class applied to the root element if keyboard focused. */ + focusVisible: {} +}; +/** + * `ButtonBase` contains as few styles as possible. + * It aims to be a simple building block for creating a button. + * It contains a load of style reset and some focus/ripple logic. + */ + +var ButtonBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ButtonBase(props, ref) { + var action = props.action, + buttonRefProp = props.buttonRef, + _props$centerRipple = props.centerRipple, + centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple, + children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + component = _props$component === void 0 ? 'button' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableRipple = props.disableRipple, + disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple, + _props$disableTouchRi = props.disableTouchRipple, + disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi, + _props$focusRipple = props.focusRipple, + focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple, + focusVisibleClassName = props.focusVisibleClassName, + onBlur = props.onBlur, + onClick = props.onClick, + onFocus = props.onFocus, + onFocusVisible = props.onFocusVisible, + onKeyDown = props.onKeyDown, + onKeyUp = props.onKeyUp, + onMouseDown = props.onMouseDown, + onMouseLeave = props.onMouseLeave, + onMouseUp = props.onMouseUp, + onTouchEnd = props.onTouchEnd, + onTouchMove = props.onTouchMove, + onTouchStart = props.onTouchStart, + onDragLeave = props.onDragLeave, + _props$tabIndex = props.tabIndex, + tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex, + TouchRippleProps = props.TouchRippleProps, + _props$type = props.type, + type = _props$type === void 0 ? 'button' : _props$type, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]); + + var buttonRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + + function getButtonNode() { + // #StrictMode ready + return react_dom__WEBPACK_IMPORTED_MODULE_4__["findDOMNode"](buttonRef.current); + } + + var rippleRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + focusVisible = _React$useState[0], + setFocusVisible = _React$useState[1]; + + if (disabled && focusVisible) { + setFocusVisible(false); + } + + var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__["default"])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; + + react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](action, function () { + return { + focusVisible: function focusVisible() { + setFocusVisible(true); + buttonRef.current.focus(); + } + }; + }, []); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (focusVisible && focusRipple && !disableRipple) { + rippleRef.current.pulsate(); + } + }, [disableRipple, focusRipple, focusVisible]); + + function useRippleHandler(rippleAction, eventCallback) { + var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple; + return Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__["default"])(function (event) { + if (eventCallback) { + eventCallback(event); + } + + var ignore = skipRippleAction; + + if (!ignore && rippleRef.current) { + rippleRef.current[rippleAction](event); + } + + return true; + }); + } + + var handleMouseDown = useRippleHandler('start', onMouseDown); + var handleDragLeave = useRippleHandler('stop', onDragLeave); + var handleMouseUp = useRippleHandler('stop', onMouseUp); + var handleMouseLeave = useRippleHandler('stop', function (event) { + if (focusVisible) { + event.preventDefault(); + } + + if (onMouseLeave) { + onMouseLeave(event); + } + }); + var handleTouchStart = useRippleHandler('start', onTouchStart); + var handleTouchEnd = useRippleHandler('stop', onTouchEnd); + var handleTouchMove = useRippleHandler('stop', onTouchMove); + var handleBlur = useRippleHandler('stop', function (event) { + if (focusVisible) { + onBlurVisible(event); + setFocusVisible(false); + } + + if (onBlur) { + onBlur(event); + } + }, false); + var handleFocus = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__["default"])(function (event) { + // Fix for https://github.com/facebook/react/issues/7769 + if (!buttonRef.current) { + buttonRef.current = event.currentTarget; + } + + if (isFocusVisible(event)) { + setFocusVisible(true); + + if (onFocusVisible) { + onFocusVisible(event); + } + } + + if (onFocus) { + onFocus(event); + } + }); + + var isNonNativeButton = function isNonNativeButton() { + var button = getButtonNode(); + return component && component !== 'button' && !(button.tagName === 'A' && button.href); + }; + /** + * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat + */ + + + var keydownRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](false); + var handleKeyDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__["default"])(function (event) { + // Check if key is already down to avoid repeats being counted as multiple activations + if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') { + keydownRef.current = true; + event.persist(); + rippleRef.current.stop(event, function () { + rippleRef.current.start(event); + }); + } + + if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') { + event.preventDefault(); + } + + if (onKeyDown) { + onKeyDown(event); + } // Keyboard accessibility for non interactive elements + + + if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) { + event.preventDefault(); + + if (onClick) { + onClick(event); + } + } + }); + var handleKeyUp = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__["default"])(function (event) { + // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed + // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0 + if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) { + keydownRef.current = false; + event.persist(); + rippleRef.current.stop(event, function () { + rippleRef.current.pulsate(event); + }); + } + + if (onKeyUp) { + onKeyUp(event); + } // Keyboard accessibility for non interactive elements + + + if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) { + onClick(event); + } + }); + var ComponentProp = component; + + if (ComponentProp === 'button' && other.href) { + ComponentProp = 'a'; + } + + var buttonProps = {}; + + if (ComponentProp === 'button') { + buttonProps.type = type; + buttonProps.disabled = disabled; + } else { + if (ComponentProp !== 'a' || !other.href) { + buttonProps.role = 'button'; + } + + buttonProps['aria-disabled'] = disabled; + } + + var handleUserRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__["default"])(buttonRefProp, ref); + var handleOwnRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__["default"])(focusVisibleRef, buttonRef); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__["default"])(handleUserRef, handleOwnRef); + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + mountedState = _React$useState2[0], + setMountedState = _React$useState2[1]; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + setMountedState(true); + }, []); + var enableTouchRipple = mountedState && !disableRipple && !disabled; + + if (false) {} + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](ComponentProp, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled), + onBlur: handleBlur, + onClick: onClick, + onFocus: handleFocus, + onKeyDown: handleKeyDown, + onKeyUp: handleKeyUp, + onMouseDown: handleMouseDown, + onMouseLeave: handleMouseLeave, + onMouseUp: handleMouseUp, + onDragLeave: handleDragLeave, + onTouchEnd: handleTouchEnd, + onTouchMove: handleTouchMove, + onTouchStart: handleTouchStart, + ref: handleRef, + tabIndex: disabled ? -1 : tabIndex + }, buttonProps, other), children, enableTouchRipple ? + /*#__PURE__*/ + + /* TouchRipple is only needed client-side, x2 boost on the server. */ + react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_TouchRipple__WEBPACK_IMPORTED_MODULE_12__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: rippleRef, + center: centerRipple + }, TouchRippleProps)) : null); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_10__["default"])(styles, { + name: 'MuiButtonBase' +})(ButtonBase)); + +/***/ }), + +/***/ "lB3x": +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__("WXXH") && /./g.flags != 'g') __webpack_require__("GwHQ").f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__("+TZB") +}); + + +/***/ }), + +/***/ "lBlV": +/***/ (function(module, exports) { + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; + + +/***/ }), + +/***/ "lFqA": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var toInteger = __webpack_require__("HzFX"); +var defined = __webpack_require__("etLA"); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + + +/***/ }), + +/***/ "lIGy": +/***/ (function(module) { + +module.exports = JSON.parse("{\"country\":{\"stranger\":\"Étranger\"},\"Scan\":{\"scan_a_doc\":\"Numériser un doc\",\"save_doc\":\"Enregistrer le document\",\"filename\":\"Nom du fichier\",\"save\":\"Sauvegarder\",\"cancel\":\"Annuler\",\"qualify\":\"Qualifier\",\"apply\":\"Appliquer\",\"error\":{\"offline\":\"Vous êtes actuellement déconnecté, vous ne pouvez donc pas utiliser cette fonctionnalité. Connectez-vous à internet et recommencez. \",\"uploading\":\"Vous avez déjà un fichier en cours de téléchargement. Attendez la fin et recommencez.\",\"generic\":\"Un problème est survenu. Veuillez réessayer. \"},\"successful\":{\"qualified_ok\":\"Vous venez de qualifier votre fichier avec succès !\"},\"items\":{\"accommodation_proof\":\"Attestation d'hébergement |||| Attestations d'hébergement\",\"appliance_invoice\":\"Facture d'électroménager |||| Factures d'électroménager\",\"bank_details\":\"RIB\",\"bank_statement\":\"Relevé de compte |||| Relevés de compte\",\"birth_certificate\":\"Certificat de naissance |||| Certificats de naissance\",\"building_permit\":\"Permis de construire\",\"caf\":\"Attestation de quotient familial CAF |||| Attestations de quotient familial CAF\",\"car_insurance\":\"Attestation d'assurance auto |||| Attestations d'assurance auto\",\"citizen_registration_certificate\":\"Attestation de recensement citoyen |||| Attestations de recensement citoyen\",\"diploma\":\"Diplôme |||| Diplômes\",\"divorce\":\"Attestation de divorce |||| Attestations de divorce\",\"driver_license\":\"Permis de conduire\",\"electoral_card\":\"Carte électorale |||| Cartes électorales\",\"employment_center_certificate\":\"Attestation de Pôle emploi |||| Attestations de Pôle emploi\",\"energy_contract\":\"Contrat de fournisseur d'énergies |||| Contrats de fournisseur d'énergies\",\"energy_invoice\":\"Facture d'énergie |||| Factures d'énergie\",\"family_record_book\":\"Livret de famille |||| Livrets de famille\",\"family\":\"Famille\",\"fidelity_card\":\"Carte de fidélité |||| Cartes de fidélité\",\"gradebook\":\"Bulletin de notes |||| Bulletins de notes\",\"grocery_invoice\":\"Facture de courses |||| Factures de courses\",\"health_book\":\"Carnet de santé |||| Carnets de santé\",\"health_certificate\":\"Certificat de santé/vaccination |||| Certificats de santé/vaccination\",\"health_insurance_card\":\"Carte de mutuelle |||| Cartes de mutuelle\",\"health_invoice\":\"Facture médicale |||| Factures médicales\",\"health\":\"Santé\",\"home\":\"Logement\",\"house_insurance\":\"Assurance logement |||| Assurances logement\",\"house_sale_agreeement\":\"Compromis de vente\",\"identity_photo\":\"Photo d'identité |||| Photos d'identité\",\"identity\":\"Identité\",\"invoice\":\"Facture |||| Factures\",\"isp_invoice\":\"Facture d'internet |||| Factures d'internet\",\"large_family_card\":\"Carte famille nombreuse |||| Cartes famille nombreuse\",\"lease\":\"Bail |||| Baux\",\"library_card\":\"Carte de bibliothèque |||| Cartes de bibliothèque\",\"loan_agreement\":\"Contrat de prêt |||| Contrats de prêt\",\"mechanic_invoice\":\"Facture de réparation |||| Factures de réparation\",\"motivation_letter\":\"Lettre de motivation |||| Lettres de motivation\",\"national_health_insurance_card\":\"Carte vitale |||| Cartes vitales\",\"national_health_insurance_right_certificate\":\"Attestation de droits de l'Assurance Maladie (vitale) |||| Attestations de droits de l'Assurance Maladie (vitale)\",\"national_id_card\":\"Carte d'identité |||| Cartes d'identité\",\"note_identity_document\":\"Note Identité |||| Notes Identité\",\"note_family_document\":\"Note Famille |||| Notes Famille\",\"note_work_document\":\"Note Travail & Études |||| Notes Travail & Études\",\"note_health_document\":\"Note Santé |||| Notes Santé\",\"note_house_document\":\"Note Logement |||| Notes Logement\",\"note_transport_document\":\"Note Transport |||| Notes Transport\",\"note_activity_document\":\"Note Activités & loisirs |||| Notes Activités & loisirs\",\"note_finance\":\"Note Finances |||| Notes Finances\",\"note_invoice\":\"Note Factures |||| Notes Factures\",\"other_activity_document\":\"Autre document sportif |||| Autres documents sportifs\",\"other_bank_document\":\"Autre document bancaire |||| Autres documents bancaires\",\"other_family_document\":\"Autre document de famille |||| Autres documents de famille\",\"other_health_document\":\"Autre document de santé |||| Autres documents de santé\",\"other_house_document\":\"Autre document de logement |||| Autres documents de logement\",\"other_identity_document\":\"Autre document d'identité |||| Autres documents d'identité\",\"other_invoice\":\"Autre facture |||| Autres factures\",\"other_revenue\":\"Autre revenu |||| Autres revenus\",\"other_tax_document\":\"Impôts - Autre document |||| Impôts - Autres documents\",\"other_transport_document\":\"Autre document de transport |||| Autres documents de transport\",\"other_work_document\":\"Autre document de travail |||| Autres documents de travail\",\"other_administrative_document\":\"Autre document administratif |||| Autres documents administratifs\",\"others\":\"Autres\",\"pacs\":\"Attestation de PACS |||| Attestations de PACS\",\"passport\":\"Passeport |||| Passeports\",\"pay_sheet\":\"Fiche de paie |||| Fiches de paie\",\"payment_proof_family_allowance\":\"Attestation de paiement CAF |||| Attestations de paiement CAF\",\"pension\":\"Retraite |||| Retraites\",\"personal_sporting_licence\":\"Licence sportive |||| Licences sportives\",\"phone_invoice\":\"Facture de téléphone |||| Factures de téléphone\",\"pregnancy_medical_certificate\":\"Certificat de grossesse |||| Certificats de grossesse\",\"prescription\":\"Ordonnance |||| Ordonnances\",\"real_estate_tax\":\"Taxe foncière |||| Taxes foncières\",\"receipt\":\"Accusé de réception |||| Accusés de réception\",\"rent_receipt\":\"Quittance de loyer |||| Quittances de loyer\",\"residence_permit\":\"Titre de séjour |||| Titres de séjour\",\"restaurant_invoice\":\"Facture de restaurant |||| Factures de restaurant\",\"resume\":\"CV\",\"school_attendance_certificate\":\"Certificat de scolarité |||| Certificats de scolarité\",\"school_insurance_certificate\":\"Attestation d'assurance scolaire |||| Attestations d'assurance scolaire\",\"single_parent_benefit\":\"Allocation parent isolé |||| Allocations parent isolé\",\"student_card\":\"Carte d'étudiant |||| Cartes d'étudiant\",\"tax_notice\":\"Impôts - Avis d'imposition\",\"tax_return\":\"Impôts - Déclaration de revenus |||| Impôts - Déclarations de revenus\",\"tax_timetable\":\"Impôts - Echéancier |||| Impôts - Echéanciers\",\"technical_diagnostic_record\":\"Dossier de diagnostic technique |||| Dossiers de diagnostic technique\",\"telecom_invoice\":\"Facture de télécom |||| Factures de télécom\",\"transport_card\":\"Carte de transport |||| Cartes de transport\",\"transport_invoice\":\"Facture de transport |||| Factures de transport\",\"transport\":\"Transport\",\"unemployment_benefit\":\"Allocation chômage |||| Allocations chômage\",\"unfit_for_habitation_declaration\":\"Arrêté d'insalubrité |||| Arrêtés d'insalubrité\",\"vehicle_registration\":\"Carte grise |||| Cartes grises\",\"water_invoice\":\"Facture d'eau |||| Factures d'eau\",\"web_service_invoice\":\"Facture de service web |||| Factures de service web\",\"wedding\":\"Contrat de mariage |||| Contrats de mariage\",\"work_contract\":\"Contrat de travail |||| Contrats de travail\",\"work_disability_recognition\":\"Reconnaissance de handicap - RQTH |||| Reconnaissances de handicap - RQTH\",\"work_invoice\":\"Facture de travaux |||| Factures de travaux\",\"work_quote\":\"Devis de travaux\",\"work_study\":\"Travail & Études\"},\"attributes\":{\"contractType\":{\"cdi\":\"CDI\",\"cdd\":\"CDD\",\"alternate\":\"Alternance\",\"internship\":\"Stage\",\"other\":\"Autre\"}},\"themes\":{\"activity\":\"Activités & loisirs\",\"family\":\"Famille\",\"finance\":\"Finances\",\"health\":\"Santé\",\"home\":\"Logement\",\"identity\":\"Identité\",\"invoice\":\"Factures\",\"others\":\"Autres\",\"transport\":\"Transport\",\"undefined\":\"Indéfini\",\"work_study\":\"Travail & Études\"}}}"); + +/***/ }), + +/***/ "lNPj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isFlagshipApp = exports.getFlagshipMetadata = exports.FlagshipRoutes = void 0; + +var _cozyLogger = _interopRequireDefault(__webpack_require__("rUPj")); + +var FlagshipRoutes; +exports.FlagshipRoutes = FlagshipRoutes; + +(function (FlagshipRoutes) { + FlagshipRoutes["Home"] = "home"; + FlagshipRoutes["Cozyapp"] = "cozyapp"; + FlagshipRoutes["Authenticate"] = "authenticate"; + FlagshipRoutes["Onboarding"] = "onboarding"; + FlagshipRoutes["Stack"] = "stack"; +})(FlagshipRoutes || (exports.FlagshipRoutes = FlagshipRoutes = {})); + +var getGlobalWindow = function getGlobalWindow() { + return typeof window !== 'undefined' ? window : ((0, _cozyLogger.default)('error', "\"window\" is not defined. This means that getGlobalWindow() shouldn't have been called and investigation should be done to prevent this call"), undefined); +}; + +var getFlagshipMetadata = function getFlagshipMetadata() { + var _getGlobalWindow$cozy, _getGlobalWindow, _getGlobalWindow$cozy2; + + return (_getGlobalWindow$cozy = (_getGlobalWindow = getGlobalWindow()) === null || _getGlobalWindow === void 0 ? void 0 : (_getGlobalWindow$cozy2 = _getGlobalWindow.cozy) === null || _getGlobalWindow$cozy2 === void 0 ? void 0 : _getGlobalWindow$cozy2.flagship) !== null && _getGlobalWindow$cozy !== void 0 ? _getGlobalWindow$cozy : {}; +}; + +exports.getFlagshipMetadata = getFlagshipMetadata; + +var isFlagshipApp = function isFlagshipApp() { + var _getGlobalWindow2, _getGlobalWindow2$coz; + + return ((_getGlobalWindow2 = getGlobalWindow()) === null || _getGlobalWindow2 === void 0 ? void 0 : (_getGlobalWindow2$coz = _getGlobalWindow2.cozy) === null || _getGlobalWindow2$coz === void 0 ? void 0 : _getGlobalWindow2$coz.flagship) !== undefined; +}; + +exports.isFlagshipApp = isFlagshipApp; + +/***/ }), + +/***/ "lPmf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $fails = __webpack_require__("enc5"); +var aNumberValue = __webpack_require__("aTyc"); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + + +/***/ }), + +/***/ "lPsH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__("WXXH"); +var getKeys = __webpack_require__("FFxP"); +var gOPS = __webpack_require__("9xp8"); +var pIE = __webpack_require__("AJH6"); +var toObject = __webpack_require__("05TQ"); +var IObject = __webpack_require__("pTfQ"); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__("enc5")(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), + +/***/ "lRSd": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/** + * Use those fetch policies with `<Query />` to limit the number of re-fetch. + * + * @example + * ``` + * import { fetchPolicies } from 'cozy-client' + * const olderThan30s = fetchPolicies.olderThan(30 * 1000) + * <Query fetchPolicy={olderThan30s} /> + * ``` + */ +var fetchPolicies = { + /** + * Returns a fetchPolicy that will only re-fetch queries that are older + * than `<delay>` ms. + * + * @param {number} delay - Milliseconds since the query has been fetched + * @returns {Function} Fetch policy to be used with `<Query />` + */ + olderThan: function olderThan(delay) { + return function (queryState) { + if (!queryState || !queryState.lastUpdate) { + return true; + } else { + var elapsed = Date.now() - queryState.lastUpdate; + return elapsed > delay; + } + }; + }, + + /** + * Fetch policy that deactivates any fetching. + */ + noFetch: function noFetch() { + return false; + } +}; +var _default = fetchPolicies; +exports.default = _default; + +/***/ }), + +/***/ "lTBH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); + + + + + + + + +var SIZE = 44; +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'inline-block' + }, + + /* Styles applied to the root element if `variant="static"`. */ + static: { + transition: theme.transitions.create('transform') + }, + + /* Styles applied to the root element if `variant="indeterminate"`. */ + indeterminate: { + animation: '$circular-rotate 1.4s linear infinite' + }, + + /* Styles applied to the root element if `variant="determinate"`. */ + determinate: { + transition: theme.transitions.create('transform') + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + color: theme.palette.primary.main + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + color: theme.palette.secondary.main + }, + + /* Styles applied to the `svg` element. */ + svg: { + display: 'block' // Keeps the progress centered + + }, + + /* Styles applied to the `circle` svg path. */ + circle: { + stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value. + // strokeLinecap: 'butt', + + }, + + /* Styles applied to the `circle` svg path if `variant="static"`. */ + circleStatic: { + transition: theme.transitions.create('stroke-dashoffset') + }, + + /* Styles applied to the `circle` svg path if `variant="indeterminate"`. */ + circleIndeterminate: { + animation: '$circular-dash 1.4s ease-in-out infinite', + // Some default value that looks fine waiting for the animation to kicks in. + strokeDasharray: '80px, 200px', + strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug. + + }, + + /* Styles applied to the `circle` svg path if `variant="determinate"`. */ + circleDeterminate: { + transition: theme.transitions.create('stroke-dashoffset') + }, + '@keyframes circular-rotate': { + '0%': { + // Fix IE 11 wobbly + transformOrigin: '50% 50%' + }, + '100%': { + transform: 'rotate(360deg)' + } + }, + '@keyframes circular-dash': { + '0%': { + strokeDasharray: '1px, 200px', + strokeDashoffset: '0px' + }, + '50%': { + strokeDasharray: '100px, 200px', + strokeDashoffset: '-15px' + }, + '100%': { + strokeDasharray: '100px, 200px', + strokeDashoffset: '-125px' + } + }, + + /* Styles applied to the `circle` svg path if `disableShrink={true}`. */ + circleDisableShrink: { + animation: 'none' + } + }; +}; +/** + * ## ARIA + * + * If the progress bar is describing the loading progress of a particular region of a page, + * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy` + * attribute to `true` on that region until it has finished loading. + */ + +var CircularProgress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CircularProgress(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'primary' : _props$color, + _props$disableShrink = props.disableShrink, + disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink, + _props$size = props.size, + size = _props$size === void 0 ? 40 : _props$size, + style = props.style, + _props$thickness = props.thickness, + thickness = _props$thickness === void 0 ? 3.6 : _props$thickness, + _props$value = props.value, + value = _props$value === void 0 ? 0 : _props$value, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'indeterminate' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"]); + + var circleStyle = {}; + var rootStyle = {}; + var rootProps = {}; + + if (variant === 'determinate' || variant === 'static') { + var circumference = 2 * Math.PI * ((SIZE - thickness) / 2); + circleStyle.strokeDasharray = circumference.toFixed(3); + rootProps['aria-valuenow'] = Math.round(value); + circleStyle.strokeDashoffset = "".concat(((100 - value) / 100 * circumference).toFixed(3), "px"); + rootStyle.transform = 'rotate(-90deg)'; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, color !== 'inherit' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(color))], { + 'determinate': classes.determinate, + 'indeterminate': classes.indeterminate, + 'static': classes.static + }[variant]), + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + width: size, + height: size + }, rootStyle, style), + ref: ref, + role: "progressbar" + }, rootProps, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("svg", { + className: classes.svg, + viewBox: "".concat(SIZE / 2, " ").concat(SIZE / 2, " ").concat(SIZE, " ").concat(SIZE) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("circle", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.circle, disableShrink && classes.circleDisableShrink, { + 'determinate': classes.circleDeterminate, + 'indeterminate': classes.circleIndeterminate, + 'static': classes.circleStatic + }[variant]), + style: circleStyle, + cx: SIZE, + cy: SIZE, + r: (SIZE - thickness) / 2, + fill: "none", + strokeWidth: thickness + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiCircularProgress', + flip: false +})(CircularProgress)); + +/***/ }), + +/***/ "lTib": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** A function that accepts a potential "extra argument" value to be injected later, + * and returns an instance of the thunk middleware that uses that value + */ +function createThunkMiddleware(extraArgument) { + // Standard Redux middleware definition pattern: + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware + var middleware = function middleware(_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + // The thunk middleware looks for any functions that were passed to `store.dispatch`. + // If this "action" is really a function, call it and return the result. + if (typeof action === 'function') { + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" + return action(dispatch, getState, extraArgument); + } // Otherwise, pass the action down the middleware chain as usual + + + return next(action); + }; + }; + }; + + return middleware; +} + +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version +// with whatever "extra arg" they want to inject into their thunks + +thunk.withExtraArgument = createThunkMiddleware; +/* harmony default export */ __webpack_exports__["default"] = (thunk); + +/***/ }), + +/***/ "lVtn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWidthUp", function() { return isWidthUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWidthDown", function() { return isWidthDown; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rDuK"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("csMb"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("kjpz"); +/* harmony import */ var _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("Hf6u"); +/* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("QXzx"); + + + + + + + + + + // By default, returns true if screen width is the same or greater than the given breakpoint. + +var isWidthUp = function isWidthUp(breakpoint, width) { + var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + if (inclusive) { + return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(breakpoint) <= _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(width); + } + + return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(breakpoint) < _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(width); +}; // By default, returns true if screen width is the same or less than the given breakpoint. + +var isWidthDown = function isWidthDown(breakpoint, width) { + var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + if (inclusive) { + return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(width) <= _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(breakpoint); + } + + return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(width) < _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__["keys"].indexOf(breakpoint); +}; +var useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"]; + +var withWidth = function withWidth() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return function (Component) { + var _options$withTheme = options.withTheme, + withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme, + _options$noSSR = options.noSSR, + noSSR = _options$noSSR === void 0 ? false : _options$noSSR, + initialWidthOption = options.initialWidth; + + function WithWidth(props) { + var contextTheme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var theme = props.theme || contextTheme; + + var _getThemeProps = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__["getThemeProps"])({ + theme: theme, + name: 'MuiWithWidth', + props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props) + }), + initialWidth = _getThemeProps.initialWidth, + width = _getThemeProps.width, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_getThemeProps, ["initialWidth", "width"]); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](false), + mountedState = _React$useState[0], + setMountedState = _React$useState[1]; + + useEnhancedEffect(function () { + setMountedState(true); + }, []); + /** + * innerWidth |xs sm md lg xl + * |-------|-------|-------|-------|------> + * width | xs | sm | md | lg | xl + */ + + var keys = theme.breakpoints.keys.slice().reverse(); + var widthComputed = keys.reduce(function (output, key) { + // eslint-disable-next-line react-hooks/rules-of-hooks + var matches = Object(_useMediaQuery__WEBPACK_IMPORTED_MODULE_9__["default"])(theme.breakpoints.up(key)); + return !output && matches ? key : output; + }, null); + + var more = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption + }, withThemeOption ? { + theme: theme + } : {}, other); // When rendering the component on the server, + // we have no idea about the client browser screen width. + // In order to prevent blinks and help the reconciliation of the React tree + // we are not rendering the child component. + // + // An alternative is to use the `initialWidth` property. + + + if (more.width === undefined) { + return null; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, more); + } + + false ? undefined : void 0; + + if (false) {} + + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(WithWidth, Component); + return WithWidth; + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (withWidth); + +/***/ }), + +/***/ "lVzG": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.getSharingRules = exports.BITWARDEN_CIPHERS_DOCTYPE = exports.BITWARDEN_ORGANIZATIONS_DOCTYPE = exports.SHARING_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _FileCollection = __webpack_require__("H7FL"); + +var _utils = __webpack_require__("YJcZ"); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function _templateObject6() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", "/recipients"]); + + _templateObject6 = function _templateObject6() { + return data; + }; + + return data; +} + +function _templateObject5() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", "/recipients/self"]); + + _templateObject5 = function _templateObject5() { + return data; + }; + + return data; +} + +function _templateObject4() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", "/recipients/", ""]); + + _templateObject4 = function _templateObject4() { + return data; + }; + + return data; +} + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", "/recipients"]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", ""]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/sharings/doctype/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var SHARING_DOCTYPE = 'io.cozy.sharings'; +exports.SHARING_DOCTYPE = SHARING_DOCTYPE; +var BITWARDEN_ORGANIZATIONS_DOCTYPE = 'com.bitwarden.organizations'; +exports.BITWARDEN_ORGANIZATIONS_DOCTYPE = BITWARDEN_ORGANIZATIONS_DOCTYPE; +var BITWARDEN_CIPHERS_DOCTYPE = 'com.bitwarden.ciphers'; +exports.BITWARDEN_CIPHERS_DOCTYPE = BITWARDEN_CIPHERS_DOCTYPE; + +var normalizeSharing = function normalizeSharing(sharing) { + return (0, _DocumentCollection2.normalizeDoc)(sharing, SHARING_DOCTYPE); +}; +/** + * @typedef {object} Rule A sharing rule + * @property {string} title + * @property {string} doctype + * @property {Array} values + * @property {string=} add + * @property {string=} update + * @property {string=} remove + */ + +/** + * @typedef {object} Recipient An io.cozy.contact + */ + +/** + * @typedef {object} Sharing An io.cozy.sharings document + */ + +/** + * @typedef {object} SharingPolicy Define the add/update/remove policies for a sharing + * @property {string} add + * @property {string} update + * @property {string} remove + */ + +/** + * @typedef {(undefined|'one-way'|'two-way')} SharingType Define how a document is synced between sharing's owner and receivers. + */ + +/** + * @typedef {object} RelationshipItem Define a recipient that can be used as target of a sharing + * @property {string} id - Recipient's ID + * @property {string} type - Reciptient's type (should be 'io.cozy.contacts') + */ + +/** + * Implements the `DocumentCollection` API along with specific methods for + * `io.cozy.sharings`. + */ + + +var SharingCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(SharingCollection, _DocumentCollection); + + var _super = _createSuper(SharingCollection); + + function SharingCollection() { + (0, _classCallCheck2.default)(this, SharingCollection); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(SharingCollection, [{ + key: "findByDoctype", + value: function () { + var _findByDoctype = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(doctype) { + var resp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.stackClient.fetchJSON('GET', (0, _utils.uri)(_templateObject(), doctype)); + + case 2: + resp = _context.sent; + return _context.abrupt("return", _objectSpread(_objectSpread({}, resp), {}, { + data: resp.data.map(normalizeSharing) + })); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function findByDoctype(_x) { + return _findByDoctype.apply(this, arguments); + } + + return findByDoctype; + }() + /** + * Fetches a sharing by id + * + * @param {string} id Sharing's id + * @returns {Sharing} sharing + */ + + }, { + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) { + var path, resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + path = (0, _utils.uri)(_templateObject2(), id); + _context2.next = 3; + return this.stackClient.fetchJSON('GET', path); + + case 3: + resp = _context2.sent; + return _context2.abrupt("return", { + data: normalizeSharing(resp.data) + }); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function get(_x2) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * + * Creates a new Sharing. See https://docs.cozy.io/en/cozy-stack/sharing/#post-sharings + * + * @param {object} params Sharing params + * @param {Sharing} params.document The document to share + * @param {string} params.description Description of the sharing + * @param {string=} params.previewPath The preview path + * @param {Array<Rule>=} params.rules The rules defined to the sharing. See https://docs.cozy.io/en/cozy-stack/sharing-design/#description-of-a-sharing + * @param {Array<Recipient>=} params.recipients Recipients to add to the sharings (will have the same permissions given by the rules defined by the sharing ) + * @param {Array<Recipient>=} params.readOnlyRecipients Recipients to add to the sharings with only read only access + * @param {boolean=} params.openSharing If someone else than the owner can add a recipient to the sharing + * @param {string=} params.appSlug Slug of the targeted app + */ + + }, { + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref) { + var document, description, previewPath, rules, _ref$recipients, recipients, _ref$readOnlyRecipien, readOnlyRecipients, openSharing, appSlug, attributes, optionalAttributes, resp; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + document = _ref.document, description = _ref.description, previewPath = _ref.previewPath, rules = _ref.rules, _ref$recipients = _ref.recipients, recipients = _ref$recipients === void 0 ? [] : _ref$recipients, _ref$readOnlyRecipien = _ref.readOnlyRecipients, readOnlyRecipients = _ref$readOnlyRecipien === void 0 ? [] : _ref$readOnlyRecipien, openSharing = _ref.openSharing, appSlug = _ref.appSlug; + attributes = { + description: description, + preview_path: previewPath, + open_sharing: openSharing, + rules: rules ? rules : getSharingRules(document) + }; + optionalAttributes = {}; + + if (appSlug) { + optionalAttributes = { + app_slug: appSlug + }; + } + + _context3.next = 6; + return this.stackClient.fetchJSON('POST', '/sharings/', { + data: { + type: 'io.cozy.sharings', + attributes: _objectSpread(_objectSpread({}, attributes), optionalAttributes), + relationships: _objectSpread(_objectSpread({}, recipients.length > 0 && { + recipients: { + data: recipients.map(toRelationshipItem) + } + }), readOnlyRecipients.length > 0 && { + read_only_recipients: { + data: readOnlyRecipients.map(toRelationshipItem) + } + }) + } + }); + + case 6: + resp = _context3.sent; + return _context3.abrupt("return", { + data: normalizeSharing(resp.data) + }); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function create(_x3) { + return _create.apply(this, arguments); + } + + return create; + }() + /** + * @deprecated Use create() instead + * share - Creates a new sharing. See https://docs.cozy.io/en/cozy-stack/sharing/#post-sharings + * + * @param {Sharing} document The document to share. Should have and _id and a name. + * @param {Array} recipients A list of io.cozy.contacts + * @param {string} sharingType - If "two-way", will set the open_sharing attribute to true + * @param {string} description - Describes the sharing + * @param {string=} previewPath Relative URL of the sharings preview page + */ + + }, { + key: "share", + value: function () { + var _share = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(document, recipients, sharingType, description) { + var previewPath, + recipientsToUse, + _args4 = arguments; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + previewPath = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : null; + + _logger.default.warn('SharingCollection.share is deprecated, use SharingCollection.create instead'); + + recipientsToUse = sharingType === 'two-way' ? { + recipients: recipients + } : { + readOnlyRecipients: recipients + }; + return _context4.abrupt("return", this.create(_objectSpread(_objectSpread({ + document: document + }, recipientsToUse), {}, { + description: description, + previewPath: previewPath, + openSharing: sharingType === 'two-way', + rules: getSharingRules(document, sharingType) + }))); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function share(_x4, _x5, _x6, _x7) { + return _share.apply(this, arguments); + } + + return share; + }() + /** + * getDiscoveryLink - Returns the URL of the page that can be used to accept a sharing. See https://docs.cozy.io/en/cozy-stack/sharing/#get-sharingssharing-iddiscovery + * + * @param {string} sharingId - Id of the sharing + * @param {string} sharecode - Code of the sharing + * @returns {string} + */ + + }, { + key: "getDiscoveryLink", + value: function getDiscoveryLink(sharingId, sharecode) { + return this.stackClient.fullpath("/sharings/".concat(sharingId, "/discovery?sharecode=").concat(sharecode)); + } + /** + * Add an array of contacts to the Sharing + * + * @param {object} options Object + * @param {Sharing} options.document Sharing Object + * @param {Array<Recipient>=} options.recipients Recipients to add to the sharing + * @param {Array<Recipient>=} options.readOnlyRecipients Recipients to add to the sharings with only read only access + */ + + }, { + key: "addRecipients", + value: function () { + var _addRecipients = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref2) { + var document, _ref2$recipients, recipients, _ref2$readOnlyRecipie, readOnlyRecipients, resp; + + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + document = _ref2.document, _ref2$recipients = _ref2.recipients, recipients = _ref2$recipients === void 0 ? [] : _ref2$recipients, _ref2$readOnlyRecipie = _ref2.readOnlyRecipients, readOnlyRecipients = _ref2$readOnlyRecipie === void 0 ? [] : _ref2$readOnlyRecipie; + _context5.next = 3; + return this.stackClient.fetchJSON('POST', (0, _utils.uri)(_templateObject3(), document._id), { + data: { + type: 'io.cozy.sharings', + id: document._id, + relationships: _objectSpread(_objectSpread({}, recipients.length > 0 && { + recipients: { + data: recipients.map(toRelationshipItem) + } + }), readOnlyRecipients.length > 0 && { + read_only_recipients: { + data: readOnlyRecipients.map(toRelationshipItem) + } + }) + } + }); + + case 3: + resp = _context5.sent; + return _context5.abrupt("return", { + data: normalizeSharing(resp.data) + }); + + case 5: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function addRecipients(_x8) { + return _addRecipients.apply(this, arguments); + } + + return addRecipients; + }() + /** + * Revoke only one recipient of the sharing. + * + * @param {object} sharing Sharing Object + * @param {number} recipientIndex Index of this recipient in the members array of the sharing + */ + + }, { + key: "revokeRecipient", + value: function revokeRecipient(sharing, recipientIndex) { + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject4(), sharing._id, recipientIndex)); + } + /** + * Remove self from the sharing. + * + * @param {object} sharing Sharing Object + */ + + }, { + key: "revokeSelf", + value: function revokeSelf(sharing) { + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject5(), sharing._id)); + } + /** + * Revoke the sharing for all the members. Must be called + * from the owner's cozy + * + * @param {object} sharing Sharing Objects + */ + + }, { + key: "revokeAllRecipients", + value: function revokeAllRecipients(sharing) { + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject6(), sharing._id)); + } + }]); + return SharingCollection; +}(_DocumentCollection2.default); + +SharingCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; + +var getSharingRulesWithoutWarning = function getSharingRulesWithoutWarning(document, sharingType) { + if ((0, _FileCollection.isFile)(document)) { + return getSharingRulesForFile(document, sharingType); + } + + if (document._type === BITWARDEN_ORGANIZATIONS_DOCTYPE) { + return getSharingRulesForOrganizations(document); + } + + return getSharingRulesForPhotosAlbum(document, sharingType); +}; +/** + * Rules determine the behavior of the sharing when changes are made to the shared document + * See https://docs.cozy.io/en/cozy-stack/sharing-design/#description-of-a-sharing + * + * @param {Sharing} document - The document to share. Should have and _id and a name + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {Array<Rule>=} The rules that define how to share the document + */ + + +var getSharingRules = function getSharingRules(document, sharingType) { + if (sharingType) { + _logger.default.warn("sharingType is deprecated and will be removed. We now set this default rules: ".concat(getSharingRulesWithoutWarning(document), "} \n \n If this default rules do not fill your need, please set custom rules \n by using the 'rules' object of the SharingCollection.create() method")); + } + + return getSharingRulesWithoutWarning(document, sharingType); +}; +/** + * Compute the rules that define how to share a Photo Album. See https://docs.cozy.io/en/cozy-stack/sharing-design/#description-of-a-sharing + * + * @param {Sharing} document - The document to share. Should have and _id and a name + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {Array<Rule>=} The rules that define how to share a Photo Album + */ + + +exports.getSharingRules = getSharingRules; + +var getSharingRulesForPhotosAlbum = function getSharingRulesForPhotosAlbum(document, sharingType) { + var _id = document._id, + _type = document._type; + return [_objectSpread({ + title: 'collection', + doctype: _type, + values: [_id] + }, getSharingPolicyForAlbum(sharingType)), _objectSpread({ + title: 'items', + doctype: 'io.cozy.files', + values: ["".concat(_type, "/").concat(_id)], + selector: 'referenced_by' + }, getSharingPolicyForReferencedFiles(sharingType))]; +}; +/** + * Compute the sharing policy for a ReferencedFile based on its sharing type + * + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {SharingPolicy} The sharing policy for the ReferencedFile + */ + + +var getSharingPolicyForReferencedFiles = function getSharingPolicyForReferencedFiles(sharingType) { + return sharingType === 'two-way' ? { + add: 'sync', + update: 'sync', + remove: 'sync' + } : { + add: 'push', + update: 'none', + remove: 'push' + }; +}; +/** + * Compute the sharing policy for an Album based on its sharing type + * + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {Array<Rule>=} The sharing policy for the Album + */ + + +var getSharingPolicyForAlbum = function getSharingPolicyForAlbum(sharingType) { + if (!sharingType) return { + update: 'sync', + remove: 'revoke' + }; + return sharingType === 'two-way' ? { + update: 'sync', + remove: 'revoke' + } : { + update: 'push', + remove: 'revoke' + }; +}; +/** + * Compute the rules that define how to share a File. See https://docs.cozy.io/en/cozy-stack/sharing-design/#description-of-a-sharing + * + * @param {Sharing} document - The document to share. Should have and _id and a name + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {Array<Rule>=} The rules that define how to share a File + */ + + +var getSharingRulesForFile = function getSharingRulesForFile(document, sharingType) { + var _id = document._id, + name = document.name; + return [_objectSpread({ + title: name, + doctype: 'io.cozy.files', + values: [_id] + }, getSharingPolicyForFile(document, sharingType))]; +}; +/** + * Compute the sharing policy for a File based on its sharing type + * + * @param {Sharing} document - The document to share. Should have and _id and a name + * @param {SharingType} sharingType - The type of the sharing + * + * @returns {SharingPolicy} The sharing policy for the File + */ + + +var getSharingPolicyForFile = function getSharingPolicyForFile(document, sharingType) { + if ((0, _FileCollection.isDirectory)(document)) { + if (!sharingType) return { + add: 'sync', + update: 'sync', + remove: 'sync' + }; + return sharingType === 'two-way' ? { + add: 'sync', + update: 'sync', + remove: 'sync' + } : { + add: 'push', + update: 'push', + remove: 'push' + }; + } + + if (!sharingType) return { + update: 'sync', + remove: 'revoke' + }; + return sharingType === 'two-way' ? { + update: 'sync', + remove: 'revoke' + } : { + update: 'push', + remove: 'revoke' + }; +}; +/** + * Compute the rules that define how to share an Organization. See https://docs.cozy.io/en/cozy-stack/sharing-design/#description-of-a-sharing + * + * @param {Sharing} document The document to share. Should have and _id and a name + * + * @returns {Array<Rule>=} The rules that define how to share an Organization + */ + + +var getSharingRulesForOrganizations = function getSharingRulesForOrganizations(document) { + var _id = document._id, + name = document.name; + var sharingRules = [{ + title: name, + doctype: BITWARDEN_ORGANIZATIONS_DOCTYPE, + values: [_id], + add: 'sync', + update: 'sync', + remove: 'revoke' + }, { + title: 'Ciphers', + doctype: BITWARDEN_CIPHERS_DOCTYPE, + values: [_id], + add: 'sync', + update: 'sync', + remove: 'sync', + selector: 'organization_id' + }]; + return sharingRules; +}; +/** + * Compute the RelationshipItem that can be referenced as a sharing recipient + * + * @param {Recipient} item The recipient of a sharing + * + * @returns {RelationshipItem} The RelationshipItem that can be referenced as a sharing recipient + */ + + +var toRelationshipItem = function toRelationshipItem(item) { + return { + id: item._id, + type: item._type + }; +}; + +var _default = SharingCollection; +exports.default = _default; + +/***/ }), + +/***/ "lXRw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.KONNECTORS_DOCTYPE = void 0; +var KONNECTORS_DOCTYPE = 'io.cozy.konnectors'; +exports.KONNECTORS_DOCTYPE = KONNECTORS_DOCTYPE; + +/***/ }), + +/***/ "lZWV": +/***/ (function(module, exports) { + +/** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; + + +/***/ }), + +/***/ "lbMJ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNMOUNTED", function() { return UNMOUNTED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EXITED", function() { return EXITED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENTERING", function() { return ENTERING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENTERED", function() { return ENTERED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EXITING", function() { return EXITING; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("I4/v"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ZxWb"); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Y2Dv"); +/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("LRcO"); + + + + + + + + +var UNMOUNTED = 'unmounted'; +var EXITED = 'exited'; +var ENTERING = 'entering'; +var ENTERED = 'entered'; +var EXITING = 'exiting'; +/** + * The Transition component lets you describe a transition from one component + * state to another _over time_ with a simple declarative API. Most commonly + * it's used to animate the mounting and unmounting of a component, but can also + * be used to describe in-place transition states as well. + * + * --- + * + * **Note**: `Transition` is a platform-agnostic base component. If you're using + * transitions in CSS, you'll probably want to use + * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition) + * instead. It inherits all the features of `Transition`, but contains + * additional features necessary to play nice with CSS transitions (hence the + * name of the component). + * + * --- + * + * By default the `Transition` component does not alter the behavior of the + * component it renders, it only tracks "enter" and "exit" states for the + * components. It's up to you to give meaning and effect to those states. For + * example we can add styles to a component when it enters or exits: + * + * ```jsx + * import { Transition } from 'react-transition-group'; + * + * const duration = 300; + * + * const defaultStyle = { + * transition: `opacity ${duration}ms ease-in-out`, + * opacity: 0, + * } + * + * const transitionStyles = { + * entering: { opacity: 1 }, + * entered: { opacity: 1 }, + * exiting: { opacity: 0 }, + * exited: { opacity: 0 }, + * }; + * + * const Fade = ({ in: inProp }) => ( + * <Transition in={inProp} timeout={duration}> + * {state => ( + * <div style={{ + * ...defaultStyle, + * ...transitionStyles[state] + * }}> + * I'm a fade Transition! + * </div> + * )} + * </Transition> + * ); + * ``` + * + * There are 4 main states a Transition can be in: + * - `'entering'` + * - `'entered'` + * - `'exiting'` + * - `'exited'` + * + * Transition state is toggled via the `in` prop. When `true` the component + * begins the "Enter" stage. During this stage, the component will shift from + * its current transition state, to `'entering'` for the duration of the + * transition and then to the `'entered'` stage once it's complete. Let's take + * the following example (we'll use the + * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook): + * + * ```jsx + * function App() { + * const [inProp, setInProp] = useState(false); + * return ( + * <div> + * <Transition in={inProp} timeout={500}> + * {state => ( + * // ... + * )} + * </Transition> + * <button onClick={() => setInProp(true)}> + * Click to Enter + * </button> + * </div> + * ); + * } + * ``` + * + * When the button is clicked the component will shift to the `'entering'` state + * and stay there for 500ms (the value of `timeout`) before it finally switches + * to `'entered'`. + * + * When `in` is `false` the same thing happens except the state moves from + * `'exiting'` to `'exited'`. + */ + +var Transition = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(Transition, _React$Component); + + function Transition(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + var parentGroup = context; // In the context of a TransitionGroup all enters are really appears + + var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; + var initialStatus; + _this.appearStatus = null; + + if (props.in) { + if (appear) { + initialStatus = EXITED; + _this.appearStatus = ENTERING; + } else { + initialStatus = ENTERED; + } + } else { + if (props.unmountOnExit || props.mountOnEnter) { + initialStatus = UNMOUNTED; + } else { + initialStatus = EXITED; + } + } + + _this.state = { + status: initialStatus + }; + _this.nextCallback = null; + return _this; + } + + Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { + var nextIn = _ref.in; + + if (nextIn && prevState.status === UNMOUNTED) { + return { + status: EXITED + }; + } + + return null; + } // getSnapshotBeforeUpdate(prevProps) { + // let nextStatus = null + // if (prevProps !== this.props) { + // const { status } = this.state + // if (this.props.in) { + // if (status !== ENTERING && status !== ENTERED) { + // nextStatus = ENTERING + // } + // } else { + // if (status === ENTERING || status === ENTERED) { + // nextStatus = EXITING + // } + // } + // } + // return { nextStatus } + // } + ; + + var _proto = Transition.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.updateStatus(true, this.appearStatus); + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var nextStatus = null; + + if (prevProps !== this.props) { + var status = this.state.status; + + if (this.props.in) { + if (status !== ENTERING && status !== ENTERED) { + nextStatus = ENTERING; + } + } else { + if (status === ENTERING || status === ENTERED) { + nextStatus = EXITING; + } + } + } + + this.updateStatus(false, nextStatus); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.cancelNextCallback(); + }; + + _proto.getTimeouts = function getTimeouts() { + var timeout = this.props.timeout; + var exit, enter, appear; + exit = enter = appear = timeout; + + if (timeout != null && typeof timeout !== 'number') { + exit = timeout.exit; + enter = timeout.enter; // TODO: remove fallback for next major + + appear = timeout.appear !== undefined ? timeout.appear : enter; + } + + return { + exit: exit, + enter: enter, + appear: appear + }; + }; + + _proto.updateStatus = function updateStatus(mounting, nextStatus) { + if (mounting === void 0) { + mounting = false; + } + + if (nextStatus !== null) { + // nextStatus will always be ENTERING or EXITING. + this.cancelNextCallback(); + + if (nextStatus === ENTERING) { + this.performEnter(mounting); + } else { + this.performExit(); + } + } else if (this.props.unmountOnExit && this.state.status === EXITED) { + this.setState({ + status: UNMOUNTED + }); + } + }; + + _proto.performEnter = function performEnter(mounting) { + var _this2 = this; + + var enter = this.props.enter; + var appearing = this.context ? this.context.isMounting : mounting; + + var _ref2 = this.props.nodeRef ? [appearing] : [react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this), appearing], + maybeNode = _ref2[0], + maybeAppearing = _ref2[1]; + + var timeouts = this.getTimeouts(); + var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED + // if we are mounting and running this it means appear _must_ be set + + if (!mounting && !enter || _config__WEBPACK_IMPORTED_MODULE_5__["default"].disabled) { + this.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(maybeNode); + }); + return; + } + + this.props.onEnter(maybeNode, maybeAppearing); + this.safeSetState({ + status: ENTERING + }, function () { + _this2.props.onEntering(maybeNode, maybeAppearing); + + _this2.onTransitionEnd(enterTimeout, function () { + _this2.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(maybeNode, maybeAppearing); + }); + }); + }); + }; + + _proto.performExit = function performExit() { + var _this3 = this; + + var exit = this.props.exit; + var timeouts = this.getTimeouts(); + var maybeNode = this.props.nodeRef ? undefined : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this); // no exit animation skip right to EXITED + + if (!exit || _config__WEBPACK_IMPORTED_MODULE_5__["default"].disabled) { + this.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(maybeNode); + }); + return; + } + + this.props.onExit(maybeNode); + this.safeSetState({ + status: EXITING + }, function () { + _this3.props.onExiting(maybeNode); + + _this3.onTransitionEnd(timeouts.exit, function () { + _this3.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(maybeNode); + }); + }); + }); + }; + + _proto.cancelNextCallback = function cancelNextCallback() { + if (this.nextCallback !== null) { + this.nextCallback.cancel(); + this.nextCallback = null; + } + }; + + _proto.safeSetState = function safeSetState(nextState, callback) { + // This shouldn't be necessary, but there are weird race conditions with + // setState callbacks and unmounting in testing, so always make sure that + // we can cancel any pending setState callbacks after we unmount. + callback = this.setNextCallback(callback); + this.setState(nextState, callback); + }; + + _proto.setNextCallback = function setNextCallback(callback) { + var _this4 = this; + + var active = true; + + this.nextCallback = function (event) { + if (active) { + active = false; + _this4.nextCallback = null; + callback(event); + } + }; + + this.nextCallback.cancel = function () { + active = false; + }; + + return this.nextCallback; + }; + + _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) { + this.setNextCallback(handler); + var node = this.props.nodeRef ? this.props.nodeRef.current : react_dom__WEBPACK_IMPORTED_MODULE_4___default.a.findDOMNode(this); + var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; + + if (!node || doesNotHaveTimeoutOrListener) { + setTimeout(this.nextCallback, 0); + return; + } + + if (this.props.addEndListener) { + var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback], + maybeNode = _ref3[0], + maybeNextCallback = _ref3[1]; + + this.props.addEndListener(maybeNode, maybeNextCallback); + } + + if (timeout != null) { + setTimeout(this.nextCallback, timeout); + } + }; + + _proto.render = function render() { + var status = this.state.status; + + if (status === UNMOUNTED) { + return null; + } + + var _this$props = this.props, + children = _this$props.children, + _in = _this$props.in, + _mountOnEnter = _this$props.mountOnEnter, + _unmountOnExit = _this$props.unmountOnExit, + _appear = _this$props.appear, + _enter = _this$props.enter, + _exit = _this$props.exit, + _timeout = _this$props.timeout, + _addEndListener = _this$props.addEndListener, + _onEnter = _this$props.onEnter, + _onEntering = _this$props.onEntering, + _onEntered = _this$props.onEntered, + _onExit = _this$props.onExit, + _onExiting = _this$props.onExiting, + _onExited = _this$props.onExited, + _nodeRef = _this$props.nodeRef, + childProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); + + return ( + /*#__PURE__*/ + // allows for nested Transitions + react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__["default"].Provider, { + value: null + }, typeof children === 'function' ? children(status, childProps) : react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.only(children), childProps)) + ); + }; + + return Transition; +}(react__WEBPACK_IMPORTED_MODULE_3___default.a.Component); + +Transition.contextType = _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_7__["default"]; +Transition.propTypes = false ? undefined : {}; // Name the function so it is clearer in the documentation + +function noop() {} + +Transition.defaultProps = { + in: false, + mountOnEnter: false, + unmountOnExit: false, + appear: false, + enter: true, + exit: true, + onEnter: noop, + onEntering: noop, + onEntered: noop, + onExit: noop, + onExiting: noop, + onExited: noop +}; +Transition.UNMOUNTED = UNMOUNTED; +Transition.EXITED = EXITED; +Transition.ENTERING = ENTERING; +Transition.ENTERED = ENTERED; +Transition.EXITING = EXITING; +/* harmony default export */ __webpack_exports__["default"] = (Transition); + +/***/ }), + +/***/ "lhrJ": +/***/ (function(module, exports, __webpack_require__) { + +var toFinite = __webpack_require__("tR10"); + +/** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +module.exports = toInteger; + + +/***/ }), + +/***/ "liAc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ImageListItemBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oA52"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ImageListItemBar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "lk8G": +/***/ (function(module, exports, __webpack_require__) { + +var realNames = __webpack_require__("Gn8h"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; + + +/***/ }), + +/***/ "ll/m": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return deprecatedPropType; }); +function deprecatedPropType(validator, reason) { + if (true) { + return function () { + return null; + }; + } + + return function (props, propName, componentName, location, propFullName) { + var componentNameSafe = componentName || '<<anonymous>>'; + var propFullNameSafe = propFullName || propName; + + if (typeof props[propName] !== 'undefined') { + return new Error("The ".concat(location, " `").concat(propFullNameSafe, "` of ") + "`".concat(componentNameSafe, "` is deprecated. ").concat(reason)); + } + + return null; + }; +} + +/***/ }), + +/***/ "lmZr": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("gis9"); +/* harmony import */ var _internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("j2pP"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("kjpz"); +/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("x0Kp"); + + + + + + + + +/** + * @ignore - internal component. + */ + +var _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__["default"], null); + +var _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__["default"], null); + +var _ref3 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__["default"], null); + +var _ref4 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__["default"], null); + +var TablePaginationActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TablePaginationActions(props, ref) { + var backIconButtonProps = props.backIconButtonProps, + count = props.count, + nextIconButtonProps = props.nextIconButtonProps, + _props$onChangePage = props.onChangePage, + onChangePage = _props$onChangePage === void 0 ? function () {} : _props$onChangePage, + _props$onPageChange = props.onPageChange, + onPageChange = _props$onPageChange === void 0 ? function () {} : _props$onPageChange, + page = props.page, + rowsPerPage = props.rowsPerPage, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["backIconButtonProps", "count", "nextIconButtonProps", "onChangePage", "onPageChange", "page", "rowsPerPage"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__["default"])(); + + var handleBackButtonClick = function handleBackButtonClick(event) { + onChangePage(event, page - 1); + onPageChange(event, page - 1); + }; + + var handleNextButtonClick = function handleNextButtonClick(event) { + onChangePage(event, page + 1); + onPageChange(event, page + 1); + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_IconButton__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + onClick: handleBackButtonClick, + disabled: page === 0, + color: "inherit" + }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_IconButton__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + onClick: handleNextButtonClick, + disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false, + color: "inherit" + }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (TablePaginationActions); + +/***/ }), + +/***/ "loS6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONSOLE_LEVELS", function() { return CONSOLE_LEVELS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "consoleSandbox", function() { return consoleSandbox; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; }); +/* harmony import */ var _worldwide_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7bZ2"); + + +/** Prefix for logging strings */ +const PREFIX = 'Sentry Logger '; + +const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ; + +/** + * Temporarily disable sentry console instrumentations. + * + * @param callback The function to run against the original `console` messages + * @returns The results of the callback + */ +function consoleSandbox(callback) { + if (!('console' in _worldwide_js__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"])) { + return callback(); + } + + const originalConsole = _worldwide_js__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"].console ; + const wrappedLevels = {}; + + // Restore all wrapped console methods + CONSOLE_LEVELS.forEach(level => { + // TODO(v7): Remove this check as it's only needed for Node 6 + const originalWrappedFunc = + originalConsole[level] && (originalConsole[level] ).__sentry_original__; + if (level in originalConsole && originalWrappedFunc) { + wrappedLevels[level] = originalConsole[level] ; + originalConsole[level] = originalWrappedFunc ; + } + }); + + try { + return callback(); + } finally { + // Revert restoration to wrapped state + Object.keys(wrappedLevels).forEach(level => { + originalConsole[level] = wrappedLevels[level ]; + }); + } +} + +function makeLogger() { + let enabled = false; + const logger = { + enable: () => { + enabled = true; + }, + disable: () => { + enabled = false; + }, + }; + + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + CONSOLE_LEVELS.forEach(name => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + logger[name] = (...args) => { + if (enabled) { + consoleSandbox(() => { + _worldwide_js__WEBPACK_IMPORTED_MODULE_0__["GLOBAL_OBJ"].console[name](`${PREFIX}[${name}]:`, ...args); + }); + } + }; + }); + } else { + CONSOLE_LEVELS.forEach(name => { + logger[name] = () => undefined; + }); + } + + return logger ; +} + +// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used +let logger; +if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + logger = Object(_worldwide_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalSingleton"])('logger', makeLogger); +} else { + logger = makeLogger(); +} + + +//# sourceMappingURL=logger.js.map + + +/***/ }), + +/***/ "lomp": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; + +var SpriteSymbol = function SpriteSymbol(ref) { + var id = ref.id; + var viewBox = ref.viewBox; + var content = ref.content; + + this.id = id; + this.viewBox = viewBox; + this.content = content; +}; + +/** + * @return {string} + */ +SpriteSymbol.prototype.stringify = function stringify () { + return this.content; +}; + +/** + * @return {string} + */ +SpriteSymbol.prototype.toString = function toString () { + return this.stringify(); +}; + +SpriteSymbol.prototype.destroy = function destroy () { + var this$1 = this; + + ['id', 'viewBox', 'content'].forEach(function (prop) { return delete this$1[prop]; }); +}; + +/** + * @param {string} content + * @return {Element} + */ +var parse = function (content) { + var hasImportNode = !!document.importNode; + var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement; + + /** + * Fix for browser which are throwing WrongDocumentError + * if you insert an element which is not part of the document + * @see http://stackoverflow.com/a/7986519/4624403 + */ + if (hasImportNode) { + return document.importNode(doc, true); + } + + return doc; +}; + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var deepmerge = createCommonjsModule(function (module, exports) { +(function (root, factory) { + if (false) {} else { + module.exports = factory(); + } +}(commonjsGlobal, function () { + +function isMergeableObject(val) { + var nonNullObject = val && typeof val === 'object'; + + return nonNullObject + && Object.prototype.toString.call(val) !== '[object RegExp]' + && Object.prototype.toString.call(val) !== '[object Date]' +} + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneIfNecessary(value, optionsArgument) { + var clone = optionsArgument && optionsArgument.clone === true; + return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value +} + +function defaultArrayMerge(target, source, optionsArgument) { + var destination = target.slice(); + source.forEach(function(e, i) { + if (typeof destination[i] === 'undefined') { + destination[i] = cloneIfNecessary(e, optionsArgument); + } else if (isMergeableObject(e)) { + destination[i] = deepmerge(target[i], e, optionsArgument); + } else if (target.indexOf(e) === -1) { + destination.push(cloneIfNecessary(e, optionsArgument)); + } + }); + return destination +} + +function mergeObject(target, source, optionsArgument) { + var destination = {}; + if (isMergeableObject(target)) { + Object.keys(target).forEach(function (key) { + destination[key] = cloneIfNecessary(target[key], optionsArgument); + }); + } + Object.keys(source).forEach(function (key) { + if (!isMergeableObject(source[key]) || !target[key]) { + destination[key] = cloneIfNecessary(source[key], optionsArgument); + } else { + destination[key] = deepmerge(target[key], source[key], optionsArgument); + } + }); + return destination +} + +function deepmerge(target, source, optionsArgument) { + var array = Array.isArray(source); + var options = optionsArgument || { arrayMerge: defaultArrayMerge }; + var arrayMerge = options.arrayMerge || defaultArrayMerge; + + if (array) { + return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument) + } else { + return mergeObject(target, source, optionsArgument) + } +} + +deepmerge.all = function deepmergeAll(array, optionsArgument) { + if (!Array.isArray(array) || array.length < 2) { + throw new Error('first argument should be an array with at least two elements') + } + + // we are sure there are at least 2 values, so it is safe to have no initial value + return array.reduce(function(prev, next) { + return deepmerge(prev, next, optionsArgument) + }) +}; + +return deepmerge + +})); +}); + +var namespaces_1 = createCommonjsModule(function (module, exports) { +var namespaces = { + svg: { + name: 'xmlns', + uri: 'http://www.w3.org/2000/svg' + }, + xlink: { + name: 'xmlns:xlink', + uri: 'http://www.w3.org/1999/xlink' + } +}; + +exports.default = namespaces; +module.exports = exports.default; +}); + +/** + * @param {Object} attrs + * @return {string} + */ +var objectToAttrsString = function (attrs) { + return Object.keys(attrs).map(function (attr) { + var value = attrs[attr].toString().replace(/"/g, '"'); + return (attr + "=\"" + value + "\""); + }).join(' '); +}; + +var svg = namespaces_1.svg; +var xlink = namespaces_1.xlink; + +var defaultAttrs = {}; +defaultAttrs[svg.name] = svg.uri; +defaultAttrs[xlink.name] = xlink.uri; + +/** + * @param {string} [content] + * @param {Object} [attributes] + * @return {string} + */ +var wrapInSvgString = function (content, attributes) { + if ( content === void 0 ) content = ''; + + var attrs = deepmerge(defaultAttrs, attributes || {}); + var attrsRendered = objectToAttrsString(attrs); + return ("<svg " + attrsRendered + ">" + content + "</svg>"); +}; + +var BrowserSpriteSymbol = (function (SpriteSymbol$$1) { + function BrowserSpriteSymbol () { + SpriteSymbol$$1.apply(this, arguments); + } + + if ( SpriteSymbol$$1 ) BrowserSpriteSymbol.__proto__ = SpriteSymbol$$1; + BrowserSpriteSymbol.prototype = Object.create( SpriteSymbol$$1 && SpriteSymbol$$1.prototype ); + BrowserSpriteSymbol.prototype.constructor = BrowserSpriteSymbol; + + var prototypeAccessors = { isMounted: {} }; + + prototypeAccessors.isMounted.get = function () { + return !!this.node; + }; + + /** + * @param {Element} node + * @return {BrowserSpriteSymbol} + */ + BrowserSpriteSymbol.createFromExistingNode = function createFromExistingNode (node) { + return new BrowserSpriteSymbol({ + id: node.getAttribute('id'), + viewBox: node.getAttribute('viewBox'), + content: node.outerHTML + }); + }; + + BrowserSpriteSymbol.prototype.destroy = function destroy () { + if (this.isMounted) { + this.unmount(); + } + SpriteSymbol$$1.prototype.destroy.call(this); + }; + + /** + * @param {Element|string} target + * @return {Element} + */ + BrowserSpriteSymbol.prototype.mount = function mount (target) { + if (this.isMounted) { + return this.node; + } + + var mountTarget = typeof target === 'string' ? document.querySelector(target) : target; + var node = this.render(); + this.node = node; + + mountTarget.appendChild(node); + + return node; + }; + + /** + * @return {Element} + */ + BrowserSpriteSymbol.prototype.render = function render () { + var content = this.stringify(); + return parse(wrapInSvgString(content)).childNodes[0]; + }; + + BrowserSpriteSymbol.prototype.unmount = function unmount () { + this.node.parentNode.removeChild(this.node); + }; + + Object.defineProperties( BrowserSpriteSymbol.prototype, prototypeAccessors ); + + return BrowserSpriteSymbol; +}(SpriteSymbol)); + +return BrowserSpriteSymbol; + +}))); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "lpkQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.transformBulkDocsResponse = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _zipWith = _interopRequireDefault(__webpack_require__("59q6")); + +var _dsl = __webpack_require__("v2kV"); + +var _CozyLink2 = _interopRequireDefault(__webpack_require__("sV2q")); + +var _const = __webpack_require__("P3Kl"); + +var _errors = __webpack_require__("73Z9"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * + * To know if cozy-client should use Document.find() + * or Document.all() + * Similar to what is done in CozyPouchLink executeQuery() + * + * @param {QueryDefinition} queryDefinition - QueryDefinition to check + * @returns {boolean} If has find options + * + */ +var hasFindOptions = function hasFindOptions(queryDefinition) { + var selector = queryDefinition.selector, + partialFilter = queryDefinition.partialFilter, + sort = queryDefinition.sort, + fields = queryDefinition.fields; + if (selector || partialFilter || sort || fields) return true; + return false; +}; +/** + * Returns full documents after a bulk update + * + * @private + * + * @param {import("./types").CouchDBBulkResult[]} bulkResponse - Response from bulk docs + * @param {import("./types").CozyClientDocument[]} originalDocuments - Documents that were updated + * @returns {{ data: import("./types").CozyClientDocument[] }} - Full documents with updated _id and _rev + */ + + +var transformBulkDocsResponse = function transformBulkDocsResponse(bulkResponse, originalDocuments) { + var updatedDocs = (0, _zipWith.default)(bulkResponse, originalDocuments, function (result, od) { + return result.ok ? _objectSpread(_objectSpread({}, od), {}, { + _id: result.id, + _rev: result.rev + }) : od; + }); + + if (bulkResponse.find(function (x) { + return !x.ok; + })) { + throw new _errors.BulkEditError(bulkResponse, updatedDocs); + } + + return { + data: updatedDocs + }; +}; +/** + * Transfers queries and mutations to a remote stack + */ + + +exports.transformBulkDocsResponse = transformBulkDocsResponse; + +var StackLink = /*#__PURE__*/function (_CozyLink) { + (0, _inherits2.default)(StackLink, _CozyLink); + + var _super = _createSuper(StackLink); + + /** + * @param {object} [options] - Options + * @param {object} [options.stackClient] - A StackClient + * @param {object} [options.client] - A StackClient (deprecated) + */ + function StackLink() { + var _this; + + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + client = _ref.client, + stackClient = _ref.stackClient; + + (0, _classCallCheck2.default)(this, StackLink); + _this = _super.call(this); + + if (client) { + _logger.default.warn('Using options.client is deprecated, prefer options.stackClient'); + } + + _this.stackClient = stackClient || client; + return _this; + } + + (0, _createClass2.default)(StackLink, [{ + key: "registerClient", + value: function registerClient(client) { + this.stackClient = client.stackClient || client.client; + } + }, { + key: "reset", + value: function reset() { + this.stackClient = null; + } + }, { + key: "request", + value: function request(operation, result, forward) { + if (operation.mutationType) { + return this.executeMutation(operation, result, forward); + } + + return this.executeQuery(operation); + } + /** + * + * @param {QueryDefinition} query - Query to execute + * @returns {Promise<import("./types").ClientResponse>} + */ + + }, { + key: "executeQuery", + value: function executeQuery(query) { + var doctype = query.doctype, + selector = query.selector, + id = query.id, + ids = query.ids, + referenced = query.referenced, + options = (0, _objectWithoutProperties2.default)(query, ["doctype", "selector", "id", "ids", "referenced"]); + + if (!doctype) { + _logger.default.warn('Bad query', query); + + throw new Error('No doctype found in a query definition'); + } + + var collection = this.stackClient.collection(doctype); + + if (id) { + return collection.get(id, query); + } + + if (ids) { + return collection.getAll(ids); + } + + if (referenced) { + return collection.findReferencedBy(referenced, options); + } + + if (hasFindOptions(query)) { + return collection.find(selector, options); + } else { + return collection.all(options); + } + } + }, { + key: "executeMutation", + value: function () { + var _executeMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(mutation, result, forward) { + var mutationType, doc, docs, props, updateAllResp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + mutationType = mutation.mutationType, doc = mutation.document, docs = mutation.documents, props = (0, _objectWithoutProperties2.default)(mutation, ["mutationType", "document", "documents"]); + _context.t0 = mutationType; + _context.next = _context.t0 === _dsl.MutationTypes.CREATE_DOCUMENT ? 4 : _context.t0 === _dsl.MutationTypes.UPDATE_DOCUMENTS ? 5 : _context.t0 === _dsl.MutationTypes.UPDATE_DOCUMENT ? 9 : _context.t0 === _dsl.MutationTypes.DELETE_DOCUMENT ? 10 : _context.t0 === _dsl.MutationTypes.ADD_REFERENCES_TO ? 11 : _context.t0 === _dsl.MutationTypes.REMOVE_REFERENCES_TO ? 12 : _context.t0 === _dsl.MutationTypes.ADD_REFERENCED_BY ? 13 : _context.t0 === _dsl.MutationTypes.REMOVE_REFERENCED_BY ? 18 : _context.t0 === _dsl.MutationTypes.UPLOAD_FILE ? 23 : 24; + break; + + case 4: + return _context.abrupt("return", this.stackClient.collection(doc._type).create(doc)); + + case 5: + _context.next = 7; + return this.stackClient.collection(docs[0]._type).updateAll(docs); + + case 7: + updateAllResp = _context.sent; + return _context.abrupt("return", transformBulkDocsResponse(updateAllResp, docs)); + + case 9: + return _context.abrupt("return", this.stackClient.collection(doc._type).update(doc)); + + case 10: + return _context.abrupt("return", this.stackClient.collection(doc._type).destroy(doc)); + + case 11: + return _context.abrupt("return", this.stackClient.collection(props.referencedDocuments[0]._type).addReferencesTo(doc, props.referencedDocuments)); + + case 12: + return _context.abrupt("return", this.stackClient.collection(props.referencedDocuments[0]._type).removeReferencesTo(doc, props.referencedDocuments)); + + case 13: + if (!(doc._type === _const.DOCTYPE_FILES)) { + _context.next = 17; + break; + } + + return _context.abrupt("return", this.stackClient.collection(_const.DOCTYPE_FILES).addReferencedBy(doc, props.referencedDocuments)); + + case 17: + throw new Error('The document type should be io.cozy.files'); + + case 18: + if (!(doc._type === _const.DOCTYPE_FILES)) { + _context.next = 22; + break; + } + + return _context.abrupt("return", this.stackClient.collection(_const.DOCTYPE_FILES).removeReferencedBy(doc, props.referencedDocuments)); + + case 22: + throw new Error('The document type should be io.cozy.files'); + + case 23: + return _context.abrupt("return", this.stackClient.collection(_const.DOCTYPE_FILES).upload(props.file, props.dirPath)); + + case 24: + return _context.abrupt("return", forward(mutation, result)); + + case 25: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function executeMutation(_x, _x2, _x3) { + return _executeMutation.apply(this, arguments); + } + + return executeMutation; + }() + }]); + return StackLink; +}(_CozyLink2.default); + +exports.default = StackLink; + +/***/ }), + +/***/ "lrTv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__("sVxE"); +var GetIntrinsic = __webpack_require__("RmWH"); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ "ls/u": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); + + + + + + + + + +var RADIUS_STANDARD = 10; +var RADIUS_DOT = 4; +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + display: 'inline-flex', + // For correct alignment with the text. + verticalAlign: 'middle', + flexShrink: 0 + }, + + /* Styles applied to the badge `span` element. */ + badge: { + display: 'flex', + flexDirection: 'row', + flexWrap: 'wrap', + justifyContent: 'center', + alignContent: 'center', + alignItems: 'center', + position: 'absolute', + boxSizing: 'border-box', + fontFamily: theme.typography.fontFamily, + fontWeight: theme.typography.fontWeightMedium, + fontSize: theme.typography.pxToRem(12), + minWidth: RADIUS_STANDARD * 2, + lineHeight: 1, + padding: '0 6px', + height: RADIUS_STANDARD * 2, + borderRadius: RADIUS_STANDARD, + zIndex: 1, + // Render the badge on top of potential ripples. + transition: theme.transitions.create('transform', { + easing: theme.transitions.easing.easeInOut, + duration: theme.transitions.duration.enteringScreen + }) + }, + + /* Styles applied to the root element if `color="primary"`. */ + colorPrimary: { + backgroundColor: theme.palette.primary.main, + color: theme.palette.primary.contrastText + }, + + /* Styles applied to the root element if `color="secondary"`. */ + colorSecondary: { + backgroundColor: theme.palette.secondary.main, + color: theme.palette.secondary.contrastText + }, + + /* Styles applied to the root element if `color="error"`. */ + colorError: { + backgroundColor: theme.palette.error.main, + color: theme.palette.error.contrastText + }, + + /* Styles applied to the root element if `variant="dot"`. */ + dot: { + borderRadius: RADIUS_DOT, + height: RADIUS_DOT * 2, + minWidth: RADIUS_DOT * 2, + padding: 0 + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap="rectangle"`. */ + anchorOriginTopRightRectangle: { + top: 0, + right: 0, + transform: 'scale(1) translate(50%, -50%)', + transformOrigin: '100% 0%', + '&$invisible': { + transform: 'scale(0) translate(50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap="rectangular"`. */ + anchorOriginTopRightRectangular: { + top: 0, + right: 0, + transform: 'scale(1) translate(50%, -50%)', + transformOrigin: '100% 0%', + '&$invisible': { + transform: 'scale(0) translate(50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap="rectangle"`. */ + anchorOriginBottomRightRectangle: { + bottom: 0, + right: 0, + transform: 'scale(1) translate(50%, 50%)', + transformOrigin: '100% 100%', + '&$invisible': { + transform: 'scale(0) translate(50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap="rectangular"`. */ + anchorOriginBottomRightRectangular: { + bottom: 0, + right: 0, + transform: 'scale(1) translate(50%, 50%)', + transformOrigin: '100% 100%', + '&$invisible': { + transform: 'scale(0) translate(50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap="rectangle"`. */ + anchorOriginTopLeftRectangle: { + top: 0, + left: 0, + transform: 'scale(1) translate(-50%, -50%)', + transformOrigin: '0% 0%', + '&$invisible': { + transform: 'scale(0) translate(-50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap="rectangular"`. */ + anchorOriginTopLeftRectangular: { + top: 0, + left: 0, + transform: 'scale(1) translate(-50%, -50%)', + transformOrigin: '0% 0%', + '&$invisible': { + transform: 'scale(0) translate(-50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap="rectangle"`. */ + anchorOriginBottomLeftRectangle: { + bottom: 0, + left: 0, + transform: 'scale(1) translate(-50%, 50%)', + transformOrigin: '0% 100%', + '&$invisible': { + transform: 'scale(0) translate(-50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap="rectangular"`. */ + anchorOriginBottomLeftRectangular: { + bottom: 0, + left: 0, + transform: 'scale(1) translate(-50%, 50%)', + transformOrigin: '0% 100%', + '&$invisible': { + transform: 'scale(0) translate(-50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap="circle"`. */ + anchorOriginTopRightCircle: { + top: '14%', + right: '14%', + transform: 'scale(1) translate(50%, -50%)', + transformOrigin: '100% 0%', + '&$invisible': { + transform: 'scale(0) translate(50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap="circular"`. */ + anchorOriginTopRightCircular: { + top: '14%', + right: '14%', + transform: 'scale(1) translate(50%, -50%)', + transformOrigin: '100% 0%', + '&$invisible': { + transform: 'scale(0) translate(50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap="circle"`. */ + anchorOriginBottomRightCircle: { + bottom: '14%', + right: '14%', + transform: 'scale(1) translate(50%, 50%)', + transformOrigin: '100% 100%', + '&$invisible': { + transform: 'scale(0) translate(50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap="circular"`. */ + anchorOriginBottomRightCircular: { + bottom: '14%', + right: '14%', + transform: 'scale(1) translate(50%, 50%)', + transformOrigin: '100% 100%', + '&$invisible': { + transform: 'scale(0) translate(50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap="circle"`. */ + anchorOriginTopLeftCircle: { + top: '14%', + left: '14%', + transform: 'scale(1) translate(-50%, -50%)', + transformOrigin: '0% 0%', + '&$invisible': { + transform: 'scale(0) translate(-50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap="circular"`. */ + anchorOriginTopLeftCircular: { + top: '14%', + left: '14%', + transform: 'scale(1) translate(-50%, -50%)', + transformOrigin: '0% 0%', + '&$invisible': { + transform: 'scale(0) translate(-50%, -50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap="circle"`. */ + anchorOriginBottomLeftCircle: { + bottom: '14%', + left: '14%', + transform: 'scale(1) translate(-50%, 50%)', + transformOrigin: '0% 100%', + '&$invisible': { + transform: 'scale(0) translate(-50%, 50%)' + } + }, + + /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap="circular"`. */ + anchorOriginBottomLeftCircular: { + bottom: '14%', + left: '14%', + transform: 'scale(1) translate(-50%, 50%)', + transformOrigin: '0% 100%', + '&$invisible': { + transform: 'scale(0) translate(-50%, 50%)' + } + }, + + /* Pseudo-class to the badge `span` element if `invisible={true}`. */ + invisible: { + transition: theme.transitions.create('transform', { + easing: theme.transitions.easing.easeInOut, + duration: theme.transitions.duration.leavingScreen + }) + } + }; +}; +var Badge = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Badge(props, ref) { + var _props$anchorOrigin = props.anchorOrigin, + anchorOrigin = _props$anchorOrigin === void 0 ? { + vertical: 'top', + horizontal: 'right' + } : _props$anchorOrigin, + badgeContent = props.badgeContent, + children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$component = props.component, + ComponentProp = _props$component === void 0 ? 'span' : _props$component, + invisibleProp = props.invisible, + _props$max = props.max, + max = _props$max === void 0 ? 99 : _props$max, + _props$overlap = props.overlap, + overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap, + _props$showZero = props.showZero, + showZero = _props$showZero === void 0 ? false : _props$showZero, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["anchorOrigin", "badgeContent", "children", "classes", "className", "color", "component", "invisible", "max", "overlap", "showZero", "variant"]); + + var invisible = invisibleProp; + + if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) { + invisible = true; + } + + var displayValue = ''; + + if (variant !== 'dot') { + displayValue = badgeContent > max ? "".concat(max, "+") : badgeContent; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](ComponentProp, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.badge, classes["".concat(anchorOrigin.horizontal).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(anchorOrigin.vertical), "}")], classes["anchorOrigin".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(anchorOrigin.vertical)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(anchorOrigin.horizontal)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(overlap))], color !== 'default' && classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(color))], invisible && classes.invisible, variant === 'dot' && classes.dot) + }, displayValue)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiBadge' +})(Badge)); + +/***/ }), + +/***/ "lsN8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>} + */ + +var ExpansionPanelContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({}); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ExpansionPanelContext); + +/***/ }), + +/***/ "lwnL": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("pN3j") +var buildFormatLocale = __webpack_require__("RFRV") + +/** + * @category Locales + * @summary Portuguese locale. + * @author Dário Freire [@dfreire]{@link https://github.com/dfreire} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "lwqu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: {}, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + horizontal: { + paddingLeft: 8, + paddingRight: 8 + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: {}, + + /* Styles applied to the root element if `alternativeLabel={true}`. */ + alternativeLabel: { + flex: 1, + position: 'relative' + }, + + /* Pseudo-class applied to the root element if `completed={true}`. */ + completed: {} +}; +var Step = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Step(props, ref) { + var _props$active = props.active, + active = _props$active === void 0 ? false : _props$active, + alternativeLabel = props.alternativeLabel, + children = props.children, + classes = props.classes, + className = props.className, + _props$completed = props.completed, + completed = _props$completed === void 0 ? false : _props$completed, + connectorProp = props.connector, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$expanded = props.expanded, + expanded = _props$expanded === void 0 ? false : _props$expanded, + index = props.index, + last = props.last, + orientation = props.orientation, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "connector", "disabled", "expanded", "index", "last", "orientation"]); + + var connector = connectorProp ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](connectorProp, { + orientation: orientation, + alternativeLabel: alternativeLabel, + index: index, + active: active, + completed: completed, + disabled: disabled + }) : null; + var newChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed), + ref: ref + }, other), connector && alternativeLabel && index !== 0 ? connector : null, react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return null; + } + + if (false) {} + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + active: active, + alternativeLabel: alternativeLabel, + completed: completed, + disabled: disabled, + expanded: expanded, + last: last, + icon: index + 1, + orientation: orientation + }, child.props)); + })); + + if (connector && !alternativeLabel && index !== 0) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, connector, newChildren); + } + + return newChildren; +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiStep' +})(Step)); + +/***/ }), + +/***/ "lyB6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.startApp = exports.default = exports.checkApp = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _platform = __webpack_require__("GA40"); + +var cordovaPluginIsInstalled = function cordovaPluginIsInstalled() { + return window.startApp; +}; + +/** + * Normalize startApp params for Android and iOS + */ +var getParams = function getParams(_ref) { + var appId = _ref.appId, + uri = _ref.uri; + + if ((0, _platform.isAndroidApp)()) { + return { + package: appId + }; + } else { + return uri; + } +}; + +var exported = {}; +/** + * Start an application if it is installed on the phone + * @returns Promise - False if the application was not able to be started + */ + +var startApp = exported.startApp = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(appInfo) { + var startAppPlugin, isAppInstalled, params; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + startAppPlugin = window.startApp; + _context.next = 3; + return exported.checkApp(appInfo); + + case 3: + isAppInstalled = _context.sent; + + if (!isAppInstalled) { + _context.next = 9; + break; + } + + params = getParams(appInfo); + return _context.abrupt("return", new Promise(function (resolve, reject) { + if (!cordovaPluginIsInstalled()) { + reject(new Error("Cordova plugin 'com.lampa.startapp' is not installed. This plugin is needed to start a native app. Required by cozy-bar")); + return; + } + + startAppPlugin.set(params).start(resolve, reject); + })); + + case 9: + return _context.abrupt("return", false); + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Check that an application is installed on the phone + * @returns Promise - Promise containing information on the application + * + * @example + * > checkApp({ appId: 'io.cozy.drive.mobile', uri: 'cozydrive://' }) + * Promise.resolve({ + * versionName: "0.9.2", + * packageName: "io.cozy.drive.mobile", + * versionCode: 902, + * applicationInfo: "ApplicationInfo{70aa0ef io.cozy.drive.mobile}" + * }) + */ + + +exports.startApp = startApp; + +var checkApp = exported.checkApp = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(appInfo) { + var startAppPlugin, params; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + startAppPlugin = window.startApp; + params = getParams(appInfo); + return _context2.abrupt("return", new Promise(function (resolve, reject) { + if (!cordovaPluginIsInstalled()) { + reject(new Error("Cordova plugin 'com.lampa.startapp' is not installed.")); + return; + } + + startAppPlugin.set(params).check(function (infos) { + return resolve(infos === 'OK' ? true : infos); + }, function (error) { + if (error === false || error.indexOf('NameNotFoundException') === 0) { + // Plugin returns an error 'NameNotFoundException' on Android and + // false on iOS when an application is not found. + // We prefer to always return false + resolve(false); + } else { + reject(error); + } + }); + })); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function (_x2) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.checkApp = checkApp; +var _default = exported; +exports.default = _default; + +/***/ }), + +/***/ "m0eP": +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__("GMq6"); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; + + +/***/ }), + +/***/ "m1uh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppsContent", function() { return AppsContent; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("IGOm"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("AHiN"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("mkkA"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("RLdO"); +/* harmony import */ var cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("gc+w"); +/* harmony import */ var _AppItem__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("VnBx"); +/* harmony import */ var _AppItemPlaceholder__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("kMOt"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + +var sorter = function sorter(fn) { + return function (itemA, itemB) { + return fn(itemA) > fn(itemB); + }; +}; + +var AppsContent = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(AppsContent, _Component); + + var _super = _createSuper(AppsContent); + + function AppsContent(props, context) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, AppsContent); + + _this = _super.call(this, props, context); + _this.translateApp = translateApp(_this.props.t); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(AppsContent, [{ + key: "render", + value: function render() { + var _this$props = this.props, + t = _this$props.t, + apps = _this$props.apps, + breakpoints = _this$props.breakpoints, + homeApp = _this$props.homeApp, + isFetchingApps = _this$props.isFetchingApps, + onAppSwitch = _this$props.onAppSwitch, + isInvertedTheme = _this$props.isInvertedTheme; + var isMobile = breakpoints.isMobile; + var isHomeApp = homeApp && homeApp.isCurrentApp; + var homeSlug = homeApp && homeApp.slug; + + if (!isFetchingApps && (!apps || !apps.length)) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("p", { + className: "coz-nav--error coz-nav-group" + }, t('no_apps')); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-pop-content" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("ul", { + className: "coz-nav-group" + }, isMobile && homeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItem__WEBPACK_IMPORTED_MODULE_13__["default"], { + app: homeApp, + useHomeIcon: true, + onAppSwitch: onAppSwitch, + isInvertedTheme: isInvertedTheme + }), isFetchingApps ? new Array(3).fill({}).map(function (nothing, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItemPlaceholder__WEBPACK_IMPORTED_MODULE_14__["default"], { + key: index + }); + }) : apps.filter(function (app) { + return app.slug !== homeSlug; + }).sort(sorter(this.translateApp)).map(function (app, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItem__WEBPACK_IMPORTED_MODULE_13__["default"], { + app: app, + key: index, + onAppSwitch: onAppSwitch, + isInvertedTheme: isInvertedTheme + }); + })), homeApp && !isMobile && !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("a", { + role: "menuitem", + href: homeApp.href, + className: "coz-apps-home-btn" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default.a, { + icon: cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10___default.a + }), t('menu.home'))); + } + }]); + + return AppsContent; +}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); +AppsContent.propTypes = { + homeApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.shape({ + isCurrentApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + slug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + href: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string + }), + apps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.array, + isFetchingApps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool.isRequired, + onAppSwitch: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; + +var translateApp = function translateApp(t) { + return function (app) { + var namePrefix = app.namePrefix ? t("".concat(app.slug, ".namePrefix"), { + _: app.namePrefix + }) : null; + var name = t("".concat(app.slug, ".name"), { + _: app.name + }); + return namePrefix ? "".concat(namePrefix, " ").concat(name) : "".concat(name); + }; +}; + +var mapStateToProps = function mapStateToProps(state) { + return { + apps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["getApps"])(state), + homeApp: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["getHomeApp"])(state), + isFetchingApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["isFetchingApps"])(state) + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_6__["connect"])(mapStateToProps)(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__["translate"])()(cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11___default()()(AppsContent)))); + +/***/ }), + +/***/ "m2c+": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'manj kot sekunda', + two: 'manj kot 2 sekundi', + three: 'manj kot {{count}} sekunde', + other: 'manj kot {{count}} sekund' + }, + + xSeconds: { + one: '1 sekunda', + two: '2 sekundi', + three: '{{count}} sekunde', + other: '{{count}} sekund' + }, + + halfAMinute: 'pol minute', + + lessThanXMinutes: { + one: 'manj kot minuta', + two: 'manj kot 2 minuti', + three: 'manj kot {{count}} minute', + other: 'manj kot {{count}} minut' + }, + + xMinutes: { + one: '1 minuta', + two: '2 minuti', + three: '{{count}} minute', + other: '{{count}} minut' + }, + + aboutXHours: { + one: 'približno 1 ura', + two: 'približno 2 uri', + three: 'približno {{count}} ure', + other: 'približno {{count}} ur' + }, + + xHours: { + one: '1 ura', + two: '2 uri', + three: '{{count}} ure', + other: '{{count}} ur' + }, + + xDays: { + one: '1 dan', + two: '2 dni', + three: '{{count}} dni', + other: '{{count}} dni' + }, + + aboutXMonths: { + one: 'približno 1 mesec', + two: 'približno 2 meseca', + three: 'približno {{count}} mesece', + other: 'približno {{count}} mesecev' + }, + + xMonths: { + one: '1 mesec', + two: '2 meseca', + three: '{{count}} meseci', + other: '{{count}} mesecev' + }, + + aboutXYears: { + one: 'približno 1 leto', + two: 'približno 2 leti', + three: 'približno {{count}} leta', + other: 'približno {{count}} let' + }, + + xYears: { + one: '1 leto', + two: '2 leti', + three: '{{count}} leta', + other: '{{count}} let' + }, + + overXYears: { + one: 'več kot 1 leto', + two: 'več kot 2 leti', + three: 'več kot {{count}} leta', + other: 'več kot {{count}} let' + }, + + almostXYears: { + one: 'skoraj 1 leto', + two: 'skoraj 2 leti', + three: 'skoraj {{count}} leta', + other: 'skoraj {{count}} let' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else if (count === 2) { + result = distanceInWordsLocale[token].two + } else if (count === 3 || count === 4) { + result = distanceInWordsLocale[token].three.replace('{{count}}', count) + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + result = result.replace(/(minut|sekund|ur)(a)/, '$1o') + if (token === 'xMonths') { + result = result.replace(/(mesec)(i)/, '$1e') + } + if (options.comparison > 0) { + return 'čez ' + result + } else { + return result + ' nazaj' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "m3bF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLCP", function() { return onLCP; }); +/* harmony import */ var _lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UDFD"); +/* harmony import */ var _lib_getActivationStart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pjZ0"); +/* harmony import */ var _lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("CGpO"); +/* harmony import */ var _lib_initMetric_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("FXwW"); +/* harmony import */ var _lib_observe_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("u8T2"); +/* harmony import */ var _lib_onHidden_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("t3J8"); + + + + + + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const reportedMetricIDs = {}; + +/** + * Calculates the [LCP](https://web.dev/lcp/) value for the current page and + * calls the `callback` function once the value is ready (along with the + * relevant `largest-contentful-paint` performance entry used to determine the + * value). The reported value is a `DOMHighResTimeStamp`. + * + * If the `reportAllChanges` configuration option is set to `true`, the + * `callback` function will be called any time a new `largest-contentful-paint` + * performance entry is dispatched, or once the final value of the metric has + * been determined. + */ +const onLCP = (onReport, opts = {}) => { + const visibilityWatcher = Object(_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_2__["getVisibilityWatcher"])(); + const metric = Object(_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_3__["initMetric"])('LCP'); + let report; + + const handleEntries = (entries) => { + const lastEntry = entries[entries.length - 1] ; + if (lastEntry) { + // The startTime attribute returns the value of the renderTime if it is + // not 0, and the value of the loadTime otherwise. The activationStart + // reference is used because LCP should be relative to page activation + // rather than navigation start if the page was prerendered. + const value = Math.max(lastEntry.startTime - Object(_lib_getActivationStart_js__WEBPACK_IMPORTED_MODULE_1__["getActivationStart"])(), 0); + + // Only report if the page wasn't hidden prior to LCP. + if (value < visibilityWatcher.firstHiddenTime) { + metric.value = value; + metric.entries = [lastEntry]; + report(); + } + } + }; + + const po = Object(_lib_observe_js__WEBPACK_IMPORTED_MODULE_4__["observe"])('largest-contentful-paint', handleEntries); + + if (po) { + report = Object(_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, opts.reportAllChanges); + + const stopListening = () => { + if (!reportedMetricIDs[metric.id]) { + handleEntries(po.takeRecords() ); + po.disconnect(); + reportedMetricIDs[metric.id] = true; + report(true); + } + }; + + // Stop listening after input. Note: while scrolling is an input that + // stop LCP observation, it's unreliable since it can be programmatically + // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75 + ['keydown', 'click'].forEach(type => { + addEventListener(type, stopListening, { once: true, capture: true }); + }); + + Object(_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_5__["onHidden"])(stopListening, true); + } +}; + + +//# sourceMappingURL=getLCP.js.map + + +/***/ }), + +/***/ "m505": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JobState = void 0; +var JobState; +exports.JobState = JobState; +(function (JobState) { + JobState["Errored"] = "errored"; + JobState["Running"] = "running"; + JobState["Done"] = "done"; +})(JobState || (exports.JobState = JobState = {})); + +/***/ }), + +/***/ "m66x": +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__("TxVH"); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__("HkU0")(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ "m6Tf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getDeviceName = void 0; + +var _capitalize = _interopRequireDefault(__webpack_require__("13ub")); + +var _cordova = __webpack_require__("dlno"); + +var _plugins = __webpack_require__("QJIl"); + +var _platform = __webpack_require__("AzAX"); + +var DEFAULT_DEVICE = 'Device'; + +// device +var getAppleModel = function getAppleModel(identifier) { + var devices = ['iPhone', 'iPad', 'Watch', 'AppleTV']; + + for (var _i = 0, _devices = devices; _i < _devices.length; _i++) { + var _device = _devices[_i]; + + if (identifier.match(new RegExp(_device))) { + return _device; + } + } + + return DEFAULT_DEVICE; +}; + +var getDeviceName = function getDeviceName() { + if (!(0, _plugins.hasDevicePlugin)()) { + if ((0, _cordova.isCordova)()) { + console.warn('You should install `cordova-plugin-device`.'); // eslint-disable-line no-console + } + + return DEFAULT_DEVICE; + } + + var _window$device = window.device, + manufacturer = _window$device.manufacturer, + originalModel = _window$device.model; + var model = (0, _platform.isIOSApp)() ? getAppleModel(originalModel) : originalModel; + return "".concat((0, _capitalize.default)(manufacturer), " ").concat(model); +}; + +exports.getDeviceName = getDeviceName; + +/***/ }), + +/***/ "m7t9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EXPLORATION_DOCTYPE = void 0; +var EXPLORATION_DOCTYPE = 'com.grandlyon.ecolyo.exploration'; +exports.EXPLORATION_DOCTYPE = EXPLORATION_DOCTYPE; + +/***/ }), + +/***/ "m8uA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeXHRTransport", function() { return makeXHRTransport; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); + + + +/** + * The DONE ready state for XmlHttpRequest + * + * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined + * (e.g. during testing, it is `undefined`) + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState} + */ +const XHR_READYSTATE_DONE = 4; + +/** + * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry. + */ +function makeXHRTransport(options) { + function makeRequest(request) { + return new _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["SyncPromise"]((resolve, reject) => { + const xhr = new XMLHttpRequest(); + + xhr.onerror = reject; + + xhr.onreadystatechange = () => { + if (xhr.readyState === XHR_READYSTATE_DONE) { + resolve({ + statusCode: xhr.status, + headers: { + 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'), + 'retry-after': xhr.getResponseHeader('Retry-After'), + }, + }); + } + }; + + xhr.open('POST', options.url); + + for (const header in options.headers) { + if (Object.prototype.hasOwnProperty.call(options.headers, header)) { + xhr.setRequestHeader(header, options.headers[header]); + } + } + + xhr.send(request.body); + }); + } + + return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["createTransport"])(options, makeRequest); +} + + +//# sourceMappingURL=xhr.js.map + + +/***/ }), + +/***/ "m9uD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("gwok"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Box__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styleFunction", function() { return _Box__WEBPACK_IMPORTED_MODULE_0__["styleFunction"]; }); + + + +/***/ }), + +/***/ "mDvC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FLUIDSPRICES_DOCTYPE = void 0; +var FLUIDSPRICES_DOCTYPE = 'com.grandlyon.ecolyo.fluidsprices'; +exports.FLUIDSPRICES_DOCTYPE = FLUIDSPRICES_DOCTYPE; + +/***/ }), + +/***/ "mFIo": +/***/ (function(module, exports, __webpack_require__) { + +var Stack = __webpack_require__("v64C"), + baseIsEqual = __webpack_require__("kSPP"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; + + +/***/ }), + +/***/ "mFeQ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.createMockClient = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _store = __webpack_require__("6mdx"); + +var _cozyStackClient = __webpack_require__("yg5R"); + +var _dsl = __webpack_require__("v2kV"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var fillQueryInsideClient = function fillQueryInsideClient(client, queryName, queryOptions) { + var definition = queryOptions.definition, + doctype = queryOptions.doctype, + data = queryOptions.data, + queryResult = (0, _objectWithoutProperties2.default)(queryOptions, ["definition", "doctype", "data"]); + client.store.dispatch((0, _store.initQuery)(queryName, definition || (0, _dsl.Q)(doctype))); + client.store.dispatch((0, _store.receiveQueryResult)(queryName, _objectSpread({ + data: data ? data.map(function (doc) { + return (0, _cozyStackClient.normalizeDoc)(doc, doctype); + }) : data + }, queryResult))); +}; + +var mockedQueryFromMockedRemoteData = function mockedQueryFromMockedRemoteData(remoteData) { + return function (qdef) { + if (!remoteData) { + return { + data: null + }; + } + + if (remoteData[qdef.doctype]) { + return { + data: remoteData[qdef.doctype] + }; + } else { + return { + data: [] + }; + } + }; +}; +/** + * Creates a client suitable for use in tests + * + * - client.{query,save} are mocked + * - client.stackClient.fetchJSON is mocked + * + * @param {object} options Options + * @param {object} [options.queries] Prefill queries inside the store + * @param {object} [options.remote] Mock data from the server + * @param {object} [options.clientOptions] Options passed to the client + * @returns {CozyClient} + */ + + +var createMockClient = function createMockClient(_ref) { + var queries = _ref.queries, + remote = _ref.remote, + clientOptions = _ref.clientOptions; + var client = new _CozyClient.default(clientOptions || {}); + client.ensureStore(); + + for (var _i = 0, _Object$entries = Object.entries(queries || {}); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), + queryName = _Object$entries$_i[0], + queryOptions = _Object$entries$_i[1]; + + fillQueryInsideClient(client, queryName, queryOptions); + } + + client.query = jest.fn().mockImplementation(mockedQueryFromMockedRemoteData(remote)); + client.save = jest.fn(); + client.saveAll = jest.fn(); + client.stackClient.fetchJSON = jest.fn(); + return client; +}; + +exports.createMockClient = createMockClient; + +/***/ }), + +/***/ "mKCr": +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__("brbn"); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + + +/***/ }), + +/***/ "mNB+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__("dw92")(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), + +/***/ "mNQn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.provideDateFnsLocale = exports.initFormat = exports.formatLocallyDistanceToNowStrict = exports.formatLocallyDistanceToNow = void 0; +var _format = _interopRequireDefault(__webpack_require__("t2SO")); +var _distance_in_words_to_now = _interopRequireDefault(__webpack_require__("QP+a")); +var _distance_in_words_strict = _interopRequireDefault(__webpack_require__("5lG/")); +var _difference_in_calendar_days = _interopRequireDefault(__webpack_require__("bMlu")); +var _add_days = _interopRequireDefault(__webpack_require__("YB5c")); +var _I18n = __webpack_require__("nUfk"); +var locales = {}; +var lang = _I18n.DEFAULT_LANG; +var getWarningMessage = function getWarningMessage(lang) { + return "The \"".concat(lang, "\" locale isn't supported by date-fns. or has not been included in the build. Check if you have configured a ContextReplacementPlugin that is too restrictive."); +}; +var provideDateFnsLocale = function provideDateFnsLocale(userLang) { + var defaultLang = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _I18n.DEFAULT_LANG; + lang = userLang; + try { + locales[defaultLang] = __webpack_require__("2pt2")("./".concat(defaultLang, "/index.js")); + } catch (err) { + console.warn(getWarningMessage(defaultLang)); + } + if (lang && lang !== defaultLang) { + try { + locales[lang] = __webpack_require__("2pt2")("./".concat(lang, "/index.js")); + } catch (e) { + console.warn(getWarningMessage(lang)); + } + } + return locales[lang]; +}; +exports.provideDateFnsLocale = provideDateFnsLocale; +var initFormat = function initFormat(userLang) { + var defaultLang = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _I18n.DEFAULT_LANG; + return function (date, formatStr) { + var locale = provideDateFnsLocale(userLang, defaultLang); + return (0, _format.default)(date, formatStr, { + locale: locale + }); + }; +}; +exports.initFormat = initFormat; +var formatLocallyDistanceToNow = function formatLocallyDistanceToNow(date) { + return (0, _distance_in_words_to_now.default)(date, { + locale: locales[lang] + }); +}; +/** + * Return the distance between the given dates in words, using strict units. + * If the distance is in days, we force the time to be a whole number of days + * @param {Date} date - Future date compared to the current date + * @returns {string} Number of hours/day/month that separates the date from the present moment + */ +exports.formatLocallyDistanceToNow = formatLocallyDistanceToNow; +var formatLocallyDistanceToNowStrict = function formatLocallyDistanceToNowStrict(date) { + var now = new Date(); + var days = (0, _difference_in_calendar_days.default)(date, now); + var isSameDay = days === 0; + var isInMonth = days > 0 && days < 32; + var refDate = isSameDay ? date : (0, _add_days.default)(now, days); + var unit = isInMonth ? 'd' : undefined; + return (0, _distance_in_words_strict.default)(now, refDate, { + locale: locales[lang], + unit: unit + }); +}; +exports.formatLocallyDistanceToNowStrict = formatLocallyDistanceToNowStrict; + +/***/ }), + +/***/ "mOXy": +/***/ (function(module, exports, __webpack_require__) { + +var baseTimes = __webpack_require__("uLwU"), + isArguments = __webpack_require__("6ZUk"), + isArray = __webpack_require__("8u9v"), + isBuffer = __webpack_require__("cjAe"), + isIndex = __webpack_require__("9yx8"), + isTypedArray = __webpack_require__("HvXq"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; + + +/***/ }), + +/***/ "mOey": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var popper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("BZUc"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("csMb"); +/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("wniO"); +/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("bH5F"); +/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("88Tv"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("IU9S"); + + + + + + + + + + + + +function flipPlacement(placement, theme) { + var direction = theme && theme.direction || 'ltr'; + + if (direction === 'ltr') { + return placement; + } + + switch (placement) { + case 'bottom-end': + return 'bottom-start'; + + case 'bottom-start': + return 'bottom-end'; + + case 'top-end': + return 'top-start'; + + case 'top-start': + return 'top-end'; + + default: + return placement; + } +} + +function getAnchorEl(anchorEl) { + return typeof anchorEl === 'function' ? anchorEl() : anchorEl; +} + +var useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_2__["useEffect"]; +var defaultPopperOptions = {}; +/** + * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning. + */ + +var Popper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Popper(props, ref) { + var anchorEl = props.anchorEl, + children = props.children, + container = props.container, + _props$disablePortal = props.disablePortal, + disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal, + _props$keepMounted = props.keepMounted, + keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted, + modifiers = props.modifiers, + open = props.open, + _props$placement = props.placement, + initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement, + _props$popperOptions = props.popperOptions, + popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions, + popperRefProp = props.popperRef, + style = props.style, + _props$transition = props.transition, + transition = _props$transition === void 0 ? false : _props$transition, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"]); + + var tooltipRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var ownRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__["default"])(tooltipRef, ref); + var popperRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + var handlePopperRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__["default"])(popperRef, popperRefProp); + var handlePopperRefRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](handlePopperRef); + useEnhancedEffect(function () { + handlePopperRefRef.current = handlePopperRef; + }, [handlePopperRef]); + react__WEBPACK_IMPORTED_MODULE_2__["useImperativeHandle"](popperRefProp, function () { + return popperRef.current; + }, []); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](true), + exited = _React$useState[0], + setExited = _React$useState[1]; + + var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_6__["useTheme"])(); + var rtlPlacement = flipPlacement(initialPlacement, theme); + /** + * placement initialized from prop but can change during lifetime if modifiers.flip. + * modifiers.flip is essentially a flip for controlled/uncontrolled behavior + */ + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__["useState"](rtlPlacement), + placement = _React$useState2[0], + setPlacement = _React$useState2[1]; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (popperRef.current) { + popperRef.current.update(); + } + }); + var handleOpen = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function () { + if (!tooltipRef.current || !anchorEl || !open) { + return; + } + + if (popperRef.current) { + popperRef.current.destroy(); + handlePopperRefRef.current(null); + } + + var handlePopperUpdate = function handlePopperUpdate(data) { + setPlacement(data.placement); + }; + + var resolvedAnchorEl = getAnchorEl(anchorEl); + + if (false) { var box; } + + var popper = new popper_js__WEBPACK_IMPORTED_MODULE_4__["default"](getAnchorEl(anchorEl), tooltipRef.current, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + placement: rtlPlacement + }, popperOptions, { + modifiers: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, disablePortal ? {} : { + // It's using scrollParent by default, we can use the viewport when using a portal. + preventOverflow: { + boundariesElement: 'window' + } + }, modifiers, popperOptions.modifiers), + // We could have been using a custom modifier like react-popper is doing. + // But it seems this is the best public API for this use case. + onCreate: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__["default"])(handlePopperUpdate, popperOptions.onCreate), + onUpdate: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__["default"])(handlePopperUpdate, popperOptions.onUpdate) + })); + handlePopperRefRef.current(popper); + }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]); + var handleRef = react__WEBPACK_IMPORTED_MODULE_2__["useCallback"](function (node) { + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__["default"])(ownRef, node); + handleOpen(); + }, [ownRef, handleOpen]); + + var handleEnter = function handleEnter() { + setExited(false); + }; + + var handleClose = function handleClose() { + if (!popperRef.current) { + return; + } + + popperRef.current.destroy(); + handlePopperRefRef.current(null); + }; + + var handleExited = function handleExited() { + setExited(true); + handleClose(); + }; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + return function () { + handleClose(); + }; + }, []); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + if (!open && !transition) { + // Otherwise handleExited will call this. + handleClose(); + } + }, [open, transition]); + + if (!keepMounted && !open && (!transition || exited)) { + return null; + } + + var childProps = { + placement: placement + }; + + if (transition) { + childProps.TransitionProps = { + in: open, + onEnter: handleEnter, + onExited: handleExited + }; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Portal__WEBPACK_IMPORTED_MODULE_7__["default"], { + disablePortal: disablePortal, + container: container + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: handleRef, + role: "tooltip" + }, other, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // Prevents scroll issue, waiting for Popper.js to add this style once initiated. + position: 'fixed', + // Fix Popper.js display issue + top: 0, + left: 0, + display: !open && keepMounted && !transition ? 'none' : null + }, style) + }), typeof children === 'function' ? children(childProps) : children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Popper); + +/***/ }), + +/***/ "mOnz": +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__("yhnj"); +var repeat = __webpack_require__("lFqA"); +var defined = __webpack_require__("etLA"); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), + +/***/ "mUHW": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.12 Math.cosh(x) +var $export = __webpack_require__("LRPZ"); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + + +/***/ }), + +/***/ "mWEQ": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = __webpack_require__("Yfzq"); +var $export = __webpack_require__("LRPZ"); +var anObject = __webpack_require__("eckd"); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + + +/***/ }), + +/***/ "mWT8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return FunctionToString; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +let originalFunctionToString; + +/** Patch toString calls to return proper name for wrapped functions */ +class FunctionToString {constructor() { FunctionToString.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'FunctionToString';} + + /** + * @inheritDoc + */ + __init() {this.name = FunctionToString.id;} + + /** + * @inheritDoc + */ + setupOnce() { + // eslint-disable-next-line @typescript-eslint/unbound-method + originalFunctionToString = Function.prototype.toString; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Function.prototype.toString = function ( ...args) { + const context = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getOriginalFunction"])(this) || this; + return originalFunctionToString.apply(context, args); + }; + } +} FunctionToString.__initStatic(); + + +//# sourceMappingURL=functiontostring.js.map + + +/***/ }), + +/***/ "mXbR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = useFlag; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _flag = _interopRequireDefault(__webpack_require__("7hLD")); + +function useFlag(name) { + var _useState = (0, _react.useState)((0, _flag.default)(name)), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + flagValue = _useState2[0], + setFlag = _useState2[1]; + + (0, _react.useEffect)(function () { + var handleChange = function handleChange(changed) { + if (changed === name) { + setFlag((0, _flag.default)(name)); + } + }; + + _flag.default.store.on('change', handleChange); + + return function () { + _flag.default.store.removeListener('change', handleChange); + }; + }, [setFlag, name]); + return flagValue; +} + +/***/ }), + +/***/ "matq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_addTracingExtensions", function() { return _addTracingExtensions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addExtensionMethods", function() { return addExtensionMethods; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startIdleTransaction", function() { return startIdleTransaction; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("CwYD"); +/* harmony import */ var _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ESWp"); +/* harmony import */ var _transaction_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ik7V"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("VjOD"); + + + + + + + +/** Returns all trace headers that are currently on the top scope. */ +function traceHeaders() { + const scope = this.getScope(); + if (scope) { + const span = scope.getSpan(); + if (span) { + return { + 'sentry-trace': span.toTraceparent(), + }; + } + } + return {}; +} + +/** + * Makes a sampling decision for the given transaction and stores it on the transaction. + * + * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be + * sent to Sentry. + * + * @param transaction: The transaction needing a sampling decision + * @param options: The current client's options, so we can access `tracesSampleRate` and/or `tracesSampler` + * @param samplingContext: Default and user-provided data which may be used to help make the decision + * + * @returns The given transaction with its `sampled` value set + */ +function sample( + transaction, + options, + samplingContext, +) { + // nothing to do if tracing is not enabled + if (!Object(_utils_js__WEBPACK_IMPORTED_MODULE_5__["hasTracingEnabled"])(options)) { + transaction.sampled = false; + return transaction; + } + + // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that + if (transaction.sampled !== undefined) { + transaction.setMetadata({ + sampleRate: Number(transaction.sampled), + }); + return transaction; + } + + // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should + // work; prefer the hook if so + let sampleRate; + if (typeof options.tracesSampler === 'function') { + sampleRate = options.tracesSampler(samplingContext); + transaction.setMetadata({ + sampleRate: Number(sampleRate), + }); + } else if (samplingContext.parentSampled !== undefined) { + sampleRate = samplingContext.parentSampled; + } else { + sampleRate = options.tracesSampleRate; + transaction.setMetadata({ + sampleRate: Number(sampleRate), + }); + } + + // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The + // only valid values are booleans or numbers between 0 and 1.) + if (!isValidSampleRate(sampleRate)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('[Tracing] Discarding transaction because of invalid sample rate.'); + transaction.sampled = false; + return transaction; + } + + // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped + if (!sampleRate) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log( + `[Tracing] Discarding transaction because ${ + typeof options.tracesSampler === 'function' + ? 'tracesSampler returned 0 or false' + : 'a negative sampling decision was inherited or tracesSampleRate is set to 0' + }`, + ); + transaction.sampled = false; + return transaction; + } + + // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is + // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false. + transaction.sampled = Math.random() < (sampleRate ); + + // if we're not going to keep it, we're done + if (!transaction.sampled) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate, + )})`, + ); + return transaction; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`); + return transaction; +} + +/** + * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1). + */ +function isValidSampleRate(rate) { + // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isNaN"])(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + rate, + )} of type ${JSON.stringify(typeof rate)}.`, + ); + return false; + } + + // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false + if (rate < 0 || rate > 1) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`); + return false; + } + return true; +} + +/** + * Creates a new transaction and adds a sampling decision if it doesn't yet have one. + * + * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if + * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an + * "extension method." + * + * @param this: The Hub starting the transaction + * @param transactionContext: Data used to configure the transaction + * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any) + * + * @returns The new transaction + * + * @see {@link Hub.startTransaction} + */ +function _startTransaction( + + transactionContext, + customSamplingContext, +) { + const client = this.getClient(); + const options = (client && client.getOptions()) || {}; + + const configInstrumenter = options.instrumenter || 'sentry'; + const transactionInstrumenter = transactionContext.instrumenter || 'sentry'; + + if (configInstrumenter !== transactionInstrumenter) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error( + `A transaction was started with instrumenter=\`${transactionInstrumenter}\`, but the SDK is configured with the \`${configInstrumenter}\` instrumenter. +The transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`, + ); + + transactionContext.sampled = false; + } + + let transaction = new _transaction_js__WEBPACK_IMPORTED_MODULE_4__["Transaction"](transactionContext, this); + transaction = sample(transaction, options, { + parentSampled: transactionContext.parentSampled, + transactionContext, + ...customSamplingContext, + }); + if (transaction.sampled) { + transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans )); + } + return transaction; +} + +/** + * Create new idle transaction. + */ +function startIdleTransaction( + hub, + transactionContext, + idleTimeout, + finalTimeout, + onScope, + customSamplingContext, + heartbeatInterval, +) { + const client = hub.getClient(); + const options = (client && client.getOptions()) || {}; + + let transaction = new _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__["IdleTransaction"](transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope); + transaction = sample(transaction, options, { + parentSampled: transactionContext.parentSampled, + transactionContext, + ...customSamplingContext, + }); + if (transaction.sampled) { + transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans )); + } + return transaction; +} + +/** + * @private + */ +function _addTracingExtensions() { + const carrier = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getMainCarrier"])(); + if (!carrier.__SENTRY__) { + return; + } + carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; + if (!carrier.__SENTRY__.extensions.startTransaction) { + carrier.__SENTRY__.extensions.startTransaction = _startTransaction; + } + if (!carrier.__SENTRY__.extensions.traceHeaders) { + carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; + } +} + +/** + * @private + */ +function _autoloadDatabaseIntegrations() { + const carrier = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getMainCarrier"])(); + if (!carrier.__SENTRY__) { + return; + } + + const packageToIntegrationMapping = { + mongodb() { + const integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dynamicRequire"])(module, './integrations/node/mongo') + +; + return new integration.Mongo(); + }, + mongoose() { + const integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dynamicRequire"])(module, './integrations/node/mongo') + +; + return new integration.Mongo({ mongoose: true }); + }, + mysql() { + const integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dynamicRequire"])(module, './integrations/node/mysql') + +; + return new integration.Mysql(); + }, + pg() { + const integration = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dynamicRequire"])(module, './integrations/node/postgres') + +; + return new integration.Postgres(); + }, + }; + + const mappedPackages = Object.keys(packageToIntegrationMapping) + .filter(moduleName => !!Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"])(moduleName)) + .map(pkg => { + try { + return packageToIntegrationMapping[pkg](); + } catch (e) { + return undefined; + } + }) + .filter(p => p) ; + + if (mappedPackages.length > 0) { + carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages]; + } +} + +/** + * This patches the global object and injects the Tracing extensions methods + */ +function addExtensionMethods() { + _addTracingExtensions(); + + // Detect and automatically load specified integrations. + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isNodeEnv"])()) { + _autoloadDatabaseIntegrations(); + } + + // If an error happens globally, we should make sure transaction status is set to error. + Object(_errors_js__WEBPACK_IMPORTED_MODULE_2__["registerErrorInstrumentation"])(); +} + + +//# sourceMappingURL=hubextensions.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("BE8o")(module))) + +/***/ }), + +/***/ "mcBX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE = void 0; +var ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE = 'com.grandlyon.enedis.monthly.analysis.data'; +exports.ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE = ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE; + +/***/ }), + +/***/ "mcWW": +/***/ (function(module, exports, __webpack_require__) { + +var arrayFilter = __webpack_require__("FpGR"), + arrayMap = __webpack_require__("4FGL"), + baseProperty = __webpack_require__("XrMh"), + baseTimes = __webpack_require__("uLwU"), + isArrayLikeObject = __webpack_require__("Ynj+"); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ +function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); +} + +module.exports = unzip; + + +/***/ }), + +/***/ "mcXU": +/***/ (function(module, exports, __webpack_require__) { + +var baseKeys = __webpack_require__("qzN0"), + getTag = __webpack_require__("FqJm"), + isArrayLike = __webpack_require__("yTJ1"), + isString = __webpack_require__("X6P4"), + stringSize = __webpack_require__("x//U"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; +} + +module.exports = size; + + +/***/ }), + +/***/ "mcp6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.hasJobFinished = exports.normalizeJob = exports.JOBS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _Collection = _interopRequireDefault(__webpack_require__("XXj1")); + +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__("GSeB")); + +var _utils = __webpack_require__("YJcZ"); + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/jobs/", ""]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var JOBS_DOCTYPE = 'io.cozy.jobs'; +exports.JOBS_DOCTYPE = JOBS_DOCTYPE; + +var sleep = function sleep(delay) { + return new Promise(function (resolve) { + return setTimeout(resolve, delay); + }); +}; + +var normalizeJob = function normalizeJob(job) { + return _objectSpread(_objectSpread(_objectSpread({}, job), (0, _DocumentCollection2.normalizeDoc)(job, JOBS_DOCTYPE)), job.attributes); +}; + +exports.normalizeJob = normalizeJob; + +var hasJobFinished = function hasJobFinished(job) { + return job.state === 'done' || job.state === 'errored'; +}; +/** + * Document representing a io.cozy.jobs + * + * @typedef {object} JobDocument + * @property {string} _id - Id of the job + * @property {string} attributes.state - state of the job. Can be 'errored', 'running', 'queued', 'done' + * @property {string} attributes.error - Error message of the job if any + */ + + +exports.hasJobFinished = hasJobFinished; + +var JobCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(JobCollection, _DocumentCollection); + + var _super = _createSuper(JobCollection); + + function JobCollection(stackClient) { + (0, _classCallCheck2.default)(this, JobCollection); + return _super.call(this, JOBS_DOCTYPE, stackClient); + } + + (0, _createClass2.default)(JobCollection, [{ + key: "queued", + value: function queued(workerType) { + return this.stackClient.fetchJSON('GET', "/jobs/queue/".concat(workerType)); + } + /** + * Creates a job + * + * @param {string} workerType - Ex: "konnector" + * @param {object} [args={}] - Ex: {"slug": "my-konnector", "trigger": "trigger-id"} + * @param {object} [options={}] - creation options + * @param {boolean} [manual=false] - Manual execution + * @returns {object} createdJob + */ + + }, { + key: "create", + value: function create(workerType) { + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var manual = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + return this.stackClient.fetchJSON('POST', "/jobs/queue/".concat(workerType), { + data: { + type: JOBS_DOCTYPE, + attributes: { + arguments: args, + options: options, + manual: manual + } + } + }); + } + /** + * Return a normalized job, given its id + * + * @param {string} id - id of the job + * @returns {JobDocument} + */ + + }, { + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(id) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", _Collection.default.get(this.stackClient, (0, _utils.uri)(_templateObject(), id), { + normalize: normalizeJob + })); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * Update the job's state + * This does work only for jobs comming from @client triggers + * + * @param {JobDocument} job - io.cozy.jobs document + */ + + }, { + key: "update", + value: function () { + var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(job) { + var jobResult; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!(job.worker !== 'client')) { + _context2.next = 2; + break; + } + + throw new Error("JobCollection.update only works for client workers. ".concat(job.worker, " given")); + + case 2: + _context2.next = 4; + return this.stackClient.fetchJSON('PATCH', "/jobs/".concat(job._id), { + data: { + type: JOBS_DOCTYPE, + id: job._id, + attributes: { + state: job.attributes.state, + error: job.attributes.error + } + } + }); + + case 4: + jobResult = _context2.sent; + return _context2.abrupt("return", normalizeJob(jobResult.data)); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function update(_x2) { + return _update.apply(this, arguments); + } + + return update; + }() + /** + * Polls a job state until it is finished + * + * `options.until` can be used to tweak when to stop waiting. It will be + * given the current job state. If true is returned, the awaiting is + * stopped. + */ + + }, { + key: "waitFor", + value: function () { + var _waitFor = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(id) { + var _ref, + _ref$onUpdate, + onUpdate, + _ref$until, + until, + _ref$delay, + delay, + _ref$timeout, + timeout, + start, + jobData, + now, + _args3 = arguments; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _ref = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}, _ref$onUpdate = _ref.onUpdate, onUpdate = _ref$onUpdate === void 0 ? null : _ref$onUpdate, _ref$until = _ref.until, until = _ref$until === void 0 ? hasJobFinished : _ref$until, _ref$delay = _ref.delay, delay = _ref$delay === void 0 ? 5 * 1000 : _ref$delay, _ref$timeout = _ref.timeout, timeout = _ref$timeout === void 0 ? 60 * 5 * 1000 : _ref$timeout; + start = Date.now(); + _context3.next = 4; + return this.get(id); + + case 4: + jobData = _context3.sent.data.attributes; + + case 5: + if (!(!jobData || !until(jobData))) { + _context3.next = 17; + break; + } + + _context3.next = 8; + return sleep(delay); + + case 8: + _context3.next = 10; + return this.get(id); + + case 10: + jobData = _context3.sent.data.attributes; + + if (onUpdate) { + onUpdate(jobData); + } + + now = Date.now(); + + if (!(start - now > timeout)) { + _context3.next = 15; + break; + } + + throw new Error('Timeout for JobCollection::waitFor'); + + case 15: + _context3.next = 5; + break; + + case 17: + return _context3.abrupt("return", jobData); + + case 18: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function waitFor(_x3) { + return _waitFor.apply(this, arguments); + } + + return waitFor; + }() + }]); + return JobCollection; +}(_DocumentCollection2.default); + +var _default = JobCollection; +exports.default = _default; + +/***/ }), + +/***/ "mgiV": +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-global +var $export = __webpack_require__("XRBo"); + +$export($export.G, { global: __webpack_require__("4ESo") }); + + +/***/ }), + +/***/ "miOE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mt2j"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StepConnector__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "miZn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ipV0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FormGroup__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "mjUP": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"), + cache = [ ]; + +var logger = new Transform(); + +logger.write = function(name, level, args) { + cache.push([ name, level, args ]); +}; + +// utility functions +logger.get = function() { return cache; }; +logger.empty = function() { cache = []; }; + +module.exports = logger; + + +/***/ }), + +/***/ "mkkA": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/cloud.svg` to regenerate; + +function SvgCloud(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("path", { + d: "M164 261a4 4 0 118 0 4 4 0 110 8h-8a4 4 0 110-8zm1.146 3.854c.155.154.423.368.793.58.618.353 1.31.566 2.061.566.75 0 1.443-.213 2.06-.566.371-.212.64-.426.794-.58a.5.5 0 10-.708-.708 2.934 2.934 0 01-.582.42A3.136 3.136 0 01168 265a3.136 3.136 0 01-1.564-.434 2.934 2.934 0 01-.582-.42.5.5 0 10-.708.708z", + id: "cloud_svg__a" + })), /*#__PURE__*/_react.default.createElement("g", { + fillRule: "evenodd", + transform: "translate(-160 -255)" + }, /*#__PURE__*/_react.default.createElement("use", { + xlinkHref: "#cloud_svg__a" + }))); +} +var _default = SvgCloud; +exports.default = _default; + +/***/ }), + +/***/ "mnDI": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("jiHV") +var buildFormatLocale = __webpack_require__("Fyqn") + +/** + * @category Locales + * @summary English locale. + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "mpL6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createPersistoid; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ph6I"); + + +// @TODO remove once flow < 0.63 support is no longer required. + +function createPersistoid(config) { + // defaults + var blacklist = config.blacklist || null; + var whitelist = config.whitelist || null; + var transforms = config.transforms || []; + var throttle = config.throttle || 0; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + var storage = config.storage; + var serialize = config.serialize === false ? function (x) { + return x; + } : defaultSerialize; + + // initialize stateful values + var lastState = {}; + var stagedState = {}; + var keysToProcess = []; + var timeIterator = null; + var writePromise = null; + + var update = function update(state) { + // add any changed keys to the queue + Object.keys(state).forEach(function (key) { + if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop + if (lastState[key] === state[key]) return; // value unchanged? noop + if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop + keysToProcess.push(key); // add key to queue + }); + + //if any key is missing in the new state which was present in the lastState, + //add it for processing too + Object.keys(lastState).forEach(function (key) { + if (state[key] === undefined) { + keysToProcess.push(key); + } + }); + + // start the time iterator if not running (read: throttle) + if (timeIterator === null) { + timeIterator = setInterval(processNextKey, throttle); + } + + lastState = state; + }; + + function processNextKey() { + if (keysToProcess.length === 0) { + if (timeIterator) clearInterval(timeIterator); + timeIterator = null; + return; + } + + var key = keysToProcess.shift(); + var endState = transforms.reduce(function (subState, transformer) { + return transformer.in(subState, key, lastState); + }, lastState[key]); + + if (endState !== undefined) { + try { + stagedState[key] = serialize(endState); + } catch (err) { + console.error('redux-persist/createPersistoid: error serializing state', err); + } + } else { + //if the endState is undefined, no need to persist the existing serialized content + delete stagedState[key]; + } + + if (keysToProcess.length === 0) { + writeStagedState(); + } + } + + function writeStagedState() { + // cleanup any removed keys just before write. + Object.keys(stagedState).forEach(function (key) { + if (lastState[key] === undefined) { + delete stagedState[key]; + } + }); + + writePromise = storage.setItem(storageKey, serialize(stagedState)).catch(onWriteFail); + } + + function passWhitelistBlacklist(key) { + if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false; + if (blacklist && blacklist.indexOf(key) !== -1) return false; + return true; + } + + function onWriteFail(err) { + // @TODO add fail handlers (typically storage full) + if (err && "production" !== 'production') { + console.error('Error storing data', err); + } + } + + var flush = function flush() { + while (keysToProcess.length !== 0) { + processNextKey(); + } + return writePromise || Promise.resolve(); + }; + + // return `persistoid` + return { + update: update, + flush: flush + }; +} + +// @NOTE in the future this may be exposed via config +function defaultSerialize(data) { + return JSON.stringify(data); +} + +/***/ }), + +/***/ "msv5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mergeClasses; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rDuK"); + + +function mergeClasses() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var baseClasses = options.baseClasses, + newClasses = options.newClasses, + Component = options.Component; + + if (!newClasses) { + return baseClasses; + } + + var nextClasses = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, baseClasses); + + if (false) {} + + Object.keys(newClasses).forEach(function (key) { + if (false) {} + + if (newClasses[key]) { + nextClasses[key] = "".concat(baseClasses[key], " ").concat(newClasses[key]); + } + }); + return nextClasses; +} + +/***/ }), + +/***/ "mt2j": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + flex: '1 1 auto' + }, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + horizontal: {}, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + marginLeft: 12, + // half icon + padding: '0 0 8px' + }, + + /* Styles applied to the root element if `alternativeLabel={true}`. */ + alternativeLabel: { + position: 'absolute', + top: 8 + 4, + left: 'calc(-50% + 20px)', + right: 'calc(50% + 20px)' + }, + + /* Pseudo-class applied to the root element if `active={true}`. */ + active: {}, + + /* Pseudo-class applied to the root element if `completed={true}`. */ + completed: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the line element. */ + line: { + display: 'block', + borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600] + }, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + lineHorizontal: { + borderTopStyle: 'solid', + borderTopWidth: 1 + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + lineVertical: { + borderLeftStyle: 'solid', + borderLeftWidth: 1, + minHeight: 24 + } + }; +}; +var StepConnector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function StepConnector(props, ref) { + var active = props.active, + _props$alternativeLab = props.alternativeLabel, + alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab, + classes = props.classes, + className = props.className, + completed = props.completed, + disabled = props.disabled, + index = props.index, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["active", "alternativeLabel", "classes", "className", "completed", "disabled", "index", "orientation"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.line, { + 'horizontal': classes.lineHorizontal, + 'vertical': classes.lineVertical + }[orientation]) + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiStepConnector' +})(StepConnector)); + +/***/ }), + +/***/ "muMs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; }); +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +/***/ }), + +/***/ "mxOK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({ + width: '100%', + marginLeft: 'auto', + boxSizing: 'border-box', + marginRight: 'auto', + paddingLeft: theme.spacing(2), + paddingRight: theme.spacing(2), + display: 'block' + }, theme.breakpoints.up('sm'), { + paddingLeft: theme.spacing(3), + paddingRight: theme.spacing(3) + }), + + /* Styles applied to the root element if `disableGutters={true}`. */ + disableGutters: { + paddingLeft: 0, + paddingRight: 0 + }, + + /* Styles applied to the root element if `fixed={true}`. */ + fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) { + var value = theme.breakpoints.values[breakpoint]; + + if (value !== 0) { + acc[theme.breakpoints.up(breakpoint)] = { + maxWidth: value + }; + } + + return acc; + }, {}), + + /* Styles applied to the root element if `maxWidth="xs"`. */ + maxWidthXs: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.up('xs'), { + maxWidth: Math.max(theme.breakpoints.values.xs, 444) + }), + + /* Styles applied to the root element if `maxWidth="sm"`. */ + maxWidthSm: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.up('sm'), { + maxWidth: theme.breakpoints.values.sm + }), + + /* Styles applied to the root element if `maxWidth="md"`. */ + maxWidthMd: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.up('md'), { + maxWidth: theme.breakpoints.values.md + }), + + /* Styles applied to the root element if `maxWidth="lg"`. */ + maxWidthLg: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.up('lg'), { + maxWidth: theme.breakpoints.values.lg + }), + + /* Styles applied to the root element if `maxWidth="xl"`. */ + maxWidthXl: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])({}, theme.breakpoints.up('xl'), { + maxWidth: theme.breakpoints.values.xl + }) + }; +}; +var Container = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function Container(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disableGutters = props.disableGutters, + disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters, + _props$fixed = props.fixed, + fixed = _props$fixed === void 0 ? false : _props$fixed, + _props$maxWidth = props.maxWidth, + maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component", "disableGutters", "fixed", "maxWidth"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes["maxWidth".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(String(maxWidth)))]), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiContainer' +})(Container)); + +/***/ }), + +/***/ "n04a": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("QdgZ"); +__webpack_require__("ES0e"); +__webpack_require__("Zb9F"); +__webpack_require__("6kWt"); +__webpack_require__("IzOX"); +__webpack_require__("6SuJ"); +__webpack_require__("EqEG"); +__webpack_require__("Dz5r"); +__webpack_require__("r87Y"); +__webpack_require__("C9CY"); +__webpack_require__("OeeG"); +__webpack_require__("TrIy"); +__webpack_require__("jcOJ"); +__webpack_require__("jd52"); +__webpack_require__("Mshc"); +__webpack_require__("jPZ6"); +__webpack_require__("Uxqk"); +__webpack_require__("quFY"); +__webpack_require__("bZiz"); +__webpack_require__("4oQl"); +__webpack_require__("1JFZ"); +__webpack_require__("rEFp"); +__webpack_require__("Vso4"); +__webpack_require__("SXNx"); +__webpack_require__("dZCX"); +__webpack_require__("lPmf"); +__webpack_require__("2Pqz"); +__webpack_require__("eHS2"); +__webpack_require__("O9UP"); +__webpack_require__("0vqW"); +__webpack_require__("oxKo"); +__webpack_require__("r0ge"); +__webpack_require__("atB9"); +__webpack_require__("JJnO"); +__webpack_require__("KYtb"); +__webpack_require__("F5K7"); +__webpack_require__("OdwB"); +__webpack_require__("Cz+H"); +__webpack_require__("FlWo"); +__webpack_require__("LWym"); +__webpack_require__("mUHW"); +__webpack_require__("p299"); +__webpack_require__("YlHc"); +__webpack_require__("k2CL"); +__webpack_require__("SU1J"); +__webpack_require__("Ls2Z"); +__webpack_require__("RU3a"); +__webpack_require__("fD61"); +__webpack_require__("MYNY"); +__webpack_require__("G/0L"); +__webpack_require__("k0TX"); +__webpack_require__("hi0n"); +__webpack_require__("REwm"); +__webpack_require__("B/g2"); +__webpack_require__("0uNo"); +__webpack_require__("NA29"); +__webpack_require__("gl4Q"); +__webpack_require__("cqxY"); +__webpack_require__("ZpFK"); +__webpack_require__("Fa1r"); +__webpack_require__("KRQd"); +__webpack_require__("L+oB"); +__webpack_require__("5qNH"); +__webpack_require__("q985"); +__webpack_require__("FFHH"); +__webpack_require__("9RlF"); +__webpack_require__("WKSX"); +__webpack_require__("bXxj"); +__webpack_require__("4YQP"); +__webpack_require__("V42N"); +__webpack_require__("jgQC"); +__webpack_require__("Fifr"); +__webpack_require__("0aQ2"); +__webpack_require__("GGD2"); +__webpack_require__("uTrQ"); +__webpack_require__("k6oj"); +__webpack_require__("0JkL"); +__webpack_require__("3FvR"); +__webpack_require__("1eDV"); +__webpack_require__("z/MX"); +__webpack_require__("ClGT"); +__webpack_require__("PyAS"); +__webpack_require__("TMd+"); +__webpack_require__("G3H1"); +__webpack_require__("W6oR"); +__webpack_require__("DwJc"); +__webpack_require__("FZG5"); +__webpack_require__("BWW+"); +__webpack_require__("kSXV"); +__webpack_require__("z4At"); +__webpack_require__("SBwf"); +__webpack_require__("iW8z"); +__webpack_require__("yb6C"); +__webpack_require__("FGj1"); +__webpack_require__("vA9y"); +__webpack_require__("+lzR"); +__webpack_require__("OTIx"); +__webpack_require__("P8i0"); +__webpack_require__("dL5o"); +__webpack_require__("MHAU"); +__webpack_require__("UaW2"); +__webpack_require__("95RP"); +__webpack_require__("ZU7L"); +__webpack_require__("lB3x"); +__webpack_require__("iLqq"); +__webpack_require__("yxdx"); +__webpack_require__("rvVj"); +__webpack_require__("QvV2"); +__webpack_require__("iXAc"); +__webpack_require__("QTES"); +__webpack_require__("eowO"); +__webpack_require__("S2w+"); +__webpack_require__("5Xqt"); +__webpack_require__("Rcf4"); +__webpack_require__("SCQF"); +__webpack_require__("K0pO"); +__webpack_require__("z1Dy"); +__webpack_require__("igy2"); +__webpack_require__("yKDm"); +__webpack_require__("xCs1"); +__webpack_require__("DP4q"); +__webpack_require__("Nvtw"); +__webpack_require__("Dy1F"); +__webpack_require__("goLa"); +__webpack_require__("vdf9"); +__webpack_require__("XghD"); +__webpack_require__("hSCZ"); +__webpack_require__("NDDz"); +__webpack_require__("dZpp"); +__webpack_require__("5y8V"); +__webpack_require__("mWEQ"); +__webpack_require__("50dN"); +__webpack_require__("27gE"); +__webpack_require__("B95+"); +__webpack_require__("zBrv"); +__webpack_require__("JZgi"); +__webpack_require__("8wnD"); +__webpack_require__("TNmm"); +module.exports = __webpack_require__("WSXa"); + + +/***/ }), + +/***/ "n0z0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableBody__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iPU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableBody__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "n4G9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "increment", function() { return increment; }); +/* eslint-disable import/prefer-default-export */ +// Global index counter to preserve source order. +// We create the style sheet during the creation of the component, +// children are handled after the parents, so the order of style elements would be parent->child. +// It is a problem though when a parent passes a className +// which needs to override any child's styles. +// StyleSheet of the child has a higher specificity, because of the source order. +// So our solution is to render sheets them in the reverse order child->sheet, so +// that parent has a higher specificity. +var indexCounter = -1e9; +function increment() { + indexCounter += 1; + + if (false) {} + + return indexCounter; +} + +/***/ }), + +/***/ "n6kB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "testReset", function() { return testReset; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ZP3U"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Xqvq"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("PKog"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("fWYq"); +/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("hy/i"); +/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("Ukil"); +/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("IU9S"); +/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("VPKY"); +/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("88Tv"); +/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("y78O"); +/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("9sWd"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("kjpz"); + + + + + + + + + + + + + + + + + + + + + +function round(value) { + return Math.round(value * 1e5) / 1e5; +} + +function arrowGenerator() { + return { + '&[x-placement*="bottom"] $arrow': { + top: 0, + left: 0, + marginTop: '-0.71em', + marginLeft: 4, + marginRight: 4, + '&::before': { + transformOrigin: '0 100%' + } + }, + '&[x-placement*="top"] $arrow': { + bottom: 0, + left: 0, + marginBottom: '-0.71em', + marginLeft: 4, + marginRight: 4, + '&::before': { + transformOrigin: '100% 0' + } + }, + '&[x-placement*="right"] $arrow': { + left: 0, + marginLeft: '-0.71em', + height: '1em', + width: '0.71em', + marginTop: 4, + marginBottom: 4, + '&::before': { + transformOrigin: '100% 100%' + } + }, + '&[x-placement*="left"] $arrow': { + right: 0, + marginRight: '-0.71em', + height: '1em', + width: '0.71em', + marginTop: 4, + marginBottom: 4, + '&::before': { + transformOrigin: '0 0' + } + } + }; +} + +var styles = function styles(theme) { + return { + /* Styles applied to the Popper component. */ + popper: { + zIndex: theme.zIndex.tooltip, + pointerEvents: 'none' // disable jss-rtl plugin + + }, + + /* Styles applied to the Popper component if `interactive={true}`. */ + popperInteractive: { + pointerEvents: 'auto' + }, + + /* Styles applied to the Popper component if `arrow={true}`. */ + popperArrow: arrowGenerator(), + + /* Styles applied to the tooltip (label wrapper) element. */ + tooltip: { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__["alpha"])(theme.palette.grey[700], 0.9), + borderRadius: theme.shape.borderRadius, + color: theme.palette.common.white, + fontFamily: theme.typography.fontFamily, + padding: '4px 8px', + fontSize: theme.typography.pxToRem(10), + lineHeight: "".concat(round(14 / 10), "em"), + maxWidth: 300, + wordWrap: 'break-word', + fontWeight: theme.typography.fontWeightMedium + }, + + /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */ + tooltipArrow: { + position: 'relative', + margin: '0' + }, + + /* Styles applied to the arrow element. */ + arrow: { + overflow: 'hidden', + position: 'absolute', + width: '1em', + height: '0.71em' + /* = width / sqrt(2) = (length of the hypotenuse) */ + , + boxSizing: 'border-box', + color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__["alpha"])(theme.palette.grey[700], 0.9), + '&::before': { + content: '""', + margin: 'auto', + display: 'block', + width: '100%', + height: '100%', + backgroundColor: 'currentColor', + transform: 'rotate(45deg)' + } + }, + + /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */ + touch: { + padding: '8px 16px', + fontSize: theme.typography.pxToRem(14), + lineHeight: "".concat(round(16 / 14), "em"), + fontWeight: theme.typography.fontWeightRegular + }, + + /* Styles applied to the tooltip (label wrapper) element if `placement` contains "left". */ + tooltipPlacementLeft: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({ + transformOrigin: 'right center', + margin: '0 24px ' + }, theme.breakpoints.up('sm'), { + margin: '0 14px' + }), + + /* Styles applied to the tooltip (label wrapper) element if `placement` contains "right". */ + tooltipPlacementRight: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({ + transformOrigin: 'left center', + margin: '0 24px' + }, theme.breakpoints.up('sm'), { + margin: '0 14px' + }), + + /* Styles applied to the tooltip (label wrapper) element if `placement` contains "top". */ + tooltipPlacementTop: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({ + transformOrigin: 'center bottom', + margin: '24px 0' + }, theme.breakpoints.up('sm'), { + margin: '14px 0' + }), + + /* Styles applied to the tooltip (label wrapper) element if `placement` contains "bottom". */ + tooltipPlacementBottom: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])({ + transformOrigin: 'center top', + margin: '24px 0' + }, theme.breakpoints.up('sm'), { + margin: '14px 0' + }) + }; +}; +var hystersisOpen = false; +var hystersisTimer = null; +function testReset() { + hystersisOpen = false; + clearTimeout(hystersisTimer); +} +var Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function Tooltip(props, ref) { + var _props$arrow = props.arrow, + arrow = _props$arrow === void 0 ? false : _props$arrow, + children = props.children, + classes = props.classes, + _props$disableFocusLi = props.disableFocusListener, + disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi, + _props$disableHoverLi = props.disableHoverListener, + disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi, + _props$disableTouchLi = props.disableTouchListener, + disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi, + _props$enterDelay = props.enterDelay, + enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay, + _props$enterNextDelay = props.enterNextDelay, + enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay, + _props$enterTouchDela = props.enterTouchDelay, + enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela, + idProp = props.id, + _props$interactive = props.interactive, + interactive = _props$interactive === void 0 ? false : _props$interactive, + _props$leaveDelay = props.leaveDelay, + leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay, + _props$leaveTouchDela = props.leaveTouchDelay, + leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela, + onClose = props.onClose, + onOpen = props.onOpen, + openProp = props.open, + _props$placement = props.placement, + placement = _props$placement === void 0 ? 'bottom' : _props$placement, + _props$PopperComponen = props.PopperComponent, + PopperComponent = _props$PopperComponen === void 0 ? _Popper__WEBPACK_IMPORTED_MODULE_13__["default"] : _props$PopperComponen, + PopperProps = props.PopperProps, + title = props.title, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_12__["default"] : _props$TransitionComp, + TransitionProps = props.TransitionProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["arrow", "children", "classes", "disableFocusListener", "disableHoverListener", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "id", "interactive", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "title", "TransitionComponent", "TransitionProps"]); + + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_19__["default"])(); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"](), + childNode = _React$useState[0], + setChildNode = _React$useState[1]; + + var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](null), + arrowRef = _React$useState2[0], + setArrowRef = _React$useState2[1]; + + var ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](false); + var closeTimer = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + var enterTimer = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + var leaveTimer = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + var touchTimer = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](); + + var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__["default"])({ + controlled: openProp, + default: false, + name: 'Tooltip', + state: 'open' + }), + _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_useControlled, 2), + openState = _useControlled2[0], + setOpenState = _useControlled2[1]; + + var open = openState; + + if (false) { var _React$useRef, isControlled; } + + var id = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__["default"])(idProp); + react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () { + return function () { + clearTimeout(closeTimer.current); + clearTimeout(enterTimer.current); + clearTimeout(leaveTimer.current); + clearTimeout(touchTimer.current); + }; + }, []); + + var handleOpen = function handleOpen(event) { + clearTimeout(hystersisTimer); + hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip. + // We can skip rerendering when the tooltip is already open. + // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue. + + setOpenState(true); + + if (onOpen) { + onOpen(event); + } + }; + + var handleEnter = function handleEnter() { + var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return function (event) { + var childrenProps = children.props; + + if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) { + childrenProps.onMouseOver(event); + } + + if (ignoreNonTouchEvents.current && event.type !== 'touchstart') { + return; + } // Remove the title ahead of time. + // We don't want to wait for the next render commit. + // We would risk displaying two tooltips at the same time (native + this one). + + + if (childNode) { + childNode.removeAttribute('title'); + } + + clearTimeout(enterTimer.current); + clearTimeout(leaveTimer.current); + + if (enterDelay || hystersisOpen && enterNextDelay) { + event.persist(); + enterTimer.current = setTimeout(function () { + handleOpen(event); + }, hystersisOpen ? enterNextDelay : enterDelay); + } else { + handleOpen(event); + } + }; + }; + + var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__["default"])(), + isFocusVisible = _useIsFocusVisible.isFocusVisible, + onBlurVisible = _useIsFocusVisible.onBlurVisible, + focusVisibleRef = _useIsFocusVisible.ref; + + var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__["useState"](false), + childIsFocusVisible = _React$useState3[0], + setChildIsFocusVisible = _React$useState3[1]; + + var handleBlur = function handleBlur() { + if (childIsFocusVisible) { + setChildIsFocusVisible(false); + onBlurVisible(); + } + }; + + var handleFocus = function handleFocus() { + var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return function (event) { + // Workaround for https://github.com/facebook/react/issues/7769 + // The autoFocus of React might trigger the event before the componentDidMount. + // We need to account for this eventuality. + if (!childNode) { + setChildNode(event.currentTarget); + } + + if (isFocusVisible(event)) { + setChildIsFocusVisible(true); + handleEnter()(event); + } + + var childrenProps = children.props; + + if (childrenProps.onFocus && forward) { + childrenProps.onFocus(event); + } + }; + }; + + var handleClose = function handleClose(event) { + clearTimeout(hystersisTimer); + hystersisTimer = setTimeout(function () { + hystersisOpen = false; + }, 800 + leaveDelay); + setOpenState(false); + + if (onClose) { + onClose(event); + } + + clearTimeout(closeTimer.current); + closeTimer.current = setTimeout(function () { + ignoreNonTouchEvents.current = false; + }, theme.transitions.duration.shortest); + }; + + var handleLeave = function handleLeave() { + var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return function (event) { + var childrenProps = children.props; + + if (event.type === 'blur') { + if (childrenProps.onBlur && forward) { + childrenProps.onBlur(event); + } + + handleBlur(); + } + + if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) { + childrenProps.onMouseLeave(event); + } + + clearTimeout(enterTimer.current); + clearTimeout(leaveTimer.current); + event.persist(); + leaveTimer.current = setTimeout(function () { + handleClose(event); + }, leaveDelay); + }; + }; + + var detectTouchStart = function detectTouchStart(event) { + ignoreNonTouchEvents.current = true; + var childrenProps = children.props; + + if (childrenProps.onTouchStart) { + childrenProps.onTouchStart(event); + } + }; + + var handleTouchStart = function handleTouchStart(event) { + detectTouchStart(event); + clearTimeout(leaveTimer.current); + clearTimeout(closeTimer.current); + clearTimeout(touchTimer.current); + event.persist(); + touchTimer.current = setTimeout(function () { + handleEnter()(event); + }, enterTouchDelay); + }; + + var handleTouchEnd = function handleTouchEnd(event) { + if (children.props.onTouchEnd) { + children.props.onTouchEnd(event); + } + + clearTimeout(touchTimer.current); + clearTimeout(leaveTimer.current); + event.persist(); + leaveTimer.current = setTimeout(function () { + handleClose(event); + }, leaveTouchDelay); + }; + + var handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__["default"])(setChildNode, ref); + var handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__["default"])(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components + + var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_4__["useCallback"](function (instance) { + // #StrictMode ready + Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_16__["default"])(handleFocusRef, react_dom__WEBPACK_IMPORTED_MODULE_5__["findDOMNode"](instance)); + }, [handleFocusRef]); + var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__["default"])(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip. + + if (title === '') { + open = false; + } // For accessibility and SEO concerns, we render the title to the DOM node when + // the tooltip is hidden. However, we have made a tradeoff when + // `disableHoverListener` is set. This title logic is disabled. + // It's allowing us to keep the implementation size minimal. + // We are open to change the tradeoff. + + + var shouldShowNativeTitle = !open && !disableHoverListener; + + var childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + 'aria-describedby': open ? id : null, + title: shouldShowNativeTitle && typeof title === 'string' ? title : null + }, other, children.props, { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(other.className, children.props.className), + onTouchStart: detectTouchStart, + ref: handleRef + }); + + var interactiveWrapperListeners = {}; + + if (!disableTouchListener) { + childrenProps.onTouchStart = handleTouchStart; + childrenProps.onTouchEnd = handleTouchEnd; + } + + if (!disableHoverListener) { + childrenProps.onMouseOver = handleEnter(); + childrenProps.onMouseLeave = handleLeave(); + + if (interactive) { + interactiveWrapperListeners.onMouseOver = handleEnter(false); + interactiveWrapperListeners.onMouseLeave = handleLeave(false); + } + } + + if (!disableFocusListener) { + childrenProps.onFocus = handleFocus(); + childrenProps.onBlur = handleLeave(); + + if (interactive) { + interactiveWrapperListeners.onFocus = handleFocus(false); + interactiveWrapperListeners.onBlur = handleLeave(false); + } + } + + if (false) {} + + var mergedPopperProps = react__WEBPACK_IMPORTED_MODULE_4__["useMemo"](function () { + return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_8__["deepmerge"])({ + popperOptions: { + modifiers: { + arrow: { + enabled: Boolean(arrowRef), + element: arrowRef + } + } + } + }, PopperProps); + }, [arrowRef, PopperProps]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](react__WEBPACK_IMPORTED_MODULE_4__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["cloneElement"](children, childrenProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](PopperComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow), + placement: placement, + anchorEl: childNode, + open: childNode ? open : false, + id: childrenProps['aria-describedby'], + transition: true + }, interactiveWrapperListeners, mergedPopperProps), function (_ref) { + var placementInner = _ref.placement, + TransitionPropsInner = _ref.TransitionProps; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + timeout: theme.transitions.duration.shorter + }, TransitionPropsInner, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__["default"])(classes.tooltip, classes["tooltipPlacement".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__["default"])(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow) + }, title, arrow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("span", { + className: classes.arrow, + ref: setArrowRef + }) : null)); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_10__["default"])(styles, { + name: 'MuiTooltip', + flip: false +})(Tooltip)); + +/***/ }), + +/***/ "n9ol": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rDuK"); +/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("wWNu"); +/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("kjpz"); + + + + +/** + * @ignore - internal component. + */ + +function HiddenJs(props) { + var children = props.children, + only = props.only, + width = props.width; + var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_3__["default"])(); + var visible = true; // `only` check is faster to get out sooner if used. + + if (only) { + if (Array.isArray(only)) { + for (var i = 0; i < only.length; i += 1) { + var breakpoint = only[i]; + + if (width === breakpoint) { + visible = false; + break; + } + } + } else if (only && width === only) { + visible = false; + } + } // Allow `only` to be combined with other props. If already hidden, no need to check others. + + + if (visible) { + // determine visibility based on the smallest size up + for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) { + var _breakpoint = theme.breakpoints.keys[_i]; + var breakpointUp = props["".concat(_breakpoint, "Up")]; + var breakpointDown = props["".concat(_breakpoint, "Down")]; + + if (breakpointUp && Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__["isWidthUp"])(_breakpoint, width) || breakpointDown && Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__["isWidthDown"])(_breakpoint, width)) { + visible = false; + break; + } + } + } + + if (!visible) { + return null; + } + + return children; +} + +HiddenJs.propTypes = { + /** + * The content of the component. + */ + children: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.node, + + /** + * @ignore + */ + className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, + + /** + * Specify which implementation to use. 'js' is the default, 'css' works better for + * server-side rendering. + */ + implementation: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['js', 'css']), + + /** + * You can use this prop when choosing the `js` implementation with server-side rendering. + * + * As `window.innerWidth` is unavailable on the server, + * we default to rendering an empty component during the first mount. + * You might want to use an heuristic to approximate + * the screen width of the client browser screen width. + * + * For instance, you could be using the user-agent or the client-hints. + * https://caniuse.com/#search=client%20hint + */ + initialWidth: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), + + /** + * If `true`, screens this size and down will be hidden. + */ + lgDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and up will be hidden. + */ + lgUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and down will be hidden. + */ + mdDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and up will be hidden. + */ + mdUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * Hide the given breakpoint(s). + */ + only: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]), + + /** + * If `true`, screens this size and down will be hidden. + */ + smDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and up will be hidden. + */ + smUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * @ignore + * width prop provided by withWidth decorator. + */ + width: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, + + /** + * If `true`, screens this size and down will be hidden. + */ + xlDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and up will be hidden. + */ + xlUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and down will be hidden. + */ + xsDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + + /** + * If `true`, screens this size and up will be hidden. + */ + xsUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool +}; + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__["default"])()(HiddenJs)); + +/***/ }), + +/***/ "nCnc": +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__("Ce+n"), + isIterateeCall = __webpack_require__("7MQn"); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; + + +/***/ }), + +/***/ "nFQy": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"), + isArguments = __webpack_require__("6ZUk"), + isArray = __webpack_require__("8u9v"); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; + + +/***/ }), + +/***/ "nFpy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toArray; }); +/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("889z"); +/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Q+Sd"); +/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("LBaW"); +/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("J19X"); + + + + +function _toArray(arr) { + return Object(_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || Object(_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr) || Object(_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); +} + +/***/ }), + +/***/ "nHcj": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement('<body>'); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + '|' + + interpolate.source + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + + (options.evaluate || reNoMatch).source + '|$' + , 'g'); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. + var sourceURL = '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/\s/g, ' ') + : ('lodash.templateSources[' + (++templateCounter) + ']') + ) + '\n'; + + string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Throw an error if a forbidden character was found in `variable`, to prevent + // potential command injection attacks. + else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); + } + + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = 'function(' + (variable || 'obj') + ') {\n' + + (variable + ? '' + : 'obj || (obj = {});\n' + ) + + "var __t, __p = ''" + + (isEscaping + ? ', __e = _.escape' + : '' + ) + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n' + ) + + source + + 'return __p\n}'; + + var result = attempt(function() { + return Function(importsKeys, sourceURL + 'return ' + source) + .apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } + + /** + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' + * + * _.toLower('fooBar'); + * // => 'foobar' + * + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' + */ + function toLower(value) { + return toString(value).toLowerCase(); + } + + /** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * _.toUpper('fooBar'); + * // => 'FOOBAR' + * + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' + */ + function toUpper(value) { + return toString(value).toUpperCase(); + } + + /** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return baseTrim(string); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } + + /** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } + + /** + * Removes leading whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimStart(' abc '); + * // => 'abc ' + * + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); + } + + /** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. + * @example + * + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' + */ + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; + + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; + } + string = toString(string); + + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols + ? castSlice(strSymbols, 0, end).join('') + : string.slice(0, end); + + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += (result.length - end); + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; + + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; + } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); + } + } + return result + omission; + } + + /** + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. + * + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). + * + * @static + * @memberOf _ + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. + * @example + * + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function unescape(string) { + string = toString(string); + return (string && reHasEscapedHtml.test(string)) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } + + /** + * Converts `string`, as space separated words, to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. + * @example + * + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' + * + * _.upperCase('fooBar'); + * // => 'FOO BAR' + * + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' + */ + var upperCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); + + /** + * Converts the first character of `string` to upper case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.upperFirst('fred'); + * // => 'Fred' + * + * _.upperFirst('FRED'); + * // => 'FRED' + */ + var upperFirst = createCaseFirst('toUpperCase'); + + /** + * Splits `string` into an array of its words. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. + * @example + * + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] + */ + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ + var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + + /** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + + /** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ + function constant(value) { + return function() { + return value; + }; + } + + /** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] + */ + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + + /** + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; + * + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] + */ + var method = baseRest(function(path, args) { + return function(object) { + return baseInvoke(object, path, args); + }; + }); + + /** + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Util + * @param {Object} object The object to query. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. + * @example + * + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] + */ + var methodOf = baseRest(function(object, args) { + return function(path) { + return baseInvoke(object, path, args); + }; + }); + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. + * @example + * + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' + * + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' + */ + function nthArg(n) { + n = toInteger(n); + return baseRest(function(args) { + return baseNth(args, n); + }); + } + + /** + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.over([Math.max, Math.min]); + * + * func(1, 2, 3, 4); + * // => [4, 1] + */ + var over = createOver(arrayMap); + + /** + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overEvery([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false + */ + var overEvery = createOver(arrayEvery); + + /** + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.overSome([Boolean, isFinite]); + * + * func('1'); + * // => true + * + * func(null); + * // => true + * + * func(NaN); + * // => false + * + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) + */ + var overSome = createOver(arraySome); + + /** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + + /** + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + * @example + * + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; + * + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] + * + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] + */ + function propertyOf(object) { + return function(path) { + return object == null ? undefined : baseGet(object, path); + }; + } + + /** + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight + * @example + * + * _.range(4); + * // => [0, 1, 2, 3] + * + * _.range(-4); + * // => [0, -1, -2, -3] + * + * _.range(1, 5); + * // => [1, 2, 3, 4] + * + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] + * + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] + * + * _.range(1, 4, 0); + * // => [1, 1, 1] + * + * _.range(0); + * // => [] + */ + var range = createRange(); + + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + var rangeRight = createRange(true); + + /** + * This method returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * This method returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * This method returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * This method returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. + * @example + * + * _.times(3, String); + * // => ['0', '1', '2'] + * + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] + */ + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); + + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; + + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); + } + return result; + } + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + + /** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ + var ceil = createRound('ceil'); + + /** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ + var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; + }, 1); + + /** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ + var floor = createRound('floor'); + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + function maxBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } + + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + function mean(array) { + return baseMean(array, identity); + } + + /** + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 + * + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 + */ + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } + * + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + function minBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; + } + + /** + * Multiply two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. + * @example + * + * _.multiply(6, 4); + * // => 24 + */ + var multiply = createMathOperation(function(multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + + /** + * Computes `number` rounded to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. + * @example + * + * _.round(4.006); + * // => 4 + * + * _.round(4.006, 2); + * // => 4.01 + * + * _.round(4060, -2); + * // => 4100 + */ + var round = createRound('round'); + + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + var subtract = createMathOperation(function(minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + function sum(array) { + return (array && array.length) + ? baseSum(array, identity) + : 0; + } + + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ + function sumBy(array, iteratee) { + return (array && array.length) + ? baseSum(array, getIteratee(iteratee, 2)) + : 0; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Assign default placeholders. + arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { + lodash[methodName].placeholder = lodash; + }); + + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function(methodName, index) { + LazyWrapper.prototype[methodName] = function(n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); + + var result = (this.__filtered__ && !index) + ? new LazyWrapper(this) + : this.clone(); + + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + 'size': nativeMin(n, MAX_ARRAY_LENGTH), + 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') + }); + } + return result; + }; + + LazyWrapper.prototype[methodName + 'Right'] = function(n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + + LazyWrapper.prototype[methodName] = function(iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + 'iteratee': getIteratee(iteratee, 3), + 'type': type + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); + + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function(methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); + + LazyWrapper.prototype[methodName] = function() { + return this[takeName](1).value()[0]; + }; + }); + + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function(methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); + + LazyWrapper.prototype[methodName] = function() { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + + LazyWrapper.prototype.compact = function() { + return this.filter(identity); + }; + + LazyWrapper.prototype.find = function(predicate) { + return this.filter(predicate).head(); + }; + + LazyWrapper.prototype.findLast = function(predicate) { + return this.reverse().find(predicate); + }; + + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); + } + return this.map(function(value) { + return baseInvoke(value, path, args); + }); + }); + + LazyWrapper.prototype.reject = function(predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + + LazyWrapper.prototype.slice = function(start, end) { + start = toInteger(start); + + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); + } + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); + } + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); + } + return result; + }; + + LazyWrapper.prototype.takeRightWhile = function(predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + + LazyWrapper.prototype.toArray = function() { + return this.take(MAX_ARRAY_LENGTH); + }; + + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); + + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function() { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); + + var interceptor = function(value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return (isTaker && chainAll) ? result[0] : result; + }; + + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; + + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(result, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); + + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ 'name': methodName, 'func': lodashFunc }); + } + }); + + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ + 'name': 'wrapper', + 'func': undefined + }]; + + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }); + + /*--------------------------------------------------------------------------*/ + + // Export lodash. + var _ = runInContext(); + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return _; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else {} +}.call(this)); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"), __webpack_require__("9YbP")(module))) + +/***/ }), + +/***/ "nI8M": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7B3A"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _StepIcon__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "nJpz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("muMs"); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("I4/v"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("LRcO"); +/* harmony import */ var _utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Y4T/"); + + + + + + + + + +var values = Object.values || function (obj) { + return Object.keys(obj).map(function (k) { + return obj[k]; + }); +}; + +var defaultProps = { + component: 'div', + childFactory: function childFactory(child) { + return child; + } +}; +/** + * The `<TransitionGroup>` component manages a set of transition components + * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition + * components, `<TransitionGroup>` is a state machine for managing the mounting + * and unmounting of components over time. + * + * Consider the example below. As items are removed or added to the TodoList the + * `in` prop is toggled automatically by the `<TransitionGroup>`. + * + * Note that `<TransitionGroup>` does not define any animation behavior! + * Exactly _how_ a list item animates is up to the individual transition + * component. This means you can mix and match animations across different list + * items. + */ + +var TransitionGroup = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_3__["default"])(TransitionGroup, _React$Component); + + function TransitionGroup(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + + var handleExited = _this.handleExited.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this)); // Initial children should all be entering, dependent on appear + + + _this.state = { + contextValue: { + isMounting: true + }, + handleExited: handleExited, + firstRender: true + }; + return _this; + } + + var _proto = TransitionGroup.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.mounted = true; + this.setState({ + contextValue: { + isMounting: false + } + }); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.mounted = false; + }; + + TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { + var prevChildMapping = _ref.children, + handleExited = _ref.handleExited, + firstRender = _ref.firstRender; + return { + children: firstRender ? Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__["getInitialChildMapping"])(nextProps, handleExited) : Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__["getNextChildMapping"])(nextProps, prevChildMapping, handleExited), + firstRender: false + }; + } // node is `undefined` when user provided `nodeRef` prop + ; + + _proto.handleExited = function handleExited(child, node) { + var currentChildMapping = Object(_utils_ChildMapping__WEBPACK_IMPORTED_MODULE_7__["getChildMapping"])(this.props.children); + if (child.key in currentChildMapping) return; + + if (child.props.onExited) { + child.props.onExited(node); + } + + if (this.mounted) { + this.setState(function (state) { + var children = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, state.children); + + delete children[child.key]; + return { + children: children + }; + }); + } + }; + + _proto.render = function render() { + var _this$props = this.props, + Component = _this$props.component, + childFactory = _this$props.childFactory, + props = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$props, ["component", "childFactory"]); + + var contextValue = this.state.contextValue; + var children = values(this.state.children).map(childFactory); + delete props.appear; + delete props.enter; + delete props.exit; + + if (Component === null) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: contextValue + }, children); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_6__["default"].Provider, { + value: contextValue + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(Component, props, children)); + }; + + return TransitionGroup; +}(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component); + +TransitionGroup.propTypes = false ? undefined : {}; +TransitionGroup.defaultProps = defaultProps; +/* harmony default export */ __webpack_exports__["default"] = (TransitionGroup); + +/***/ }), + +/***/ "nOHs": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("6Ku4") +var buildFormatLocale = __webpack_require__("YYsG") + +/** + * @category Locales + * @summary Italian locale. + * @author Alberto Restifo [@albertorestifo]{@link https://github.com/albertorestifo} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "nOVM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateUniqueID", function() { return generateUniqueID; }); +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Performantly generate a unique, 30-char string by combining a version + * number, the current timestamp with a 13-digit number integer. + * @return {string} + */ +const generateUniqueID = () => { + return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`; +}; + + +//# sourceMappingURL=generateUniqueID.js.map + + +/***/ }), + +/***/ "nOWK": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; + +var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + + + + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var deepmerge = createCommonjsModule(function (module, exports) { +(function (root, factory) { + if (false) {} else { + module.exports = factory(); + } +}(commonjsGlobal, function () { + +function isMergeableObject(val) { + var nonNullObject = val && typeof val === 'object'; + + return nonNullObject + && Object.prototype.toString.call(val) !== '[object RegExp]' + && Object.prototype.toString.call(val) !== '[object Date]' +} + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneIfNecessary(value, optionsArgument) { + var clone = optionsArgument && optionsArgument.clone === true; + return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value +} + +function defaultArrayMerge(target, source, optionsArgument) { + var destination = target.slice(); + source.forEach(function(e, i) { + if (typeof destination[i] === 'undefined') { + destination[i] = cloneIfNecessary(e, optionsArgument); + } else if (isMergeableObject(e)) { + destination[i] = deepmerge(target[i], e, optionsArgument); + } else if (target.indexOf(e) === -1) { + destination.push(cloneIfNecessary(e, optionsArgument)); + } + }); + return destination +} + +function mergeObject(target, source, optionsArgument) { + var destination = {}; + if (isMergeableObject(target)) { + Object.keys(target).forEach(function (key) { + destination[key] = cloneIfNecessary(target[key], optionsArgument); + }); + } + Object.keys(source).forEach(function (key) { + if (!isMergeableObject(source[key]) || !target[key]) { + destination[key] = cloneIfNecessary(source[key], optionsArgument); + } else { + destination[key] = deepmerge(target[key], source[key], optionsArgument); + } + }); + return destination +} + +function deepmerge(target, source, optionsArgument) { + var array = Array.isArray(source); + var options = optionsArgument || { arrayMerge: defaultArrayMerge }; + var arrayMerge = options.arrayMerge || defaultArrayMerge; + + if (array) { + return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument) + } else { + return mergeObject(target, source, optionsArgument) + } +} + +deepmerge.all = function deepmergeAll(array, optionsArgument) { + if (!Array.isArray(array) || array.length < 2) { + throw new Error('first argument should be an array with at least two elements') + } + + // we are sure there are at least 2 values, so it is safe to have no initial value + return array.reduce(function(prev, next) { + return deepmerge(prev, next, optionsArgument) + }) +}; + +return deepmerge + +})); +}); + +// +// An event handler can take an optional event argument +// and should not return a value + +// An array of all currently registered event handlers for a type + +// A map of event types and their corresponding event handlers. + + + + +/** Mitt: Tiny (~200b) functional event emitter / pubsub. + * @name mitt + * @returns {Mitt} + */ +function mitt(all ) { + all = all || Object.create(null); + + return { + /** + * Register an event handler for the given type. + * + * @param {String} type Type of event to listen for, or `"*"` for all events + * @param {Function} handler Function to call in response to given event + * @memberOf mitt + */ + on: function on(type , handler ) { + (all[type] || (all[type] = [])).push(handler); + }, + + /** + * Remove an event handler for the given type. + * + * @param {String} type Type of event to unregister `handler` from, or `"*"` + * @param {Function} handler Handler function to remove + * @memberOf mitt + */ + off: function off(type , handler ) { + if (all[type]) { + all[type].splice(all[type].indexOf(handler) >>> 0, 1); + } + }, + + /** + * Invoke all handlers for the given type. + * If present, `"*"` handlers are invoked after type-matched handlers. + * + * @param {String} type The event type to invoke + * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler + * @memberof mitt + */ + emit: function emit(type , evt ) { + (all[type] || []).map(function (handler) { handler(evt); }); + (all['*'] || []).map(function (handler) { handler(type, evt); }); + } + }; +} + +var namespaces_1 = createCommonjsModule(function (module, exports) { +var namespaces = { + svg: { + name: 'xmlns', + uri: 'http://www.w3.org/2000/svg' + }, + xlink: { + name: 'xmlns:xlink', + uri: 'http://www.w3.org/1999/xlink' + } +}; + +exports.default = namespaces; +module.exports = exports.default; +}); + +/** + * @param {Object} attrs + * @return {string} + */ +var objectToAttrsString = function (attrs) { + return Object.keys(attrs).map(function (attr) { + var value = attrs[attr].toString().replace(/"/g, '"'); + return (attr + "=\"" + value + "\""); + }).join(' '); +}; + +var svg = namespaces_1.svg; +var xlink = namespaces_1.xlink; + +var defaultAttrs = {}; +defaultAttrs[svg.name] = svg.uri; +defaultAttrs[xlink.name] = xlink.uri; + +/** + * @param {string} [content] + * @param {Object} [attributes] + * @return {string} + */ +var wrapInSvgString = function (content, attributes) { + if ( content === void 0 ) content = ''; + + var attrs = deepmerge(defaultAttrs, attributes || {}); + var attrsRendered = objectToAttrsString(attrs); + return ("<svg " + attrsRendered + ">" + content + "</svg>"); +}; + +var svg$1 = namespaces_1.svg; +var xlink$1 = namespaces_1.xlink; + +var defaultConfig = { + attrs: ( obj = { + style: ['position: absolute', 'width: 0', 'height: 0'].join('; '), + 'aria-hidden': 'true' + }, obj[svg$1.name] = svg$1.uri, obj[xlink$1.name] = xlink$1.uri, obj ) +}; +var obj; + +var Sprite = function Sprite(config) { + this.config = deepmerge(defaultConfig, config || {}); + this.symbols = []; +}; + +/** + * Add new symbol. If symbol with the same id exists it will be replaced. + * @param {SpriteSymbol} symbol + * @return {boolean} `true` - symbol was added, `false` - replaced + */ +Sprite.prototype.add = function add (symbol) { + var ref = this; + var symbols = ref.symbols; + var existing = this.find(symbol.id); + + if (existing) { + symbols[symbols.indexOf(existing)] = symbol; + return false; + } + + symbols.push(symbol); + return true; +}; + +/** + * Remove symbol & destroy it + * @param {string} id + * @return {boolean} `true` - symbol was found & successfully destroyed, `false` - otherwise + */ +Sprite.prototype.remove = function remove (id) { + var ref = this; + var symbols = ref.symbols; + var symbol = this.find(id); + + if (symbol) { + symbols.splice(symbols.indexOf(symbol), 1); + symbol.destroy(); + return true; + } + + return false; +}; + +/** + * @param {string} id + * @return {SpriteSymbol|null} + */ +Sprite.prototype.find = function find (id) { + return this.symbols.filter(function (s) { return s.id === id; })[0] || null; +}; + +/** + * @param {string} id + * @return {boolean} + */ +Sprite.prototype.has = function has (id) { + return this.find(id) !== null; +}; + +/** + * @return {string} + */ +Sprite.prototype.stringify = function stringify () { + var ref = this.config; + var attrs = ref.attrs; + var stringifiedSymbols = this.symbols.map(function (s) { return s.stringify(); }).join(''); + return wrapInSvgString(stringifiedSymbols, attrs); +}; + +/** + * @return {string} + */ +Sprite.prototype.toString = function toString () { + return this.stringify(); +}; + +Sprite.prototype.destroy = function destroy () { + this.symbols.forEach(function (s) { return s.destroy(); }); +}; + +var SpriteSymbol = function SpriteSymbol(ref) { + var id = ref.id; + var viewBox = ref.viewBox; + var content = ref.content; + + this.id = id; + this.viewBox = viewBox; + this.content = content; +}; + +/** + * @return {string} + */ +SpriteSymbol.prototype.stringify = function stringify () { + return this.content; +}; + +/** + * @return {string} + */ +SpriteSymbol.prototype.toString = function toString () { + return this.stringify(); +}; + +SpriteSymbol.prototype.destroy = function destroy () { + var this$1 = this; + + ['id', 'viewBox', 'content'].forEach(function (prop) { return delete this$1[prop]; }); +}; + +/** + * @param {string} content + * @return {Element} + */ +var parse = function (content) { + var hasImportNode = !!document.importNode; + var doc = new DOMParser().parseFromString(content, 'image/svg+xml').documentElement; + + /** + * Fix for browser which are throwing WrongDocumentError + * if you insert an element which is not part of the document + * @see http://stackoverflow.com/a/7986519/4624403 + */ + if (hasImportNode) { + return document.importNode(doc, true); + } + + return doc; +}; + +var BrowserSpriteSymbol = (function (SpriteSymbol$$1) { + function BrowserSpriteSymbol () { + SpriteSymbol$$1.apply(this, arguments); + } + + if ( SpriteSymbol$$1 ) BrowserSpriteSymbol.__proto__ = SpriteSymbol$$1; + BrowserSpriteSymbol.prototype = Object.create( SpriteSymbol$$1 && SpriteSymbol$$1.prototype ); + BrowserSpriteSymbol.prototype.constructor = BrowserSpriteSymbol; + + var prototypeAccessors = { isMounted: {} }; + + prototypeAccessors.isMounted.get = function () { + return !!this.node; + }; + + /** + * @param {Element} node + * @return {BrowserSpriteSymbol} + */ + BrowserSpriteSymbol.createFromExistingNode = function createFromExistingNode (node) { + return new BrowserSpriteSymbol({ + id: node.getAttribute('id'), + viewBox: node.getAttribute('viewBox'), + content: node.outerHTML + }); + }; + + BrowserSpriteSymbol.prototype.destroy = function destroy () { + if (this.isMounted) { + this.unmount(); + } + SpriteSymbol$$1.prototype.destroy.call(this); + }; + + /** + * @param {Element|string} target + * @return {Element} + */ + BrowserSpriteSymbol.prototype.mount = function mount (target) { + if (this.isMounted) { + return this.node; + } + + var mountTarget = typeof target === 'string' ? document.querySelector(target) : target; + var node = this.render(); + this.node = node; + + mountTarget.appendChild(node); + + return node; + }; + + /** + * @return {Element} + */ + BrowserSpriteSymbol.prototype.render = function render () { + var content = this.stringify(); + return parse(wrapInSvgString(content)).childNodes[0]; + }; + + BrowserSpriteSymbol.prototype.unmount = function unmount () { + this.node.parentNode.removeChild(this.node); + }; + + Object.defineProperties( BrowserSpriteSymbol.prototype, prototypeAccessors ); + + return BrowserSpriteSymbol; +}(SpriteSymbol)); + +var defaultConfig$1 = { + /** + * Should following options be automatically configured: + * - `syncUrlsWithBaseTag` + * - `locationChangeAngularEmitter` + * - `moveGradientsOutsideSymbol` + * @type {boolean} + */ + autoConfigure: true, + + /** + * Default mounting selector + * @type {string} + */ + mountTo: 'body', + + /** + * Fix disappearing SVG elements when <base href> exists. + * Executes when sprite mounted. + * @see http://stackoverflow.com/a/18265336/796152 + * @see https://github.com/everdimension/angular-svg-base-fix + * @see https://github.com/angular/angular.js/issues/8934#issuecomment-56568466 + * @type {boolean} + */ + syncUrlsWithBaseTag: false, + + /** + * Should sprite listen custom location change event + * @type {boolean} + */ + listenLocationChangeEvent: true, + + /** + * Custom window event name which should be emitted to update sprite urls + * @type {string} + */ + locationChangeEvent: 'locationChange', + + /** + * Emit location change event in Angular automatically + * @type {boolean} + */ + locationChangeAngularEmitter: false, + + /** + * Selector to find symbols usages when updating sprite urls + * @type {string} + */ + usagesToUpdate: 'use[*|href]', + + /** + * Fix Firefox bug when gradients and patterns don't work if they are within a symbol. + * Executes when sprite is rendered, but not mounted. + * @see https://bugzilla.mozilla.org/show_bug.cgi?id=306674 + * @see https://bugzilla.mozilla.org/show_bug.cgi?id=353575 + * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1235364 + * @type {boolean} + */ + moveGradientsOutsideSymbol: false +}; + +/** + * @param {*} arrayLike + * @return {Array} + */ +var arrayFrom = function (arrayLike) { + return Array.prototype.slice.call(arrayLike, 0); +}; + +var browser = { + isChrome: function () { return /chrome/i.test(navigator.userAgent); }, + isFirefox: function () { return /firefox/i.test(navigator.userAgent); }, + + // https://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx + isIE: function () { return /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent); }, + isEdge: function () { return /edge/i.test(navigator.userAgent); } +}; + +/** + * @param {string} name + * @param {*} data + */ +var dispatchEvent = function (name, data) { + var event = document.createEvent('CustomEvent'); + event.initCustomEvent(name, false, false, data); + window.dispatchEvent(event); +}; + +/** + * IE doesn't evaluate <style> tags in SVGs that are dynamically added to the page. + * This trick will trigger IE to read and use any existing SVG <style> tags. + * @see https://github.com/iconic/SVGInjector/issues/23 + * @see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/ + * + * @param {Element} node DOM Element to search <style> tags in + * @return {Array<HTMLStyleElement>} + */ +var evalStylesIEWorkaround = function (node) { + var updatedNodes = []; + + arrayFrom(node.querySelectorAll('style')) + .forEach(function (style) { + style.textContent += ''; + updatedNodes.push(style); + }); + + return updatedNodes; +}; + +/** + * @param {string} [url] If not provided - current URL will be used + * @return {string} + */ +var getUrlWithoutFragment = function (url) { + return (url || window.location.href).split('#')[0]; +}; + +/* global angular */ +/** + * @param {string} eventName + */ +var locationChangeAngularEmitter = function (eventName) { + angular.module('ng').run(['$rootScope', function ($rootScope) { + $rootScope.$on('$locationChangeSuccess', function (e, newUrl, oldUrl) { + dispatchEvent(eventName, { oldUrl: oldUrl, newUrl: newUrl }); + }); + }]); +}; + +var defaultSelector = 'linearGradient, radialGradient, pattern'; + +/** + * @param {Element} svg + * @param {string} [selector] + * @return {Element} + */ +var moveGradientsOutsideSymbol = function (svg, selector) { + if ( selector === void 0 ) selector = defaultSelector; + + arrayFrom(svg.querySelectorAll('symbol')).forEach(function (symbol) { + arrayFrom(symbol.querySelectorAll(selector)).forEach(function (node) { + symbol.parentNode.insertBefore(node, symbol); + }); + }); + return svg; +}; + +/** + * @param {NodeList} nodes + * @param {Function} [matcher] + * @return {Attr[]} + */ +function selectAttributes(nodes, matcher) { + var attrs = arrayFrom(nodes).reduce(function (acc, node) { + if (!node.attributes) { + return acc; + } + + var arrayfied = arrayFrom(node.attributes); + var matched = matcher ? arrayfied.filter(matcher) : arrayfied; + return acc.concat(matched); + }, []); + + return attrs; +} + +/** + * @param {NodeList|Node} nodes + * @param {boolean} [clone=true] + * @return {string} + */ + +var xLinkNS = namespaces_1.xlink.uri; +var xLinkAttrName = 'xlink:href'; + +// eslint-disable-next-line no-useless-escape +var specialUrlCharsPattern = /[{}|\\\^\[\]`"<>]/g; + +function encoder(url) { + return url.replace(specialUrlCharsPattern, function (match) { + return ("%" + (match[0].charCodeAt(0).toString(16).toUpperCase())); + }); +} + +function escapeRegExp(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string +} + +/** + * @param {NodeList} nodes + * @param {string} startsWith + * @param {string} replaceWith + * @return {NodeList} + */ +function updateReferences(nodes, startsWith, replaceWith) { + arrayFrom(nodes).forEach(function (node) { + var href = node.getAttribute(xLinkAttrName); + if (href && href.indexOf(startsWith) === 0) { + var newUrl = href.replace(startsWith, replaceWith); + node.setAttributeNS(xLinkNS, xLinkAttrName, newUrl); + } + }); + + return nodes; +} + +/** + * List of SVG attributes to update url() target in them + */ +var attList = [ + 'clipPath', + 'colorProfile', + 'src', + 'cursor', + 'fill', + 'filter', + 'marker', + 'markerStart', + 'markerMid', + 'markerEnd', + 'mask', + 'stroke', + 'style' +]; + +var attSelector = attList.map(function (attr) { return ("[" + attr + "]"); }).join(','); + +/** + * Update URLs in svg image (like `fill="url(...)"`) and update referencing elements + * @param {Element} svg + * @param {NodeList} references + * @param {string|RegExp} startsWith + * @param {string} replaceWith + * @return {void} + * + * @example + * const sprite = document.querySelector('svg.sprite'); + * const usages = document.querySelectorAll('use'); + * updateUrls(sprite, usages, '#', 'prefix#'); + */ +var updateUrls = function (svg, references, startsWith, replaceWith) { + var startsWithEncoded = encoder(startsWith); + var replaceWithEncoded = encoder(replaceWith); + + var nodes = svg.querySelectorAll(attSelector); + var attrs = selectAttributes(nodes, function (ref) { + var localName = ref.localName; + var value = ref.value; + + return attList.indexOf(localName) !== -1 && value.indexOf(("url(" + startsWithEncoded)) !== -1; + }); + + attrs.forEach(function (attr) { return attr.value = attr.value.replace(new RegExp(escapeRegExp(startsWithEncoded), 'g'), replaceWithEncoded); }); + updateReferences(references, startsWithEncoded, replaceWithEncoded); +}; + +/** + * Internal emitter events + * @enum + * @private + */ +var Events = { + MOUNT: 'mount', + SYMBOL_MOUNT: 'symbol_mount' +}; + +var BrowserSprite = (function (Sprite$$1) { + function BrowserSprite(cfg) { + var this$1 = this; + if ( cfg === void 0 ) cfg = {}; + + Sprite$$1.call(this, deepmerge(defaultConfig$1, cfg)); + + var emitter = mitt(); + this._emitter = emitter; + this.node = null; + + var ref = this; + var config = ref.config; + + if (config.autoConfigure) { + this._autoConfigure(cfg); + } + + if (config.syncUrlsWithBaseTag) { + var baseUrl = document.getElementsByTagName('base')[0].getAttribute('href'); + emitter.on(Events.MOUNT, function () { return this$1.updateUrls('#', baseUrl); }); + } + + var handleLocationChange = this._handleLocationChange.bind(this); + this._handleLocationChange = handleLocationChange; + + // Provide way to update sprite urls externally via dispatching custom window event + if (config.listenLocationChangeEvent) { + window.addEventListener(config.locationChangeEvent, handleLocationChange); + } + + // Emit location change event in Angular automatically + if (config.locationChangeAngularEmitter) { + locationChangeAngularEmitter(config.locationChangeEvent); + } + + // After sprite mounted + emitter.on(Events.MOUNT, function (spriteNode) { + if (config.moveGradientsOutsideSymbol) { + moveGradientsOutsideSymbol(spriteNode); + } + }); + + // After symbol mounted into sprite + emitter.on(Events.SYMBOL_MOUNT, function (symbolNode) { + if (config.moveGradientsOutsideSymbol) { + moveGradientsOutsideSymbol(symbolNode.parentNode); + } + + if (browser.isIE() || browser.isEdge()) { + evalStylesIEWorkaround(symbolNode); + } + }); + } + + if ( Sprite$$1 ) BrowserSprite.__proto__ = Sprite$$1; + BrowserSprite.prototype = Object.create( Sprite$$1 && Sprite$$1.prototype ); + BrowserSprite.prototype.constructor = BrowserSprite; + + var prototypeAccessors = { isMounted: {} }; + + /** + * @return {boolean} + */ + prototypeAccessors.isMounted.get = function () { + return !!this.node; + }; + + /** + * Automatically configure following options + * - `syncUrlsWithBaseTag` + * - `locationChangeAngularEmitter` + * - `moveGradientsOutsideSymbol` + * @param {Object} cfg + * @private + */ + BrowserSprite.prototype._autoConfigure = function _autoConfigure (cfg) { + var ref = this; + var config = ref.config; + + if (typeof cfg.syncUrlsWithBaseTag === 'undefined') { + config.syncUrlsWithBaseTag = typeof document.getElementsByTagName('base')[0] !== 'undefined'; + } + + if (typeof cfg.locationChangeAngularEmitter === 'undefined') { + config.locationChangeAngularEmitter = typeof window.angular !== 'undefined'; + } + + if (typeof cfg.moveGradientsOutsideSymbol === 'undefined') { + config.moveGradientsOutsideSymbol = browser.isFirefox(); + } + }; + + /** + * @param {Event} event + * @param {Object} event.detail + * @param {string} event.detail.oldUrl + * @param {string} event.detail.newUrl + * @private + */ + BrowserSprite.prototype._handleLocationChange = function _handleLocationChange (event) { + var ref = event.detail; + var oldUrl = ref.oldUrl; + var newUrl = ref.newUrl; + this.updateUrls(oldUrl, newUrl); + }; + + /** + * Add new symbol. If symbol with the same id exists it will be replaced. + * If sprite already mounted - `symbol.mount(sprite.node)` will be called. + * @fires Events#SYMBOL_MOUNT + * @param {BrowserSpriteSymbol} symbol + * @return {boolean} `true` - symbol was added, `false` - replaced + */ + BrowserSprite.prototype.add = function add (symbol) { + var sprite = this; + var isNewSymbol = Sprite$$1.prototype.add.call(this, symbol); + + if (this.isMounted && isNewSymbol) { + symbol.mount(sprite.node); + this._emitter.emit(Events.SYMBOL_MOUNT, symbol.node); + } + + return isNewSymbol; + }; + + /** + * Attach to existing DOM node + * @param {string|Element} target + * @return {Element|null} attached DOM Element. null if node to attach not found. + */ + BrowserSprite.prototype.attach = function attach (target) { + var this$1 = this; + + var sprite = this; + + if (sprite.isMounted) { + return sprite.node; + } + + /** @type Element */ + var node = typeof target === 'string' ? document.querySelector(target) : target; + sprite.node = node; + + // Already added symbols needs to be mounted + this.symbols.forEach(function (symbol) { + symbol.mount(sprite.node); + this$1._emitter.emit(Events.SYMBOL_MOUNT, symbol.node); + }); + + // Create symbols from existing DOM nodes, add and mount them + arrayFrom(node.querySelectorAll('symbol')) + .forEach(function (symbolNode) { + var symbol = BrowserSpriteSymbol.createFromExistingNode(symbolNode); + symbol.node = symbolNode; // hack to prevent symbol mounting to sprite when adding + sprite.add(symbol); + }); + + this._emitter.emit(Events.MOUNT, node); + + return node; + }; + + BrowserSprite.prototype.destroy = function destroy () { + var ref = this; + var config = ref.config; + var symbols = ref.symbols; + var _emitter = ref._emitter; + + symbols.forEach(function (s) { return s.destroy(); }); + + _emitter.off('*'); + window.removeEventListener(config.locationChangeEvent, this._handleLocationChange); + + if (this.isMounted) { + this.unmount(); + } + }; + + /** + * @fires Events#MOUNT + * @param {string|Element} [target] + * @param {boolean} [prepend=false] + * @return {Element|null} rendered sprite node. null if mount node not found. + */ + BrowserSprite.prototype.mount = function mount (target, prepend) { + if ( target === void 0 ) target = this.config.mountTo; + if ( prepend === void 0 ) prepend = false; + + var sprite = this; + + if (sprite.isMounted) { + return sprite.node; + } + + var mountNode = typeof target === 'string' ? document.querySelector(target) : target; + var node = sprite.render(); + this.node = node; + + if (prepend && mountNode.childNodes[0]) { + mountNode.insertBefore(node, mountNode.childNodes[0]); + } else { + mountNode.appendChild(node); + } + + this._emitter.emit(Events.MOUNT, node); + + return node; + }; + + /** + * @return {Element} + */ + BrowserSprite.prototype.render = function render () { + return parse(this.stringify()); + }; + + /** + * Detach sprite from the DOM + */ + BrowserSprite.prototype.unmount = function unmount () { + this.node.parentNode.removeChild(this.node); + }; + + /** + * Update URLs in sprite and usage elements + * @param {string} oldUrl + * @param {string} newUrl + * @return {boolean} `true` - URLs was updated, `false` - sprite is not mounted + */ + BrowserSprite.prototype.updateUrls = function updateUrls$1 (oldUrl, newUrl) { + if (!this.isMounted) { + return false; + } + + var usages = document.querySelectorAll(this.config.usagesToUpdate); + + updateUrls( + this.node, + usages, + ((getUrlWithoutFragment(oldUrl)) + "#"), + ((getUrlWithoutFragment(newUrl)) + "#") + ); + + return true; + }; + + Object.defineProperties( BrowserSprite.prototype, prototypeAccessors ); + + return BrowserSprite; +}(Sprite)); + +var ready$1 = createCommonjsModule(function (module) { +/*! + * domready (c) Dustin Diaz 2014 - License MIT + */ +!function (name, definition) { + + { module.exports = definition(); } + +}('domready', function () { + + var fns = [], listener + , doc = document + , hack = doc.documentElement.doScroll + , domContentLoaded = 'DOMContentLoaded' + , loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState); + + + if (!loaded) + { doc.addEventListener(domContentLoaded, listener = function () { + doc.removeEventListener(domContentLoaded, listener); + loaded = 1; + while (listener = fns.shift()) { listener(); } + }); } + + return function (fn) { + loaded ? setTimeout(fn, 0) : fns.push(fn); + } + +}); +}); + +var spriteNodeId = '__SVG_SPRITE_NODE__'; +var spriteGlobalVarName = '__SVG_SPRITE__'; +var isSpriteExists = !!window[spriteGlobalVarName]; + +// eslint-disable-next-line import/no-mutable-exports +var sprite; + +if (isSpriteExists) { + sprite = window[spriteGlobalVarName]; +} else { + sprite = new BrowserSprite({ attrs: { id: spriteNodeId } }); + window[spriteGlobalVarName] = sprite; +} + +var loadSprite = function () { + /** + * Check for page already contains sprite node + * If found - attach to and reuse it's content + * If not - render and mount the new sprite + */ + var existing = document.getElementById(spriteNodeId); + + if (existing) { + sprite.attach(existing); + } else { + sprite.mount(document.body, true); + } +}; + +if (document.body) { + loadSprite(); +} else { + ready$1(loadSprite); +} + +var sprite$1 = sprite; + +return sprite$1; + +}))); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "nRDA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _FormControlLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GmYb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _FormControlLabel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "nTFu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("csMb"); +/* harmony import */ var _SelectInput__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("YiVU"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OJkG"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("OY/u"); +/* harmony import */ var _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("H1Bs"); +/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("pY8S"); +/* harmony import */ var _NativeSelect_NativeSelect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("r4+2"); +/* harmony import */ var _NativeSelect_NativeSelectInput__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("SpSB"); +/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("FDZL"); +/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("BXyO"); + + + + + + + + + + + + + + + +var styles = _NativeSelect_NativeSelect__WEBPACK_IMPORTED_MODULE_11__["styles"]; + +var _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Input__WEBPACK_IMPORTED_MODULE_10__["default"], null); + +var _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_FilledInput__WEBPACK_IMPORTED_MODULE_13__["default"], null); + +var Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Select(props, ref) { + var _props$autoWidth = props.autoWidth, + autoWidth = _props$autoWidth === void 0 ? false : _props$autoWidth, + children = props.children, + classes = props.classes, + _props$displayEmpty = props.displayEmpty, + displayEmpty = _props$displayEmpty === void 0 ? false : _props$displayEmpty, + _props$IconComponent = props.IconComponent, + IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_9__["default"] : _props$IconComponent, + id = props.id, + input = props.input, + inputProps = props.inputProps, + label = props.label, + labelId = props.labelId, + _props$labelWidth = props.labelWidth, + labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth, + MenuProps = props.MenuProps, + _props$multiple = props.multiple, + multiple = _props$multiple === void 0 ? false : _props$multiple, + _props$native = props.native, + native = _props$native === void 0 ? false : _props$native, + onClose = props.onClose, + onOpen = props.onOpen, + open = props.open, + renderValue = props.renderValue, + SelectDisplayProps = props.SelectDisplayProps, + _props$variant = props.variant, + variantProps = _props$variant === void 0 ? 'standard' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["autoWidth", "children", "classes", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "labelWidth", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"]); + + var inputComponent = native ? _NativeSelect_NativeSelectInput__WEBPACK_IMPORTED_MODULE_12__["default"] : _SelectInput__WEBPACK_IMPORTED_MODULE_5__["default"]; + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['variant'] + }); + var variant = fcs.variant || variantProps; + var InputComponent = input || { + standard: _ref, + outlined: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_OutlinedInput__WEBPACK_IMPORTED_MODULE_14__["default"], { + label: label, + labelWidth: labelWidth + }), + filled: _ref2 + }[variant]; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // Most of the logic is implemented in `SelectInput`. + // The `Select` component is a simple API wrapper to expose something better to play with. + inputComponent: inputComponent, + inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + children: children, + IconComponent: IconComponent, + variant: variant, + type: undefined, + // We render a select. We can ignore the type provided by the `Input`. + multiple: multiple + }, native ? { + id: id + } : { + autoWidth: autoWidth, + displayEmpty: displayEmpty, + labelId: labelId, + MenuProps: MenuProps, + onClose: onClose, + onOpen: onOpen, + open: open, + renderValue: renderValue, + SelectDisplayProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + id: id + }, SelectDisplayProps) + }, inputProps, { + classes: inputProps ? Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_4__["mergeClasses"])({ + baseClasses: classes, + newClasses: inputProps.classes, + Component: Select + }) : classes + }, input ? input.props.inputProps : {}), + ref: ref + }, other)); +}); + false ? undefined : void 0; +Select.muiName = 'Select'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__["default"])(styles, { + name: 'MuiSelect' +})(Select)); + +/***/ }), + +/***/ "nUfk": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Provides an I18n helper using a Higher Order Component. + */ + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.createUseI18n = exports.I18nContext = exports.I18n = exports.DEFAULT_LANG = void 0; +Object.defineProperty(exports, "extend", { + enumerable: true, + get: function get() { + return _translation2.extend; + } +}); +Object.defineProperty(exports, "initTranslation", { + enumerable: true, + get: function get() { + return _translation2.initTranslation; + } +}); +exports.useI18n = exports.translate = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); +var _nodePolyglot = _interopRequireDefault(__webpack_require__("pFjr")); +var _translation = __webpack_require__("c/eY"); +var _format = __webpack_require__("mNQn"); +var _translation2 = __webpack_require__("c/eY"); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} +var DEFAULT_LANG = 'en'; +exports.DEFAULT_LANG = DEFAULT_LANG; +var I18nContext = /*#__PURE__*/_react.default.createContext(); // Provider root component +exports.I18nContext = I18nContext; +var I18n = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(I18n, _Component); + var _super = _createSuper(I18n); + function I18n(props) { + var _this; + (0, _classCallCheck2.default)(this, I18n); + _this = _super.call(this, props); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "UNSAFE_componentWillReceiveProps", function (nextProps) { + if (nextProps.lang !== _this.props.lang) { + _this.init(nextProps); + } + }); + _this.init(_this.props); + return _this; + } + (0, _createClass2.default)(I18n, [{ + key: "init", + value: function init(props) { + var polyglot = props.polyglot, + lang = props.lang, + dictRequire = props.dictRequire, + context = props.context, + defaultLang = props.defaultLang; + this.translator = polyglot || (0, _translation.initTranslation)(lang, dictRequire, context, defaultLang); + this.format = (0, _format.initFormat)(lang, defaultLang); + this.t = this.translator.t.bind(this.translator); + this.contextValue = this.getContextValue(props); + } + }, { + key: "getContextValue", + value: function getContextValue(props) { + return { + t: this.t, + f: this.format, + lang: (props || this.props).lang + }; + } + }, { + key: "getChildContext", + value: function getChildContext() { + return this.contextValue; + } + }, { + key: "render", + value: function render() { + return /*#__PURE__*/_react.default.createElement(I18nContext.Provider, { + value: this.contextValue + }, this.props.children); + } + }]); + return I18n; +}(_react.Component); +exports.I18n = I18n; +I18n.propTypes = { + lang: _propTypes.default.string.isRequired, + // current language. + polyglot: _propTypes.default.object, + // A polyglot instance. + dictRequire: _propTypes.default.func, + // A callback to load locales. + context: _propTypes.default.string, + // current context. + defaultLang: _propTypes.default.string // default language. By default is 'en' +}; + +I18n.defaultProps = { + defaultLang: DEFAULT_LANG +}; +I18n.childContextTypes = { + t: _propTypes.default.func, + f: _propTypes.default.func, + lang: _propTypes.default.string +}; // higher order decorator for components that need `t` and/or `f` + +var translate = function translate() { + return function (WrappedComponent) { + var Wrapper = function Wrapper(props) { + var i18nContext = (0, _react.useContext)(I18nContext); + return /*#__PURE__*/_react.default.createElement(WrappedComponent, (0, _extends2.default)({}, props, { + t: i18nContext && i18nContext.t, + f: i18nContext && i18nContext.f, + lang: i18nContext && i18nContext.lang + })); + }; + Wrapper.displayName = "withI18n(".concat(WrappedComponent.displayName || WrappedComponent.name, ")"); + return Wrapper; + }; +}; +exports.translate = translate; +var useI18n = function useI18n() { + return (0, _react.useContext)(I18nContext); +}; +exports.useI18n = useI18n; +var createUseI18n = function createUseI18n(locales) { + return function () { + var _ref = useI18n() || { + lang: DEFAULT_LANG + }, + lang = _ref.lang; + return (0, _react.useMemo)(function () { + var polyglot = new _nodePolyglot.default({ + locale: DEFAULT_LANG, + phrases: locales[DEFAULT_LANG] + }); + if (lang && lang !== DEFAULT_LANG) { + try { + polyglot.locale(lang); + polyglot.extend(locales[lang]); + } catch (e) { + console.warn("The dict phrases for \"".concat(lang, "\" can't be loaded")); + } + } + var f = (0, _format.initFormat)(lang); + var t = polyglot.t.bind(polyglot); + return { + t: t, + f: f, + lang: lang + }; + }, [lang]); + }; +}; +exports.createUseI18n = createUseI18n; +var _default = I18n; +exports.default = _default; + +/***/ }), + +/***/ "nVWS": +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ "nbQj": +/***/ (function(module, exports, __webpack_require__) { + +var baseIsSet = __webpack_require__("edLT"), + baseUnary = __webpack_require__("Ijh8"), + nodeUtil = __webpack_require__("7tyZ"); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; + + +/***/ }), + +/***/ "nbvd": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _AccordionActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("El7e"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _AccordionActions__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "ncvv": +/***/ (function(module, exports, __webpack_require__) { + +var baseToString = __webpack_require__("xl7M"), + castSlice = __webpack_require__("1UXZ"), + charsEndIndex = __webpack_require__("8ZQa"), + stringToArray = __webpack_require__("02by"), + toString = __webpack_require__("GCWF"), + trimmedEndIndex = __webpack_require__("S42a"); + +/** + * Removes trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ +function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); +} + +module.exports = trimEnd; + + +/***/ }), + +/***/ "nlfi": +/***/ (function(module, exports, __webpack_require__) { + +// ie9- setTimeout & setInterval additional parameters fix +var global = __webpack_require__("ETne"); +var $export = __webpack_require__("LRPZ"); +var userAgent = __webpack_require__("Wr43"); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + + +/***/ }), + +/***/ "nnOI": +/***/ (function(module, exports, __webpack_require__) { + +var identity = __webpack_require__("Q7kj"); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; + + +/***/ }), + +/***/ "no2e": +/***/ (function(module, exports) { + +/** + * @category Common Helpers + * @summary Is the given argument an instance of Date? + * + * @description + * Is the given argument an instance of Date? + * + * @param {*} argument - the argument to check + * @returns {Boolean} the given argument is an instance of Date + * + * @example + * // Is 'mayonnaise' a Date? + * var result = isDate('mayonnaise') + * //=> false + */ +function isDate (argument) { + return argument instanceof Date +} + +module.exports = isDate + + +/***/ }), + +/***/ "npFJ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__("h+8B"); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ "nsNp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("PKog"); +/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("JsRB"); +/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("E8//"); + + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.typography.body2, { + display: 'table-cell', + verticalAlign: 'inherit', + // Workaround for a rendering bug with spanned columns in Chrome 62.0. + // Removes the alpha (sets it to 1), and lightens or darkens the theme color. + borderBottom: "1px solid\n ".concat(theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["lighten"])(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["alpha"])(theme.palette.divider, 1), 0.88) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["darken"])(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__["alpha"])(theme.palette.divider, 1), 0.68)), + textAlign: 'left', + padding: 16 + }), + + /* Styles applied to the root element if `variant="head"` or `context.table.head`. */ + head: { + color: theme.palette.text.primary, + lineHeight: theme.typography.pxToRem(24), + fontWeight: theme.typography.fontWeightMedium + }, + + /* Styles applied to the root element if `variant="body"` or `context.table.body`. */ + body: { + color: theme.palette.text.primary + }, + + /* Styles applied to the root element if `variant="footer"` or `context.table.footer`. */ + footer: { + color: theme.palette.text.secondary, + lineHeight: theme.typography.pxToRem(21), + fontSize: theme.typography.pxToRem(12) + }, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: { + padding: '6px 24px 6px 16px', + '&:last-child': { + paddingRight: 16 + }, + '&$paddingCheckbox': { + width: 24, + // prevent the checkbox column from growing + padding: '0 12px 0 16px', + '&:last-child': { + paddingLeft: 12, + paddingRight: 16 + }, + '& > *': { + padding: 0 + } + } + }, + + /* Styles applied to the root element if `padding="checkbox"`. */ + paddingCheckbox: { + width: 48, + // prevent the checkbox column from growing + padding: '0 0 0 4px', + '&:last-child': { + paddingLeft: 0, + paddingRight: 4 + } + }, + + /* Styles applied to the root element if `padding="none"`. */ + paddingNone: { + padding: 0, + '&:last-child': { + padding: 0 + } + }, + + /* Styles applied to the root element if `align="left"`. */ + alignLeft: { + textAlign: 'left' + }, + + /* Styles applied to the root element if `align="center"`. */ + alignCenter: { + textAlign: 'center' + }, + + /* Styles applied to the root element if `align="right"`. */ + alignRight: { + textAlign: 'right', + flexDirection: 'row-reverse' + }, + + /* Styles applied to the root element if `align="justify"`. */ + alignJustify: { + textAlign: 'justify' + }, + + /* Styles applied to the root element if `context.table.stickyHeader={true}`. */ + stickyHeader: { + position: 'sticky', + top: 0, + left: 0, + zIndex: 2, + backgroundColor: theme.palette.background.default + } + }; +}; +/** + * The component renders a `<th>` element when the parent context is a header + * or otherwise a `<td>` element. + */ + +var TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableCell(props, ref) { + var _props$align = props.align, + align = _props$align === void 0 ? 'inherit' : _props$align, + classes = props.classes, + className = props.className, + component = props.component, + paddingProp = props.padding, + scopeProp = props.scope, + sizeProp = props.size, + sortDirection = props.sortDirection, + variantProp = props.variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["align", "classes", "className", "component", "padding", "scope", "size", "sortDirection", "variant"]); + + var table = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_9__["default"]); + var tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__["useContext"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_10__["default"]); + var isHeadCell = tablelvl2 && tablelvl2.variant === 'head'; + var role; + var Component; + + if (component) { + Component = component; + role = isHeadCell ? 'columnheader' : 'cell'; + } else { + Component = isHeadCell ? 'th' : 'td'; + } + + var scope = scopeProp; + + if (!scope && isHeadCell) { + scope = 'col'; + } + + var padding = paddingProp || (table && table.padding ? table.padding : 'normal'); + var size = sizeProp || (table && table.size ? table.size : 'medium'); + var variant = variantProp || tablelvl2 && tablelvl2.variant; + var ariaSort = null; + + if (sortDirection) { + ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending'; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + ref: ref, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[variant], className, align !== 'inherit' && classes["align".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(align))], padding !== 'normal' && classes["padding".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(padding))], size !== 'medium' && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader), + "aria-sort": ariaSort, + role: role, + scope: scope + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiTableCell' +})(TableCell)); + +/***/ }), + +/***/ "o1F1": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/bottom.svg` to regenerate; + +function SvgBottom(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 24 24" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M3.968 6.175a1.571 1.571 0 00-2.222 2.222l9.429 9.428a1.571 1.571 0 002.222 0l9.428-9.428a1.571 1.571 0 00-2.222-2.222l-8.317 8.317-8.318-8.317z", + fillRule: "evenodd" + })); +} +var _default = SvgBottom; +exports.default = _default; + +/***/ }), + +/***/ "o2e7": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + zIndex: -1, + position: 'fixed', + right: 0, + bottom: 0, + top: 0, + left: 0, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + WebkitTapHighlightColor: 'transparent' + }, + + /* Styles applied to the root element if `invisible={true}`. */ + invisible: { + backgroundColor: 'transparent' + } +}; +/** + * @ignore - internal component. + */ + +var SimpleBackdrop = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function SimpleBackdrop(props, ref) { + var _props$invisible = props.invisible, + invisible = _props$invisible === void 0 ? false : _props$invisible, + open = props.open, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["invisible", "open"]); + + return open ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + "aria-hidden": true, + ref: ref + }, other, { + style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, styles.root, invisible ? styles.invisible : {}, other.style) + })) : null; +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (SimpleBackdrop); + +/***/ }), + +/***/ "o2qs": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _minilog = _interopRequireDefault(__webpack_require__("B4A6")); + +var inBrowser = typeof window !== 'undefined'; +var minilog = inBrowser && window.minilog || _minilog.default; +var logger = minilog('cozy-realtime'); +logger.minilog = _minilog.default; +minilog.enable(); +minilog.suggest.deny('cozy-realtime', 'warn'); +minilog.suggest.allow('cozy-realtime', 'warn'); +var _default = logger; +exports.default = _default; + +/***/ }), + +/***/ "o3Qw": +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__("FFxP"); +var gOPS = __webpack_require__("9xp8"); +var pIE = __webpack_require__("AJH6"); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), + +/***/ "o5KW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Kv7L"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("AHiN"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("XqEJ"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("mkkA"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("XAJ7"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("Mgsu"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("SGK2"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("zVfY"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("a6fU"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("hwCY"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("7u7H"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("6td7"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("fL2G"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16__); +/* harmony import */ var _StorageData__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("dodI"); + + + + + + + + + + + + + + + + + + + +var MenuIcon = function MenuIcon(_ref) { + var icon = _ref.icon; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default.a, { + className: "u-mr-1", + color: "var(--slateGrey)", + icon: icon + }); +}; + +var ExternalLinkIcon = function ExternalLinkIcon() { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default.a, { + className: "coz-nav-settings-item-btn-external-icon", + color: "var(--coolGrey)", + icon: cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6___default.a + }); +}; + +var NavGroup = function NavGroup(_ref2) { + var children = _ref2.children; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { + className: "coz-nav-group" + }, children); +}; + +var NavItem = function NavItem(_ref3) { + var children = _ref3.children; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", { + className: "coz-nav-settings-item" + }, children); +}; + +var SettingsContent = function SettingsContent(_ref4) { + var t = _ref4.t, + onLogOut = _ref4.onLogOut, + settingsAppURL = _ref4.settingsAppURL, + storageData = _ref4.storageData, + onClaudy = _ref4.onClaudy, + _ref4$isDrawer = _ref4.isDrawer, + isDrawer = _ref4$isDrawer === void 0 ? false : _ref4$isDrawer, + isClaudyLoading = _ref4.isClaudyLoading, + shoulDisplayViewOfferButton = _ref4.shoulDisplayViewOfferButton, + managerUrlPremiumLink = _ref4.managerUrlPremiumLink; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-pop-content" + }, isDrawer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("hr", null), settingsAppURL && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/profile"), + target: "_self", + title: t('profile') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8___default.a + }), t('profile'))), (!isDrawer || !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])()) && shoulDisplayViewOfferButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: managerUrlPremiumLink, + target: "_self", + title: t('plans') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10___default.a + }), t('plans'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExternalLinkIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + target: "_self", + title: t('storage'), + href: "".concat(settingsAppURL, "#/storage") + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9___default.a + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, t('storage'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StorageData__WEBPACK_IMPORTED_MODULE_17__["default"], { + data: storageData + }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, cozy_flags__WEBPACK_IMPORTED_MODULE_2___default()('settings.permissions-dashboard') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/permissions/slug"), + target: "_self", + title: t('permissions') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11___default.a + }), t('permissions'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/connectedDevices"), + target: "_self", + title: t('connectedDevices') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12___default.a + }), t('connectedDevices'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/sessions"), + target: "_self", + title: t('connections') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13___default.a + }), t('connections')))), isDrawer && onClaudy && !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { + type: "button", + role: "menuitem", + className: "coz-nav-settings-item-btn", + busy: isClaudyLoading, + onClick: onClaudy + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7___default.a + }), " ", t('claudy.title')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + target: "_blank", + rel: "noopener noreferrer", + href: "https://support.cozy.io/", + title: t('help') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15___default.a + }), t('help'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExternalLinkIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/support"), + target: "_self", + title: t('contact') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16___default.a + }), t('contact')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { + type: "button", + role: "menuitem", + onClick: onLogOut, + title: t('logout') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14___default.a + }), " ", t('logout'))))); +}; + +SettingsContent.defaultProps = { + shoulDisplayViewOfferButton: false +}; +SettingsContent.propTypes = { + shoulDisplayViewOfferButton: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + t: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired, + settingsAppURL: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + storageData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, + onClaudy: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func]), + isDrawer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + isClaudyLoading: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__["translate"])()(SettingsContent)); + +/***/ }), + +/***/ "oA52": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_deprecatedPropType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ll/m"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'absolute', + left: 0, + right: 0, + height: 48, + background: 'rgba(0, 0, 0, 0.5)', + display: 'flex', + alignItems: 'center', + fontFamily: theme.typography.fontFamily + }, + + /* Styles applied to the root element if `position="bottom"`. */ + positionBottom: { + bottom: 0 + }, + + /* Styles applied to the root element if `position="top"`. */ + positionTop: { + top: 0 + }, + + /* Styles applied to the root element if a `subtitle` is provided. */ + rootSubtitle: { + height: 68 + }, + + /* Styles applied to the title and subtitle container element. */ + titleWrap: { + flexGrow: 1, + marginLeft: 16, + marginRight: 16, + color: theme.palette.common.white, + overflow: 'hidden' + }, + + /* Styles applied to the container element if `actionPosition="left"`. */ + titleWrapActionPosLeft: { + marginLeft: 0 + }, + + /* Styles applied to the container element if `actionPosition="right"`. */ + titleWrapActionPosRight: { + marginRight: 0 + }, + + /* Styles applied to the title container element. */ + title: { + fontSize: theme.typography.pxToRem(16), + lineHeight: '24px', + textOverflow: 'ellipsis', + overflow: 'hidden', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the subtitle container element. */ + subtitle: { + fontSize: theme.typography.pxToRem(12), + lineHeight: 1, + textOverflow: 'ellipsis', + overflow: 'hidden', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the actionIcon if supplied. */ + actionIcon: {}, + + /* Styles applied to the actionIcon if `actionPosition="left"`. */ + actionIconActionPosLeft: { + order: -1 + } + }; +}; +var ImageListItemBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ImageListItemBar(props, ref) { + var actionIcon = props.actionIcon, + _props$actionPosition = props.actionPosition, + actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition, + classes = props.classes, + className = props.className, + subtitle = props.subtitle, + title = props.title, + _props$position = props.position, + positionProp = _props$position === void 0 ? 'bottom' : _props$position, + titlePosition = props.titlePosition, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["actionIcon", "actionPosition", "classes", "className", "subtitle", "title", "position", "titlePosition"]); + + var position = titlePosition || positionProp; + var actionPos = actionIcon && actionPosition; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, subtitle && classes.rootSubtitle, { + 'bottom': classes.positionBottom, + 'top': classes.positionTop + }[position]), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.titleWrap, { + 'left': classes.titleWrapActionPosLeft, + 'right': classes.titleWrapActionPosRight + }[actionPos]) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.title + }, title), subtitle ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.subtitle + }, subtitle) : null), actionIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft) + }, actionIcon) : null); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiImageListItemBar' +})(ImageListItemBar)); + +/***/ }), + +/***/ "oAY9": +/***/ (function(module, exports, __webpack_require__) { + +var cloneArrayBuffer = __webpack_require__("RLfQ"); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; + + +/***/ }), + +/***/ "oBDG": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("h7wD") +var buildFormatLocale = __webpack_require__("oLNh") + +/** + * @category Locales + * @summary Serbian locale. + * @author Martin Wind [@mawi]{@link https://github.com/mawi12345} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "oD1g": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var getSideChannel = __webpack_require__("jMfu"); +var utils = __webpack_require__("Z6pf"); +var formats = __webpack_require__("4eKc"); +var has = Object.prototype.hasOwnProperty; + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var isArray = Array.isArray; +var split = String.prototype.split; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + +var toISO = Date.prototype.toISOString; + +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; + +var sentinel = {}; + +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; + } + } + + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } + + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } + + obj = ''; + } + + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + if (generateArrayPrefix === 'comma' && encodeValuesOnly) { + var valuesArray = split.call(String(obj), ','); + var valuesJoined = ''; + for (var i = 0; i < valuesArray.length; ++i) { + valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format)); + } + return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined]; + } + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; + + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; + + if (skipNulls && value === null) { + continue; + } + + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); + } + var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (options.sort) { + objKeys.sort(options.sort); + } + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } + } + + return joined.length > 0 ? prefix + joined : ''; +}; + + +/***/ }), + +/***/ "oEaH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_OUT", function() { return LOG_OUT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStorageData", function() { return getStorageData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingsAppURL", function() { return getSettingsAppURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSettingsBusy", function() { return isSettingsBusy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingSettings", function() { return isFetchingSettings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchSettingsData", function() { return fetchSettingsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logOut", function() { return logOut; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("jTJl"); + + + + +var FETCH_SETTINGS = 'FETCH_SETTINGS'; +var FETCH_SETTINGS_BUSY = 'FETCH_SETTINGS_BUSY'; +var FETCH_SETTINGS_SUCCESS = 'FETCH_SETTINGS_SUCCESS'; +var RECEIVE_NO_CONTEXT = 'RECEIVE_NO_CONTEXT'; +var RECEIVE_STORAGE = 'RECEIVE_STORAGE'; +var RECEIVE_SETTINGS_URL = 'RECEIVE_SETTINGS_URL'; +var LOG_OUT = 'LOG_OUT'; +var BUSY_DELAY = 450; // selectors + +var getStorageData = function getStorageData(state) { + return state.storageData; +}; +var getSettingsAppURL = function getSettingsAppURL(state) { + return state.settingsAppURL; +}; +var isSettingsBusy = function isSettingsBusy(state) { + return state.isBusy; +}; +var isFetchingSettings = function isFetchingSettings(state) { + return state.isFetching; +}; // actions + +var fetchStorageData = function fetchStorageData() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch) { + var storageData; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.storageData(); + + case 3: + storageData = _context.sent; + return _context.abrupt("return", dispatch({ + type: RECEIVE_STORAGE, + storageData: storageData + })); + + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](0); + // eslint-disable-next-line no-console + console.warn && console.warn('Cannot get Cozy storage informations'); + return _context.abrupt("return", null); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 7]]); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); +}; + +var fetchSettingsAppURL = function fetchSettingsAppURL() { + return /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(dispatch, getState) { + var settingsAppURL; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!getState().settings.settingsAppURL) { + _context2.next = 2; + break; + } + + return _context2.abrupt("return", dispatch({ + type: RECEIVE_SETTINGS_URL, + settingsAppURL: getState().settings.settingsAppURL + })); + + case 2: + _context2.prev = 2; + _context2.next = 5; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.settingsAppURL(); + + case 5: + settingsAppURL = _context2.sent; + return _context2.abrupt("return", dispatch({ + type: RECEIVE_SETTINGS_URL, + settingsAppURL: settingsAppURL + })); + + case 9: + _context2.prev = 9; + _context2.t0 = _context2["catch"](2); + // eslint-disable-next-line no-console + console.warn('Settings app is unavailable, settings links are disabled'); + return _context2.abrupt("return", null); + + case 13: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[2, 9]]); + })); + + return function (_x2, _x3) { + return _ref2.apply(this, arguments); + }; + }(); +}; + +var fetchSettingsData = function fetchSettingsData() { + var displayBusy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return /*#__PURE__*/function () { + var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee3(dispatch) { + var busySpinner; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + dispatch({ + type: FETCH_SETTINGS + }); // put the busy status after BUSY_DELAY secs + + busySpinner = setTimeout(function () { + // we do not display the busy status in the drawer + if (displayBusy) dispatch({ + type: FETCH_SETTINGS_BUSY + }); + }, BUSY_DELAY); + _context3.next = 4; + return dispatch(fetchStorageData()); + + case 4: + _context3.next = 6; + return dispatch(fetchSettingsAppURL()); + + case 6: + clearTimeout(busySpinner); + dispatch({ + type: FETCH_SETTINGS_SUCCESS + }); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function (_x4) { + return _ref3.apply(this, arguments); + }; + }(); +}; +var logOut = function logOut() { + return /*#__PURE__*/function () { + var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee4(dispatch) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + dispatch({ + type: LOG_OUT + }); + _context4.prev = 1; + _context4.next = 4; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].logout(); + + case 4: + _context4.next = 9; + break; + + case 6: + _context4.prev = 6; + _context4.t0 = _context4["catch"](1); + // eslint-disable-next-line no-console + console.warn('Error while logging out in the cozy-bar', _context4.t0); + + case 9: + case "end": + return _context4.stop(); + } + } + }, _callee4, null, [[1, 6]]); + })); + + return function (_x5) { + return _ref4.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + contextNotExist: false, + isFetching: false, + isBusy: false, + settingsAppURL: null, + storageData: null +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_SETTINGS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_SETTINGS_BUSY: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isBusy: true + }); + + case FETCH_SETTINGS_SUCCESS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false, + isBusy: false + }); + + case RECEIVE_NO_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + contextNotExist: true + }); + + case RECEIVE_STORAGE: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + storageData: action.storageData + }); + + case RECEIVE_SETTINGS_URL: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + settingsAppURL: action.settingsAppURL + }); + + case LOG_OUT: + return defaultState; + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); + +/***/ }), + +/***/ "oJAa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.openDeeplinkOrRedirect = void 0; + +/** + * This file is used to open the native app from a webapp + * if this native app is installed + * + * From a webapp, we don't have any clue if a native app is installed. + * The only way to know that, is to try to open the custom link + * (aka cozydrive://) and if nothing happens (no blur) we redirect to + * the callback + * + * Firefox tries to open custom link, so we need to create an iframe + * to detect if this is supported or not + */ +var _createHiddenIframe = function _createHiddenIframe(target, uri, randomId) { + var iframe = document.createElement('iframe'); + iframe.src = uri; + iframe.id = "hiddenIframe_".concat(randomId); + iframe.style.display = 'none'; + target.appendChild(iframe); + return iframe; +}; + +var openUriWithHiddenFrame = function openUriWithHiddenFrame(uri, failCb) { + var randomId = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); + window.addEventListener('blur', onBlur); + + var iframe = _createHiddenIframe(document.body, 'about:blank', randomId); + + var timeout = setTimeout(function () { + failCb(); + window.removeEventListener('blur', onBlur); + iframe.parentElement.removeChild(iframe); + }, 500); + + function onBlur() { + clearTimeout(timeout); + window.removeEventListener('blur', onBlur); + iframe.parentElement.removeChild(iframe); + } + + iframe.contentWindow.location.href = uri; +}; + +var openUriWithTimeoutHack = function openUriWithTimeoutHack(uri, failCb) { + var timeout = setTimeout(function () { + failCb(); + target.removeEventListener('blur', onBlur); + }, 500); // handle page running in an iframe (blur must be registered with top level window) + + var target = window; + + while (target != target.parent) { + target = target.parent; + } + + target.addEventListener('blur', onBlur); + + function onBlur() { + clearTimeout(timeout); + target.removeEventListener('blur', onBlur); + } // Why is an uri assigned to location object? + + + window.location = uri; +}; + +var openUriWithMsLaunchUri = function openUriWithMsLaunchUri(uri, failCb) { + navigator.msLaunchUri(uri, undefined, failCb); +}; + +var checkBrowser = function checkBrowser() { + var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; + var ua = navigator.userAgent.toLowerCase(); + var isSafari = ua.includes('safari') && !ua.includes('chrome') || Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; + var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + var isIOS122 = isIOS && (ua.includes('os 12_2') || ua.includes('os 12_3')); + return { + isOpera: isOpera, + isFirefox: typeof window.InstallTrigger !== 'undefined', + isSafari: isSafari, + isChrome: !!window.chrome && !isOpera, + isIOS122: isIOS122, + isIOS: isIOS + }; +}; +/** + * + * @param {String} deeplink (cozydrive://) + * @param {String} failCb (http://drive.cozy.ios) + */ + + +var openDeeplinkOrRedirect = function openDeeplinkOrRedirect(deeplink, failCb) { + if (navigator.msLaunchUri) { + // for IE and Edge in Win 8 and Win 10 + openUriWithMsLaunchUri(deeplink, failCb); + } else { + var browser = checkBrowser(); + + if (browser.isChrome || browser.isIOS && !browser.isIOS122) { + openUriWithTimeoutHack(deeplink, failCb); + } else if (browser.isSafari && !browser.isIOS122 || browser.isFirefox) { + openUriWithHiddenFrame(deeplink, failCb); + } else { + failCb(); + } + } +}; + +exports.openDeeplinkOrRedirect = openDeeplinkOrRedirect; + +/***/ }), + +/***/ "oJbo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + width: '100%', + overflowX: 'auto' + } +}; +var TableContainer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function TableContainer(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "component"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className) + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiTableContainer' +})(TableContainer)); + +/***/ }), + +/***/ "oKzK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createTransform; }); + + +function createTransform( +// @NOTE inbound: transform state coming from redux on its way to being serialized and stored +inbound, +// @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux +outbound) { + var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var whitelist = config.whitelist || null; + var blacklist = config.blacklist || null; + + function whitelistBlacklistCheck(key) { + if (whitelist && whitelist.indexOf(key) === -1) return true; + if (blacklist && blacklist.indexOf(key) !== -1) return true; + return false; + } + + return { + in: function _in(state, key, fullState) { + return !whitelistBlacklistCheck(key) && inbound ? inbound(state, key, fullState) : state; + }, + out: function out(state, key, fullState) { + return !whitelistBlacklistCheck(key) && outbound ? outbound(state, key, fullState) : state; + } + }; +} + +/***/ }), + +/***/ "oLNh": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec'] + var monthsFull = ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'] + var weekdays2char = ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'] + var weekdays3char = ['ned', 'pon', 'uto', 'sre', 'čet', 'pet', 'sub'] + var weekdaysFull = ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + '.' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "oPNn": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'bir saniyeden az', + other: '{{count}} saniyeden az' + }, + + xSeconds: { + one: '1 saniye', + other: '{{count}} saniye' + }, + + halfAMinute: 'yarım dakika', + + lessThanXMinutes: { + one: 'bir dakikadan az', + other: '{{count}} dakikadan az' + }, + + xMinutes: { + one: '1 dakika', + other: '{{count}} dakika' + }, + + aboutXHours: { + one: 'yaklaşık 1 saat', + other: 'yaklaşık {{count}} saat' + }, + + xHours: { + one: '1 saat', + other: '{{count}} saat' + }, + + xDays: { + one: '1 gün', + other: '{{count}} gün' + }, + + aboutXMonths: { + one: 'yaklaşık 1 ay', + other: 'yaklaşık {{count}} ay' + }, + + xMonths: { + one: '1 ay', + other: '{{count}} ay' + }, + + aboutXYears: { + one: 'yaklaşık 1 yıl', + other: 'yaklaşık {{count}} yıl' + }, + + xYears: { + one: '1 yıl', + other: '{{count}} yıl' + }, + + overXYears: { + one: '1 yıldan fazla', + other: '{{count}} yıldan fazla' + }, + + almostXYears: { + one: 'neredeyse 1 yıl', + other: 'neredeyse {{count}} yıl' + } + } + + var extraWordTokens = [ + 'lessThanXSeconds', + 'lessThanXMinutes', + 'overXYears' + ] + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + var extraWord = '' + if (extraWordTokens.indexOf(token) > -1) { + extraWord = ' bir süre' + } + + if (options.comparison > 0) { + return result + extraWord + ' içinde' + } else { + return result + extraWord + ' önce' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "oR6s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("PKog"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fWYq"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, theme.typography.button, { + boxSizing: 'border-box', + minWidth: 64, + padding: '6px 16px', + borderRadius: theme.shape.borderRadius, + color: theme.palette.text.primary, + transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], { + duration: theme.transitions.duration.short + }), + '&:hover': { + textDecoration: 'none', + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.text.primary, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + }, + '&$disabled': { + backgroundColor: 'transparent' + } + }, + '&$disabled': { + color: theme.palette.action.disabled + } + }), + + /* Styles applied to the span element that wraps the children. */ + label: { + width: '100%', + // Ensure the correct width for iOS Safari + display: 'inherit', + alignItems: 'inherit', + justifyContent: 'inherit' + }, + + /* Styles applied to the root element if `variant="text"`. */ + text: { + padding: '6px 8px' + }, + + /* Styles applied to the root element if `variant="text"` and `color="primary"`. */ + textPrimary: { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Styles applied to the root element if `variant="text"` and `color="secondary"`. */ + textSecondary: { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Styles applied to the root element if `variant="outlined"`. */ + outlined: { + padding: '5px 15px', + border: "1px solid ".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'), + '&$disabled': { + border: "1px solid ".concat(theme.palette.action.disabledBackground) + } + }, + + /* Styles applied to the root element if `variant="outlined"` and `color="primary"`. */ + outlinedPrimary: { + color: theme.palette.primary.main, + border: "1px solid ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.primary.main, 0.5)), + '&:hover': { + border: "1px solid ".concat(theme.palette.primary.main), + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + + /* Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */ + outlinedSecondary: { + color: theme.palette.secondary.main, + border: "1px solid ".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.secondary.main, 0.5)), + '&:hover': { + border: "1px solid ".concat(theme.palette.secondary.main), + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: 'transparent' + } + }, + '&$disabled': { + border: "1px solid ".concat(theme.palette.action.disabled) + } + }, + + /* Styles applied to the root element if `variant="contained"`. */ + contained: { + color: theme.palette.getContrastText(theme.palette.grey[300]), + backgroundColor: theme.palette.grey[300], + boxShadow: theme.shadows[2], + '&:hover': { + backgroundColor: theme.palette.grey.A100, + boxShadow: theme.shadows[4], + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + boxShadow: theme.shadows[2], + backgroundColor: theme.palette.grey[300] + }, + '&$disabled': { + backgroundColor: theme.palette.action.disabledBackground + } + }, + '&$focusVisible': { + boxShadow: theme.shadows[6] + }, + '&:active': { + boxShadow: theme.shadows[8] + }, + '&$disabled': { + color: theme.palette.action.disabled, + boxShadow: theme.shadows[0], + backgroundColor: theme.palette.action.disabledBackground + } + }, + + /* Styles applied to the root element if `variant="contained"` and `color="primary"`. */ + containedPrimary: { + color: theme.palette.primary.contrastText, + backgroundColor: theme.palette.primary.main, + '&:hover': { + backgroundColor: theme.palette.primary.dark, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: theme.palette.primary.main + } + } + }, + + /* Styles applied to the root element if `variant="contained"` and `color="secondary"`. */ + containedSecondary: { + color: theme.palette.secondary.contrastText, + backgroundColor: theme.palette.secondary.main, + '&:hover': { + backgroundColor: theme.palette.secondary.dark, + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: theme.palette.secondary.main + } + } + }, + + /* Styles applied to the root element if `disableElevation={true}`. */ + disableElevation: { + boxShadow: 'none', + '&:hover': { + boxShadow: 'none' + }, + '&$focusVisible': { + boxShadow: 'none' + }, + '&:active': { + boxShadow: 'none' + }, + '&$disabled': { + boxShadow: 'none' + } + }, + + /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */ + focusVisible: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `color="inherit"`. */ + colorInherit: { + color: 'inherit', + borderColor: 'currentColor' + }, + + /* Styles applied to the root element if `size="small"` and `variant="text"`. */ + textSizeSmall: { + padding: '4px 5px', + fontSize: theme.typography.pxToRem(13) + }, + + /* Styles applied to the root element if `size="large"` and `variant="text"`. */ + textSizeLarge: { + padding: '8px 11px', + fontSize: theme.typography.pxToRem(15) + }, + + /* Styles applied to the root element if `size="small"` and `variant="outlined"`. */ + outlinedSizeSmall: { + padding: '3px 9px', + fontSize: theme.typography.pxToRem(13) + }, + + /* Styles applied to the root element if `size="large"` and `variant="outlined"`. */ + outlinedSizeLarge: { + padding: '7px 21px', + fontSize: theme.typography.pxToRem(15) + }, + + /* Styles applied to the root element if `size="small"` and `variant="contained"`. */ + containedSizeSmall: { + padding: '4px 10px', + fontSize: theme.typography.pxToRem(13) + }, + + /* Styles applied to the root element if `size="large"` and `variant="contained"`. */ + containedSizeLarge: { + padding: '8px 22px', + fontSize: theme.typography.pxToRem(15) + }, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: {}, + + /* Styles applied to the root element if `size="large"`. */ + sizeLarge: {}, + + /* Styles applied to the root element if `fullWidth={true}`. */ + fullWidth: { + width: '100%' + }, + + /* Styles applied to the startIcon element if supplied. */ + startIcon: { + display: 'inherit', + marginRight: 8, + marginLeft: -4, + '&$iconSizeSmall': { + marginLeft: -2 + } + }, + + /* Styles applied to the endIcon element if supplied. */ + endIcon: { + display: 'inherit', + marginRight: -4, + marginLeft: 8, + '&$iconSizeSmall': { + marginRight: -2 + } + }, + + /* Styles applied to the icon element if supplied and `size="small"`. */ + iconSizeSmall: { + '& > *:first-child': { + fontSize: 18 + } + }, + + /* Styles applied to the icon element if supplied and `size="medium"`. */ + iconSizeMedium: { + '& > *:first-child': { + fontSize: 20 + } + }, + + /* Styles applied to the icon element if supplied and `size="large"`. */ + iconSizeLarge: { + '& > *:first-child': { + fontSize: 22 + } + } + }; +}; +var Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Button(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'default' : _props$color, + _props$component = props.component, + component = _props$component === void 0 ? 'button' : _props$component, + _props$disabled = props.disabled, + disabled = _props$disabled === void 0 ? false : _props$disabled, + _props$disableElevati = props.disableElevation, + disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati, + _props$disableFocusRi = props.disableFocusRipple, + disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi, + endIconProp = props.endIcon, + focusVisibleClassName = props.focusVisibleClassName, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + startIconProp = props.startIcon, + _props$type = props.type, + type = _props$type === void 0 ? 'button' : _props$type, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'text' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["children", "classes", "className", "color", "component", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"]); + + var startIcon = startIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.startIcon, classes["iconSize".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]) + }, startIconProp); + var endIcon = endIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.endIcon, classes["iconSize".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]) + }, endIconProp); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes["".concat(variant).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(color))], size !== 'medium' && [classes["".concat(variant, "Size").concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))], classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth), + component: component, + disabled: disabled, + focusRipple: !disableFocusRipple, + focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.focusVisible, focusVisibleClassName), + ref: ref, + type: type + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.label + }, startIcon, children, endIcon)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiButton' +})(Button)); + +/***/ }), + +/***/ "oVe4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/gear.svg` to regenerate; + +function SvgGear(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M14.25 7.078c.051.26.077.568.077.926 0 .358-.026.665-.078.925l1.62 1.333c.131.086.163.203.099.352-.325.95-.859 1.826-1.602 2.628-.104.124-.229.155-.37.094l-2.032-.668c-.52.396-1.08.705-1.68.926l-.409 2c-.026.146-.117.233-.273.258-.56.1-1.094.148-1.602.148a9.21 9.21 0 01-1.601-.148c-.157-.024-.248-.11-.274-.259l-.409-1.999a5.98 5.98 0 01-1.68-.926l-2.03.668c-.145.062-.268.03-.372-.094C.892 12.44.359 11.565.032 10.614c-.065-.148-.032-.266.098-.352L1.751 8.93a4.761 4.761 0 01-.078-.925c0-.358.026-.667.078-.926L.131 5.746C0 5.66-.034 5.542.031 5.394c.326-.95.86-1.826 1.602-2.627.104-.123.228-.154.371-.093l2.031.667a5.99 5.99 0 011.68-.926l.41-1.999c.025-.148.116-.234.273-.259a8.221 8.221 0 013.202 0c.156.024.247.111.273.26l.41 1.998c.6.223 1.159.53 1.68.926l2.03-.667c.143-.062.267-.03.371.093.742.802 1.276 1.678 1.602 2.627.064.148.032.266-.098.352l-1.62 1.332zM8 4.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7z", + fillRule: "evenodd" + })); +} +var _default = SvgGear; +exports.default = _default; + +/***/ }), + +/***/ "oapZ": +/***/ (function(module, exports, __webpack_require__) { + +var differenceInMilliseconds = __webpack_require__("kzOt") + +/** + * @category Second Helpers + * @summary Get the number of seconds between the given dates. + * + * @description + * Get the number of seconds between the given dates. + * + * @param {Date|String|Number} dateLeft - the later date + * @param {Date|String|Number} dateRight - the earlier date + * @returns {Number} the number of seconds + * + * @example + * // How many seconds are between + * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? + * var result = differenceInSeconds( + * new Date(2014, 6, 2, 12, 30, 20, 0), + * new Date(2014, 6, 2, 12, 30, 7, 999) + * ) + * //=> 12 + */ +function differenceInSeconds (dirtyDateLeft, dirtyDateRight) { + var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000 + return diff > 0 ? Math.floor(diff) : Math.ceil(diff) +} + +module.exports = differenceInSeconds + + +/***/ }), + +/***/ "oc9d": +/***/ (function(module, exports, __webpack_require__) { + +var baseKeys = __webpack_require__("qzN0"), + getTag = __webpack_require__("FqJm"), + isArguments = __webpack_require__("6ZUk"), + isArray = __webpack_require__("8u9v"), + isArrayLike = __webpack_require__("yTJ1"), + isBuffer = __webpack_require__("cjAe"), + isPrototype = __webpack_require__("R+nh"), + isTypedArray = __webpack_require__("HvXq"); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; + + +/***/ }), + +/***/ "ocZI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getIcon; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); + + +var cache = {}; +var mimeTypes = { + gif: 'image/gif', + ico: 'image/vnd.microsoft.icon', + jpeg: 'image/jpeg', + jpg: 'image/jpeg', + png: 'image/png', + svg: 'image/svg+xml' +}; +/** + * Get an icon URL usable in the HTML page from it's stack path + * + * @function + * @private + * @param {function} iconFetcher - takes an icon path on the stack + * and returns a fetch response with the icon + * @param {object} app - app object with a `links.icon` attribute + * @param {boolean} useCache + * @returns {Promise} url string of an icon usable in the HTML page + * may be empty if the `app` object didn't have an icon path + */ + +function getIcon(_x) { + return _getIcon.apply(this, arguments); +} + +function _getIcon() { + _getIcon = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(iconFetcher) { + var app, + useCache, + url, + icon, + resp, + extension, + iconURL, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + app = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + useCache = _args.length > 2 && _args[2] !== undefined ? _args[2] : true; + + if (!(useCache && cache.icons && cache.icons[url])) { + _context.next = 4; + break; + } + + return _context.abrupt("return", cache.icons[url]); + + case 4: + url = app.links && app.links.icon; + + if (url) { + _context.next = 7; + break; + } + + return _context.abrupt("return", ''); + + case 7: + _context.prev = 7; + _context.next = 10; + return iconFetcher(url); + + case 10: + resp = _context.sent; + + if (resp.ok) { + _context.next = 13; + break; + } + + throw new Error("Error while fetching icon ".concat(resp.statusText, ": ").concat(url)); + + case 13: + _context.next = 15; + return resp.blob(); + + case 15: + icon = _context.sent; + _context.next = 21; + break; + + case 18: + _context.prev = 18; + _context.t0 = _context["catch"](7); + throw _context.t0; + + case 21: + if (icon.type) { + _context.next = 30; + break; + } + + if (app.icon) { + _context.next = 24; + break; + } + + throw new Error("".concat(app.name, ": Cannot detect mime type for icon ").concat(url)); + + case 24: + extension = app.icon.split('.').pop(); + + if (extension) { + _context.next = 27; + break; + } + + throw new Error("".concat(app.name, ": Unable to detect icon mime type from extension (").concat(app.icon, ")")); + + case 27: + if (mimeTypes[extension]) { + _context.next = 29; + break; + } + + throw new Error("".concat(app.name, ": 'Unexpected icon extension (").concat(app.icon, ")")); + + case 29: + icon = new Blob([icon], { + type: mimeTypes[extension] + }); + + case 30: + if (!icon.type.match(/^image\/.*$/)) { + _context.next = 34; + break; + } + + iconURL = URL.createObjectURL(icon); + + if (useCache) { + cache.icons = cache.icons || {}; + cache.icons[url] = iconURL; + } + + return _context.abrupt("return", iconURL); + + case 34: + throw new Error("".concat(app.name, ": icon ").concat(url, " is not an image.")); + + case 35: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[7, 18]]); + })); + return _getIcon.apply(this, arguments); +} + +/***/ }), + +/***/ "oeo/": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _microee = _interopRequireDefault(__webpack_require__("GIvT")); + +var _logger = _interopRequireDefault(__webpack_require__("o2qs")); + +var _config = __webpack_require__("+RmU"); + +/** + * This class creates an helper for processes that need + * a retry mechanism with some wait between failed attempts. + */ +var RetryManager = /*#__PURE__*/function () { + /** + * @constructor + * @param {object} options + * @param {number} maxWaitBetweenRetries - will never wait more than this time (in ms) between attempts + * @param {number} baseWaitAfterFirstFailure - how much time in ms should we wait after the first failure? + * @param {number} timeBeforeSuccessful - how much time should we wait without error to acknowledge a success? + * @param {number} raiseErrorAfterAttempts - after how many failed attempts should we raise an error? + */ + function RetryManager() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$maxWaitBetweenRe = _ref.maxWaitBetweenRetries, + maxWaitBetweenRetries = _ref$maxWaitBetweenRe === void 0 ? _config.maxWaitBetweenRetries : _ref$maxWaitBetweenRe, + _ref$baseWaitAfterFir = _ref.baseWaitAfterFirstFailure, + baseWaitAfterFirstFailure = _ref$baseWaitAfterFir === void 0 ? _config.baseWaitAfterFirstFailure : _ref$baseWaitAfterFir, + _ref$timeBeforeSucces = _ref.timeBeforeSuccessful, + timeBeforeSuccessful = _ref$timeBeforeSucces === void 0 ? _config.timeBeforeSuccessful : _ref$timeBeforeSucces, + _ref$raiseErrorAfterA = _ref.raiseErrorAfterAttempts, + raiseErrorAfterAttempts = _ref$raiseErrorAfterA === void 0 ? _config.raiseErrorAfterAttempts : _ref$raiseErrorAfterA; + + (0, _classCallCheck2.default)(this, RetryManager); + this.reset(); + this.onSuccess = this.onSuccess.bind(this); + this.onFailure = this.onFailure.bind(this); + this.onSuccessAcknowledged = this.onSuccessAcknowledged.bind(this); + this.raiseErrorAfterAttempts = raiseErrorAfterAttempts; + this.timeBeforeSuccessful = timeBeforeSuccessful; + this.baseWaitAfterFirstFailure = baseWaitAfterFirstFailure; + this.maxWaitBetweenRetries = maxWaitBetweenRetries; + } + /** + * On a success + * + * If `this.timeBeforeSuccessful` if not null, it will wait this amount of + * time without errors before acknowleding a success + */ + + + (0, _createClass2.default)(RetryManager, [{ + key: "onSuccess", + value: function onSuccess() { + if (this.timeBeforeSuccessful > 0) { + this.startSuccessTimer(this.onSuccessAcknowledged, this.timeBeforeSuccessful); + } else { + this.onSuccessAcknowledged(); + } + } + /** + * Acknowledge a success + * + * @private + */ + + }, { + key: "onSuccessAcknowledged", + value: function onSuccessAcknowledged() { + this.emit('success'); + this.reset(); + } + /** + * Clears the success timer + * + * @private + */ + + }, { + key: "clearSuccessTimer", + value: function clearSuccessTimer() { + if (this.successTimer) { + global.clearTimeout(this.successTimer); + this.successTimer = null; + } + } + /** + * Starts the success timer + * + * We don't want to consider a success immediatly when the connection is opened. + * We wait a short amount of time to see if some error raises, and only acknowledge + * a success if no error raises in this timeframe. + * The success timer is the function that start this timer. + * + * @private + * @param {function} ack - will be called after the wait time + * @param {number} time - waiting time + */ + + }, { + key: "startSuccessTimer", + value: function startSuccessTimer(ack, time) { + var _this = this; + + if (!this.successTimer) { + var callback = function callback() { + _this.successTimer = null; + ack(); + }; + + this.successTimer = global.setTimeout(callback, time); + } + } + /** + * On failure + * + * If we where waiting for a success timeout, it will cancel the wait. + * + * An application error (failed authentication, failed subscription) will + * not trigger a failure (trying to reconnect with the same parameters + * has no meaning anyways). + * + * @param {object} error + */ + + }, { + key: "onFailure", + value: function onFailure(error) { + _logger.default.debug('failure, increase the failure counter of the retry manager'); + + this.clearSuccessTimer(); + this.increaseFailureCounter(); + this.emit('failure', error); + if (this.shouldEmitError()) this.emit('error', error); + } + /** + * Returns if we reached a level where we need to emit an error + * + * @returns {boolean} + */ + + }, { + key: "shouldEmitError", + value: function shouldEmitError() { + return this.retries > 0 && this.retries % this.raiseErrorAfterAttempts == 0; + } + /** + * Reset failures counters (do not wait before trying to connect next time) + */ + + }, { + key: "reset", + value: function reset() { + _logger.default.debug('reset the retry manager'); + + this.clearSuccessTimer(); + this.retries = 0; + this.wait = 0; + } + /** + * Increases the failure counter (wait more before next attempt) + * + * @private + */ + + }, { + key: "increaseFailureCounter", + value: function increaseFailureCounter() { + if (this.retries === 0) { + // first reconnect should be immediate + this.wait = 0; + } else if (this.wait === 0) { + // base value + this.wait = this.baseWaitAfterFirstFailure; + } else { + this.wait = Math.min(this.wait * 2, this.maxWaitBetweenRetries); + } + + this.retries = this.retries + 1; + } + /** + * Wait an amount of time before the next attempt (if needed) + */ + + }, { + key: "waitBeforeNextAttempt", + value: function () { + var _waitBeforeNextAttempt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var _this2 = this; + + var stop, promise; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _logger.default.debug('waitBeforeNextAttempt', this.wait); + + if (!this.wait) { + _context.next = 5; + break; + } + + if (!this.waiting) { + promise = new Promise(function (resolve) { + stop = function stop() { + // only remove the waiting status if it's still + // the current promise that is waiting and not a new one + if (_this2.waiting === promise) _this2.waiting = null; + resolve(); + }; + + global.setTimeout(stop, _this2.wait); + }); + promise.stop = stop; + this.waiting = promise; + } + + _context.next = 5; + return this.waiting; + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function waitBeforeNextAttempt() { + return _waitBeforeNextAttempt.apply(this, arguments); + } + + return waitBeforeNextAttempt; + }() + /** + * If an attempt is waiting, stop the wait and retry now + * @see waitBeforeNextAttempt() + */ + + }, { + key: "stopCurrentAttemptWaitingTime", + value: function stopCurrentAttemptWaitingTime() { + if (this.waiting) this.waiting.stop(); + } + }]); + return RetryManager; +}(); + +_microee.default.mixin(RetryManager); + +var _default = RetryManager; +exports.default = _default; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "olFG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "impureFinalPropsSelectorFactory", function() { return impureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pureFinalPropsSelectorFactory", function() { return pureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return finalPropsSelectorFactory; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); +/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("eOBx"); + +var _excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]; + +function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + }; +} +function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + }; +} // TODO: Add more comments +// If pure is true, the selector returned by selectorFactory will memoize its results, +// allowing connectAdvanced's shouldComponentUpdate to return false if final +// props have not changed. If false, the selector will always return a new +// object and shouldComponentUpdate will always return true. + +function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, _excluded); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (false) {} + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); +} + +/***/ }), + +/***/ "oldg": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeFetchTransport", function() { return makeFetchTransport; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Qq+Z"); + + + + +/** + * Creates a Transport that uses the Fetch API to send events to Sentry. + */ +function makeFetchTransport( + options, + nativeFetch = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["getNativeFetchImplementation"])(), +) { + function makeRequest(request) { + const requestOptions = { + body: request.body, + method: 'POST', + referrerPolicy: 'origin', + headers: options.headers, + // Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to + // fetch" error and sending a "network_error" client-outcome - in Chrome, the request status shows "(cancelled)". + // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're + // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions). + // Gotchas: + // - `keepalive` isn't supported by Firefox + // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch), a request with `keepalive: true` + // and a content length of > 64 kibibytes returns a network error. We will therefore only activate the flag when + // we're below that limit. + keepalive: request.body.length <= 65536, + ...options.fetchOptions, + }; + + try { + return nativeFetch(options.url, requestOptions).then(response => ({ + statusCode: response.status, + headers: { + 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'), + 'retry-after': response.headers.get('Retry-After'), + }, + })); + } catch (e) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["clearCachedFetchImplementation"])(); + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["rejectedSyncPromise"])(e); + } + } + + return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["createTransport"])(options, makeRequest); +} + + +//# sourceMappingURL=fetch.js.map + + +/***/ }), + +/***/ "omwZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GRDF_MONTH_DOCTYPE = void 0; +var GRDF_MONTH_DOCTYPE = 'com.grandlyon.grdf.month'; +exports.GRDF_MONTH_DOCTYPE = GRDF_MONTH_DOCTYPE; + +/***/ }), + +/***/ "ooY9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Tabs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("AW5y"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Tabs__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "oucL": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var useFetchShortcut = function useFetchShortcut(client, id) { + var _useState = (0, _react.useState)(null), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + shortcutInfos = _useState2[0], + setShortcutInfos = _useState2[1]; + + var _useState3 = (0, _react.useState)(null), + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), + shortcutImg = _useState4[0], + setShortcutImg = _useState4[1]; + + var _useState5 = (0, _react.useState)('idle'), + _useState6 = (0, _slicedToArray2.default)(_useState5, 2), + fetchStatus = _useState6[0], + setFetchStatus = _useState6[1]; + + (0, _react.useEffect)(function () { + var fetchData = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var shortcutInfosResult, shortcutRemoteUrl, imgUrl; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + setFetchStatus('loading'); + _context.prev = 1; + _context.next = 4; + return client.getStackClient().fetchJSON('GET', "/shortcuts/".concat(id)); + + case 4: + shortcutInfosResult = _context.sent; + shortcutRemoteUrl = new URL(shortcutInfosResult.data.attributes.url); + imgUrl = "".concat(client.getStackClient().uri, "/bitwarden/icons/").concat(shortcutRemoteUrl.host, "/icon.png"); + setShortcutImg(imgUrl); + setShortcutInfos(shortcutInfosResult); + setFetchStatus('loaded'); + _context.next = 15; + break; + + case 12: + _context.prev = 12; + _context.t0 = _context["catch"](1); + setFetchStatus('failed'); + + case 15: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 12]]); + })); + + return function fetchData() { + return _ref.apply(this, arguments); + }; + }(); + + fetchData(); + }, [client, id]); + return { + shortcutInfos: shortcutInfos, + shortcutImg: shortcutImg, + fetchStatus: fetchStatus + }; +}; + +var _default = useFetchShortcut; +exports.default = _default; + +/***/ }), + +/***/ "oxKo": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.5 Number.isSafeInteger(number) +var $export = __webpack_require__("LRPZ"); +var isInteger = __webpack_require__("9d30"); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + + +/***/ }), + +/***/ "p0HI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z" +}), 'CheckCircle')); + +/***/ }), + +/***/ "p299": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.14 Math.expm1(x) +var $export = __webpack_require__("LRPZ"); +var $expm1 = __webpack_require__("2uU8"); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + + +/***/ }), + +/***/ "p3SN": +/***/ (function(module, exports, __webpack_require__) { + +var baseSetToString = __webpack_require__("5Mkc"), + shortOut = __webpack_require__("LahF"); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; + + +/***/ }), + +/***/ "p6cL": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") + +/** + * @category Common Helpers + * @summary Compare the two dates and return -1, 0 or 1. + * + * @description + * Compare the two dates and return 1 if the first date is after the second, + * -1 if the first date is before the second or 0 if dates are equal. + * + * @param {Date|String|Number} dateLeft - the first date to compare + * @param {Date|String|Number} dateRight - the second date to compare + * @returns {Number} the result of the comparison + * + * @example + * // Compare 11 February 1987 and 10 July 1989: + * var result = compareAsc( + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ) + * //=> -1 + * + * @example + * // Sort the array of dates: + * var result = [ + * new Date(1995, 6, 2), + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ].sort(compareAsc) + * //=> [ + * // Wed Feb 11 1987 00:00:00, + * // Mon Jul 10 1989 00:00:00, + * // Sun Jul 02 1995 00:00:00 + * // ] + */ +function compareAsc (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var timeLeft = dateLeft.getTime() + var dateRight = parse(dirtyDateRight) + var timeRight = dateRight.getTime() + + if (timeLeft < timeRight) { + return -1 + } else if (timeLeft > timeRight) { + return 1 + } else { + return 0 + } +} + +module.exports = compareAsc + + +/***/ }), + +/***/ "pBCG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +/** + * @ignore - internal component. + */ + +var RadioGroupContext = react__WEBPACK_IMPORTED_MODULE_0__["createContext"](); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (RadioGroupContext); + +/***/ }), + +/***/ "pBYl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("L3Ye"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Slide__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "pFWb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("VHzf"); +/* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("miOE"); + + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + padding: 24 + }, + + /* Styles applied to the root element if `orientation="horizontal"`. */ + horizontal: { + flexDirection: 'row', + alignItems: 'center' + }, + + /* Styles applied to the root element if `orientation="vertical"`. */ + vertical: { + flexDirection: 'column' + }, + + /* Styles applied to the root element if `alternativeLabel={true}`. */ + alternativeLabel: { + alignItems: 'flex-start' + } +}; +var defaultConnector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_StepConnector__WEBPACK_IMPORTED_MODULE_7__["default"], null); +var Stepper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Stepper(props, ref) { + var _props$activeStep = props.activeStep, + activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep, + _props$alternativeLab = props.alternativeLabel, + alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab, + children = props.children, + classes = props.classes, + className = props.className, + _props$connector = props.connector, + connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector, + _props$nonLinear = props.nonLinear, + nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["activeStep", "alternativeLabel", "children", "classes", "className", "connector", "nonLinear", "orientation"]); + + var connector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](connectorProp) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](connectorProp, { + orientation: orientation + }) : null; + var childrenArray = react__WEBPACK_IMPORTED_MODULE_2__["Children"].toArray(children); + var steps = childrenArray.map(function (step, index) { + var state = { + index: index, + active: false, + completed: false, + disabled: false + }; + + if (activeStep === index) { + state.active = true; + } else if (!nonLinear && activeStep > index) { + state.completed = true; + } else if (!nonLinear && activeStep < index) { + state.disabled = true; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](step, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + alternativeLabel: alternativeLabel, + connector: connector, + last: index + 1 === childrenArray.length, + orientation: orientation + }, state, step.props)); + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + square: true, + elevation: 0, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel), + ref: ref + }, other), steps); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiStepper' +})(Stepper)); + +/***/ }), + +/***/ "pFjr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// (c) 2012-2018 Airbnb, Inc. +// +// polyglot.js may be freely distributed under the terms of the BSD +// license. For all licensing information, details, and documentation: +// http://airbnb.github.com/polyglot.js +// +// +// Polyglot.js is an I18n helper library written in JavaScript, made to +// work both in the browser and in Node. It provides a simple solution for +// interpolation and pluralization, based off of Airbnb's +// experience adding I18n functionality to its Backbone.js and Node apps. +// +// Polylglot is agnostic to your translation backend. It doesn't perform any +// translation; it simply gives you a way to manage translated phrases from +// your client- or server-side JavaScript application. +// + + + +var forEach = __webpack_require__("OYXJ"); +var entries = __webpack_require__("08Tt"); +var warning = __webpack_require__("SaR9"); +var has = __webpack_require__("H8OS"); +var trim = __webpack_require__("tlEq"); + +var warn = function warn(message) { + warning(false, message); +}; + +var replace = String.prototype.replace; +var split = String.prototype.split; + +// #### Pluralization methods +// The string that separates the different phrase possibilities. +var delimiter = '||||'; + +var russianPluralGroups = function (n) { + var lastTwo = n % 100; + var end = lastTwo % 10; + if (lastTwo !== 11 && end === 1) { + return 0; + } + if (2 <= end && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) { + return 1; + } + return 2; +}; + +var defaultPluralRules = { + // Mapping from pluralization group plural logic. + pluralTypes: { + arabic: function (n) { + // http://www.arabeyes.org/Plural_Forms + if (n < 3) { return n; } + var lastTwo = n % 100; + if (lastTwo >= 3 && lastTwo <= 10) return 3; + return lastTwo >= 11 ? 4 : 5; + }, + bosnian_serbian: russianPluralGroups, + chinese: function () { return 0; }, + croatian: russianPluralGroups, + french: function (n) { return n >= 2 ? 1 : 0; }, + german: function (n) { return n !== 1 ? 1 : 0; }, + russian: russianPluralGroups, + lithuanian: function (n) { + if (n % 10 === 1 && n % 100 !== 11) { return 0; } + return n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19) ? 1 : 2; + }, + czech: function (n) { + if (n === 1) { return 0; } + return (n >= 2 && n <= 4) ? 1 : 2; + }, + polish: function (n) { + if (n === 1) { return 0; } + var end = n % 10; + return 2 <= end && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; + }, + icelandic: function (n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; }, + slovenian: function (n) { + var lastTwo = n % 100; + if (lastTwo === 1) { + return 0; + } + if (lastTwo === 2) { + return 1; + } + if (lastTwo === 3 || lastTwo === 4) { + return 2; + } + return 3; + } + }, + + // Mapping from pluralization group to individual language codes/locales. + // Will look up based on exact match, if not found and it's a locale will parse the locale + // for language code, and if that does not exist will default to 'en' + pluralTypeToLanguages: { + arabic: ['ar'], + bosnian_serbian: ['bs-Latn-BA', 'bs-Cyrl-BA', 'srl-RS', 'sr-RS'], + chinese: ['id', 'id-ID', 'ja', 'ko', 'ko-KR', 'lo', 'ms', 'th', 'th-TH', 'zh'], + croatian: ['hr', 'hr-HR'], + german: ['fa', 'da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hi-IN', 'hu', 'hu-HU', 'it', 'nl', 'no', 'pt', 'sv', 'tr'], + french: ['fr', 'tl', 'pt-br'], + russian: ['ru', 'ru-RU'], + lithuanian: ['lt'], + czech: ['cs', 'cs-CZ', 'sk'], + polish: ['pl'], + icelandic: ['is'], + slovenian: ['sl-SL'] + } +}; + +function langToTypeMap(mapping) { + var ret = {}; + forEach(entries(mapping), function (entry) { + var type = entry[0]; + var langs = entry[1]; + forEach(langs, function (lang) { + ret[lang] = type; + }); + }); + return ret; +} + +function pluralTypeName(pluralRules, locale) { + var langToPluralType = langToTypeMap(pluralRules.pluralTypeToLanguages); + return langToPluralType[locale] + || langToPluralType[split.call(locale, /-/, 1)[0]] + || langToPluralType.en; +} + +function pluralTypeIndex(pluralRules, pluralType, count) { + return pluralRules.pluralTypes[pluralType](count); +} + +function createMemoizedPluralTypeNameSelector() { + var localePluralTypeStorage = {}; + + return function (pluralRules, locale) { + var pluralType = localePluralTypeStorage[locale]; + + if (pluralType && !pluralRules.pluralTypes[pluralType]) { + pluralType = null; + localePluralTypeStorage[locale] = pluralType; + } + + if (!pluralType) { + pluralType = pluralTypeName(pluralRules, locale); + + if (pluralType) { + localePluralTypeStorage[locale] = pluralType; + } + } + + return pluralType; + }; +} + +function escape(token) { + return token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +function constructTokenRegex(opts) { + var prefix = (opts && opts.prefix) || '%{'; + var suffix = (opts && opts.suffix) || '}'; + + if (prefix === delimiter || suffix === delimiter) { + throw new RangeError('"' + delimiter + '" token is reserved for pluralization'); + } + + return new RegExp(escape(prefix) + '(.*?)' + escape(suffix), 'g'); +} + +var memoizedPluralTypeName = createMemoizedPluralTypeNameSelector(); + +var defaultTokenRegex = /%\{(.*?)\}/g; + +// ### transformPhrase(phrase, substitutions, locale) +// +// Takes a phrase string and transforms it by choosing the correct +// plural form and interpolating it. +// +// transformPhrase('Hello, %{name}!', {name: 'Spike'}); +// // "Hello, Spike!" +// +// The correct plural form is selected if substitutions.smart_count +// is set. You can pass in a number instead of an Object as `substitutions` +// as a shortcut for `smart_count`. +// +// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 1}, 'en'); +// // "1 new message" +// +// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 2}, 'en'); +// // "2 new messages" +// +// transformPhrase('%{smart_count} new messages |||| 1 new message', 5, 'en'); +// // "5 new messages" +// +// You should pass in a third argument, the locale, to specify the correct plural type. +// It defaults to `'en'` with 2 plural forms. +function transformPhrase(phrase, substitutions, locale, tokenRegex, pluralRules) { + if (typeof phrase !== 'string') { + throw new TypeError('Polyglot.transformPhrase expects argument #1 to be string'); + } + + if (substitutions == null) { + return phrase; + } + + var result = phrase; + var interpolationRegex = tokenRegex || defaultTokenRegex; + + // allow number as a pluralization shortcut + var options = typeof substitutions === 'number' ? { smart_count: substitutions } : substitutions; + + // Select plural form: based on a phrase text that contains `n` + // plural forms separated by `delimiter`, a `locale`, and a `substitutions.smart_count`, + // choose the correct plural form. This is only done if `count` is set. + if (options.smart_count != null && phrase) { + var pluralRulesOrDefault = pluralRules || defaultPluralRules; + var texts = split.call(phrase, delimiter); + var bestLocale = locale || 'en'; + var pluralType = memoizedPluralTypeName(pluralRulesOrDefault, bestLocale); + var pluralTypeWithCount = pluralTypeIndex( + pluralRulesOrDefault, + pluralType, + options.smart_count + ); + + result = trim(texts[pluralTypeWithCount] || texts[0]); + } + + // Interpolate: Creates a `RegExp` object for each interpolation placeholder. + result = replace.call(result, interpolationRegex, function (expression, argument) { + if (!has(options, argument) || options[argument] == null) { return expression; } + return options[argument]; + }); + + return result; +} + +// ### Polyglot class constructor +function Polyglot(options) { + var opts = options || {}; + this.phrases = {}; + this.extend(opts.phrases || {}); + this.currentLocale = opts.locale || 'en'; + var allowMissing = opts.allowMissing ? transformPhrase : null; + this.onMissingKey = typeof opts.onMissingKey === 'function' ? opts.onMissingKey : allowMissing; + this.warn = opts.warn || warn; + this.tokenRegex = constructTokenRegex(opts.interpolation); + this.pluralRules = opts.pluralRules || defaultPluralRules; +} + +// ### polyglot.locale([locale]) +// +// Get or set locale. Internally, Polyglot only uses locale for pluralization. +Polyglot.prototype.locale = function (newLocale) { + if (newLocale) this.currentLocale = newLocale; + return this.currentLocale; +}; + +// ### polyglot.extend(phrases) +// +// Use `extend` to tell Polyglot how to translate a given key. +// +// polyglot.extend({ +// "hello": "Hello", +// "hello_name": "Hello, %{name}" +// }); +// +// The key can be any string. Feel free to call `extend` multiple times; +// it will override any phrases with the same key, but leave existing phrases +// untouched. +// +// It is also possible to pass nested phrase objects, which get flattened +// into an object with the nested keys concatenated using dot notation. +// +// polyglot.extend({ +// "nav": { +// "hello": "Hello", +// "hello_name": "Hello, %{name}", +// "sidebar": { +// "welcome": "Welcome" +// } +// } +// }); +// +// console.log(polyglot.phrases); +// // { +// // 'nav.hello': 'Hello', +// // 'nav.hello_name': 'Hello, %{name}', +// // 'nav.sidebar.welcome': 'Welcome' +// // } +// +// `extend` accepts an optional second argument, `prefix`, which can be used +// to prefix every key in the phrases object with some string, using dot +// notation. +// +// polyglot.extend({ +// "hello": "Hello", +// "hello_name": "Hello, %{name}" +// }, "nav"); +// +// console.log(polyglot.phrases); +// // { +// // 'nav.hello': 'Hello', +// // 'nav.hello_name': 'Hello, %{name}' +// // } +// +// This feature is used internally to support nested phrase objects. +Polyglot.prototype.extend = function (morePhrases, prefix) { + forEach(entries(morePhrases || {}), function (entry) { + var key = entry[0]; + var phrase = entry[1]; + var prefixedKey = prefix ? prefix + '.' + key : key; + if (typeof phrase === 'object') { + this.extend(phrase, prefixedKey); + } else { + this.phrases[prefixedKey] = phrase; + } + }, this); +}; + +// ### polyglot.unset(phrases) +// Use `unset` to selectively remove keys from a polyglot instance. +// +// polyglot.unset("some_key"); +// polyglot.unset({ +// "hello": "Hello", +// "hello_name": "Hello, %{name}" +// }); +// +// The unset method can take either a string (for the key), or an object hash with +// the keys that you would like to unset. +Polyglot.prototype.unset = function (morePhrases, prefix) { + if (typeof morePhrases === 'string') { + delete this.phrases[morePhrases]; + } else { + forEach(entries(morePhrases || {}), function (entry) { + var key = entry[0]; + var phrase = entry[1]; + var prefixedKey = prefix ? prefix + '.' + key : key; + if (typeof phrase === 'object') { + this.unset(phrase, prefixedKey); + } else { + delete this.phrases[prefixedKey]; + } + }, this); + } +}; + +// ### polyglot.clear() +// +// Clears all phrases. Useful for special cases, such as freeing +// up memory if you have lots of phrases but no longer need to +// perform any translation. Also used internally by `replace`. +Polyglot.prototype.clear = function () { + this.phrases = {}; +}; + +// ### polyglot.replace(phrases) +// +// Completely replace the existing phrases with a new set of phrases. +// Normally, just use `extend` to add more phrases, but under certain +// circumstances, you may want to make sure no old phrases are lying around. +Polyglot.prototype.replace = function (newPhrases) { + this.clear(); + this.extend(newPhrases); +}; + +// ### polyglot.t(key, options) +// +// The most-used method. Provide a key, and `t` will return the +// phrase. +// +// polyglot.t("hello"); +// => "Hello" +// +// The phrase value is provided first by a call to `polyglot.extend()` or +// `polyglot.replace()`. +// +// Pass in an object as the second argument to perform interpolation. +// +// polyglot.t("hello_name", {name: "Spike"}); +// => "Hello, Spike" +// +// If you like, you can provide a default value in case the phrase is missing. +// Use the special option key "_" to specify a default. +// +// polyglot.t("i_like_to_write_in_language", { +// _: "I like to write in %{language}.", +// language: "JavaScript" +// }); +// => "I like to write in JavaScript." +// +Polyglot.prototype.t = function (key, options) { + var phrase, result; + var opts = options == null ? {} : options; + if (typeof this.phrases[key] === 'string') { + phrase = this.phrases[key]; + } else if (typeof opts._ === 'string') { + phrase = opts._; + } else if (this.onMissingKey) { + var onMissingKey = this.onMissingKey; + result = onMissingKey(key, opts, this.currentLocale, this.tokenRegex, this.pluralRules); + } else { + this.warn('Missing translation for key: "' + key + '"'); + result = key; + } + if (typeof phrase === 'string') { + result = transformPhrase(phrase, opts, this.currentLocale, this.tokenRegex, this.pluralRules); + } + return result; +}; + +// ### polyglot.has(key) +// +// Check if polyglot has a translation for given key +Polyglot.prototype.has = function (key) { + return has(this.phrases, key); +}; + +// export transformPhrase +Polyglot.transformPhrase = function transform(phrase, substitutions, locale) { + return transformPhrase(phrase, substitutions, locale); +}; + +module.exports = Polyglot; + + +/***/ }), + +/***/ "pFmr": +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), + +/***/ "pIQI": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__("bYvh"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bigint: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), + +/***/ "pJ4J": +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), + +/***/ "pN3j": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'menos de um segundo', + other: 'menos de {{count}} segundos' + }, + + xSeconds: { + one: '1 segundo', + other: '{{count}} segundos' + }, + + halfAMinute: 'meio minuto', + + lessThanXMinutes: { + one: 'menos de um minuto', + other: 'menos de {{count}} minutos' + }, + + xMinutes: { + one: '1 minuto', + other: '{{count}} minutos' + }, + + aboutXHours: { + one: 'aproximadamente 1 hora', + other: 'aproximadamente {{count}} horas' + }, + + xHours: { + one: '1 hora', + other: '{{count}} horas' + }, + + xDays: { + one: '1 dia', + other: '{{count}} dias' + }, + + aboutXMonths: { + one: 'aproximadamente 1 mês', + other: 'aproximadamente {{count}} meses' + }, + + xMonths: { + one: '1 mês', + other: '{{count}} meses' + }, + + aboutXYears: { + one: 'aproximadamente 1 ano', + other: 'aproximadamente {{count}} anos' + }, + + xYears: { + one: '1 ano', + other: '{{count}} anos' + }, + + overXYears: { + one: 'mais de 1 ano', + other: 'mais de {{count}} anos' + }, + + almostXYears: { + one: 'quase 1 ano', + other: 'quase {{count}} anos' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'daqui a ' + result + } else { + return 'há ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "pP+T": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NativeContext = void 0; + +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); + +var NativeContext = /*#__PURE__*/_react.default.createContext(undefined); + +exports.NativeContext = NativeContext; + +/***/ }), + +/***/ "pQ7r": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +// Used https://github.com/thinkloop/multi-key-cache as inspiration +var multiKeyStore = { + set: function set(cache, key1, key2, value) { + var subCache = cache.get(key1); + + if (!subCache) { + subCache = new Map(); + cache.set(key1, subCache); + } + + subCache.set(key2, value); + }, + get: function get(cache, key1, key2) { + var subCache = cache.get(key1); + return subCache ? subCache.get(key2) : undefined; + }, + delete: function _delete(cache, key1, key2) { + var subCache = cache.get(key1); + subCache.delete(key2); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (multiKeyStore); + +/***/ }), + +/***/ "pSEq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("VHzf"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + overflow: 'hidden' + } +}; +var Card = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Card(props, ref) { + var classes = props.classes, + className = props.className, + _props$raised = props.raised, + raised = _props$raised === void 0 ? false : _props$raised, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "raised"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Paper__WEBPACK_IMPORTED_MODULE_5__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + elevation: raised ? 8 : 1, + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiCard' +})(Card)); + +/***/ }), + +/***/ "pSuu": +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__("VNFE"); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; + + +/***/ }), + +/***/ "pTfQ": +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__("ARbH"); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), + +/***/ "pWWv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return createStoreHook; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return useStore; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("umgW"); +/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("xDKL"); + + + +/** + * Hook factory, which creates a `useStore` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. + * @returns {Function} A `useStore` hook bound to the specified context. + */ + +function createStoreHook(context) { + if (context === void 0) { + context = _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"]; + } + + var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"] ? _useReduxContext__WEBPACK_IMPORTED_MODULE_2__["useReduxContext"] : function () { + return Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(context); + }; + return function useStore() { + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store; + + return store; + }; +} +/** + * A hook to access the redux store. + * + * @returns {any} the redux store + * + * @example + * + * import React from 'react' + * import { useStore } from 'react-redux' + * + * export const ExampleComponent = () => { + * const store = useStore() + * return <div>{store.getState()}</div> + * } + */ + +var useStore = /*#__PURE__*/createStoreHook(); + +/***/ }), + +/***/ "pY8S": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("46VF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Input__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "pYrY": +/***/ (function(module, exports) { + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; + + +/***/ }), + +/***/ "pebw": +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = __webpack_require__("Yhpl")('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("XyXA")(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + + +/***/ }), + +/***/ "pgHW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fetchURL = exports.generateUrlForNote = exports.generatePrivateUrl = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _helpers = __webpack_require__("Eg6m"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +/** + * + * @param {string} notesAppUrl URL to the Notes App (https://notes.foo.mycozy.cloud) + * @param {object} file io.cozy.files object + */ +var generatePrivateUrl = function generatePrivateUrl(notesAppUrl, file) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var returnUrl = options.returnUrl; + var url = new URL(notesAppUrl); + + if (returnUrl) { + url.searchParams.set('returnUrl', returnUrl); + } + + url.hash = "#/n/".concat(file.id); + return url.toString(); +}; + +exports.generatePrivateUrl = generatePrivateUrl; + +var generateUrlForNote = function generateUrlForNote(notesAppUrl, file) { + _logger.default.warn('generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead'); + + return generatePrivateUrl(notesAppUrl, file); +}; +/** + * Fetch and build an URL to open a note. + * + * @param {object} client CozyClient instance + * @param {object} file io.cozy.file object + * @returns {Promise<string>} url + */ + + +exports.generateUrlForNote = generateUrlForNote; + +var fetchURL = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file) { + var _yield$client$getStac, _yield$client$getStac2, note_id, subdomain, protocol, instance, sharecode, public_name, searchParams; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return client.getStackClient().collection('io.cozy.notes').fetchURL({ + _id: file.id + }); + + case 2: + _yield$client$getStac = _context.sent; + _yield$client$getStac2 = _yield$client$getStac.data; + note_id = _yield$client$getStac2.note_id; + subdomain = _yield$client$getStac2.subdomain; + protocol = _yield$client$getStac2.protocol; + instance = _yield$client$getStac2.instance; + sharecode = _yield$client$getStac2.sharecode; + public_name = _yield$client$getStac2.public_name; + + if (!sharecode) { + _context.next = 17; + break; + } + + searchParams = [['id', note_id]]; + searchParams.push(['sharecode', sharecode]); + if (public_name) searchParams.push(['username', public_name]); + return _context.abrupt("return", (0, _helpers.generateWebLink)({ + cozyUrl: "".concat(protocol, "://").concat(instance), + searchParams: searchParams, + pathname: '/public/', + slug: 'notes', + subDomainType: subdomain + })); + + case 17: + return _context.abrupt("return", (0, _helpers.generateWebLink)({ + cozyUrl: "".concat(protocol, "://").concat(instance), + pathname: '', + slug: 'notes', + subDomainType: subdomain, + hash: "/n/".concat(note_id) + })); + + case 18: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function fetchURL(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +exports.fetchURL = fetchURL; + +/***/ }), + +/***/ "pgeU": +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__("EEoB"); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), + +/***/ "ph6I": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY_PREFIX", function() { return KEY_PREFIX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FLUSH", function() { return FLUSH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REHYDRATE", function() { return REHYDRATE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return PAUSE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PERSIST", function() { return PERSIST; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PURGE", function() { return PURGE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return REGISTER; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_VERSION", function() { return DEFAULT_VERSION; }); +var KEY_PREFIX = 'persist:'; +var FLUSH = 'persist/FLUSH'; +var REHYDRATE = 'persist/REHYDRATE'; +var PAUSE = 'persist/PAUSE'; +var PERSIST = 'persist/PERSIST'; +var PURGE = 'persist/PURGE'; +var REGISTER = 'persist/REGISTER'; +var DEFAULT_VERSION = -1; + +/***/ }), + +/***/ "phXz": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") +var startOfYear = __webpack_require__("OH/G") +var differenceInCalendarDays = __webpack_require__("bMlu") + +/** + * @category Day Helpers + * @summary Get the day of the year of the given date. + * + * @description + * Get the day of the year of the given date. + * + * @param {Date|String|Number} date - the given date + * @returns {Number} the day of year + * + * @example + * // Which day of the year is 2 July 2014? + * var result = getDayOfYear(new Date(2014, 6, 2)) + * //=> 183 + */ +function getDayOfYear (dirtyDate) { + var date = parse(dirtyDate) + var diff = differenceInCalendarDays(date, startOfYear(date)) + var dayOfYear = diff + 1 + return dayOfYear +} + +module.exports = getDayOfYear + + +/***/ }), + +/***/ "phkM": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("iNHL"); +/* harmony import */ var _middlewares_appsI18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("uRct"); +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("wY4L"); +/* harmony import */ var redux_persist__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("IAQC"); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("gc+w"); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("vmvv"); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(redux_logger__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("VwI0"); +/* harmony import */ var redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("PQBE"); +var _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8___namespace = /*#__PURE__*/__webpack_require__.t("PQBE", 1); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("6yJA"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + + + + +var config = { + storage: redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7___default.a, + key: 'cozy-bar', + whitelist: _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8__ +}; +var loggerMiddleware = Object(redux_logger__WEBPACK_IMPORTED_MODULE_6__["createLogger"])({ + logger: _logger__WEBPACK_IMPORTED_MODULE_9__["default"] +}); +var reducer = Object(redux_persist__WEBPACK_IMPORTED_MODULE_4__["persistCombineReducers"])(config, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _reducers__WEBPACK_IMPORTED_MODULE_5__["reducers"])); +var middlewares = [_middlewares_appsI18n__WEBPACK_IMPORTED_MODULE_2__["default"], redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]]; + +if (cozy_flags__WEBPACK_IMPORTED_MODULE_10___default()('bar.debug')) { + middlewares.push(loggerMiddleware); +} + +var createStore = function createStore() { + store = Object(redux__WEBPACK_IMPORTED_MODULE_1__["createStore"])(reducer, redux__WEBPACK_IMPORTED_MODULE_1__["applyMiddleware"].apply(null, middlewares)); + Object(redux_persist__WEBPACK_IMPORTED_MODULE_4__["persistStore"])(store); + return store; +}; +var store; + +var getOrCreateStore = function getOrCreateStore() { + if (!store) { + store = createStore(); + } + + return store; +}; + +/* harmony default export */ __webpack_exports__["default"] = (getOrCreateStore); + +/***/ }), + +/***/ "pjZ0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActivationStart", function() { return getActivationStart; }); +/* harmony import */ var _getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2UmT"); + + +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const getActivationStart = () => { + const navEntry = Object(_getNavigationEntry_js__WEBPACK_IMPORTED_MODULE_0__["getNavigationEntry"])(); + return (navEntry && navEntry.activationStart) || 0; +}; + + +//# sourceMappingURL=getActivationStart.js.map + + +/***/ }), + +/***/ "pjsN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var stringify = __webpack_require__("oD1g"); +var parse = __webpack_require__("frDN"); +var formats = __webpack_require__("4eKc"); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; + + +/***/ }), + +/***/ "pmGf": +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), + +/***/ "pp5t": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseIteratee = __webpack_require__("JF7T"), + basePickBy = __webpack_require__("d7eO"), + getAllKeysIn = __webpack_require__("7XCK"); + +/** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ +function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = baseIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); +} + +module.exports = pickBy; + + +/***/ }), + +/***/ "ppUe": +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; + + +/***/ }), + +/***/ "pqMe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0Lot"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createGenerateClassName__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "prJK": +/***/ (function(module, exports, __webpack_require__) { + +var microee = __webpack_require__("GIvT"); + +// Implements a subset of Node's stream.Transform - in a cross-platform manner. +function Transform() {} + +microee.mixin(Transform); + +// The write() signature is different from Node's +// --> makes it much easier to work with objects in logs. +// One of the lessons from v1 was that it's better to target +// a good browser rather than the lowest common denominator +// internally. +// If you want to use external streams, pipe() to ./stringify.js first. +Transform.prototype.write = function(name, level, args) { + this.emit('item', name, level, args); +}; + +Transform.prototype.end = function() { + this.emit('end'); + this.removeAllListeners(); +}; + +Transform.prototype.pipe = function(dest) { + var s = this; + // prevent double piping + s.emit('unpipe', dest); + // tell the dest that it's being piped to + dest.emit('pipe', s); + + function onItem() { + dest.write.apply(dest, Array.prototype.slice.call(arguments)); + } + function onEnd() { !dest._isStdio && dest.end(); } + + s.on('item', onItem); + s.on('end', onEnd); + + s.when('unpipe', function(from) { + var match = (from === dest) || typeof from == 'undefined'; + if(match) { + s.removeListener('item', onItem); + s.removeListener('end', onEnd); + dest.emit('unpipe'); + } + return match; + }); + + return dest; +}; + +Transform.prototype.unpipe = function(from) { + this.emit('unpipe', from); + return this; +}; + +Transform.prototype.format = function(dest) { + throw new Error([ + 'Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:', + 'var Minilog = require(\'minilog\');', + 'Minilog', + ' .pipe(Minilog.backends.console.formatClean)', + ' .pipe(Minilog.backends.console);'].join('\n')); +}; + +Transform.mixin = function(dest) { + var o = Transform.prototype, k; + for (k in o) { + o.hasOwnProperty(k) && (dest.prototype[k] = o[k]); + } +}; + +module.exports = Transform; + + +/***/ }), + +/***/ "pt+A": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNonEnumerableProperty", function() { return addNonEnumerableProperty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToPlainObject", function() { return convertToPlainObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function() { return dropUndefinedKeys; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function() { return extractExceptionKeysForMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fill", function() { return fill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOriginalFunction", function() { return getOriginalFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markFunctionWrapped", function() { return markFunctionWrapped; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "objectify", function() { return objectify; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlEncode", function() { return urlEncode; }); +/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("R9Wl"); +/* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("99IF"); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7UWH"); + + + + +/** + * Replace a method in an object with a wrapped version of itself. + * + * @param source An object that contains a method to be wrapped. + * @param name The name of the method to be wrapped. + * @param replacementFactory A higher-order function that takes the original version of the given method and returns a + * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to + * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other + * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`. + * @returns void + */ +function fill(source, name, replacementFactory) { + if (!(name in source)) { + return; + } + + const original = source[name] ; + const wrapped = replacementFactory(original) ; + + // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work + // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" + if (typeof wrapped === 'function') { + try { + markFunctionWrapped(wrapped, original); + } catch (_Oo) { + // This can throw if multiple fill happens on a global object like XMLHttpRequest + // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 + } + } + + source[name] = wrapped; +} + +/** + * Defines a non-enumerable property on the given object. + * + * @param obj The object on which to set the property + * @param name The name of the property to be set + * @param value The value to which to set the property + */ +function addNonEnumerableProperty(obj, name, value) { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value: value, + writable: true, + configurable: true, + }); +} + +/** + * Remembers the original function on the wrapped function and + * patches up the prototype. + * + * @param wrapped the wrapper function + * @param original the original function that gets wrapped + */ +function markFunctionWrapped(wrapped, original) { + const proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto; + addNonEnumerableProperty(wrapped, '__sentry_original__', original); +} + +/** + * This extracts the original function if available. See + * `markFunctionWrapped` for more information. + * + * @param func the function to unwrap + * @returns the unwrapped version of the function if available. + */ +function getOriginalFunction(func) { + return func.__sentry_original__; +} + +/** + * Encodes given object into url-friendly format + * + * @param object An object that contains serializable values + * @returns string Encoded + */ +function urlEncode(object) { + return Object.keys(object) + .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`) + .join('&'); +} + +/** + * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their + * non-enumerable properties attached. + * + * @param value Initial source that we have to transform in order for it to be usable by the serializer + * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor + * an Error. + */ +function convertToPlainObject( + value, +) + + { + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isError"])(value)) { + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value), + }; + } else if (Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isEvent"])(value)) { + const newObj + + = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value), + }; + + if (typeof CustomEvent !== 'undefined' && Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isInstanceOf"])(value, CustomEvent)) { + newObj.detail = value.detail; + } + + return newObj; + } else { + return value; + } +} + +/** Creates a string representation of the target of an `Event` object */ +function serializeEventTarget(target) { + try { + return Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isElement"])(target) ? Object(_browser_js__WEBPACK_IMPORTED_MODULE_0__["htmlTreeAsString"])(target) : Object.prototype.toString.call(target); + } catch (_oO) { + return '<unknown>'; + } +} + +/** Filters out all but an object's own properties */ +function getOwnProperties(obj) { + if (typeof obj === 'object' && obj !== null) { + const extractedProps = {}; + for (const property in obj) { + if (Object.prototype.hasOwnProperty.call(obj, property)) { + extractedProps[property] = (obj )[property]; + } + } + return extractedProps; + } else { + return {}; + } +} + +/** + * Given any captured exception, extract its keys and create a sorted + * and truncated list that will be used inside the event message. + * eg. `Non-error exception captured with keys: foo, bar, baz` + */ +function extractExceptionKeysForMessage(exception, maxLength = 40) { + const keys = Object.keys(convertToPlainObject(exception)); + keys.sort(); + + if (!keys.length) { + return '[object has no keys]'; + } + + if (keys[0].length >= maxLength) { + return Object(_string_js__WEBPACK_IMPORTED_MODULE_2__["truncate"])(keys[0], maxLength); + } + + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + const serialized = keys.slice(0, includedKeys).join(', '); + if (serialized.length > maxLength) { + continue; + } + if (includedKeys === keys.length) { + return serialized; + } + return Object(_string_js__WEBPACK_IMPORTED_MODULE_2__["truncate"])(serialized, maxLength); + } + + return ''; +} + +/** + * Given any object, return a new object having removed all fields whose value was `undefined`. + * Works recursively on objects and arrays. + * + * Attention: This function keeps circular references in the returned object. + */ +function dropUndefinedKeys(inputValue) { + // This map keeps track of what already visited nodes map to. + // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular + // references as the input object. + const memoizationMap = new Map(); + + // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API + return _dropUndefinedKeys(inputValue, memoizationMap); +} + +function _dropUndefinedKeys(inputValue, memoizationMap) { + if (Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isPlainObject"])(inputValue)) { + // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== undefined) { + return memoVal ; + } + + const returnValue = {}; + // Store the mapping of this value in case we visit it again, in case of circular data + memoizationMap.set(inputValue, returnValue); + + for (const key of Object.keys(inputValue)) { + if (typeof inputValue[key] !== 'undefined') { + returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); + } + } + + return returnValue ; + } + + if (Array.isArray(inputValue)) { + // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== undefined) { + return memoVal ; + } + + const returnValue = []; + // Store the mapping of this value in case we visit it again, in case of circular data + memoizationMap.set(inputValue, returnValue); + + inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }); + + return returnValue ; + } + + return inputValue; +} + +/** + * Ensure that something is an object. + * + * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper + * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. + * + * @param wat The subject of the objectification + * @returns A version of `wat` which can safely be used with `Object` class methods + */ +function objectify(wat) { + let objectified; + switch (true) { + case wat === undefined || wat === null: + objectified = new String(wat); + break; + + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case typeof wat === 'symbol' || typeof wat === 'bigint': + objectified = Object(wat); + break; + + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case Object(_is_js__WEBPACK_IMPORTED_MODULE_1__["isPrimitive"])(wat): + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + objectified = new (wat ).constructor(wat); + break; + + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; +} + + +//# sourceMappingURL=object.js.map + + +/***/ }), + +/***/ "ptZF": +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__("GwHQ"); +var anObject = __webpack_require__("eckd"); +var getKeys = __webpack_require__("FFxP"); + +module.exports = __webpack_require__("WXXH") ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), + +/***/ "pv+S": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.NativeIntentProvider = void 0; + +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); + +var _view = __webpack_require__("7zRI"); + +var _api = __webpack_require__("VXXh"); + +var NativeIntentProvider = function NativeIntentProvider(_ref) { + var children = _ref.children, + localMethods = _ref.localMethods; + return /*#__PURE__*/_react.default.createElement(_view.NativeContext.Provider, { + value: new _api.NativeService(localMethods) + }, children); +}; + +exports.NativeIntentProvider = NativeIntentProvider; + +/***/ }), + +/***/ "pvYg": +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__("wIWy"); +var createDesc = __webpack_require__("9FgK"); +module.exports = __webpack_require__("1bdm") ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ "pz9k": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _exports_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jy+r"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBreadcrumb", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["addBreadcrumb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureEvent", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["captureEvent"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureException", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["captureException"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "captureMessage", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["captureMessage"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "configureScope", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["configureScope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setContext", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtra", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setExtra"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setExtras", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setExtras"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTag", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setTag"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setTags", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setTags"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setUser", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["setUser"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startTransaction", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["startTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withScope", function() { return _exports_js__WEBPACK_IMPORTED_MODULE_0__["withScope"]; }); + +/* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("l3L7"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hub", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["Hub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCurrentHub", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHubFromCarrier", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["getHubFromCarrier"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMainCarrier", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["getMainCarrier"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeMain", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["makeMain"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setHubOnCarrier", function() { return _hub_js__WEBPACK_IMPORTED_MODULE_1__["setHubOnCarrier"]; }); + +/* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("xTjI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "closeSession", function() { return _session_js__WEBPACK_IMPORTED_MODULE_2__["closeSession"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSession", function() { return _session_js__WEBPACK_IMPORTED_MODULE_2__["makeSession"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "updateSession", function() { return _session_js__WEBPACK_IMPORTED_MODULE_2__["updateSession"]; }); + +/* harmony import */ var _sessionflusher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dJq6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SessionFlusher", function() { return _sessionflusher_js__WEBPACK_IMPORTED_MODULE_3__["SessionFlusher"]; }); + +/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Hk8K"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scope", function() { return _scope_js__WEBPACK_IMPORTED_MODULE_4__["Scope"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addGlobalEventProcessor", function() { return _scope_js__WEBPACK_IMPORTED_MODULE_4__["addGlobalEventProcessor"]; }); + +/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("2kdj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getEnvelopeEndpointWithUrlEncodedAuth", function() { return _api_js__WEBPACK_IMPORTED_MODULE_5__["getEnvelopeEndpointWithUrlEncodedAuth"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getReportDialogEndpoint", function() { return _api_js__WEBPACK_IMPORTED_MODULE_5__["getReportDialogEndpoint"]; }); + +/* harmony import */ var _baseclient_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ke25"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseClient", function() { return _baseclient_js__WEBPACK_IMPORTED_MODULE_6__["BaseClient"]; }); + +/* harmony import */ var _sdk_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("rYdZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "initAndBind", function() { return _sdk_js__WEBPACK_IMPORTED_MODULE_7__["initAndBind"]; }); + +/* harmony import */ var _transports_base_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("A0lo"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransport", function() { return _transports_base_js__WEBPACK_IMPORTED_MODULE_8__["createTransport"]; }); + +/* harmony import */ var _version_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("6nuH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SDK_VERSION", function() { return _version_js__WEBPACK_IMPORTED_MODULE_9__["SDK_VERSION"]; }); + +/* harmony import */ var _integration_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("aBal"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getIntegrationsToSetup", function() { return _integration_js__WEBPACK_IMPORTED_MODULE_10__["getIntegrationsToSetup"]; }); + +/* harmony import */ var _integrations_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("aPY+"); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Integrations", function() { return _integrations_index_js__WEBPACK_IMPORTED_MODULE_11__; }); +/* harmony import */ var _integrations_functiontostring_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("mWT8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FunctionToString", function() { return _integrations_functiontostring_js__WEBPACK_IMPORTED_MODULE_12__["FunctionToString"]; }); + +/* harmony import */ var _integrations_inboundfilters_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("Z2AA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InboundFilters", function() { return _integrations_inboundfilters_js__WEBPACK_IMPORTED_MODULE_13__["InboundFilters"]; }); + + + + + + + + + + + + + + + + + +; +; +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "pzK5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("nTFu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Select__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "q+gl": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _RootRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("DNGy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _RootRef__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "q384": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var ThemeContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ThemeContext); + +/***/ }), + +/***/ "q3D2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZnQe"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Modal__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _ModalManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("KdLj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalManager", function() { return _ModalManager__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + + + + +/***/ }), + +/***/ "q3uU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("jiof"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OY/u"); + + + + + + + + +var styles = function styles(theme) { + var light = theme.palette.type === 'light'; + var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)'; + var backgroundColor = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)'; + return { + /* Styles applied to the root element. */ + root: { + position: 'relative', + backgroundColor: backgroundColor, + borderTopLeftRadius: theme.shape.borderRadius, + borderTopRightRadius: theme.shape.borderRadius, + transition: theme.transitions.create('background-color', { + duration: theme.transitions.duration.shorter, + easing: theme.transitions.easing.easeOut + }), + '&:hover': { + backgroundColor: light ? 'rgba(0, 0, 0, 0.13)' : 'rgba(255, 255, 255, 0.13)', + // Reset on touch devices, it doesn't add specificity + '@media (hover: none)': { + backgroundColor: backgroundColor + } + }, + '&$focused': { + backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)' + }, + '&$disabled': { + backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)' + } + }, + + /* Styles applied to the root element if color secondary. */ + colorSecondary: { + '&$underline:after': { + borderBottomColor: theme.palette.secondary.main + } + }, + + /* Styles applied to the root element if `disableUnderline={false}`. */ + underline: { + '&:after': { + borderBottom: "2px solid ".concat(theme.palette.primary.main), + left: 0, + bottom: 0, + // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 + content: '""', + position: 'absolute', + right: 0, + transform: 'scaleX(0)', + transition: theme.transitions.create('transform', { + duration: theme.transitions.duration.shorter, + easing: theme.transitions.easing.easeOut + }), + pointerEvents: 'none' // Transparent to the hover style. + + }, + '&$focused:after': { + transform: 'scaleX(1)' + }, + '&$error:after': { + borderBottomColor: theme.palette.error.main, + transform: 'scaleX(1)' // error is always underlined in red + + }, + '&:before': { + borderBottom: "1px solid ".concat(bottomLineColor), + left: 0, + bottom: 0, + // Doing the other way around crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242 + content: '"\\00a0"', + position: 'absolute', + right: 0, + transition: theme.transitions.create('border-bottom-color', { + duration: theme.transitions.duration.shorter + }), + pointerEvents: 'none' // Transparent to the hover style. + + }, + '&:hover:before': { + borderBottom: "1px solid ".concat(theme.palette.text.primary) + }, + '&$disabled:before': { + borderBottomStyle: 'dotted' + } + }, + + /* Pseudo-class applied to the root element if the component is focused. */ + focused: {}, + + /* Pseudo-class applied to the root element if `disabled={true}`. */ + disabled: {}, + + /* Styles applied to the root element if `startAdornment` is provided. */ + adornedStart: { + paddingLeft: 12 + }, + + /* Styles applied to the root element if `endAdornment` is provided. */ + adornedEnd: { + paddingRight: 12 + }, + + /* Pseudo-class applied to the root element if `error={true}`. */ + error: {}, + + /* Styles applied to the `input` element if `margin="dense"`. */ + marginDense: {}, + + /* Styles applied to the root element if `multiline={true}`. */ + multiline: { + padding: '27px 12px 10px', + '&$marginDense': { + paddingTop: 23, + paddingBottom: 6 + } + }, + + /* Styles applied to the `input` element. */ + input: { + padding: '27px 12px 10px', + '&:-webkit-autofill': { + WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset', + WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff', + caretColor: theme.palette.type === 'light' ? null : '#fff', + borderTopLeftRadius: 'inherit', + borderTopRightRadius: 'inherit' + } + }, + + /* Styles applied to the `input` element if `margin="dense"`. */ + inputMarginDense: { + paddingTop: 23, + paddingBottom: 6 + }, + + /* Styles applied to the `input` if in `<FormControl hiddenLabel />`. */ + inputHiddenLabel: { + paddingTop: 18, + paddingBottom: 19, + '&$inputMarginDense': { + paddingTop: 10, + paddingBottom: 11 + } + }, + + /* Styles applied to the `input` element if `multiline={true}`. */ + inputMultiline: { + padding: 0 + }, + + /* Styles applied to the `input` element if `startAdornment` is provided. */ + inputAdornedStart: { + paddingLeft: 0 + }, + + /* Styles applied to the `input` element if `endAdornment` is provided. */ + inputAdornedEnd: { + paddingRight: 0 + } + }; +}; +var FilledInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function FilledInput(props, ref) { + var disableUnderline = props.disableUnderline, + classes = props.classes, + _props$fullWidth = props.fullWidth, + fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth, + _props$inputComponent = props.inputComponent, + inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent, + _props$multiline = props.multiline, + multiline = _props$multiline === void 0 ? false : _props$multiline, + _props$type = props.type, + type = _props$type === void 0 ? 'text' : _props$type, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["disableUnderline", "classes", "fullWidth", "inputComponent", "multiline", "type"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_InputBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, classes, { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, !disableUnderline && classes.underline), + underline: null + }), + fullWidth: fullWidth, + inputComponent: inputComponent, + multiline: multiline, + ref: ref, + type: type + }, other)); +}); + false ? undefined : void 0; +FilledInput.muiName = 'Input'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiFilledInput' +})(FilledInput)); + +/***/ }), + +/***/ "q4sm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("104p"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _jssPreset__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "q5BW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _isEqual = _interopRequireDefault(__webpack_require__("+KM7")); + +var _uniqWith = _interopRequireDefault(__webpack_require__("c20g")); + +var _pick = _interopRequireDefault(__webpack_require__("LF8A")); + +var _remove2 = _interopRequireDefault(__webpack_require__("Jb16")); + +var _pullAt = _interopRequireDefault(__webpack_require__("tW+3")); + +var _config = __webpack_require__("+RmU"); + +var _logger = _interopRequireDefault(__webpack_require__("o2qs")); + +/** + * @typedef {object} SubscriptionRequest + * @property {EventName} event + * @property {string} type + * @property {string|undefined|function} id - (or handler is `handler` is undefined) + * @property {function|undefined} handler - (not used if `id` is a function) + */ + +/** + * @typedef {object} RealtimeEvent + * @property {event} + */ + +/** + * Manage event subscriptions + */ +var SubscriptionList = /*#__PURE__*/function () { + function SubscriptionList() { + (0, _classCallCheck2.default)(this, SubscriptionList); + this.subscriptions = []; + } + /** + * Adds a subscription to the list + * + * @private + * @param {Subscription} request + */ + + + (0, _createClass2.default)(SubscriptionList, [{ + key: "add", + value: function add(request) { + var subscription = this.normalize(request); + var found = this.subscriptions.find(function (s) { + return (0, _isEqual.default)(s, subscription); + }); + + if (found) { + _config.onDoubleSubscriptions && (0, _config.onDoubleSubscriptions)(subscription); + if (!_config.allowDoubleSubscriptions) return; + } + + this.subscriptions.push(subscription); + } + /** + * Remove a subscription from the list + * + * @param {Subscription} request + */ + + }, { + key: "remove", + value: function remove(request) { + var subscription = this.normalize(request); + + if (_config.requireDoubleUnsubscriptions) { + // remove only the first matching + var found = this.subscriptions.findIndex(function (s) { + return (0, _isEqual.default)(s, subscription); + }); + + if (found >= 0) { + (0, _pullAt.default)(this.subscriptions, found); + return; + } + } else { + // remove all matching + var removed = (0, _remove2.default)(this.subscriptions, function (s) { + return (0, _isEqual.default)(s, subscription); + }); + if (removed && removed.length > 0) return; + } + + _logger.default.warn('Trying to unsubscribe to an unknown subscription', subscription); + } + /** + * Get all subscriptions + * + * @returns {Subscription[]} + */ + + }, { + key: "getAll", + value: function getAll() { + return this.subscriptions.slice(); + } + /** + * Get all distinct `type` and `id` pairs from the list + * + * @returns {{type, id}[]} + */ + + }, { + key: "getAllTypeAndIdPairs", + value: function getAllTypeAndIdPairs() { + var map = function map(subscription) { + return (0, _pick.default)(subscription, ['type', 'id']); + }; + + return (0, _uniqWith.default)(this.subscriptions.map(map), _isEqual.default); + } + /** + * Check if a subscription in the list matches the pair `type` and `id` + * + * @param {string|null} type + * @param {string|null} id + * @returns {boolean} + */ + + }, { + key: "hasSameTypeAndId", + value: function hasSameTypeAndId(_ref) { + var optionType = _ref.type, + optionId = _ref.id; + var type = optionType || null; + var id = optionId || null; + return !!this.subscriptions.find(function (s) { + return s.type === type && s.id === id; + }); + } + /** + * Get all handlers for an event + * + * @param {string} event + * @param {string} type + * @param {string} id + * @returns {function[]} + */ + + }, { + key: "getAllHandlersForEvent", + value: function getAllHandlersForEvent(event, type, id) { + var _this = this; + + var matcher = function matcher(s) { + return _this.isMatchingEvent(s, event, type, id); + }; + + var matching = this.subscriptions.filter(matcher); + return matching.map(function (s) { + return s.handler; + }); + } + /** + * Test if a subscription match an event + * + * @private + * @param {Subscription} sub + * @param {string} event + * @param {string} type + * @param {string} id + * @returns {boolean} + */ + + }, { + key: "isMatchingEvent", + value: function isMatchingEvent(sub, event, type, id) { + if (sub.event && sub.event !== event) return false; + if (sub.id && sub.id !== (id || null)) return false; + if (sub.type && sub.type !== (type || null)) return false; + return true; + } + /** + * Test is there is any subscription in the list + * + * @returns {boolean} true if empty + */ + + }, { + key: "isEmpty", + value: function isEmpty() { + return this.subscriptions.length === 0; + } + /** + * Normalize falsy values in subscriptions requests + * + * @private + * @param {Subscription} sub + * @returns {Subscription} + */ + + }, { + key: "normalize", + value: function normalize(sub) { + function error(msg) { + _logger.default.error(msg); + + throw new Error(msg); + } + + if (sub.event && !_config.eventNames.includes(sub.event)) { + error("Trying to subscribe to a unknown event name ".concat(sub.event)); + } + + if (typeof sub.handler !== 'function') { + error("Trying to subscribe with a non-function handler ".concat(sub.event)); + } + + if (sub.event !== 'error' && typeof sub.type !== 'string') { + error("Trying to subscribe with to non-string type ".concat(sub.type)); + } + + if (sub.id && typeof sub.id !== 'string') { + error("Trying to subscribe with to non-string id ".concat(sub.id)); + } + + return { + event: sub.event || null, + type: sub.type || null, + id: sub.id || null, + handler: sub.handler || null + }; + } + }]); + return SubscriptionList; +}(); + +exports.default = SubscriptionList; + +/***/ }), + +/***/ "q985": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// B.2.3.4 String.prototype.blink() +__webpack_require__("A7oe")('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + + +/***/ }), + +/***/ "qAtN": +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__("J58c"); + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? Object(arguments[i]) : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + defineProperty(target, key, source[key]); + }); + } + + return target; +} + +module.exports = _objectSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "qEZt": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WebviewService = void 0; + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var WebviewService = /*#__PURE__*/(0, _createClass2.default)(function WebviewService(connection) { + var _this = this; + + (0, _classCallCheck2.default)(this, WebviewService); + (0, _defineProperty2.default)(this, "close", void 0); + (0, _defineProperty2.default)(this, "remoteHandle", void 0); + (0, _defineProperty2.default)(this, "call", function (methodName) { + var _this$remoteHandle; + + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return (_this$remoteHandle = _this.remoteHandle).call.apply(_this$remoteHandle, [methodName].concat(args)); + }); + (0, _defineProperty2.default)(this, "closeMessenger", function () { + return _this.close(); + }); + this.remoteHandle = connection.remoteHandle(); + + this.close = function () { + return connection.close(); + }; +}); +exports.WebviewService = WebviewService; + +/***/ }), + +/***/ "qHQe": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("m2c+") +var buildFormatLocale = __webpack_require__("l1+s") + +/** + * @category Locales + * @summary Slovenian locale. + * @author Adam Stradovnik [@Neoglyph]{@link https://github.com/Neoglyph} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "qOJT": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['gen', 'feb', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'oct', 'nov', 'des'] + var monthsFull = ['gener', 'febrer', 'març', 'abril', 'maig', 'juny', 'juliol', 'agost', 'setembre', 'octobre', 'novembre', 'desembre'] + var weekdays2char = ['dg', 'dl', 'dt', 'dc', 'dj', 'dv', 'ds'] + var weekdays3char = ['dge', 'dls', 'dts', 'dcs', 'djs', 'dvs', 'dss'] + var weekdaysFull = ['diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + switch (number) { + case 1: + return '1r' + case 2: + return '2n' + case 3: + return '3r' + case 4: + return '4t' + default: + return number + 'è' + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "qR/I": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" +}), 'MoreHoriz')); + +/***/ }), + +/***/ "qSOI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return unsupportedProp; }); +function unsupportedProp(props, propName, componentName, location, propFullName) { + if (true) { + return null; + } + + var propFullNameSafe = propFullName || propName; + + if (typeof props[propName] !== 'undefined') { + return new Error("The prop `".concat(propFullNameSafe, "` is not supported. Please remove it.")); + } + + return null; +} + +/***/ }), + +/***/ "qWrL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_addMeasureSpans", function() { return _addMeasureSpans; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_addResourceSpans", function() { return _addResourceSpans; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addPerformanceEntries", function() { return addPerformanceEntries; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startTrackingLongTasks", function() { return startTrackingLongTasks; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startTrackingWebVitals", function() { return startTrackingWebVitals; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("VjOD"); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("+2Xp"); +/* harmony import */ var _web_vitals_getCLS_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("0Yrs"); +/* harmony import */ var _web_vitals_getFID_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("zGLC"); +/* harmony import */ var _web_vitals_getLCP_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("m3bF"); +/* harmony import */ var _web_vitals_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("CGpO"); +/* harmony import */ var _web_vitals_lib_observe_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("u8T2"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("huDi"); + + + + + + + + + + + +function getBrowserPerformanceAPI() { + return _types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"] && _types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].addEventListener && _types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].performance; +} + +let _performanceCursor = 0; + +let _measurements = {}; +let _lcpEntry; +let _clsEntry; + +/** + * Start tracking web vitals + */ +function startTrackingWebVitals(reportAllChanges = false) { + const performance = getBrowserPerformanceAPI(); + if (performance && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]) { + if (performance.mark) { + _types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].performance.mark('sentry-tracing-init'); + } + _trackCLS(); + _trackLCP(reportAllChanges); + _trackFID(); + } +} + +/** + * Start tracking long tasks. + */ +function startTrackingLongTasks() { + const entryHandler = (entries) => { + for (const entry of entries) { + const transaction = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["getActiveTransaction"])() ; + if (!transaction) { + return; + } + const startTime = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])((_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"] ) + entry.startTime); + const duration = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.duration); + + transaction.startChild({ + description: 'Main UI thread blocked', + op: 'ui.long-task', + startTimestamp: startTime, + endTimestamp: startTime + duration, + }); + } + }; + + Object(_web_vitals_lib_observe_js__WEBPACK_IMPORTED_MODULE_8__["observe"])('longtask', entryHandler); +} + +/** Starts tracking the Cumulative Layout Shift on the current page. */ +function _trackCLS() { + // See: + // https://web.dev/evolving-cls/ + // https://web.dev/cls-web-tooling/ + Object(_web_vitals_getCLS_js__WEBPACK_IMPORTED_MODULE_4__["onCLS"])(metric => { + const entry = metric.entries.pop(); + if (!entry) { + return; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding CLS'); + _measurements['cls'] = { value: metric.value, unit: '' }; + _clsEntry = entry ; + }); +} + +/** Starts tracking the Largest Contentful Paint on the current page. */ +function _trackLCP(reportAllChanges) { + Object(_web_vitals_getLCP_js__WEBPACK_IMPORTED_MODULE_6__["onLCP"])( + metric => { + const entry = metric.entries.pop(); + if (!entry) { + return; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding LCP'); + _measurements['lcp'] = { value: metric.value, unit: 'millisecond' }; + _lcpEntry = entry ; + }, + { reportAllChanges }, + ); +} + +/** Starts tracking the First Input Delay on the current page. */ +function _trackFID() { + Object(_web_vitals_getFID_js__WEBPACK_IMPORTED_MODULE_5__["onFID"])(metric => { + const entry = metric.entries.pop(); + if (!entry) { + return; + } + + const timeOrigin = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"] ); + const startTime = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.startTime); + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FID'); + _measurements['fid'] = { value: metric.value, unit: 'millisecond' }; + _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' }; + }); +} + +/** Add performance related spans to a transaction */ +function addPerformanceEntries(transaction) { + const performance = getBrowserPerformanceAPI(); + if (!performance || !_types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].performance.getEntries || !_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]) { + // Gatekeeper if performance API not available + return; + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Tracing] Adding & adjusting spans using Performance API'); + const timeOrigin = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["browserPerformanceTimeOrigin"]); + + const performanceEntries = performance.getEntries(); + + let responseStartTimestamp; + let requestStartTimestamp; + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + performanceEntries.slice(_performanceCursor).forEach((entry) => { + const startTime = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.startTime); + const duration = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.duration); + + if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) { + return; + } + + switch (entry.entryType) { + case 'navigation': { + _addNavigationSpans(transaction, entry, timeOrigin); + responseStartTimestamp = timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseStart); + requestStartTimestamp = timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.requestStart); + break; + } + case 'mark': + case 'paint': + case 'measure': { + _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin); + + // capture web vitals + const firstHidden = Object(_web_vitals_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_7__["getVisibilityWatcher"])(); + // Only report if the page wasn't hidden prior to the web vital. + const shouldRecord = entry.startTime < firstHidden.firstHiddenTime; + + if (entry.name === 'first-paint' && shouldRecord) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FP'); + _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' }; + } + if (entry.name === 'first-contentful-paint' && shouldRecord) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding FCP'); + _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' }; + } + break; + } + case 'resource': { + const resourceName = (entry.name ).replace(_types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].location.origin, ''); + _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin); + break; + } + default: + // Ignore other entry types. + } + }); + + _performanceCursor = Math.max(performanceEntries.length - 1, 0); + + _trackNavigator(transaction); + + // Measurements are only available for pageload transactions + if (transaction.op === 'pageload') { + // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the + // start of the response in milliseconds + if (typeof responseStartTimestamp === 'number') { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding TTFB'); + _measurements['ttfb'] = { + value: (responseStartTimestamp - transaction.startTimestamp) * 1000, + unit: 'millisecond', + }; + + if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) { + // Capture the time spent making the request and receiving the first byte of the response. + // This is the time between the start of the request and the start of the response in milliseconds. + _measurements['ttfb.requestTime'] = { + value: (responseStartTimestamp - requestStartTimestamp) * 1000, + unit: 'millisecond', + }; + } + } + + ['fcp', 'fp', 'lcp'].forEach(name => { + if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) { + return; + } + // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin. + // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need + // to be adjusted to be relative to transaction.startTimestamp. + const oldValue = _measurements[name].value; + const measurementTimestamp = timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(oldValue); + + // normalizedValue should be in milliseconds + const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000); + const delta = normalizedValue - oldValue; + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`); + _measurements[name].value = normalizedValue; + }); + + const fidMark = _measurements['mark.fid']; + if (fidMark && _measurements['fid']) { + // create span for FID + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + description: 'first input delay', + endTimestamp: fidMark.value + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(_measurements['fid'].value), + op: 'ui.action', + startTimestamp: fidMark.value, + }); + + // Delete mark.fid as we don't want it to be part of final payload + delete _measurements['mark.fid']; + } + + // If FCP is not recorded we should not record the cls value + // according to the new definition of CLS. + if (!('fcp' in _measurements)) { + delete _measurements.cls; + } + + Object.keys(_measurements).forEach(measurementName => { + transaction.setMeasurement( + measurementName, + _measurements[measurementName].value, + _measurements[measurementName].unit, + ); + }); + + _tagMetricInfo(transaction); + } + + _lcpEntry = undefined; + _clsEntry = undefined; + _measurements = {}; +} + +/** Create measure related spans */ +function _addMeasureSpans( + transaction, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + entry, + startTime, + duration, + timeOrigin, +) { + const measureStartTimestamp = timeOrigin + startTime; + const measureEndTimestamp = measureStartTimestamp + duration; + + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + description: entry.name , + endTimestamp: measureEndTimestamp, + op: entry.entryType , + startTimestamp: measureStartTimestamp, + }); + + return measureStartTimestamp; +} + +/** Instrument navigation entries */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _addNavigationSpans(transaction, entry, timeOrigin) { + ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => { + _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin); + }); + _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd'); + _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart'); + _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS'); + _addRequest(transaction, entry, timeOrigin); +} + +/** Create performance navigation related spans */ +function _addPerformanceNavigationTiming( + transaction, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + entry, + event, + timeOrigin, + description, + eventEnd, +) { + const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] ); + const start = entry[`${event}Start`] ; + if (!start || !end) { + return; + } + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + op: 'browser', + description: Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(description, () => ( event)), + startTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(start), + endTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(end), + }); +} + +/** Create request and response related spans */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _addRequest(transaction, entry, timeOrigin) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + op: 'browser', + description: 'request', + startTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.requestStart ), + endTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseEnd ), + }); + + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + op: 'browser', + description: 'response', + startTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseStart ), + endTimestamp: timeOrigin + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__["msToSec"])(entry.responseEnd ), + }); +} + +/** Create resource-related spans */ +function _addResourceSpans( + transaction, + entry, + resourceName, + startTime, + duration, + timeOrigin, +) { + // we already instrument based on fetch and xhr, so we don't need to + // duplicate spans here. + if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { + return; + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const data = {}; + if ('transferSize' in entry) { + data['Transfer Size'] = entry.transferSize; + } + if ('encodedBodySize' in entry) { + data['Encoded Body Size'] = entry.encodedBodySize; + } + if ('decodedBodySize' in entry) { + data['Decoded Body Size'] = entry.decodedBodySize; + } + + const startTimestamp = timeOrigin + startTime; + const endTimestamp = startTimestamp + duration; + + Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["_startChild"])(transaction, { + description: resourceName, + endTimestamp, + op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other', + startTimestamp, + data, + }); +} + +/** + * Capture the information of the user agent. + */ +function _trackNavigator(transaction) { + const navigator = _types_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].navigator ; + if (!navigator) { + return; + } + + // track network connectivity + const connection = navigator.connection; + if (connection) { + if (connection.effectiveType) { + transaction.setTag('effectiveConnectionType', connection.effectiveType); + } + + if (connection.type) { + transaction.setTag('connectionType', connection.type); + } + + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["isMeasurementValue"])(connection.rtt)) { + _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' }; + } + } + + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["isMeasurementValue"])(navigator.deviceMemory)) { + transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`); + } + + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_9__["isMeasurementValue"])(navigator.hardwareConcurrency)) { + transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency)); + } +} + +/** Add LCP / CLS data to transaction to allow debugging */ +function _tagMetricInfo(transaction) { + if (_lcpEntry) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding LCP Data'); + + // Capture Properties of the LCP element that contributes to the LCP. + + if (_lcpEntry.element) { + transaction.setTag('lcp.element', Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(_lcpEntry.element)); + } + + if (_lcpEntry.id) { + transaction.setTag('lcp.id', _lcpEntry.id); + } + + if (_lcpEntry.url) { + // Trim URL to the first 200 characters. + transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200)); + } + + transaction.setTag('lcp.size', _lcpEntry.size); + } + + // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift + if (_clsEntry && _clsEntry.sources) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('[Measurements] Adding CLS Data'); + _clsEntry.sources.forEach((source, index) => + transaction.setTag(`cls.source.${index + 1}`, Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(source.node)), + ); + } +} + + +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "qeDk": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__("4xNu"); +var hiddenKeys = __webpack_require__("OAwH").concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ "qeVT": +/***/ (function(module, exports) { + +function declensionGroup (scheme, count) { + if (count === 1) { + return scheme.one + } + + if (count >= 2 && count <= 4) { + return scheme.twoFour + } + + // if count === null || count === 0 || count >= 5 + return scheme.other +} + +function declension (scheme, count, time) { + var group = declensionGroup(scheme, count) + var finalText = group[time] || group + return finalText.replace('{{count}}', count) +} + +function extractPreposition (token) { + var result = ['lessThan', 'about', 'over', 'almost'].filter(function (preposition) { + return !!token.match(new RegExp('^' + preposition)) + }) + + return result[0] +} + +function prefixPreposition (preposition) { + var translation = '' + + if (preposition === 'almost') { + translation = 'skoro' + } + + if (preposition === 'about') { + translation = 'přibližně' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function suffixPreposition (preposition) { + var translation = '' + + if (preposition === 'lessThan') { + translation = 'méně než' + } + + if (preposition === 'over') { + translation = 'více než' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function lowercaseFirstLetter (string) { + return string.charAt(0).toLowerCase() + string.slice(1) +} + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + xSeconds: { + one: { + regular: 'vteřina', + past: 'vteřinou', + future: 'vteřinu' + }, + twoFour: { + regular: '{{count}} vteřiny', + past: '{{count}} vteřinami', + future: '{{count}} vteřiny' + }, + other: { + regular: '{{count}} vteřin', + past: '{{count}} vteřinami', + future: '{{count}} vteřin' + } + }, + + halfAMinute: { + other: { + regular: 'půl minuty', + past: 'půl minutou', + future: 'půl minuty' + } + }, + + xMinutes: { + one: { + regular: 'minuta', + past: 'minutou', + future: 'minutu' + }, + twoFour: { + regular: '{{count}} minuty', + past: '{{count}} minutami', + future: '{{count}} minuty' + }, + other: { + regular: '{{count}} minut', + past: '{{count}} minutami', + future: '{{count}} minut' + } + }, + + xHours: { + one: { + regular: 'hodina', + past: 'hodinou', + future: 'hodinu' + }, + twoFour: { + regular: '{{count}} hodiny', + past: '{{count}} hodinami', + future: '{{count}} hodiny' + }, + other: { + regular: '{{count}} hodin', + past: '{{count}} hodinami', + future: '{{count}} hodin' + } + }, + + xDays: { + one: { + regular: 'den', + past: 'dnem', + future: 'den' + }, + twoFour: { + regular: '{{count}} dni', + past: '{{count}} dny', + future: '{{count}} dni' + }, + other: { + regular: '{{count}} dní', + past: '{{count}} dny', + future: '{{count}} dní' + } + }, + + xMonths: { + one: { + regular: 'měsíc', + past: 'měsícem', + future: 'měsíc' + }, + twoFour: { + regular: '{{count}} měsíce', + past: '{{count}} měsíci', + future: '{{count}} měsíce' + }, + other: { + regular: '{{count}} měsíců', + past: '{{count}} měsíci', + future: '{{count}} měsíců' + } + }, + + xYears: { + one: { + regular: 'rok', + past: 'rokem', + future: 'rok' + }, + twoFour: { + regular: '{{count}} roky', + past: '{{count}} roky', + future: '{{count}} roky' + }, + other: { + regular: '{{count}} roků', + past: '{{count}} roky', + future: '{{count}} roků' + } + } + } + + function localize (token, count, options) { + options = options || {} + + var preposition = extractPreposition(token) || '' + var key = lowercaseFirstLetter(token.substring(preposition.length)) + var scheme = distanceInWordsLocale[key] + + if (!options.addSuffix) { + return prefixPreposition(preposition) + suffixPreposition(preposition) + declension(scheme, count, 'regular') + } + + if (options.comparison > 0) { + return prefixPreposition(preposition) + 'za ' + suffixPreposition(preposition) + declension(scheme, count, 'future') + } else { + return prefixPreposition(preposition) + 'před ' + suffixPreposition(preposition) + declension(scheme, count, 'past') + } + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "qg+p": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.JOBS_DOCTYPE = void 0; +var JOBS_DOCTYPE = 'io.cozy.jobs'; +exports.JOBS_DOCTYPE = JOBS_DOCTYPE; + +/***/ }), + +/***/ "qi+F": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'] + var monthsFull = ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'] + var weekdays2char = ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sa'] + var weekdays3char = ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'] + var weekdaysFull = ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return number + 'º' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "qi1n": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des'] + var monthsFull = ['janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember'] + var weekdays2char = ['su', 'má', 'þr', 'mi', 'fi', 'fö', 'la'] + var weekdays3char = ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'] + var weekdaysFull = ['sunnudaginn', 'mánudaginn', 'þriðjudaginn', 'miðvikudaginn', 'fimmtudaginn', 'föstudaginn', 'laugardaginn'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + return '' + number +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "qiP9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Subscription; }); +// encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants +var CLEARED = null; +var nullListeners = { + notify: function notify() {} +}; + +function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = current = next; + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + } + }; +} + +var Subscription = +/*#__PURE__*/ +function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; +}(); + + + +/***/ }), + +/***/ "qor6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFunctionName", function() { return getFunctionName; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDisplayName; }); +/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("j9Ms"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_1__); + + // Simplified polyfill for IE 11 support +// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3 + +var fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; +function getFunctionName(fn) { + var match = "".concat(fn).match(fnNameMatchRegex); + var name = match && match[1]; + return name || ''; +} +/** + * @param {function} Component + * @param {string} fallback + * @returns {string | undefined} + */ + +function getFunctionComponentName(Component) { + var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + return Component.displayName || Component.name || getFunctionName(Component) || fallback; +} + +function getWrappedName(outerType, innerType, wrapperName) { + var functionName = getFunctionComponentName(innerType); + return outerType.displayName || (functionName !== '' ? "".concat(wrapperName, "(").concat(functionName, ")") : wrapperName); +} +/** + * cherry-pick from + * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js + * originally forked from recompose/getDisplayName with added IE 11 support + * + * @param {React.ReactType} Component + * @returns {string | undefined} + */ + + +function getDisplayName(Component) { + if (Component == null) { + return undefined; + } + + if (typeof Component === 'string') { + return Component; + } + + if (typeof Component === 'function') { + return getFunctionComponentName(Component, 'Component'); + } + + if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(Component) === 'object') { + switch (Component.$$typeof) { + case react_is__WEBPACK_IMPORTED_MODULE_1__["ForwardRef"]: + return getWrappedName(Component, Component.render, 'ForwardRef'); + + case react_is__WEBPACK_IMPORTED_MODULE_1__["Memo"]: + return getWrappedName(Component, Component.type, 'memo'); + + default: + return undefined; + } + } + + return undefined; +} + +/***/ }), + +/***/ "qqlu": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("P7Gw") +var buildFormatLocale = __webpack_require__("ILGm") + +/** + * @category Locales + * @summary Danish locale. + * @author Anders B. Hansen [@Andersbiha]{@link https://github.com/Andersbiha} + * @author [@kgram]{@link https://github.com/kgram} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "qqvH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PROFILEECOGESTURE_DOCTYPE = void 0; +var PROFILEECOGESTURE_DOCTYPE = 'com.grandlyon.ecolyo.profileecogesture'; +exports.PROFILEECOGESTURE_DOCTYPE = PROFILEECOGESTURE_DOCTYPE; + +/***/ }), + +/***/ "qsPT": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _InputAdornment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("j8DG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _InputAdornment__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "qtRW": +/***/ (function(module, exports, __webpack_require__) { + +var trimmedEndIndex = __webpack_require__("S42a"); + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +module.exports = baseTrim; + + +/***/ }), + +/***/ "quFY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.3.6 Object.prototype.toString() +var classof = __webpack_require__("MrcW"); +var test = {}; +test[__webpack_require__("Yhpl")('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + __webpack_require__("iNsi")(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + + +/***/ }), + +/***/ "qy6m": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBatch", function() { return setBatch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBatch", function() { return getBatch; }); +// Default to a dummy "batch" implementation that just runs the callback +function defaultNoopBatch(callback) { + callback(); +} + +var batch = defaultNoopBatch; // Allow injecting another batching function later + +var setBatch = function setBatch(newBatch) { + return batch = newBatch; +}; // Supply a getter just to skip dealing with ESM bindings + +var getBatch = function getBatch() { + return batch; +}; + +/***/ }), + +/***/ "qzN0": +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__("R+nh"), + nativeKeys = __webpack_require__("flbY"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; + + +/***/ }), + +/***/ "r0Co": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__("VBgW"); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var hasPropertyDescriptors = __webpack_require__("ator")(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; // eslint-disable-line no-param-reassign + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ "r0ge": +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + + +/***/ }), + +/***/ "r1R0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TryCatch", function() { return TryCatch; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("uDQB"); + + + +const DEFAULT_EVENT_TARGET = [ + 'EventTarget', + 'Window', + 'Node', + 'ApplicationCache', + 'AudioTrackList', + 'ChannelMergerNode', + 'CryptoOperation', + 'EventSource', + 'FileReader', + 'HTMLUnknownElement', + 'IDBDatabase', + 'IDBRequest', + 'IDBTransaction', + 'KeyOperation', + 'MediaController', + 'MessagePort', + 'ModalWindow', + 'Notification', + 'SVGElementInstance', + 'Screen', + 'TextTrack', + 'TextTrackCue', + 'TextTrackList', + 'WebSocket', + 'WebSocketWorker', + 'Worker', + 'XMLHttpRequest', + 'XMLHttpRequestEventTarget', + 'XMLHttpRequestUpload', +]; + +/** Wrap timer functions and event targets to catch errors and provide better meta data */ +class TryCatch { + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'TryCatch';} + + /** + * @inheritDoc + */ + __init() {this.name = TryCatch.id;} + + /** JSDoc */ + + /** + * @inheritDoc + */ + constructor(options) {;TryCatch.prototype.__init.call(this); + this._options = { + XMLHttpRequest: true, + eventTarget: true, + requestAnimationFrame: true, + setInterval: true, + setTimeout: true, + ...options, + }; + } + + /** + * Wrap timer functions and event targets to catch errors + * and provide better metadata. + */ + setupOnce() { + if (this._options.setTimeout) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"], 'setTimeout', _wrapTimeFunction); + } + + if (this._options.setInterval) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"], 'setInterval', _wrapTimeFunction); + } + + if (this._options.requestAnimationFrame) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"], 'requestAnimationFrame', _wrapRAF); + } + + if (this._options.XMLHttpRequest && 'XMLHttpRequest' in _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"]) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(XMLHttpRequest.prototype, 'send', _wrapXHR); + } + + const eventTargetOption = this._options.eventTarget; + if (eventTargetOption) { + const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET; + eventTarget.forEach(_wrapEventTarget); + } + } +} TryCatch.__initStatic(); + +/** JSDoc */ +function _wrapTimeFunction(original) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function ( ...args) { + const originalCallback = args[0]; + args[0] = Object(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["wrap"])(originalCallback, { + mechanism: { + data: { function: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(original) }, + handled: true, + type: 'instrument', + }, + }); + return original.apply(this, args); + }; +} + +/** JSDoc */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function _wrapRAF(original) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function ( callback) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return original.apply(this, [ + Object(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["wrap"])(callback, { + mechanism: { + data: { + function: 'requestAnimationFrame', + handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(original), + }, + handled: true, + type: 'instrument', + }, + }), + ]); + }; +} + +/** JSDoc */ +function _wrapXHR(originalSend) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return function ( ...args) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const xhr = this; + const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange']; + + xmlHttpRequestProps.forEach(prop => { + if (prop in xhr && typeof xhr[prop] === 'function') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(xhr, prop, function (original) { + const wrapOptions = { + mechanism: { + data: { + function: prop, + handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(original), + }, + handled: true, + type: 'instrument', + }, + }; + + // If Instrument integration has been called before TryCatch, get the name of original function + const originalFunction = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getOriginalFunction"])(original); + if (originalFunction) { + wrapOptions.mechanism.data.handler = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(originalFunction); + } + + // Otherwise wrap directly + return Object(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["wrap"])(original, wrapOptions); + }); + } + }); + + return originalSend.apply(this, args); + }; +} + +/** JSDoc */ +function _wrapEventTarget(target) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const globalObject = _helpers_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"] ; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + const proto = globalObject[target] && globalObject[target].prototype; + + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins + if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { + return; + } + + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])(proto, 'addEventListener', function (original) + + { + return function ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + + eventName, + fn, + options, + ) { + try { + if (typeof fn.handleEvent === 'function') { + // ESlint disable explanation: + // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would + // introduce a bug here, because bind returns a new function that doesn't have our + // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping. + // Without those flags, every call to addEventListener wraps the function again, causing a memory leak. + // eslint-disable-next-line @typescript-eslint/unbound-method + fn.handleEvent = Object(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["wrap"])(fn.handleEvent, { + mechanism: { + data: { + function: 'handleEvent', + handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(fn), + target, + }, + handled: true, + type: 'instrument', + }, + }); + } + } catch (err) { + // can sometimes get 'Permission denied to access property "handle Event' + } + + return original.apply(this, [ + eventName, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Object(_helpers_js__WEBPACK_IMPORTED_MODULE_1__["wrap"])(fn , { + mechanism: { + data: { + function: 'addEventListener', + handler: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["getFunctionName"])(fn), + target, + }, + handled: true, + type: 'instrument', + }, + }), + options, + ]); + }; + }); + + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["fill"])( + proto, + 'removeEventListener', + function ( + originalRemoveEventListener, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ) { + return function ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + + eventName, + fn, + options, + ) { + /** + * There are 2 possible scenarios here: + * + * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified + * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function + * as a pass-through, and call original `removeEventListener` with it. + * + * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using + * our wrapped version of `addEventListener`, which internally calls `wrap` helper. + * This helper "wraps" whole callback inside a try/catch statement, and attached appropriate metadata to it, + * in order for us to make a distinction between wrapped/non-wrapped functions possible. + * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler. + * + * When someone adds a handler prior to initialization, and then do it again, but after, + * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible + * to get rid of the initial handler and it'd stick there forever. + */ + const wrappedEventHandler = fn ; + try { + const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__; + if (originalEventHandler) { + originalRemoveEventListener.call(this, eventName, originalEventHandler, options); + } + } catch (e) { + // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments + } + return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options); + }; + }, + ); +} + + +//# sourceMappingURL=trycatch.js.map + + +/***/ }), + +/***/ "r4+2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _NativeSelectInput__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("SpSB"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("71Jx"); +/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("OJkG"); +/* harmony import */ var _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("H1Bs"); +/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("pY8S"); + + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the select component `root` class. */ + root: {}, + + /* Styles applied to the select component `select` class. */ + select: { + '-moz-appearance': 'none', + // Reset + '-webkit-appearance': 'none', + // Reset + // When interacting quickly, the text can end up selected. + // Native select can't be selected either. + userSelect: 'none', + borderRadius: 0, + // Reset + minWidth: 16, + // So it doesn't collapse. + cursor: 'pointer', + '&:focus': { + // Show that it's not an text input + backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)', + borderRadius: 0 // Reset Chrome style + + }, + // Remove IE 11 arrow + '&::-ms-expand': { + display: 'none' + }, + '&$disabled': { + cursor: 'default' + }, + '&[multiple]': { + height: 'auto' + }, + '&:not([multiple]) option, &:not([multiple]) optgroup': { + backgroundColor: theme.palette.background.paper + }, + '&&': { + paddingRight: 24 + } + }, + + /* Styles applied to the select component if `variant="filled"`. */ + filled: { + '&&': { + paddingRight: 32 + } + }, + + /* Styles applied to the select component if `variant="outlined"`. */ + outlined: { + borderRadius: theme.shape.borderRadius, + '&&': { + paddingRight: 32 + } + }, + + /* Styles applied to the select component `selectMenu` class. */ + selectMenu: { + height: 'auto', + // Resets for multpile select with chips + minHeight: '1.1876em', + // Required for select\text-field height consistency + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + overflow: 'hidden' + }, + + /* Pseudo-class applied to the select component `disabled` class. */ + disabled: {}, + + /* Styles applied to the icon component. */ + icon: { + // We use a position absolute over a flexbox in order to forward the pointer events + // to the input and to support wrapping tags.. + position: 'absolute', + right: 0, + top: 'calc(50% - 12px)', + // Center vertically + pointerEvents: 'none', + // Don't block pointer events on the select under the icon. + color: theme.palette.action.active, + '&$disabled': { + color: theme.palette.action.disabled + } + }, + + /* Styles applied to the icon component if the popup is open. */ + iconOpen: { + transform: 'rotate(180deg)' + }, + + /* Styles applied to the icon component if `variant="filled"`. */ + iconFilled: { + right: 7 + }, + + /* Styles applied to the icon component if `variant="outlined"`. */ + iconOutlined: { + right: 7 + }, + + /* Styles applied to the underlying native input component. */ + nativeInput: { + bottom: 0, + left: 0, + position: 'absolute', + opacity: 0, + pointerEvents: 'none', + width: '100%' + } + }; +}; +var defaultInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Input__WEBPACK_IMPORTED_MODULE_9__["default"], null); +/** + * An alternative to `<Select native />` with a much smaller bundle size footprint. + */ + +var NativeSelect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function NativeSelect(props, ref) { + var children = props.children, + classes = props.classes, + _props$IconComponent = props.IconComponent, + IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_8__["default"] : _props$IconComponent, + _props$input = props.input, + input = _props$input === void 0 ? defaultInput : _props$input, + inputProps = props.inputProps, + variant = props.variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "IconComponent", "input", "inputProps", "variant"]); + + var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__["default"])(); + var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__["default"])({ + props: props, + muiFormControl: muiFormControl, + states: ['variant'] + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](input, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // Most of the logic is implemented in `NativeSelectInput`. + // The `Select` component is a simple API wrapper to expose something better to play with. + inputComponent: _NativeSelectInput__WEBPACK_IMPORTED_MODULE_4__["default"], + inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + children: children, + classes: classes, + IconComponent: IconComponent, + variant: fcs.variant, + type: undefined + }, inputProps, input ? input.props.inputProps : {}), + ref: ref + }, other)); +}); + false ? undefined : void 0; +NativeSelect.muiName = 'Select'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiNativeSelect' +})(NativeSelect)); + +/***/ }), + +/***/ "r87Y": +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.5 Object.freeze(O) +var isObject = __webpack_require__("pFmr"); +var meta = __webpack_require__("h/ey").onFreeze; + +__webpack_require__("80eX")('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + + +/***/ }), + +/***/ "rAU7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/proposal-string-pad-start-end +var $export = __webpack_require__("LRPZ"); +var $pad = __webpack_require__("mOnz"); +var userAgent = __webpack_require__("Wr43"); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + + +/***/ }), + +/***/ "rD74": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _arrayWithoutHoles; }); +/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("jUvS"); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr); +} + +/***/ }), + +/***/ "rDNs": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("huhy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Switch__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "rDuK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("C/f8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chainPropTypes", function() { return _chainPropTypes__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _deepmerge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y70I"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepmerge", function() { return _deepmerge__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _elementAcceptingRef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("axfH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAcceptingRef", function() { return _elementAcceptingRef__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _elementTypeAcceptingRef__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("yGHV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementTypeAcceptingRef", function() { return _elementTypeAcceptingRef__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _exactProp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("szez"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exactProp", function() { return _exactProp__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7oz+"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatMuiErrorMessage", function() { return _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _getDisplayName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("qor6"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDisplayName", function() { return _getDisplayName__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _HTMLElementType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ri9z"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HTMLElementType", function() { return _HTMLElementType__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _ponyfillGlobal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("e1g5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ponyfillGlobal", function() { return _ponyfillGlobal__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _refType__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3rvV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refType", function() { return _refType__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/** @license Material-UI v4.11.3 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + + + + + + + + + +/***/ }), + +/***/ "rEFp": +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__("LRPZ"); +var $parseInt = __webpack_require__("BtRI"); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + + +/***/ }), + +/***/ "rGC1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _exports__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+s9e"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["Provider"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["connectAdvanced"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["ReactReduxContext"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["connect"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useDispatch", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["useDispatch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDispatchHook", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["createDispatchHook"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useSelector", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["useSelector"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSelectorHook", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["createSelectorHook"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["useStore"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["createStoreHook"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shallowEqual", function() { return _exports__WEBPACK_IMPORTED_MODULE_0__["shallowEqual"]; }); + +/* harmony import */ var _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("s1Ap"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "batch", function() { return _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__["unstable_batchedUpdates"]; }); + +/* harmony import */ var _utils_batch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("qy6m"); + + + // Enable batched updates in our subscriptions for use +// with standard React renderers (ReactDOM, React Native) + +Object(_utils_batch__WEBPACK_IMPORTED_MODULE_2__["setBatch"])(_utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_1__["unstable_batchedUpdates"]); + + +/***/ }), + +/***/ "rGV6": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("Z4qh") +var buildFormatLocale = __webpack_require__("GXOL") + +/** + * @category Locales + * @summary Croatian locale. + * @author Matija Marohnić [@silvenon]{@link https://github.com/silvenon} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "rHzI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Settings", function() { return Settings; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GeFe"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Zvb3"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("J/YY"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1Fv"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("g3eI"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wDGE"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("IGOm"); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("iNHL"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("/yh+"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("7u78"); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("oVe4"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("xEu0"); +/* harmony import */ var cozy_client_dist__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var _SettingsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("o5KW"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("gc+w"); +/* harmony import */ var _queries__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("7txB"); +/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("f4Ug"); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + +var instanceModel = undefined; +var hasAnOffer = undefined; +var isFremiumFixed = undefined; + +if (cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["models"]) { + instanceModel = cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["models"].instance; // TODO fallback from cozy-client + + isFremiumFixed = function isFremiumFixed(data) { + var GB = 1000 * 1000 * 1000; + var PREMIUM_QUOTA = 50 * GB; + var quota = lodash_get__WEBPACK_IMPORTED_MODULE_10___default()(data, 'diskUsage.data.attributes.quota', false); + return parseInt(quota) < PREMIUM_QUOTA; + }; + + hasAnOffer = function hasAnOffer(data) { + return !instanceModel.isSelfHosted(data) && instanceModel.arePremiumLinksEnabled(data) && instanceModel.getUuid(data) && !isFremiumFixed(data); + }; +} + + + + + +var Settings = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Settings, _Component); + + var _super = _createSuper(Settings); + + function Settings(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Settings); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "onClickOutside", function (event) { + if (_this.props.isFetching || _this.state.opened) { + // if it's not a cozy-bar nav popup, close the opened popup + if (!_this.rootRef.contains(event.target)) { + _this.setState({ + opened: false + }); + + event.stopPropagation(); + } + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggleMenu", function () { + var stateUpdate = { + opened: false + }; // if popup already opened, stop here to close it + + if (_this.state.opened) return _this.setState(stateUpdate); // fetch data + + _this.props.fetchSettingsData(); + + _this.setState({ + opened: true + }); + }); + + _this.state = { + opened: false + }; + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Settings, [{ + key: "componentDidMount", + value: function componentDidMount() { + document.body.addEventListener('click', this.onClickOutside); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + document.body.removeEventListener('click', this.onClickOutside); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props = this.props, + isBusy = _this$props.isBusy, + logOut = _this$props.logOut, + _onLogOut = _this$props.onLogOut, + t = _this$props.t, + diskUsageQuery = _this$props.diskUsageQuery, + instanceQuery = _this$props.instanceQuery, + contextQuery = _this$props.contextQuery, + storageData = _this$props.storageData, + settingsAppURL = _this$props.settingsAppURL, + isFetching = _this$props.isFetching; + var shouldDisplayViewOfferButton = false; + var managerUrlPremiumLink; + var isFetchingFromQueries; + var canCheckPremium = Object(_helper__WEBPACK_IMPORTED_MODULE_18__["cozyClientCanCheckPremium"])(); + + if (canCheckPremium) { + isFetchingFromQueries = Object(_helper__WEBPACK_IMPORTED_MODULE_18__["isFetchingQueries"])([diskUsageQuery, instanceQuery, contextQuery]); + + if (!isFetchingFromQueries) { + var data = { + context: contextQuery, + diskUsage: diskUsageQuery, + instance: instanceQuery + }; + shouldDisplayViewOfferButton = instanceModel.shouldDisplayOffers(data) || hasAnOffer(data); + managerUrlPremiumLink = instanceModel.buildPremiumLink(data); + } + } + + var areAllFetchingDone = false; + + if (!canCheckPremium) { + areAllFetchingDone = !isFetching; + } else { + areAllFetchingDone = !isFetchingFromQueries && !isFetching; + } + + var opened = this.state.opened; + var openMenu = opened && areAllFetchingDone; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav coz-nav-settings", + ref: function ref(_ref) { + _this2.rootRef = _ref; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__["Button"], { + type: "button", + theme: "text", + onClick: this.toggleMenu, + className: "coz-nav-settings-btn", + "aria-controls": "coz-nav-pop--settings", + busy: isBusy, + icon: cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13___default.a, + label: t('menu.settings') + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav-pop coz-nav-pop--settings", + id: "coz-nav-pop--settings", + "aria-hidden": !openMenu + }, areAllFetchingDone && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_7___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_SettingsContent__WEBPACK_IMPORTED_MODULE_15__["default"], { + onLogOut: function onLogOut() { + if (_onLogOut && typeof _onLogOut === 'function') { + _onLogOut(); + } else { + logOut(); + } + }, + storageData: storageData, + settingsAppURL: settingsAppURL, + shoulDisplayViewOfferButton: shouldDisplayViewOfferButton, + managerUrlPremiumLink: managerUrlPremiumLink + })))); + } + }]); + + return Settings; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +var mapStateToProps = function mapStateToProps(state) { + return { + storageData: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["getStorageData"])(state), + settingsAppURL: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["getSettingsAppURL"])(state), + isBusy: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["isSettingsBusy"])(state), + isFetching: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["isFetchingSettings"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchSettingsData: function fetchSettingsData() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["fetchSettingsData"])()); + }, + logOut: function logOut() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["logOut"])()); + } + }; +}; + +var exported; + +if (Object(_helper__WEBPACK_IMPORTED_MODULE_18__["cozyClientCanCheckPremium"])()) { + exported = Object(redux__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])(), Object(cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["queryConnect"])({ + instanceQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["instanceReq"], + contextQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["contextReq"], + diskUsageQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["diskUsageReq"] + }), Object(react_redux__WEBPACK_IMPORTED_MODULE_8__["connect"])(mapStateToProps, mapDispatchToProps))(Settings); +} else { + exported = Object(redux__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])(), Object(react_redux__WEBPACK_IMPORTED_MODULE_8__["connect"])(mapStateToProps, mapDispatchToProps))(Settings); +} + +/* harmony default export */ __webpack_exports__["default"] = (exported); + +/***/ }), + +/***/ "rJpz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("fY06"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + padding: 16 + }, + + /* Styles applied to the avatar element. */ + avatar: { + flex: '0 0 auto', + marginRight: 16 + }, + + /* Styles applied to the action element. */ + action: { + flex: '0 0 auto', + alignSelf: 'flex-start', + marginTop: -8, + marginRight: -8 + }, + + /* Styles applied to the content wrapper element. */ + content: { + flex: '1 1 auto' + }, + + /* Styles applied to the title Typography element. */ + title: {}, + + /* Styles applied to the subheader Typography element. */ + subheader: {} +}; +var CardHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function CardHeader(props, ref) { + var action = props.action, + avatar = props.avatar, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$disableTypogra = props.disableTypography, + disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra, + subheaderProp = props.subheader, + subheaderTypographyProps = props.subheaderTypographyProps, + titleProp = props.title, + titleTypographyProps = props.titleTypographyProps, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["action", "avatar", "classes", "className", "component", "disableTypography", "subheader", "subheaderTypographyProps", "title", "titleTypographyProps"]); + + var title = titleProp; + + if (title != null && title.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__["default"] && !disableTypography) { + title = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + variant: avatar ? 'body2' : 'h5', + className: classes.title, + component: "span", + display: "block" + }, titleTypographyProps), title); + } + + var subheader = subheaderProp; + + if (subheader != null && subheader.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__["default"] && !disableTypography) { + subheader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Typography__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + variant: avatar ? 'body2' : 'body1', + className: classes.subheader, + color: "textSecondary", + component: "span", + display: "block" + }, subheaderTypographyProps), subheader); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other), avatar && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.avatar + }, avatar), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.content + }, title, subheader), action && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.action + }, action)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiCardHeader' +})(CardHeader)); + +/***/ }), + +/***/ "rMFn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("VFVQ"); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "colors", function() { return _colors__WEBPACK_IMPORTED_MODULE_0__; }); +/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yrWy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hexToRgb", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["hexToRgb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgbToHex", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["rgbToHex"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hslToRgb", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["hslToRgb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "decomposeColor", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["decomposeColor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recomposeColor", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["recomposeColor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getContrastRatio", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["getContrastRatio"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLuminance", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["getLuminance"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "emphasize", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["emphasize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fade", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["fade"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "alpha", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["alpha"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["darken"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["lighten"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTheme", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["createTheme"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMuiTheme", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["createMuiTheme"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstable_createMuiStrictModeTheme", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["unstable_createMuiStrictModeTheme"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStyles", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["createStyles"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeStyles", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["makeStyles"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "responsiveFontSizes", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["responsiveFontSizes"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styled", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["styled"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easing", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["easing"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "duration", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["duration"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useTheme", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["useTheme"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withStyles", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["withStyles"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["withTheme"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createGenerateClassName", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["createGenerateClassName"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "jssPreset", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["jssPreset"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheets", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["ServerStyleSheets"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesProvider", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["StylesProvider"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MuiThemeProvider", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["MuiThemeProvider"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThemeProvider", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__["ThemeProvider"]; }); + +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("DGfl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "capitalize", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["capitalize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createChainedFunction", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["createChainedFunction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSvgIcon", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["createSvgIcon"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["debounce"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deprecatedPropType", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["deprecatedPropType"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMuiElement", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["isMuiElement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ownerDocument", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["ownerDocument"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ownerWindow", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["ownerWindow"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "requirePropFactory", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["requirePropFactory"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setRef", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["setRef"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unsupportedProp", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["unsupportedProp"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useControlled", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["useControlled"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useEventCallback", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["useEventCallback"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useForkRef", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["useForkRef"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstable_useId", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["unstable_useId"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useIsFocusVisible", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["useIsFocusVisible"]; }); + +/* harmony import */ var _Accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("+e9u"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Accordion", function() { return _Accordion__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _AccordionActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("nbvd"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionActions", function() { return _AccordionActions__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _AccordionDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("9kEc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionDetails", function() { return _AccordionDetails__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _AccordionSummary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("j9eE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AccordionSummary", function() { return _AccordionSummary__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _AppBar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("9QuI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AppBar", function() { return _AppBar__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("EnG4"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Avatar", function() { return _Avatar__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("UHhX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Backdrop", function() { return _Backdrop__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Badge__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("TbkX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Badge", function() { return _Badge__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _BottomNavigation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("hMBH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BottomNavigation", function() { return _BottomNavigation__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("8oDz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BottomNavigationAction", function() { return _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("m9uD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Box", function() { return _Box__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styleFunction", function() { return _Box__WEBPACK_IMPORTED_MODULE_13__["styleFunction"]; }); + +/* harmony import */ var _Breadcrumbs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("UoK9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Breadcrumbs", function() { return _Breadcrumbs__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("49+2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Button", function() { return _Button__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("5ZEc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonBase", function() { return _ButtonBase__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ButtonGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("Guny"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ButtonGroup", function() { return _ButtonGroup__WEBPACK_IMPORTED_MODULE_17__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("xfUo"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Card", function() { return _Card__WEBPACK_IMPORTED_MODULE_18__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CardActionArea__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("Cg3G"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardActionArea", function() { return _CardActionArea__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CardActions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("HvLD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardActions", function() { return _CardActions__WEBPACK_IMPORTED_MODULE_20__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CardContent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("9T7s"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardContent", function() { return _CardContent__WEBPACK_IMPORTED_MODULE_21__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CardHeader__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("NZQu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardHeader", function() { return _CardHeader__WEBPACK_IMPORTED_MODULE_22__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CardMedia__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("TlDL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardMedia", function() { return _CardMedia__WEBPACK_IMPORTED_MODULE_23__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("UoGG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return _Checkbox__WEBPACK_IMPORTED_MODULE_24__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("HoPn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Chip", function() { return _Chip__WEBPACK_IMPORTED_MODULE_25__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CircularProgress__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("DkL9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CircularProgress", function() { return _CircularProgress__WEBPACK_IMPORTED_MODULE_26__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("QhNL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClickAwayListener", function() { return _ClickAwayListener__WEBPACK_IMPORTED_MODULE_27__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("3+Qv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Collapse", function() { return _Collapse__WEBPACK_IMPORTED_MODULE_28__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("tScC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Container", function() { return _Container__WEBPACK_IMPORTED_MODULE_29__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _CssBaseline__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("CeX8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssBaseline", function() { return _CssBaseline__WEBPACK_IMPORTED_MODULE_30__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__("L/1U"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dialog", function() { return _Dialog__WEBPACK_IMPORTED_MODULE_31__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _DialogActions__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__("8yBV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogActions", function() { return _DialogActions__WEBPACK_IMPORTED_MODULE_32__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _DialogContent__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__("QFLG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogContent", function() { return _DialogContent__WEBPACK_IMPORTED_MODULE_33__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _DialogContentText__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__("IoxZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogContentText", function() { return _DialogContentText__WEBPACK_IMPORTED_MODULE_34__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _DialogTitle__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__("SgOY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DialogTitle", function() { return _DialogTitle__WEBPACK_IMPORTED_MODULE_35__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__("EEw8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return _Divider__WEBPACK_IMPORTED_MODULE_36__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__("rwnD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Drawer", function() { return _Drawer__WEBPACK_IMPORTED_MODULE_37__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanel__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__("rtpW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpansionPanel", function() { return _ExpansionPanel__WEBPACK_IMPORTED_MODULE_38__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__("7zid"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpansionPanelActions", function() { return _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_39__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__("tucV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpansionPanelDetails", function() { return _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_40__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("aBQA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpansionPanelSummary", function() { return _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_41__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Fab__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__("GOo0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Fab", function() { return _Fab__WEBPACK_IMPORTED_MODULE_42__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__("NeVb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Fade", function() { return _Fade__WEBPACK_IMPORTED_MODULE_43__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__("FDZL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FilledInput", function() { return _FilledInput__WEBPACK_IMPORTED_MODULE_44__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__("F0EY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormControl", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_45__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useFormControl", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_45__["useFormControl"]; }); + +/* harmony import */ var _FormControlLabel__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__("nRDA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormControlLabel", function() { return _FormControlLabel__WEBPACK_IMPORTED_MODULE_46__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__("miZn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormGroup", function() { return _FormGroup__WEBPACK_IMPORTED_MODULE_47__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__("kpAa"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormHelperText", function() { return _FormHelperText__WEBPACK_IMPORTED_MODULE_48__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__("QRhp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormLabel", function() { return _FormLabel__WEBPACK_IMPORTED_MODULE_49__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__("3Ok2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return _Grid__WEBPACK_IMPORTED_MODULE_50__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _GridList__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__("28Sz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridList", function() { return _GridList__WEBPACK_IMPORTED_MODULE_51__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _GridListTile__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__("zjpK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridListTile", function() { return _GridListTile__WEBPACK_IMPORTED_MODULE_52__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _GridListTileBar__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__("sVer"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GridListTileBar", function() { return _GridListTileBar__WEBPACK_IMPORTED_MODULE_53__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__("hy/i"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Grow", function() { return _Grow__WEBPACK_IMPORTED_MODULE_54__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Hidden__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__("Udtv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hidden", function() { return _Hidden__WEBPACK_IMPORTED_MODULE_55__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__("yfQL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Icon", function() { return _Icon__WEBPACK_IMPORTED_MODULE_56__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__("x0Kp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IconButton", function() { return _IconButton__WEBPACK_IMPORTED_MODULE_57__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ImageList__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__("ycSH"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageList", function() { return _ImageList__WEBPACK_IMPORTED_MODULE_58__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ImageListItem__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__("KhxF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageListItem", function() { return _ImageListItem__WEBPACK_IMPORTED_MODULE_59__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ImageListItemBar__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__("liAc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ImageListItemBar", function() { return _ImageListItemBar__WEBPACK_IMPORTED_MODULE_60__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__("pY8S"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return _Input__WEBPACK_IMPORTED_MODULE_61__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _InputAdornment__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__("qsPT"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputAdornment", function() { return _InputAdornment__WEBPACK_IMPORTED_MODULE_62__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__("jiof"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputBase", function() { return _InputBase__WEBPACK_IMPORTED_MODULE_63__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__("agfW"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputLabel", function() { return _InputLabel__WEBPACK_IMPORTED_MODULE_64__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__("UQCX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LinearProgress", function() { return _LinearProgress__WEBPACK_IMPORTED_MODULE_65__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__("FFKy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return _Link__WEBPACK_IMPORTED_MODULE_66__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__("A2AU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _List__WEBPACK_IMPORTED_MODULE_67__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__("y9Ml"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItem", function() { return _ListItem__WEBPACK_IMPORTED_MODULE_68__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListItemAvatar__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__("WUED"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemAvatar", function() { return _ListItemAvatar__WEBPACK_IMPORTED_MODULE_69__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__("6Ry2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemIcon", function() { return _ListItemIcon__WEBPACK_IMPORTED_MODULE_70__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__("+gnj"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemSecondaryAction", function() { return _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_71__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__("cszB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemText", function() { return _ListItemText__WEBPACK_IMPORTED_MODULE_72__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _ListSubheader__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__("6veJ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListSubheader", function() { return _ListSubheader__WEBPACK_IMPORTED_MODULE_73__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Menu__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__("TMOa"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Menu", function() { return _Menu__WEBPACK_IMPORTED_MODULE_74__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__("DmM/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return _MenuItem__WEBPACK_IMPORTED_MODULE_75__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__("bMjX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MenuList", function() { return _MenuList__WEBPACK_IMPORTED_MODULE_76__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _MobileStepper__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__("1iUu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MobileStepper", function() { return _MobileStepper__WEBPACK_IMPORTED_MODULE_77__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__("q3D2"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return _Modal__WEBPACK_IMPORTED_MODULE_78__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ModalManager", function() { return _Modal__WEBPACK_IMPORTED_MODULE_78__["ModalManager"]; }); + +/* harmony import */ var _NativeSelect__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__("MJlQ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NativeSelect", function() { return _NativeSelect__WEBPACK_IMPORTED_MODULE_79__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__("M3Gw"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NoSsr", function() { return _NoSsr__WEBPACK_IMPORTED_MODULE_80__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__("BXyO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OutlinedInput", function() { return _OutlinedInput__WEBPACK_IMPORTED_MODULE_81__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__("VHzf"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Paper", function() { return _Paper__WEBPACK_IMPORTED_MODULE_82__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__("FXPY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popover", function() { return _Popover__WEBPACK_IMPORTED_MODULE_83__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__("Ukil"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popper", function() { return _Popper__WEBPACK_IMPORTED_MODULE_84__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__("wniO"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Portal", function() { return _Portal__WEBPACK_IMPORTED_MODULE_85__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Radio__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__("UYWi"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Radio", function() { return _Radio__WEBPACK_IMPORTED_MODULE_86__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _RadioGroup__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__("bG6h"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RadioGroup", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_87__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useRadioGroup", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_87__["useRadioGroup"]; }); + +/* harmony import */ var _RootRef__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__("q+gl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RootRef", function() { return _RootRef__WEBPACK_IMPORTED_MODULE_88__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__("pzK5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Select", function() { return _Select__WEBPACK_IMPORTED_MODULE_89__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__("pBYl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slide", function() { return _Slide__WEBPACK_IMPORTED_MODULE_90__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__("H3jZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return _Slider__WEBPACK_IMPORTED_MODULE_91__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Snackbar__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__("4733"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Snackbar", function() { return _Snackbar__WEBPACK_IMPORTED_MODULE_92__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__("DhWQ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SnackbarContent", function() { return _SnackbarContent__WEBPACK_IMPORTED_MODULE_93__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__("0VZR"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Step", function() { return _Step__WEBPACK_IMPORTED_MODULE_94__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StepButton__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__("QJRf"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepButton", function() { return _StepButton__WEBPACK_IMPORTED_MODULE_95__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__("miOE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepConnector", function() { return _StepConnector__WEBPACK_IMPORTED_MODULE_96__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StepContent__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__("eNUr"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepContent", function() { return _StepContent__WEBPACK_IMPORTED_MODULE_97__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__("nI8M"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepIcon", function() { return _StepIcon__WEBPACK_IMPORTED_MODULE_98__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__("XST7"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StepLabel", function() { return _StepLabel__WEBPACK_IMPORTED_MODULE_99__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Stepper__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__("MaEZ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stepper", function() { return _Stepper__WEBPACK_IMPORTED_MODULE_100__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__("ZbWQ"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIcon", function() { return _SvgIcon__WEBPACK_IMPORTED_MODULE_101__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__("u/C9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SwipeableDrawer", function() { return _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_102__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__("rDNs"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return _Switch__WEBPACK_IMPORTED_MODULE_103__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Tab__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__("5UXE"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tab", function() { return _Tab__WEBPACK_IMPORTED_MODULE_104__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__("QXd9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Table", function() { return _Table__WEBPACK_IMPORTED_MODULE_105__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableBody__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__("n0z0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableBody", function() { return _TableBody__WEBPACK_IMPORTED_MODULE_106__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__("sp9s"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableCell", function() { return _TableCell__WEBPACK_IMPORTED_MODULE_107__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableContainer__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__("bchS"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableContainer", function() { return _TableContainer__WEBPACK_IMPORTED_MODULE_108__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableFooter__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__("aloe"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableFooter", function() { return _TableFooter__WEBPACK_IMPORTED_MODULE_109__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableHead__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__("g7S5"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableHead", function() { return _TableHead__WEBPACK_IMPORTED_MODULE_110__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TablePagination__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__("Xg8z"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TablePagination", function() { return _TablePagination__WEBPACK_IMPORTED_MODULE_111__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableRow__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__("2T8D"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableRow", function() { return _TableRow__WEBPACK_IMPORTED_MODULE_112__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TableSortLabel__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__("TNNU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TableSortLabel", function() { return _TableSortLabel__WEBPACK_IMPORTED_MODULE_113__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Tabs__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__("ooY9"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tabs", function() { return _Tabs__WEBPACK_IMPORTED_MODULE_114__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__("apCG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TabScrollButton", function() { return _TabScrollButton__WEBPACK_IMPORTED_MODULE_115__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TextField__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__("6pUc"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextField", function() { return _TextField__WEBPACK_IMPORTED_MODULE_116__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__("joyL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextareaAutosize", function() { return _TextareaAutosize__WEBPACK_IMPORTED_MODULE_117__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__("tL2i"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Toolbar", function() { return _Toolbar__WEBPACK_IMPORTED_MODULE_118__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__("uaqx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Tooltip", function() { return _Tooltip__WEBPACK_IMPORTED_MODULE_119__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__("fY06"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Typography", function() { return _Typography__WEBPACK_IMPORTED_MODULE_120__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__("+buf"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Unstable_TrapFocus", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_121__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__("QXzx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useMediaQuery", function() { return _useMediaQuery__WEBPACK_IMPORTED_MODULE_122__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _useScrollTrigger__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__("xm2r"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useScrollTrigger", function() { return _useScrollTrigger__WEBPACK_IMPORTED_MODULE_123__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _withMobileDialog__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__("MZDC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withMobileDialog", function() { return _withMobileDialog__WEBPACK_IMPORTED_MODULE_124__["default"]; }); + +/* empty/unused harmony star reexport *//* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__("wWNu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withWidth", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_125__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWidthUp", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_125__["isWidthUp"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWidthDown", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_125__["isWidthDown"]; }); + +/* harmony import */ var _Zoom__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__("gr/X"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Zoom", function() { return _Zoom__WEBPACK_IMPORTED_MODULE_126__["default"]; }); + +/* empty/unused harmony star reexport *//** @license Material-UI v4.12.4 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +/* eslint-disable import/export */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // eslint-disable-next-line camelcase + + + + + + + + + + + + + + +/***/ }), + +/***/ "rO7t": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.doctype = void 0; +exports.getCozyClientFromOptions = getCozyClientFromOptions; +exports.getToken = getToken; +exports.getUrl = getUrl; +exports.hasBrowserContext = void 0; +exports.isOnline = isOnline; + +var _has = _interopRequireDefault(__webpack_require__("sFVN")); + +var _logger = _interopRequireDefault(__webpack_require__("o2qs")); + +/** + * If the current context is a browser context + * @type {string} + */ +var hasBrowserContext = typeof window !== 'undefined'; +/** + * The cozy Realtime doctype + * @type {string} + */ + +exports.hasBrowserContext = hasBrowserContext; +var doctype = 'io.cozy.websocket'; +/** + * Returns if the navigator is online + * + * @returns {boolean} true if online or unknown + */ + +exports.doctype = doctype; + +function isOnline() { + var hasOnline = (0, _has.default)(global, 'navigator.onLine'); + return hasOnline ? global.navigator.onLine : true; +} +/** + * Returns if the current instance URL is secure (HTTPS) + * + * @private + * @param {string|URL} url + * @returns {boolean} + */ + + +function isSecureUrl(url) { + return url.toString().match("^(https:/{2})"); +} +/** + * Get the instance URI from a cozy-client instance + * + * @private + * @param {CozyClient} client - CozyClient instance + * @return {string} Instance url + */ + + +function getInstanceUri(client) { + return client.getStackClient().uri; +} +/** + * Return websocket url from cozyClient + * + * @param {CozyClient} client - CozyClient instance + * @return {string} WebSocket url + */ + + +function getUrl(client) { + var url = getInstanceUri(client); + var protocol = isSecureUrl(url) ? 'wss:' : 'ws:'; + var host = new URL(url).host; + return "".concat(protocol, "//").concat(host, "/realtime/"); +} +/** + * Get the authorization token from cozy-client + * + * @param {CozyClient} client - CozyClient instance + * @return {string} authorization token + */ + + +function getToken(client) { + return client.getStackClient().getAccessToken(); +} +/** + * Get the cozy-client instance from an options object + * + * This function is here for compatibility with old calling + * code that may use a `cozyClient` property instead of the `client` one. + * + * @param {object} options + * @param {CozyClient} client - a cozy client instance + * @param {CozyClient} cozyClient - deprecated, a cozy client instance + * @returns {CozyClient} + */ + + +function getCozyClientFromOptions(_ref) { + var cozyClient = _ref.cozyClient, + client = _ref.client; + + if (cozyClient) { + _logger.default.warn('Passing a `cozyClient` parameter is deprecated, please use `client` instead'); + } else if (!client) { + _logger.default.warn('Realtime must be initialized with a client. Ex: `new Realtime({ client })`'); + } + + return client || cozyClient; +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "rPTK": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__("GMq6"); + +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("9YbP")(module))) + +/***/ }), + +/***/ "rRsv": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("SjuW") +var buildFormatLocale = __webpack_require__("yHKE") + +/** + * @category Locales + * @summary Thai locale. + * @author Athiwat Hirunworawongkun [@athivvat]{@link https://github.com/athivvat} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "rUPj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +var _require = __webpack_require__("5GZQ"), + filterLevel = _require.filterLevel, + filterSecrets = _require.filterSecrets; + +var Secret = __webpack_require__("TXAW"); + +var LOG_LEVEL = Object({"USE_REACT":true}).LOG_LEVEL; +var level = LOG_LEVEL || 'debug'; + +var format = __webpack_require__("zFEP"); + +var filters = [filterLevel, filterSecrets]; + +var filterOut = function filterOut() { + var _iterator = _createForOfIteratorHelper(filters), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var filter = _step.value; + + if (filter.apply(null, arguments) === false) { + return true; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return false; +}; +/** + * Use it to log messages in your konnector. Typical types are + * + * - `debug` + * - `warning` + * - `info` + * - `error` + * - `ok` + * + * + * @example + * + * They will be colored in development mode. In production mode, those logs are formatted in JSON to be interpreted by the stack and possibly sent to the client. `error` will stop the konnector. + * + * ```js + * logger = log('my-namespace') + * logger('debug', '365 bills') + * // my-namespace : debug : 365 bills + * logger('info', 'Page fetched') + * // my-namespace : info : Page fetched + * ``` + * @param {string} type + * @param {string} message + * @param {string} label + * @param {string} namespace + */ + + +function log(type, message, label, namespace) { + if (filterOut(level, type, message, label, namespace)) { + return; + } // eslint-disable-next-line no-console + + + console.log(format(type, message, label, namespace)); +} + +log.addFilter = function (filter) { + return filters.push(filter); +}; + +log.setLevel = function (lvl) { + level = lvl; +}; // Short-hands + + +var methods = ['debug', 'info', 'warn', 'error', 'ok', 'critical']; +methods.forEach(function (level) { + log[level] = function (message, label, namespace) { + return log(level, message, label, namespace); + }; +}); +module.exports = log; + +log.setNoRetry = function (obj) { + if (obj) obj.no_retry = true;else obj = { + no_retry: true + }; + return obj.no_retry; +}; + +log.Secret = Secret; + +log.namespace = function (namespace) { + return function (type, message, label) { + var ns = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : namespace; + log(type, message, label, ns); + }; +}; + +/***/ }), + +/***/ "rVhO": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = {}; +exports.default = void 0; +var _comGrandlyonEcolyoChallenge = __webpack_require__("A+qA"); +Object.keys(_comGrandlyonEcolyoChallenge).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoChallenge[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoChallenge[key]; + } + }); +}); +var _comGrandlyonEcolyoDuel = __webpack_require__("KhCG"); +Object.keys(_comGrandlyonEcolyoDuel).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoDuel[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoDuel[key]; + } + }); +}); +var _comGrandlyonEcolyoEcogesture = __webpack_require__("Hs6Q"); +Object.keys(_comGrandlyonEcolyoEcogesture).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoEcogesture[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoEcogesture[key]; + } + }); +}); +var _comGrandlyonEcolyoExploration = __webpack_require__("m7t9"); +Object.keys(_comGrandlyonEcolyoExploration).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoExploration[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoExploration[key]; + } + }); +}); +var _comGrandlyonEcolyoFluidsprices = __webpack_require__("mDvC"); +Object.keys(_comGrandlyonEcolyoFluidsprices).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoFluidsprices[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoFluidsprices[key]; + } + }); +}); +var _comGrandlyonEcolyoProfile = __webpack_require__("LGU+"); +Object.keys(_comGrandlyonEcolyoProfile).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoProfile[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoProfile[key]; + } + }); +}); +var _comGrandlyonEcolyoProfileecogesture = __webpack_require__("qqvH"); +Object.keys(_comGrandlyonEcolyoProfileecogesture).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoProfileecogesture[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoProfileecogesture[key]; + } + }); +}); +var _comGrandlyonEcolyoProfiletype = __webpack_require__("afv6"); +Object.keys(_comGrandlyonEcolyoProfiletype).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoProfiletype[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoProfiletype[key]; + } + }); +}); +var _comGrandlyonEcolyoQuiz = __webpack_require__("ezjQ"); +Object.keys(_comGrandlyonEcolyoQuiz).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoQuiz[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoQuiz[key]; + } + }); +}); +var _comGrandlyonEcolyoSchemas = __webpack_require__("bJ2n"); +Object.keys(_comGrandlyonEcolyoSchemas).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoSchemas[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoSchemas[key]; + } + }); +}); +var _comGrandlyonEcolyoUsageevent = __webpack_require__("Hjxl"); +Object.keys(_comGrandlyonEcolyoUsageevent).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoUsageevent[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoUsageevent[key]; + } + }); +}); +var _comGrandlyonEcolyoUserchallenge = __webpack_require__("Frtr"); +Object.keys(_comGrandlyonEcolyoUserchallenge).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEcolyoUserchallenge[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEcolyoUserchallenge[key]; + } + }); +}); +var _comGrandlyonEglDay = __webpack_require__("7ttI"); +Object.keys(_comGrandlyonEglDay).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEglDay[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEglDay[key]; + } + }); +}); +var _comGrandlyonEglMonth = __webpack_require__("jyuR"); +Object.keys(_comGrandlyonEglMonth).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEglMonth[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEglMonth[key]; + } + }); +}); +var _comGrandlyonEglYear = __webpack_require__("Q6yt"); +Object.keys(_comGrandlyonEglYear).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEglYear[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEglYear[key]; + } + }); +}); +var _comGrandlyonEnedisDay = __webpack_require__("Hv8/"); +Object.keys(_comGrandlyonEnedisDay).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisDay[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisDay[key]; + } + }); +}); +var _comGrandlyonEnedisMaxpower = __webpack_require__("e52Y"); +Object.keys(_comGrandlyonEnedisMaxpower).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisMaxpower[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisMaxpower[key]; + } + }); +}); +var _comGrandlyonEnedisMinute = __webpack_require__("Ycmd"); +Object.keys(_comGrandlyonEnedisMinute).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisMinute[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisMinute[key]; + } + }); +}); +var _comGrandlyonEnedisMonth = __webpack_require__("5skM"); +Object.keys(_comGrandlyonEnedisMonth).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisMonth[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisMonth[key]; + } + }); +}); +var _comGrandlyonEnedisMonthlyAnalysisData = __webpack_require__("mcBX"); +Object.keys(_comGrandlyonEnedisMonthlyAnalysisData).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisMonthlyAnalysisData[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisMonthlyAnalysisData[key]; + } + }); +}); +var _comGrandlyonEnedisYear = __webpack_require__("Z3Ar"); +Object.keys(_comGrandlyonEnedisYear).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonEnedisYear[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonEnedisYear[key]; + } + }); +}); +var _comGrandlyonGrdfDay = __webpack_require__("6wVF"); +Object.keys(_comGrandlyonGrdfDay).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonGrdfDay[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonGrdfDay[key]; + } + }); +}); +var _comGrandlyonGrdfMonth = __webpack_require__("omwZ"); +Object.keys(_comGrandlyonGrdfMonth).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonGrdfMonth[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonGrdfMonth[key]; + } + }); +}); +var _comGrandlyonGrdfYear = __webpack_require__("0qf9"); +Object.keys(_comGrandlyonGrdfYear).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _comGrandlyonGrdfYear[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _comGrandlyonGrdfYear[key]; + } + }); +}); +var _ioCozyAccounts = __webpack_require__("bU5U"); +Object.keys(_ioCozyAccounts).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _ioCozyAccounts[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ioCozyAccounts[key]; + } + }); +}); +var _ioCozyJobs = __webpack_require__("qg+p"); +Object.keys(_ioCozyJobs).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _ioCozyJobs[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ioCozyJobs[key]; + } + }); +}); +var _ioCozyKonnectors = __webpack_require__("lXRw"); +Object.keys(_ioCozyKonnectors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _ioCozyKonnectors[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ioCozyKonnectors[key]; + } + }); +}); +var _ioCozyTerms = __webpack_require__("zTau"); +Object.keys(_ioCozyTerms).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _ioCozyTerms[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ioCozyTerms[key]; + } + }); +}); +var _ioCozyTriggers = __webpack_require__("g01W"); +Object.keys(_ioCozyTriggers).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _ioCozyTriggers[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _ioCozyTriggers[key]; + } + }); +}); +var _orgEcolyo = __webpack_require__("cuZE"); +Object.keys(_orgEcolyo).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _orgEcolyo[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _orgEcolyo[key]; + } + }); +}); +var _orgEcolyoAgentCustom = __webpack_require__("jpom"); +Object.keys(_orgEcolyoAgentCustom).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _orgEcolyoAgentCustom[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _orgEcolyoAgentCustom[key]; + } + }); +}); +var _orgEcolyoAgentPartners = __webpack_require__("LjkH"); +Object.keys(_orgEcolyoAgentPartners).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _orgEcolyoAgentPartners[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _orgEcolyoAgentPartners[key]; + } + }); +}); +var _orgEcolyoAgent = __webpack_require__("JyrR"); +Object.keys(_orgEcolyoAgent).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _orgEcolyoAgent[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _orgEcolyoAgent[key]; + } + }); +}); +var _orgEcolyo2 = __webpack_require__("jdmM"); +Object.keys(_orgEcolyo2).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _orgEcolyo2[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _orgEcolyo2[key]; + } + }); +}); +// the documents schema, necessary for CozyClient +var doctypes = { + enedisyear: { + doctype: _comGrandlyonEnedisYear.ENEDIS_YEAR_DOCTYPE, + attributes: {}, + relationships: {} + }, + enedismonth: { + doctype: _comGrandlyonEnedisMonth.ENEDIS_MONTH_DOCTYPE, + attributes: {}, + relationships: {} + }, + enedisday: { + doctype: _comGrandlyonEnedisDay.ENEDIS_DAY_DOCTYPE, + attributes: {}, + relationships: {} + }, + enedisminute: { + doctype: _comGrandlyonEnedisMinute.ENEDIS_MINUTE_DOCTYPE, + attributes: {}, + relationships: {} + }, + grdfyear: { + doctype: _comGrandlyonGrdfYear.GRDF_YEAR_DOCTYPE, + attributes: {}, + relationships: {} + }, + grdfmonth: { + doctype: _comGrandlyonGrdfMonth.GRDF_MONTH_DOCTYPE, + attributes: {}, + relationships: {} + }, + grdfday: { + doctype: _comGrandlyonGrdfDay.GRDF_DAY_DOCTYPE, + attributes: {}, + relationships: {} + }, + eglyear: { + doctype: _comGrandlyonEglYear.EGL_YEAR_DOCTYPE, + attributes: {}, + relationships: {} + }, + eglmonth: { + doctype: _comGrandlyonEglMonth.EGL_MONTH_DOCTYPE, + attributes: {}, + relationships: {} + }, + eglday: { + doctype: _comGrandlyonEglDay.EGL_DAY_DOCTYPE, + attributes: {}, + relationships: {} + }, + konnectors: { + doctype: _ioCozyKonnectors.KONNECTORS_DOCTYPE, + attributes: {}, + relationships: {} + }, + accounts: { + doctype: _ioCozyAccounts.ACCOUNTS_DOCTYPE, + attributes: {}, + relationships: {} + }, + jobs: { + doctype: _ioCozyJobs.JOBS_DOCTYPE, + attributes: {}, + relationships: {} + }, + terms: { + doctype: _ioCozyTerms.TERMS_DOCTYPE, + attributes: {}, + relationships: {} + }, + ecogesture: { + doctype: _comGrandlyonEcolyoEcogesture.ECOGESTURE_DOCTYPE, + attributes: {}, + relationships: {} + }, + profile: { + doctype: _comGrandlyonEcolyoProfile.PROFILE_DOCTYPE, + attributes: {}, + relationships: {} + }, + profiletype: { + doctype: _comGrandlyonEcolyoProfiletype.PROFILETYPE_DOCTYPE, + attributes: {}, + relationships: {} + }, + challenge: { + doctype: _comGrandlyonEcolyoChallenge.CHALLENGE_DOCTYPE, + attributes: {}, + relationships: { + quiz: { + doctype: _comGrandlyonEcolyoQuiz.QUIZ_DOCTYPE, + type: 'has-one' + }, + duel: { + doctype: _comGrandlyonEcolyoDuel.DUEL_DOCTYPE, + type: 'has-one' + }, + exploration: { + doctype: _comGrandlyonEcolyoExploration.EXPLORATION_DOCTYPE, + type: 'has-many' + } + } + }, + userchallenge: { + doctype: _comGrandlyonEcolyoUserchallenge.USERCHALLENGE_DOCTYPE, + attributes: {}, + relationships: {} + }, + duel: { + doctype: _comGrandlyonEcolyoDuel.DUEL_DOCTYPE, + attributes: {}, + relationships: {} + }, + quiz: { + doctype: _comGrandlyonEcolyoQuiz.QUIZ_DOCTYPE, + attributes: {}, + relationships: {} + }, + exploration: { + doctype: _comGrandlyonEcolyoExploration.EXPLORATION_DOCTYPE, + attributes: {}, + relationships: {} + }, + usageevents: { + doctype: _comGrandlyonEcolyoUsageevent.USAGEEVENT_DOCTYPE, + attributes: {}, + relationships: {} + }, + schemas: { + doctype: _comGrandlyonEcolyoSchemas.SCHEMAS_DOCTYPE, + attributes: {}, + relationships: {} + }, + fluidsPrices: { + doctype: _comGrandlyonEcolyoFluidsprices.FLUIDSPRICES_DOCTYPE, + attributes: {}, + relationships: {} + }, + enedismonthlyanalysisdata: { + doctype: _comGrandlyonEnedisMonthlyAnalysisData.ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE, + attributes: {}, + relationships: {} + }, + enedismaxpower: { + doctype: _comGrandlyonEnedisMaxpower.ENEDIS_MAXPOWER_DOCTYPE, + attributes: {}, + relationships: {} + }, + profileecogesture: { + doctype: _comGrandlyonEcolyoProfileecogesture.PROFILEECOGESTURE_DOCTYPE, + attributes: {}, + relationships: {} + } +}; +var _default = doctypes; // export all doctypes for the application +exports.default = _default; + +/***/ }), + +/***/ "rXT6": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'менш секунды', + other: 'менш {{count}} секунд' + }, + + xSeconds: { + one: '1 секунда', + other: '{{count}} секунд(-ы)' + }, + + halfAMinute: 'паўхвіліны', + + lessThanXMinutes: { + one: 'менш хвіліны', + other: 'менш {{count}} хвілін' + }, + + xMinutes: { + one: '1 хвіліна', + other: '{{count}} хвілін(-ы)' + }, + + aboutXHours: { + one: 'каля 1 гадзіны', + other: 'каля {{count}} гадзін' + }, + + xHours: { + one: '1 гадзіна', + other: '{{count}} гадзін(-ы)' + }, + + xDays: { + one: '1 дзень', + other: '{{count}} дні (дзён)' + }, + + aboutXMonths: { + one: 'каля 1 месяца', + other: 'каля {{count}} месяцаў' + }, + + xMonths: { + one: '1 месяц', + other: '{{count}} месяцы(-аў)' + }, + + aboutXYears: { + one: 'каля 1 года', + other: 'каля {{count}} гадоў' + }, + + xYears: { + one: '1 год', + other: '{{count}} гады(гадоў)' + }, + + overXYears: { + one: 'больш 1 года', + other: 'больш {{count}} гадоў' + }, + + almostXYears: { + one: 'амаль 1 год', + other: 'амаль {{count}} гады(-оў)' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'у/праз ' + result + } else { + return result + ' таму' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "rYRw": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"), + root = __webpack_require__("GMq6"); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; + + +/***/ }), + +/***/ "rYdZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initAndBind", function() { return initAndBind; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("l3L7"); + + + +/** A class object that can instantiate Client objects. */ + +/** + * Internal function to create a new SDK client instance. The client is + * installed and then bound to the current scope. + * + * @param clientClass The client class to instantiate. + * @param options Options to pass to the client. + */ +function initAndBind( + clientClass, + options, +) { + if (options.debug === true) { + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].enable(); + } else { + // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped + // eslint-disable-next-line no-console + console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.'); + } + } + const hub = Object(_hub_js__WEBPACK_IMPORTED_MODULE_1__["getCurrentHub"])(); + const scope = hub.getScope(); + if (scope) { + scope.update(options.initialScope); + } + + const client = new clientClass(options); + hub.bindClient(client); +} + + +//# sourceMappingURL=sdk.js.map + + +/***/ }), + +/***/ "rZ9V": +/***/ (function(module, exports, __webpack_require__) { + +var listCacheClear = __webpack_require__("s44W"), + listCacheDelete = __webpack_require__("9Cpk"), + listCacheGet = __webpack_require__("x9yZ"), + listCacheHas = __webpack_require__("TCx2"), + listCacheSet = __webpack_require__("cSIU"); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; + + +/***/ }), + +/***/ "rZdQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutProperties; }); +/* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6vz+"); + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = Object(_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(source, excluded); + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +/***/ }), + +/***/ "rfY1": +/***/ (function(module, exports) { + +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; + + +/***/ }), + +/***/ "rh8z": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isMagicLink = exports.isOIDC = void 0; + +/** + * Checks if the instance can auth with OIDC + * + * @param {import("../CozyClient").default} client - The CozyClient instance + * @returns {boolean} - Returns true if the instance can auth with OIDC + */ +var isOIDC = function isOIDC(client) { + var _client$capabilities$; + + return (_client$capabilities$ = client.capabilities.can_auth_with_oidc) !== null && _client$capabilities$ !== void 0 ? _client$capabilities$ : false; +}; +/** + * Checks if the instance can auth with magic link + * + * @param {import("../CozyClient").default} client - The CozyClient instance + * @returns {boolean} - Returns true if the instance can auth with magic link + */ + + +exports.isOIDC = isOIDC; + +var isMagicLink = function isMagicLink(client) { + var _client$capabilities$2; + + return (_client$capabilities$2 = client.capabilities.can_auth_with_magic_links) !== null && _client$capabilities$2 !== void 0 ? _client$capabilities$2 : false; +}; + +exports.isMagicLink = isMagicLink; + +/***/ }), + +/***/ "ri9z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return HTMLElementType; }); +function HTMLElementType(props, propName, componentName, location, propFullName) { + if (true) { + return null; + } + + var propValue = props[propName]; + var safePropName = propFullName || propName; + + if (propValue == null) { + return null; + } + + if (propValue && propValue.nodeType !== 1) { + return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an HTMLElement."); + } + + return null; +} + +/***/ }), + +/***/ "riUr": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'kurang dari 1 detik', + other: 'kurang dari {{count}} detik' + }, + + xSeconds: { + one: '1 detik', + other: '{{count}} detik' + }, + + halfAMinute: 'setengah menit', + + lessThanXMinutes: { + one: 'kurang dari 1 menit', + other: 'kurang dari {{count}} menit' + }, + + xMinutes: { + one: '1 menit', + other: '{{count}} menit' + }, + + aboutXHours: { + one: 'sekitar 1 jam', + other: 'sekitar {{count}} jam' + }, + + xHours: { + one: '1 jam', + other: '{{count}} jam' + }, + + xDays: { + one: '1 hari', + other: '{{count}} hari' + }, + + aboutXMonths: { + one: 'sekitar 1 bulan', + other: 'sekitar {{count}} bulan' + }, + + xMonths: { + one: '1 bulan', + other: '{{count}} bulan' + }, + + aboutXYears: { + one: 'sekitar 1 tahun', + other: 'sekitar {{count}} tahun' + }, + + xYears: { + one: '1 tahun', + other: '{{count}} tahun' + }, + + overXYears: { + one: 'lebih dari 1 tahun', + other: 'lebih dari {{count}} tahun' + }, + + almostXYears: { + one: 'hampir 1 tahun', + other: 'hampir {{count}} tahun' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'dalam waktu ' + result + } else { + return result + ' yang lalu' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "rlNI": +/***/ (function(module, exports, __webpack_require__) { + +var createBaseFor = __webpack_require__("WC1d"); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; + + +/***/ }), + +/***/ "rqvO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modes", function() { return modes; }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("I4/v"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Transition__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("lbMJ"); +/* harmony import */ var _TransitionGroupContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("LRcO"); + + +var _leaveRenders, _enterRenders; + + + + + + +function areChildrenDifferent(oldChildren, newChildren) { + if (oldChildren === newChildren) return false; + + if (react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(oldChildren) && react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(newChildren) && oldChildren.key != null && oldChildren.key === newChildren.key) { + return false; + } + + return true; +} +/** + * Enum of modes for SwitchTransition component + * @enum { string } + */ + + +var modes = { + out: 'out-in', + in: 'in-out' +}; + +var callHook = function callHook(element, name, cb) { + return function () { + var _element$props; + + element.props[name] && (_element$props = element.props)[name].apply(_element$props, arguments); + cb(); + }; +}; + +var leaveRenders = (_leaveRenders = {}, _leaveRenders[modes.out] = function (_ref) { + var current = _ref.current, + changeState = _ref.changeState; + return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(current, { + in: false, + onExited: callHook(current, 'onExited', function () { + changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERING"], null); + }) + }); +}, _leaveRenders[modes.in] = function (_ref2) { + var current = _ref2.current, + changeState = _ref2.changeState, + children = _ref2.children; + return [current, react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, { + in: true, + onEntered: callHook(children, 'onEntered', function () { + changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERING"]); + }) + })]; +}, _leaveRenders); +var enterRenders = (_enterRenders = {}, _enterRenders[modes.out] = function (_ref3) { + var children = _ref3.children, + changeState = _ref3.changeState; + return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, { + in: true, + onEntered: callHook(children, 'onEntered', function () { + changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERED"], react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, { + in: true + })); + }) + }); +}, _enterRenders[modes.in] = function (_ref4) { + var current = _ref4.current, + children = _ref4.children, + changeState = _ref4.changeState; + return [react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(current, { + in: false, + onExited: callHook(current, 'onExited', function () { + changeState(_Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERED"], react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, { + in: true + })); + }) + }), react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(children, { + in: true + })]; +}, _enterRenders); +/** + * A transition component inspired by the [vue transition modes](https://vuejs.org/v2/guide/transitions.html#Transition-Modes). + * You can use it when you want to control the render between state transitions. + * Based on the selected mode and the child's key which is the `Transition` or `CSSTransition` component, the `SwitchTransition` makes a consistent transition between them. + * + * If the `out-in` mode is selected, the `SwitchTransition` waits until the old child leaves and then inserts a new child. + * If the `in-out` mode is selected, the `SwitchTransition` inserts a new child first, waits for the new child to enter and then removes the old child. + * + * **Note**: If you want the animation to happen simultaneously + * (that is, to have the old child removed and a new child inserted **at the same time**), + * you should use + * [`TransitionGroup`](https://reactcommunity.org/react-transition-group/transition-group) + * instead. + * + * ```jsx + * function App() { + * const [state, setState] = useState(false); + * return ( + * <SwitchTransition> + * <CSSTransition + * key={state ? "Goodbye, world!" : "Hello, world!"} + * addEndListener={(node, done) => node.addEventListener("transitionend", done, false)} + * classNames='fade' + * > + * <button onClick={() => setState(state => !state)}> + * {state ? "Goodbye, world!" : "Hello, world!"} + * </button> + * </CSSTransition> + * </SwitchTransition> + * ); + * } + * ``` + * + * ```css + * .fade-enter{ + * opacity: 0; + * } + * .fade-exit{ + * opacity: 1; + * } + * .fade-enter-active{ + * opacity: 1; + * } + * .fade-exit-active{ + * opacity: 0; + * } + * .fade-enter-active, + * .fade-exit-active{ + * transition: opacity 500ms; + * } + * ``` + */ + +var SwitchTransition = /*#__PURE__*/function (_React$Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(SwitchTransition, _React$Component); + + function SwitchTransition() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; + _this.state = { + status: _Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERED"], + current: null + }; + _this.appeared = false; + + _this.changeState = function (status, current) { + if (current === void 0) { + current = _this.state.current; + } + + _this.setState({ + status: status, + current: current + }); + }; + + return _this; + } + + var _proto = SwitchTransition.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.appeared = true; + }; + + SwitchTransition.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) { + if (props.children == null) { + return { + current: null + }; + } + + if (state.status === _Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERING"] && props.mode === modes.in) { + return { + status: _Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERING"] + }; + } + + if (state.current && areChildrenDifferent(state.current, props.children)) { + return { + status: _Transition__WEBPACK_IMPORTED_MODULE_3__["EXITING"] + }; + } + + return { + current: react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(props.children, { + in: true + }) + }; + }; + + _proto.render = function render() { + var _this$props = this.props, + children = _this$props.children, + mode = _this$props.mode, + _this$state = this.state, + status = _this$state.status, + current = _this$state.current; + var data = { + children: children, + current: current, + changeState: this.changeState, + status: status + }; + var component; + + switch (status) { + case _Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERING"]: + component = enterRenders[mode](data); + break; + + case _Transition__WEBPACK_IMPORTED_MODULE_3__["EXITING"]: + component = leaveRenders[mode](data); + break; + + case _Transition__WEBPACK_IMPORTED_MODULE_3__["ENTERED"]: + component = current; + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_TransitionGroupContext__WEBPACK_IMPORTED_MODULE_4__["default"].Provider, { + value: { + isMounting: !this.appeared + } + }, component); + }; + + return SwitchTransition; +}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component); + +SwitchTransition.propTypes = false ? undefined : {}; +SwitchTransition.defaultProps = { + mode: modes.out +}; +/* harmony default export */ __webpack_exports__["default"] = (SwitchTransition); + +/***/ }), + +/***/ "rtpW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ExpansionPanel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fPEb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ExpansionPanel__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "rufD": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.useNativeIntent = void 0; + +var _react = __webpack_require__("ivGQ"); + +var _view = __webpack_require__("7zRI"); + +var useNativeIntent = function useNativeIntent() { + return (0, _react.useContext)(_view.NativeContext); +}; + +exports.useNativeIntent = useNativeIntent; + +/***/ }), + +/***/ "rvVj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__("eckd"); +var sameValue = __webpack_require__("NMJ8"); +var regExpExec = __webpack_require__("PA8a"); + +// @@search logic +__webpack_require__("dRmG")('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + + +/***/ }), + +/***/ "rwnD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fIGU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Drawer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "s1Ap": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstable_batchedUpdates", function() { return react_dom__WEBPACK_IMPORTED_MODULE_0__["unstable_batchedUpdates"]; }); + +/* eslint-disable import/no-unresolved */ + + +/***/ }), + +/***/ "s44W": +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + + +/***/ }), + +/***/ "sAcZ": +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__("g6ov"), + getSymbols = __webpack_require__("b7tc"), + keys = __webpack_require__("NHjt"); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; + + +/***/ }), + +/***/ "sAh9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.extractAndMergeDocument = exports.getCollectionFromSlice = exports.getDocumentFromSlice = exports.default = exports.mergeDocumentsWithRelationships = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _keyBy = _interopRequireDefault(__webpack_require__("3UCn")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _isEqual = _interopRequireDefault(__webpack_require__("+KM7")); + +var _omit = _interopRequireDefault(__webpack_require__("RjO1")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +var _queries = __webpack_require__("8K8d"); + +var _dsl = __webpack_require__("v2kV"); + +var _mutations = __webpack_require__("1I2P"); + +var _helpers = __webpack_require__("ZGxo"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var storeDocument = function storeDocument(state, document) { + var type = document._type; + + if (!type) { + if (false) {} + + throw new Error('Document without _type'); + } + + if (!(0, _helpers.properId)(document)) { + if (false) {} + + throw new Error('Document without id'); + } + + var existingDoc = (0, _get.default)(state, [type, (0, _helpers.properId)(document)]); + + if ((0, _isEqual.default)(existingDoc, document)) { + return state; + } else { + return _objectSpread(_objectSpread({}, state), {}, (0, _defineProperty2.default)({}, type, _objectSpread(_objectSpread({}, state[type]), {}, (0, _defineProperty2.default)({}, (0, _helpers.properId)(document), mergeDocumentsWithRelationships(existingDoc, document))))); + } +}; + +var mergeDocumentsWithRelationships = function mergeDocumentsWithRelationships() { + var prevDocument = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var nextDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + /** + * @type {import("../types").CozyClientDocument} + */ + var merged = _objectSpread(_objectSpread({}, prevDocument), nextDocument); + + if (prevDocument.relationships || nextDocument.relationships) merged.relationships = _objectSpread(_objectSpread({}, prevDocument.relationships), nextDocument.relationships); + return merged; +}; // reducer + + +exports.mergeDocumentsWithRelationships = mergeDocumentsWithRelationships; + +var documents = function documents() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (!(0, _queries.isReceivingData)(action) && !(0, _mutations.isReceivingMutationResult)(action)) { + return state; + } + + if (action && action.definition && action.definition.mutationType === _dsl.MutationTypes.DELETE_DOCUMENT) { + var docId = action.definition.document._id; + var _type = action.definition.document._type; + return _objectSpread(_objectSpread({}, state), {}, (0, _defineProperty2.default)({}, _type, (0, _omit.default)(state[_type], docId))); + } + + var _action$response = action.response, + data = _action$response.data, + included = _action$response.included; + if (!data || Array.isArray(data) && data.length === 0) return state; + var updatedStateWithIncluded = included ? included.reduce(storeDocument, state) : state; + + if (!Array.isArray(data)) { + return storeDocument(updatedStateWithIncluded, data); + } + + return extractAndMergeDocument(data, updatedStateWithIncluded); +}; + +var _default = documents; // selector + +exports.default = _default; + +var getDocumentFromSlice = function getDocumentFromSlice() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var doctype = arguments.length > 1 ? arguments[1] : undefined; + var id = arguments.length > 2 ? arguments[2] : undefined; + + if (!doctype) { + throw new Error('getDocumentFromSlice: Cannot retrieve document with undefined doctype'); + } + + if (!id) { + throw new Error('getDocumentFromSlice: Cannot retrieve document with undefined id'); + } + + if (!state[doctype]) { + if (false) {} + + return null; + } else if (!state[doctype][id]) { + if (false) {} + + return null; + } + + return state[doctype][id]; +}; + +exports.getDocumentFromSlice = getDocumentFromSlice; + +var getCollectionFromSlice = function getCollectionFromSlice() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var doctype = arguments.length > 1 ? arguments[1] : undefined; + + if (!doctype) { + throw new Error('getDocumentFromSlice: Cannot retrieve document with undefined doctype'); + } + + if (!state[doctype]) { + if (false) {} + + return null; + } + + return Object.values(state[doctype]); +}; +/* + This method has been created in order to get a returned object + in `data` with the full set on information coming potentially from + `included` + + This method should be somewhere else. The `document` shall not be + dealt with included / data and so on. + + This method takes `data` and `included` and merge both sources + together. It should be always up-to-date. The returned object + will be as full of information as it can be. +*/ + + +exports.getCollectionFromSlice = getCollectionFromSlice; + +var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStateWithIncluded) { + var doctype = data[0]._type; + + if (!doctype) { + _logger.default.info('Document without _type', data[0]); + + throw new Error('Document without _type'); + } + + var sortedData = (0, _keyBy.default)(data, _helpers.properId); + var mergedData = Object.assign({}, updatedStateWithIncluded); + mergedData[doctype] = Object.assign({}, updatedStateWithIncluded[doctype]); + Object.values(sortedData).map(function (data) { + var id = (0, _helpers.properId)(data); + + if (mergedData[doctype][id]) { + mergedData[doctype][id] = (0, _merge.default)({}, mergedData[doctype][id], data); + } else { + mergedData[doctype][id] = data; + } + }); + return mergedData; +}; + +exports.extractAndMergeDocument = extractAndMergeDocument; + +/***/ }), + +/***/ "sCdB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "color", function() { return color; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bgcolor", function() { return bgcolor; }); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1GsC"); +/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("3pU+"); + + +var color = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'color', + themeKey: 'palette' +}); +var bgcolor = Object(_style__WEBPACK_IMPORTED_MODULE_0__["default"])({ + prop: 'bgcolor', + cssProperty: 'backgroundColor', + themeKey: 'palette' +}); +var palette = Object(_compose__WEBPACK_IMPORTED_MODULE_1__["default"])(color, bgcolor); +/* harmony default export */ __webpack_exports__["default"] = (palette); + +/***/ }), + +/***/ "sDxG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createUnarySpacing", function() { return createUnarySpacing; }); +/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZP3U"); +/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("tTZ/"); +/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("UCvF"); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("3AVn"); +/* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("BwJO"); + + + + + +var properties = { + m: 'margin', + p: 'padding' +}; +var directions = { + t: 'Top', + r: 'Right', + b: 'Bottom', + l: 'Left', + x: ['Left', 'Right'], + y: ['Top', 'Bottom'] +}; +var aliases = { + marginX: 'mx', + marginY: 'my', + paddingX: 'px', + paddingY: 'py' +}; // memoize() impact: +// From 300,000 ops/sec +// To 350,000 ops/sec + +var getCssProperties = Object(_memoize__WEBPACK_IMPORTED_MODULE_4__["default"])(function (prop) { + // It's not a shorthand notation. + if (prop.length > 2) { + if (aliases[prop]) { + prop = aliases[prop]; + } else { + return [prop]; + } + } + + var _prop$split = prop.split(''), + _prop$split2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_prop$split, 2), + a = _prop$split2[0], + b = _prop$split2[1]; + + var property = properties[a]; + var direction = directions[b] || ''; + return Array.isArray(direction) ? direction.map(function (dir) { + return property + dir; + }) : [property + direction]; +}); +var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY']; +function createUnarySpacing(theme) { + var themeSpacing = theme.spacing || 8; + + if (typeof themeSpacing === 'number') { + return function (abs) { + if (false) {} + + return themeSpacing * abs; + }; + } + + if (Array.isArray(themeSpacing)) { + return function (abs) { + if (false) {} + + return themeSpacing[abs]; + }; + } + + if (typeof themeSpacing === 'function') { + return themeSpacing; + } + + if (false) {} + + return function () { + return undefined; + }; +} + +function getValue(transformer, propValue) { + if (typeof propValue === 'string' || propValue == null) { + return propValue; + } + + var abs = Math.abs(propValue); + var transformed = transformer(abs); + + if (propValue >= 0) { + return transformed; + } + + if (typeof transformed === 'number') { + return -transformed; + } + + return "-".concat(transformed); +} + +function getStyleFromPropValue(cssProperties, transformer) { + return function (propValue) { + return cssProperties.reduce(function (acc, cssProperty) { + acc[cssProperty] = getValue(transformer, propValue); + return acc; + }, {}); + }; +} + +function spacing(props) { + var theme = props.theme; + var transformer = createUnarySpacing(theme); + return Object.keys(props).map(function (prop) { + // Using a hash computation over an array iteration could be faster, but with only 28 items, + // it's doesn't worth the bundle size. + if (spacingKeys.indexOf(prop) === -1) { + return null; + } + + var cssProperties = getCssProperties(prop); + var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer); + var propValue = props[prop]; + return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__["handleBreakpoints"])(props, propValue, styleFromPropValue); + }).reduce(_merge__WEBPACK_IMPORTED_MODULE_3__["default"], {}); +} + +spacing.propTypes = false ? undefined : {}; +spacing.filterProps = spacingKeys; +/* harmony default export */ __webpack_exports__["default"] = (spacing); + +/***/ }), + +/***/ "sE3O": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = __webpack_require__("LRPZ"); +var flattenIntoArray = __webpack_require__("Pdfj"); +var toObject = __webpack_require__("05TQ"); +var toLength = __webpack_require__("yhnj"); +var aFunction = __webpack_require__("TQc+"); +var arraySpeciesCreate = __webpack_require__("BZRD"); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +__webpack_require__("pebw")('flatMap'); + + +/***/ }), + +/***/ "sFVN": +/***/ (function(module, exports, __webpack_require__) { + +var baseHas = __webpack_require__("4as5"), + hasPath = __webpack_require__("AdZl"); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; + + +/***/ }), + +/***/ "sG2N": +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; + + +/***/ }), + +/***/ "sIRx": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['јан', 'фев', 'мар', 'апр', 'мај', 'јун', 'јул', 'авг', 'сеп', 'окт', 'ное', 'дек'] + var monthsFull = ['јануари', 'февруари', 'март', 'април', 'мај', 'јуни', 'јули', 'август', 'септември', 'октомври', 'ноември', 'декември'] + var weekdays2char = ['не', 'по', 'вт', 'ср', 'че', 'пе', 'са'] + var weekdays3char = ['нед', 'пон', 'вто', 'сре', 'чет', 'пет', 'саб'] + var weekdaysFull = ['недела', 'понеделник', 'вторник', 'среда', 'четврток', 'петок', 'сабота'] + var meridiem = ['претпладне', 'попладне'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiem[1] : meridiem[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiem[1] : meridiem[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiem[1] : meridiem[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + var rem100 = number % 100 + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + '-ви' + case 2: + return number + '-ри' + case 7: + case 8: + return number + '-ми' + } + } + return number + '-ти' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "sLDg": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = __webpack_require__("enc5"); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + + +/***/ }), + +/***/ "sMcB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createMuiStrictModeTheme; }); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rDuK"); +/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("9aAh"); + + +function createMuiStrictModeTheme(options) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return _createTheme__WEBPACK_IMPORTED_MODULE_1__["default"].apply(void 0, [Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__["deepmerge"])({ + unstable_strictMode: true + }, options)].concat(args)); +} + +/***/ }), + +/***/ "sMdj": +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__("8u9v"), + isSymbol = __webpack_require__("+IXE"); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; + + +/***/ }), + +/***/ "sV2q": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.chain = exports.default = void 0; + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("QGb3")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var CozyLink = /*#__PURE__*/function () { + function CozyLink(requestHandler) { + (0, _classCallCheck2.default)(this, CozyLink); + + if (typeof requestHandler === 'function') { + this.request = requestHandler; + } + } + + (0, _createClass2.default)(CozyLink, [{ + key: "request", + value: function request(operation, result, forward) { + throw new Error('request is not implemented'); + } + }]); + return CozyLink; +}(); + +exports.default = CozyLink; + +var toLink = function toLink(handler) { + return typeof handler === 'function' ? new CozyLink(handler) : handler; +}; + +var defaultLinkHandler = function defaultLinkHandler(operation, result) { + if (result) return result;else if (operation.execute) return operation.execute();else throw new Error("No link could handle operation ".concat(JSON.stringify(operation))); +}; + +var chain = function chain(links) { + return [].concat((0, _toConsumableArray2.default)(links), [defaultLinkHandler]).map(toLink).reduce(concat); +}; + +exports.chain = chain; + +var concat = function concat(firstLink, nextLink) { + return new CozyLink(function (operation, result, forward) { + var nextForward = function nextForward(op, res) { + return nextLink.request(op, res, forward); + }; + + return firstLink.request(operation, result, nextForward); + }); +}; + +/***/ }), + +/***/ "sVer": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _GridListTileBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("z6sV"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _GridListTileBar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "sVxE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__("QKaz"); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ "sbbm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ownerDocument; }); +function ownerDocument(node) { + return node && node.ownerDocument || document; +} + +/***/ }), + +/***/ "sfhW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "close", function() { return close; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIntegrations", function() { return defaultIntegrations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flush", function() { return flush; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forceLoad", function() { return forceLoad; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lastEventId", function() { return lastEventId; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showReportDialog", function() { return showReportDialog; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _client_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Tyf5"); +/* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("uDQB"); +/* harmony import */ var _integrations_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("4fos"); +/* harmony import */ var _stack_parsers_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wR54"); +/* harmony import */ var _transports_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("9Qlz"); +/* harmony import */ var _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("r1R0"); +/* harmony import */ var _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("Strw"); +/* harmony import */ var _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("kNwn"); +/* harmony import */ var _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("MGrj"); +/* harmony import */ var _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("Itbq"); +/* harmony import */ var _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("QiYU"); +/* harmony import */ var _transports_fetch_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("oldg"); +/* harmony import */ var _transports_xhr_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("m8uA"); + + + + + + + + + + + + + + + + +const defaultIntegrations = [ + new _sentry_core__WEBPACK_IMPORTED_MODULE_0__["Integrations"].InboundFilters(), + new _sentry_core__WEBPACK_IMPORTED_MODULE_0__["Integrations"].FunctionToString(), + new _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_7__["TryCatch"](), + new _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_8__["Breadcrumbs"](), + new _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_9__["GlobalHandlers"](), + new _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_10__["LinkedErrors"](), + new _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_11__["Dedupe"](), + new _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_12__["HttpContext"](), +]; + +/** + * The Sentry Browser SDK Client. + * + * To use this SDK, call the {@link init} function as early as possible when + * loading the web page. To set context information or send manual events, use + * the provided methods. + * + * @example + * + * ``` + * + * import { init } from '@sentry/browser'; + * + * init({ + * dsn: '__DSN__', + * // ... + * }); + * ``` + * + * @example + * ``` + * + * import { configureScope } from '@sentry/browser'; + * configureScope((scope: Scope) => { + * scope.setExtra({ battery: 0.7 }); + * scope.setTag({ user_mode: 'admin' }); + * scope.setUser({ id: '4711' }); + * }); + * ``` + * + * @example + * ``` + * + * import { addBreadcrumb } from '@sentry/browser'; + * addBreadcrumb({ + * message: 'My Breadcrumb', + * // ... + * }); + * ``` + * + * @example + * + * ``` + * + * import * as Sentry from '@sentry/browser'; + * Sentry.captureMessage('Hello, world!'); + * Sentry.captureException(new Error('Good bye')); + * Sentry.captureEvent({ + * message: 'Manual', + * stacktrace: [ + * // ... + * ], + * }); + * ``` + * + * @see {@link BrowserOptions} for documentation on configuration options. + */ +function init(options = {}) { + if (options.defaultIntegrations === undefined) { + options.defaultIntegrations = defaultIntegrations; + } + if (options.release === undefined) { + // This supports the variable that sentry-webpack-plugin injects + if (_helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].SENTRY_RELEASE && _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].SENTRY_RELEASE.id) { + options.release = _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].SENTRY_RELEASE.id; + } + } + if (options.autoSessionTracking === undefined) { + options.autoSessionTracking = true; + } + if (options.sendClientReports === undefined) { + options.sendClientReports = true; + } + + const clientOptions = { + ...options, + stackParser: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["stackParserFromStackParserOptions"])(options.stackParser || _stack_parsers_js__WEBPACK_IMPORTED_MODULE_5__["defaultStackParser"]), + integrations: Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getIntegrationsToSetup"])(options), + transport: options.transport || (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["supportsFetch"])() ? _transports_fetch_js__WEBPACK_IMPORTED_MODULE_13__["makeFetchTransport"] : _transports_xhr_js__WEBPACK_IMPORTED_MODULE_14__["makeXHRTransport"]), + }; + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["initAndBind"])(_client_js__WEBPACK_IMPORTED_MODULE_2__["BrowserClient"], clientOptions); + + if (options.autoSessionTracking) { + startSessionTracking(); + } +} + +/** + * Present the user with a report dialog. + * + * @param options Everything is optional, we try to fetch all info need from the global scope. + */ +function showReportDialog(options = {}, hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])()) { + // doesn't work without a document (React Native) + if (!_helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Global document not defined in showReportDialog call'); + return; + } + + const { client, scope } = hub.getStackTop(); + const dsn = options.dsn || (client && client.getDsn()); + if (!dsn) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('DSN not configured for showReportDialog call'); + return; + } + + if (scope) { + options.user = { + ...scope.getUser(), + ...options.user, + }; + } + + if (!options.eventId) { + options.eventId = hub.lastEventId(); + } + + const script = _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document.createElement('script'); + script.async = true; + script.src = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getReportDialogEndpoint"])(dsn, options); + + if (options.onLoad) { + // eslint-disable-next-line @typescript-eslint/unbound-method + script.onload = options.onLoad; + } + + const injectionPoint = _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document.head || _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document.body; + if (injectionPoint) { + injectionPoint.appendChild(script); + } else { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('Not injecting report dialog. No injection point found in HTML'); + } +} + +/** + * This is the getter for lastEventId. + * + * @returns The last event id of a captured event. + */ +function lastEventId() { + return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().lastEventId(); +} + +/** + * This function is here to be API compatible with the loader. + * @hidden + */ +function forceLoad() { + // Noop +} + +/** + * This function is here to be API compatible with the loader. + * @hidden + */ +function onLoad(callback) { + callback(); +} + +/** + * Call `flush()` on the current client, if there is one. See {@link Client.flush}. + * + * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause + * the client to wait until all events are sent before resolving the promise. + * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it + * doesn't (or if there's no client defined). + */ +function flush(timeout) { + const client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getClient(); + if (client) { + return client.flush(timeout); + } + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('Cannot flush events. No client defined.'); + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["resolvedSyncPromise"])(false); +} + +/** + * Call `close()` on the current client, if there is one. See {@link Client.close}. + * + * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this + * parameter will cause the client to wait until all events are sent before disabling itself. + * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it + * doesn't (or if there's no client defined). + */ +function close(timeout) { + const client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])().getClient(); + if (client) { + return client.close(timeout); + } + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('Cannot flush events and disable SDK. No client defined.'); + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["resolvedSyncPromise"])(false); +} + +/** + * Wrap code within a try/catch block so the SDK is able to capture errors. + * + * @param fn A function to wrap. + * + * @returns The result of wrapped function call. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function wrap(fn) { + return Object(_helpers_js__WEBPACK_IMPORTED_MODULE_3__["wrap"])(fn)(); +} + +function startSessionOnHub(hub) { + hub.startSession({ ignoreDuration: true }); + hub.captureSession(); +} + +/** + * Enable automatic Session Tracking for the initial page load. + */ +function startSessionTracking() { + if (typeof _helpers_js__WEBPACK_IMPORTED_MODULE_3__["WINDOW"].document === 'undefined') { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn('Session tracking in non-browser environment with @sentry/browser is not supported.'); + return; + } + + const hub = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])(); + + // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and + // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are + // pinned at the same version in package.json, but there are edge cases where it's possible. See + // https://github.com/getsentry/sentry-javascript/issues/3207 and + // https://github.com/getsentry/sentry-javascript/issues/3234 and + // https://github.com/getsentry/sentry-javascript/issues/3278. + if (!hub.captureSession) { + return; + } + + // The session duration for browser sessions does not track a meaningful + // concept that can be used as a metric. + // Automatically captured sessions are akin to page views, and thus we + // discard their duration. + startSessionOnHub(hub); + + // We want to create a session for every navigation as well + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addInstrumentationHandler"])('history', ({ from, to }) => { + // Don't create an additional session for the initial route or if the location did not change + if (!(from === undefined || from === to)) { + startSessionOnHub(Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["getCurrentHub"])()); + } + }); +} + + +//# sourceMappingURL=sdk.js.map + + +/***/ }), + +/***/ "siJb": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + // Note: in Indonesian, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'] + var monthsFull = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'] + var weekdays2char = ['Mi', 'Sn', 'Sl', 'Ra', 'Ka', 'Ju', 'Sa'] + var weekdays3char = ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'] + var weekdaysFull = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['a.m.', 'p.m.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return ordinal(formatters[formatterToken](date)) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function ordinal (number) { + switch (number) { + case 1: + return 'pertama' + case 2: + return 'kedua' + case 3: + return 'ketiga' + default: + return 'ke-' + number + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "soLG": +/***/ (function(module, exports, __webpack_require__) { + +var getTimezoneOffsetInMilliseconds = __webpack_require__("yGHX") +var isDate = __webpack_require__("no2e") + +var MILLISECONDS_IN_HOUR = 3600000 +var MILLISECONDS_IN_MINUTE = 60000 +var DEFAULT_ADDITIONAL_DIGITS = 2 + +var parseTokenDateTimeDelimeter = /[T ]/ +var parseTokenPlainTime = /:/ + +// year tokens +var parseTokenYY = /^(\d{2})$/ +var parseTokensYYY = [ + /^([+-]\d{2})$/, // 0 additional digits + /^([+-]\d{3})$/, // 1 additional digit + /^([+-]\d{4})$/ // 2 additional digits +] + +var parseTokenYYYY = /^(\d{4})/ +var parseTokensYYYYY = [ + /^([+-]\d{4})/, // 0 additional digits + /^([+-]\d{5})/, // 1 additional digit + /^([+-]\d{6})/ // 2 additional digits +] + +// date tokens +var parseTokenMM = /^-(\d{2})$/ +var parseTokenDDD = /^-?(\d{3})$/ +var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/ +var parseTokenWww = /^-?W(\d{2})$/ +var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/ + +// time tokens +var parseTokenHH = /^(\d{2}([.,]\d*)?)$/ +var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/ +var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/ + +// timezone tokens +var parseTokenTimezone = /([Z+-].*)$/ +var parseTokenTimezoneZ = /^(Z)$/ +var parseTokenTimezoneHH = /^([+-])(\d{2})$/ +var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/ + +/** + * @category Common Helpers + * @summary Convert the given argument to an instance of Date. + * + * @description + * Convert the given argument to an instance of Date. + * + * If the argument is an instance of Date, the function returns its clone. + * + * If the argument is a number, it is treated as a timestamp. + * + * If an argument is a string, the function tries to parse it. + * Function accepts complete ISO 8601 formats as well as partial implementations. + * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 + * + * If all above fails, the function passes the given argument to Date constructor. + * + * @param {Date|String|Number} argument - the value to convert + * @param {Object} [options] - the object with options + * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format + * @returns {Date} the parsed date in the local time zone + * + * @example + * // Convert string '2014-02-11T11:30:30' to date: + * var result = parse('2014-02-11T11:30:30') + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Parse string '+02014101', + * // if the additional number of digits in the extended year format is 1: + * var result = parse('+02014101', {additionalDigits: 1}) + * //=> Fri Apr 11 2014 00:00:00 + */ +function parse (argument, dirtyOptions) { + if (isDate(argument)) { + // Prevent the date to lose the milliseconds when passed to new Date() in IE10 + return new Date(argument.getTime()) + } else if (typeof argument !== 'string') { + return new Date(argument) + } + + var options = dirtyOptions || {} + var additionalDigits = options.additionalDigits + if (additionalDigits == null) { + additionalDigits = DEFAULT_ADDITIONAL_DIGITS + } else { + additionalDigits = Number(additionalDigits) + } + + var dateStrings = splitDateString(argument) + + var parseYearResult = parseYear(dateStrings.date, additionalDigits) + var year = parseYearResult.year + var restDateString = parseYearResult.restDateString + + var date = parseDate(restDateString, year) + + if (date) { + var timestamp = date.getTime() + var time = 0 + var offset + + if (dateStrings.time) { + time = parseTime(dateStrings.time) + } + + if (dateStrings.timezone) { + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE + } else { + var fullTime = timestamp + time + var fullTimeDate = new Date(fullTime) + + offset = getTimezoneOffsetInMilliseconds(fullTimeDate) + + // Adjust time when it's coming from DST + var fullTimeDateNextDay = new Date(fullTime) + fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1) + var offsetDiff = + getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - + getTimezoneOffsetInMilliseconds(fullTimeDate) + if (offsetDiff > 0) { + offset += offsetDiff + } + } + + return new Date(timestamp + time + offset) + } else { + return new Date(argument) + } +} + +function splitDateString (dateString) { + var dateStrings = {} + var array = dateString.split(parseTokenDateTimeDelimeter) + var timeString + + if (parseTokenPlainTime.test(array[0])) { + dateStrings.date = null + timeString = array[0] + } else { + dateStrings.date = array[0] + timeString = array[1] + } + + if (timeString) { + var token = parseTokenTimezone.exec(timeString) + if (token) { + dateStrings.time = timeString.replace(token[1], '') + dateStrings.timezone = token[1] + } else { + dateStrings.time = timeString + } + } + + return dateStrings +} + +function parseYear (dateString, additionalDigits) { + var parseTokenYYY = parseTokensYYY[additionalDigits] + var parseTokenYYYYY = parseTokensYYYYY[additionalDigits] + + var token + + // YYYY or ±YYYYY + token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString) + if (token) { + var yearString = token[1] + return { + year: parseInt(yearString, 10), + restDateString: dateString.slice(yearString.length) + } + } + + // YY or ±YYY + token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString) + if (token) { + var centuryString = token[1] + return { + year: parseInt(centuryString, 10) * 100, + restDateString: dateString.slice(centuryString.length) + } + } + + // Invalid ISO-formatted year + return { + year: null + } +} + +function parseDate (dateString, year) { + // Invalid ISO-formatted year + if (year === null) { + return null + } + + var token + var date + var month + var week + + // YYYY + if (dateString.length === 0) { + date = new Date(0) + date.setUTCFullYear(year) + return date + } + + // YYYY-MM + token = parseTokenMM.exec(dateString) + if (token) { + date = new Date(0) + month = parseInt(token[1], 10) - 1 + date.setUTCFullYear(year, month) + return date + } + + // YYYY-DDD or YYYYDDD + token = parseTokenDDD.exec(dateString) + if (token) { + date = new Date(0) + var dayOfYear = parseInt(token[1], 10) + date.setUTCFullYear(year, 0, dayOfYear) + return date + } + + // YYYY-MM-DD or YYYYMMDD + token = parseTokenMMDD.exec(dateString) + if (token) { + date = new Date(0) + month = parseInt(token[1], 10) - 1 + var day = parseInt(token[2], 10) + date.setUTCFullYear(year, month, day) + return date + } + + // YYYY-Www or YYYYWww + token = parseTokenWww.exec(dateString) + if (token) { + week = parseInt(token[1], 10) - 1 + return dayOfISOYear(year, week) + } + + // YYYY-Www-D or YYYYWwwD + token = parseTokenWwwD.exec(dateString) + if (token) { + week = parseInt(token[1], 10) - 1 + var dayOfWeek = parseInt(token[2], 10) - 1 + return dayOfISOYear(year, week, dayOfWeek) + } + + // Invalid ISO-formatted date + return null +} + +function parseTime (timeString) { + var token + var hours + var minutes + + // hh + token = parseTokenHH.exec(timeString) + if (token) { + hours = parseFloat(token[1].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR + } + + // hh:mm or hhmm + token = parseTokenHHMM.exec(timeString) + if (token) { + hours = parseInt(token[1], 10) + minutes = parseFloat(token[2].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR + + minutes * MILLISECONDS_IN_MINUTE + } + + // hh:mm:ss or hhmmss + token = parseTokenHHMMSS.exec(timeString) + if (token) { + hours = parseInt(token[1], 10) + minutes = parseInt(token[2], 10) + var seconds = parseFloat(token[3].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR + + minutes * MILLISECONDS_IN_MINUTE + + seconds * 1000 + } + + // Invalid ISO-formatted time + return null +} + +function parseTimezone (timezoneString) { + var token + var absoluteOffset + + // Z + token = parseTokenTimezoneZ.exec(timezoneString) + if (token) { + return 0 + } + + // ±hh + token = parseTokenTimezoneHH.exec(timezoneString) + if (token) { + absoluteOffset = parseInt(token[2], 10) * 60 + return (token[1] === '+') ? -absoluteOffset : absoluteOffset + } + + // ±hh:mm or ±hhmm + token = parseTokenTimezoneHHMM.exec(timezoneString) + if (token) { + absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10) + return (token[1] === '+') ? -absoluteOffset : absoluteOffset + } + + return 0 +} + +function dayOfISOYear (isoYear, week, day) { + week = week || 0 + day = day || 0 + var date = new Date(0) + date.setUTCFullYear(isoYear, 0, 4) + var fourthOfJanuaryDay = date.getUTCDay() || 7 + var diff = week * 7 + day + 1 - fourthOfJanuaryDay + date.setUTCDate(date.getUTCDate() + diff) + return date +} + +module.exports = parse + + +/***/ }), + +/***/ "sp9s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("nsNp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TableCell__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "speo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function() { return TRACEPARENT_REGEXP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function() { return extractTraceparentData; }); +const TRACEPARENT_REGEXP = new RegExp( + '^[ \\t]*' + // whitespace + '([0-9a-f]{32})?' + // trace_id + '-?([0-9a-f]{16})?' + // span_id + '-?([01])?' + // sampled + '[ \\t]*$', // whitespace +); + +/** + * Extract transaction context data from a `sentry-trace` header. + * + * @param traceparent Traceparent string + * + * @returns Object containing data from the header, or undefined if traceparent string is malformed + */ +function extractTraceparentData(traceparent) { + const matches = traceparent.match(TRACEPARENT_REGEXP); + + if (!traceparent || !matches) { + // empty string or no matches is invalid traceparent data + return undefined; + } + + let parentSampled; + if (matches[3] === '1') { + parentSampled = true; + } else if (matches[3] === '0') { + parentSampled = false; + } + + return { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2], + }; +} + + +//# sourceMappingURL=tracing.js.map + + +/***/ }), + +/***/ "szAg": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("Hbvh") +var buildFormatLocale = __webpack_require__("cEgd") + +/** + * @category Locales + * @summary Korean locale. + * @author Hong Chulju [@angdev]{@link https://github.com/angdev} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "szez": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "specialProperty", function() { return specialProperty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return exactProp; }); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); + + +// This module is based on https://github.com/airbnb/prop-types-exact repository. +// However, in order to reduce the number of dependencies and to remove some extra safe checks +// the module was forked. +// Only exported for test purposes. +var specialProperty = "exact-prop: \u200B"; +function exactProp(propTypes) { + if (true) { + return propTypes; + } + + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({}, propTypes, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])({}, specialProperty, function (props) { + var unsupportedProps = Object.keys(props).filter(function (prop) { + return !propTypes.hasOwnProperty(prop); + }); + + if (unsupportedProps.length > 0) { + return new Error("The following props are not supported: ".concat(unsupportedProps.map(function (prop) { + return "`".concat(prop, "`"); + }).join(', '), ". Please remove them.")); + } + + return null; + })); +} + +/***/ }), + +/***/ "t2SO": +/***/ (function(module, exports, __webpack_require__) { + +var getDayOfYear = __webpack_require__("phXz") +var getISOWeek = __webpack_require__("wnR+") +var getISOYear = __webpack_require__("V1K6") +var parse = __webpack_require__("soLG") +var isValid = __webpack_require__("8Gjz") +var enLocale = __webpack_require__("mnDI") + +/** + * @category Common Helpers + * @summary Format the date. + * + * @description + * Return the formatted date string in the given format. + * + * Accepted tokens: + * | Unit | Token | Result examples | + * |-------------------------|-------|----------------------------------| + * | Month | M | 1, 2, ..., 12 | + * | | Mo | 1st, 2nd, ..., 12th | + * | | MM | 01, 02, ..., 12 | + * | | MMM | Jan, Feb, ..., Dec | + * | | MMMM | January, February, ..., December | + * | Quarter | Q | 1, 2, 3, 4 | + * | | Qo | 1st, 2nd, 3rd, 4th | + * | Day of month | D | 1, 2, ..., 31 | + * | | Do | 1st, 2nd, ..., 31st | + * | | DD | 01, 02, ..., 31 | + * | Day of year | DDD | 1, 2, ..., 366 | + * | | DDDo | 1st, 2nd, ..., 366th | + * | | DDDD | 001, 002, ..., 366 | + * | Day of week | d | 0, 1, ..., 6 | + * | | do | 0th, 1st, ..., 6th | + * | | dd | Su, Mo, ..., Sa | + * | | ddd | Sun, Mon, ..., Sat | + * | | dddd | Sunday, Monday, ..., Saturday | + * | Day of ISO week | E | 1, 2, ..., 7 | + * | ISO week | W | 1, 2, ..., 53 | + * | | Wo | 1st, 2nd, ..., 53rd | + * | | WW | 01, 02, ..., 53 | + * | Year | YY | 00, 01, ..., 99 | + * | | YYYY | 1900, 1901, ..., 2099 | + * | ISO week-numbering year | GG | 00, 01, ..., 99 | + * | | GGGG | 1900, 1901, ..., 2099 | + * | AM/PM | A | AM, PM | + * | | a | am, pm | + * | | aa | a.m., p.m. | + * | Hour | H | 0, 1, ... 23 | + * | | HH | 00, 01, ... 23 | + * | | h | 1, 2, ..., 12 | + * | | hh | 01, 02, ..., 12 | + * | Minute | m | 0, 1, ..., 59 | + * | | mm | 00, 01, ..., 59 | + * | Second | s | 0, 1, ..., 59 | + * | | ss | 00, 01, ..., 59 | + * | 1/10 of second | S | 0, 1, ..., 9 | + * | 1/100 of second | SS | 00, 01, ..., 99 | + * | Millisecond | SSS | 000, 001, ..., 999 | + * | Timezone | Z | -01:00, +00:00, ... +12:00 | + * | | ZZ | -0100, +0000, ..., +1200 | + * | Seconds timestamp | X | 512969520 | + * | Milliseconds timestamp | x | 512969520900 | + * + * The characters wrapped in square brackets are escaped. + * + * The result may vary by locale. + * + * @param {Date|String|Number} date - the original date + * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens + * @param {Object} [options] - the object with options + * @param {Object} [options.locale=enLocale] - the locale object + * @returns {String} the formatted date string + * + * @example + * // Represent 11 February 2014 in middle-endian format: + * var result = format( + * new Date(2014, 1, 11), + * 'MM/DD/YYYY' + * ) + * //=> '02/11/2014' + * + * @example + * // Represent 2 July 2014 in Esperanto: + * var eoLocale = require('date-fns/locale/eo') + * var result = format( + * new Date(2014, 6, 2), + * 'Do [de] MMMM YYYY', + * {locale: eoLocale} + * ) + * //=> '2-a de julio 2014' + */ +function format (dirtyDate, dirtyFormatStr, dirtyOptions) { + var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ' + var options = dirtyOptions || {} + + var locale = options.locale + var localeFormatters = enLocale.format.formatters + var formattingTokensRegExp = enLocale.format.formattingTokensRegExp + if (locale && locale.format && locale.format.formatters) { + localeFormatters = locale.format.formatters + + if (locale.format.formattingTokensRegExp) { + formattingTokensRegExp = locale.format.formattingTokensRegExp + } + } + + var date = parse(dirtyDate) + + if (!isValid(date)) { + return 'Invalid Date' + } + + var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp) + + return formatFn(date) +} + +var formatters = { + // Month: 1, 2, ..., 12 + 'M': function (date) { + return date.getMonth() + 1 + }, + + // Month: 01, 02, ..., 12 + 'MM': function (date) { + return addLeadingZeros(date.getMonth() + 1, 2) + }, + + // Quarter: 1, 2, 3, 4 + 'Q': function (date) { + return Math.ceil((date.getMonth() + 1) / 3) + }, + + // Day of month: 1, 2, ..., 31 + 'D': function (date) { + return date.getDate() + }, + + // Day of month: 01, 02, ..., 31 + 'DD': function (date) { + return addLeadingZeros(date.getDate(), 2) + }, + + // Day of year: 1, 2, ..., 366 + 'DDD': function (date) { + return getDayOfYear(date) + }, + + // Day of year: 001, 002, ..., 366 + 'DDDD': function (date) { + return addLeadingZeros(getDayOfYear(date), 3) + }, + + // Day of week: 0, 1, ..., 6 + 'd': function (date) { + return date.getDay() + }, + + // Day of ISO week: 1, 2, ..., 7 + 'E': function (date) { + return date.getDay() || 7 + }, + + // ISO week: 1, 2, ..., 53 + 'W': function (date) { + return getISOWeek(date) + }, + + // ISO week: 01, 02, ..., 53 + 'WW': function (date) { + return addLeadingZeros(getISOWeek(date), 2) + }, + + // Year: 00, 01, ..., 99 + 'YY': function (date) { + return addLeadingZeros(date.getFullYear(), 4).substr(2) + }, + + // Year: 1900, 1901, ..., 2099 + 'YYYY': function (date) { + return addLeadingZeros(date.getFullYear(), 4) + }, + + // ISO week-numbering year: 00, 01, ..., 99 + 'GG': function (date) { + return String(getISOYear(date)).substr(2) + }, + + // ISO week-numbering year: 1900, 1901, ..., 2099 + 'GGGG': function (date) { + return getISOYear(date) + }, + + // Hour: 0, 1, ... 23 + 'H': function (date) { + return date.getHours() + }, + + // Hour: 00, 01, ..., 23 + 'HH': function (date) { + return addLeadingZeros(date.getHours(), 2) + }, + + // Hour: 1, 2, ..., 12 + 'h': function (date) { + var hours = date.getHours() + if (hours === 0) { + return 12 + } else if (hours > 12) { + return hours % 12 + } else { + return hours + } + }, + + // Hour: 01, 02, ..., 12 + 'hh': function (date) { + return addLeadingZeros(formatters['h'](date), 2) + }, + + // Minute: 0, 1, ..., 59 + 'm': function (date) { + return date.getMinutes() + }, + + // Minute: 00, 01, ..., 59 + 'mm': function (date) { + return addLeadingZeros(date.getMinutes(), 2) + }, + + // Second: 0, 1, ..., 59 + 's': function (date) { + return date.getSeconds() + }, + + // Second: 00, 01, ..., 59 + 'ss': function (date) { + return addLeadingZeros(date.getSeconds(), 2) + }, + + // 1/10 of second: 0, 1, ..., 9 + 'S': function (date) { + return Math.floor(date.getMilliseconds() / 100) + }, + + // 1/100 of second: 00, 01, ..., 99 + 'SS': function (date) { + return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2) + }, + + // Millisecond: 000, 001, ..., 999 + 'SSS': function (date) { + return addLeadingZeros(date.getMilliseconds(), 3) + }, + + // Timezone: -01:00, +00:00, ... +12:00 + 'Z': function (date) { + return formatTimezone(date.getTimezoneOffset(), ':') + }, + + // Timezone: -0100, +0000, ... +1200 + 'ZZ': function (date) { + return formatTimezone(date.getTimezoneOffset()) + }, + + // Seconds timestamp: 512969520 + 'X': function (date) { + return Math.floor(date.getTime() / 1000) + }, + + // Milliseconds timestamp: 512969520900 + 'x': function (date) { + return date.getTime() + } +} + +function buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) { + var array = formatStr.match(formattingTokensRegExp) + var length = array.length + + var i + var formatter + for (i = 0; i < length; i++) { + formatter = localeFormatters[array[i]] || formatters[array[i]] + if (formatter) { + array[i] = formatter + } else { + array[i] = removeFormattingTokens(array[i]) + } + } + + return function (date) { + var output = '' + for (var i = 0; i < length; i++) { + if (array[i] instanceof Function) { + output += array[i](date, formatters) + } else { + output += array[i] + } + } + return output + } +} + +function removeFormattingTokens (input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|]$/g, '') + } + return input.replace(/\\/g, '') +} + +function formatTimezone (offset, delimeter) { + delimeter = delimeter || '' + var sign = offset > 0 ? '-' : '+' + var absOffset = Math.abs(offset) + var hours = Math.floor(absOffset / 60) + var minutes = absOffset % 60 + return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2) +} + +function addLeadingZeros (number, targetLength) { + var output = Math.abs(number).toString() + while (output.length < targetLength) { + output = '0' + output + } + return output +} + +module.exports = format + + +/***/ }), + +/***/ "t3J8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onHidden", function() { return onHidden; }); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+2Xp"); + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const onHidden = (cb, once) => { + const onHiddenOrPageHide = (event) => { + if (event.type === 'pagehide' || _types_js__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].document.visibilityState === 'hidden') { + cb(event); + if (once) { + removeEventListener('visibilitychange', onHiddenOrPageHide, true); + removeEventListener('pagehide', onHiddenOrPageHide, true); + } + } + }; + addEventListener('visibilitychange', onHiddenOrPageHide, true); + // Some browsers have buggy implementations of visibilitychange, + // so we use pagehide in addition, just to be safe. + addEventListener('pagehide', onHiddenOrPageHide, true); +}; + + +//# sourceMappingURL=onHidden.js.map + + +/***/ }), + +/***/ "t4T6": +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), + +/***/ "t5bv": +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__("mKCr"), + createAggregator = __webpack_require__("aB24"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; + + +/***/ }), + +/***/ "tDKi": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.nativeLinkOpen = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _plugins = __webpack_require__("QJIl"); + +var nativeLinkOpen = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { + var url, target, options; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + url = _ref.url; + _context.next = 3; + return (0, _plugins.hasSafariPlugin)(); + + case 3: + _context.t0 = _context.sent; + + if (!_context.t0) { + _context.next = 6; + break; + } + + _context.t0 = window.SafariViewController; + + case 6: + if (!_context.t0) { + _context.next = 10; + break; + } + + window.SafariViewController.show({ + url: url, + transition: 'curl' + }, function (result) { + if (result.event === 'closed') { + window.SafariViewController.hide(); + } + }, function () { + window.SafariViewController.hide(); + }); + _context.next = 11; + break; + + case 10: + if ((0, _plugins.hasInAppBrowserPlugin)()) { + target = '_blank'; + options = 'clearcache=yes,zoom=no'; + window.cordova.InAppBrowser.open(url, target, options); + } else { + window.location = url; + } + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function nativeLinkOpen(_x) { + return _ref2.apply(this, arguments); + }; +}(); + +exports.nativeLinkOpen = nativeLinkOpen; + +/***/ }), + +/***/ "tEOf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ScrollbarSize; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("NFPV"); + + + + + +var styles = { + width: 99, + height: 99, + position: 'absolute', + top: -9999, + overflow: 'scroll' +}; +/** + * @ignore - internal component. + * The component originates from https://github.com/STORIS/react-scrollbar-size. + * It has been moved into the core in order to minimize the bundle size. + */ + +function ScrollbarSize(props) { + var onChange = props.onChange, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["onChange"]); + + var scrollbarHeight = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + var nodeRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](null); + + var setMeasurements = function setMeasurements() { + scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight; + }; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_4__["default"])(function () { + var prevHeight = scrollbarHeight.current; + setMeasurements(); + + if (prevHeight !== scrollbarHeight.current) { + onChange(scrollbarHeight.current); + } + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [onChange]); + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + setMeasurements(); + onChange(scrollbarHeight.current); + }, [onChange]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + style: styles, + ref: nodeRef + }, other)); +} + false ? undefined : void 0; + +/***/ }), + +/***/ "tGMg": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") +var differenceInCalendarMonths = __webpack_require__("fNHd") +var compareAsc = __webpack_require__("p6cL") + +/** + * @category Month Helpers + * @summary Get the number of full months between the given dates. + * + * @description + * Get the number of full months between the given dates. + * + * @param {Date|String|Number} dateLeft - the later date + * @param {Date|String|Number} dateRight - the earlier date + * @returns {Number} the number of full months + * + * @example + * // How many full months are between 31 January 2014 and 1 September 2014? + * var result = differenceInMonths( + * new Date(2014, 8, 1), + * new Date(2014, 0, 31) + * ) + * //=> 7 + */ +function differenceInMonths (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var dateRight = parse(dirtyDateRight) + + var sign = compareAsc(dateLeft, dateRight) + var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight)) + dateLeft.setMonth(dateLeft.getMonth() - sign * difference) + + // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full + // If so, result must be decreased by 1 in absolute value + var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign + return sign * (difference - isLastMonthNotFull) +} + +module.exports = differenceInMonths + + +/***/ }), + +/***/ "tH0f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Span", function() { return Span; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpanRecorder", function() { return SpanRecorder; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spanStatusfromHttpCode", function() { return spanStatusfromHttpCode; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); + + + +/** + * Keeps track of finished spans for a given transaction + * @internal + * @hideconstructor + * @hidden + */ +class SpanRecorder { + __init() {this.spans = [];} + + constructor(maxlen = 1000) {;SpanRecorder.prototype.__init.call(this); + this._maxlen = maxlen; + } + + /** + * This is just so that we don't run out of memory while recording a lot + * of spans. At some point we just stop and flush out the start of the + * trace tree (i.e.the first n spans with the smallest + * start_timestamp). + */ + add(span) { + if (this.spans.length > this._maxlen) { + span.spanRecorder = undefined; + } else { + this.spans.push(span); + } + } +} + +/** + * Span contains all data about a span + */ +class Span { + /** + * @inheritDoc + */ + __init2() {this.traceId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])();} + + /** + * @inheritDoc + */ + __init3() {this.spanId = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["uuid4"])().substring(16);} + + /** + * @inheritDoc + */ + + /** + * Internal keeper of the status + */ + + /** + * @inheritDoc + */ + + /** + * Timestamp in seconds when the span was created. + */ + __init4() {this.startTimestamp = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])();} + + /** + * Timestamp in seconds when the span ended. + */ + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + + /** + * @inheritDoc + */ + __init5() {this.tags = {};} + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + __init6() {this.data = {};} + + /** + * List of spans that were finalized + */ + + /** + * @inheritDoc + */ + + /** + * The instrumenter that created this span. + */ + __init7() {this.instrumenter = 'sentry';} + + /** + * You should never call the constructor manually, always use `Sentry.startTransaction()` + * or call `startChild()` on an existing span. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext) {;Span.prototype.__init2.call(this);Span.prototype.__init3.call(this);Span.prototype.__init4.call(this);Span.prototype.__init5.call(this);Span.prototype.__init6.call(this);Span.prototype.__init7.call(this); + if (!spanContext) { + return this; + } + if (spanContext.traceId) { + this.traceId = spanContext.traceId; + } + if (spanContext.spanId) { + this.spanId = spanContext.spanId; + } + if (spanContext.parentSpanId) { + this.parentSpanId = spanContext.parentSpanId; + } + // We want to include booleans as well here + if ('sampled' in spanContext) { + this.sampled = spanContext.sampled; + } + if (spanContext.op) { + this.op = spanContext.op; + } + if (spanContext.description) { + this.description = spanContext.description; + } + if (spanContext.data) { + this.data = spanContext.data; + } + if (spanContext.tags) { + this.tags = spanContext.tags; + } + if (spanContext.status) { + this.status = spanContext.status; + } + if (spanContext.startTimestamp) { + this.startTimestamp = spanContext.startTimestamp; + } + if (spanContext.endTimestamp) { + this.endTimestamp = spanContext.endTimestamp; + } + if (spanContext.instrumenter) { + this.instrumenter = spanContext.instrumenter; + } + } + + /** + * @inheritDoc + */ + startChild( + spanContext, + ) { + const childSpan = new Span({ + ...spanContext, + parentSpanId: this.spanId, + sampled: this.sampled, + traceId: this.traceId, + }); + + childSpan.spanRecorder = this.spanRecorder; + if (childSpan.spanRecorder) { + childSpan.spanRecorder.add(childSpan); + } + + childSpan.transaction = this.transaction; + + if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && childSpan.transaction) { + const opStr = (spanContext && spanContext.op) || '< unknown op >'; + const nameStr = childSpan.transaction.name || '< unknown name >'; + const idStr = childSpan.transaction.spanId; + + const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`; + childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage }; + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(logMessage); + } + + return childSpan; + } + + /** + * @inheritDoc + */ + setTag(key, value) { + this.tags = { ...this.tags, [key]: value }; + return this; + } + + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + setData(key, value) { + this.data = { ...this.data, [key]: value }; + return this; + } + + /** + * @inheritDoc + */ + setStatus(value) { + this.status = value; + return this; + } + + /** + * @inheritDoc + */ + setHttpStatus(httpStatus) { + this.setTag('http.status_code', String(httpStatus)); + const spanStatus = spanStatusfromHttpCode(httpStatus); + if (spanStatus !== 'unknown_error') { + this.setStatus(spanStatus); + } + return this; + } + + /** + * @inheritDoc + */ + isSuccess() { + return this.status === 'ok'; + } + + /** + * @inheritDoc + */ + finish(endTimestamp) { + if ( + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + // Don't call this for transactions + this.transaction && + this.transaction.spanId !== this.spanId + ) { + const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId]; + if (logMessage) { + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log((logMessage ).replace('Starting', 'Finishing')); + } + } + + this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["timestampWithMs"])(); + } + + /** + * @inheritDoc + */ + toTraceparent() { + let sampledString = ''; + if (this.sampled !== undefined) { + sampledString = this.sampled ? '-1' : '-0'; + } + return `${this.traceId}-${this.spanId}${sampledString}`; + } + + /** + * @inheritDoc + */ + toContext() { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({ + data: this.data, + description: this.description, + endTimestamp: this.endTimestamp, + op: this.op, + parentSpanId: this.parentSpanId, + sampled: this.sampled, + spanId: this.spanId, + startTimestamp: this.startTimestamp, + status: this.status, + tags: this.tags, + traceId: this.traceId, + }); + } + + /** + * @inheritDoc + */ + updateWithContext(spanContext) { + this.data = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(spanContext.data, () => ( {})); + this.description = spanContext.description; + this.endTimestamp = spanContext.endTimestamp; + this.op = spanContext.op; + this.parentSpanId = spanContext.parentSpanId; + this.sampled = spanContext.sampled; + this.spanId = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(spanContext.spanId, () => ( this.spanId)); + this.startTimestamp = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(spanContext.startTimestamp, () => ( this.startTimestamp)); + this.status = spanContext.status; + this.tags = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(spanContext.tags, () => ( {})); + this.traceId = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(spanContext.traceId, () => ( this.traceId)); + + return this; + } + + /** + * @inheritDoc + */ + getTraceContext() + + { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({ + data: Object.keys(this.data).length > 0 ? this.data : undefined, + description: this.description, + op: this.op, + parent_span_id: this.parentSpanId, + span_id: this.spanId, + status: this.status, + tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, + trace_id: this.traceId, + }); + } + + /** + * @inheritDoc + */ + toJSON() + + { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["dropUndefinedKeys"])({ + data: Object.keys(this.data).length > 0 ? this.data : undefined, + description: this.description, + op: this.op, + parent_span_id: this.parentSpanId, + span_id: this.spanId, + start_timestamp: this.startTimestamp, + status: this.status, + tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, + timestamp: this.endTimestamp, + trace_id: this.traceId, + }); + } +} + +/** + * Converts a HTTP status code into a {@link SpanStatusType}. + * + * @param httpStatus The HTTP response status code. + * @returns The span status or unknown_error. + */ +function spanStatusfromHttpCode(httpStatus) { + if (httpStatus < 400 && httpStatus >= 100) { + return 'ok'; + } + + if (httpStatus >= 400 && httpStatus < 500) { + switch (httpStatus) { + case 401: + return 'unauthenticated'; + case 403: + return 'permission_denied'; + case 404: + return 'not_found'; + case 409: + return 'already_exists'; + case 413: + return 'failed_precondition'; + case 429: + return 'resource_exhausted'; + default: + return 'invalid_argument'; + } + } + + if (httpStatus >= 500 && httpStatus < 600) { + switch (httpStatus) { + case 501: + return 'unimplemented'; + case 503: + return 'unavailable'; + case 504: + return 'deadline_exceeded'; + default: + return 'internal_error'; + } + } + + return 'unknown_error'; +} + + +//# sourceMappingURL=span.js.map + + +/***/ }), + +/***/ "tIE6": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Qualification", { + enumerable: true, + get: function get() { + return _qualification.Qualification; + } +}); +Object.defineProperty(exports, "setQualification", { + enumerable: true, + get: function get() { + return _qualification.setQualification; + } +}); +Object.defineProperty(exports, "getQualification", { + enumerable: true, + get: function get() { + return _qualification.getQualification; + } +}); +exports.helpers = exports.themes = exports.locales = void 0; + +var _qualification = __webpack_require__("DRJ+"); + +var locales = _interopRequireWildcard(__webpack_require__("PV+A")); + +exports.locales = locales; + +var themes = _interopRequireWildcard(__webpack_require__("Wysw")); + +exports.themes = themes; + +var helpers = _interopRequireWildcard(__webpack_require__("4K71")); + +exports.helpers = helpers; + +/***/ }), + +/***/ "tJ5F": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appShape", function() { return appShape; }); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ybXc"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var appShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + slug: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, + name: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, + namePrefix: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, + comingSoon: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + href: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, + links: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired + }) +}); + +/***/ }), + +/***/ "tL2i": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("F+uF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Toolbar__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "tNpl": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseGet = __webpack_require__("+Bmy"), + baseIteratee = __webpack_require__("JF7T"), + baseMap = __webpack_require__("MXVp"), + baseSortBy = __webpack_require__("0WOu"), + baseUnary = __webpack_require__("Ijh8"), + compareMultiple = __webpack_require__("jaXZ"), + identity = __webpack_require__("Q7kj"), + isArray = __webpack_require__("8u9v"); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; + + +/***/ }), + +/***/ "tR10": +/***/ (function(module, exports, __webpack_require__) { + +var toNumber = __webpack_require__("ueJl"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +module.exports = toFinite; + + +/***/ }), + +/***/ "tScC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mxOK"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Container__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "tTZ/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var responsivePropType = false ? undefined : {}; +/* harmony default export */ __webpack_exports__["default"] = (responsivePropType); + +/***/ }), + +/***/ "tW+3": +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__("4FGL"), + baseAt = __webpack_require__("/kI0"), + basePullAt = __webpack_require__("ePT4"), + compareAscending = __webpack_require__("YIwv"), + flatRest = __webpack_require__("vjlx"), + isIndex = __webpack_require__("9yx8"); + +/** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ +var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; +}); + +module.exports = pullAt; + + +/***/ }), + +/***/ "tXsl": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _mapValues = _interopRequireDefault(__webpack_require__("7FTH")); + +var _groupBy2 = _interopRequireDefault(__webpack_require__("t5bv")); + +var _flatten = _interopRequireDefault(__webpack_require__("Jy5R")); + +var _isEqual = _interopRequireDefault(__webpack_require__("+KM7")); + +var _uniq = _interopRequireDefault(__webpack_require__("efAt")); + +var _uniqWith = _interopRequireDefault(__webpack_require__("c20g")); + +var _dsl = __webpack_require__("v2kV"); + +var isIdQuery = function isIdQuery(query) { + return query.id || query.ids; +}; +/** + * Optimize queries on a single doctype + * + * @param {QueryDefinition[]} queries - Queries of a same doctype + * @returns {QueryDefinition[]} Optimized queries + * @private + */ + + +var optimizeDoctypeQueries = function optimizeDoctypeQueries(queries) { + var _groupBy = (0, _groupBy2.default)(queries, function (q) { + return isIdQuery(q) ? 'idQueries' : 'others'; + }), + _groupBy$idQueries = _groupBy.idQueries, + idQueries = _groupBy$idQueries === void 0 ? [] : _groupBy$idQueries, + _groupBy$others = _groupBy.others, + others = _groupBy$others === void 0 ? [] : _groupBy$others; + + var groupedIdQueries = idQueries.length > 0 ? new _dsl.QueryDefinition({ + doctype: queries[0].doctype, + ids: (0, _uniq.default)((0, _flatten.default)(idQueries.map(function (q) { + return q.id || q.ids; + }))) + }) : []; // Deduplicate before concataining + + return (0, _uniqWith.default)(others, _isEqual.default).concat(groupedIdQueries); +}; +/** + * Reduce the number of queries used to fetch documents. + * + * - Deduplication of queries + * - Groups id queries + * + * @param {QueryDefinition[]} queries - Queries to optimized + * @returns {QueryDefinition[]} Optimized queries + * @private + */ + + +var optimizeQueries = function optimizeQueries(queries) { + var byDoctype = (0, _groupBy2.default)(queries, function (q) { + return q.doctype; + }); + return (0, _flatten.default)(Object.values((0, _mapValues.default)(byDoctype, optimizeDoctypeQueries))); +}; + +var _default = optimizeQueries; +exports.default = _default; + +/***/ }), + +/***/ "tZs2": +/***/ (function(module, exports, __webpack_require__) { + +var Transform = __webpack_require__("prJK"), + color = __webpack_require__("N/CO"); + +var colors = { debug: ['cyan'], info: ['purple' ], warn: [ 'yellow', true ], error: [ 'red', true ] }, + logger = new Transform(); + +logger.write = function(name, level, args) { + var fn = console.log; + if(console[level] && console[level].apply) { + fn = console[level]; + fn.apply(console, [ '%c'+name+' %c'+level, color('gray'), color.apply(color, colors[level])].concat(args)); + } +}; + +// NOP, because piping the formatted logs can only cause trouble. +logger.pipe = function() { }; + +module.exports = logger; + + +/***/ }), + +/***/ "tbe6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rZdQ"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8cmQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = function styles(theme) { + var elevations = {}; + theme.shadows.forEach(function (shadow, index) { + elevations["elevation".concat(index)] = { + boxShadow: shadow + }; + }); + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + /* Styles applied to the root element. */ + root: { + backgroundColor: theme.palette.background.paper, + color: theme.palette.text.primary, + transition: theme.transitions.create('box-shadow') + }, + + /* Styles applied to the root element if `square={false}`. */ + rounded: { + borderRadius: theme.shape.borderRadius + }, + + /* Styles applied to the root element if `variant="outlined"`. */ + outlined: { + border: "1px solid ".concat(theme.palette.divider) + } + }, elevations); +}; +var Paper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Paper(props, ref) { + var classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + _props$square = props.square, + square = _props$square === void 0 ? false : _props$square, + _props$elevation = props.elevation, + elevation = _props$elevation === void 0 ? 1 : _props$elevation, + _props$variant = props.variant, + variant = _props$variant === void 0 ? 'elevation' : _props$variant, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__["default"])(props, ["classes", "className", "component", "square", "elevation", "variant"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, variant === 'outlined' ? classes.outlined : classes["elevation".concat(elevation)], !square && classes.rounded), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiPaper' +})(Paper)); + +/***/ }), + +/***/ "tlEq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__("lrTv"); +var define = __webpack_require__("r0Co"); +var RequireObjectCoercible = __webpack_require__("YG3o"); + +var implementation = __webpack_require__("7i6R"); +var getPolyfill = __webpack_require__("hDBM"); +var shim = __webpack_require__("Yik/"); + +var bound = callBind(getPolyfill()); +var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); +}; + +define(boundMethod, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = boundMethod; + + +/***/ }), + +/***/ "tlql": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHelpLink", function() { return getHelpLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClaudyActions", function() { return getClaudyActions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldEnableClaudy", function() { return shouldEnableClaudy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchContext", function() { return fetchContext; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("qAtN"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("hJxD"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("HZZ/"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("jTJl"); +/* harmony import */ var _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("24Iz"); +var _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t("24Iz", 1); +/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("oEaH"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("8ZpT"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_6__); + + + + + + + +var FETCH_CONTEXT = 'FETCH_CONTEXT'; +var FETCH_CONTEXT_SUCCESS = 'FETCH_CONTEXT_SUCCESS'; +var RECEIVE_NO_CONTEXT = 'RECEIVE_NO_CONTEXT'; // selectors + +var getHelpLink = function getHelpLink(state) { + return state.helpLink; +}; +var getClaudyActions = function getClaudyActions(state) { + return state.claudyActions; +}; +var shouldEnableClaudy = function shouldEnableClaudy(state) { + var claudyActions = getClaudyActions(state); + return !!claudyActions && !!claudyActions.length; +}; // actions + +var fetchContext = function fetchContext() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch, getState) { + var context; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + dispatch({ + type: FETCH_CONTEXT + }); + + if (!getState().context.contextNotExist) { + _context.next = 3; + break; + } + + return _context.abrupt("return", dispatch({ + type: FETCH_CONTEXT_SUCCESS, + context: null + })); + + case 3: + _context.prev = 3; + _context.next = 6; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.context(); + + case 6: + context = _context.sent; + return _context.abrupt("return", dispatch({ + type: FETCH_CONTEXT_SUCCESS, + context: context + })); + + case 10: + _context.prev = 10; + _context.t0 = _context["catch"](3); + + if (_context.t0.status && _context.t0.status === 404) { + dispatch({ + type: RECEIVE_NO_CONTEXT + }); + } // eslint-disable-next-line no-console + + + console.warn('Cannot get Cozy context'); + return _context.abrupt("return", null); + + case 15: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[3, 10]]); + })); + + return function (_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + claudyActions: [], + contextNotExist: false, + helpLink: null, + isFetching: false +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_CONTEXT_SUCCESS: + { + var attr = action.context && action.context.data && action.context.data.attributes; + var contextActions = cozy_flags__WEBPACK_IMPORTED_MODULE_6___default()('bar.claudy.force-all-actions') ? Object.keys(_config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__) : attr && attr['claudy_actions']; // get an arrays of action + + var claudyActions = contextActions.map(function (slug) { + if (_config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__.hasOwnProperty(slug)) { + // adding also the action slug + return Object.assign({}, _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__[slug], { + slug: slug + }); + } + }).filter(function (action) { + return action; + }); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + helpLink: attr && attr['help_link'] || null, + claudyActions: claudyActions, + isFetching: false, + contextNotExist: false + }); + } + + case RECEIVE_NO_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + contextNotExist: true + }); + + case _settings__WEBPACK_IMPORTED_MODULE_5__["LOG_OUT"]: + return defaultState; + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); + +/***/ }), + +/***/ "tqA5": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = __webpack_require__("Kl0M"); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + + +/***/ }), + +/***/ "ttZt": +/***/ (function(module, exports) { + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; + + +/***/ }), + +/***/ "tucV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fpPt"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "twUa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FetchError = exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("J/YY")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__("2y6E")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var EXPIRED_TOKEN = /Expired token/; +var CLIENT_NOT_FOUND = /Client not found/; +var INVALID_TOKEN = /Invalid JWT token/; +var INVALID_TOKEN_ALT = /Invalid token/; +var UNREGISTERED_CLIENT = /the client must be registered/; +var _default = { + EXPIRED_TOKEN: EXPIRED_TOKEN, + CLIENT_NOT_FOUND: CLIENT_NOT_FOUND, + INVALID_TOKEN: INVALID_TOKEN, + INVALID_TOKEN_ALT: INVALID_TOKEN_ALT, + UNREGISTERED_CLIENT: UNREGISTERED_CLIENT +}; +exports.default = _default; +var invalidTokenRegex = /invalid_token/; +var expiredTokenRegex = /access_token_expired/; + +var getWwwAuthenticateErrorMessage = function getWwwAuthenticateErrorMessage(response) { + var _response$headers; + + var wwwAuthenticateHeader = (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.get('www-authenticate'); + if (!wwwAuthenticateHeader) return undefined; + if (expiredTokenRegex.test(wwwAuthenticateHeader)) return 'Expired token'; + if (invalidTokenRegex.test(wwwAuthenticateHeader)) return 'Invalid token'; +}; + +var getReasonMessage = function getReasonMessage(reason, wwwAuthenticateErrorMessage) { + // As for now we only want to use `reason.error` over `reason.message` if it's an unregistered client error + // For other scenarios, we want to still use `reason.message` over `JSON.stringify(reason)` for better backward compatibility + var isUnregisteredError = typeof reason.error === 'string' && UNREGISTERED_CLIENT.test(reason.error) ? reason.error : undefined; + return isUnregisteredError || reason.message || wwwAuthenticateErrorMessage || (typeof reason === 'string' ? reason : JSON.stringify(reason)); +}; + +var FetchError = /*#__PURE__*/function (_Error) { + (0, _inherits2.default)(FetchError, _Error); + + var _super = _createSuper(FetchError); + + function FetchError(response, reason) { + var _Error$captureStackTr; + + var _this; + + (0, _classCallCheck2.default)(this, FetchError); + _this = _super.call(this); + (_Error$captureStackTr = Error.captureStackTrace) === null || _Error$captureStackTr === void 0 ? void 0 : _Error$captureStackTr.call(Error, (0, _assertThisInitialized2.default)(_this), _this.constructor); // WARN We have to hardcode this because babel doesn't play nice when extending Error + + _this.name = 'FetchError'; + _this.response = response; + _this.url = response.url; + _this.status = response.status; + _this.reason = reason; + + if (reason === null) { + throw new Error("FetchError received a ".concat(response.status, " error without a Response Body when calling ").concat(response.url)); + } + + var wwwAuthenticateErrorMessage = getWwwAuthenticateErrorMessage(response); + Object.defineProperty((0, _assertThisInitialized2.default)(_this), 'message', { + value: getReasonMessage(reason, wwwAuthenticateErrorMessage) + }); + return _this; + } + + return FetchError; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +exports.FetchError = FetchError; + +/***/ }), + +/***/ "u/C9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("79eC"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "u07n": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instrumentRoutingWithDefaults", function() { return instrumentRoutingWithDefaults; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("+2Xp"); + + + +/** + * Default function implementing pageload and navigation transactions + */ +function instrumentRoutingWithDefaults( + customStartTransaction, + startTransactionOnPageLoad = true, + startTransactionOnLocationChange = true, +) { + if (!_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"] || !_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not initialize routing instrumentation due to invalid location'); + return; + } + + let startingUrl = _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.href; + + let activeTransaction; + if (startTransactionOnPageLoad) { + activeTransaction = customStartTransaction({ + name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, + op: 'pageload', + metadata: { source: 'url' }, + }); + } + + if (startTransactionOnLocationChange) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('history', ({ to, from }) => { + /** + * This early return is there to account for some cases where a navigation transaction starts right after + * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't + * create an uneccessary navigation transaction. + * + * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also + * only be caused in certain development environments where the usage of a hot module reloader is causing + * errors. + */ + if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) { + startingUrl = undefined; + return; + } + + if (from !== to) { + startingUrl = undefined; + if (activeTransaction) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`); + // If there's an open transaction on the scope, we need to finish it before creating an new one. + activeTransaction.finish(); + } + activeTransaction = customStartTransaction({ + name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, + op: 'navigation', + metadata: { source: 'url' }, + }); + } + }); + } +} + + +//# sourceMappingURL=router.js.map + + +/***/ }), + +/***/ "u1Q0": +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__("1del"), + baseFlatten = __webpack_require__("IcUP"), + copyArray = __webpack_require__("MbtP"), + isArray = __webpack_require__("8u9v"); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; + + +/***/ }), + +/***/ "u6ow": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var client = _interopRequireWildcard(__webpack_require__("ZYYc")); + +var service = _interopRequireWildcard(__webpack_require__("UMYs")); + +var _request = _interopRequireDefault(__webpack_require__("M8jC")); + +var _helpers = __webpack_require__("6cet"); + +var Intents = +/*#__PURE__*/ +function () { + function Intents() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + client = _ref.client; + + (0, _classCallCheck2.default)(this, Intents); + this.request = new _request.default(client); + this.create = this.create.bind(this); + } + + (0, _createClass2.default)(Intents, [{ + key: "create", + value: function create(action, type) { + var _this = this; + + var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var permissions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + if (!action) throw new Error("Misformed intent, \"action\" property must be provided"); + if (!type) throw new Error("Misformed intent, \"type\" property must be provided"); + var createPromise = this.request.post(action, type, data, permissions); + + createPromise.start = function (element, onReadyCallback) { + var options = { + filteredServices: data.filteredServices, + onReadyCallback: onReadyCallback + }; + delete data.filteredServices; + var intentManager; + var prom = createPromise.then(function (intent) { + intentManager = client.start(_this.create, intent, element, data, options); + return intentManager; + }); + + prom.stop = function () { + intentManager && intentManager.destroy(); + }; + + return prom; + }; + + return createPromise; + } // returns a service to communicate with intent client + + }, { + key: "createService", + value: function createService(intentId, serviceWindow) { + return service.start(this.request)(intentId, serviceWindow); + } // Redirect to an app able to handle the doctype + // Redirections are more or less a hack of the intent API to retrieve an URL for + // accessing a given doctype or a given document. + // It needs to use a special action `REDIRECT` + + }, { + key: "getRedirectionURL", + value: function () { + var _getRedirectionURL = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(type, data) { + var intent, service, baseURL; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(!type && !data)) { + _context.next = 2; + break; + } + + throw new Error("Cannot retrieve redirection, at least type or doc must be provided"); + + case 2: + _context.next = 4; + return this.create('REDIRECT', type, data); + + case 4: + intent = _context.sent; + service = (0, _helpers.pickService)(intent); // Intents cannot be deleted now + // await deleteIntent(intent) + + baseURL = (0, _helpers.removeQueryString)(service.href); + return _context.abrupt("return", data ? (0, _helpers.buildRedirectionURL)(baseURL, data) : baseURL); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function getRedirectionURL(_x, _x2) { + return _getRedirectionURL.apply(this, arguments); + } + + return getRedirectionURL; + }() + }, { + key: "redirect", + value: function () { + var _redirect = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2(type, doc, redirectFn) { + var redirectionURL; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (window) { + _context2.next = 2; + break; + } + + throw new Error('redirect() method can only be called in a browser'); + + case 2: + _context2.next = 4; + return this.getRedirectionURL(type, doc); + + case 4: + redirectionURL = _context2.sent; + + if (!(redirectFn && typeof redirectFn === 'function')) { + _context2.next = 7; + break; + } + + return _context2.abrupt("return", redirectFn(redirectionURL)); + + case 7: + window.location.href = redirectionURL; + + case 8: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function redirect(_x3, _x4, _x5) { + return _redirect.apply(this, arguments); + } + + return redirect; + }() + }]); + return Intents; +}(); + +var _default = Intents; +exports.default = _default; + +/***/ }), + +/***/ "u7v4": +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__("wWEB"); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; + + +/***/ }), + +/***/ "u8T2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observe", function() { return observe; }); +/** + * Takes a performance entry type and a callback function, and creates a + * `PerformanceObserver` instance that will observe the specified entry type + * with buffering enabled and call the callback _for each entry_. + * + * This function also feature-detects entry support and wraps the logic in a + * try/catch to avoid errors in unsupporting browsers. + */ +const observe = ( + type, + callback, + opts, +) => { + try { + if (PerformanceObserver.supportedEntryTypes.includes(type)) { + const po = new PerformanceObserver(list => { + callback(list.getEntries() ); + }); + po.observe( + Object.assign( + { + type, + buffered: true, + }, + opts || {}, + ) , + ); + return po; + } + } catch (e) { + // Do nothing. + } + return; +}; + + +//# sourceMappingURL=observe.js.map + + +/***/ }), + +/***/ "uANh": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("LFRV"); +module.exports = __webpack_require__("WSXa").String.padEnd; + + +/***/ }), + +/***/ "uBBm": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/** + * @typedef {object} CozyStackClient + * @property {object} oauthOptions oauthOptions + * @property {string} uri CozyUri + * @property {Function} fetch fetchMethod + * @property {Function} fetchJSON fetchJSON + */ +var _default = {}; +exports.default = _default; + +/***/ }), + +/***/ "uC4V": +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__("LRPZ"); +var $entries = __webpack_require__("M2yu")(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + + +/***/ }), + +/***/ "uCEU": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__("UJ5a"); +} else {} + + +/***/ }), + +/***/ "uCkj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); +var _cozyClient = __webpack_require__("xEu0"); +var _doctypes = __webpack_require__("rVhO"); +var _luxon = __webpack_require__("1EDv"); +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } +var ProfileService = /*#__PURE__*/function () { + function ProfileService(_client) { + (0, _classCallCheck2.default)(this, ProfileService); + (0, _defineProperty2.default)(this, "_client", void 0); + this._client = _client; + } + (0, _createClass2.default)(ProfileService, [{ + key: "getDate", + value: function getDate(date) { + if (!date) { + return _luxon.DateTime.local().minus({ + day: 1 + }).startOf('day'); + } + return _luxon.DateTime.fromISO(date, { + zone: 'utc' + }); + } + + /** + * Retrieve Profile from the ProfileEntity + */ + }, { + key: "parseProfileEntityToProfile", + value: function parseProfileEntityToProfile(profileEntity) { + var _profileEntity$partne, _profileEntity$partne2, _profileEntity$partne3; + var profile = _objectSpread(_objectSpread({}, profileEntity), {}, { + monthlyAnalysisDate: typeof profileEntity.monthlyAnalysisDate === 'string' ? this.getDate(profileEntity.monthlyAnalysisDate) : profileEntity.monthlyAnalysisDate, + lastConnectionDate: this.getDate(profileEntity.lastConnectionDate), + partnersIssueSeenDate: { + enedis: this.getDate((_profileEntity$partne = profileEntity.partnersIssueSeenDate) === null || _profileEntity$partne === void 0 ? void 0 : _profileEntity$partne.enedis), + egl: this.getDate((_profileEntity$partne2 = profileEntity.partnersIssueSeenDate) === null || _profileEntity$partne2 === void 0 ? void 0 : _profileEntity$partne2.egl), + grdf: this.getDate((_profileEntity$partne3 = profileEntity.partnersIssueSeenDate) === null || _profileEntity$partne3 === void 0 ? void 0 : _profileEntity$partne3.grdf) + }, + activateHalfHourDate: this.getDate(profileEntity.activateHalfHourDate), + customPopupDate: this.getDate(profileEntity.customPopupDate) + }); + return profile; + } + }, { + key: "getProfile", + value: function () { + var _getProfile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var query, _yield$this$_client$q, _yield$this$_client$q2, profile, profileEntity; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + query = (0, _cozyClient.Q)(_doctypes.PROFILE_DOCTYPE); + _context.next = 3; + return this._client.query(query.limitBy(1)); + case 3: + _yield$this$_client$q = _context.sent; + _yield$this$_client$q2 = (0, _slicedToArray2.default)(_yield$this$_client$q.data, 1); + profile = _yield$this$_client$q2[0]; + profileEntity = profile ? profile : null; + if (!profileEntity) { + _context.next = 9; + break; + } + return _context.abrupt("return", this.parseProfileEntityToProfile(profileEntity)); + case 9: + return _context.abrupt("return", null); + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + function getProfile() { + return _getProfile.apply(this, arguments); + } + return getProfile; + }() + }, { + key: "updateProfile", + value: function () { + var _updateProfile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(attributes) { + var query, _yield$this$_client$q3, _yield$this$_client$q4, doc, _yield$this$_client$s, profileEntity; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + query = (0, _cozyClient.Q)(_doctypes.PROFILE_DOCTYPE); + _context2.next = 3; + return this._client.query(query.limitBy(1)); + case 3: + _yield$this$_client$q3 = _context2.sent; + _yield$this$_client$q4 = (0, _slicedToArray2.default)(_yield$this$_client$q3.data, 1); + doc = _yield$this$_client$q4[0]; + _context2.next = 8; + return this._client.save(_objectSpread(_objectSpread({}, doc), attributes)); + case 8: + _yield$this$_client$s = _context2.sent; + profileEntity = _yield$this$_client$s.data; + if (!profileEntity) { + _context2.next = 12; + break; + } + return _context2.abrupt("return", this.parseProfileEntityToProfile(profileEntity)); + case 12: + return _context2.abrupt("return", null); + case 13: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + function updateProfile(_x) { + return _updateProfile.apply(this, arguments); + } + return updateProfile; + }() + }]); + return ProfileService; +}(); +exports.default = ProfileService; + +/***/ }), + +/***/ "uDQB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WINDOW", function() { return WINDOW; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreNextOnError", function() { return ignoreNextOnError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldIgnoreOnError", function() { return shouldIgnoreOnError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; }); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pz9k"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); + + + +const WINDOW = _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["GLOBAL_OBJ"] ; + +let ignoreOnError = 0; + +/** + * @hidden + */ +function shouldIgnoreOnError() { + return ignoreOnError > 0; +} + +/** + * @hidden + */ +function ignoreNextOnError() { + // onerror should trigger before setTimeout + ignoreOnError += 1; + setTimeout(() => { + ignoreOnError -= 1; + }); +} + +/** + * Instruments the given function and sends an event to Sentry every time the + * function throws an exception. + * + * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always + * has a correct `this` context. + * @returns The wrapped function. + * @hidden + */ +function wrap( + fn, + options + + = {}, + before, + // eslint-disable-next-line @typescript-eslint/no-explicit-any +) { + // for future readers what this does is wrap a function and then create + // a bi-directional wrapping between them. + // + // example: wrapped = wrap(original); + // original.__sentry_wrapped__ -> wrapped + // wrapped.__sentry_original__ -> original + + if (typeof fn !== 'function') { + return fn; + } + + try { + // if we're dealing with a function that was previously wrapped, return + // the original wrapper. + const wrapper = fn.__sentry_wrapped__; + if (wrapper) { + return wrapper; + } + + // We don't wanna wrap it twice + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getOriginalFunction"])(fn)) { + return fn; + } + } catch (e) { + // Just accessing custom props in some Selenium environments + // can cause a "Permission denied" exception (see raven-js#495). + // Bail on wrapping and return the function as-is (defers to window.onerror). + return fn; + } + + /* eslint-disable prefer-rest-params */ + // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this` + const sentryWrapped = function () { + const args = Array.prototype.slice.call(arguments); + + try { + if (before && typeof before === 'function') { + before.apply(this, arguments); + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access + const wrappedArguments = args.map((arg) => wrap(arg, options)); + + // Attempt to invoke user-land function + // NOTE: If you are a Sentry user, and you are seeing this stack frame, it + // means the sentry.javascript SDK caught an error invoking your application code. This + // is expected behavior and NOT indicative of a bug with sentry.javascript. + return fn.apply(this, wrappedArguments); + } catch (ex) { + ignoreNextOnError(); + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["withScope"])((scope) => { + scope.addEventProcessor((event) => { + if (options.mechanism) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionTypeValue"])(event, undefined, undefined); + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addExceptionMechanism"])(event, options.mechanism); + } + + event.extra = { + ...event.extra, + arguments: args, + }; + + return event; + }); + + Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__["captureException"])(ex); + }); + + throw ex; + } + }; + /* eslint-enable prefer-rest-params */ + + // Accessing some objects may throw + // ref: https://github.com/getsentry/sentry-javascript/issues/1168 + try { + for (const property in fn) { + if (Object.prototype.hasOwnProperty.call(fn, property)) { + sentryWrapped[property] = fn[property]; + } + } + } catch (_oO) {} // eslint-disable-line no-empty + + // Signal that this function has been wrapped/filled already + // for both debugging and to prevent it to being wrapped/filled twice + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["markFunctionWrapped"])(sentryWrapped, fn); + + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["addNonEnumerableProperty"])(fn, '__sentry_wrapped__', sentryWrapped); + + // Restore original function name (not all browsers allow that) + try { + const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ; + if (descriptor.configurable) { + Object.defineProperty(sentryWrapped, 'name', { + get() { + return fn.name; + }, + }); + } + // eslint-disable-next-line no-empty + } catch (_oO) {} + + return sentryWrapped; +} + +/** + * All properties the report dialog supports + */ + + +//# sourceMappingURL=helpers.js.map + + +/***/ }), + +/***/ "uEAC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warning; }); +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + +} + +/***/ }), + +/***/ "uJOE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var AppToken = /*#__PURE__*/function () { + function AppToken(token) { + (0, _classCallCheck2.default)(this, AppToken); + this.token = token || ''; + } + + (0, _createClass2.default)(AppToken, [{ + key: "toAuthHeader", + value: function toAuthHeader() { + return 'Bearer ' + this.token; + } + }, { + key: "toBasicAuth", + value: function toBasicAuth() { + return "user:".concat(this.token, "@"); + } + /** + * Get the app token string + * + * @see CozyStackClient.getAccessToken + * @returns {string} token + */ + + }, { + key: "getAccessToken", + value: function getAccessToken() { + return this.token; + } + }]); + return AppToken; +}(); + +exports.default = AppToken; + +/***/ }), + +/***/ "uLwU": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; + + +/***/ }), + +/***/ "uRct": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appsI18nMiddleware", function() { return appsI18nMiddleware; }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("J58c"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("nUfk"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _reducers_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("iAYT"); + + + + +var extendI18nWithApp = function extendI18nWithApp(lang) { + return function (app) { + var langs = app.langs, + locales = app.locales; + var hasLangs = langs && langs.length; + + if (!hasLangs) { + // TODO The app does not provide langs, we should probably warn the developer + // when the app is published on the registry. + return app; + } + + var providesLang = hasLangs && langs.includes(lang); + var currentLang = providesLang ? lang : langs[0]; + var localeKeys = locales && Object.keys(locales); + var providesLocales = localeKeys && localeKeys.length && localeKeys.includes(currentLang); + + if (!providesLocales) { + // TODO The app does not provide locales, we should probably warn the developer + // when the app is published on the regisry. + return app; + } + + Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__["extend"])(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, app.slug, locales[currentLang])); + return app; + }; +}; + +var useLang = function useLang(apps, lang) { + apps && apps.forEach(extendI18nWithApp(lang)); +}; + +var appsI18nMiddleware = function appsI18nMiddleware(_ref) { + var getState = _ref.getState; + return function (next) { + return function (action) { + var state = getState(); + + switch (action.type) { + case _reducers_locale__WEBPACK_IMPORTED_MODULE_2__["SET_LOCALE"]: + { + var apps = state.apps && state.apps.apps; + useLang(apps, action.lang); + break; + } + + case 'RECEIVE_APP_LIST': + action.apps && action.apps.length && action.apps.forEach(extendI18nWithApp(state.locale)); + break; + + case 'RECEIVE_APP': + action.app && extendI18nWithApp(state.locale && state.locale.lang)(action.app); + break; + } + + return next(action); + }; + }; +}; +/* harmony default export */ __webpack_exports__["default"] = (appsI18nMiddleware); + +/***/ }), + +/***/ "uTrQ": +/***/ (function(module, exports, __webpack_require__) { + +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + + +/***/ }), + +/***/ "uagS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.buildURL = exports.encode = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _pickBy = _interopRequireDefault(__webpack_require__("pp5t")); + +/** + * Encode a value of any type into a URI search param compatible string with a specific treatment for arrays which will keep their brackets (they do not with standard `toString()` method). + * + * Examples: + * + * encodeValues([['io.cozy.files', 'abcd1234'], '12345']) + * // → '[[%22io.cozy.files%22,%22abcd1234%22],%2212345%22]' + * + * encodeValues([['io.cozy.files', 'abcd1234'], '12345'].toString(), true) + * // → '%22io.cozy.files%2Cabcd1234%2C12345%22' + * + * encodeValues([['io.cozy.files', 'abcd1234'], '12345'].toString(), false) + * // → 'io.cozy.files%2Cabcd1234%2C12345' + * + * encodeValues('[1234]') + * // → %5B1234%5D + * + * @function + * @private + */ +var encodeValues = function encodeValues(values) { + var fromArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (Array.isArray(values)) { + return '[' + values.map(function (v) { + return encodeValues(v, true); + }).join(',') + ']'; + } + + return fromArray ? encodeURIComponent("\"".concat(values, "\"")) : encodeURIComponent(values); +}; +/** + * Encode an object as querystring, values are encoded as + * URI components, keys are not. + * + * @function + * @private + */ + + +var encode = function encode(data) { + return Object.entries(data).map(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + k = _ref2[0], + v = _ref2[1]; + + var encodedValue = encodeValues(v); + return "".concat(k, "=").concat(encodedValue); + }).join('&'); +}; +/** + * Returns a URL from base url and a query parameter object. + * Any undefined parameter is removed. + * + * @function + * @private + */ + + +exports.encode = encode; + +var buildURL = function buildURL(url, params) { + var qs = encode((0, _pickBy.default)(params)); + + if (qs) { + return "".concat(url, "?").concat(qs); + } else { + return url; + } +}; + +exports.buildURL = buildURL; + +/***/ }), + +/***/ "uaqx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("n6kB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Tooltip__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "ub0a": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +__webpack_require__("V+ek")('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + + +/***/ }), + +/***/ "ueJl": +/***/ (function(module, exports, __webpack_require__) { + +var baseTrim = __webpack_require__("qtRW"), + isObject = __webpack_require__("06hQ"), + isSymbol = __webpack_require__("+IXE"); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; + +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; + +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; + +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} + +module.exports = toNumber; + + +/***/ }), + +/***/ "uh8Z": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _microee = _interopRequireDefault(__webpack_require__("GIvT")); + +var _lsAdapter = _interopRequireDefault(__webpack_require__("vQtR")); + +/** + * In memory key value storage. + * + * Can potentially be backed by localStorage if present + + * Emits `change` when a key is set (eventEmitter) + */ +var FlagStore = /*#__PURE__*/function () { + function FlagStore() { + (0, _classCallCheck2.default)(this, FlagStore); + this.store = {}; + + if (typeof localStorage !== 'undefined') { + this.longtermStore = _lsAdapter.default; + } + + this.restore(); + } + + (0, _createClass2.default)(FlagStore, [{ + key: "restore", + value: function restore() { + if (!this.longtermStore) { + return; + } + + var allValues = this.longtermStore.getAll(); + + for (var _i = 0, _Object$entries = Object.entries(allValues); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), + flag = _Object$entries$_i[0], + val = _Object$entries$_i[1]; + + this.store[flag] = val; + this.emit('change', flag); + } + } + }, { + key: "keys", + value: function keys() { + return Object.keys(this.store); + } + }, { + key: "get", + value: function get(name) { + // eslint-disable-next-line no-prototype-builtins + if (!this.store.hasOwnProperty(name)) { + this.store[name] = null; + } + + return this.store[name]; + } + }, { + key: "set", + value: function set(name, value) { + if (this.longtermStore) { + this.longtermStore.setItem(name, value); + } + + this.store[name] = value; + this.emit('change', name); + } + }, { + key: "remove", + value: function remove(name) { + delete this.store[name]; + + if (this.longtermStore) { + this.longtermStore.removeItem(name); + } + + this.emit('change', name); + } + }]); + return FlagStore; +}(); + +_microee.default.mixin(FlagStore); + +var _default = FlagStore; +exports.default = _default; + +/***/ }), + +/***/ "ulUA": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _react = __webpack_require__("ivGQ"); + +var _useIsMounted = _interopRequireDefault(__webpack_require__("helD")); + +var useSafeState = function useSafeState(initialState) { + var mounted = (0, _useIsMounted.default)(); + + var _useState = (0, _react.useState)(initialState), + _useState2 = (0, _slicedToArray2.default)(_useState, 2), + state = _useState2[0], + setState = _useState2[1]; + + var setSafeState = (0, _react.useCallback)(function (newState) { + if (mounted.current) { + setState(newState); + } + }, [] // eslint-disable-line react-hooks/exhaustive-deps + ); + return [state, setSafeState]; +}; + +var _default = useSafeState; +exports.default = _default; + +/***/ }), + +/***/ "ulpC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Dv7O"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'flex', + justifyContent: 'center', + height: 56, + backgroundColor: theme.palette.background.paper + } + }; +}; +var BottomNavigation = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function BottomNavigation(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$component = props.component, + Component = _props$component === void 0 ? 'div' : _props$component, + onChange = props.onChange, + _props$showLabels = props.showLabels, + showLabels = _props$showLabels === void 0 ? false : _props$showLabels, + value = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "component", "onChange", "showLabels", "value"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), react__WEBPACK_IMPORTED_MODULE_2__["Children"].map(children, function (child, childIndex) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["isValidElement"](child)) { + return null; + } + + if (false) {} + + var childValue = child.props.value === undefined ? childIndex : child.props.value; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["cloneElement"](child, { + selected: childValue === value, + showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels, + value: childValue, + onChange: onChange + }); + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiBottomNavigation' +})(BottomNavigation)); + +/***/ }), + +/***/ "umgW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReactReduxContext", function() { return ReactReduxContext; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var ReactReduxContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null); + +if (false) {} + +/* harmony default export */ __webpack_exports__["default"] = (ReactReduxContext); + +/***/ }), + +/***/ "unBY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BROWSER_TRACING_INTEGRATION_ID", function() { return BROWSER_TRACING_INTEGRATION_ID; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserTracing", function() { return BrowserTracing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMetaContent", function() { return getMetaContent; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _hubextensions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("matq"); +/* harmony import */ var _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ESWp"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("VjOD"); +/* harmony import */ var _backgroundtab_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("WvZ1"); +/* harmony import */ var _metrics_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("qWrL"); +/* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("GDt/"); +/* harmony import */ var _router_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("u07n"); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("+2Xp"); + + + + + + + + + + + +const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing'; + +/** Options for Browser Tracing integration */ + +const DEFAULT_BROWSER_TRACING_OPTIONS = { + idleTimeout: _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_IDLE_TIMEOUT"], + finalTimeout: _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_FINAL_TIMEOUT"], + heartbeatInterval: _idletransaction_js__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_HEARTBEAT_INTERVAL"], + markBackgroundTransactions: true, + routingInstrumentation: _router_js__WEBPACK_IMPORTED_MODULE_8__["instrumentRoutingWithDefaults"], + startTransactionOnLocationChange: true, + startTransactionOnPageLoad: true, + _experiments: { enableLongTask: true }, + ..._request_js__WEBPACK_IMPORTED_MODULE_7__["defaultRequestInstrumentationOptions"], +}; + +/** + * The Browser Tracing integration automatically instruments browser pageload/navigation + * actions as transactions, and captures requests, metrics and errors as spans. + * + * The integration can be configured with a variety of options, and can be extended to use + * any routing library. This integration uses {@see IdleTransaction} to create transactions. + */ +class BrowserTracing { + // This class currently doesn't have a static `id` field like the other integration classes, because it prevented + // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects. + // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all + // integrations. + + /** Browser Tracing integration options */ + + /** + * @inheritDoc + */ + __init() {this.name = BROWSER_TRACING_INTEGRATION_ID;} + + constructor(_options) {;BrowserTracing.prototype.__init.call(this); + this.options = { + ...DEFAULT_BROWSER_TRACING_OPTIONS, + ..._options, + }; + + // TODO (v8): remove this block after tracingOrigins is removed + // Set tracePropagationTargets to tracingOrigins if specified by the user + // In case both are specified, tracePropagationTargets takes precedence + // eslint-disable-next-line deprecation/deprecation + if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) { + // eslint-disable-next-line deprecation/deprecation + this.options.tracePropagationTargets = _options.tracingOrigins; + } + + const { _metricOptions } = this.options; + Object(_metrics_index_js__WEBPACK_IMPORTED_MODULE_6__["startTrackingWebVitals"])(_metricOptions && _metricOptions._reportAllChanges); + if (Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([this, 'access', _2 => _2.options, 'access', _3 => _3._experiments, 'optionalAccess', _4 => _4.enableLongTask])) { + Object(_metrics_index_js__WEBPACK_IMPORTED_MODULE_6__["startTrackingLongTasks"])(); + } + } + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + this._getCurrentHub = getCurrentHub; + + // eslint-disable-next-line @typescript-eslint/unbound-method + const { + routingInstrumentation: instrumentRouting, + startTransactionOnLocationChange, + startTransactionOnPageLoad, + markBackgroundTransactions, + traceFetch, + traceXHR, + tracePropagationTargets, + shouldCreateSpanForRequest, + } = this.options; + + instrumentRouting( + (context) => this._createRouteTransaction(context), + startTransactionOnPageLoad, + startTransactionOnLocationChange, + ); + + if (markBackgroundTransactions) { + Object(_backgroundtab_js__WEBPACK_IMPORTED_MODULE_5__["registerBackgroundTabDetection"])(); + } + + Object(_request_js__WEBPACK_IMPORTED_MODULE_7__["instrumentOutgoingRequests"])({ + traceFetch, + traceXHR, + tracePropagationTargets, + shouldCreateSpanForRequest, + }); + } + + /** Create routing idle transaction. */ + _createRouteTransaction(context) { + if (!this._getCurrentHub) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`); + return undefined; + } + + // eslint-disable-next-line @typescript-eslint/unbound-method + const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options; + + const isPageloadTransaction = context.op === 'pageload'; + + const sentryTraceMetaTagValue = isPageloadTransaction ? getMetaContent('sentry-trace') : null; + const baggageMetaTagValue = isPageloadTransaction ? getMetaContent('baggage') : null; + + const traceParentData = sentryTraceMetaTagValue ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["extractTraceparentData"])(sentryTraceMetaTagValue) : undefined; + const dynamicSamplingContext = baggageMetaTagValue + ? Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["baggageHeaderToDynamicSamplingContext"])(baggageMetaTagValue) + : undefined; + + const expandedContext = { + ...context, + ...traceParentData, + metadata: { + ...context.metadata, + dynamicSamplingContext: traceParentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, + }, + trimEnd: true, + }; + + const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext; + + // For backwards compatibility reasons, beforeNavigate can return undefined to "drop" the transaction (prevent it + // from being sent to Sentry). + const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext; + + // If `beforeNavigate` set a custom name, record that fact + finalContext.metadata = + finalContext.name !== expandedContext.name + ? { ...finalContext.metadata, source: 'custom' } + : finalContext.metadata; + + if (finalContext.sampled === false) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && + _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`); + } + + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log(`[Tracing] Starting ${finalContext.op} transaction on scope`); + + const hub = this._getCurrentHub(); + const { location } = _types_js__WEBPACK_IMPORTED_MODULE_9__["WINDOW"]; + + const idleTransaction = Object(_hubextensions_js__WEBPACK_IMPORTED_MODULE_2__["startIdleTransaction"])( + hub, + finalContext, + idleTimeout, + finalTimeout, + true, + { location }, // for use in the tracesSampler + heartbeatInterval, + ); + idleTransaction.registerBeforeFinishCallback(transaction => { + Object(_metrics_index_js__WEBPACK_IMPORTED_MODULE_6__["addPerformanceEntries"])(transaction); + transaction.setTag( + 'sentry_reportAllChanges', + Boolean(this.options._metricOptions && this.options._metricOptions._reportAllChanges), + ); + }); + + return idleTransaction ; + } +} + +/** Returns the value of a meta tag */ +function getMetaContent(metaName) { + // Can't specify generic to `getDomElement` because tracing can be used + // in a variety of environments, have to disable `no-unsafe-member-access` + // as a result. + const metaTag = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["getDomElement"])(`meta[name=${metaName}]`); + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + return metaTag ? metaTag.getAttribute('content') : null; +} + + +//# sourceMappingURL=browsertracing.js.map + + +/***/ }), + +/***/ "upfM": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var abs = __webpack_require__("RaNm"); +var floor = __webpack_require__("C2kf"); +var ToNumber = __webpack_require__("v2hx"); + +var $isNaN = __webpack_require__("MIo3"); +var $isFinite = __webpack_require__("UmYl"); +var $sign = __webpack_require__("h3bs"); + +// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity + +module.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { return 0; } + if (!$isFinite(number)) { return number; } + return $sign(number) * floor(abs(number)); +}; + + +/***/ }), + +/***/ "urEX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _dsl = __webpack_require__("v2kV"); + +/** + * Associations are used by components to access related store documents that are + * linked in a document. They are also responsible for building the `QueryDefinition` that is + * used by the client to automatically fetch relationship data. + * + * Hydrated documents used by components come with Association instances. + * + * @interface + * + * @description + * Example: The schema defines an `author` relationship : + * + * ```js + * const BOOK_SCHEMA = { + * relationships: { + * author: 'has-one' + * } + * } + * ``` + * + * Hydrated `books` will have the `author` association instance under the `author` key. + * Accessing `hydratedBook.author.data` gives you the author from the store, for example : + * + * ```json + * { + * "name": "St-Exupery", + * "firstName": "Antoine", + * "_id": "antoine" + * } + * ``` + * + * It is the responsibility of the relationship to decide how the relationship data is stored. + * For example, here since we use the default `has-one` relationship, the relationship data + * is stored in the `relationships` attribute of the original document (in our case here, our book + * would be + * + * ```json + * { + * "title": "Le petit prince", + * "relationships": { + * "author": { + * "data": { + * "doctype": "io.cozy.authors", + * "_id": "antoine" + * } + * } + * } + * } + * ``` + * + * In the case of an "in-place" relationship, the relationship data is stored directly under the attribute named + * by the relationship (in our case `author`). Our book would be + * + * ```json + * { + * "title": "Le petit prince", + * "author": "antoine" + * } + * ``` + * + * --- + * + * Each different type of Association may change: + * + * - `get raw`: how the relationship data is stored (either as per the JSON API spec or + * in a custom way) + * - `get data`: how the store documents are then fetched from the store to be added to + * the hydrated document (.data method). View components will access + * `hydratedDoc[relationshipName].data`. + * - `get query`: how to build the query to fetch related documents + * + */ +var Association = /*#__PURE__*/function () { + /** + * @param {object} target - Original object containing raw data + * @param {string} name - Attribute under which the association is stored + * @param {string} doctype - Doctype of the documents managed by the association + * @param {object} options - Options passed from the client + * @param {Function} options.get - Get a document from the store + * @param {Function} options.query - Execute client query + * @param {Function} options.mutate - Execute client mutate + * @param {Function} options.save - Execute client save + * @param {Function} options.dispatch - Store's dispatch, comes from the client + */ + function Association(target, name, doctype, options) { + (0, _classCallCheck2.default)(this, Association); + var dispatch = options.dispatch, + get = options.get, + query = options.query, + mutate = options.mutate, + save = options.save; + /** + * The original document declaring the relationship + * + * @type {object} + */ + + this.target = target; + /** + * The name of the relationship. + * + * @type {string} + * @example 'author' + */ + + this.name = name; + /** + * Doctype of the relationship + * + * @type {string} + * @example 'io.cozy.authors' + */ + + this.doctype = doctype; + /** + * Returns the document from the store + * + * @type {Function} + */ + + this.get = get; + /** + * Performs a query to retrieve relationship documents. + * + * @param {QueryDefinition} queryDefinition + * @function + */ + + this.query = query; + /** + * Performs a mutation on the relationship. + * + * @function + */ + + this.mutate = mutate; + /** + * Saves the relationship in store. + * + * @type {Function} + */ + + this.save = save; + /** + * Dispatch an action on the store. + * + * @type {Function} + */ + + this.dispatch = dispatch; + } + /** + * + * Returns the raw relationship data as stored in the original document + * + * For a document with relationships stored as JSON API spec: + * + * ```js + * const book = { + * title: 'Moby Dick', + * relationships: { + * author: { + * data: { + * doctype: 'io.cozy.authors', + * id: 'herman' + * } + * } + * } + * } + * ``` + * + * Raw value will be + * + * ```json + * { + * "doctype": "io.cozy.authors", + * "id": "herman" + * } + * ``` + * + * Derived `Association`s need to implement this method. + * + * @returns {object} + */ + + + (0, _createClass2.default)(Association, [{ + key: "raw", + get: function get() { + throw new Error('A relationship must define its raw getter'); + } + /** + * Returns the document(s) from the store + * + * For document with relationships stored as JSON API spec : + * + * ```js + * const book = { + * title: 'Moby Dick', + * relationships: { + * author: { + * data: { + * doctype: 'io.cozy.authors', + * id: 'herman' + * } + * } + * } + * } + * ``` + * + * `data` will be + * + * ```json + * { + * "_id": "herman" + * "_type": "io.cozy.authors", + * "firstName": "herman", + * "name": "Melville" + * } + * ``` + * + * Derived `Association`s need to implement this method. + * + * @returns {object} + */ + + }, { + key: "data", + get: function get() { + throw new Error('A relationship must define its data getter'); + } + /** + * Derived `Association`s need to implement this method. + * + * @param {import("../types").CozyClientDocument} document - Document to query + * @param {object} client - The CozyClient instance + * @param {Association} assoc - Association containing info on how to build the query to fetch related documents + * + * @returns {import("../types").CozyClientDocument | QueryDefinition } + */ + + }], [{ + key: "query", + value: function query(document, client, assoc) { + throw new Error('A custom relationship must define its query() function'); + } + }]); + return Association; +}(); + +var _default = Association; +exports.default = _default; + +/***/ }), + +/***/ "utKP": +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__("1bdm") && !__webpack_require__("pmGf")(function () { + return Object.defineProperty(__webpack_require__("EW1W")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "uxkL": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'] + var monthsFull = ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'] + var weekdays2char = ['nd', 'pn', 'wt', 'śr', 'cz', 'pt', 'sb'] + var weekdays3char = ['niedz.', 'pon.', 'wt.', 'śr.', 'czw.', 'piąt.', 'sob.'] + var weekdaysFull = ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'] + var meridiem = ['w nocy', 'rano', 'po południu', 'wieczorem'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // Time of day + 'A': function (date) { + var hours = date.getHours() + if (hours >= 17) { + return meridiem[3] + } else if (hours >= 12) { + return meridiem[2] + } else if (hours >= 4) { + return meridiem[1] + } else { + return meridiem[0] + } + } + } + + formatters.a = formatters.A + formatters.aa = formatters.A + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + // Well, it should be just a number without any suffix + return formatters[formatterToken](date).toString() + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "uxlv": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.SHORTCUTS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__("GSeB")); + +var _utils = __webpack_require__("YJcZ"); + +var _getIllegalCharacter = __webpack_require__("TlHu"); + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/shortcuts/", ""]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/shortcuts"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var SHORTCUTS_DOCTYPE = 'io.cozy.files.shortcuts'; +exports.SHORTCUTS_DOCTYPE = SHORTCUTS_DOCTYPE; + +var ShortcutsCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(ShortcutsCollection, _DocumentCollection); + + var _super = _createSuper(ShortcutsCollection); + + function ShortcutsCollection(stackClient) { + (0, _classCallCheck2.default)(this, ShortcutsCollection); + return _super.call(this, SHORTCUTS_DOCTYPE, stackClient); + } + /** + * Create a shortcut + * + * @param {object} attributes shortcut's attributes + * @param {string} attributes.name Filename + * @param {string} attributes.url Shortcut's URL + * @param {string} attributes.dir_id dir_id where to create the shortcut + * @throws {Error} - explaining reason why creation failed + */ + + + (0, _createClass2.default)(ShortcutsCollection, [{ + key: "create", + value: function () { + var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(attributes) { + var name, illegalCharacters, path, resp; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!attributes.type) { + attributes.type = SHORTCUTS_DOCTYPE; + } + + if (!(!attributes.name || !attributes.name.trim() || !attributes.url || !attributes.dir_id)) { + _context.next = 3; + break; + } + + throw new Error('you need at least a name, an url and a dir_id attributes to create a shortcut'); + + case 3: + name = attributes.name.trim(); + + if (!(name === '.' || name === '..')) { + _context.next = 6; + break; + } + + throw new Error("Invalid filename: ".concat(name)); + + case 6: + illegalCharacters = (0, _getIllegalCharacter.getIllegalCharacters)(name); + + if (!illegalCharacters.length) { + _context.next = 9; + break; + } + + throw new Error("Invalid filename containing illegal character(s): ".concat(illegalCharacters)); + + case 9: + path = (0, _utils.uri)(_templateObject()); + _context.next = 12; + return this.stackClient.fetchJSON('POST', path, { + data: { + attributes: attributes, + type: 'io.cozy.files.shortcuts' + } + }); + + case 12: + resp = _context.sent; + return _context.abrupt("return", { + data: _DocumentCollection2.default.normalizeDoctypeJsonApi(SHORTCUTS_DOCTYPE)(resp.data, resp) + }); + + case 14: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function create(_x) { + return _create.apply(this, arguments); + } + + return create; + }() + }, { + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) { + var path, resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + path = (0, _utils.uri)(_templateObject2(), id); + _context2.next = 3; + return this.stackClient.fetchJSON('GET', path); + + case 3: + resp = _context2.sent; + return _context2.abrupt("return", { + data: _DocumentCollection2.default.normalizeDoctypeJsonApi(SHORTCUTS_DOCTYPE)(resp.data, resp) + }); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function get(_x2) { + return _get.apply(this, arguments); + } + + return get; + }() + }]); + return ShortcutsCollection; +}(_DocumentCollection2.default); + +ShortcutsCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = ShortcutsCollection; +exports.default = _default; + +/***/ }), + +/***/ "v+O4": +/***/ (function(module, exports, __webpack_require__) { + +var getISOYear = __webpack_require__("V1K6") +var startOfISOWeek = __webpack_require__("MKBq") + +/** + * @category ISO Week-Numbering Year Helpers + * @summary Return the start of an ISO week-numbering year for the given date. + * + * @description + * Return the start of an ISO week-numbering year, + * which always starts 3 days before the year's first Thursday. + * The result will be in the local timezone. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|String|Number} date - the original date + * @returns {Date} the start of an ISO year + * + * @example + * // The start of an ISO week-numbering year for 2 July 2005: + * var result = startOfISOYear(new Date(2005, 6, 2)) + * //=> Mon Jan 03 2005 00:00:00 + */ +function startOfISOYear (dirtyDate) { + var year = getISOYear(dirtyDate) + var fourthOfJanuary = new Date(0) + fourthOfJanuary.setFullYear(year, 0, 4) + fourthOfJanuary.setHours(0, 0, 0, 0) + var date = startOfISOWeek(fourthOfJanuary) + return date +} + +module.exports = startOfISOYear + + +/***/ }), + +/***/ "v2hx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $Number = GetIntrinsic('%Number%'); +var $RegExp = GetIntrinsic('%RegExp%'); +var $parseInteger = GetIntrinsic('%parseInt%'); + +var callBound = __webpack_require__("KqZw"); +var regexTester = __webpack_require__("zxT9"); +var isPrimitive = __webpack_require__("DG1p"); + +var $strSlice = callBound('String.prototype.slice'); +var isBinary = regexTester(/^0b[01]+$/i); +var isOctal = regexTester(/^0o[0-7]+$/i); +var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); +var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); +var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); +var hasNonWS = regexTester(nonWSregex); + +// whitespace from: https://es5.github.io/#x15.5.4.20 +// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 +var ws = [ + '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', + '\u2029\uFEFF' +].join(''); +var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); +var $replace = callBound('String.prototype.replace'); +var $trim = function (value) { + return $replace(value, trimRegex, ''); +}; + +var ToPrimitive = __webpack_require__("6eDQ"); + +// https://ecma-international.org/ecma-262/6.0/#sec-tonumber + +module.exports = function ToNumber(argument) { + var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a number'); + } + if (typeof value === 'bigint') { + throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); + } + if (typeof value === 'string') { + if (isBinary(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 2)); + } else if (isOctal(value)) { + return ToNumber($parseInteger($strSlice(value, 2), 8)); + } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { + return NaN; + } + var trimmed = $trim(value); + if (trimmed !== value) { + return ToNumber(trimmed); + } + + } + return $Number(value); +}; + + +/***/ }), + +/***/ "v2kV": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.QueryDefinition = exports.MutationTypes = exports.Mutations = exports.getDoctypeFromOperation = exports.uploadFile = exports.removeReferencedBy = exports.addReferencedBy = exports.removeReferencesTo = exports.addReferencesTo = exports.deleteDocument = exports.updateDocuments = exports.updateDocument = exports.createDocument = exports.isAGetByIdQuery = exports.Q = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _findKey = _interopRequireDefault(__webpack_require__("fb/G")); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef PartialQueryDefinition + * + * @property {Array} [indexedFields] + * @property {Array} [sort] + * @property {object} [selector] + * @property {object} [partialFilter] + * @property {Array} [fields] + */ + +/** + * @typedef {object} MangoSelector + */ + +/** + * @typedef {object} MangoPartialFilter + */ + +/** + * Chainable API to create query definitions to retrieve documents + * from a Cozy. `QueryDefinition`s are sent to links. + * + * @augments {object} + */ +var QueryDefinition = /*#__PURE__*/function () { + /** + * @class + * + * @param {object} options Initial options for the query definition + * @param {import('../types').Doctype} [options.doctype] - The doctype of the doc. + * @param {import('../types').DocId|null} [options.id] - The id of the doc. + * @param {Array<import('../types').DocId>} [options.ids] - The ids of the docs. + * @param {MangoSelector} [options.selector] - The selector to query the docs. + * @param {Array<string>} [options.fields] - The fields to return. + * @param {Array<string>} [options.indexedFields] - The fields to index. + * @param {MangoPartialFilter} [options.partialFilter] - The partial index definition to filter docs. + * @param {Array<object>} [options.sort] - The sorting params. + * @param {Array<string>} [options.includes] - The docs to include. + * @param {string|null} [options.referenced] - The referenced document. + * @param {number|null} [options.limit] - The document's limit to return. + * @param {number|null} [options.skip] - The number of docs to skip. + * @param {import('../types').CouchDBViewCursor} [options.cursor] - The cursor to paginate views. + * @param {string} [options.bookmark] - The bookmark to paginate mango queries. + */ + function QueryDefinition() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (0, _classCallCheck2.default)(this, QueryDefinition); + this.doctype = options.doctype; + this.id = options.id; + this.ids = options.ids; + this.selector = options.selector; + this.fields = options.fields; + this.indexedFields = options.indexedFields; + this.partialFilter = options.partialFilter; + this.sort = options.sort; + this.includes = options.includes; + this.referenced = options.referenced; + this.limit = options.limit; + this.skip = options.skip; + this.cursor = options.cursor; + this.bookmark = options.bookmark; + } + /** + * Checks if the sort order matches the index' fields order. + * + * When sorting with CouchDB, it is required to: + * - use indexed fields + * - keep the same order than the indexed fields. + * + * See https://docs.cozy.io/en/tutorials/data/queries/#sort-data-with-mango + * + * @param {PartialQueryDefinition} obj - A partial QueryDefinition to check + */ + + + (0, _createClass2.default)(QueryDefinition, [{ + key: "checkSortOrder", + value: function checkSortOrder(_ref) { + var sort = _ref.sort, + selector = _ref.selector, + indexedFields = _ref.indexedFields; + + var _sort = this.sort || sort; + + var _selector = this.selector || selector || {}; + + var _indexedFields = this.indexedFields || indexedFields; + + if (!_sort) { + return; + } + + var fieldsToIndex = _indexedFields || Object.keys(_selector); + + if (!fieldsToIndex || fieldsToIndex.length < 1) { + return; + } + + if (_sort.length > fieldsToIndex.length) { + _logger.default.warn("You should not sort on non-indexed fields.\n\n Sort: ".concat(JSON.stringify(_sort), "\n\n Indexed fields: ").concat(fieldsToIndex)); + + return; + } + + for (var i = 0; i < _sort.length; i++) { + if (Object.keys(_sort[i])[0] !== fieldsToIndex[i]) { + _logger.default.warn("The sort order should be the same than the indexed fields.\n\n Sort: ".concat(JSON.stringify(_sort), "\n\n Indexed fields: ").concat(fieldsToIndex, "\n")); + + return; + } + } + } + /** + * Checks the selector predicates. + * + * It is useful to warn the developer when a partial index might be used. + * + * @param {MangoSelector} selector - The selector definition + * @returns {void} + */ + + }, { + key: "checkSelector", + value: function checkSelector(selector) { + var hasExistsFalse = (0, _findKey.default)(selector, ['$exists', false]); + + if (hasExistsFalse) { + _logger.default.warn("The \"$exists: false\" predicate should be defined as a partial index for better performance.\n\n Selector: ".concat(JSON.stringify(selector))); + } + + var hasNe = (0, _findKey.default)(selector, '$ne'); + + if (hasNe) { + _logger.default.info("The use of the $ne operator is more efficient with a partial index.\n\n Selector: ".concat(JSON.stringify(selector))); + } + } + /** + * Check if the selected fields are all included in the selectors + * + * @param {PartialQueryDefinition} obj - A partial QueryDefinition to check + */ + + }, { + key: "checkSelectFields", + value: function checkSelectFields(_ref2) { + var fields = _ref2.fields, + selector = _ref2.selector, + partialFilter = _ref2.partialFilter; + + var _fields = this.fields || fields; + + var _selector = this.selector || selector; + + var _partialFilter = this.partialFilter || partialFilter; + + if (!_fields || !_selector && !_partialFilter) { + return; + } + + var mergedSelector = _objectSpread(_objectSpread({}, _selector), _partialFilter); + + var selectorAttributes = Object.keys(mergedSelector); + var hasEveryFieldsInSelector = selectorAttributes.every(function (attribute) { + return _fields.includes(attribute); + }); + + if (!hasEveryFieldsInSelector) { + throw new Error("The .select should includes all the fields used in where or partialIndex.\n Please fix this query: fields: ".concat(JSON.stringify(this.toDefinition()))); + } + + return; + } + /** + * Query a single document on its id. + * + * @param {string} id The document id. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "getById", + value: function getById(id) { + if (!id) { + throw new Error('getById called with undefined id'); + } + + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + id: id + })); + } + /** + * Query several documents on their ids. + * + * @param {Array} ids The documents ids. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "getByIds", + value: function getByIds(ids) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + ids: ids + })); + } + /** + * Query documents with a [mango selector](http://docs.couchdb.org/en/latest/api/database/find.html#find-selectors). + * Each field passed in the selector will be indexed, except if the indexField option is used. + * + * @param {MangoSelector} selector The Mango selector. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "where", + value: function where(selector) { + this.checkSortOrder({ + selector: selector + }); + this.checkSelector(selector); + this.checkSelectFields({ + selector: selector + }); + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + selector: selector + })); + } + /** + * Specify which fields of each object should be returned. If it is omitted, the entire object is returned. + * + * @param {Array} fields The fields to return. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "select", + value: function select(fields) { + this.checkSelectFields({ + fields: fields + }); + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + fields: fields + })); + } + /** + * Specify which fields should be indexed. This prevent the automatic indexing of the mango fields. + * + * @param {Array} indexedFields The fields to index. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "indexFields", + value: function indexFields(indexedFields) { + this.checkSortOrder({ + indexedFields: indexedFields + }); + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + indexedFields: indexedFields + })); + } + /** + * Specify a [partial index](https://docs.couchdb.org/en/stable/api/database/find.html#find-partial-indexes). + * The filter must follow the same syntax than the selector. + * + * A partial index includes a filter, used to select documents before the indexing. + * You can find more information about partial indexes [here](https://docs.cozy.io/en/tutorials/data/advanced/#partial-indexes) + * + * @param {object} partialFilter - The filter definition. + */ + + }, { + key: "partialIndex", + value: function partialIndex(partialFilter) { + this.checkSelectFields({ + partialFilter: partialFilter + }); + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + partialFilter: partialFilter + })); + } + /** + * Specify how to sort documents, following the [sort syntax](http://docs.couchdb.org/en/latest/api/database/find.html#find-sort) + * + * @param {Array} sort The list of field name and direction pairs. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "sortBy", + value: function sortBy(sort) { + if (!Array.isArray(sort)) { + throw new Error("Invalid sort, should be an array ([{ label: \"desc\"}, { name: \"asc\"}]), you passed ".concat(JSON.stringify(sort), ".")); + } + + this.checkSortOrder({ + sort: sort + }); + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + sort: sort + })); + } + /** + * Includes documents having a relationships with the ones queried. + * For example, query albums including the photos. + * + * @param {Array} includes The documents to include. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "include", + value: function include(includes) { + if (!Array.isArray(includes)) { + throw new Error('include() takes an array of relationship names'); + } + + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + includes: includes + })); + } + /** + * Maximum number of documents returned, useful for pagination. Default is 100. + * + * @param {number} limit The document's limit. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "limitBy", + value: function limitBy(limit) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + limit: limit + })); + } + }, { + key: "UNSAFE_noLimit", + value: function UNSAFE_noLimit() { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + limit: null + })); + } + /** + * Skip the first ‘n’ documents, where ‘n’ is the value specified. + * + * Beware, this [performs badly](http://docs.couchdb.org/en/stable/ddocs/views/pagination.html#paging-alternate-method) on view's index. + * Prefer cursor-based pagination in such situation. + * + * @param {number} skip The number of documents to skip. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "offset", + value: function offset(skip) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + bookmark: undefined, + cursor: undefined, + skip: skip + })); + } + /** + * Use [cursor-based](https://docs.cozy.io/en/cozy-stack/jsonapi/#pagination) pagination. + * *Warning*: this is only useful for views. + * The cursor is a [startkey, startkey_docid] array, where startkey is the view's key, + * e.g. ["io.cozy.photos.albums", "album-id"] and startkey_docid is the id of + * the starting document of the query, e.g. "file-id". + * Use the last docid of each query as startkey_docid to paginate or leave blank for the first query. + * + * @param {import('../types').CouchDBViewCursor} cursor The cursor for pagination. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "offsetCursor", + value: function offsetCursor(cursor) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + bookmark: undefined, + skip: undefined, + cursor: cursor + })); + } + /** + * Use [bookmark](https://docs.couchdb.org/en/2.2.0/api/database/find.html#pagination) pagination. + * Note this only applies for mango-queries (not views) and is way more efficient than skip pagination. + * The bookmark is a string returned by the _find response and can be seen as a pointer in + * the index for the next query. + * + * @param {string} bookmark The bookmark to continue a previous paginated query. + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "offsetBookmark", + value: function offsetBookmark(bookmark) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + skip: undefined, + cursor: undefined, + bookmark: bookmark + })); + } + /** + * Use the [file reference system](https://docs.cozy.io/en/cozy-stack/references-docs-in-vfs/) + * + * @param {object} document The reference document + * @returns {QueryDefinition} The QueryDefinition object. + */ + + }, { + key: "referencedBy", + value: function referencedBy(document) { + return new QueryDefinition(_objectSpread(_objectSpread({}, this.toDefinition()), {}, { + referenced: document + })); + } + }, { + key: "toDefinition", + value: function toDefinition() { + return { + doctype: this.doctype, + id: this.id, + ids: this.ids, + selector: this.selector, + fields: this.fields, + indexedFields: this.indexedFields, + partialFilter: this.partialFilter, + sort: this.sort, + includes: this.includes, + referenced: this.referenced, + limit: this.limit, + skip: this.skip, + cursor: this.cursor, + bookmark: this.bookmark + }; + } + }]); + return QueryDefinition; +}(); +/** + * Helper to create a QueryDefinition. Recommended way to create + * query definitions. + * + * @param {import('../types').Doctype} doctype - Doctype of the query definition + * + * @example + * ``` + * import { Q } from 'cozy-client' + * + * const qDef = Q('io.cozy.todos').where({ _id: '1234' }) + * ``` + */ + + +exports.QueryDefinition = QueryDefinition; + +var Q = function Q(doctype) { + return new QueryDefinition({ + doctype: doctype + }); +}; +/** + * Check if the query is a getById() query + * + * @param {QueryDefinition} queryDefinition The query definition + * + * @returns {boolean} + */ + + +exports.Q = Q; + +var isAGetByIdQuery = function isAGetByIdQuery(queryDefinition) { + if (!queryDefinition) return false; + var attributes = Object.values(queryDefinition); + if (attributes.length === 0) return false; // 2 attrs because we check if id and doctype are not undefined + + return attributes.filter(function (attr) { + return attr !== undefined; + }).length === 2 && queryDefinition.id !== undefined; +}; // Mutations + + +exports.isAGetByIdQuery = isAGetByIdQuery; +var CREATE_DOCUMENT = 'CREATE_DOCUMENT'; +var UPDATE_DOCUMENT = 'UPDATE_DOCUMENT'; +var UPDATE_DOCUMENTS = 'UPDATE_DOCUMENTS'; +var DELETE_DOCUMENT = 'DELETE_DOCUMENT'; +var ADD_REFERENCES_TO = 'ADD_REFERENCES_TO'; +var REMOVE_REFERENCES_TO = 'REMOVE_REFERENCES_TO'; +var ADD_REFERENCED_BY = 'ADD_REFERENCED_BY'; +var REMOVE_REFERENCED_BY = 'REMOVE_REFERENCED_BY'; +var UPLOAD_FILE = 'UPLOAD_FILE'; + +var createDocument = function createDocument(document) { + return { + mutationType: MutationTypes.CREATE_DOCUMENT, + document: document + }; +}; + +exports.createDocument = createDocument; + +var updateDocument = function updateDocument(document) { + return { + mutationType: MutationTypes.UPDATE_DOCUMENT, + document: document + }; +}; + +exports.updateDocument = updateDocument; + +var updateDocuments = function updateDocuments(documents) { + return { + mutationType: MutationTypes.UPDATE_DOCUMENTS, + documents: documents + }; +}; + +exports.updateDocuments = updateDocuments; + +var deleteDocument = function deleteDocument(document) { + return { + mutationType: MutationTypes.DELETE_DOCUMENT, + document: document + }; +}; + +exports.deleteDocument = deleteDocument; + +var addReferencesTo = function addReferencesTo(document, referencedDocuments) { + return { + mutationType: MutationTypes.ADD_REFERENCES_TO, + referencedDocuments: referencedDocuments, + document: document + }; +}; + +exports.addReferencesTo = addReferencesTo; + +var removeReferencesTo = function removeReferencesTo(document, referencedDocuments) { + return { + mutationType: MutationTypes.REMOVE_REFERENCES_TO, + referencedDocuments: referencedDocuments, + document: document + }; +}; + +exports.removeReferencesTo = removeReferencesTo; + +var addReferencedBy = function addReferencedBy(document, referencedDocuments) { + return { + mutationType: MutationTypes.ADD_REFERENCED_BY, + referencedDocuments: referencedDocuments, + document: document + }; +}; + +exports.addReferencedBy = addReferencedBy; + +var removeReferencedBy = function removeReferencedBy(document, referencedDocuments) { + return { + mutationType: MutationTypes.REMOVE_REFERENCED_BY, + referencedDocuments: referencedDocuments, + document: document + }; +}; + +exports.removeReferencedBy = removeReferencedBy; + +var uploadFile = function uploadFile(file, dirPath) { + return { + mutationType: MutationTypes.UPLOAD_FILE, + file: file, + dirPath: dirPath + }; +}; + +exports.uploadFile = uploadFile; + +var getDoctypeFromOperation = function getDoctypeFromOperation(operation) { + if (operation.mutationType) { + var type = operation.mutationType; + + switch (type) { + case CREATE_DOCUMENT: + return operation.document._type; + + case UPDATE_DOCUMENT: + return operation.document._type; + + case UPDATE_DOCUMENTS: + return operation.documents[0]._type; + + case DELETE_DOCUMENT: + return operation.document._type; + + case ADD_REFERENCES_TO: + throw new Error('Not implemented'); + + case UPLOAD_FILE: + throw new Error('Not implemented'); + + default: + throw new Error("Unknown mutationType ".concat(type)); + } + } else { + return operation.doctype; + } +}; + +exports.getDoctypeFromOperation = getDoctypeFromOperation; +var Mutations = { + createDocument: createDocument, + updateDocument: updateDocument, + updateDocuments: updateDocuments, + deleteDocument: deleteDocument, + addReferencesTo: addReferencesTo, + removeReferencesTo: removeReferencesTo, + addReferencedBy: addReferencedBy, + removeReferencedBy: removeReferencedBy, + uploadFile: uploadFile +}; +exports.Mutations = Mutations; +var MutationTypes = { + CREATE_DOCUMENT: CREATE_DOCUMENT, + UPDATE_DOCUMENT: UPDATE_DOCUMENT, + UPDATE_DOCUMENTS: UPDATE_DOCUMENTS, + DELETE_DOCUMENT: DELETE_DOCUMENT, + ADD_REFERENCES_TO: ADD_REFERENCES_TO, + REMOVE_REFERENCES_TO: REMOVE_REFERENCES_TO, + ADD_REFERENCED_BY: ADD_REFERENCED_BY, + REMOVE_REFERENCED_BY: REMOVE_REFERENCED_BY, + UPLOAD_FILE: UPLOAD_FILE +}; +exports.MutationTypes = MutationTypes; + +/***/ }), + +/***/ "v5XQ": +/***/ (function(module, exports, __webpack_require__) { + +var baseOrderBy = __webpack_require__("tNpl"), + isArray = __webpack_require__("8u9v"); + +/** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ +function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); +} + +module.exports = orderBy; + + +/***/ }), + +/***/ "v64C": +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__("rZ9V"), + stackClear = __webpack_require__("Rvbi"), + stackDelete = __webpack_require__("HvLc"), + stackGet = __webpack_require__("ttZt"), + stackHas = __webpack_require__("fOHp"), + stackSet = __webpack_require__("Wnee"); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; + + +/***/ }), + +/***/ "vA9y": +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = __webpack_require__("LRPZ"); + +$export($export.P, 'Array', { copyWithin: __webpack_require__("BrK0") }); + +__webpack_require__("pebw")('copyWithin'); + + +/***/ }), + +/***/ "vBoz": +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__("WXXH") && !__webpack_require__("enc5")(function () { + return Object.defineProperty(__webpack_require__("aKmJ")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), + +/***/ "vCDb": +/***/ (function(module, exports) { + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; + + +/***/ }), + +/***/ "vFJ3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function toVal(mix) { + var k, y, str=''; + + if (typeof mix === 'string' || typeof mix === 'number') { + str += mix; + } else if (typeof mix === 'object') { + if (Array.isArray(mix)) { + for (k=0; k < mix.length; k++) { + if (mix[k]) { + if (y = toVal(mix[k])) { + str && (str += ' '); + str += y; + } + } + } + } else { + for (k in mix) { + if (mix[k]) { + str && (str += ' '); + str += k; + } + } + } + } + + return str; +} + +/* harmony default export */ __webpack_exports__["default"] = (function () { + var i=0, tmp, x, str=''; + while (i < arguments.length) { + if (tmp = arguments[i++]) { + if (x = toVal(tmp)) { + str && (str += ' '); + str += x + } + } + } + return str; +}); + + +/***/ }), + +/***/ "vGhx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UsageEventType = void 0; +var UsageEventType; +exports.UsageEventType = UsageEventType; +(function (UsageEventType) { + UsageEventType["PROFILE_SET_EVENT"] = "ProfileSetEvent"; + UsageEventType["REPORT_FROM_EMAIL"] = "ReportFromEvent"; +})(UsageEventType || (exports.UsageEventType = UsageEventType = {})); + +/***/ }), + +/***/ "vQtR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.prefix = exports.getKey = exports.default = void 0; + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +// eslint-disable-next-line no-redeclare + +/* global localStorage */ +var prefix = 'flag__'; +exports.prefix = prefix; + +var getKey = function getKey(name) { + return prefix + name; +}; + +exports.getKey = getKey; + +var listFlagLocalStorage = function listFlagLocalStorage() { + return Object.keys(localStorage).filter(function (x) { + return x.indexOf(prefix) === 0; + }).map(function (x) { + return x.replace(prefix, ''); + }); +}; +/** + * Gets a flag from localStorage, parses value from JSON + * + * @param {String} flag + */ + + +var getItem = function getItem(flag) { + var val = localStorage.getItem(getKey(flag)); + var parsed = val ? JSON.parse(val) : val; + return parsed; +}; +/** + * Stores a flag in localStorage, stringifies the value for storage + * + * @param {String} flag + * @param {String} value + */ + + +var setItem = function setItem(flag, value) { + var str = JSON.stringify(value); + return localStorage.setItem(getKey(flag), str); +}; +/** + * Removes a flag from localStorage + * + * @param {String} flag + */ + + +var removeItem = function removeItem(flag) { + return localStorage.removeItem(getKey(flag)); +}; +/** + * Returns all stored flags as an object + */ + + +var getAll = function getAll() { + var res = {}; + + var _iterator = _createForOfIteratorHelper(listFlagLocalStorage()), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var flag = _step.value; + res[flag] = getItem(flag); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return res; +}; +/** + * Clears all the flags from localstorage + */ + + +var clearAll = function clearAll() { + var _iterator2 = _createForOfIteratorHelper(listFlagLocalStorage()), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var flag = _step2.value; + removeItem(flag); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } +}; + +var _default = { + getAll: getAll, + getItem: getItem, + setItem: setItem, + clearAll: clearAll, + removeItem: removeItem +}; +exports.default = _default; + +/***/ }), + +/***/ "vWU+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.makeDiskInfos = exports.hasPasswordDefinedAttribute = exports.buildPremiumLink = exports.hasAnOffer = exports.shouldDisplayOffers = exports.getUuid = exports.isFreemiumUser = exports.arePremiumLinksEnabled = exports.isSelfHosted = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _get = _interopRequireDefault(__webpack_require__("/yh+")); + +var _dsl = __webpack_require__("v2kV"); + +var FallbackQuota = 1e11; +var GB = 1000 * 1000 * 1000; +var PREMIUM_QUOTA = 50 * GB; +/** + * @typedef {object} InstanceInfo + * @typedef {object} ContextInfo + * @typedef {object} DiskUsageInfo + */ + +/** + * @typedef SettingsInfo + * @property {ContextInfo} context - Object returned by /settings/context + * @property {InstanceInfo} instance - Object returned by /settings/instance + * @property {DiskUsageInfo} diskUsage - Object returned by /settings/disk-usage + */ +// If manager URL is present, then the instance is not self-hosted + +var isSelfHosted = function isSelfHosted(instanceInfo) { + return (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url') ? false : true; +}; + +exports.isSelfHosted = isSelfHosted; + +var arePremiumLinksEnabled = function arePremiumLinksEnabled(instanceInfo) { + return (0, _get.default)(instanceInfo, 'context.data.attributes.enable_premium_links') ? true : false; +}; + +exports.arePremiumLinksEnabled = arePremiumLinksEnabled; + +var isFreemiumUser = function isFreemiumUser(instanceInfo) { + var quota = (0, _get.default)(instanceInfo, 'diskUsage.data.attributes.quota', false); + return parseInt(quota) <= PREMIUM_QUOTA; +}; + +exports.isFreemiumUser = isFreemiumUser; + +var getUuid = function getUuid(instanceInfo) { + return (0, _get.default)(instanceInfo, 'instance.data.attributes.uuid'); +}; +/** + * Returns whether an instance is concerned by our offers + * + * @param {SettingsInfo} data Object containing all the results from /settings/* + * @returns {boolean} Should we display offers + */ + + +exports.getUuid = getUuid; + +var shouldDisplayOffers = function shouldDisplayOffers(data) { + return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && isFreemiumUser(data); +}; +/** + * Returns if an instance has subscribed to one of our offers + * + * @param {SettingsInfo} data Object containing all the results from /settings/* + * @returns {boolean} Does the cozy have offers + */ + + +exports.shouldDisplayOffers = shouldDisplayOffers; + +var hasAnOffer = function hasAnOffer(data) { + return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && !isFreemiumUser(data); +}; +/** + * Returns the link to the Premium page on the Cozy's Manager + * + * @param {InstanceInfo} instanceInfo - Instance information + */ + + +exports.hasAnOffer = hasAnOffer; + +var buildPremiumLink = function buildPremiumLink(instanceInfo) { + var managerUrl = (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url', false); + var uuid = getUuid(instanceInfo); + + if (managerUrl && uuid) { + return "".concat(managerUrl, "/cozy/instances/").concat(uuid, "/premium"); + } else { + return null; + } +}; +/** + * Checks the value of the password_defined attribute + * + * @param {import("../CozyClient").default} client - The CozyClient instance + * @returns {Promise<boolean>} - Returns the value of the password_defined attribute + */ + + +exports.buildPremiumLink = buildPremiumLink; + +var hasPasswordDefinedAttribute = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client) { + var _yield$client$fetchQu, password_defined; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return client.fetchQueryAndGetFromState({ + definition: (0, _dsl.Q)('io.cozy.settings').getById('io.cozy.settings.instance'), + options: { + as: 'io.cozy.settings/io.cozy.settings.instance', + singleDocData: true + } + }); + + case 3: + _yield$client$fetchQu = _context.sent; + password_defined = _yield$client$fetchQu.data.attributes.password_defined; + return _context.abrupt("return", Boolean(password_defined)); + + case 8: + _context.prev = 8; + _context.t0 = _context["catch"](0); + return _context.abrupt("return", false); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 8]]); + })); + + return function hasPasswordDefinedAttribute(_x) { + return _ref.apply(this, arguments); + }; +}(); +/** + * @typedef DiskInfosRaw + * @property diskQuota {number} - Space used in GB + * @property diskUsage {number} - Maximum space available in GB + * @property percentUsage {number} - Usage percent of the disk + */ + +/** + * @typedef DiskInfos + * @property humanDiskQuota {string} - Space used in GB rounded + * @property humanDiskUsage {string} - Maximum space available in GB rounded + * @property percentUsage {string} - Usage percent of the disk rounded + */ + +/** + * Convert input value into GB + * + * @param {number} bytes - Value in bytes + * @returns {number} - Returns the value in GB + */ + + +exports.hasPasswordDefinedAttribute = hasPasswordDefinedAttribute; + +var convertBytesToGB = function convertBytesToGB(bytes) { + return bytes * 1e-9; +}; +/** + * Computes `value` rounded to `fractionDigits`. + * + * @param {number} value - Value to format + * @param {number} fractionDigits - Number of decimal numbers + * @returns {string} - Returns the rounded number as a string + */ + + +var formatDecimals = function formatDecimals(value) { + var fractionDigits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; + return "".concat(value % 1 ? value.toFixed(fractionDigits) : value); +}; +/** + * Transform bytes data to GB data and compute percent usage + * + * @param {number} usage - Value in bytes representing the space used + * @param {number} quota - Value in bytes representing the maximum space available + * @returns {DiskInfosRaw} - Returns an transform data to GB and usage percent of the disk + */ + + +var computeDiskInfos = function computeDiskInfos(usage) { + var quota = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : FallbackQuota; + return { + diskQuota: convertBytesToGB(quota), + diskUsage: convertBytesToGB(usage), + percentUsage: usage / quota * 100 + }; +}; +/** + * Make human readable information from disk information (usage, quota) + * + * @param {number|string} usage - Value in bytes representing the space used + * @param {number|string} [quota] - Value in bytes representing the maximum space available + * @returns {DiskInfos} - Return a set of human readable information about disk + */ + + +var makeDiskInfos = function makeDiskInfos(usage, quota) { + var _computeDiskInfos = computeDiskInfos(+usage, quota ? +quota : undefined), + diskQuota = _computeDiskInfos.diskQuota, + diskUsage = _computeDiskInfos.diskUsage, + percentUsage = _computeDiskInfos.percentUsage; + + return { + humanDiskQuota: formatDecimals(diskQuota), + humanDiskUsage: formatDecimals(diskUsage), + percentUsage: Math.round(percentUsage).toString() + }; +}; + +exports.makeDiskInfos = makeDiskInfos; + +/***/ }), + +/***/ "vYmo": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// https://262.ecma-international.org/5.1/#sec-8 + +module.exports = function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } +}; + + +/***/ }), + +/***/ "vdf9": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = __webpack_require__("LRPZ"); +var aFunction = __webpack_require__("TQc+"); +var anObject = __webpack_require__("eckd"); +var rApply = (__webpack_require__("ETne").Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !__webpack_require__("enc5")(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + + +/***/ }), + +/***/ "vjlx": +/***/ (function(module, exports, __webpack_require__) { + +var flatten = __webpack_require__("Jy5R"), + overRest = __webpack_require__("WW2/"), + setToString = __webpack_require__("p3SN"); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; + + +/***/ }), + +/***/ "vjoj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subMonths; }); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("CUab"); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("koGf"); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bKmd"); + + + +/** + * @name subMonths + * @category Month Helpers + * @summary Subtract the specified number of months from the given date. + * + * @description + * Subtract the specified number of months from the given date. + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`. + * @returns {Date} the new date with the months subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 5 months from 1 February 2015: + * const result = subMonths(new Date(2015, 1, 1), 5) + * //=> Mon Sep 01 2014 00:00:00 + */ + +function subMonths(dirtyDate, dirtyAmount) { + Object(_lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(2, arguments); + var amount = Object(_lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(dirtyAmount); + return Object(_addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__["default"])(dirtyDate, -amount); +} + +/***/ }), + +/***/ "vlkE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.OAUTH_CLIENTS_DOCTYPE = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__("yCbO")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _get2 = _interopRequireDefault(__webpack_require__("/yh+")); + +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__("GSeB")); + +var _utils = __webpack_require__("YJcZ"); + +var querystring = _interopRequireWildcard(__webpack_require__("uagS")); + +var _Collection = __webpack_require__("XXj1"); + +var _errors = __webpack_require__("twUa"); + +function _templateObject3() { + var data = (0, _taggedTemplateLiteral2.default)(["/settings/clients/", ""]); + + _templateObject3 = function _templateObject3() { + return data; + }; + + return data; +} + +function _templateObject2() { + var data = (0, _taggedTemplateLiteral2.default)(["/settings/clients/", ""]); + + _templateObject2 = function _templateObject2() { + return data; + }; + + return data; +} + +function _templateObject() { + var data = (0, _taggedTemplateLiteral2.default)(["/settings/clients"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var OAUTH_CLIENTS_DOCTYPE = 'io.cozy.oauth.clients'; +exports.OAUTH_CLIENTS_DOCTYPE = OAUTH_CLIENTS_DOCTYPE; + +var normalizeDoc = _DocumentCollection2.default.normalizeDoctypeJsonApi(OAUTH_CLIENTS_DOCTYPE); + +var normalizeOAuthClient = function normalizeOAuthClient(client) { + return _objectSpread(_objectSpread({}, normalizeDoc(client, OAUTH_CLIENTS_DOCTYPE)), client.attributes); +}; +/** + * Implements `DocumentCollection` API to interact with the /settings/clients endpoint of the stack + */ + + +var OAuthClientsCollection = /*#__PURE__*/function (_DocumentCollection) { + (0, _inherits2.default)(OAuthClientsCollection, _DocumentCollection); + + var _super = _createSuper(OAuthClientsCollection); + + function OAuthClientsCollection(stackClient) { + (0, _classCallCheck2.default)(this, OAuthClientsCollection); + return _super.call(this, OAUTH_CLIENTS_DOCTYPE, stackClient); + } + /** + * Fetches all OAuth clients + * + * @param {object} options Query options + * @param {number} [options.limit] For pagination, the number of results to return. + * @param {string} [options.bookmark] For bookmark-based pagination, the document _id to start from + * @param {Array<string>} [options.keys] Ids of specific clients to return (within the current page), + * + * @returns {object} The JSON API conformant response. + */ + + + (0, _createClass2.default)(OAuthClientsCollection, [{ + key: "all", + value: function () { + var _all = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var options, + _options$limit, + limit, + bookmark, + keys, + params, + url, + path, + resp, + nextLink, + nextLinkURL, + nextBookmark, + hasBookmark, + data, + meta, + _args = arguments; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}; + _options$limit = options.limit, limit = _options$limit === void 0 ? 100 : _options$limit, bookmark = options.bookmark, keys = options.keys; + params = { + 'page[limit]': limit, + 'page[cursor]': bookmark + }; + url = (0, _utils.uri)(_templateObject()); + path = querystring.buildURL(url, params); + _context.prev = 5; + _context.next = 8; + return this.stackClient.fetchJSON('GET', path); + + case 8: + resp = _context.sent; + _context.next = 14; + break; + + case 11: + _context.prev = 11; + _context.t0 = _context["catch"](5); + return _context.abrupt("return", (0, _Collection.dontThrowNotFoundError)(_context.t0)); + + case 14: + nextLink = (0, _get2.default)(resp, 'links.next', ''); + nextLinkURL = new URL("".concat(this.stackClient.uri).concat(nextLink)); + nextBookmark = nextLinkURL.searchParams.get('page[cursor]') || undefined; + hasBookmark = nextBookmark !== undefined; + + if (!keys) { + _context.next = 24; + break; + } + + data = resp.data.filter(function (c) { + return keys.includes(c.id); + }).map(function (c) { + return normalizeOAuthClient(c); + }); + meta = _objectSpread(_objectSpread({}, resp.meta), {}, { + count: data.length + }); + return _context.abrupt("return", { + data: data, + meta: meta, + next: keys.length > data.length && hasBookmark, + bookmark: nextBookmark + }); + + case 24: + return _context.abrupt("return", { + data: resp.data.map(function (c) { + return normalizeOAuthClient(c); + }), + meta: resp.meta, + next: hasBookmark, + bookmark: nextBookmark + }); + + case 25: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[5, 11]]); + })); + + function all() { + return _all.apply(this, arguments); + } + + return all; + }() + /** + * Get an OAuth client by id + * + * @param {string} id The client id. + * @returns {object} JsonAPI response containing normalized client as data attribute + */ + + }, { + key: "get", + value: function () { + var _get = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) { + var resp; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this.all({ + keys: [id] + }); + + case 2: + resp = _context2.sent; + + case 3: + if (!resp.next) { + _context2.next = 9; + break; + } + + _context2.next = 6; + return this.all({ + keys: [id], + bookmark: resp.bookmark + }); + + case 6: + resp = _context2.sent; + _context2.next = 3; + break; + + case 9: + if (!resp.data.length) { + _context2.next = 13; + break; + } + + return _context2.abrupt("return", { + data: normalizeOAuthClient(resp.data[0]) + }); + + case 13: + resp.url = (0, _utils.uri)(_templateObject2(), id); + resp.status = '404'; + throw new _errors.FetchError(resp, 'Not Found'); + + case 16: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + /** + * Destroys the OAuth client on the server + * + * @param {object} oauthClient The io.cozy.oauth.clients document to destroy + * + * @returns {{ data }} The deleted client + */ + + }, { + key: "destroy", + value: function () { + var _destroy = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(oauthClient) { + var _id; + + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _id = oauthClient._id; + _context3.next = 3; + return this.stackClient.fetchJSON('DELETE', (0, _utils.uri)(_templateObject3(), _id)); + + case 3: + return _context3.abrupt("return", { + data: _objectSpread(_objectSpread({}, normalizeOAuthClient(oauthClient)), {}, { + _deleted: true + }) + }); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function destroy(_x2) { + return _destroy.apply(this, arguments); + } + + return destroy; + }() + }]); + return OAuthClientsCollection; +}(_DocumentCollection2.default); + +OAuthClientsCollection.normalizeDoctype = _DocumentCollection2.default.normalizeDoctypeJsonApi; +var _default = OAuthClientsCollection; +exports.default = _default; + +/***/ }), + +/***/ "vmLq": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + position: 'absolute', + right: 16, + top: '50%', + transform: 'translateY(-50%)' + } +}; +/** + * Must be used as the last child of ListItem to function properly. + */ + +var ListItemSecondaryAction = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function ListItemSecondaryAction(props, ref) { + var classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className), + ref: ref + }, other)); +}); + false ? undefined : void 0; +ListItemSecondaryAction.muiName = 'ListItemSecondaryAction'; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiListItemSecondaryAction' +})(ListItemSecondaryAction)); + +/***/ }), + +/***/ "vmvv": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {!function(e,t){ true?t(exports):undefined}(this,function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function n(e,t,r){n.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function i(e,t){i.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function f(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function u(e){var t="undefined"==typeof e?"undefined":N(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e,t,r,c,s,d,p){s=s||[],p=p||[];var g=s.slice(0);if("undefined"!=typeof d){if(c){if("function"==typeof c&&c(g,d))return;if("object"===("undefined"==typeof c?"undefined":N(c))){if(c.prefilter&&c.prefilter(g,d))return;if(c.normalize){var h=c.normalize(g,d,e,t);h&&(e=h[0],t=h[1])}}}g.push(d)}"regexp"===u(e)&&"regexp"===u(t)&&(e=e.toString(),t=t.toString());var y="undefined"==typeof e?"undefined":N(e),v="undefined"==typeof t?"undefined":N(t),b="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),m="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!b&&m)r(new o(g,t));else if(!m&&b)r(new i(g,e));else if(u(e)!==u(t))r(new n(g,e,t));else if("date"===u(e)&&e-t!==0)r(new n(g,e,t));else if("object"===y&&null!==e&&null!==t)if(p.filter(function(t){return t.lhs===e}).length)e!==t&&r(new n(g,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var w;e.length;for(w=0;w<e.length;w++)w>=t.length?r(new a(g,w,new i(void 0,e[w]))):l(e[w],t[w],r,c,g,w,p);for(;w<t.length;)r(new a(g,w,new o(void 0,t[w++])))}else{var x=Object.keys(e),S=Object.keys(t);x.forEach(function(n,o){var i=S.indexOf(n);i>=0?(l(e[n],t[n],r,c,g,n,p),S=f(S,i)):l(e[n],void 0,r,c,g,n,p)}),S.forEach(function(e){l(void 0,t[e],r,c,g,e,p)})}p.length=p.length-1}else e!==t&&("number"===y&&isNaN(e)&&isNaN(t)||r(new n(g,e,t)))}function c(e,t,r,n){return n=n||[],l(e,t,function(e){e&&n.push(e)},r),n.length?n:void 0}function s(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":s(o[r.path[n]],r.index,r.item);break;case"D":delete o[r.path[n]];break;case"E":case"N":o[r.path[n]]=r.rhs}}else switch(r.kind){case"A":s(e[t],r.index,r.item);break;case"D":e=f(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function d(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o<i;)"undefined"==typeof n[r.path[o]]&&(n[r.path[o]]="number"==typeof r.path[o]?[]:{}),n=n[r.path[o]];switch(r.kind){case"A":s(r.path?n[r.path[o]]:n,r.index,r.item);break;case"D":delete n[r.path[o]];break;case"E":case"N":n[r.path[o]]=r.rhs}}}function p(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":p(o[r.path[n]],r.index,r.item);break;case"D":o[r.path[n]]=r.lhs;break;case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}else switch(r.kind){case"A":p(e[t],r.index,r.item);break;case"D":e[t]=r.lhs;break;case"E":e[t]=r.lhs;break;case"N":e=f(e,t)}return e}function g(e,t,r){if(e&&t&&r&&r.kind){var n,o,i=e;for(o=r.path.length-1,n=0;n<o;n++)"undefined"==typeof i[r.path[n]]&&(i[r.path[n]]={}),i=i[r.path[n]];switch(r.kind){case"A":p(i[r.path[n]],r.index,r.item);break;case"D":i[r.path[n]]=r.lhs;break;case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}}function h(e,t,r){if(e&&t){var n=function(n){r&&!r(e,t,n)||d(e,t,n)};l(e,t,n)}}function y(e){return"color: "+F[e].color+"; font-weight: bold"}function v(e){var t=e.kind,r=e.path,n=e.lhs,o=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[r.join("."),n,"→",o];case"N":return[r.join("."),o];case"D":return[r.join(".")];case"A":return[r.join(".")+"["+i+"]",a];default:return[]}}function b(e,t,r,n){var o=c(e,t);try{n?r.groupCollapsed("diff"):r.group("diff")}catch(e){r.log("diff")}o?o.forEach(function(e){var t=e.kind,n=v(e);r.log.apply(r,["%c "+F[t].text,y(t)].concat(P(n)))}):r.log("—— no diff ——");try{r.groupEnd()}catch(e){r.log("—— diff end —— ")}}function m(e,t,r,n){switch("undefined"==typeof e?"undefined":N(e)){case"object":return"function"==typeof e[n]?e[n].apply(e,P(r)):e[n];case"function":return e(t);default:return e}}function w(e){var t=e.timestamp,r=e.duration;return function(e,n,o){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+n),r&&i.push("%c(in "+o.toFixed(2)+" ms)"),i.join(" ")}}function x(e,t){var r=t.logger,n=t.actionTransformer,o=t.titleFormatter,i=void 0===o?w(t):o,a=t.collapsed,f=t.colors,u=t.level,l=t.diff,c="undefined"==typeof t.titleFormatter;e.forEach(function(o,s){var d=o.started,p=o.startedTime,g=o.action,h=o.prevState,y=o.error,v=o.took,w=o.nextState,x=e[s+1];x&&(w=x.prevState,v=x.started-d);var S=n(g),k="function"==typeof a?a(function(){return w},g,o):a,j=D(p),E=f.title?"color: "+f.title(S)+";":"",A=["color: gray; font-weight: lighter;"];A.push(E),t.timestamp&&A.push("color: gray; font-weight: lighter;"),t.duration&&A.push("color: gray; font-weight: lighter;");var O=i(S,j,v);try{k?f.title&&c?r.groupCollapsed.apply(r,["%c "+O].concat(A)):r.groupCollapsed(O):f.title&&c?r.group.apply(r,["%c "+O].concat(A)):r.group(O)}catch(e){r.log(O)}var N=m(u,S,[h],"prevState"),P=m(u,S,[S],"action"),C=m(u,S,[y,h],"error"),F=m(u,S,[w],"nextState");if(N)if(f.prevState){var L="color: "+f.prevState(h)+"; font-weight: bold";r[N]("%c prev state",L,h)}else r[N]("prev state",h);if(P)if(f.action){var T="color: "+f.action(S)+"; font-weight: bold";r[P]("%c action ",T,S)}else r[P]("action ",S);if(y&&C)if(f.error){var M="color: "+f.error(y,h)+"; font-weight: bold;";r[C]("%c error ",M,y)}else r[C]("error ",y);if(F)if(f.nextState){var _="color: "+f.nextState(w)+"; font-weight: bold";r[F]("%c next state",_,w)}else r[F]("next state",w);l&&b(h,w,r,k);try{r.groupEnd()}catch(e){r.log("—— log end ——")}})}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},L,e),r=t.logger,n=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,f=t.diffPredicate;if("undefined"==typeof r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var u=[];return function(e){var r=e.getState;return function(e){return function(l){if("function"==typeof i&&!i(r,l))return e(l);var c={};u.push(c),c.started=O.now(),c.startedTime=new Date,c.prevState=n(r()),c.action=l;var s=void 0;if(a)try{s=e(l)}catch(e){c.error=o(e)}else s=e(l);c.took=O.now()-c.started,c.nextState=n(r());var d=t.diff&&"function"==typeof f?f(r,l):t.diff;if(x(u,Object.assign({},t,{diff:d})),u.length=0,c.error)throw c.error;return s}}}}var k,j,E=function(e,t){return new Array(t+1).join(e)},A=function(e,t){return E("0",t-e.toString().length)+e},D=function(e){return A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)},O="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},C=[];k="object"===("undefined"==typeof global?"undefined":N(global))&&global?global:"undefined"!=typeof window?window:{},j=k.DeepDiff,j&&C.push(function(){"undefined"!=typeof j&&k.DeepDiff===c&&(k.DeepDiff=j,j=void 0)}),t(n,r),t(o,r),t(i,r),t(a,r),Object.defineProperties(c,{diff:{value:c,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:h,enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:g,enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof j},enumerable:!0},noConflict:{value:function(){return C&&(C.forEach(function(e){e()}),C=null),c},enumerable:!0}});var F={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},L={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?S()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=L,e.createLogger=S,e.logger=T,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})}); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "vtbU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_asyncNullishCoalesce", function() { return _asyncNullishCoalesce; }); +/* harmony import */ var _nullishCoalesce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("LYR+"); + + +// adapted from Sucrase (https://github.com/alangpierce/sucrase) + +/** + * Polyfill for the nullish coalescing operator (`??`), when used in situations where at least one of the values is the + * result of an async operation. + * + * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the + * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior. + * + * Adapted from Sucrase (https://github.com/alangpierce/sucrase) + * + * @param lhs The value of the expression to the left of the `??` + * @param rhsFn A function returning the value of the expression to the right of the `??` + * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value + */ +// eslint-disable-next-line @sentry-internal/sdk/no-async-await +async function _asyncNullishCoalesce(lhs, rhsFn) { + return Object(_nullishCoalesce_js__WEBPACK_IMPORTED_MODULE_0__["_nullishCoalesce"])(lhs, rhsFn); +} + +// Sucrase version: +// async function _asyncNullishCoalesce(lhs, rhsFn) { +// if (lhs != null) { +// return lhs; +// } else { +// return await rhsFn(); +// } +// } + + +//# sourceMappingURL=_asyncNullishCoalesce.js.map + + +/***/ }), + +/***/ "vvpI": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__("2y6E")); + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("UdSB")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("a1Fv")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("g3eI")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("wDGE")); + +var _CozyStackClient2 = _interopRequireDefault(__webpack_require__("HWXE")); + +var _AccessToken = _interopRequireDefault(__webpack_require__("cPxT")); + +var _logDeprecate = _interopRequireDefault(__webpack_require__("TDQG")); + +var _errors = _interopRequireDefault(__webpack_require__("twUa")); + +var _logger = _interopRequireDefault(__webpack_require__("V1kJ")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * @typedef {string} SessionCode + */ +var defaultoauthOptions = { + clientID: '', + clientName: '', + clientKind: '', + clientSecret: '', + clientURI: '', + registrationAccessToken: '', + redirectURI: '', + softwareID: '', + softwareVersion: '', + logoURI: '', + policyURI: '', + notificationPlatform: '', + notificationDeviceToken: '' +}; +/** + * Specialized `CozyStackClient` for mobile, implementing stack registration + * through OAuth. + */ + +var OAuthClient = /*#__PURE__*/function (_CozyStackClient) { + (0, _inherits2.default)(OAuthClient, _CozyStackClient); + + var _super = _createSuper(OAuthClient); + + function OAuthClient(_ref) { + var _this; + + var oauth = _ref.oauth, + _ref$scope = _ref.scope, + scope = _ref$scope === void 0 ? [] : _ref$scope, + onTokenRefresh = _ref.onTokenRefresh, + options = (0, _objectWithoutProperties2.default)(_ref, ["oauth", "scope", "onTokenRefresh"]); + (0, _classCallCheck2.default)(this, OAuthClient); + _this = _super.call(this, options); + + _this.setOAuthOptions(_objectSpread(_objectSpread({}, defaultoauthOptions), oauth)); + + if (oauth.token) { + _this.setToken(oauth.token); + } + + _this.scope = scope; + _this.onTokenRefresh = onTokenRefresh; + return _this; + } + /** + * Checks if the client has his registration information from the server + * + * @returns {boolean} true if registered, false otherwise + * @private + */ + + + (0, _createClass2.default)(OAuthClient, [{ + key: "isRegistered", + value: function isRegistered() { + return this.oauthOptions.clientID !== ''; + } + /** + * Converts a camel-cased data set to snake case, suitable for sending to the OAuth server + * + * @param {object} data Initial data + * @returns {object} Formatted data + * @private + */ + + }, { + key: "snakeCaseOAuthData", + value: function snakeCaseOAuthData(data) { + var mappedFields = { + softwareID: 'software_id', + softwareVersion: 'software_version', + clientID: 'client_id', + clientName: 'client_name', + clientKind: 'client_kind', + clientURI: 'client_uri', + logoURI: 'logo_uri', + policyURI: 'policy_uri', + notificationPlatform: 'notification_platform', + notificationDeviceToken: 'notification_device_token', + redirectURI: 'redirect_uris' + }; + var result = {}; + Object.keys(data).forEach(function (fieldName) { + var key = mappedFields[fieldName] || fieldName; + var value = data[fieldName]; + result[key] = value; + }); // special case: turn redirect_uris into an array + + if (result['redirect_uris'] && result['redirect_uris'] instanceof Array === false) result['redirect_uris'] = [result['redirect_uris']]; + return result; + } + /** + * Converts a snake-cased data set to camel case, suitable for internal use + * + * @param {object} data Initial data + * @returns {object} Formatted data + * @private + */ + + }, { + key: "camelCaseOAuthData", + value: function camelCaseOAuthData(data) { + var mappedFields = { + client_id: 'clientID', + client_name: 'clientName', + client_secret: 'clientSecret', + registration_access_token: 'registrationAccessToken', + software_id: 'softwareID', + redirect_uris: 'redirectURI' + }; + var result = {}; + Object.keys(data).forEach(function (fieldName) { + var key = mappedFields[fieldName] || fieldName; + var value = data[fieldName]; + result[key] = value; + }); + return result; + } + /** Performs the HTTP call to register the client to the server */ + + }, { + key: "doRegistration", + value: function doRegistration() { + return this.fetchJSON('POST', '/auth/register', this.snakeCaseOAuthData({ + redirectURI: this.oauthOptions.redirectURI, + clientName: this.oauthOptions.clientName, + softwareID: this.oauthOptions.softwareID, + clientKind: this.oauthOptions.clientKind, + clientURI: this.oauthOptions.clientURI, + logoURI: this.oauthOptions.logoURI, + policyURI: this.oauthOptions.policyURI, + softwareVersion: this.oauthOptions.softwareVersion, + notificationPlatform: this.oauthOptions.notificationPlatform, + notificationDeviceToken: this.oauthOptions.notificationDeviceToken + })); + } + /** + * Registers the currenly configured client with the OAuth server and + * sets internal information from the server response + * + * @throws {Error} When the client is already registered + * @returns {Promise} A promise that resolves with a complete list of client information, including client ID and client secret. + */ + + }, { + key: "register", + value: function () { + var _register = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var mandatoryFields, fields, missingMandatoryFields, data; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!this.isRegistered()) { + _context.next = 2; + break; + } + + throw new Error('Client already registered'); + + case 2: + mandatoryFields = ['redirectURI']; + fields = Object.keys(this.oauthOptions); + missingMandatoryFields = mandatoryFields.filter(function (fieldName) { + return fields[fieldName]; + }); + + if (!(missingMandatoryFields.length > 0)) { + _context.next = 7; + break; + } + + throw new Error("Can't register client : missing ".concat(missingMandatoryFields, " fields")); + + case 7: + _context.next = 9; + return this.doRegistration(); + + case 9: + data = _context.sent; + this.setOAuthOptions(_objectSpread(_objectSpread({}, this.oauthOptions), {}, { + client_id: data.client_id, + client_name: data.client_name, + client_secret: data.client_secret, + registration_access_token: data.registration_access_token, + software_id: data.software_id + })); + return _context.abrupt("return", this.oauthOptions); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function register() { + return _register.apply(this, arguments); + } + + return register; + }() + /** + * Unregisters the currenly configured client with the OAuth server. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @returns {Promise} + */ + + }, { + key: "unregister", + value: function () { + var _unregister = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + var clientID; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (this.isRegistered()) { + _context2.next = 2; + break; + } + + throw new NotRegisteredException(); + + case 2: + clientID = this.oauthOptions.clientID; + this.oauthOptions.clientID = ''; + return _context2.abrupt("return", this.fetchJSON('DELETE', "/auth/register/".concat(clientID), null, { + headers: { + Authorization: this.registrationAccessTokenToAuthHeader() + } + })); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function unregister() { + return _unregister.apply(this, arguments); + } + + return unregister; + }() + /** + * Fetches the complete set of client information from the server after it has been registered. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @returns {Promise} + */ + + }, { + key: "fetchInformation", + value: function () { + var _fetchInformation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (this.isRegistered()) { + _context3.next = 2; + break; + } + + throw new NotRegisteredException(); + + case 2: + return _context3.abrupt("return", this.fetchJSON('GET', "/auth/register/".concat(this.oauthOptions.clientID), null, { + headers: { + Authorization: this.registrationAccessTokenToAuthHeader() + } + })); + + case 3: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function fetchInformation() { + return _fetchInformation.apply(this, arguments); + } + + return fetchInformation; + }() + /** + * Overwrites the client own information. This method will update both the local information and the remote information on the OAuth server. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @param {object} information Set of information to update. Note that some fields such as `clientID` can't be updated. + * @param {boolean} resetSecret = false Optionnal, whether to reset the client secret or not + * @returns {Promise} Resolves to a complete, updated list of client information + */ + + }, { + key: "updateInformation", + value: function () { + var _updateInformation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(information) { + var resetSecret, + mandatoryFields, + data, + result, + _args4 = arguments; + return _regenerator.default.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + resetSecret = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : false; + + if (this.isRegistered()) { + _context4.next = 3; + break; + } + + throw new NotRegisteredException(); + + case 3: + mandatoryFields = { + clientID: this.oauthOptions.clientID, + clientName: this.oauthOptions.clientName, + redirectURI: this.oauthOptions.redirectURI, + softwareID: this.oauthOptions.softwareID + }; + data = this.snakeCaseOAuthData(_objectSpread(_objectSpread({}, mandatoryFields), information)); + if (resetSecret) data['client_secret'] = this.oauthOptions.clientSecret; + _context4.next = 8; + return this.fetchJSON('PUT', "/auth/register/".concat(this.oauthOptions.clientID), data, { + headers: { + Authorization: this.registrationAccessTokenToAuthHeader() + } + }); + + case 8: + result = _context4.sent; + this.setOAuthOptions(_objectSpread(_objectSpread({}, data), result)); + return _context4.abrupt("return", this.oauthOptions); + + case 11: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function updateInformation(_x) { + return _updateInformation.apply(this, arguments); + } + + return updateInformation; + }() + /** + * Generates a random state code to be used during the OAuth process + * + * @returns {string} + */ + + }, { + key: "generateStateCode", + value: function generateStateCode() { + var STATE_SIZE = 16; + var hasCrypto = typeof window !== 'undefined' && typeof window.crypto !== 'undefined' && typeof window.crypto.getRandomValues === 'function'; + var buffer; + + if (hasCrypto) { + buffer = new Uint8Array(STATE_SIZE); + window.crypto.getRandomValues(buffer); + } else { + buffer = new Array(STATE_SIZE); + + for (var i = 0; i < buffer.length; i++) { + buffer[i] = Math.floor(Math.random() * 255); + } + } + + return btoa(String.fromCharCode.apply(null, buffer)).replace(/=+$/, '').replace(/\//g, '_').replace(/\+/g, '-'); + } + /** + * Generates the URL that the user should be sent to in order to accept the app's permissions. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @param {object} options - URL generation options + * @param {string} options.stateCode - A random code to be included in the URl for security. Can be generated with `client.generateStateCode()` + * @param {Array} [options.scopes] - An array of permission scopes for the token. + * @param {SessionCode} [options.sessionCode] - A session code that can be used to create a session. + * @param {string} [options.codeChallenge] - A code challenge that can be used in a PKCE verification process. + * @returns {string} The URL + */ + + }, { + key: "getAuthCodeURL", + value: function getAuthCodeURL(_ref2) { + var stateCode = _ref2.stateCode, + _ref2$scopes = _ref2.scopes, + scopes = _ref2$scopes === void 0 ? this.scope : _ref2$scopes, + _ref2$sessionCode = _ref2.sessionCode, + sessionCode = _ref2$sessionCode === void 0 ? undefined : _ref2$sessionCode, + _ref2$codeChallenge = _ref2.codeChallenge, + codeChallenge = _ref2$codeChallenge === void 0 ? undefined : _ref2$codeChallenge; + if (!this.isRegistered()) throw new NotRegisteredException(); + var query = { + client_id: this.oauthOptions.clientID, + redirect_uri: this.oauthOptions.redirectURI, + state: stateCode, + response_type: 'code', + scope: scopes.join(' ') + }; + + if (this.oauthOptions.registerToken) { + query = _objectSpread(_objectSpread({}, query), {}, { + registerToken: this.oauthOptions.registerToken + }); + } + + if (sessionCode) { + query = _objectSpread(_objectSpread({}, query), {}, { + session_code: sessionCode + }); + } + + if (codeChallenge) { + query = _objectSpread(_objectSpread({}, query), {}, { + code_challenge: codeChallenge, + code_challenge_method: 'S256' + }); + } + + return "".concat(this.uri, "/auth/authorize?").concat(this.dataToQueryString(query)); + } + }, { + key: "dataToQueryString", + value: function dataToQueryString(data) { + return Object.keys(data).map(function (param) { + return "".concat(param, "=").concat(encodeURIComponent(data[param])); + }).join('&'); + } + /** + * Retrieves the access code contained in the URL to which the user is redirected after accepting the app's permissions (the `redirectURI`). + * + * @throws {Error} The URL should contain the same state code as the one generated with `client.getAuthCodeURL()`. If not, it will throw an error + * @param {string} pageURL The redirected page URL, containing the state code and the access code + * @param {string} stateCode The state code that was contained in the original URL the user was sent to (see `client.getAuthCodeURL()`) + * @returns {string} The access code + */ + + }, { + key: "getAccessCodeFromURL", + value: function getAccessCodeFromURL(pageURL, stateCode) { + if (!stateCode) throw new Error('Missing state code'); + var params = new URL(pageURL).searchParams; + var urlStateCode = params.get('state'); + var urlAccessCode = params.get('access_code'); + if (stateCode !== urlStateCode) throw new Error('Given state does not match url query state'); + return urlAccessCode; + } + /** + * Exchanges an access code for an access token. This function does **not** update the client's token. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @param {string} accessCode - The access code contained in the redirection URL — see `client.getAccessCodeFromURL()` + * @param {object} oauthOptionsArg — To use when OAuthClient is not yet registered (during login process) + * @param {string} uri — To use when OAuthClient is not yet registered (during login process) + * @param {string} codeVerifier — The PKCE code verifier (see https://docs.cozy.io/en/cozy-stack/auth/#pkce-extension) + * @returns {Promise} A promise that resolves with an AccessToken object. + */ + + }, { + key: "fetchAccessToken", + value: function () { + var _fetchAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(accessCode, oauthOptionsArg, uri, codeVerifier) { + var oauthOptions, data, result; + return _regenerator.default.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + if (!(!this.isRegistered() && !oauthOptionsArg)) { + _context5.next = 2; + break; + } + + throw new NotRegisteredException(); + + case 2: + oauthOptions = oauthOptionsArg || this.oauthOptions; + data = { + grant_type: 'authorization_code', + code: accessCode, + client_id: oauthOptions.clientID, + client_secret: oauthOptions.clientSecret + }; + + if (codeVerifier) { + data = _objectSpread(_objectSpread({}, data), {}, { + code_verifier: codeVerifier + }); + } + + _context5.next = 7; + return this.fetchJSON('POST', (uri || '') + '/auth/access_token', this.dataToQueryString(data), { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }); + + case 7: + result = _context5.sent; + return _context5.abrupt("return", new _AccessToken.default(result)); + + case 9: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function fetchAccessToken(_x2, _x3, _x4, _x5) { + return _fetchAccessToken.apply(this, arguments); + } + + return fetchAccessToken; + }() + /** + * Used by the flagship application in order to create a token for the konnector with the given slug. + * This token can then be used by the client-side konnector to make requests to cozy-stack. + * The flagship app will need to use its own access token to request the konnector token. + * + * @param {string} slug - The slug of the konnector + * @returns {Promise<string>} - A promise that resolves with a new token + */ + + }, { + key: "fetchKonnectorToken", + value: function () { + var _fetchKonnectorToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(slug) { + return _regenerator.default.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _context6.prev = 0; + _context6.next = 3; + return this.fetchJSON('POST', "/auth/tokens/konnectors/".concat(slug)); + + case 3: + return _context6.abrupt("return", _context6.sent); + + case 6: + _context6.prev = 6; + _context6.t0 = _context6["catch"](0); + throw new Error("oAuthClient.fetchKonnectorToken(): Could not create a token for the konnector with slug \"".concat(slug, "\". \n\n").concat(_context6.t0)); + + case 9: + case "end": + return _context6.stop(); + } + } + }, _callee6, this, [[0, 6]]); + })); + + function fetchKonnectorToken(_x6) { + return _fetchKonnectorToken.apply(this, arguments); + } + + return fetchKonnectorToken; + }() + /** + * @typedef SessionCodeRes + * @property {string} session_code The value of the session code + */ + + /** + * Fetches a new session code. Only usable by the Flagship application + * + * @throws {NotRegisteredException} When the client isn't certified to be the Flagship application + * @returns {Promise<SessionCodeRes>} A promise that resolves with a new session_code + */ + + }, { + key: "fetchSessionCode", + value: function () { + var _fetchSessionCode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() { + return _regenerator.default.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", this.fetchJSON('POST', '/auth/session_code')); + + case 1: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function fetchSessionCode() { + return _fetchSessionCode.apply(this, arguments); + } + + return fetchSessionCode; + }() + /** + * Fetches a new session code. Only usable by the Flagship application + * + * @throws {NotRegisteredException} When the client isn't certified to be the Flagship application + * @returns {Promise<SessionCodeRes>} A promise that resolves with a new session_code + */ + + }, { + key: "fetchSessionCodeWithPassword", + value: function () { + var _fetchSessionCodeWithPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(_ref3) { + var passwordHash, _ref3$twoFactorToken, twoFactorToken, _ref3$twoFactorPassco, twoFactorPasscode; + + return _regenerator.default.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + passwordHash = _ref3.passwordHash, _ref3$twoFactorToken = _ref3.twoFactorToken, twoFactorToken = _ref3$twoFactorToken === void 0 ? undefined : _ref3$twoFactorToken, _ref3$twoFactorPassco = _ref3.twoFactorPasscode, twoFactorPasscode = _ref3$twoFactorPassco === void 0 ? undefined : _ref3$twoFactorPassco; + return _context8.abrupt("return", this.fetchJSON('POST', '/auth/session_code', { + passphrase: passwordHash, + two_factor_token: twoFactorToken, + two_factor_passcode: twoFactorPasscode + })); + + case 2: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function fetchSessionCodeWithPassword(_x7) { + return _fetchSessionCodeWithPassword.apply(this, arguments); + } + + return fetchSessionCodeWithPassword; + }() + /** + * @typedef AccessTokenRes + * @property {string} access_token The OAuth access token + * @property {string} refresh_token The OAuth refresh token + * @property {string} token_type The OAuth token type + * @property {string} scope The OAuth scope + */ + + /** + * @typedef TwoFactorNeededRes + * @property {string} two_factor_token The 2FA token + */ + + /** + * Get OAuth access and register tokens without having to make OAuth dance + * + * This endpoint returns registration tokens only from a Flagship app, + * otherwise it returns a session_code that should be used in an OAuth dance + * + * More info: https://docs.cozy.io/en/cozy-stack/flagship/ + * More info: https://docs.cozy.io/en/cozy-stack/auth/#post-authloginflagship + * + * @returns {Promise<AccessTokenRes|TwoFactorNeededRes|SessionCodeRes>} A promise that resolves with an access token, a session_code or a 2FA code + */ + + }, { + key: "loginFlagship", + value: function () { + var _loginFlagship = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(_ref4) { + var passwordHash, _ref4$twoFactorToken, twoFactorToken, _ref4$twoFactorPassco, twoFactorPasscode; + + return _regenerator.default.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + passwordHash = _ref4.passwordHash, _ref4$twoFactorToken = _ref4.twoFactorToken, twoFactorToken = _ref4$twoFactorToken === void 0 ? undefined : _ref4$twoFactorToken, _ref4$twoFactorPassco = _ref4.twoFactorPasscode, twoFactorPasscode = _ref4$twoFactorPassco === void 0 ? undefined : _ref4$twoFactorPassco; + return _context9.abrupt("return", this.fetchJSON('POST', '/auth/login/flagship', { + client_id: this.oauthOptions.clientID, + client_secret: this.oauthOptions.clientSecret, + passphrase: passwordHash, + two_factor_token: twoFactorToken, + two_factor_passcode: twoFactorPasscode + })); + + case 2: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + function loginFlagship(_x8) { + return _loginFlagship.apply(this, arguments); + } + + return loginFlagship; + }() + /** + * Retrieves a new access token by refreshing the currently used token. + * + * @throws {NotRegisteredException} When the client doesn't have it's registration information + * @throws {Error} The client should already have an access token to use this function + * @returns {Promise} A promise that resolves with a new AccessToken object + */ + + }, { + key: "refreshToken", + value: function () { + var _refreshToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() { + var data, result, newToken, revoked; + return _regenerator.default.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + if (this.isRegistered()) { + _context10.next = 2; + break; + } + + throw new NotRegisteredException(); + + case 2: + if (this.token) { + _context10.next = 4; + break; + } + + throw new Error('No token to refresh'); + + case 4: + data = { + grant_type: 'refresh_token', + refresh_token: this.token.refreshToken, + client_id: this.oauthOptions.clientID, + client_secret: this.oauthOptions.clientSecret + }; + _context10.prev = 5; + _context10.next = 8; + return this.fetchJSONWithCurrentToken('POST', '/auth/access_token', this.dataToQueryString(data), { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + }); + + case 8: + result = _context10.sent; + newToken = new _AccessToken.default(_objectSpread({ + refresh_token: this.token.refreshToken + }, result)); + this.setToken(newToken); + + if (this.onTokenRefresh && typeof this.onTokenRefresh === 'function') { + this.onTokenRefresh(newToken); + } + + return _context10.abrupt("return", newToken); + + case 15: + _context10.prev = 15; + _context10.t0 = _context10["catch"](5); + + if (!this.isRevocationError(_context10.t0)) { + _context10.next = 21; + break; + } + + this.onRevocationChange(true); + + _logger.default.warn('Client has been revoked. Please authenticate again.'); + + throw _context10.t0; + + case 21: + if (!(_errors.default.EXPIRED_TOKEN.test(_context10.t0.message) || _errors.default.INVALID_TOKEN.test(_context10.t0.message) || _errors.default.INVALID_TOKEN_ALT.test(_context10.t0.message))) { + _context10.next = 28; + break; + } + + _context10.next = 24; + return this.checkForRevocation(); + + case 24: + revoked = _context10.sent; + + if (!revoked) { + _context10.next = 28; + break; + } + + _logger.default.warn('Client has been revoked. Please authenticate again.'); + + throw _context10.t0; + + case 28: + throw _context10.t0; + + case 29: + case "end": + return _context10.stop(); + } + } + }, _callee10, this, [[5, 15]]); + })); + + function refreshToken() { + return _refreshToken.apply(this, arguments); + } + + return refreshToken; + }() + }, { + key: "exchangeOAuthSecret", + value: function exchangeOAuthSecret(uri, secret) { + return this.fetchJSON('POST', uri + '/auth/secret_exchange', { + secret: secret + }); + } + /** + * Updates the client's stored token + * + * @param {string} token = null The new token to use — can be a string, a json object or an AccessToken instance. + */ + + }, { + key: "setToken", + value: function setToken(token) { + if (token) { + this.token = token instanceof _AccessToken.default ? token : new _AccessToken.default(token); + } else { + this.token = null; + } + } + }, { + key: "setCredentials", + value: function setCredentials(token) { + (0, _logDeprecate.default)('setCredentials is deprecated, please replace by setToken'); + return this.setToken(token); + } + /** + * Updates the OAuth informations + * + * @param {object} options Map of OAuth options + */ + + }, { + key: "setOAuthOptions", + value: function setOAuthOptions(options) { + this.oauthOptions = this.camelCaseOAuthData(options); + } + }, { + key: "resetClientId", + value: function resetClientId() { + this.oauthOptions.clientID = ''; + } + /** + * Reset the current OAuth client + */ + + }, { + key: "resetClient", + value: function resetClient() { + this.resetClientId(); + this.setUri(null); + this.setToken(null); + } + /** + * Turns the client's registration access token into a header suitable for HTTP requests. Used in some queries to manipulate the client on the server side. + * + * @returns {string} + * @private + */ + + }, { + key: "registrationAccessTokenToAuthHeader", + value: function registrationAccessTokenToAuthHeader() { + if (!this.oauthOptions.registrationAccessToken) { + throw new Error('No registration access token'); + } + + return 'Bearer ' + this.oauthOptions.registrationAccessToken; + } + /** + * This method should be used in flagship app onboarding process to finalize the + * cozy creation by setting the user password into the cozy-stack + * + * More info: https://docs.cozy.io/en/cozy-stack/settings/#post-settingspassphraseflagship + * + * @param {object} params - parameters needed to set passphrase + * @param {string} params.registerToken - registration token provided by the onboarding link + * @param {string} params.passwordHash - hash of the master password + * @param {string} params.hint - hint for the master password + * @param {string} params.key - key (crypted) used for the vault encryption + * @param {string} params.publicKey - public key used for sharing ciphers from the vault + * @param {string} params.privateKey - private key (crypted) used for sharing ciphers from the vault + * @param {string} params.iterations - number of KDF iterations applied when hashing the master password + * @returns {object} token - The OAauth token + */ + + }, { + key: "setPassphraseFlagship", + value: function setPassphraseFlagship(_ref5) { + var registerToken = _ref5.registerToken, + passwordHash = _ref5.passwordHash, + hint = _ref5.hint, + key = _ref5.key, + publicKey = _ref5.publicKey, + privateKey = _ref5.privateKey, + iterations = _ref5.iterations; + return this.fetchJSON('POST', '/settings/passphrase/flagship', { + register_token: registerToken, + passphrase: passwordHash, + hint: hint, + key: key, + public_key: publicKey, + private_key: privateKey, + iterations: iterations, + client_id: this.oauthOptions.clientID, + client_secret: this.oauthOptions.clientSecret + }, { + // TODO: faut il mettre le header? + headers: { + Authorization: this.registrationAccessTokenToAuthHeader() + } + }); + } + /** + * Check if the OAuth client's has been revoked. + * If this is the case, call the onRevocationChange callback + * + * @async + * @returns {Promise<boolean>} A Promise that resolves to `false` if client is still valid, or `true` if it has been revoked. + */ + + }, { + key: "checkForRevocation", + value: function () { + var _checkForRevocation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() { + return _regenerator.default.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _context11.prev = 0; + _context11.next = 3; + return this.fetchInformation(); + + case 3: + return _context11.abrupt("return", false); + + case 6: + _context11.prev = 6; + _context11.t0 = _context11["catch"](0); + + if (!this.isRevocationError(_context11.t0)) { + _context11.next = 11; + break; + } + + this.onRevocationChange(true); + return _context11.abrupt("return", true); + + case 11: + return _context11.abrupt("return", false); + + case 12: + case "end": + return _context11.stop(); + } + } + }, _callee11, this, [[0, 6]]); + })); + + function checkForRevocation() { + return _checkForRevocation.apply(this, arguments); + } + + return checkForRevocation; + }() + }]); + return OAuthClient; +}(_CozyStackClient2.default); + +var NotRegisteredException = /*#__PURE__*/function (_Error) { + (0, _inherits2.default)(NotRegisteredException, _Error); + + var _super2 = _createSuper(NotRegisteredException); + + function NotRegisteredException() { + var _this2; + + var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Client not registered or missing OAuth information'; + (0, _classCallCheck2.default)(this, NotRegisteredException); + _this2 = _super2.call(this, message); + _this2.message = message; + _this2.name = 'NotRegisteredException'; + return _this2; + } + + return NotRegisteredException; +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); + +var _default = OAuthClient; +exports.default = _default; + +/***/ }), + +/***/ "w+m+": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hide = hide; +exports.show = show; +exports.remove = remove; +exports.iframeFromIntent = iframeFromIntent; +exports.insertIntentIframe = insertIntentIframe; +exports.assertOKForIntentIframe = exports.applyStyle = void 0; +var intentClass = 'coz-intent'; + +function hide(node) { + node.style.display = 'none'; +} + +function show(node) { + node.style.display = 'block'; +} + +function remove(node) { + if (!node.parentNode) { + return; + } + + node.parentNode.removeChild(node); +} + +var px = function px(val) { + return val + 'px'; +}; + +var propFmt = { + width: px, + height: px, + maxWidth: px, + maxHeight: px +}; + +var applyStyle = function applyStyle(node, style) { + Object.keys(style).forEach(function (prop) { + var val = style[prop]; + node.style[prop] = "".concat(propFmt[prop] ? propFmt[prop](val) : val); + }); +}; + +exports.applyStyle = applyStyle; + +var assertOKForIntentIframe = function assertOKForIntentIframe(node) { + var document = node.ownerDocument; + + if (!document) { + console.warn('assertProperForIframe: bad node', node); // eslint-disable-line no-console + + throw new Error('Cannot retrieve document object from given node'); + } + + var window = document.defaultView; + + if (!window) { + console.warn('assertProperForIframe: bad document', document); // eslint-disable-line no-console + + throw new Error('Cannot retrieve window object from document'); + } +}; + +exports.assertOKForIntentIframe = assertOKForIntentIframe; + +function iframeFromIntent(intent, node, url) { + var document = node.ownerDocument; + if (!document) throw new Error('Cannot retrieve document object from given node'); + var iframe = document.createElement('iframe'); // TODO: implement 'title' attribute + + iframe.setAttribute('id', "intent-".concat(intent.id)); + iframe.setAttribute('src', url); + iframe.classList.add(intentClass); + return iframe; +} + +function insertIntentIframe(intent, element, url, onload) { + assertOKForIntentIframe(element); + var iframe = iframeFromIntent(intent, element, url); // if callback provided for when iframe is loaded + + if (typeof onload === 'function') iframe.onload = onload; + element.appendChild(iframe); + iframe.focus(); + return iframe; +} + +/***/ }), + +/***/ "w7+A": +/***/ (function(module, exports) { + +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; + + +/***/ }), + +/***/ "wDGE": +/***/ (function(module, exports) { + +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _getPrototypeOf(o); +} + +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "wHIf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UserChallengeUpdateFlag = exports.UserChallengeSuccess = exports.UserChallengeState = void 0; +var UserChallengeUpdateFlag; +exports.UserChallengeUpdateFlag = UserChallengeUpdateFlag; +(function (UserChallengeUpdateFlag) { + UserChallengeUpdateFlag[UserChallengeUpdateFlag["CHALLENGE"] = 0] = "CHALLENGE"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_UNLOCK"] = 10] = "DUEL_UNLOCK"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_UPDATE_THRESHOLD"] = 11] = "DUEL_UPDATE_THRESHOLD"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_START"] = 12] = "DUEL_START"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_CONSUMPTION"] = 13] = "DUEL_CONSUMPTION"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_WIN"] = 14] = "DUEL_WIN"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_LOSS"] = 15] = "DUEL_LOSS"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["DUEL_RESET"] = 16] = "DUEL_RESET"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["QUIZ"] = 20] = "QUIZ"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["QUIZ_START"] = 21] = "QUIZ_START"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["QUIZ_DONE"] = 22] = "QUIZ_DONE"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["QUIZ_RESET"] = 23] = "QUIZ_RESET"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["QUIZ_UPDATE"] = 24] = "QUIZ_UPDATE"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["EXPLORATION_START"] = 30] = "EXPLORATION_START"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["EXPLORATION_UPDATE"] = 31] = "EXPLORATION_UPDATE"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["EXPLORATION_NOTIFICATION"] = 32] = "EXPLORATION_NOTIFICATION"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["EXPLORATION_DONE"] = 33] = "EXPLORATION_DONE"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["ACTION_START"] = 40] = "ACTION_START"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["ACTION_NOTIFICATION"] = 41] = "ACTION_NOTIFICATION"; + UserChallengeUpdateFlag[UserChallengeUpdateFlag["ACTION_DONE"] = 42] = "ACTION_DONE"; +})(UserChallengeUpdateFlag || (exports.UserChallengeUpdateFlag = UserChallengeUpdateFlag = {})); +var UserChallengeState; +exports.UserChallengeState = UserChallengeState; +(function (UserChallengeState) { + UserChallengeState[UserChallengeState["LOCKED"] = 0] = "LOCKED"; + UserChallengeState[UserChallengeState["UNLOCKED"] = 1] = "UNLOCKED"; + UserChallengeState[UserChallengeState["ONGOING"] = 2] = "ONGOING"; + UserChallengeState[UserChallengeState["DUEL"] = 3] = "DUEL"; + UserChallengeState[UserChallengeState["DONE"] = 4] = "DONE"; +})(UserChallengeState || (exports.UserChallengeState = UserChallengeState = {})); +var UserChallengeSuccess; +exports.UserChallengeSuccess = UserChallengeSuccess; +(function (UserChallengeSuccess) { + UserChallengeSuccess[UserChallengeSuccess["ONGOING"] = 0] = "ONGOING"; + UserChallengeSuccess[UserChallengeSuccess["LOST"] = 1] = "LOST"; + UserChallengeSuccess[UserChallengeSuccess["WIN"] = 2] = "WIN"; +})(UserChallengeSuccess || (exports.UserChallengeSuccess = UserChallengeSuccess = {})); + +/***/ }), + +/***/ "wIWy": +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__("4s8E"); +var IE8_DOM_DEFINE = __webpack_require__("utKP"); +var toPrimitive = __webpack_require__("zqIu"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__("1bdm") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "wIu5": +/***/ (function(module, exports, __webpack_require__) { + +var $iterators = __webpack_require__("MHAU"); +var getKeys = __webpack_require__("FFxP"); +var redefine = __webpack_require__("iNsi"); +var global = __webpack_require__("ETne"); +var hide = __webpack_require__("XyXA"); +var Iterators = __webpack_require__("Ikrg"); +var wks = __webpack_require__("Yhpl"); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + + +/***/ }), + +/***/ "wR54": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chromeStackLineParser", function() { return chromeStackLineParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStackLineParsers", function() { return defaultStackLineParsers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStackParser", function() { return defaultStackParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "geckoStackLineParser", function() { return geckoStackLineParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "opera10StackLineParser", function() { return opera10StackLineParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "opera11StackLineParser", function() { return opera11StackLineParser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "winjsStackLineParser", function() { return winjsStackLineParser; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +// global reference to slice +const UNKNOWN_FUNCTION = '?'; + +const OPERA10_PRIORITY = 10; +const OPERA11_PRIORITY = 20; +const CHROME_PRIORITY = 30; +const WINJS_PRIORITY = 40; +const GECKO_PRIORITY = 50; + +function createFrame(filename, func, lineno, colno) { + const frame = { + filename, + function: func, + // All browser frames are considered in_app + in_app: true, + }; + + if (lineno !== undefined) { + frame.lineno = lineno; + } + + if (colno !== undefined) { + frame.colno = colno; + } + + return frame; +} + +// Chromium based browsers: Chrome, Brave, new Opera, new Edge +const chromeRegex = + /^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; +const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/; + +const chrome = line => { + const parts = chromeRegex.exec(line); + + if (parts) { + const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line + + if (isEval) { + const subMatch = chromeEvalRegex.exec(parts[2]); + + if (subMatch) { + // throw out eval line/column and use top-most line/column number + parts[2] = subMatch[1]; // url + parts[3] = subMatch[2]; // line + parts[4] = subMatch[3]; // column + } + } + + // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now + // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable) + const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]); + + return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined); + } + + return; +}; + +const chromeStackLineParser = [CHROME_PRIORITY, chrome]; + +// gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it +// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js +// We need this specific case for now because we want no other regex to match. +const geckoREgex = + /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i; +const geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; + +const gecko = line => { + const parts = geckoREgex.exec(line); + + if (parts) { + const isEval = parts[3] && parts[3].indexOf(' > eval') > -1; + if (isEval) { + const subMatch = geckoEvalRegex.exec(parts[3]); + + if (subMatch) { + // throw out eval line/column and use top-most line number + parts[1] = parts[1] || 'eval'; + parts[3] = subMatch[1]; + parts[4] = subMatch[2]; + parts[5] = ''; // no column when eval + } + } + + let filename = parts[3]; + let func = parts[1] || UNKNOWN_FUNCTION; + [func, filename] = extractSafariExtensionDetails(func, filename); + + return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined); + } + + return; +}; + +const geckoStackLineParser = [GECKO_PRIORITY, gecko]; + +const winjsRegex = + /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; + +const winjs = line => { + const parts = winjsRegex.exec(line); + + return parts + ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined) + : undefined; +}; + +const winjsStackLineParser = [WINJS_PRIORITY, winjs]; + +const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; + +const opera10 = line => { + const parts = opera10Regex.exec(line); + return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined; +}; + +const opera10StackLineParser = [OPERA10_PRIORITY, opera10]; + +const opera11Regex = + / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i; + +const opera11 = line => { + const parts = opera11Regex.exec(line); + return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined; +}; + +const opera11StackLineParser = [OPERA11_PRIORITY, opera11]; + +const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser]; + +const defaultStackParser = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["createStackParser"])(...defaultStackLineParsers); + +/** + * Safari web extensions, starting version unknown, can produce "frames-only" stacktraces. + * What it means, is that instead of format like: + * + * Error: wat + * at function@url:row:col + * at function@url:row:col + * at function@url:row:col + * + * it produces something like: + * + * function@url:row:col + * function@url:row:col + * function@url:row:col + * + * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch. + * This function is extracted so that we can use it in both places without duplicating the logic. + * Unfortunately "just" changing RegExp is too complicated now and making it pass all tests + * and fix this case seems like an impossible, or at least way too time-consuming task. + */ +const extractSafariExtensionDetails = (func, filename) => { + const isSafariExtension = func.indexOf('safari-extension') !== -1; + const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1; + + return isSafariExtension || isSafariWebExtension + ? [ + func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION, + isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`, + ] + : [func, filename]; +}; + + +//# sourceMappingURL=stack-parsers.js.map + + +/***/ }), + +/***/ "wTd/": +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__("WnzN"); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; + + +/***/ }), + +/***/ "wVGO": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: "menys d'un segon", + other: 'menys de {{count}} segons' + }, + + xSeconds: { + one: '1 segon', + other: '{{count}} segons' + }, + + halfAMinute: 'mig minut', + + lessThanXMinutes: { + one: "menys d'un minut", + other: 'menys de {{count}} minuts' + }, + + xMinutes: { + one: '1 minut', + other: '{{count}} minuts' + }, + + aboutXHours: { + one: 'aproximadament una hora', + other: 'aproximadament {{count}} hores' + }, + + xHours: { + one: '1 hora', + other: '{{count}} hores' + }, + + xDays: { + one: '1 dia', + other: '{{count}} dies' + }, + + aboutXMonths: { + one: 'aproximadament un mes', + other: 'aproximadament {{count}} mesos' + }, + + xMonths: { + one: '1 mes', + other: '{{count}} mesos' + }, + + aboutXYears: { + one: 'aproximadament un any', + other: 'aproximadament {{count}} anys' + }, + + xYears: { + one: '1 any', + other: '{{count}} anys' + }, + + overXYears: { + one: "més d'un any", + other: 'més de {{count}} anys' + }, + + almostXYears: { + one: 'gairebé un any', + other: 'gairebé {{count}} anys' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'en ' + result + } else { + return 'fa ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "wWEB": +/***/ (function(module, exports, __webpack_require__) { + +var isKeyable = __webpack_require__("aqRq"); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; + + +/***/ }), + +/***/ "wWNu": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lVtn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWidthUp", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__["isWidthUp"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWidthDown", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__["isWidthDown"]; }); + + + + +/***/ }), + +/***/ "wWdb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphQL", function() { return GraphQL; }); +/* harmony import */ var _sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bNb6"); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("aUjI"); +/* harmony import */ var _utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("k8qK"); + + + + +/** Tracing integration for graphql package */ +class GraphQL {constructor() { GraphQL.prototype.__init.call(this); } + /** + * @inheritDoc + */ + static __initStatic() {this.id = 'GraphQL';} + + /** + * @inheritDoc + */ + __init() {this.name = GraphQL.id;} + + /** + * @inheritDoc + */ + setupOnce(_, getCurrentHub) { + const pkg = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["loadModule"]) + +('graphql/execution/execute.js'); + + if (!pkg) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].error('GraphQL Integration was unable to require graphql/execution package.'); + return; + } + + if (Object(_utils_node_utils_js__WEBPACK_IMPORTED_MODULE_2__["shouldDisableAutoInstrumentation"])(getCurrentHub)) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__["logger"].log('GraphQL Integration is skipped because of instrumenter configuration.'); + return; + } + + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["fill"])(pkg, 'execute', function (orig) { + return function ( ...args) { + const scope = getCurrentHub().getScope(); + const parentSpan = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]); + + const span = Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ + description: 'execute', + op: 'graphql.execute', + })]); + + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _6 => _6.setSpan, 'call', _7 => _7(span)]); + + const rv = orig.call(this, ...args); + + if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__["isThenable"])(rv)) { + return rv.then((res) => { + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]); + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _10 => _10.setSpan, 'call', _11 => _11(parentSpan)]); + + return res; + }); + } + + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]); + Object(_sentry_utils_esm_buildPolyfills__WEBPACK_IMPORTED_MODULE_0__["_optionalChain"])([scope, 'optionalAccess', _14 => _14.setSpan, 'call', _15 => _15(parentSpan)]); + return rv; + }; + }); + } +}GraphQL.__initStatic(); + + +//# sourceMappingURL=graphql.js.map + + +/***/ }), + +/***/ "wXrU": +/***/ (function(module, exports, __webpack_require__) { + +var baseMerge = __webpack_require__("JWki"), + createAssigner = __webpack_require__("nCnc"); + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +module.exports = merge; + + +/***/ }), + +/***/ "wY4L": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; +} + +var thunk = createThunkMiddleware(); +thunk.withExtraArgument = createThunkMiddleware; + +/* harmony default export */ __webpack_exports__["default"] = (thunk); + +/***/ }), + +/***/ "wdBx": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__("GX2+")(); +} + + +/***/ }), + +/***/ "wf6R": +/***/ (function(module, exports, __webpack_require__) { + +/* + * Sift 3.x + * + * Copryright 2015, Craig Condon + * Licensed under MIT + * + * Filter JavaScript objects with mongodb queries + */ + +(function() { + + 'use strict'; + + /** + */ + + function isFunction(value) { + return typeof value === 'function'; + } + + /** + */ + + function isArray(value) { + return Object.prototype.toString.call(value) === '[object Array]'; + } + + /** + */ + + function comparable(value) { + if (value instanceof Date) { + return value.getTime(); + } else if (isArray(value)) { + return value.map(comparable); + } else if (value && typeof value.toJSON === 'function') { + return value.toJSON(); + } else { + return value; + } + } + + function get(obj, key) { + return isFunction(obj.get) ? obj.get(key) : obj[key]; + } + + /** + */ + + function or(validator) { + return function(a, b) { + if (!isArray(b) || !b.length) { + return validator(a, b); + } + for (var i = 0, n = b.length; i < n; i++) { + if (validator(a, get(b,i))) return true; + } + return false; + } + } + + /** + */ + + function and(validator) { + return function(a, b) { + if (!isArray(b) || !b.length) { + return validator(a, b); + } + for (var i = 0, n = b.length; i < n; i++) { + if (!validator(a, get(b, i))) return false; + } + return true; + }; + } + + function validate(validator, b, k, o) { + return validator.v(validator.a, b, k, o); + } + + var OPERATORS = { + + /** + */ + + $eq: or(function(a, b) { + return a(b); + }), + + /** + */ + + $ne: and(function(a, b) { + return !a(b); + }), + + /** + */ + + $gt: or(function(a, b) { + return sift.compare(comparable(b), a) > 0; + }), + + /** + */ + + $gte: or(function(a, b) { + return sift.compare(comparable(b), a) >= 0; + }), + + /** + */ + + $lt: or(function(a, b) { + return sift.compare(comparable(b), a) < 0; + }), + + /** + */ + + $lte: or(function(a, b) { + return sift.compare(comparable(b), a) <= 0; + }), + + /** + */ + + $mod: or(function(a, b) { + return b % a[0] == a[1]; + }), + + /** + */ + + $in: function(a, b) { + + if (b instanceof Array) { + for (var i = b.length; i--;) { + if (~a.indexOf(comparable(get(b, i)))) { + return true; + } + } + } else { + var comparableB = comparable(b); + if (comparableB === b && typeof b === 'object') { + for (var i = a.length; i--;) { + if (String(a[i]) === String(b) && String(b) !== '[object Object]') { + return true; + } + } + } + + /* + Handles documents that are undefined, whilst also + having a 'null' element in the parameters to $in. + */ + if (typeof comparableB == 'undefined') { + for (var i = a.length; i--;) { + if (a[i] == null) { + return true; + } + } + } + + /* + Handles the case of {'field': {$in: [/regexp1/, /regexp2/, ...]}} + */ + for (var i = a.length; i--;) { + var validator = createRootValidator(get(a, i), undefined); + var result = validate(validator, b, i, a); + if ((result) && (String(result) !== '[object Object]') && (String(b) !== '[object Object]')) { + return true; + } + } + + return !!~a.indexOf(comparableB); + } + + return false; + }, + + /** + */ + + $nin: function(a, b, k, o) { + return !OPERATORS.$in(a, b, k, o); + }, + + /** + */ + + $not: function(a, b, k, o) { + return !validate(a, b, k, o); + }, + + /** + */ + + $type: function(a, b) { + return b != void 0 ? b instanceof a || b.constructor == a : false; + }, + + /** + */ + + $all: function(a, b, k, o) { + return OPERATORS.$and(a, b, k, o); + }, + + /** + */ + + $size: function(a, b) { + return b ? a === b.length : false; + }, + + /** + */ + + $or: function(a, b, k, o) { + for (var i = 0, n = a.length; i < n; i++) if (validate(get(a, i), b, k, o)) return true; + return false; + }, + + /** + */ + + $nor: function(a, b, k, o) { + return !OPERATORS.$or(a, b, k, o); + }, + + /** + */ + + $and: function(a, b, k, o) { + for (var i = 0, n = a.length; i < n; i++) { + if (!validate(get(a, i), b, k, o)) { + return false; + } + } + return true; + }, + + /** + */ + + $regex: or(function(a, b) { + return typeof b === 'string' && a.test(b); + }), + + /** + */ + + $where: function(a, b, k, o) { + return a.call(b, b, k, o); + }, + + /** + */ + + $elemMatch: function(a, b, k, o) { + if (isArray(b)) { + return !!~search(b, a); + } + return validate(a, b, k, o); + }, + + /** + */ + + $exists: function(a, b, k, o) { + return o.hasOwnProperty(k) === a; + } + }; + + /** + */ + + var prepare = { + + /** + */ + + $eq: function(a) { + + if (a instanceof RegExp) { + return function(b) { + return typeof b === 'string' && a.test(b); + }; + } else if (a instanceof Function) { + return a; + } else if (isArray(a) && !a.length) { + // Special case of a == [] + return function(b) { + return (isArray(b) && !b.length); + }; + } else if (a === null){ + return function(b){ + //will match both null and undefined + return b == null; + } + } + + return function(b) { + return sift.compare(comparable(b), a) === 0; + }; + }, + + /** + */ + + $ne: function(a) { + return prepare.$eq(a); + }, + + /** + */ + + $and: function(a) { + return a.map(parse); + }, + + /** + */ + + $all: function(a) { + return prepare.$and(a); + }, + + /** + */ + + $or: function(a) { + return a.map(parse); + }, + + /** + */ + + $nor: function(a) { + return a.map(parse); + }, + + /** + */ + + $not: function(a) { + return parse(a); + }, + + /** + */ + + $regex: function(a, query) { + return new RegExp(a, query.$options); + }, + + /** + */ + + $where: function(a) { + return typeof a === 'string' ? new Function('obj', 'return ' + a) : a; + }, + + /** + */ + + $elemMatch: function(a) { + return parse(a); + }, + + /** + */ + + $exists: function(a) { + return !!a; + } + }; + + /** + */ + + function search(array, validator) { + + for (var i = 0; i < array.length; i++) { + var result = get(array, i); + if (validate(validator, get(array, i))) { + return i; + } + } + + return -1; + } + + /** + */ + + function createValidator(a, validate) { + return { a: a, v: validate }; + } + + /** + */ + + function nestedValidator(a, b) { + var values = []; + findValues(b, a.k, 0, b, values); + + if (values.length === 1) { + var first = values[0]; + return validate(a.nv, first[0], first[1], first[2]); + } + + // If the query contains $ne, need to test all elements ANDed together + var inclusive = a && a.q && typeof a.q.$ne !== 'undefined'; + var allValid = inclusive; + for (var i = 0; i < values.length; i++) { + var result = values[i]; + var isValid = validate(a.nv, result[0], result[1], result[2]); + if (inclusive) { + allValid &= isValid; + } else { + allValid |= isValid; + } + } + return allValid; + } + + /** + */ + + function findValues(current, keypath, index, object, values) { + + if (index === keypath.length || current == void 0) { + + values.push([current, keypath[index - 1], object]); + return; + } + + var k = get(keypath, index); + + // ensure that if current is an array, that the current key + // is NOT an array index. This sort of thing needs to work: + // sift({'foo.0':42}, [{foo: [42]}]); + if (isArray(current) && isNaN(Number(k))) { + for (var i = 0, n = current.length; i < n; i++) { + findValues(get(current, i), keypath, index, current, values); + } + } else { + findValues(get(current, k), keypath, index + 1, current, values); + } + } + + /** + */ + + function createNestedValidator(keypath, a, q) { + return { a: { k: keypath, nv: a, q: q }, v: nestedValidator }; + } + + /** + * flatten the query + */ + + function isVanillaObject(value) { + return value && value.constructor === Object; + } + + function parse(query) { + query = comparable(query); + + if (!query || !isVanillaObject(query)) { // cross browser support + query = { $eq: query }; + } + + var validators = []; + + for (var key in query) { + var a = query[key]; + + if (key === '$options') { + continue; + } + + if (OPERATORS[key]) { + if (prepare[key]) a = prepare[key](a, query); + validators.push(createValidator(comparable(a), OPERATORS[key])); + } else { + + if (key.charCodeAt(0) === 36) { + throw new Error('Unknown operation ' + key); + } + validators.push(createNestedValidator(key.split('.'), parse(a), a)); + } + } + + return validators.length === 1 ? validators[0] : createValidator(validators, OPERATORS.$and); + } + + /** + */ + + function createRootValidator(query, getter) { + var validator = parse(query); + if (getter) { + validator = { + a: validator, + v: function(a, b, k, o) { + return validate(a, getter(b), k, o); + } + }; + } + return validator; + } + + /** + */ + + function sift(query, array, getter) { + + if (isFunction(array)) { + getter = array; + array = void 0; + } + + var validator = createRootValidator(query, getter); + + function filter(b, k, o) { + return validate(validator, b, k, o); + } + + if (array) { + return array.filter(filter); + } + + return filter; + } + + /** + */ + + sift.use = function(plugin) { + if (isFunction(plugin)) return plugin(sift); + for (var key in plugin) { + /* istanbul ignore else */ + if (key.charCodeAt(0) === 36) { + OPERATORS[key] = plugin[key]; + } + } + }; + + /** + */ + + sift.indexOf = function(query, array, getter) { + return search(array, createRootValidator(query, getter)); + }; + + /** + */ + + sift.compare = function(a, b) { + if(a===b) return 0; + if(typeof a === typeof b) { + if (a > b) { + return 1; + } + if (a < b) { + return -1; + } + } + }; + + /* istanbul ignore next */ + if ( true && typeof module.exports !== 'undefined') { + Object.defineProperty(exports, "__esModule", { + value: true + }); + + module.exports = sift; + exports['default'] = module.exports.default = sift; + } + + /* istanbul ignore next */ + if (typeof window !== 'undefined') { + window.sift = sift; + } +})(); + + +/***/ }), + +/***/ "wfDR": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("06hQ"); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; + + +/***/ }), + +/***/ "wgy5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + display: 'flex', + alignItems: 'center', + padding: 8, + justifyContent: 'flex-end', + flex: '0 0 auto' + }, + + /* Styles applied to the root element if `disableSpacing={false}`. */ + spacing: { + '& > :not(:first-child)': { + marginLeft: 8 + } + } +}; +var DialogActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function DialogActions(props, ref) { + var _props$disableSpacing = props.disableSpacing, + disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing, + classes = props.classes, + className = props.className, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["disableSpacing", "classes", "className"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, !disableSpacing && classes.spacing), + ref: ref + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiDialogActions' +})(DialogActions)); + +/***/ }), + +/***/ "wjhL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; }); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document.nodeType === 9; + +/* harmony default export */ __webpack_exports__["default"] = (isBrowser); + + +/***/ }), + +/***/ "wlqn": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {/** + * + * + * @author Jerry Bendy <jerry@icewingcc.com> + * @licence MIT + * + */ + +(function(self) { + 'use strict'; + + var nativeURLSearchParams = (function() { + // #41 Fix issue in RN + try { + if (self.URLSearchParams && (new self.URLSearchParams('foo=bar')).get('foo') === 'bar') { + return self.URLSearchParams; + } + } catch (e) {} + return null; + })(), + isSupportObjectConstructor = nativeURLSearchParams && (new nativeURLSearchParams({a: 1})).toString() === 'a=1', + // There is a bug in safari 10.1 (and earlier) that incorrectly decodes `%2B` as an empty space and not a plus. + decodesPlusesCorrectly = nativeURLSearchParams && (new nativeURLSearchParams('s=%2B').get('s') === '+'), + __URLSearchParams__ = "__URLSearchParams__", + // Fix bug in Edge which cannot encode ' &' correctly + encodesAmpersandsCorrectly = nativeURLSearchParams ? (function() { + var ampersandTest = new nativeURLSearchParams(); + ampersandTest.append('s', ' &'); + return ampersandTest.toString() === 's=+%26'; + })() : true, + prototype = URLSearchParamsPolyfill.prototype, + iterable = !!(self.Symbol && self.Symbol.iterator); + + if (nativeURLSearchParams && isSupportObjectConstructor && decodesPlusesCorrectly && encodesAmpersandsCorrectly) { + return; + } + + + /** + * Make a URLSearchParams instance + * + * @param {object|string|URLSearchParams} search + * @constructor + */ + function URLSearchParamsPolyfill(search) { + search = search || ""; + + // support construct object with another URLSearchParams instance + if (search instanceof URLSearchParams || search instanceof URLSearchParamsPolyfill) { + search = search.toString(); + } + this [__URLSearchParams__] = parseToDict(search); + } + + + /** + * Appends a specified key/value pair as a new search parameter. + * + * @param {string} name + * @param {string} value + */ + prototype.append = function(name, value) { + appendTo(this [__URLSearchParams__], name, value); + }; + + /** + * Deletes the given search parameter, and its associated value, + * from the list of all search parameters. + * + * @param {string} name + */ + prototype['delete'] = function(name) { + delete this [__URLSearchParams__] [name]; + }; + + /** + * Returns the first value associated to the given search parameter. + * + * @param {string} name + * @returns {string|null} + */ + prototype.get = function(name) { + var dict = this [__URLSearchParams__]; + return this.has(name) ? dict[name][0] : null; + }; + + /** + * Returns all the values association with a given search parameter. + * + * @param {string} name + * @returns {Array} + */ + prototype.getAll = function(name) { + var dict = this [__URLSearchParams__]; + return this.has(name) ? dict [name].slice(0) : []; + }; + + /** + * Returns a Boolean indicating if such a search parameter exists. + * + * @param {string} name + * @returns {boolean} + */ + prototype.has = function(name) { + return hasOwnProperty(this [__URLSearchParams__], name); + }; + + /** + * Sets the value associated to a given search parameter to + * the given value. If there were several values, delete the + * others. + * + * @param {string} name + * @param {string} value + */ + prototype.set = function set(name, value) { + this [__URLSearchParams__][name] = ['' + value]; + }; + + /** + * Returns a string containg a query string suitable for use in a URL. + * + * @returns {string} + */ + prototype.toString = function() { + var dict = this[__URLSearchParams__], query = [], i, key, name, value; + for (key in dict) { + name = encode(key); + for (i = 0, value = dict[key]; i < value.length; i++) { + query.push(name + '=' + encode(value[i])); + } + } + return query.join('&'); + }; + + // There is a bug in Safari 10.1 and `Proxy`ing it is not enough. + var forSureUsePolyfill = !decodesPlusesCorrectly; + var useProxy = (!forSureUsePolyfill && nativeURLSearchParams && !isSupportObjectConstructor && self.Proxy); + var propValue; + if (useProxy) { + // Safari 10.0 doesn't support Proxy, so it won't extend URLSearchParams on safari 10.0 + propValue = new Proxy(nativeURLSearchParams, { + construct: function (target, args) { + return new target((new URLSearchParamsPolyfill(args[0]).toString())); + } + }) + // Chrome <=60 .toString() on a function proxy got error "Function.prototype.toString is not generic" + propValue.toString = Function.prototype.toString.bind(URLSearchParamsPolyfill); + } else { + propValue = URLSearchParamsPolyfill; + } + /* + * Apply polifill to global object and append other prototype into it + */ + Object.defineProperty(self, 'URLSearchParams', { + value: propValue + }); + + var USPProto = self.URLSearchParams.prototype; + + USPProto.polyfill = true; + + /** + * + * @param {function} callback + * @param {object} thisArg + */ + USPProto.forEach = USPProto.forEach || function(callback, thisArg) { + var dict = parseToDict(this.toString()); + Object.getOwnPropertyNames(dict).forEach(function(name) { + dict[name].forEach(function(value) { + callback.call(thisArg, value, name, this); + }, this); + }, this); + }; + + /** + * Sort all name-value pairs + */ + USPProto.sort = USPProto.sort || function() { + var dict = parseToDict(this.toString()), keys = [], k, i, j; + for (k in dict) { + keys.push(k); + } + keys.sort(); + + for (i = 0; i < keys.length; i++) { + this['delete'](keys[i]); + } + for (i = 0; i < keys.length; i++) { + var key = keys[i], values = dict[key]; + for (j = 0; j < values.length; j++) { + this.append(key, values[j]); + } + } + }; + + /** + * Returns an iterator allowing to go through all keys of + * the key/value pairs contained in this object. + * + * @returns {function} + */ + USPProto.keys = USPProto.keys || function() { + var items = []; + this.forEach(function(item, name) { + items.push(name); + }); + return makeIterator(items); + }; + + /** + * Returns an iterator allowing to go through all values of + * the key/value pairs contained in this object. + * + * @returns {function} + */ + USPProto.values = USPProto.values || function() { + var items = []; + this.forEach(function(item) { + items.push(item); + }); + return makeIterator(items); + }; + + /** + * Returns an iterator allowing to go through all key/value + * pairs contained in this object. + * + * @returns {function} + */ + USPProto.entries = USPProto.entries || function() { + var items = []; + this.forEach(function(item, name) { + items.push([name, item]); + }); + return makeIterator(items); + }; + + + if (iterable) { + USPProto[self.Symbol.iterator] = USPProto[self.Symbol.iterator] || USPProto.entries; + } + + + function encode(str) { + var replace = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'\(\)~]|%20|%00/g, function(match) { + return replace[match]; + }); + } + + function decode(str) { + return str + .replace(/[ +]/g, '%20') + .replace(/(%[a-f0-9]{2})+/ig, function(match) { + return decodeURIComponent(match); + }); + } + + function makeIterator(arr) { + var iterator = { + next: function() { + var value = arr.shift(); + return {done: value === undefined, value: value}; + } + }; + + if (iterable) { + iterator[self.Symbol.iterator] = function() { + return iterator; + }; + } + + return iterator; + } + + function parseToDict(search) { + var dict = {}; + + if (typeof search === "object") { + // if `search` is an array, treat it as a sequence + if (isArray(search)) { + for (var i = 0; i < search.length; i++) { + var item = search[i]; + if (isArray(item) && item.length === 2) { + appendTo(dict, item[0], item[1]); + } else { + throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements"); + } + } + + } else { + for (var key in search) { + if (search.hasOwnProperty(key)) { + appendTo(dict, key, search[key]); + } + } + } + + } else { + // remove first '?' + if (search.indexOf("?") === 0) { + search = search.slice(1); + } + + var pairs = search.split("&"); + for (var j = 0; j < pairs.length; j++) { + var value = pairs [j], + index = value.indexOf('='); + + if (-1 < index) { + appendTo(dict, decode(value.slice(0, index)), decode(value.slice(index + 1))); + + } else { + if (value) { + appendTo(dict, decode(value), ''); + } + } + } + } + + return dict; + } + + function appendTo(dict, name, value) { + var val = typeof value === 'string' ? value : ( + value !== null && value !== undefined && typeof value.toString === 'function' ? value.toString() : JSON.stringify(value) + ); + + // #47 Prevent using `hasOwnProperty` as a property name + if (hasOwnProperty(dict, name)) { + dict[name].push(val); + } else { + dict[name] = [val]; + } + } + + function isArray(val) { + return !!val && '[object Array]' === Object.prototype.toString.call(val); + } + + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + +})(typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : this)); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"))) + +/***/ }), + +/***/ "wnR+": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("soLG") +var startOfISOWeek = __webpack_require__("MKBq") +var startOfISOYear = __webpack_require__("v+O4") + +var MILLISECONDS_IN_WEEK = 604800000 + +/** + * @category ISO Week Helpers + * @summary Get the ISO week of the given date. + * + * @description + * Get the ISO week of the given date. + * + * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date + * + * @param {Date|String|Number} date - the given date + * @returns {Number} the ISO week + * + * @example + * // Which week of the ISO-week numbering year is 2 January 2005? + * var result = getISOWeek(new Date(2005, 0, 2)) + * //=> 53 + */ +function getISOWeek (dirtyDate) { + var date = parse(dirtyDate) + var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime() + + // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1 +} + +module.exports = getISOWeek + + +/***/ }), + +/***/ "wniO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4SeG"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Portal__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "wo9o": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _keyBy = _interopRequireDefault(__webpack_require__("3UCn")); + +var _mapValues = _interopRequireDefault(__webpack_require__("7FTH")); + +var _merge = _interopRequireDefault(__webpack_require__("wXrU")); + +var _size = _interopRequireDefault(__webpack_require__("mcXU")); + +var _intersectionBy = _interopRequireDefault(__webpack_require__("Bvlq")); + +var _associations = __webpack_require__("Suxc"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @typedef {object} DoctypeSchema + */ + +/** + * @typedef {Record<string, DoctypeSchema>} SchemaDefinition + */ + +/** + * Returns a normalized schema object from the schema definition. + * + * - Relationships are resolved to classes if needed + * - The name of the relationship (its key in the schema definition) + * is included in the relationship + * - Empty relationships are nulled + * + * @private + */ +var normalizeDoctypeSchema = function normalizeDoctypeSchema(doctypeSchema) { + var relationships = (0, _mapValues.default)(doctypeSchema.relationships || {}, function (v, k) { + return _objectSpread(_objectSpread({}, v), {}, { + name: k, + type: (0, _associations.resolveClass)(v.doctype, v.type) + }); + }); + return _objectSpread(_objectSpread({}, doctypeSchema), {}, { + relationships: (0, _size.default)(relationships) > 0 ? (0, _keyBy.default)(relationships, 'name') : null + }); +}; + +var assert = function assert(predicate, errorMessage) { + if (!predicate) throw new Error(errorMessage); +}; + +var ensureCanBeAdded = function ensureCanBeAdded(newSchemas, existingSchemas) { + var sameNames = (0, _intersectionBy.default)(newSchemas, existingSchemas, function (x) { + return x.name; + }); + assert(sameNames.length === 0, "Duplicated names in schemas being added: ".concat(sameNames.map(function (x) { + return x.name; + }).join(', '))); + var sameDoctypes = (0, _intersectionBy.default)(newSchemas, existingSchemas, function (x) { + return x.doctype; + }); + assert(sameDoctypes.length === 0, "Duplicated doctypes in schemas being added: ".concat(sameDoctypes.map(function (x) { + return x.name; + }).join(', '))); +}; +/** + * Stores information on a particular doctype. + * + * - Attribute validation + * - Relationship access + * + * ```js + * const schema = new Schema({ + * todos: { + * attributes: { + * label: { + * unique: true + * } + * }, + * relationships: { + * author: 'has-one-in-place' + * } + * } + * }, cozyStackClient) + * ``` + */ + + +var Schema = /*#__PURE__*/function () { + /** + * @param {SchemaDefinition} schemaDefinition - Schema for the application documents + * @param {object} client - An instance of cozy client (optional) + */ + function Schema() { + var schemaDefinition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var client = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + (0, _classCallCheck2.default)(this, Schema); + this.byDoctype = {}; + this.add(schemaDefinition); + this.client = client; + } + /** + * @param {SchemaDefinition} schemaDefinition - Additional schema to merge to current schema + */ + + + (0, _createClass2.default)(Schema, [{ + key: "add", + value: function add() { + var schemaDefinition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var normalizedSchemaDefinition = (0, _mapValues.default)(schemaDefinition, function (obj, name) { + return _objectSpread({ + name: name + }, normalizeDoctypeSchema(obj)); + }); + ensureCanBeAdded(Object.values(normalizedSchemaDefinition), Object.values(this.byDoctype)); + (0, _merge.default)(this.byDoctype, (0, _keyBy.default)(normalizedSchemaDefinition, function (x) { + return x.doctype; + })); + } + /** + * Returns the schema for a doctype + * + * Creates an empty schema implicitly if it does not exist + * + * @param {string} doctype - Doctype + */ + + }, { + key: "getDoctypeSchema", + value: function getDoctypeSchema(doctype) { + var schema = this.byDoctype[doctype]; + + if (!schema) { + schema = normalizeDoctypeSchema({ + name: doctype, + doctype: doctype + }); + this.byDoctype[doctype] = schema; + } + + return schema; + } + /** + * Returns the relationship for a given doctype/name + * + * @param {string} doctype - Doctype + * @param {string} relationshipName - Relationship name + */ + + }, { + key: "getRelationship", + value: function getRelationship(doctype, relationshipName) { + if (!doctype) { + throw new TypeError("Invalid doctype ".concat(doctype)); + } + + var schema = this.getDoctypeSchema(doctype); + + if (!schema) { + throw new Error("Cannot find doctype ".concat(doctype, " in schema")); + } + + if (!schema.relationships) { + throw new Error("Schema for doctype ".concat(doctype, " has no relationships")); + } + + return schema.relationships[relationshipName]; + } + /** + * Validates a document considering the descriptions in schema.attributes. + */ + + }, { + key: "validate", + value: function () { + var _validate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(document) { + var errors, schema, n, ret; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + errors = {}; + schema = this.byDoctype[document._type]; + + if (schema) { + _context.next = 4; + break; + } + + return _context.abrupt("return", true); + + case 4: + if (schema.attributes) { + _context.next = 6; + break; + } + + return _context.abrupt("return", true); + + case 6: + _context.t0 = _regenerator.default.keys(schema.attributes); + + case 7: + if ((_context.t1 = _context.t0()).done) { + _context.next = 15; + break; + } + + n = _context.t1.value; + _context.next = 11; + return this.validateAttribute(document, n, schema.attributes[n]); + + case 11: + ret = _context.sent; + if (ret !== true) errors[n] = ret; + _context.next = 7; + break; + + case 15: + if (!(Object.keys(errors).length === 0)) { + _context.next = 17; + break; + } + + return _context.abrupt("return", true); + + case 17: + return _context.abrupt("return", errors); + + case 18: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function validate(_x) { + return _validate.apply(this, arguments); + } + + return validate; + }() + }, { + key: "validateAttribute", + value: function () { + var _validateAttribute = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(document, attrName, attrProps) { + var ret; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!(attrProps.unique && this.client)) { + _context2.next = 6; + break; + } + + _context2.next = 3; + return this.client.collection(document._type).checkUniquenessOf(attrName, document[attrName]); + + case 3: + ret = _context2.sent; + + if (!(ret !== true)) { + _context2.next = 6; + break; + } + + return _context2.abrupt("return", 'must be unique'); + + case 6: + return _context2.abrupt("return", true); + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function validateAttribute(_x2, _x3, _x4) { + return _validateAttribute.apply(this, arguments); + } + + return validateAttribute; + }() + }]); + return Schema; +}(); + +var _default = Schema; +exports.default = _default; + +/***/ }), + +/***/ "wsII": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +/* eslint no-console: ["error", { allow: ["warn", "error"] }] */ +var intentTypeRx = /intent-(.*):(.*)/; +/** + * Listens to `message` DOM events for the specific intent and + * forwards them to callbacks passed in options. + * + * Will throw if an event is received and no ready message + * has been received first. + */ + +var IntentListener = +/*#__PURE__*/ +function () { + function IntentListener(options) { + (0, _classCallCheck2.default)(this, IntentListener); + this.state = { + handshaken: false + }; + this.options = options; + this.handleMessageWrapper = this.handleMessageWrapper.bind(this); + } + + (0, _createClass2.default)(IntentListener, [{ + key: "handleMessage", + value: function handleMessage(event) { + if (event.origin !== this.options.origin) { + return; + } + + var eventType = event.data.type; + + if (eventType === 'load') { + // Safari 9.1 (At least) send a MessageEvent when the iframe loads, + // making the handshake fails. + console.warn && console.warn('Cozy Client ignored MessageEvent having data.type `load`.'); + return; + } + + var parts = intentTypeRx.exec(eventType); + + if (!parts) { + console.warn("intents: Message type ".concat(eventType, " not matching intent format")); + return; + } + + var id = parts[1]; + assert(id == this.options.intentId, 'Invalid event id', "eventId: ".concat(id, " != listener eventId ").concat(this.options.intentId)); + var subtype = parts[2]; + + if (subtype !== 'ready') { + assert(this.state.handshaken, 'Unexpected handshake message from intent service'); + } else { + this.state.handshaken = true; + } + + var handler = this.options['on' + capitalize(subtype)]; + + if (handler) { + return handler(event); + } else { + console.warn("intents: Unhandled event ".concat(subtype)); + } + } + /** + * Primary handler for DOM messages. Passes any thrown error from + * the real message handler to the options.onError callback. + */ + + }, { + key: "handleMessageWrapper", + value: function handleMessageWrapper(ev) { + try { + this.handleMessage(ev); + } catch (e) { + this.options.onError(e); + } + } + }, { + key: "listen", + value: function listen() { + window.addEventListener('message', this.handleMessageWrapper); + } + }, { + key: "stopListening", + value: function stopListening() { + window.removeEventListener('message', this.handleMessageWrapper); + } + }]); + return IntentListener; +}(); + +exports.default = IntentListener; + +var assert = function assert(cond, msg, extraMsg) { + if (!cond) { + if (extraMsg) { + console.warn(extraMsg); + } + + throw new Error(msg); + } +}; + +var capitalize = function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +}; + +/***/ }), + +/***/ "wtRR": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'] + var monthsFull = ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'] + var monthsGenitive = ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'] + var weekdays2char = ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πέ', 'Πα', 'Σά'] + var weekdays3char = ['Κυρ', 'Δευ', 'Τρί', 'Τετ', 'Πέμ', 'Παρ', 'Σάβ'] + var weekdaysFull = ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'] + var meridiemUppercase = ['ΠΜ', 'ΜΜ'] + var meridiemLowercase = ['πμ', 'μμ'] + var meridiemFull = ['π.μ.', 'μ.μ.'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] + } + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalGenders = { + 'M': 'ος', + 'D': 'η', + 'DDD': 'η', + 'd': 'η', + 'Q': 'ο', + 'W': 'η' + } + var ordinalKeys = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalKeys.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return formatters[formatterToken](date) + ordinalGenders[formatterToken] + } + }) + + // Generate genitive variant of full months + var formatsWithGenitive = ['D', 'Do', 'DD'] + formatsWithGenitive.forEach(function (formatterToken) { + formatters[formatterToken + ' MMMM'] = function (date, commonFormatters) { + var formatter = formatters[formatterToken] || commonFormatters[formatterToken] + return formatter(date, commonFormatters) + ' ' + monthsGenitive[date.getMonth()] + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "x//U": +/***/ (function(module, exports, __webpack_require__) { + +var asciiSize = __webpack_require__("JNaP"), + hasUnicode = __webpack_require__("ppUe"), + unicodeSize = __webpack_require__("B8YJ"); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; + + +/***/ }), + +/***/ "x0Kp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c8SR"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _IconButton__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "x0rR": +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__("D8Vt"), + castPath = __webpack_require__("+ERu"), + isIndex = __webpack_require__("9yx8"), + isObject = __webpack_require__("06hQ"), + toKey = __webpack_require__("Iv0v"); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; + + +/***/ }), + +/***/ "x9yZ": +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__("Tusy"); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; + + +/***/ }), + +/***/ "xCs1": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "xDKL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useReduxContext", function() { return useReduxContext; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("umgW"); + + +/** + * A hook to access the value of the `ReactReduxContext`. This is a low-level + * hook that you should usually not need to call directly. + * + * @returns {any} the value of the `ReactReduxContext` + * + * @example + * + * import React from 'react' + * import { useReduxContext } from 'react-redux' + * + * export const CounterComponent = ({ value }) => { + * const { store } = useReduxContext() + * return <div>{store.getState()}</div> + * } + */ + +function useReduxContext() { + var contextValue = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"]); + + if (false) {} + + return contextValue; +} + +/***/ }), + +/***/ "xEu0": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + CozyLink: true, + StackLink: true, + compose: true, + QueryDefinition: true, + Q: true, + Mutations: true, + MutationTypes: true, + getDoctypeFromOperation: true, + Association: true, + HasMany: true, + HasOne: true, + HasOneInPlace: true, + HasManyInPlace: true, + HasManyTriggers: true, + isReferencedBy: true, + isReferencedById: true, + getReferencedBy: true, + getReferencedById: true, + deconstructCozyWebLinkWithSlug: true, + deconstructRedirectLink: true, + dehydrate: true, + generateWebLink: true, + ensureFirstSlash: true, + rootCozyUrl: true, + InvalidRedirectLinkError: true, + InvalidCozyUrlError: true, + InvalidProtocolError: true, + BlockedCozyError: true, + cancelable: true, + isQueryLoading: true, + hasQueryBeenLoaded: true, + getQueryFromState: true, + Registry: true, + RealTimeQueries: true, + manifest: true, + CozyProvider: true, + withMutation: true, + withMutations: true, + Query: true, + queryConnect: true, + queryConnectFlat: true, + withClient: true, + models: true, + fetchPolicies: true, + BulkEditError: true +}; +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _CozyClient.default; + } +}); +Object.defineProperty(exports, "CozyLink", { + enumerable: true, + get: function get() { + return _CozyLink.default; + } +}); +Object.defineProperty(exports, "StackLink", { + enumerable: true, + get: function get() { + return _StackLink.default; + } +}); +Object.defineProperty(exports, "compose", { + enumerable: true, + get: function get() { + return _flow.default; + } +}); +Object.defineProperty(exports, "QueryDefinition", { + enumerable: true, + get: function get() { + return _dsl.QueryDefinition; + } +}); +Object.defineProperty(exports, "Q", { + enumerable: true, + get: function get() { + return _dsl.Q; + } +}); +Object.defineProperty(exports, "Mutations", { + enumerable: true, + get: function get() { + return _dsl.Mutations; + } +}); +Object.defineProperty(exports, "MutationTypes", { + enumerable: true, + get: function get() { + return _dsl.MutationTypes; + } +}); +Object.defineProperty(exports, "getDoctypeFromOperation", { + enumerable: true, + get: function get() { + return _dsl.getDoctypeFromOperation; + } +}); +Object.defineProperty(exports, "Association", { + enumerable: true, + get: function get() { + return _associations.Association; + } +}); +Object.defineProperty(exports, "HasMany", { + enumerable: true, + get: function get() { + return _associations.HasMany; + } +}); +Object.defineProperty(exports, "HasOne", { + enumerable: true, + get: function get() { + return _associations.HasOne; + } +}); +Object.defineProperty(exports, "HasOneInPlace", { + enumerable: true, + get: function get() { + return _associations.HasOneInPlace; + } +}); +Object.defineProperty(exports, "HasManyInPlace", { + enumerable: true, + get: function get() { + return _associations.HasManyInPlace; + } +}); +Object.defineProperty(exports, "HasManyTriggers", { + enumerable: true, + get: function get() { + return _associations.HasManyTriggers; + } +}); +Object.defineProperty(exports, "isReferencedBy", { + enumerable: true, + get: function get() { + return _helpers.isReferencedBy; + } +}); +Object.defineProperty(exports, "isReferencedById", { + enumerable: true, + get: function get() { + return _helpers.isReferencedById; + } +}); +Object.defineProperty(exports, "getReferencedBy", { + enumerable: true, + get: function get() { + return _helpers.getReferencedBy; + } +}); +Object.defineProperty(exports, "getReferencedById", { + enumerable: true, + get: function get() { + return _helpers.getReferencedById; + } +}); +Object.defineProperty(exports, "deconstructCozyWebLinkWithSlug", { + enumerable: true, + get: function get() { + return _helpers2.deconstructCozyWebLinkWithSlug; + } +}); +Object.defineProperty(exports, "deconstructRedirectLink", { + enumerable: true, + get: function get() { + return _helpers2.deconstructRedirectLink; + } +}); +Object.defineProperty(exports, "dehydrate", { + enumerable: true, + get: function get() { + return _helpers2.dehydrate; + } +}); +Object.defineProperty(exports, "generateWebLink", { + enumerable: true, + get: function get() { + return _helpers2.generateWebLink; + } +}); +Object.defineProperty(exports, "ensureFirstSlash", { + enumerable: true, + get: function get() { + return _helpers2.ensureFirstSlash; + } +}); +Object.defineProperty(exports, "rootCozyUrl", { + enumerable: true, + get: function get() { + return _helpers2.rootCozyUrl; + } +}); +Object.defineProperty(exports, "InvalidRedirectLinkError", { + enumerable: true, + get: function get() { + return _helpers2.InvalidRedirectLinkError; + } +}); +Object.defineProperty(exports, "InvalidCozyUrlError", { + enumerable: true, + get: function get() { + return _helpers2.InvalidCozyUrlError; + } +}); +Object.defineProperty(exports, "InvalidProtocolError", { + enumerable: true, + get: function get() { + return _helpers2.InvalidProtocolError; + } +}); +Object.defineProperty(exports, "BlockedCozyError", { + enumerable: true, + get: function get() { + return _helpers2.BlockedCozyError; + } +}); +Object.defineProperty(exports, "cancelable", { + enumerable: true, + get: function get() { + return _utils.cancelable; + } +}); +Object.defineProperty(exports, "isQueryLoading", { + enumerable: true, + get: function get() { + return _utils.isQueryLoading; + } +}); +Object.defineProperty(exports, "hasQueryBeenLoaded", { + enumerable: true, + get: function get() { + return _utils.hasQueryBeenLoaded; + } +}); +Object.defineProperty(exports, "getQueryFromState", { + enumerable: true, + get: function get() { + return _store.getQueryFromState; + } +}); +Object.defineProperty(exports, "Registry", { + enumerable: true, + get: function get() { + return _registry.default; + } +}); +Object.defineProperty(exports, "RealTimeQueries", { + enumerable: true, + get: function get() { + return _RealTimeQueries.default; + } +}); +Object.defineProperty(exports, "CozyProvider", { + enumerable: true, + get: function get() { + return _Provider.default; + } +}); +Object.defineProperty(exports, "withMutation", { + enumerable: true, + get: function get() { + return _withMutation.default; + } +}); +Object.defineProperty(exports, "withMutations", { + enumerable: true, + get: function get() { + return _withMutations.default; + } +}); +Object.defineProperty(exports, "Query", { + enumerable: true, + get: function get() { + return _Query.default; + } +}); +Object.defineProperty(exports, "queryConnect", { + enumerable: true, + get: function get() { + return _hoc.queryConnect; + } +}); +Object.defineProperty(exports, "queryConnectFlat", { + enumerable: true, + get: function get() { + return _hoc.queryConnectFlat; + } +}); +Object.defineProperty(exports, "withClient", { + enumerable: true, + get: function get() { + return _hoc.withClient; + } +}); +Object.defineProperty(exports, "fetchPolicies", { + enumerable: true, + get: function get() { + return _policies.default; + } +}); +Object.defineProperty(exports, "BulkEditError", { + enumerable: true, + get: function get() { + return _errors.BulkEditError; + } +}); +exports.models = exports.manifest = void 0; + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +var _CozyLink = _interopRequireDefault(__webpack_require__("sV2q")); + +var _StackLink = _interopRequireDefault(__webpack_require__("lpkQ")); + +var _flow = _interopRequireDefault(__webpack_require__("cIqN")); + +var _dsl = __webpack_require__("v2kV"); + +var _associations = __webpack_require__("Suxc"); + +var _helpers = __webpack_require__("0Do6"); + +var _helpers2 = __webpack_require__("Eg6m"); + +var _utils = __webpack_require__("NWak"); + +var _store = __webpack_require__("6mdx"); + +var _registry = _interopRequireDefault(__webpack_require__("J3p3")); + +var _RealTimeQueries = _interopRequireDefault(__webpack_require__("zgTX")); + +var manifest = _interopRequireWildcard(__webpack_require__("y2NW")); + +exports.manifest = manifest; + +var _Provider = _interopRequireDefault(__webpack_require__("8tCe")); + +var _withMutation = _interopRequireDefault(__webpack_require__("CZlL")); + +var _withMutations = _interopRequireDefault(__webpack_require__("ZUXf")); + +var _Query = _interopRequireDefault(__webpack_require__("bkoc")); + +var _hoc = __webpack_require__("zt9a"); + +var models = _interopRequireWildcard(__webpack_require__("g4Ul")); + +exports.models = models; + +var _policies = _interopRequireDefault(__webpack_require__("lRSd")); + +var _mock = __webpack_require__("mFeQ"); + +Object.keys(_mock).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _mock[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _mock[key]; + } + }); +}); + +var _hooks = __webpack_require__("bAmC"); + +Object.keys(_hooks).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _hooks[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _hooks[key]; + } + }); +}); + +var _errors = __webpack_require__("73Z9"); + +/***/ }), + +/***/ "xHCa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.shouldXMLHTTPRequestBeUsed = exports.fetchWithXMLHttpRequest = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("XkwL")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _memoize = _interopRequireDefault(__webpack_require__("euuj")); + +var headersFromString = function headersFromString(headerString) { + return new Headers(headerString.split('\r\n').map(function (x) { + return x.split(':', 2); + }).filter(function (x) { + return x.length == 2; + })); +}; +/** + * Returns a `fetch()` like response but uses XHR. + * XMLHTTPRequest provides upload progress events unlike fetch. + * + * @private + * @param {string} fullpath - Route path + * @param {object} options - Fetch options + * @param {Function} options.onUploadProgress - Callback to receive upload progress events + */ + + +var fetchWithXMLHttpRequest = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(fullpath, options) { + var response; + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + + if (options.onUploadProgress && xhr.upload) { + xhr.upload.addEventListener('progress', options.onUploadProgress, false); + } + + xhr.onload = function () { + if (this.readyState == 4) { + resolve(this); + } else { + reject(this); + } + }; + + xhr.onerror = function (err) { + reject(err); + }; + + xhr.open(options.method, fullpath, true); + xhr.withCredentials = true; + + for (var _i = 0, _Object$entries = Object.entries(options.headers); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2), + headerName = _Object$entries$_i[0], + headerValue = _Object$entries$_i[1]; + + xhr.setRequestHeader(headerName, headerValue); + } + + xhr.send(options.body); + }); + + case 2: + response = _context3.sent; + return _context3.abrupt("return", { + headers: headersFromString(response.getAllResponseHeaders()), + ok: response.status >= 200 && response.status < 300, + text: function () { + var _text = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", response.responseText); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function text() { + return _text.apply(this, arguments); + } + + return text; + }(), + json: function () { + var _json = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", JSON.parse(response.responseText)); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function json() { + return _json.apply(this, arguments); + } + + return json; + }(), + status: response.status, + statusText: response.statusText + }); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function fetchWithXMLHttpRequest(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +exports.fetchWithXMLHttpRequest = fetchWithXMLHttpRequest; +var doesXHRSupportLoadAndProgress = (0, _memoize.default)(function () { + var xhr = new XMLHttpRequest(); + return 'onload' in xhr && 'onprogress' in xhr; +}); + +var shouldXMLHTTPRequestBeUsed = function shouldXMLHTTPRequestBeUsed(method, path, options) { + return Boolean(options.onUploadProgress) && doesXHRSupportLoadAndProgress(); +}; + +exports.shouldXMLHTTPRequestBeUsed = shouldXMLHTTPRequestBeUsed; + +/***/ }), + +/***/ "xIul": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__("cwpO"); +} else {} + + +/***/ }), + +/***/ "xOGQ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reflow", function() { return reflow; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTransitionProps", function() { return getTransitionProps; }); +var reflow = function reflow(node) { + return node.scrollTop; +}; +function getTransitionProps(props, options) { + var timeout = props.timeout, + _props$style = props.style, + style = _props$style === void 0 ? {} : _props$style; + return { + duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0, + delay: style.transitionDelay + }; +} + +/***/ }), + +/***/ "xPkG": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { + "use strict"; + + if (global.setImmediate) { + return; + } + + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var registerImmediate; + + function setImmediate(callback) { + // Callback can either be a function or a string + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + // Copy function arguments + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + // Store and register the task + var task = { callback: callback, args: args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } + + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined, args); + break; + } + } + + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function () { runIfPresent(handle); }); + }; + } + + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages + + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } + + registerImmediate = function(handle) { + global.postMessage(messagePrefix + handle, "*"); + }; + } + + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } + + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted + // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. + var script = doc.createElement("script"); + script.onreadystatechange = function () { + runIfPresent(handle); + script.onreadystatechange = null; + html.removeChild(script); + script = null; + }; + html.appendChild(script); + }; + } + + function installSetTimeoutImplementation() { + registerImmediate = function(handle) { + setTimeout(runIfPresent, 0, handle); + }; + } + + // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. + var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); + attachTo = attachTo && attachTo.setTimeout ? attachTo : global; + + // Don't get fooled by e.g. browserify environments. + if ({}.toString.call(global.process) === "[object process]") { + // For Node.js before 0.9 + installNextTickImplementation(); + + } else if (canUsePostMessage()) { + // For non-IE10 modern browsers + installPostMessageImplementation(); + + } else if (global.MessageChannel) { + // For web workers, where supported + installMessageChannelImplementation(); + + } else if (doc && "onreadystatechange" in doc.createElement("script")) { + // For IE 6–8 + installReadyStateChangeImplementation(); + + } else { + // For older browsers + installSetTimeoutImplementation(); + } + + attachTo.setImmediate = setImmediate; + attachTo.clearImmediate = clearImmediate; +}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self)); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("aY11"), __webpack_require__("JtWf"))) + +/***/ }), + +/***/ "xTjC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $String = GetIntrinsic('%String%'); +var $TypeError = GetIntrinsic('%TypeError%'); + +// https://ecma-international.org/ecma-262/6.0/#sec-tostring + +module.exports = function ToString(argument) { + if (typeof argument === 'symbol') { + throw new $TypeError('Cannot convert a Symbol value to a string'); + } + return $String(argument); +}; + + +/***/ }), + +/***/ "xTjI": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closeSession", function() { return closeSession; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSession", function() { return makeSession; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSession", function() { return updateSession; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aUjI"); + + +/** + * Creates a new `Session` object by setting certain default parameters. If optional @param context + * is passed, the passed properties are applied to the session object. + * + * @param context (optional) additional properties to be applied to the returned session object + * + * @returns a new `Session` object + */ +function makeSession(context) { + // Both timestamp and started are in seconds since the UNIX epoch. + const startingTime = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["timestampInSeconds"])(); + + const session = { + sid: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["uuid4"])(), + init: true, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: 'ok', + errors: 0, + ignoreDuration: false, + toJSON: () => sessionToJSON(session), + }; + + if (context) { + updateSession(session, context); + } + + return session; +} + +/** + * Updates a session object with the properties passed in the context. + * + * Note that this function mutates the passed object and returns void. + * (Had to do this instead of returning a new and updated session because closing and sending a session + * makes an update to the session after it was passed to the sending logic. + * @see BaseClient.captureSession ) + * + * @param session the `Session` to update + * @param context the `SessionContext` holding the properties that should be updated in @param session + */ +// eslint-disable-next-line complexity +function updateSession(session, context = {}) { + if (context.user) { + if (!session.ipAddress && context.user.ip_address) { + session.ipAddress = context.user.ip_address; + } + + if (!session.did && !context.did) { + session.did = context.user.id || context.user.email || context.user.username; + } + } + + session.timestamp = context.timestamp || Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["timestampInSeconds"])(); + + if (context.ignoreDuration) { + session.ignoreDuration = context.ignoreDuration; + } + if (context.sid) { + // Good enough uuid validation. — Kamil + session.sid = context.sid.length === 32 ? context.sid : Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["uuid4"])(); + } + if (context.init !== undefined) { + session.init = context.init; + } + if (!session.did && context.did) { + session.did = `${context.did}`; + } + if (typeof context.started === 'number') { + session.started = context.started; + } + if (session.ignoreDuration) { + session.duration = undefined; + } else if (typeof context.duration === 'number') { + session.duration = context.duration; + } else { + const duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; + } + if (context.release) { + session.release = context.release; + } + if (context.environment) { + session.environment = context.environment; + } + if (!session.ipAddress && context.ipAddress) { + session.ipAddress = context.ipAddress; + } + if (!session.userAgent && context.userAgent) { + session.userAgent = context.userAgent; + } + if (typeof context.errors === 'number') { + session.errors = context.errors; + } + if (context.status) { + session.status = context.status; + } +} + +/** + * Closes a session by setting its status and updating the session object with it. + * Internally calls `updateSession` to update the passed session object. + * + * Note that this function mutates the passed session (@see updateSession for explanation). + * + * @param session the `Session` object to be closed + * @param status the `SessionStatus` with which the session was closed. If you don't pass a status, + * this function will keep the previously set status, unless it was `'ok'` in which case + * it is changed to `'exited'`. + */ +function closeSession(session, status) { + let context = {}; + if (status) { + context = { status }; + } else if (session.status === 'ok') { + context = { status: 'exited' }; + } + + updateSession(session, context); +} + +/** + * Serializes a passed session object to a JSON object with a slightly different structure. + * This is necessary because the Sentry backend requires a slightly different schema of a session + * than the one the JS SDKs use internally. + * + * @param session the session to be converted + * + * @returns a JSON object of the passed session + */ +function sessionToJSON(session) { + return Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["dropUndefinedKeys"])({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1000).toISOString(), + timestamp: new Date(session.timestamp * 1000).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined, + duration: session.duration, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent, + }, + }); +} + + +//# sourceMappingURL=session.js.map + + +/***/ }), + +/***/ "xUYW": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dsnFromString", function() { return dsnFromString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dsnToString", function() { return dsnToString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeDsn", function() { return makeDsn; }); +/* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("FSf8"); + + +/** Regular expression used to parse a Dsn. */ +const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + +function isValidProtocol(protocol) { + return protocol === 'http' || protocol === 'https'; +} + +/** + * Renders the string representation of this Dsn. + * + * By default, this will render the public representation without the password + * component. To get the deprecated private representation, set `withPassword` + * to true. + * + * @param withPassword When set to true, the password will be included. + */ +function dsnToString(dsn, withPassword = false) { + const { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return ( + `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` + + `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}` + ); +} + +/** + * Parses a Dsn from a given string. + * + * @param str A Dsn as string + * @returns Dsn as DsnComponents + */ +function dsnFromString(str) { + const match = DSN_REGEX.exec(str); + + if (!match) { + throw new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`Invalid Sentry Dsn: ${str}`); + } + + const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1); + let path = ''; + let projectId = lastPath; + + const split = projectId.split('/'); + if (split.length > 1) { + path = split.slice(0, -1).join('/'); + projectId = split.pop() ; + } + + if (projectId) { + const projectMatch = projectId.match(/^\d+/); + if (projectMatch) { + projectId = projectMatch[0]; + } + } + + return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey }); +} + +function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || '', + pass: components.pass || '', + host: components.host, + port: components.port || '', + path: components.path || '', + projectId: components.projectId, + }; +} + +function validateDsn(dsn) { + if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) { + return; + } + + const { port, projectId, protocol } = dsn; + + const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId']; + requiredComponents.forEach(component => { + if (!dsn[component]) { + throw new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`Invalid Sentry Dsn: ${component} missing`); + } + }); + + if (!projectId.match(/^\d+$/)) { + throw new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`Invalid Sentry Dsn: Invalid projectId ${projectId}`); + } + + if (!isValidProtocol(protocol)) { + throw new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`Invalid Sentry Dsn: Invalid protocol ${protocol}`); + } + + if (port && isNaN(parseInt(port, 10))) { + throw new _error_js__WEBPACK_IMPORTED_MODULE_0__["SentryError"](`Invalid Sentry Dsn: Invalid port ${port}`); + } + + return true; +} + +/** The Sentry Dsn, identifying a Sentry instance and project. */ +function makeDsn(from) { + const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from); + validateDsn(components); + return components; +} + + +//# sourceMappingURL=dsn.js.map + + +/***/ }), + +/***/ "xWNZ": +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__("S+LB"), + root = __webpack_require__("GMq6"); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; + + +/***/ }), + +/***/ "xWW7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +let Mime = __webpack_require__("Y/JY"); +module.exports = new Mime(__webpack_require__("epYH")); + + +/***/ }), + +/***/ "xXd7": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ScreenType = void 0; +var ScreenType; +exports.ScreenType = ScreenType; +(function (ScreenType) { + ScreenType[ScreenType["MOBILE"] = 0] = "MOBILE"; + ScreenType[ScreenType["TABLET"] = 1] = "TABLET"; + ScreenType[ScreenType["DESKTOP"] = 2] = "DESKTOP"; +})(ScreenType || (exports.ScreenType = ScreenType = {})); + +/***/ }), + +/***/ "xf3R": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Xqvq"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("OY/u"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("fWYq"); +/* harmony import */ var _Drawer_Drawer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fIGU"); + + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'fixed', + top: 0, + left: 0, + bottom: 0, + zIndex: theme.zIndex.drawer - 1 + }, + anchorLeft: { + right: 'auto' + }, + anchorRight: { + left: 'auto', + right: 0 + }, + anchorTop: { + bottom: 'auto', + right: 0 + }, + anchorBottom: { + top: 'auto', + bottom: 0, + right: 0 + } + }; +}; +/** + * @ignore - internal component. + */ + +var SwipeArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function SwipeArea(props, ref) { + var anchor = props.anchor, + classes = props.classes, + className = props.className, + width = props.width, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(props, ["anchor", "classes", "className", "width"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, classes["anchor".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__["default"])(anchor))], className), + ref: ref, + style: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])({}, Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_8__["isHorizontal"])(anchor) ? 'width' : 'height', width) + }, other)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'PrivateSwipeArea' +})(SwipeArea)); + +/***/ }), + +/***/ "xfUo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pSEq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Card__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "xgvS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basename", function() { return basename; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dirname", function() { return dirname; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isAbsolute", function() { return isAbsolute; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "join", function() { return join; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizePath", function() { return normalizePath; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relative", function() { return relative; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolve", function() { return resolve; }); +// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript +// https://raw.githubusercontent.com/calvinmetcalf/rollup-plugin-node-builtins/master/src/es6/path.js + +/** JSDoc */ +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + const last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + // eslint-disable-next-line no-plusplus + up++; + } else if (up) { + parts.splice(i, 1); + // eslint-disable-next-line no-plusplus + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + // eslint-disable-next-line no-plusplus + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +const splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/; +/** JSDoc */ +function splitPath(filename) { + const parts = splitPathRe.exec(filename); + return parts ? parts.slice(1) : []; +} + +// path.resolve([from ...], to) +// posix version +/** JSDoc */ +function resolve(...args) { + let resolvedPath = ''; + let resolvedAbsolute = false; + + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + const path = i >= 0 ? args[i] : '/'; + + // Skip empty entries + if (!path) { + continue; + } + + resolvedPath = `${path}/${resolvedPath}`; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray( + resolvedPath.split('/').filter(p => !!p), + !resolvedAbsolute, + ).join('/'); + + return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; +} + +/** JSDoc */ +function trim(arr) { + let start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') { + break; + } + } + + let end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') { + break; + } + } + + if (start > end) { + return []; + } + return arr.slice(start, end - start + 1); +} + +// path.relative(from, to) +// posix version +/** JSDoc */ +function relative(from, to) { + /* eslint-disable no-param-reassign */ + from = resolve(from).substr(1); + to = resolve(to).substr(1); + /* eslint-enable no-param-reassign */ + + const fromParts = trim(from.split('/')); + const toParts = trim(to.split('/')); + + const length = Math.min(fromParts.length, toParts.length); + let samePartsLength = length; + for (let i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +} + +// path.normalize(path) +// posix version +/** JSDoc */ +function normalizePath(path) { + const isPathAbsolute = isAbsolute(path); + const trailingSlash = path.substr(-1) === '/'; + + // Normalize the path + let normalizedPath = normalizeArray( + path.split('/').filter(p => !!p), + !isPathAbsolute, + ).join('/'); + + if (!normalizedPath && !isPathAbsolute) { + normalizedPath = '.'; + } + if (normalizedPath && trailingSlash) { + normalizedPath += '/'; + } + + return (isPathAbsolute ? '/' : '') + normalizedPath; +} + +// posix version +/** JSDoc */ +function isAbsolute(path) { + return path.charAt(0) === '/'; +} + +// posix version +/** JSDoc */ +function join(...args) { + return normalizePath(args.join('/')); +} + +/** JSDoc */ +function dirname(path) { + const result = splitPath(path); + const root = result[0]; + let dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +} + +/** JSDoc */ +function basename(path, ext) { + let f = splitPath(path)[2]; + if (ext && f.substr(ext.length * -1) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +} + + +//# sourceMappingURL=path.js.map + + +/***/ }), + +/***/ "xl7M": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"), + arrayMap = __webpack_require__("4FGL"), + isArray = __webpack_require__("8u9v"), + isSymbol = __webpack_require__("+IXE"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; + + +/***/ }), + +/***/ "xlIW": +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__("gOYI"), + Uint8Array = __webpack_require__("m0eP"), + eq = __webpack_require__("lBlV"), + equalArrays = __webpack_require__("0/NE"), + mapToArray = __webpack_require__("dWv3"), + setToArray = __webpack_require__("4Fdj"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; + + +/***/ }), + +/***/ "xm2r": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _useScrollTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("O2+V"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _useScrollTrigger__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "xomR": +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__("ETne"); +var core = __webpack_require__("WSXa"); +var LIBRARY = __webpack_require__("RqGj"); +var wksExt = __webpack_require__("QtKs"); +var defineProperty = __webpack_require__("GwHQ").f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), + +/***/ "xww6": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("NeVb"); + + + + + + + +var styles = { + /* Styles applied to the root element. */ + root: { + // Improve scrollable dialog support. + zIndex: -1, + position: 'fixed', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + right: 0, + bottom: 0, + top: 0, + left: 0, + backgroundColor: 'rgba(0, 0, 0, 0.5)', + WebkitTapHighlightColor: 'transparent' + }, + + /* Styles applied to the root element if `invisible={true}`. */ + invisible: { + backgroundColor: 'transparent' + } +}; +var Backdrop = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Backdrop(props, ref) { + var children = props.children, + classes = props.classes, + className = props.className, + _props$invisible = props.invisible, + invisible = _props$invisible === void 0 ? false : _props$invisible, + open = props.open, + transitionDuration = props.transitionDuration, + _props$TransitionComp = props.TransitionComponent, + TransitionComponent = _props$TransitionComp === void 0 ? _Fade__WEBPACK_IMPORTED_MODULE_6__["default"] : _props$TransitionComp, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "invisible", "open", "transitionDuration", "TransitionComponent"]); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + in: open, + timeout: transitionDuration + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, invisible && classes.invisible), + "aria-hidden": true, + ref: ref + }, children)); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiBackdrop' +})(Backdrop)); + +/***/ }), + +/***/ "xxXf": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getIconURL = exports.default = exports._getIconURL = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _types = __webpack_require__("uBBm"); + +var _memoize = _interopRequireWildcard(__webpack_require__("6X5L")); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +/** + * Get Icon source Url + * + * @param {object} app - Apps data - io.cozy.apps + * @param {string} slug - Slug - string + * @param {string|undefined} domain - Host to use in the origin (e.g. cozy.tools) + * @param {string} protocol - Url protocol (e.g. http / https) + * @returns {string} Source Url of icon + * @private + * @throws {Error} When cannot fetch or get icon source + */ +var loadIcon = function loadIcon(app, slug, domain, protocol) { + if (!domain) throw new Error('Cannot fetch icon: missing domain'); + + var source = _getAppIconURL(app, slug, domain, protocol); + + if (!source) { + throw new Error("Cannot get icon source for app ".concat(app.name)); + } + + return source; +}; +/** + * Get App Icon URL + * + * @param {object} app - Apps data - io.cozy.apps or Slug - string + * @param {string} slug - Slug - string + * @param {string|undefined} domain - Host to use in the origin (e.g. cozy.tools) + * @param {string} protocol - Url protocol (e.g. http / https) + * @private + * @returns {string|null} App Icon URL + */ + + +var _getAppIconURL = function _getAppIconURL(app, slug, domain, protocol) { + var path = app && app.links && app.links.icon || _getRegistryIconPath(app, slug); + + return path ? "".concat(protocol, "//").concat(domain).concat(path) : null; +}; +/** + * Get Registry Icon Path + * + * @param {object} app - Apps data - io.cozy.apps or Slug - string + * @param {string} slug - Slug - string + * @returns {string|undefined} Registry icon path + * @private + */ + + +var _getRegistryIconPath = function _getRegistryIconPath(app, slug) { + if (slug) { + return "/registry/".concat(slug, "/icon"); + } + + return app && app.latest_version && app.latest_version.version && "/registry/".concat(app.slug, "/").concat(app.latest_version.version, "/icon"); +}; + +var mimeTypes = { + gif: 'image/gif', + ico: 'image/vnd.microsoft.icon', + jpeg: 'image/jpeg', + jpg: 'image/jpeg', + png: 'image/png', + svg: 'image/svg+xml' +}; +/** + * Get icon extension + * + * @param {object} app io.cozy.apps or io.cozy.konnectors document + * @param {string} app.icon - App Icon + * @param {string} app.name - App Name + * @returns {string} icon extension + * @private + * @throws {Error} When problem while detecting icon mime type + */ + +var getIconExtensionFromApp = function getIconExtensionFromApp(app) { + if (!app.icon) { + throw new Error("".concat(app.name, ": Cannot detect icon mime type since app has no icon")); + } + + var extension = app.icon.split('.').pop(); + + if (!extension) { + throw new Error("".concat(app.name, ": Unable to detect icon mime type from extension (").concat(app.icon, ")")); + } + + return extension; +}; + +var fallbacks = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(tries, check) { + var err, _iterator, _step, _try, res; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _iterator = _createForOfIteratorHelper(tries); + _context.prev = 1; + + _iterator.s(); + + case 3: + if ((_step = _iterator.n()).done) { + _context.next = 18; + break; + } + + _try = _step.value; + _context.prev = 5; + _context.next = 8; + return _try(); + + case 8: + res = _context.sent; + check && check(res); + return _context.abrupt("return", res); + + case 13: + _context.prev = 13; + _context.t0 = _context["catch"](5); + err = _context.t0; + + case 16: + _context.next = 3; + break; + + case 18: + _context.next = 23; + break; + + case 20: + _context.prev = 20; + _context.t1 = _context["catch"](1); + + _iterator.e(_context.t1); + + case 23: + _context.prev = 23; + + _iterator.f(); + + return _context.finish(23); + + case 26: + throw err; + + case 27: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 20, 23, 26], [5, 13]]); + })); + + return function fallbacks(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Fetch application/konnector that is installed + * + * @private + */ + + +var fetchAppOrKonnector = function fetchAppOrKonnector(stackClient, type, slug) { + return stackClient.fetchJSON('GET', "/".concat(type, "s/").concat(slug)).then(function (x) { + return x.data.attributes; + }); +}; +/** + * Fetch application/konnector from the registry + * + * @private + */ + + +var fetchAppOrKonnectorViaRegistry = function fetchAppOrKonnectorViaRegistry(stackClient, type, slug) { + return stackClient.fetchJSON('GET', "/registry/".concat(slug)).then(function (x) { + return x.latest_version.manifest; + }); +}; +/** + * Get Icon URL using blob mechanism if OAuth connected + * or using preloaded url when blob not needed + * + * @param {CozyStackClient} stackClient - CozyStackClient + * @param {object} opts - Options + * @param {string} opts.type - Options type + * @param {string|undefined} opts.slug - Options slug + * @param {object|string|undefined} opts.appData - Apps data - io.cozy.apps + * @param {string} [opts.priority='stack'] - Options priority + * @returns {Promise<string>} DOMString containing URL source or a URL representing the Blob . + * @private + * @throws {Error} while fetching icon, or unknown image extension + */ + + +var _getIconURL = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(stackClient, opts) { + var type, slug, appData, _opts$priority, priority, iconDataFetchers, resp, icon, app, appDataFetchers, ext, _URL, domain, protocol; + + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + type = opts.type, slug = opts.slug, appData = opts.appData, _opts$priority = opts.priority, priority = _opts$priority === void 0 ? 'stack' : _opts$priority; + + if (!stackClient.oauthOptions) { + _context2.next = 29; + break; + } + + iconDataFetchers = [function () { + return stackClient.fetch('GET', "/".concat(type, "s/").concat(slug, "/icon")); + }, function () { + return stackClient.fetch('GET', "/registry/".concat(slug, "/icon")); + }]; + + if (priority === 'registry') { + iconDataFetchers.reverse(); + } + + _context2.next = 6; + return fallbacks(iconDataFetchers, function (resp) { + if (!resp.ok) { + throw new Error("Error while fetching icon ".concat(resp.statusText)); + } + }); + + case 6: + resp = _context2.sent; + _context2.next = 9; + return resp.blob(); + + case 9: + icon = _context2.sent; + + if (icon.type) { + _context2.next = 26; + break; + } + + // iOS10 does not set correctly mime type for images, so we assume + // that an empty mime type could mean that the app is running on iOS10. + // For regular images like jpeg, png or gif it still works well in the + // Safari browser but not for SVG. + // So let's set a mime type manually. We cannot always set it to + // image/svg+xml and must guess the mime type based on the icon attribute + // from app/manifest + // See https://stackoverflow.com/questions/38318411/uiwebview-on-ios-10-beta-not-loading-any-svg-images + appDataFetchers = [function () { + return fetchAppOrKonnector(stackClient, type, slug); + }, function () { + return fetchAppOrKonnectorViaRegistry(stackClient, type, slug); + }]; + + if (priority === 'registry') { + appDataFetchers.reverse(); + } + + _context2.t1 = appData; + + if (_context2.t1) { + _context2.next = 18; + break; + } + + _context2.next = 17; + return fallbacks(appDataFetchers); + + case 17: + _context2.t1 = _context2.sent; + + case 18: + _context2.t0 = _context2.t1; + + if (_context2.t0) { + _context2.next = 21; + break; + } + + _context2.t0 = {}; + + case 21: + app = _context2.t0; + ext = getIconExtensionFromApp(app); + + if (mimeTypes[ext]) { + _context2.next = 25; + break; + } + + throw new Error("Unknown image extension \"".concat(ext, "\" for app ").concat(app.name)); + + case 25: + icon = new Blob([icon], { + type: mimeTypes[ext] + }); + + case 26: + return _context2.abrupt("return", URL.createObjectURL(icon)); + + case 29: + _context2.prev = 29; + _URL = new URL(stackClient.uri), domain = _URL.host, protocol = _URL.protocol; + return _context2.abrupt("return", loadIcon(appData, slug, domain, protocol)); + + case 34: + _context2.prev = 34; + _context2.t2 = _context2["catch"](29); + throw new Error("Cannot fetch icon: invalid stackClient.uri: ".concat(_context2.t2.message)); + + case 37: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[29, 34]]); + })); + + return function _getIconURL(_x3, _x4) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Get Icon URL using blob mechanism if OAuth connected + * or using preloaded url when blob not needed + * + */ + + +exports._getIconURL = _getIconURL; + +var getIconURL = function getIconURL() { + return _getIconURL.apply(this, arguments).catch(function () { + return new _memoize.ErrorReturned(); + }); +}; + +exports.getIconURL = getIconURL; + +var _default = (0, _memoize.default)(getIconURL, { + maxDuration: 300 * 1000, + key: function key(stackClient, opts) { + var type = opts.type, + slug = opts.slug, + priority = opts.priority; + return stackClient.uri + +':' + type + ':' + slug + ':' + priority; + } +}); + +exports.default = _default; + +/***/ }), + +/***/ "y+wm": +/***/ (function(module, exports, __webpack_require__) { + +var buildDistanceInWordsLocale = __webpack_require__("rXT6") +var buildFormatLocale = __webpack_require__("6c7I") + +/** + * @category Locales + * @summary Belarusian locale. + * @author Martin Wind [@arvigeus]{@link https://github.com/mawi12345} + */ +module.exports = { + distanceInWords: buildDistanceInWordsLocale(), + format: buildFormatLocale() +} + + +/***/ }), + +/***/ "y0wq": +/***/ (function(module, exports, __webpack_require__) { + +var debounce = __webpack_require__("Mx+G"), + isObject = __webpack_require__("06hQ"); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +module.exports = throttle; + + +/***/ }), + +/***/ "y2NW": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.sanitizeCategories = sanitizeCategories; +exports.areTermsValid = areTermsValid; +exports.isPartnershipValid = isPartnershipValid; +exports.sanitize = sanitize; +exports.getIdentifier = exports.sanitizeIdentifier = exports.legacyLoginFields = exports.ROLE_IDENTIFIER = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _flow2 = _interopRequireDefault(__webpack_require__("cIqN")); + +var _cloneDeep2 = _interopRequireDefault(__webpack_require__("IW7p")); + +var _findKey = _interopRequireDefault(__webpack_require__("fb/G")); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +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); } + +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; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var ROLE_IDENTIFIER = 'identifier'; +/** + * Legacy login fields declared by some konnectors + */ + +exports.ROLE_IDENTIFIER = ROLE_IDENTIFIER; +var legacyLoginFields = ['login', 'identifier', 'new_identifier', 'email']; +exports.legacyLoginFields = legacyLoginFields; +var legacyEncryptedFields = ['secret', 'dob', 'code', 'answer', 'access_token', 'refresh_token', 'appSecret']; +var APP_CATEGORIES = ['banking', 'cozy', 'energy', 'health', 'host_provider', 'insurance', 'isp', 'mes_infos', 'online_services', 'others', 'partners', 'press', 'productivity', 'ptnb', 'public_service', 'shopping', 'social', 'telecom', 'transport']; +/** + * Filters unauthorized categories. Defaults to ['others'] if no suitable category. + * + * @param {Array<Object>} categories - Array of categories + * @returns {Array<Object>} sanitized categories + */ + +function sanitizeCategories(categories) { + if (!categories) return ['others']; + var filteredList = categories.filter(function (c) { + return APP_CATEGORIES.includes(c); + }); + if (!filteredList.length) return ['others']; + return filteredList; +} + +function areTermsValid(terms) { + return Boolean(terms && terms.id && terms.url && terms.version); +} + +function isPartnershipValid(partnership) { + return Boolean(partnership && partnership.description); +} +/** + * Normalize app manifest, retro-compatibility for old manifests + * + * @param {import('../types').Manifest} manifest - app manifest to normalize + * @returns {import('../types').SanitizedManifest} + */ + + +function sanitize(manifest) { + var sanitized = _objectSpread({}, manifest); // Make categories an array and delete category attribute if it exists + + + if (!manifest.categories && manifest.category && typeof manifest.category === 'string') { + sanitized.categories = [manifest.category]; + delete sanitized.category; + } + + sanitized.categories = sanitizeCategories(sanitized.categories); // manifest name is not an object + + if (typeof manifest.name === 'object') sanitized.name = manifest.name.en; // Fix camelCase from cozy-stack + + if (manifest.available_version) { + sanitized.availableVersion = manifest.available_version; + delete sanitized.available_version; + } // Fix camelCase from cozy-stack + + + if (manifest.latest_version) { + sanitized.latestVersion = manifest.latestVersion; + delete sanitized.latest_version; + } // Remove invalid terms + + + if (sanitized.terms && !areTermsValid(sanitized.terms)) { + delete sanitized.terms; + } // Remove invalid partnership + + + if (sanitized.partnership && !isPartnershipValid(sanitized.partnership)) { + delete sanitized.partnership; + } + + if (sanitized.fields) { + sanitized.fields = sanitizeFields(manifest.fields); + } + + return sanitized; +} +/** + * Ensures that fields has at least one field with the role 'identifier' + * + * @param {import('../types').ManifestFields} fields - Manifest fields + * @returns {import('../types').ManifestFields} - Sanitized manifest fields + */ + + +var sanitizeIdentifier = function sanitizeIdentifier(fields) { + var sanitized = (0, _cloneDeep2.default)(fields); + var hasIdentifier = false; + + for (var fieldName in sanitized) { + if (sanitized[fieldName].role === ROLE_IDENTIFIER) { + if (hasIdentifier) delete sanitized[fieldName].role;else hasIdentifier = true; + } + } + + if (hasIdentifier) return sanitized; + + var _iterator = _createForOfIteratorHelper(legacyLoginFields), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var name = _step.value; + + if (sanitized[name]) { + sanitized[name].role = ROLE_IDENTIFIER; + return sanitized; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + for (var _fieldName in sanitized) { + if (sanitized[_fieldName].type !== 'password') { + sanitized[_fieldName].role = ROLE_IDENTIFIER; + return sanitized; + } + } + + return sanitized; +}; +/** + * Returns the key for the field having the role=identifier attribute + * + * @param {import('../types').ManifestFields} fields Konnector fields + * @returns {String|null} The key for the identifier field, example 'login' + */ + + +exports.sanitizeIdentifier = sanitizeIdentifier; + +var getIdentifier = function getIdentifier() { + var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return (0, _findKey.default)(sanitizeIdentifier(fields), function (field) { + return field.role === ROLE_IDENTIFIER; + }) || null; +}; +/** + * Ensures old fields are removed + * + * @param {Object} fields Manifest fields + * @returns {Object} Sanitized manifest fields + */ + + +exports.getIdentifier = getIdentifier; + +var removeOldFields = function removeOldFields(fields) { + var sanitized = (0, _cloneDeep2.default)(fields); + delete sanitized.advancedFields; + return sanitized; +}; +/** + * Ensures every field not explicitely tagged as not required is required + * + * @param {import('../types').ManifestFields} [fields={}] Manifest fields + * @returns {import('../types').ManifestFields} Sanitized manifest fields + */ + + +var sanitizeRequired = function sanitizeRequired(fields) { + var sanitized = (0, _cloneDeep2.default)(fields); + + for (var fieldName in sanitized) { + var field = sanitized[fieldName]; // Ensure legacy for field isRequired + + var required = typeof field.required === 'undefined' ? field.isRequired : field.required; + sanitized[fieldName].required = typeof required === 'boolean' ? required : true; + } + + return sanitized; +}; +/** + * Ensures: + * * any field flagged as encrypted keeps its flag + * * any legacy encrypted field is tagged as encrypted + * + * @param {import('../types').ManifestFields} [fields={}] Manifest fields + * @returns {import('../types').ManifestFields} Sanitized Manifest fields + */ + + +var sanitizeEncrypted = function sanitizeEncrypted(fields) { + var sanitized = (0, _cloneDeep2.default)(fields); + + for (var fieldName in sanitized) { + var field = sanitized[fieldName]; + if (typeof field.encrypted !== 'boolean') field.encrypted = field.type === 'password' || legacyEncryptedFields.includes(fieldName); + } + + return sanitized; +}; +/** + * Sanitizes manifest fields with multiple rules + * + * @param {import('../types').ManifestFields} [fields={}] Manifest fields + * @returns {import('../types').ManifestFields} Sanitized manifest fields + */ + + +var sanitizeFields = (0, _flow2.default)([removeOldFields, sanitizeIdentifier, sanitizeRequired, sanitizeEncrypted]); + +/***/ }), + +/***/ "y4fA": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu'] + var monthsFull = ['tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu'] + var weekdays2char = ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'] + var weekdaysFull = ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'] + + // In Finnish `a.m.` / `p.m.` are virtually never used, but it seems `AP` (aamupäivä) / `IP` (iltapäivä) are acknowleded terms: + // https://fi.wikipedia.org/wiki/24_tunnin_kello + function meridiem (date) { + return date.getHours() < 12 ? 'AP' : 'IP' + } + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + // Finnish doesn't use two-char weekdays + return weekdays2char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': meridiem, + + // am, pm + 'a': meridiem, + + // a.m., p.m. + 'aa': meridiem + } + + // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. + var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] + ordinalFormatters.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return formatters[formatterToken](date).toString() + '.' + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "y4ky": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("uC4V"); +module.exports = __webpack_require__("WSXa").Object.entries; + + +/***/ }), + +/***/ "y78O": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "teardown", function() { return teardown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useIsFocusVisible; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y/FK"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js + + +var hadKeyboardEvent = true; +var hadFocusVisibleRecently = false; +var hadFocusVisibleRecentlyTimeout = null; +var inputTypesWhitelist = { + text: true, + search: true, + url: true, + tel: true, + email: true, + password: true, + number: true, + date: true, + month: true, + week: true, + time: true, + datetime: true, + 'datetime-local': true +}; +/** + * Computes whether the given element should automatically trigger the + * `focus-visible` class being added, i.e. whether it should always match + * `:focus-visible` when focused. + * @param {Element} node + * @return {boolean} + */ + +function focusTriggersKeyboardModality(node) { + var type = node.type, + tagName = node.tagName; + + if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) { + return true; + } + + if (tagName === 'TEXTAREA' && !node.readOnly) { + return true; + } + + if (node.isContentEditable) { + return true; + } + + return false; +} +/** + * Keep track of our keyboard modality state with `hadKeyboardEvent`. + * If the most recent user interaction was via the keyboard; + * and the key press did not include a meta, alt/option, or control key; + * then the modality is keyboard. Otherwise, the modality is not keyboard. + * @param {KeyboardEvent} event + */ + + +function handleKeyDown(event) { + if (event.metaKey || event.altKey || event.ctrlKey) { + return; + } + + hadKeyboardEvent = true; +} +/** + * If at any point a user clicks with a pointing device, ensure that we change + * the modality away from keyboard. + * This avoids the situation where a user presses a key on an already focused + * element, and then clicks on a different element, focusing it with a + * pointing device, while we still think we're in keyboard modality. + */ + + +function handlePointerDown() { + hadKeyboardEvent = false; +} + +function handleVisibilityChange() { + if (this.visibilityState === 'hidden') { + // If the tab becomes active again, the browser will handle calling focus + // on the element (Safari actually calls it twice). + // If this tab change caused a blur on an element with focus-visible, + // re-apply the class when the user switches back to the tab. + if (hadFocusVisibleRecently) { + hadKeyboardEvent = true; + } + } +} + +function prepare(doc) { + doc.addEventListener('keydown', handleKeyDown, true); + doc.addEventListener('mousedown', handlePointerDown, true); + doc.addEventListener('pointerdown', handlePointerDown, true); + doc.addEventListener('touchstart', handlePointerDown, true); + doc.addEventListener('visibilitychange', handleVisibilityChange, true); +} + +function teardown(doc) { + doc.removeEventListener('keydown', handleKeyDown, true); + doc.removeEventListener('mousedown', handlePointerDown, true); + doc.removeEventListener('pointerdown', handlePointerDown, true); + doc.removeEventListener('touchstart', handlePointerDown, true); + doc.removeEventListener('visibilitychange', handleVisibilityChange, true); +} + +function isFocusVisible(event) { + var target = event.target; + + try { + return target.matches(':focus-visible'); + } catch (error) {} // browsers not implementing :focus-visible will throw a SyntaxError + // we use our own heuristic for those browsers + // rethrow might be better if it's not the expected error but do we really + // want to crash if focus-visible malfunctioned? + // no need for validFocusTarget check. the user does that by attaching it to + // focusable events only + + + return hadKeyboardEvent || focusTriggersKeyboardModality(target); +} +/** + * Should be called if a blur event is fired on a focus-visible element + */ + + +function handleBlurVisible() { + // To detect a tab/window switch, we look for a blur event followed + // rapidly by a visibility change. + // If we don't see a visibility change within 100ms, it's probably a + // regular focus change. + hadFocusVisibleRecently = true; + window.clearTimeout(hadFocusVisibleRecentlyTimeout); + hadFocusVisibleRecentlyTimeout = window.setTimeout(function () { + hadFocusVisibleRecently = false; + }, 100); +} + +function useIsFocusVisible() { + var ref = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (instance) { + var node = react_dom__WEBPACK_IMPORTED_MODULE_1__["findDOMNode"](instance); + + if (node != null) { + prepare(node.ownerDocument); + } + }, []); + + if (false) {} + + return { + isFocusVisible: isFocusVisible, + onBlurVisible: handleBlurVisible, + ref: ref + }; +} + +/***/ }), + +/***/ "y9Ml": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7K2Q"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ListItem__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "yCbO": +/***/ (function(module, exports) { + +function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); +} + +module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "yGHV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("C/f8"); + + + +function isClassComponent(elementType) { + // elementType.prototype?.isReactComponent + var _elementType$prototyp = elementType.prototype, + prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp; + return Boolean(prototype.isReactComponent); +} + +function elementTypeAcceptingRef(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var safePropName = propFullName || propName; + + if (propValue == null) { + return null; + } + + var warningHint; + /** + * Blacklisting instead of whitelisting + * + * Blacklisting will miss some components, such as React.Fragment. Those will at least + * trigger a warning in React. + * We can't whitelist because there is no safe way to detect React.forwardRef + * or class components. "Safe" means there's no public API. + * + */ + + if (typeof propValue === 'function' && !isClassComponent(propValue)) { + warningHint = 'Did you accidentally provide a plain function component instead?'; + } + + if (warningHint !== undefined) { + return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an element type that can hold a ref. ".concat(warningHint, " ") + 'For more information see https://mui.com/r/caveat-with-refs-guide'); + } + + return null; +} + +/* harmony default export */ __webpack_exports__["default"] = (Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__["default"])(prop_types__WEBPACK_IMPORTED_MODULE_0__["elementType"], elementTypeAcceptingRef)); + +/***/ }), + +/***/ "yGHX": +/***/ (function(module, exports) { + +var MILLISECONDS_IN_MINUTE = 60000 + +/** + * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. + * They usually appear for dates that denote time before the timezones were introduced + * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 + * and GMT+01:00:00 after that date) + * + * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, + * which would lead to incorrect calculations. + * + * This function returns the timezone offset in milliseconds that takes seconds in account. + */ +module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) { + var date = new Date(dirtyDate.getTime()) + var baseTimezoneOffset = date.getTimezoneOffset() + date.setSeconds(0, 0) + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE + + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset +} + + +/***/ }), + +/***/ "yHKE": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'] + var monthsFull = ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'] + var weekdays2char = ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'] + var weekdays3char = ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'] + var weekdaysFull = ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'] + var meridiemUppercase = ['น.'] + var meridiemLowercase = ['น.'] + var meridiemFull = ['นาฬิกา'] + + var formatters = { + // Month: Jan, Feb, ..., Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, ..., December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, ..., Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, ..., Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, ..., Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + return meridiemFull[0] + } + } + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "yKDm": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "yL+W": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.startApp = exports.default = exports.checkApp = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _platform = __webpack_require__("AzAX"); + +var cordovaPluginIsInstalled = function cordovaPluginIsInstalled() { + return window.startApp; +}; + +/** + * Normalize startApp params for Android and iOS + */ +var getParams = function getParams(_ref) { + var appId = _ref.appId, + uri = _ref.uri; + + if ((0, _platform.isAndroidApp)()) { + return { + package: appId + }; + } else { + return uri; + } +}; + +var exported = {}; +/** + * Start an application if it is installed on the phone + * @returns Promise - False if the application was not able to be started + */ + +var startApp = exported.startApp = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(appInfo) { + var startAppPlugin, isAppInstalled, params; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + startAppPlugin = window.startApp; + _context.next = 3; + return exported.checkApp(appInfo); + + case 3: + isAppInstalled = _context.sent; + + if (!isAppInstalled) { + _context.next = 9; + break; + } + + params = getParams(appInfo); + return _context.abrupt("return", new Promise(function (resolve, reject) { + if (!cordovaPluginIsInstalled()) { + reject(new Error("Cordova plugin 'com.lampa.startapp' is not installed. This plugin is needed to start a native app. Required by cozy-bar")); + return; + } + + startAppPlugin.set(params).start(resolve, reject); + })); + + case 9: + return _context.abrupt("return", false); + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Check that an application is installed on the phone + * @returns Promise - Promise containing information on the application + * + * @example + * > checkApp({ appId: 'io.cozy.drive.mobile', uri: 'cozydrive://' }) + * Promise.resolve({ + * versionName: "0.9.2", + * packageName: "io.cozy.drive.mobile", + * versionCode: 902, + * applicationInfo: "ApplicationInfo{70aa0ef io.cozy.drive.mobile}" + * }) + */ + + +exports.startApp = startApp; + +var checkApp = exported.checkApp = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(appInfo) { + var startAppPlugin, params; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + startAppPlugin = window.startApp; + params = getParams(appInfo); + return _context2.abrupt("return", new Promise(function (resolve, reject) { + if (!cordovaPluginIsInstalled()) { + reject(new Error("Cordova plugin 'com.lampa.startapp' is not installed.")); + return; + } + + startAppPlugin.set(params).check(function (infos) { + return resolve(infos === 'OK' ? true : infos); + }, function (error) { + if (error === false || error.indexOf('NameNotFoundException') === 0) { + // Plugin returns an error 'NameNotFoundException' on Android and + // false on iOS when an application is not found. + // We prefer to always return false + resolve(false); + } else { + reject(error); + } + }); + })); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function (_x2) { + return _ref3.apply(this, arguments); + }; +}(); + +exports.checkApp = checkApp; +var _default = exported; +exports.default = _default; + +/***/ }), + +/***/ "yP9i": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("J7Me"); + +var $TypeError = GetIntrinsic('%TypeError%'); + +var Get = __webpack_require__("FDHv"); +var ToLength = __webpack_require__("YJhN"); +var Type = __webpack_require__("6qXu"); + +// https://262.ecma-international.org/11.0/#sec-lengthofarraylike + +module.exports = function LengthOfArrayLike(obj) { + if (Type(obj) !== 'Object') { + throw new $TypeError('Assertion failed: `obj` must be an Object'); + } + return ToLength(Get(obj, 'length')); +}; + +// TODO: use this all over + + +/***/ }), + +/***/ "yPbt": +/***/ (function(module, exports, __webpack_require__) { + +var castSlice = __webpack_require__("1UXZ"), + hasUnicode = __webpack_require__("ppUe"), + stringToArray = __webpack_require__("02by"), + toString = __webpack_require__("GCWF"); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; + + +/***/ }), + +/***/ "yTJ1": +/***/ (function(module, exports, __webpack_require__) { + +var isFunction = __webpack_require__("87D/"), + isLength = __webpack_require__("hGls"); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; + + +/***/ }), + +/***/ "yTqm": +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; + + +/***/ }), + +/***/ "yYZC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _nonIterableSpread; }); +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."); +} + +/***/ }), + +/***/ "yb6C": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $indexOf = __webpack_require__("IHbp")(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__("QLBk")($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + + +/***/ }), + +/***/ "ybXc": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__("dz5Z")(); +} + + +/***/ }), + +/***/ "ycSH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ImageList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("IZ9b"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ImageList__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "yfQL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dAcl"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Icon__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "yg5R": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _CozyStackClient.default; + } +}); +Object.defineProperty(exports, "OAuthClient", { + enumerable: true, + get: function get() { + return _OAuthClient.default; + } +}); +Object.defineProperty(exports, "errors", { + enumerable: true, + get: function get() { + return _errors.default; + } +}); +Object.defineProperty(exports, "FetchError", { + enumerable: true, + get: function get() { + return _errors.FetchError; + } +}); +Object.defineProperty(exports, "normalizeDoc", { + enumerable: true, + get: function get() { + return _DocumentCollection.normalizeDoc; + } +}); + +var _CozyStackClient = _interopRequireDefault(__webpack_require__("HWXE")); + +var _OAuthClient = _interopRequireDefault(__webpack_require__("vvpI")); + +var _errors = _interopRequireWildcard(__webpack_require__("twUa")); + +var _DocumentCollection = __webpack_require__("GSeB"); + +/***/ }), + +/***/ "yhnj": +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__("HzFX"); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), + +/***/ "yoUh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getStoredState; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ph6I"); + + + + +function getStoredState(config) { + var transforms = config.transforms || []; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + var storage = config.storage; + var debug = config.debug; + var deserialize = config.serialize === false ? function (x) { + return x; + } : defaultDeserialize; + return storage.getItem(storageKey).then(function (serialized) { + if (!serialized) return undefined;else { + try { + var state = {}; + var rawState = deserialize(serialized); + Object.keys(rawState).forEach(function (key) { + state[key] = transforms.reduceRight(function (subState, transformer) { + return transformer.out(subState, key, rawState); + }, deserialize(rawState[key])); + }); + return state; + } catch (err) { + if (false) {} + throw err; + } + } + }); +} + +function defaultDeserialize(serial) { + return JSON.parse(serial); +} + +/***/ }), + +/***/ "yrWy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colorManipulator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("PKog"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hexToRgb", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["hexToRgb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgbToHex", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["rgbToHex"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hslToRgb", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["hslToRgb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "decomposeColor", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["decomposeColor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recomposeColor", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["recomposeColor"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getContrastRatio", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["getContrastRatio"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getLuminance", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["getLuminance"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "emphasize", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["emphasize"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fade", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["fade"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "alpha", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["alpha"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "darken", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["darken"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lighten", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__["lighten"]; }); + +/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("9aAh"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTheme", function() { return _createTheme__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMuiTheme", function() { return _createTheme__WEBPACK_IMPORTED_MODULE_1__["createMuiTheme"]; }); + +/* harmony import */ var _createMuiStrictModeTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("sMcB"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unstable_createMuiStrictModeTheme", function() { return _createMuiStrictModeTheme__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("R/Up"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStyles", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("/ENz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeStyles", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _responsiveFontSizes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LjWU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "responsiveFontSizes", function() { return _responsiveFontSizes__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("blYM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "styled", function() { return _styled__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("V6W0"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easing", function() { return _transitions__WEBPACK_IMPORTED_MODULE_7__["easing"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "duration", function() { return _transitions__WEBPACK_IMPORTED_MODULE_7__["duration"]; }); + +/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("kjpz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useTheme", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("OY/u"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withStyles", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("HIHn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withTheme", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("csMb"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createGenerateClassName", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["createGenerateClassName"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "jssPreset", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["jssPreset"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ServerStyleSheets", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["ServerStyleSheets"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StylesProvider", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["StylesProvider"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MuiThemeProvider", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["ThemeProvider"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ThemeProvider", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__["ThemeProvider"]; }); + + + // eslint-disable-next-line camelcase + + + + + + + + + + + + +/***/ }), + +/***/ "yta+": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'mas maliit sa isang segundo', + other: 'mas maliit sa {{count}} segundo' + }, + + xSeconds: { + one: '1 segundo', + other: '{{count}} segundo' + }, + + halfAMinute: 'kalahating minuto', + + lessThanXMinutes: { + one: 'mas maliit sa isang minuto', + other: 'mas maliit sa {{count}} minuto' + }, + + xMinutes: { + one: '1 minuto', + other: '{{count}} minuto' + }, + + aboutXHours: { + one: 'mga 1 oras', + other: 'mga {{count}} oras' + }, + + xHours: { + one: '1 oras', + other: '{{count}} oras' + }, + + xDays: { + one: '1 araw', + other: '{{count}} araw' + }, + + aboutXMonths: { + one: 'mga 1 buwan', + other: 'mga {{count}} buwan' + }, + + xMonths: { + one: '1 buwan', + other: '{{count}} buwan' + }, + + aboutXYears: { + one: 'mga 1 taon', + other: 'mga {{count}} taon' + }, + + xYears: { + one: '1 taon', + other: '{{count}} taon' + }, + + overXYears: { + one: 'higit sa 1 taon', + other: 'higit sa {{count}} taon' + }, + + almostXYears: { + one: 'halos 1 taon', + other: 'halos {{count}} taon' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'sa loob ng ' + result + } else { + return result + ' ang nakalipas' + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "yvNq": +/***/ (function(module, exports) { + +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; + + +/***/ }), + +/***/ "ywrT": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" +}), 'RadioButtonUnchecked')); + +/***/ }), + +/***/ "yx3C": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__("h+8B"); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ "yxdx": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var anObject = __webpack_require__("eckd"); +var toObject = __webpack_require__("05TQ"); +var toLength = __webpack_require__("yhnj"); +var toInteger = __webpack_require__("HzFX"); +var advanceStringIndex = __webpack_require__("mNB+"); +var regExpExec = __webpack_require__("PA8a"); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +__webpack_require__("dRmG")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + + +/***/ }), + +/***/ "yxzQ": +/***/ (function(module, exports, __webpack_require__) { + +var buildFormattingTokensRegExp = __webpack_require__("fQxh") + +function buildFormatLocale () { + var months3char = ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juill.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'] + var monthsFull = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'] + var weekdays2char = ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'] + var weekdays3char = ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'] + var weekdaysFull = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] + var meridiemUppercase = ['AM', 'PM'] + var meridiemLowercase = ['am', 'pm'] + var meridiemFull = ['du matin', 'de l’après-midi', 'du soir'] + + var formatters = { + // Month: Jan, Feb, …, Dec + 'MMM': function (date) { + return months3char[date.getMonth()] + }, + + // Month: January, February, …, December + 'MMMM': function (date) { + return monthsFull[date.getMonth()] + }, + + // Day of week: Su, Mo, …, Sa + 'dd': function (date) { + return weekdays2char[date.getDay()] + }, + + // Day of week: Sun, Mon, …, Sat + 'ddd': function (date) { + return weekdays3char[date.getDay()] + }, + + // Day of week: Sunday, Monday, …, Saturday + 'dddd': function (date) { + return weekdaysFull[date.getDay()] + }, + + // AM, PM + 'A': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] + }, + + // am, pm + 'a': function (date) { + return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] + }, + + // a.m., p.m. + 'aa': function (date) { + var hours = date.getHours() + + if (hours <= 12) { + return meridiemFull[0] + } + + if (hours <= 16) { + return meridiemFull[1] + } + + return meridiemFull[2] + }, + + // ISO week, ordinal version: 1st, 2nd, …, 53rd + // NOTE: Week has feminine grammatical gender in French: semaine + 'Wo': function (date, formatters) { + return feminineOrdinal(formatters.W(date)) + } + } + + // Generate ordinal version of formatters: M → Mo, D → Do, etc. + // NOTE: For words with masculine grammatical gender in French: mois, jour, trimestre + var formatterTokens = ['M', 'D', 'DDD', 'd', 'Q'] + formatterTokens.forEach(function (formatterToken) { + formatters[formatterToken + 'o'] = function (date, formatters) { + return masculineOrdinal(formatters[formatterToken](date)) + } + }) + + // Special case for day of month ordinals in long date format context: + // 1er mars, 2 mars, 3 mars, … + // See https://github.com/date-fns/date-fns/issues/437 + // + // NOTE: The below implementation works because parsing of tokens inside a + // format string is done by a greedy regular expression, i.e. longer tokens + // have priority. E.g. formatter for "Do MMMM" has priority over individual + // formatters for "Do" and "MMMM". + var monthsTokens = ['MMM', 'MMMM'] + monthsTokens.forEach(function (monthToken) { + formatters['Do ' + monthToken] = function (date, commonFormatters) { + var dayOfMonthToken = date.getDate() === 1 + ? 'Do' + : 'D' + var dayOfMonthFormatter = formatters[dayOfMonthToken] || commonFormatters[dayOfMonthToken] + + return dayOfMonthFormatter(date, commonFormatters) + ' ' + formatters[monthToken](date) + } + }) + + return { + formatters: formatters, + formattingTokensRegExp: buildFormattingTokensRegExp(formatters) + } +} + +function masculineOrdinal (number) { + if (number === 1) { + return '1er' + } + + return number + 'e' +} + +function feminineOrdinal (number) { + if (number === 1) { + return '1re' + } + + return number + 'e' +} + +module.exports = buildFormatLocale + + +/***/ }), + +/***/ "z/MX": +/***/ (function(module, exports, __webpack_require__) { + +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Array', { isArray: __webpack_require__("j2SL") }); + + +/***/ }), + +/***/ "z/Pn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var isPrimitive = __webpack_require__("FOzr"); +var isCallable = __webpack_require__("eBwq"); +var isDate = __webpack_require__("aOi9"); +var isSymbol = __webpack_require__("FEoC"); + +var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { + if (typeof O === 'undefined' || O === null) { + throw new TypeError('Cannot call method on ' + O); + } + if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { + throw new TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive(result)) { + return result; + } + } + } + throw new TypeError('No default value'); +}; + +var GetMethod = function GetMethod(O, P) { + var func = O[P]; + if (func !== null && typeof func !== 'undefined') { + if (!isCallable(func)) { + throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); + } + return func; + } + return void 0; +}; + +// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + var hint = 'default'; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = 'string'; + } else if (arguments[1] === Number) { + hint = 'number'; + } + } + + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod(input, Symbol.toPrimitive); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== 'undefined') { + var result = exoticToPrim.call(input, hint); + if (isPrimitive(result)) { + return result; + } + throw new TypeError('unable to convert exotic object to primitive'); + } + if (hint === 'default' && (isDate(input) || isSymbol(input))) { + hint = 'string'; + } + return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); +}; + + +/***/ }), + +/***/ "z0CH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("GeFe")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("Zvb3")); + +/** + * Caches promises while they are pending + * Serves to dedupe equal queries requested at the same time + */ +var PromiseCache = /*#__PURE__*/function () { + function PromiseCache() { + (0, _classCallCheck2.default)(this, PromiseCache); + + /** + * Holds pending promises + * + * @type {Object.<string, Promise>} + */ + this.pending = {}; + } + /** + * Tries to find a pending promise corresponding to the result of keyFunc + * - If not found, promiseFunc is executed and the resulting promise is stored while it's pending + * - If found, it is immediately returned + * + * @template T + * @param {function(): Promise<T>} promiseFunc - Not executed only if an "equal" promise is already pending. + * @param {function(): string} keyFunc - Returns a key to find in cache to find a pending promise. + * @returns {Promise<T>} + */ + + + (0, _createClass2.default)(PromiseCache, [{ + key: "exec", + value: function () { + var _exec = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(promiseFunc, keyFunc) { + var key, already, prom, response; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + key = keyFunc(); + already = this.pending[key]; + + if (already) { + prom = already; + } else { + prom = promiseFunc(); + this.pending[key] = prom; + } + + _context.prev = 3; + _context.next = 6; + return prom; + + case 6: + response = _context.sent; + return _context.abrupt("return", response); + + case 8: + _context.prev = 8; + this.pending[key] = null; + return _context.finish(8); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[3,, 8, 11]]); + })); + + function exec(_x, _x2) { + return _exec.apply(this, arguments); + } + + return exec; + }() + /** + * + * @param {function(): string} keyFunc - Returns a key to find in cache to find a pending promise. + * @returns {Promise | null} + */ + + }, { + key: "get", + value: function get(keyFunc) { + var key = keyFunc(); + var already = this.pending[key]; + if (already) return already; + return null; + } + }]); + return PromiseCache; +}(); + +var _default = PromiseCache; +exports.default = _default; + +/***/ }), + +/***/ "z1Dy": +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__("AvzS")('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ "z41q": +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__("pFmr"); +var setPrototypeOf = __webpack_require__("DWlN").set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + + +/***/ }), + +/***/ "z4At": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $export = __webpack_require__("LRPZ"); +var $every = __webpack_require__("7NDg")(4); + +$export($export.P + $export.F * !__webpack_require__("QLBk")([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + + +/***/ }), + +/***/ "z578": +/***/ (function(module, exports, __webpack_require__) { + +var baseProperty = __webpack_require__("XrMh"), + basePropertyDeep = __webpack_require__("6m9v"), + isKey = __webpack_require__("sMdj"), + toKey = __webpack_require__("Iv0v"); + +/** + * Creates a function that returns the value at `path` of a given object. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + * @example + * + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; + * + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] + */ +function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); +} + +module.exports = property; + + +/***/ }), + +/***/ "z6Eu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WarmingType = exports.ThreeChoicesAnswer = exports.ProfileTypeStepForm = exports.ProfileTypeFormType = exports.OutsideFacingWalls = exports.IndividualOrCollective = exports.IndividualInsulationWork = exports.HousingType = exports.HotWaterFluid = exports.HotWaterEquipment = exports.Floor = exports.ConstructionYear = void 0; +var HousingType; +exports.HousingType = HousingType; +(function (HousingType) { + HousingType["INDIVIDUAL_HOUSE"] = "individual_house"; + HousingType["APARTMENT"] = "apartment"; +})(HousingType || (exports.HousingType = HousingType = {})); +var Floor; +exports.Floor = Floor; +(function (Floor) { + Floor["GROUND_FLOOR"] = "ground_floor"; + Floor["INTERMEDIATE_FLOOR"] = "intermediate_floor"; + Floor["LAST_FLOOR"] = "last_floor"; + Floor["NOT_APPLICABLE"] = "not_applicable"; +})(Floor || (exports.Floor = Floor = {})); +var OutsideFacingWalls; +exports.OutsideFacingWalls = OutsideFacingWalls; +(function (OutsideFacingWalls) { + OutsideFacingWalls["ONE"] = "1"; + OutsideFacingWalls["TWO"] = "2"; + OutsideFacingWalls["THREE"] = "3"; + OutsideFacingWalls["FOUR"] = "4"; +})(OutsideFacingWalls || (exports.OutsideFacingWalls = OutsideFacingWalls = {})); +var ConstructionYear; +exports.ConstructionYear = ConstructionYear; +(function (ConstructionYear) { + ConstructionYear["BEFORE_1948"] = "before_1948"; + ConstructionYear["BETWEEN_1948_AND_1974"] = "between_1948_and_1974"; + ConstructionYear["BETWEEN_1975_AND_1989"] = "between_1975_and_1989"; + ConstructionYear["BETWEEN_1990_AND_1998"] = "between_1990_and_1998"; + ConstructionYear["AFTER_1998"] = "after_1998"; + ConstructionYear["UNKNOWN"] = "unknown"; +})(ConstructionYear || (exports.ConstructionYear = ConstructionYear = {})); +var IndividualOrCollective; +exports.IndividualOrCollective = IndividualOrCollective; +(function (IndividualOrCollective) { + IndividualOrCollective["INDIVIDUAL"] = "individual"; + IndividualOrCollective["COLLECTIVE"] = "collective"; +})(IndividualOrCollective || (exports.IndividualOrCollective = IndividualOrCollective = {})); +var IndividualInsulationWork; +exports.IndividualInsulationWork = IndividualInsulationWork; +(function (IndividualInsulationWork) { + IndividualInsulationWork["NONE"] = "none"; + IndividualInsulationWork["ROOF_INSULATION"] = "roof_insulation"; + IndividualInsulationWork["WINDOW_REPLACEMENT"] = "window_replacement"; + IndividualInsulationWork["WALL_INSULATION"] = "wall_insulation"; +})(IndividualInsulationWork || (exports.IndividualInsulationWork = IndividualInsulationWork = {})); +var ThreeChoicesAnswer; +exports.ThreeChoicesAnswer = ThreeChoicesAnswer; +(function (ThreeChoicesAnswer) { + ThreeChoicesAnswer["YES"] = "yes"; + ThreeChoicesAnswer["NO"] = "no"; + ThreeChoicesAnswer["UNKNOWN"] = "unknown"; +})(ThreeChoicesAnswer || (exports.ThreeChoicesAnswer = ThreeChoicesAnswer = {})); +var HotWaterEquipment; +exports.HotWaterEquipment = HotWaterEquipment; +(function (HotWaterEquipment) { + HotWaterEquipment["SOLAR"] = "solar"; + HotWaterEquipment["THERMODYNAMIC"] = "thermodynamic"; + HotWaterEquipment["OTHER"] = "other"; +})(HotWaterEquipment || (exports.HotWaterEquipment = HotWaterEquipment = {})); +var WarmingType; +exports.WarmingType = WarmingType; +(function (WarmingType) { + WarmingType[WarmingType["ELECTRICITY"] = 0] = "ELECTRICITY"; + WarmingType[WarmingType["GAS"] = 2] = "GAS"; + WarmingType[WarmingType["WOOD"] = 3] = "WOOD"; + WarmingType[WarmingType["FUEL"] = 4] = "FUEL"; + WarmingType[WarmingType["OTHER"] = 5] = "OTHER"; +})(WarmingType || (exports.WarmingType = WarmingType = {})); +var HotWaterFluid; +exports.HotWaterFluid = HotWaterFluid; +(function (HotWaterFluid) { + HotWaterFluid[HotWaterFluid["ELECTRICITY"] = 0] = "ELECTRICITY"; + HotWaterFluid[HotWaterFluid["GAS"] = 2] = "GAS"; + HotWaterFluid[HotWaterFluid["OTHER"] = 3] = "OTHER"; +})(HotWaterFluid || (exports.HotWaterFluid = HotWaterFluid = {})); +var ProfileTypeStepForm; +exports.ProfileTypeStepForm = ProfileTypeStepForm; +(function (ProfileTypeStepForm) { + ProfileTypeStepForm[ProfileTypeStepForm["HOUSING_TYPE"] = 0] = "HOUSING_TYPE"; + ProfileTypeStepForm[ProfileTypeStepForm["AREA"] = 1] = "AREA"; + ProfileTypeStepForm[ProfileTypeStepForm["OCCUPANTS_NUMBER"] = 2] = "OCCUPANTS_NUMBER"; + ProfileTypeStepForm[ProfileTypeStepForm["CONSTRUCTION_YEAR"] = 3] = "CONSTRUCTION_YEAR"; + ProfileTypeStepForm[ProfileTypeStepForm["OUTSIDE_FACING_WALLS"] = 4] = "OUTSIDE_FACING_WALLS"; + ProfileTypeStepForm[ProfileTypeStepForm["FLOOR"] = 5] = "FLOOR"; + ProfileTypeStepForm[ProfileTypeStepForm["HEATING"] = 6] = "HEATING"; + ProfileTypeStepForm[ProfileTypeStepForm["WARMING_FLUID"] = 7] = "WARMING_FLUID"; + ProfileTypeStepForm[ProfileTypeStepForm["INDIVIDUAL_INSULATION_WORK"] = 8] = "INDIVIDUAL_INSULATION_WORK"; + ProfileTypeStepForm[ProfileTypeStepForm["VENTILATION"] = 9] = "VENTILATION"; + ProfileTypeStepForm[ProfileTypeStepForm["HEATER_REPLACEMENT"] = 10] = "HEATER_REPLACEMENT"; + ProfileTypeStepForm[ProfileTypeStepForm["COLD_WATER"] = 11] = "COLD_WATER"; + ProfileTypeStepForm[ProfileTypeStepForm["HOT_WATER"] = 12] = "HOT_WATER"; + ProfileTypeStepForm[ProfileTypeStepForm["HOT_WATER_FLUID"] = 13] = "HOT_WATER_FLUID"; + ProfileTypeStepForm[ProfileTypeStepForm["HOT_WATER_EQUIPMENT"] = 14] = "HOT_WATER_EQUIPMENT"; + ProfileTypeStepForm[ProfileTypeStepForm["COOKING_FLUID"] = 15] = "COOKING_FLUID"; + ProfileTypeStepForm[ProfileTypeStepForm["EQUIPMENTS"] = 16] = "EQUIPMENTS"; + ProfileTypeStepForm[ProfileTypeStepForm["UPDATE_DATE"] = 17] = "UPDATE_DATE"; + ProfileTypeStepForm[ProfileTypeStepForm["END"] = 18] = "END"; +})(ProfileTypeStepForm || (exports.ProfileTypeStepForm = ProfileTypeStepForm = {})); +var ProfileTypeFormType; +exports.ProfileTypeFormType = ProfileTypeFormType; +(function (ProfileTypeFormType) { + ProfileTypeFormType[ProfileTypeFormType["SINGLE_CHOICE"] = 0] = "SINGLE_CHOICE"; + ProfileTypeFormType[ProfileTypeFormType["MULTI_CHOICE"] = 1] = "MULTI_CHOICE"; + ProfileTypeFormType[ProfileTypeFormType["NUMBER_SELECTION"] = 2] = "NUMBER_SELECTION"; + ProfileTypeFormType[ProfileTypeFormType["NUMBER"] = 3] = "NUMBER"; + ProfileTypeFormType[ProfileTypeFormType["DATE_SELECTION"] = 4] = "DATE_SELECTION"; + ProfileTypeFormType[ProfileTypeFormType["EQUIPMENT_SELECTION"] = 5] = "EQUIPMENT_SELECTION"; +})(ProfileTypeFormType || (exports.ProfileTypeFormType = ProfileTypeFormType = {})); + +/***/ }), + +/***/ "z6sV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + position: 'absolute', + left: 0, + right: 0, + height: 48, + background: 'rgba(0, 0, 0, 0.5)', + display: 'flex', + alignItems: 'center', + fontFamily: theme.typography.fontFamily + }, + + /* Styles applied to the root element if `titlePosition="bottom"`. */ + titlePositionBottom: { + bottom: 0 + }, + + /* Styles applied to the root element if `titlePosition="top"`. */ + titlePositionTop: { + top: 0 + }, + + /* Styles applied to the root element if a `subtitle` is provided. */ + rootSubtitle: { + height: 68 + }, + + /* Styles applied to the title and subtitle container element. */ + titleWrap: { + flexGrow: 1, + marginLeft: 16, + marginRight: 16, + color: theme.palette.common.white, + overflow: 'hidden' + }, + + /* Styles applied to the container element if `actionPosition="left"`. */ + titleWrapActionPosLeft: { + marginLeft: 0 + }, + + /* Styles applied to the container element if `actionPosition="right"`. */ + titleWrapActionPosRight: { + marginRight: 0 + }, + + /* Styles applied to the title container element. */ + title: { + fontSize: theme.typography.pxToRem(16), + lineHeight: '24px', + textOverflow: 'ellipsis', + overflow: 'hidden', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the subtitle container element. */ + subtitle: { + fontSize: theme.typography.pxToRem(12), + lineHeight: 1, + textOverflow: 'ellipsis', + overflow: 'hidden', + whiteSpace: 'nowrap' + }, + + /* Styles applied to the actionIcon if supplied. */ + actionIcon: {}, + + /* Styles applied to the actionIcon if `actionPosition="left"`. */ + actionIconActionPosLeft: { + order: -1 + } + }; +}; +var warnedOnce = false; +/** + * ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming. + * + * You should use `import { ImageListItemBar } from '@material-ui/core'` + * or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`. + */ + +var GridListTileBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function GridListTileBar(props, ref) { + if (false) {} + + var actionIcon = props.actionIcon, + _props$actionPosition = props.actionPosition, + actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition, + classes = props.classes, + className = props.className, + subtitle = props.subtitle, + title = props.title, + _props$titlePosition = props.titlePosition, + titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["actionIcon", "actionPosition", "classes", "className", "subtitle", "title", "titlePosition"]); + + var actionPos = actionIcon && actionPosition; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.titleWrap, { + 'left': classes.titleWrapActionPosLeft, + 'right': classes.titleWrapActionPosRight + }[actionPos]) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.title + }, title), subtitle ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: classes.subtitle + }, subtitle) : null), actionIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft) + }, actionIcon) : null); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiGridListTileBar' +})(GridListTileBar)); + +/***/ }), + +/***/ "zBrv": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__("LRPZ"); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__("f8cG") }); + + +/***/ }), + +/***/ "zFEP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var prodFormat = __webpack_require__("0ZKn"); + +var devFormat = __webpack_require__("0ZKn"); + +switch ("production") { + case 'production': + module.exports = prodFormat; + break; + + case 'development': + module.exports = devFormat; + break; + + case 'standalone': + module.exports = devFormat; + break; + + case 'test': + module.exports = devFormat; + break; + + default: + module.exports = prodFormat; +} + +/***/ }), + +/***/ "zGLC": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onFID", function() { return onFID; }); +/* harmony import */ var _lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UDFD"); +/* harmony import */ var _lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("CGpO"); +/* harmony import */ var _lib_initMetric_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("FXwW"); +/* harmony import */ var _lib_observe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("u8T2"); +/* harmony import */ var _lib_onHidden_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("t3J8"); + + + + + + +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Calculates the [FID](https://web.dev/fid/) value for the current page and + * calls the `callback` function once the value is ready, along with the + * relevant `first-input` performance entry used to determine the value. The + * reported value is a `DOMHighResTimeStamp`. + * + * _**Important:** since FID is only reported after the user interacts with the + * page, it's possible that it will not be reported for some page loads._ + */ +const onFID = (onReport, opts = {}) => { + const visibilityWatcher = Object(_lib_getVisibilityWatcher_js__WEBPACK_IMPORTED_MODULE_1__["getVisibilityWatcher"])(); + const metric = Object(_lib_initMetric_js__WEBPACK_IMPORTED_MODULE_2__["initMetric"])('FID'); + // eslint-disable-next-line prefer-const + let report; + + const handleEntry = (entry) => { + // Only report if the page wasn't hidden prior to the first input. + if (entry.startTime < visibilityWatcher.firstHiddenTime) { + metric.value = entry.processingStart - entry.startTime; + metric.entries.push(entry); + report(true); + } + }; + + const handleEntries = (entries) => { + (entries ).forEach(handleEntry); + }; + + const po = Object(_lib_observe_js__WEBPACK_IMPORTED_MODULE_3__["observe"])('first-input', handleEntries); + report = Object(_lib_bindReporter_js__WEBPACK_IMPORTED_MODULE_0__["bindReporter"])(onReport, metric, opts.reportAllChanges); + + if (po) { + Object(_lib_onHidden_js__WEBPACK_IMPORTED_MODULE_4__["onHidden"])(() => { + handleEntries(po.takeRecords() ); + po.disconnect(); + }, true); + } +}; + + +//# sourceMappingURL=getFID.js.map + + +/***/ }), + +/***/ "zN4E": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _hubextensions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("matq"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addExtensionMethods", function() { return _hubextensions_js__WEBPACK_IMPORTED_MODULE_0__["addExtensionMethods"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startIdleTransaction", function() { return _hubextensions_js__WEBPACK_IMPORTED_MODULE_0__["startIdleTransaction"]; }); + +/* harmony import */ var _integrations_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("05E2"); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "Integrations", function() { return _integrations_index_js__WEBPACK_IMPORTED_MODULE_1__; }); +/* harmony import */ var _browser_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("XMPp"); +/* harmony import */ var _span_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("tH0f"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Span", function() { return _span_js__WEBPACK_IMPORTED_MODULE_3__["Span"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "spanStatusfromHttpCode", function() { return _span_js__WEBPACK_IMPORTED_MODULE_3__["spanStatusfromHttpCode"]; }); + +/* harmony import */ var _spanstatus_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("NhJu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SpanStatus", function() { return _spanstatus_js__WEBPACK_IMPORTED_MODULE_4__["SpanStatus"]; }); + +/* harmony import */ var _transaction_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("ik7V"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Transaction", function() { return _transaction_js__WEBPACK_IMPORTED_MODULE_5__["Transaction"]; }); + +/* harmony import */ var _idletransaction_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ESWp"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IdleTransaction", function() { return _idletransaction_js__WEBPACK_IMPORTED_MODULE_6__["IdleTransaction"]; }); + +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("VjOD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActiveTransaction", function() { return _utils_js__WEBPACK_IMPORTED_MODULE_7__["getActiveTransaction"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hasTracingEnabled", function() { return _utils_js__WEBPACK_IMPORTED_MODULE_7__["hasTracingEnabled"]; }); + +/* harmony import */ var _browser_browsertracing_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("unBY"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BROWSER_TRACING_INTEGRATION_ID", function() { return _browser_browsertracing_js__WEBPACK_IMPORTED_MODULE_8__["BROWSER_TRACING_INTEGRATION_ID"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BrowserTracing", function() { return _browser_browsertracing_js__WEBPACK_IMPORTED_MODULE_8__["BrowserTracing"]; }); + +/* harmony import */ var _browser_request_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("GDt/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultRequestInstrumentationOptions", function() { return _browser_request_js__WEBPACK_IMPORTED_MODULE_9__["defaultRequestInstrumentationOptions"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "instrumentOutgoingRequests", function() { return _browser_request_js__WEBPACK_IMPORTED_MODULE_9__["instrumentOutgoingRequests"]; }); + +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("aUjI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TRACEPARENT_REGEXP", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_10__["TRACEPARENT_REGEXP"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extractTraceparentData", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_10__["extractTraceparentData"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stripUrlQueryAndFragment", function() { return _sentry_utils__WEBPACK_IMPORTED_MODULE_10__["stripUrlQueryAndFragment"]; }); + + + + + + + + + + + + + + + +; +; + +// Treeshakable guard to remove all code related to tracing + +// Guard for tree +if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) { + // We are patching the global object with our hub extension methods + Object(_hubextensions_js__WEBPACK_IMPORTED_MODULE_0__["addExtensionMethods"])(); +} +//# sourceMappingURL=index.js.map + + +/***/ }), + +/***/ "zPcw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__("UDoN"); +var getWeak = __webpack_require__("h/ey").getWeak; +var anObject = __webpack_require__("eckd"); +var isObject = __webpack_require__("pFmr"); +var anInstance = __webpack_require__("/Ytg"); +var forOf = __webpack_require__("QTPW"); +var createArrayMethod = __webpack_require__("7NDg"); +var $has = __webpack_require__("00OQ"); +var validate = __webpack_require__("LEB8"); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), + +/***/ "zTau": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TERMS_DOCTYPE = void 0; +var TERMS_DOCTYPE = 'io.cozy.terms'; +exports.TERMS_DOCTYPE = TERMS_DOCTYPE; + +/***/ }), + +/***/ "zUyx": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RyfF"); + + +/** + * @ignore - internal component. + */ + +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" +}), 'CheckBoxOutlineBlank')); + +/***/ }), + +/***/ "zVfY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); +var _react = _interopRequireDefault(__webpack_require__("ivGQ")); +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/hand.svg` to regenerate; + +function SvgHand(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 15 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M14.992 8V5a1.001 1.001 0 00-2 0v3h-1V2a1.001 1.001 0 00-2 0v5h-1V1a1.001 1.001 0 00-2 0v6h-1V2c0-.551-.45-1-1-1-.551 0-1 .449-1 1v6.5a.5.5 0 01-.88.325L1.1 6.125c-.222-.182-.64-.166-.897.091a.7.7 0 00-.075.898c.064.117 1.542 4.144 3.227 6.798A4.486 4.486 0 007.156 16h3.336c2.48 0 4.5-2.019 4.5-4.5V8z" + })); +} +var _default = SvgHand; +exports.default = _default; + +/***/ }), + +/***/ "zWJc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return styled; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("vFJ3"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rDuK"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Xvne"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("b+/j"); + + + + + + + + + +function omit(input, fields) { + var output = {}; + Object.keys(input).forEach(function (prop) { + if (fields.indexOf(prop) === -1) { + output[prop] = input[prop]; + } + }); + return output; +} // styled-components's API removes the mapping between components and styles. +// Using components as a low-level styling construct can be simpler. + + +function styled(Component) { + var componentCreator = function componentCreator(style) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var name = options.name, + stylesOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["name"]); + + if (false) {} + + var classNamePrefix = name; + + if (false) { var displayName; } + + var stylesOrCreator = typeof style === 'function' ? function (theme) { + return { + root: function root(props) { + return style(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + theme: theme + }, props)); + } + }; + } : { + root: style + }; + var useStyles = Object(_makeStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + Component: Component, + name: name || Component.displayName, + classNamePrefix: classNamePrefix + }, stylesOptions)); + var filterProps; + var propTypes = {}; + + if (style.filterProps) { + filterProps = style.filterProps; + delete style.filterProps; + } + /* eslint-disable react/forbid-foreign-prop-types */ + + + if (style.propTypes) { + propTypes = style.propTypes; + delete style.propTypes; + } + /* eslint-enable react/forbid-foreign-prop-types */ + + + var StyledComponent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function StyledComponent(props, ref) { + var children = props.children, + classNameProp = props.className, + clone = props.clone, + ComponentProp = props.component, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "className", "clone", "component"]); + + var classes = useStyles(props); + var className = Object(clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(classes.root, classNameProp); + var spread = other; + + if (filterProps) { + spread = omit(spread, filterProps); + } + + if (clone) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.cloneElement(children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_3__["default"])(children.props.className, className) + }, spread)); + } + + if (typeof children === 'function') { + return children(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: className + }, spread)); + } + + var FinalComponent = ComponentProp || Component; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(FinalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref, + className: className + }, spread), children); + }); + false ? undefined : void 0; + + if (false) {} + + hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(StyledComponent, Component); + return StyledComponent; + }; + + return componentCreator; +} + +/***/ }), + +/***/ "zgTX": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("hJxD")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("HZZ/")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _react = __webpack_require__("ivGQ"); + +var _useClient = _interopRequireDefault(__webpack_require__("CHrb")); + +var _dsl = __webpack_require__("v2kV"); + +var _store = __webpack_require__("6mdx"); + +var _CozyClient = _interopRequireDefault(__webpack_require__("7BbM")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * Normalizes an object representing a CouchDB document + * + * Ensures existence of `_type` + * + * @public + * @param {import("./types").CouchDBDocument} couchDBDoc - object representing the document + * @returns {import("./types").CozyClientDocument} full normalized document + */ +var normalizeDoc = function normalizeDoc(couchDBDoc, doctype) { + return _objectSpread({ + id: couchDBDoc._id, + _type: doctype + }, couchDBDoc); +}; +/** + * DispatchChange + * + * @param {CozyClient} client CozyClient instane + * @param {import("./types").Doctype} doctype Doctype of the document to update + * @param {import("./types").CouchDBDocument} couchDBDoc Document to update + * @param {import("./types").Mutation} mutationDefinitionCreator Mutation to apply + */ + + +var dispatchChange = function dispatchChange(client, doctype, couchDBDoc, mutationDefinitionCreator) { + var data = normalizeDoc(couchDBDoc, doctype); + var response = { + data: data + }; + var options = {}; + client.dispatch((0, _store.receiveMutationResult)(client.generateRandomId(), response, options, mutationDefinitionCreator(data))); +}; +/** + * Component that subscribes to a doctype changes and keep the + * internal store updated. + * + * @param {object} options - Options + * @param {import("./types").Doctype} options.doctype - The doctype to watch + * @returns {null} The component does not display anything. + */ + + +var RealTimeQueries = function RealTimeQueries(_ref) { + var doctype = _ref.doctype; + var client = (0, _useClient.default)(); + (0, _react.useEffect)(function () { + var realtime = client.plugins.realtime; + + if (!realtime) { + throw new Error('You must include the realtime plugin to use RealTimeQueries'); + } + + var dispatchCreate = function dispatchCreate(couchDBDoc) { + dispatchChange(client, doctype, couchDBDoc, _dsl.Mutations.createDocument); + }; + + var dispatchUpdate = function dispatchUpdate(couchDBDoc) { + dispatchChange(client, doctype, couchDBDoc, _dsl.Mutations.updateDocument); + }; + + var dispatchDelete = function dispatchDelete(couchDBDoc) { + dispatchChange(client, doctype, _objectSpread(_objectSpread({}, couchDBDoc), {}, { + _deleted: true + }), _dsl.Mutations.deleteDocument); + }; + + var subscribe = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return realtime.subscribe('created', doctype, dispatchCreate); + + case 2: + _context.next = 4; + return realtime.subscribe('updated', doctype, dispatchUpdate); + + case 4: + _context.next = 6; + return realtime.subscribe('deleted', doctype, dispatchDelete); + + case 6: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function subscribe() { + return _ref2.apply(this, arguments); + }; + }(); + + subscribe(); + return function () { + realtime.unsubscribe('created', doctype, dispatchCreate); + realtime.unsubscribe('updated', doctype, dispatchUpdate); + realtime.unsubscribe('deleted', doctype, dispatchDelete); + }; + }, [client, doctype]); + return null; +}; + +var _default = /*#__PURE__*/(0, _react.memo)(RealTimeQueries); + +exports.default = _default; + +/***/ }), + +/***/ "zjpK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _GridListTile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+MTM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _GridListTile__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + +/***/ }), + +/***/ "zpyt": +/***/ (function(module, exports) { + +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; + + +/***/ }), + +/***/ "zqIu": +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__("3qHZ"); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ "zt9a": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Fu1e"); + +var _interopRequireDefault = __webpack_require__("jm00"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.queryConnectFlat = exports.queryConnect = exports.withClient = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("J58c")); + +var _extends2 = _interopRequireDefault(__webpack_require__("LGLP")); + +var _react = _interopRequireWildcard(__webpack_require__("ivGQ")); + +var _propTypes = _interopRequireDefault(__webpack_require__("ii0b")); + +var _flowRight = _interopRequireDefault(__webpack_require__("JiXS")); + +var _Query = _interopRequireDefault(__webpack_require__("bkoc")); + +var _useClient = _interopRequireDefault(__webpack_require__("CHrb")); + +var _useQuery = __webpack_require__("Q2MS"); + +var _logger = _interopRequireDefault(__webpack_require__("39/8")); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * @function + * @description HOC to provide client from context as prop + * + * @param {Component} WrappedComponent - wrapped component + * @returns {Function} - Component that will receive client as prop + */ +var withClient = function withClient(WrappedComponent) { + var Wrapped = function Wrapped(props) { + var client = (0, _useClient.default)(); // @ts-ignore + + return /*#__PURE__*/_react.default.createElement(WrappedComponent, (0, _extends2.default)({}, props, { + client: client + })); + }; // @ts-ignore + + + Wrapped.displayName = "withClient(".concat(WrappedComponent.displayName || // @ts-ignore + WrappedComponent.name, ")"); + return Wrapped; +}; + +exports.withClient = withClient; + +var withQuery = function withQuery(dest, queryOpts, Original) { + if (!queryOpts) { + throw new Error("withQuery has no options for ".concat(dest, " (wrapping ").concat(Original.name, ")")); + } + + return function (Component) { + var Wrapper = function Wrapper(props, context) { + if (!context.client) { + throw new Error('Should be used with client in context (use CozyProvider to set context)'); + } + + var queryOptsRes = typeof queryOpts === 'function' ? queryOpts(props) : queryOpts; + + if (queryOpts.doc) { + _logger.default.warn('queryOpts.doc is deprecated'); + + return /*#__PURE__*/_react.default.createElement(Component, _objectSpread((0, _defineProperty2.default)({}, dest, queryOptsRes.doc), props)); + } + + return /*#__PURE__*/_react.default.createElement(_Query.default, queryOptsRes, function (result) { + return /*#__PURE__*/_react.default.createElement(Component, _objectSpread((0, _defineProperty2.default)({}, dest, result), props)); + }); + }; + + Wrapper.contextTypes = { + client: _propTypes.default.object + }; + Wrapper.displayName = "withQuery(".concat(Component.displayName || Component.name, ")"); + return Wrapper; + }; +}; +/** + * @function + * @description HOC creator to connect component to several queries in a declarative manner + * + * @param {object} querySpecs - Definition of the queries + * @returns {Function} - HOC to apply to a component + */ + + +var queryConnect = function queryConnect(querySpecs) { + return function (Component) { + var enhancers = Object.keys(querySpecs).map(function (dest) { + return withQuery(dest, querySpecs[dest], Component); + }); + return _flowRight.default.apply(null, enhancers)(Component); + }; +}; +/** + * @function + * @description HOC creator to connect component to several queries in a declarative manner + * The only difference with queryConnect is that it does not wrap the component in N component + * if there are N queries, only 1 extra level of nesting is introduced. + * + * @param {object} querySpecs - Definition of the queries + * @returns {Function} - HOC to apply to a component + */ + + +exports.queryConnect = queryConnect; + +var queryConnectFlat = function queryConnectFlat(querySpecs) { + return function (Component) { + var Wrapper = function Wrapper(props) { + var queryResults = (0, _useQuery.useQueries)(querySpecs); + return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, props, queryResults)); + }; + + Wrapper.displayName = "queryConnectFlat(".concat(Component.displayName || Component.name, ")"); + return Wrapper; + }; +}; + +exports.queryConnectFlat = queryConnectFlat; + +/***/ }), + +/***/ "ztbB": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8cmQ"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rZdQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ivGQ"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("ii0b"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("vFJ3"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("OY/u"); +/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("5ZEc"); +/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("qSOI"); + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + transition: theme.transitions.create(['color', 'padding-top'], { + duration: theme.transitions.duration.short + }), + padding: '6px 12px 8px', + minWidth: 80, + maxWidth: 168, + color: theme.palette.text.secondary, + flex: '1', + '&$iconOnly': { + paddingTop: 16 + }, + '&$selected': { + paddingTop: 6, + color: theme.palette.primary.main + } + }, + + /* Pseudo-class applied to the root element if selected. */ + selected: {}, + + /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */ + iconOnly: {}, + + /* Styles applied to the span element that wraps the icon and label. */ + wrapper: { + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + width: '100%', + flexDirection: 'column' + }, + + /* Styles applied to the label's span element. */ + label: { + fontFamily: theme.typography.fontFamily, + fontSize: theme.typography.pxToRem(12), + opacity: 1, + transition: 'font-size 0.2s, opacity 0.2s', + transitionDelay: '0.1s', + '&$iconOnly': { + opacity: 0, + transitionDelay: '0s' + }, + '&$selected': { + fontSize: theme.typography.pxToRem(14) + } + } + }; +}; +var BottomNavigationAction = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function BottomNavigationAction(props, ref) { + var classes = props.classes, + className = props.className, + icon = props.icon, + label = props.label, + onChange = props.onChange, + onClick = props.onClick, + selected = props.selected, + showLabel = props.showLabel, + value = props.value, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "icon", "label", "onChange", "onClick", "selected", "showLabel", "value"]); + + var handleChange = function handleChange(event) { + if (onChange) { + onChange(event, value); + } + + if (onClick) { + onClick(event); + } + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + ref: ref, + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly), + focusRipple: true, + onClick: handleChange + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.wrapper + }, icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly) + }, label))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__["default"])(styles, { + name: 'MuiBottomNavigationAction' +})(BottomNavigationAction)); + +/***/ }), + +/***/ "zthh": +/***/ (function(module, exports) { + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + lessThanXSeconds: { + one: 'menos de un segundo', + other: 'menos de {{count}} segundos' + }, + + xSeconds: { + one: '1 segundo', + other: '{{count}} segundos' + }, + + halfAMinute: 'medio minuto', + + lessThanXMinutes: { + one: 'menos de un minuto', + other: 'menos de {{count}} minutos' + }, + + xMinutes: { + one: '1 minuto', + other: '{{count}} minutos' + }, + + aboutXHours: { + one: 'alrededor de 1 hora', + other: 'alrededor de {{count}} horas' + }, + + xHours: { + one: '1 hora', + other: '{{count}} horas' + }, + + xDays: { + one: '1 día', + other: '{{count}} días' + }, + + aboutXMonths: { + one: 'alrededor de 1 mes', + other: 'alrededor de {{count}} meses' + }, + + xMonths: { + one: '1 mes', + other: '{{count}} meses' + }, + + aboutXYears: { + one: 'alrededor de 1 año', + other: 'alrededor de {{count}} años' + }, + + xYears: { + one: '1 año', + other: '{{count}} años' + }, + + overXYears: { + one: 'más de 1 año', + other: 'más de {{count}} años' + }, + + almostXYears: { + one: 'casi 1 año', + other: 'casi {{count}} años' + } + } + + function localize (token, count, options) { + options = options || {} + + var result + if (typeof distanceInWordsLocale[token] === 'string') { + result = distanceInWordsLocale[token] + } else if (count === 1) { + result = distanceInWordsLocale[token].one + } else { + result = distanceInWordsLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'en ' + result + } else { + return 'hace ' + result + } + } + + return result + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "zvTh": +/***/ (function(module, exports) { + +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; + + +/***/ }), + +/***/ "zxT9": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__("KqZw"); + +var $exec = callBound('RegExp.prototype.exec'); + +module.exports = function regexTester(regex) { + return function test(s) { return $exec(regex, s) !== null; }; +}; + + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/public/index.html b/public/index.html new file mode 100644 index 000000000..ad86b133e --- /dev/null +++ b/public/index.html @@ -0,0 +1 @@ +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo | Me désabonner</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="../public/ecolyo.e5c9e64081aae31cdba7.js"></script></div></body></html> \ No newline at end of file diff --git a/services/monthlyReportNotification/ecolyo.js b/services/monthlyReportNotification/ecolyo.js index 5bd323e04..5a6aacea8 100644 --- a/services/monthlyReportNotification/ecolyo.js +++ b/services/monthlyReportNotification/ecolyo.js @@ -166306,12 +166306,13 @@ var _mjml = _interopRequireDefault(__webpack_require__(1180)); var _consumption = _interopRequireDefault(__webpack_require__(158)); var _environment = _interopRequireDefault(__webpack_require__(932)); var _mail = _interopRequireDefault(__webpack_require__(1589)); +var _permissions = __webpack_require__(1621); var _profile = _interopRequireDefault(__webpack_require__(1173)); var _utils = __webpack_require__(750); var _service = __webpack_require__(1178); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const monthlyReportTemplate = __webpack_require__(1621); +const monthlyReportTemplate = __webpack_require__(1623); const logStack = _cozyLogger.default.namespace('report'); /** * Get consumption value for all fluid if exist @@ -166405,20 +166406,20 @@ const getMonthlyReport = async (year, month, client) => { const monthlyReportNotification = async ({ client }) => { - var _userProfil, _userProfil2; logStack('info', 'Fetching user profile...'); - const upm = new _profile.default(client); - let userProfil = await upm.getProfile(); - if (!((_userProfil = userProfil) !== null && _userProfil !== void 0 && _userProfil.sendAnalysisNotification)) { + const profileService = new _profile.default(client); + const permissionsService = new _permissions.PermissionsService(client); + const userProfile = await profileService.getProfile(); + if (!(userProfile !== null && userProfile !== void 0 && userProfile.sendAnalysisNotification)) { logStack('info', 'End of process - Report Notification disabled in user profile'); return; } // Init mail token for user in case he don't have one - if (!userProfil.mailToken || userProfil.mailToken === '') { + if (!userProfile.mailToken || userProfile.mailToken === '') { const token = __webpack_require__(1544).randomBytes(48).toString('hex'); try { - await upm.updateProfile({ + await profileService.updateProfile({ mailToken: token }); } catch (error) { @@ -166428,7 +166429,7 @@ const monthlyReportNotification = async ({ } } let username = ''; - let url = ''; + let analysisLink = ''; logStack('info', 'Fetching data for mail...'); // Retrieve public name from the stack const settings = await client.getStackClient().fetchJSON('GET', '/settings/instance'); @@ -166441,7 +166442,7 @@ const monthlyReportNotification = async ({ const apps = await client.getStackClient().fetchJSON('GET', '/apps/ecolyo'); const appLink = (0, _get.default)(apps, 'data.links.related'); if (appLink) { - url = appLink; + analysisLink = appLink; } logStack('info', 'Creation of mail...'); const mailService = new _mail.default(); @@ -166451,20 +166452,22 @@ const monthlyReportNotification = async ({ const month = today.toFormat('MM'); const year = today.toFormat('yyyy'); const monthlyReport = await getMonthlyReport(year, month, client); - let unsubscribeUrl; - userProfil = await upm.getProfile(); - let token = undefined; - if ((_userProfil2 = userProfil) !== null && _userProfil2 !== void 0 && _userProfil2.mailToken) { - token = userProfil.mailToken; - } - if (!url.includes('analysis')) { - unsubscribeUrl = url + '/#/unsubscribe'; - url = url + '/#/analysis'; - if (token) { - url += '?token=' + token; - } - } else { - unsubscribeUrl = url.replace('analysis', 'unsubscribe'); + + /** bounce token, will be used to calculate bounce clicks from monthly report */ + let bounceToken = undefined; + if (userProfile !== null && userProfile !== void 0 && userProfile.mailToken) { + bounceToken = userProfile.mailToken; + } + if (!analysisLink.includes('analysis')) { + analysisLink = analysisLink + '/#/analysis'; + } + if (bounceToken) { + analysisLink += '?token=' + bounceToken; + } + let unsubscribeUrl = appLink + 'public'; + const unsubscribeToken = await permissionsService.getShareCode(); + if (unsubscribeToken) { + unsubscribeUrl += `?token=${unsubscribeToken}`; } const monthComparisonText = await buildComparisonText(client, 'month'); const yearComparisonText = await buildComparisonText(client, 'year'); @@ -166482,7 +166485,7 @@ const monthlyReportNotification = async ({ title: 'Infos & bilan consos', baseUrl: baseUrl, username: username, - clientUrl: url, + clientUrl: analysisLink, unsubscribeUrl: unsubscribeUrl, comparisonExist: monthComparisonText.length > 0 || yearComparisonText.length > 0, monthComparisonExist: monthComparisonText.length > 0, @@ -166527,6 +166530,70 @@ const monthlyReportNotification = async ({ /* 1621 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + + +var _interopRequireDefault = __webpack_require__(1); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PermissionsService = void 0; +var _defineProperty2 = _interopRequireDefault(__webpack_require__(159)); +var Sentry = _interopRequireWildcard(__webpack_require__(2)); +var _cozyLogger = _interopRequireDefault(__webpack_require__(95)); +var _ioCozyPermissions = __webpack_require__(1622); +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +const logStack = _cozyLogger.default.namespace('challengeService'); +class PermissionsService { + constructor(client) { + (0, _defineProperty2.default)(this, "client", void 0); + this.client = client; + } + async getShareCode() { + try { + const TTL = '15D'; + const { + data + } = await this.client.save({ + _type: _ioCozyPermissions.PERMISSIONS_DOCTYPE, + permissions: { + images: { + type: 'com.grandlyon.ecolyo.profile', + verbs: ['PUT', 'GET'] + } + }, + ttl: TTL + }); + return data.attributes.codes.code; + } catch (error) { + const errorMessage = `Failed to create shareCode: ${JSON.stringify(error)}`; + logStack('error', errorMessage); + Sentry.captureException(error); + throw error; + } + } +} +exports.PermissionsService = PermissionsService; + +/***/ }), +/* 1622 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PERMISSIONS_DOCTYPE = void 0; +const PERMISSIONS_DOCTYPE = 'io.cozy.permissions'; +exports.PERMISSIONS_DOCTYPE = PERMISSIONS_DOCTYPE; + +/***/ }), +/* 1623 */ +/***/ (function(module, exports, __webpack_require__) { + var Handlebars = __webpack_require__(1591); function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { @@ -166660,12 +166727,12 @@ module.exports = (Handlebars["default"] || Handlebars).template({"1":function(co + alias2(alias1((depth0 != null ? lookupProperty(depth0,"feedbackImageUrl") : depth0), depth0)) + " width=\"32px\" align=\"center\" alt=\"feedback\"></mj-image>\n <mj-text color=\"white\" font-weight=\"900\" align=\"center\" font-size=\"18px\">\n Un problème, une question, une suggestion ?\n </mj-text>\n <mj-text color=\"white\" align=\"center\" font-size=\"18px\">\n N'hésitez pas à nous écrire via la bulle dans le service ou en\n <a style=\"color:white;\" href=\"https://support.grandlyon.com/ecolyo/\" alt=\"lien vers le service assistance utilisateur\">cliquant ici.</a>\n </mj-text>\n </mj-column>\n </mj-section>\n <mj-section background-color=\"black\">\n <mj-column>\n" + ((stack1 = container.invokePartial(__webpack_require__(1615),depth0,{"name":"base/footer","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") - + ((stack1 = container.invokePartial(__webpack_require__(1622),depth0,{"name":"base/unsubscribe","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + ((stack1 = container.invokePartial(__webpack_require__(1624),depth0,{"name":"base/unsubscribe","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + " </mj-column>\n </mj-section>\n </mj-body>\n</mjml>"; },"usePartial":true,"useData":true}); /***/ }), -/* 1622 */ +/* 1624 */ /***/ (function(module, exports, __webpack_require__) { var Handlebars = __webpack_require__(1591); diff --git a/unsubscribe.html b/unsubscribe.html new file mode 100644 index 000000000..eff28e28a --- /dev/null +++ b/unsubscribe.html @@ -0,0 +1,64 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta + name="description" + content="Ecolyo est le service proposé par la Métropole de Lyon pour suivre et comprendre la consommation énergétique globale de votre foyer." + /> + <meta + http-equiv="Content-Security-Policy" + content="style-src 'self' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com;" + /> + <link rel="stylesheet" href="./style.css" /> + <link + href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap" + rel="stylesheet" + /> + <link rel="icon" href="assets/icon.svg" /> + <title>Ecolyo</title> + <style type="text/css"> + * { + margin: 0; + line-height: 1; + font-family: 'Lato', sans-serif; + color: white; + } + html, + body { + height: 100%; + margin: auto; + background: #121212; + } + p { + margin-top: 1rem; + } + .container { + height: 100%; + display: flex; + align-items: center; + text-align: center; + justify-content: center; + } + .text-16-white { + font-weight: 900; + font-size: 1rem; + color: white; + } + </style> + </head> + <body> + <nav></nav> + <div class="container"> + <section> + <img src="./icon.svg" alt="logo Ecolyo" height="80px" width="80px" /> + <p class="text-16-white">Hors ligne</p> + <p class="text-16-white"> + Vérifiez votre connexion pour lancer Ecolyo. + </p> + </section> + </div> + <footer></footer> + </body> +</html> diff --git a/vendors/ecolyo.50523ef7f4b4a6406417.js b/vendors/ecolyo.282ad4ac6d5dbc59b8e8.js similarity index 99% rename from vendors/ecolyo.50523ef7f4b4a6406417.js rename to vendors/ecolyo.282ad4ac6d5dbc59b8e8.js index 4cc94923b..5cb375dcf 100644 --- a/vendors/ecolyo.50523ef7f4b4a6406417.js +++ b/vendors/ecolyo.282ad4ac6d5dbc59b8e8.js @@ -16034,7 +16034,7 @@ if(typeof BigInteger === 'undefined') { var BigInteger = forge.jsbn.BigInteger; } -var _crypto = forge.util.isNodejs ? __webpack_require__(0) : null; +var _crypto = forge.util.isNodejs ? __webpack_require__(1) : null; // shortcut for asn.1 API var asn1 = forge.asn1; @@ -50160,7 +50160,7 @@ function addNumericSeparator(num, str) { return $replace.call(str, sepRegex, '$&_'); } -var utilInspect = __webpack_require__(3); +var utilInspect = __webpack_require__(0); var inspectCustom = utilInspect.custom; var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; @@ -78104,7 +78104,7 @@ if(typeof BigInteger === 'undefined') { var BigInteger = forge.jsbn.BigInteger; } -var _crypto = forge.util.isNodejs ? __webpack_require__(1) : null; +var _crypto = forge.util.isNodejs ? __webpack_require__(2) : null; // shortcut for asn.1 API var asn1 = forge.asn1; @@ -135454,7 +135454,7 @@ var pkcs5 = forge.pkcs5 = forge.pkcs5 || {}; var crypto; if(forge.util.isNodejs && !forge.options.usePureJavaScript) { - crypto = __webpack_require__(1); + crypto = __webpack_require__(2); } /** @@ -205937,7 +205937,7 @@ __webpack_require__("CtV+"); var _crypto = null; if(forge.util.isNodejs && !forge.options.usePureJavaScript && !process.versions['node-webkit']) { - _crypto = __webpack_require__(1); + _crypto = __webpack_require__(2); } /* PRNG API */ @@ -261675,7 +261675,7 @@ function getCryptoSubtle() { function getCryptoNodeJS() { var crypto; try { - crypto = __webpack_require__(4); + crypto = __webpack_require__(5); } catch (err) { return undefined; } @@ -294405,7 +294405,7 @@ __webpack_require__("Fk6J"); var _crypto = null; if(forge.util.isNodejs && !forge.options.usePureJavaScript && !process.versions['node-webkit']) { - _crypto = __webpack_require__(0); + _crypto = __webpack_require__(1); } /* PRNG API */ @@ -300701,7 +300701,7 @@ var Fab = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Buffer = __webpack_require__("VNoH").Buffer; -var util = __webpack_require__(6); +var util = __webpack_require__(7); function copyBuffer(src, target, offset) { src.copy(target, offset); @@ -421833,7 +421833,7 @@ util.inherits = __webpack_require__("/gTz"); /*</replacement>*/ /*<replacement>*/ -var debugUtil = __webpack_require__(5); +var debugUtil = __webpack_require__(6); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); @@ -427624,7 +427624,7 @@ var pkcs5 = forge.pkcs5 = forge.pkcs5 || {}; var crypto; if(forge.util.isNodejs && !forge.options.usePureJavaScript) { - crypto = __webpack_require__(0); + crypto = __webpack_require__(1); } /** -- GitLab