cozy-bar 0.0.0-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/cozy-bar.min.js +77 -0
- package/dist/cozy-bar.min.js.map +1 -0
- package/package.json +165 -0
- package/src/assets/icons/16/icon-storage-16.svg +3 -0
- package/src/assets/icons/24/icon-arrow-left.svg +3 -0
- package/src/assets/icons/32/icon-claudy.svg +1 -0
- package/src/assets/icons/apps/icon-collect.svg +25 -0
- package/src/assets/icons/apps/icon-drive.svg +17 -0
- package/src/assets/icons/apps/icon-market-soon.svg +25 -0
- package/src/assets/icons/apps/icon-photos.svg +19 -0
- package/src/assets/icons/apps/icon-soon.svg +21 -0
- package/src/assets/icons/apps/icon-store.svg +19 -0
- package/src/assets/icons/claudyActions/icon-bills.svg +6 -0
- package/src/assets/icons/claudyActions/icon-laptop.svg +7 -0
- package/src/assets/icons/claudyActions/icon-phone.svg +8 -0
- package/src/assets/icons/claudyActions/icon-question-mark.svg +6 -0
- package/src/assets/icons/comingsoon/icon-bank.svg +12 -0
- package/src/assets/icons/comingsoon/icon-sante.svg +12 -0
- package/src/assets/icons/comingsoon/icon-store.svg +6 -0
- package/src/assets/icons/icon-cozy.svg +3 -0
- package/src/assets/icons/icon-shield.svg +3 -0
- package/src/assets/icons/spinner.svg +4 -0
- package/src/assets/sprites/icon-apps.svg +1 -0
- package/src/assets/sprites/icon-cozy-home.svg +16 -0
- package/src/components/Apps/AppItem.jsx +117 -0
- package/src/components/Apps/AppItemPlaceholder.jsx +12 -0
- package/src/components/Apps/AppNavButtons.jsx +94 -0
- package/src/components/Apps/AppsContent.jsx +91 -0
- package/src/components/Apps/ButtonCozyHome.jsx +30 -0
- package/src/components/Apps/ButtonCozyHome.spec.jsx +53 -0
- package/src/components/Apps/IconCozyHome.jsx +38 -0
- package/src/components/Apps/index.jsx +72 -0
- package/src/components/Banner.jsx +41 -0
- package/src/components/Bar.jsx +295 -0
- package/src/components/Bar.spec.jsx +133 -0
- package/src/components/Claudy.jsx +81 -0
- package/src/components/ClaudyIcon.jsx +18 -0
- package/src/components/Drawer.jsx +227 -0
- package/src/components/Drawer.spec.jsx +98 -0
- package/src/components/SearchBar.jsx +358 -0
- package/src/components/Settings/SettingsContent.jsx +163 -0
- package/src/components/Settings/StorageData.jsx +29 -0
- package/src/components/Settings/helper.js +8 -0
- package/src/components/Settings/index.jsx +220 -0
- package/src/components/StorageIcon.jsx +16 -0
- package/src/components/SupportModal.jsx +59 -0
- package/src/components/__snapshots__/Bar.spec.jsx.snap +302 -0
- package/src/config/claudyActions.json +20 -0
- package/src/config/persistWhitelist.json +4 -0
- package/src/dom.js +80 -0
- package/src/index.jsx +242 -0
- package/src/index.spec.jsx +34 -0
- package/src/lib/api/helpers.js +13 -0
- package/src/lib/api/index.jsx +145 -0
- package/src/lib/exceptions.js +89 -0
- package/src/lib/expiringMemoize.js +13 -0
- package/src/lib/icon.js +77 -0
- package/src/lib/intents.js +16 -0
- package/src/lib/logger.js +11 -0
- package/src/lib/middlewares/appsI18n.js +57 -0
- package/src/lib/realtime.js +43 -0
- package/src/lib/reducers/apps.js +175 -0
- package/src/lib/reducers/apps.spec.js +59 -0
- package/src/lib/reducers/content.js +50 -0
- package/src/lib/reducers/context.js +86 -0
- package/src/lib/reducers/index.js +73 -0
- package/src/lib/reducers/locale.js +22 -0
- package/src/lib/reducers/settings.js +111 -0
- package/src/lib/reducers/theme.js +48 -0
- package/src/lib/reducers/unserializable.js +26 -0
- package/src/lib/stack-client.js +401 -0
- package/src/lib/stack.js +79 -0
- package/src/lib/store/index.js +44 -0
- package/src/locales/de.json +57 -0
- package/src/locales/en.json +57 -0
- package/src/locales/es.json +57 -0
- package/src/locales/fr.json +57 -0
- package/src/locales/it.json +57 -0
- package/src/locales/ja.json +57 -0
- package/src/locales/nl_NL.json +57 -0
- package/src/locales/pl.json +57 -0
- package/src/locales/ru.json +57 -0
- package/src/locales/sq.json +57 -0
- package/src/locales/zh_CN.json +57 -0
- package/src/proptypes/index.js +10 -0
- package/src/queries/index.js +16 -0
- package/src/styles/apps.css +248 -0
- package/src/styles/banner.css +64 -0
- package/src/styles/bar.css +106 -0
- package/src/styles/base.css +21 -0
- package/src/styles/claudy.css +98 -0
- package/src/styles/drawer.css +126 -0
- package/src/styles/index.styl +33 -0
- package/src/styles/indicators.css +58 -0
- package/src/styles/nav.css +81 -0
- package/src/styles/navigation_item.css +34 -0
- package/src/styles/searchbar.css +156 -0
- package/src/styles/settings.css +34 -0
- package/src/styles/storage.css +22 -0
- package/src/styles/supportModal.css +20 -0
- package/src/styles/theme.styl +25 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("bar",[],t):"object"==typeof exports?exports.bar=t():(e.cozy=e.cozy||{},e.cozy.bar=t())}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=748)}([function(e,t,n){e.exports=window.React||n(434)},function(e,t,n){e.exports=n(442)()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){e.exports=n(348)},function(e,t,n){var r=n(165);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function u(e){n(a,o,i,u,c,"next",e)}function c(e){n(a,o,i,u,c,"throw",e)}u(void 0)}))}}},function(e,t,n){var r=n(83),o=n(11);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";var r=n(32),o=n(2),i=n.n(o),a=n(14),u=n.n(a),c=function(e){return Array.from(e)[e.size-1]},s=function(){return{left:new Map,center:new Map,right:new Map,search:new Map}},l=n(80),f=["default","primary"],d={},p={name:"default",overrides:d},h=function(){return p},m={webviewContext:void 0},y=n(7),v=n.n(y),g=n(9),b=n.n(g),w=n(25),x=n(332),C=n.n(x),k=function(e,t){return t.slug===e.appSlug},S=function(e){return{type:"RECEIVE_APP_LIST",apps:e}},_=function(e){return{type:"RECEIVE_HOME_APP",homeApp:e}},A=function(e){return function(){var t=b()(v.a.mark((function t(n){var r,o,i,a,u,c;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.b.get.context();case 3:if(r=t.sent,o=r.data&&r.data.attributes&&r.data.attributes.default_redirection,i=null,o?(a=/^([^/]+)\/.*/,u=o.match(a),c=u&&u[1],i=j(c,e)):("home",i=j("home",e)),!i){t.next=9;break}return t.abrupt("return",n(_(i)));case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.warn("Cozy-bar cannot fetch home app data: ".concat(t.t0.message));case 14:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()},O={apps:[],homeApp:null,isFetching:!0,appName:null,appNamePrefix:null,appSlug:null,hasFetched:!1},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_APPS":return u()({},e,{isFetching:!0});case"FETCH_APPS_FAILURE":return u()({},e,{isFetching:!1});case"RECEIVE_APP":return u()({},e,{apps:C()(e.apps,[B(t.app)],(function(e,t){return e.slug===t.slug}))});case"RECEIVE_APP_LIST":var n=t.apps.map((function(t){return u()({},t,{isCurrentApp:k(e,t)})}));return u()({},e,{isFetching:!1,hasFetched:!0,apps:n});case"RECEIVE_HOME_APP":var r=t.homeApp;return k(e,r)?u()({},e,{homeApp:u()({},r,{isCurrentApp:!0})}):u()({},e,{homeApp:r});case"DELETE_APP":return u()({},e,{apps:e.apps.filter((function(e){return e.slug!==t.app.slug}))});case"SET_INFOS":return u()({},e,{appName:t.appName,appNamePrefix:t.appNamePrefix,appSlug:t.appSlug});default:return e}},B=function(e){return u()({},e,!!(t=e.attributes)&&Object.keys(t).reduce((function(e,n){return e[n.split("_").map((function(e,t){return t?e.charAt(0).toUpperCase()+e.slice(1):e})).join("")]=t[n],e}),{}),{href:e.links&&e.links.related});var t},j=function(e,t){return t.find((function(t){return t.slug===e}))},P=function(){return function(){var e=b()(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,w.b.get.storageData();case 3:return n=e.sent,e.abrupt("return",t({type:"RECEIVE_STORAGE",storageData:n}));case 7:return e.prev=7,e.t0=e.catch(0),console.warn&&console.warn("Cannot get Cozy storage informations"),e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()},T=function(){return function(){var e=b()(v.a.mark((function e(t,n){var r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n().settings.settingsAppURL){e.next=2;break}return e.abrupt("return",t({type:"RECEIVE_SETTINGS_URL",settingsAppURL:n().settings.settingsAppURL}));case 2:return e.prev=2,e.next=5,w.b.get.settingsAppURL();case 5:return r=e.sent,e.abrupt("return",t({type:"RECEIVE_SETTINGS_URL",settingsAppURL:r}));case 9:return e.prev=9,e.t0=e.catch(2),console.warn("Settings app is unavailable, settings links are disabled"),e.abrupt("return",null);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,n){return e.apply(this,arguments)}}()},z={contextNotExist:!1,isFetching:!1,isBusy:!1,settingsAppURL:null,storageData:null},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_SETTINGS":return u()({},e,{isFetching:!0});case"FETCH_SETTINGS_BUSY":return u()({},e,{isBusy:!0});case"FETCH_SETTINGS_SUCCESS":return u()({},e,{isFetching:!1,isBusy:!1});case"RECEIVE_NO_CONTEXT":return u()({},e,{contextNotExist:!0});case"RECEIVE_STORAGE":return u()({},e,{storageData:t.storageData});case"RECEIVE_SETTINGS_URL":return u()({},e,{settingsAppURL:t.settingsAppURL});case"LOG_OUT":return z;default:return e}},D=n(140),R=n(78),F=n.n(R),M=function(e){return e.claudyActions},N={claudyActions:[],contextNotExist:!1,helpLink:null,isFetching:!1},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_CONTEXT":return u()({},e,{isFetching:!0});case"FETCH_CONTEXT_SUCCESS":var n=t.context&&t.context.data&&t.context.data.attributes,r=F()("bar.claudy.force-all-actions")?Object.keys(D):n&&n.claudy_actions,o=r.map((function(e){if(D.hasOwnProperty(e))return Object.assign({},D[e],{slug:e})})).filter((function(e){return e}));return u()({},e,{helpLink:n&&n.help_link||null,claudyActions:o,isFetching:!1,contextNotExist:!1});case"RECEIVE_NO_CONTEXT":return u()({},e,{contextNotExist:!0});case"LOG_OUT":return N;default:return e}};n.d(t,"u",(function(){return $})),n.d(t,"A",(function(){return G})),n.d(t,"w",(function(){return q})),n.d(t,"x",(function(){return J})),n.d(t,"y",(function(){return H})),n.d(t,"a",(function(){return W})),n.d(t,"v",(function(){return Q})),n.d(t,"c",(function(){return V})),n.d(t,"q",(function(){return Y})),n.d(t,"b",(function(){return K})),n.d(t,"e",(function(){return Z})),n.d(t,"g",(function(){return X})),n.d(t,"j",(function(){return ee})),n.d(t,"d",(function(){return te})),n.d(t,"f",(function(){return ne})),n.d(t,"n",(function(){return re})),n.d(t,"m",(function(){return oe})),n.d(t,"l",(function(){return ie})),n.d(t,"i",(function(){return ae})),n.d(t,"h",(function(){return ue})),n.d(t,"p",(function(){return ce})),n.d(t,"o",(function(){return se})),n.d(t,"z",(function(){return le})),n.d(t,"k",(function(){return fe})),n.d(t,"r",(function(){return de})),n.d(t,"s",(function(){return pe})),n.d(t,"t",(function(){return he}));var U=function(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.apply(void 0,[n[e]].concat(o))}},$=function(e,t,n){return{type:"SET_CONTENT",location:e,content:t,id:n}},G=function(e,t){return{type:"UNSET_CONTENT",location:e,id:t}},q=l.d,J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;return{type:"SET_THEME",theme:{name:e,overrides:t}}},H=function(e){return{type:"SET_WEBVIEW_CONTEXT",payload:e}},W=function(){return function(){var e=b()(v.a.mark((function e(t){var n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t({type:"FETCH_APPS"}),e.next=4,w.b.get.apps();case 4:if(n=e.sent,r=n.map(B),n.length){e.next=8;break}throw new Error("No installed apps found by the bar");case 8:return e.next=10,t(A(r));case 10:return e.next=12,t(S(r));case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),t({type:"FETCH_APPS_FAILURE"}),console.warn(e.t0.message?e.t0.message:e.t0);case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}()},Q=function(e,t,n){return{type:"SET_INFOS",appName:e,appNamePrefix:t,appSlug:n}},V=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(){var t=b()(v.a.mark((function t(n){var r;return v.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n({type:"FETCH_SETTINGS"}),r=setTimeout((function(){e&&n({type:"FETCH_SETTINGS_BUSY"})}),450),t.next=4,n(P());case 4:return t.next=6,n(T());case 6:clearTimeout(r),n({type:"FETCH_SETTINGS_SUCCESS"});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},Y=function(){return function(){var e=b()(v.a.mark((function e(t){return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({type:"LOG_OUT"}),e.prev=1,e.next=4,w.b.logout();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.warn("Error while logging out in the cozy-bar",e.t0);case 9:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}()},K=function(){return function(){var e=b()(v.a.mark((function e(t,n){var r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t({type:"FETCH_CONTEXT"}),!n().context.contextNotExist){e.next=3;break}return e.abrupt("return",t({type:"FETCH_CONTEXT_SUCCESS",context:null}));case 3:return e.prev=3,e.next=6,w.b.get.context();case 6:return r=e.sent,e.abrupt("return",t({type:"FETCH_CONTEXT_SUCCESS",context:r}));case 10:return e.prev=10,e.t0=e.catch(3),e.t0.status&&404===e.t0.status&&t({type:"RECEIVE_NO_CONTEXT"}),console.warn("Cannot get Cozy context"),e.abrupt("return",null);case 15:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t,n){return e.apply(this,arguments)}}()},Z=U("content",(function(e,t){return c(e[t])&&c(e[t])[1]})),X=U("locale",l.b),ee=U("theme",(function(e){return e})),te=U("apps",(function(e){return e.apps?e.apps:[]})),ne=U("apps",(function(e){return e.homeApp})),re=U("apps",(function(e){return!!e&&e.isFetching})),oe=U("apps",k),ie=U("apps",(function(e){return e.hasFetched})),ae=U("settings",(function(e){return e.storageData})),ue=U("settings",(function(e){return e.settingsAppURL})),ce=U("settings",(function(e){return e.isBusy})),se=U("settings",(function(e){return e.isFetching})),le=(U("context",(function(e){return e.helpLink})),U("context",M),U("context",(function(e){var t=M(e);return!!t&&!!t.length}))),fe=U("unserializable",(function(e){return e.webviewContext})),de=function(e){return{type:"RECEIVE_APP",app:e}},pe=function(e){return{type:"DELETE_APP",app:e}},he={apps:E,content:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s(),t=arguments.length>1?arguments[1]:void 0;if(!t.location||void 0===typeof t.id)return e;switch(t.type){case"SET_CONTENT":var n=e[t.location];return n.set(t.id,t.content),u()({},e,i()({},t.location,n));case"UNSET_CONTENT":var r=e[t.location];return r.get(t.id)?(r.delete(t.id),u()({},e,i()({},t.location,r))):e;default:return e}},context:L,locale:l.c,settings:I,theme:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h(),t=arguments.length>1?arguments[1]:void 0;return"SET_THEME"===t.type?f.includes(t.theme.name)?t.theme:u()({},t.theme,{name:"default"}):e},unserializable:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_WEBVIEW_CONTEXT":return u()({},e,{webviewContext:t.payload});default:return e}}};Object(r.c)(he)},function(e,t,n){var r=n(2);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}},function(e,t,n){var r;
|
|
2
|
+
/*!
|
|
3
|
+
Copyright (c) 2017 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,"html{--white:#fff;--paleGrey:#f5f6f7;--silver:#d6d8da;--coolGrey:#95999d;--slateGrey:#5d6165;--charcoalGrey:#32363f;--black:#000;--overlay:rgba(50,54,63,.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,.cozy-ui-bar-CozyTheme--normal--GgDII{--primaryColor:#297ef2;--primaryColorDark:#0b61d6;--primaryColorLight:#5c9df5;--primaryColorLightest:#9fc4fb;--secondaryColor:#fd7461;--secondaryColorDark:#e3503b;--secondaryColorLight:#ffdeda;--secondaryColorLightest:#fecdc6;--primaryBackgroundLight:#f5faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f5f6f7;--primaryTextColor:#32363f;--secondaryTextColor:#95999d;--primaryContrastTextColor:#fff;--secondaryContrastTextColor:#fff;--dividerColor:rgba(29,33,42,.122);--successColor:#35ce68;--warningColor:#ff962f;--errorColor:#f52d2d;--errorColorDark:#a00808;--errorColorLight:#fcbfbf;--errorColorLightest:#fee6e6;--errorBackground:#fff2f2;--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)}@-webkit-keyframes cozy-ui-bar-spin--1NeSh{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes cozy-ui-bar-spin--1NeSh{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@-webkit-keyframes cozy-ui-bar-shake--8T61M{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 cozy-ui-bar-shake--8T61M{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)}}.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}.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}.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}.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}.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}.u-fs-normal{font-style:normal!important}.u-fs-italic{font-style:italic!important}.u-fw-normal{font-weight:400}.u-fw-bold{font-weight:700}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}html{--primaryFont:Lato,sans-serif}body,body button,body input,body optgroup,body select,body textarea{font-family:var(--primaryFont)}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}[role=application]{display:flex;height:inherit;flex:1 1 100%;overflow-x:hidden;overflow-y:auto}html,body{background-color:var(--white);color:var(--black)}[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 .35s cubic-bezier(0,.89,.44,1)}[data-input=radio] label:after,[data-input=checkbox] label:after{transition-duration:.2s;transition-property:opacity,transform}[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;transform:scale(1)}[data-input=checkbox] input[type=checkbox]:not(:checked)+label:after{opacity:0;transform:scale(0)}.cozy-ui-bar-c-modal--2ICub{display:flex;flex-flow:column nowrap;align-items:stretch}.cozy-ui-bar-c-modal-content--KVDws{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,.25) 0,rgba(214,216,218,.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,.25) 75%,rgba(214,216,218,.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}.cozy-ui-bar-c-modal-header--XED91,.cozy-ui-bar-c-modal-header--branded--uEj-8,.cozy-ui-bar-c-modal-footer--14fzp{flex:0 0 auto}.cozy-ui-bar-c-modal-container--30qmf{position:relative;z-index:70}.cozy-ui-bar-c-modal-wrapper--17kzj{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}.cozy-ui-bar-c-modal--2ICub{position:relative;border-radius:.5rem;max-height:100%;max-width:100%;background-color:var(--white);color:var(--charcoalGrey)}.cozy-ui-bar-c-modal--xsmall--35998{width:24rem}.cozy-ui-bar-c-modal--small--3G05m{width:34rem}.cozy-ui-bar-c-modal--medium--39Q8p{width:36rem}.cozy-ui-bar-c-modal--large--NVdKg{width:40rem}.cozy-ui-bar-c-modal--xlarge--2JDmw{width:50rem}.cozy-ui-bar-c-modal--xxlarge--2GW6J{width:60rem}.cozy-ui-bar-c-modal-header--XED91,.cozy-ui-bar-c-modal-header--branded--uEj-8{margin:0 0 1rem;padding:1.687rem 3rem 0 2rem;overflow:visible;min-height:2.5rem}.cozy-ui-bar-c-modal-header--XED91 h2,.cozy-ui-bar-c-modal-header--branded--uEj-8 h2{margin:0;font-weight:700}.cozy-ui-bar-c-modal-header--branded--uEj-8{padding:1rem 3rem}.cozy-ui-bar-c-modal-header--branded--uEj-8 img{display:block;max-height:3.5rem;margin:0 auto}.cozy-ui-bar-c-modal-illu-header--2k0gQ,.cozy-ui-bar-c-modal-illu-header--ghost--3zgoT{display:flex;align-items:center;justify-content:center;margin:0 0 1rem;max-width:100%}.cozy-ui-bar-c-modal-illu-header--2k0gQ>*,.cozy-ui-bar-c-modal-illu-header--ghost--3zgoT>*{max-width:inherit}.cozy-ui-bar-c-modal-illu-header--ghost--3zgoT{position:absolute;left:0;right:0;top:1rem;margin:.5rem 0;opacity:0;max-height:2rem;transition:opacity .15s ease-in,top .15s 50ms ease-in}.cozy-ui-bar-c-modal-illu-header--ghost--3zgoT>*{max-height:inherit}.cozy-ui-bar-c-modal-illu-header--ghost--3zgoT.cozy-ui-bar-is-active--M5uQG{top:0;opacity:1;transition:opacity .15s 50ms ease-in,top .15s ease-in}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-header--XED91{padding:1.187rem 3rem 0 1.5rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-header--XED91{padding:2.687rem 3rem 0}.cozy-ui-bar-c-modal-app--1Vluy{display:flex;align-items:center;font-size:1.25rem;color:var(--charcoalGrey)}.cozy-ui-bar-c-app-editor--2Ha3Y{font-weight:400}.cozy-ui-bar-c-modal-app-icon--2Pyc-{height:1.125rem;margin-right:.5rem}.cozy-ui-bar-c-modal-content-fixed--2C_-7{border-bottom:.063rem solid var(--dividerColor);flex:0 0 auto;padding:0 2rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content-fixed--2C_-7{padding:0 1.5rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content-fixed--2C_-7{padding:0 3rem}.cozy-ui-bar-c-modal-content--KVDws{padding:0 2rem}.cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:2rem;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content--KVDws{padding:0 1.5rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:1.5rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content--KVDws{padding:0 3rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:3rem}.cozy-ui-bar-c-modal-footer--14fzp{padding:1rem 1.25rem 1.25rem}.cozy-ui-bar-c-modal-footer--button--3yPje button{margin-bottom:.25rem}.cozy-ui-bar-c-modal-section--2tQ5k{border-top:.063rem solid var(--dividerColor)}.cozy-ui-bar-c-modal-close--HM_QO{box-sizing:border-box;position:absolute;top:1.5rem;right:1.5rem;margin:0;padding:.5rem;background-color:transparent;border:0;cursor:pointer;display:block;width:2.5rem;height:2.5rem;z-index:1}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-close--HM_QO{top:1rem;right:1rem}.cozy-ui-bar-c-modal--closable--2sytJ .cozy-ui-bar-c-modal-header--XED91{padding-right:4.5rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-close--HM_QO{top:2.5rem;right:2.5rem}.cozy-ui-bar-c-modal-close--notitle--2a-O4{top:.375rem;right:.375rem}.cozy-ui-bar-c-modal--overflowHidden--JNfIY{overflow:hidden}.cozy-ui-bar-c-modal-back-button--aTdxE{top:.375rem;left:.375rem;color:var(--coolGrey)}.cozy-ui-bar-c-modal-close--notitle--2a-O4+.cozy-ui-bar-c-modal-content--KVDws{margin-top:3rem}@media(max-width:63.938rem){.u-hide--mob{display:none!important}.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-spacellipsis-m{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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-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-m{font-style:normal!important}.u-fs-italic-m{font-style:italic!important}.u-fw-normal-m{font-weight:400}.u-fw-bold-m{font-weight:700}html,body{display:block;height:auto}[role=application]{overflow:visible}}@media(min-width:64rem){.u-hide--tablet{display:none!important}}@media(min-width:48.063rem){.u-hide--desk{display:none!important}}@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}.u-spacellipsis-t{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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}.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}.u-fs-normal-t{font-style:normal!important}.u-fs-italic-t{font-style:italic!important}.u-fw-normal-t{font-weight:400}.u-fw-bold-t{font-weight:700}.cozy-ui-bar-c-modal-wrapper--17kzj{padding:.5rem}.cozy-ui-bar-c-modal-header--XED91,.cozy-ui-bar-c-modal-header--branded--uEj-8{margin-bottom:.5rem;padding:1.187rem 2rem 0 1.5rem}.cozy-ui-bar-c-modal-header--XED91 h2,.cozy-ui-bar-c-modal-header--branded--uEj-8 h2{font-size:1.25rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-header--XED91{padding:.687rem 2rem 0 1rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content-fixed--2C_-7{padding:0 1rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content-fixed--2C_-7{padding:0 2rem}.cozy-ui-bar-c-modal-content--KVDws{padding:0 1.5rem}.cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:1.5rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content--KVDws{padding:0 1rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:1rem}.cozy-ui-bar-c-modal-close--HM_QO{top:.813rem;right:1rem}.cozy-ui-bar-c-modal--small-spacing--2NmIi .cozy-ui-bar-c-modal-close--HM_QO{top:.313rem;right:.5rem}}@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}.u-spacellipsis-s{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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}.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}.u-fs-normal-s{font-style:normal!important}.u-fs-italic-s{font-style:italic!important}.u-fw-normal-s{font-weight:400}.u-fw-bold-s{font-weight:700}.cozy-ui-bar-c-modal-wrapper--17kzj{justify-content:center;padding:1.5rem}.cozy-ui-bar-c-modal-wrapper--17kzj.cozy-ui-bar-c-modal-wrapper--fullscreen--12m40{padding:0}.cozy-ui-bar-c-modal--2ICub.cozy-ui-bar-c-modal--fullscreen--1k9gf{height:100%;width:100%;border-radius:0;box-sizing:border-box}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-header--XED91{padding:1.687rem 2rem 0}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content--KVDws{padding:0 2rem}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-content--KVDws:last-child{padding-bottom:2rem}.cozy-ui-bar-c-modal-footer--button--3yPje button{min-width:calc(50% - .5rem)}.cozy-ui-bar-c-modal--large-spacing--oIddB .cozy-ui-bar-c-modal-close--HM_QO{top:1.313rem;right:1.5rem}.cozy-ui-bar-c-modal-back-button--aTdxE{top:0;left:0}}@media(max-width:25rem){.cozy-ui-bar-c-modal--xsmall--35998{width:100%}}@media(max-width:35rem){.cozy-ui-bar-c-modal--small--3G05m{width:100%}}@media(max-width:39rem){.cozy-ui-bar-c-modal--medium--39Q8p{width:100%}}@media(max-width:46rem){.cozy-ui-bar-c-modal--large--NVdKg{width:100%}}@media(max-width:56rem){.cozy-ui-bar-c-modal--xlarge--2JDmw{width:100%}}@media(max-width:66rem){.cozy-ui-bar-c-modal--xxlarge--2GW6J{width:100%}}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/settings/palette.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/generic/animations.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/utilities/display.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/tools/mixins.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/utilities/text.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/settings/z-index.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/settings/fontstack.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/elements/defaults.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/components/forms.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/objects/layouts.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/components/modals.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/react/Modal/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Modal/node_modules/cozy-ui/stylus/settings/breakpoints.styl"],names:[],mappings:"AAwCA,KAeI,aACA,mBACA,iBACA,mBACA,oBACA,uBACA,aACA,4BAWA,iBACA,qBACA,sBAWA,qBACA,kBACA,oBASA,gBAaA,kBACA,mBACA,kBACA,sBACA,eC3CJ,CD0DA,2CAYI,uBACA,2BACA,4BACA,+BAYA,yBACA,6BACA,8BACA,iCAWA,iCACA,4BACA,iCAYA,2BACA,6BACA,gCACA,kCAaA,mCAYA,uBACA,uBAEA,qBACA,yBACA,0BACA,6BACA,0BAMA,mCAEA,gCACA,0BACA,0CAEA,8DACA,gEACA,6DACA,kDAEA,gDACA,kDACA,mDACA,8DAEA,mCACA,8CACA,2CACA,4CAEA,gCAEA,yBACA,oCACA,uCAEA,oCAEA,gCACA,6BAEA,gCACA,sCACA,wCAEA,uBACA,8CAEA,yBACA,kDAEA,sBACA,2CC3EJ,CCrLA,2CACI,KACI,sBD+LN,CC9LE,GACI,wBDgMN,CACF,CCrMA,mCACI,KACI,sBD+MN,CC9ME,GACI,wBDgNN,CACF,CC/MA,4CACI,QACI,+BD+NN,CC7NE,QACI,8BD+NN,CC7NE,YACI,+BD+NN,CC7NE,QACI,8BD+NN,CACF,CC3OA,oCACI,QACI,+BD2PN,CCzPE,QACI,8BD2PN,CCzPE,YACI,+BD2PN,CCzPE,QACI,8BD2PN,CACF,CE/PA,kBAXI,4BACA,mBACA,wBACA,yBACA,0BACA,oBACA,6BACA,qDACA,uCAAA,8BF6QJ,CElQA,QCoCI,uBACA,2BHiOJ,CGtKgB,MDzEZ,YFiQJ,CGxLgB,MDtEZ,cFiQJ,CG3LgB,MDnEZ,aFiQJ,CG9LgB,ODhEZ,oBFiQJ,CGjMgB,OD7DZ,oBFiQJ,CGpMgB,MD1DZ,aFiQJ,CGvMgB,ODvDZ,kBFiQJ,CG1MgB,UDpDZ,iBFiQJ,CG7MgB,gBDjDZ,uBFiQJ,CGhNgB,aD9CZ,oBFiQJ,CGnNgB,mBD3CZ,0BFiQJ,CI9UI,SACI,4BJybR,CI1bI,gBACI,mCJ4bR,CI7bI,YACI,+BJ+bR,CIhcI,UACI,6BJkcR,CIncI,aACI,gCJqcR,CItcI,kBACI,uBJwcR,CIzcI,cACI,uBJ2cR,CI5cI,WACI,8BJ8cR,CI/cI,YACI,+BJidR,CIldI,SACI,uBJodR,CIrdI,eACI,uBJudR,CIxdI,0BACI,6CJ0dR,CI3dI,gBACI,mCJ6dR,CI9dI,qBACI,wCJgeR,CIjeI,4BACI,+CJmeR,CIpeI,SACI,iCJseR,CIveI,mBACI,sCJyeR,CI1eI,WACI,mCJ4eR,CI7eI,WACI,mCJ+eR,CIhfI,QACI,gCJkfR,CInfI,cACI,uBJqfR,CItfI,SACI,4BJwfR,CInfA,aACI,qBJqfJ,CInfA,YACI,mBACA,gBACA,sBJqfJ,CGzYgB,gBCzGZ,gBACA,uBACA,wBJqfJ,CI1eA,eACI,aACA,gBJigBJ,CI/fI,iBACI,qBACA,cACA,gBACA,eJigBR,CI/fI,4BACI,sBJigBR,CI/fI,2BACI,mBACA,aJigBR,CI/foC,iCAC5B,4BACI,qBJigBV,CACF,CI/fI,aACI,iCACA,4DAAA,mDJigBR,CI/fI,2DAII,sCJigBR,CG7cY,WChDR,uBJggBJ,CGhdY,aC7CR,yBJggBJ,CGndY,YC1CR,yBJggBJ,CGtdY,aCvCR,yBJggBJ,CGzdY,YCpCR,yBJggBJ,CG5dY,aCjCR,yBJggBJ,CGrdgB,WC5BZ,2BArBA,yBJ0gBJ,CGzdgB,aCxBZ,4BAtBA,yBJ2gBJ,CG7dgB,YCpBZ,4BA1BA,yBJ+gBJ,CGjegB,aChBZ,yBA3BA,yBJghBJ,CGregB,YCZZ,6BA/BA,yBJohBJ,CGzegB,WCKZ,yBJyiBJ,CG9iBgB,YCQZ,0BJyiBJ,CGjjBgB,aCWZ,2BJyiBJ,CGpjBgB,cCcZ,4BJyiBJ,CGvjBgB,aC6BZ,2BJukBJ,CGpmBgB,aCgCZ,2BJukBJ,CGvmBgB,aC4CZ,eJslBJ,CGloBgB,WC+CZ,eJslBJ,CKjtBA,KACI,kBACA,eACA,eACA,wBACA,gBACA,gBACA,sBACA,oBACA,oBACA,2BACA,mBACA,kBACA,iBL6uBJ,CMjyBA,KACI,6BNmyBJ,CMjyBA,oEACI,8BNwyBJ,COpzBA,KACI,cPszBJ,COpzBA,KACI,cACA,kCACA,kCPszBJ,CO1yBA,KACE,WP4yBF,CO1yBA,KACE,aACA,sBACA,oBACA,YACA,YACA,QP4yBF,COpyBA,mBACI,aACA,eACA,cACA,kBACA,eP6yBJ,COvyBA,UAEI,8BACA,kBP8yBJ,CQ7rBA,yCAEI,YR+rBJ,CQ7rBI,gKLvGA,uBACA,2BH0yBJ,CQhsBI,qDACI,kBACA,qBACA,WACA,YACA,oBACA,cRmsBR,CQjsBQ,oIAEI,WACA,kBACA,OACA,MACA,sBACA,WACA,WRqsBZ,CQnsBQ,mEACI,oDRssBZ,CQpsBQ,iEACI,wBACA,qCRusBZ,CO/0BI,gCACI,kBACA,qCACA,uCPq1BR,COn1BI,0DACI,iFPq1BR,CO90BQ,qEAEI,qBPg1BZ,CO90BQ,mCACI,8BACA,4CPg1BZ,CO90BY,yCACI,gDPg1BhB,CO90BQ,kCACI,ySACA,uBPg1BZ,CO90BI,sDACQ,yPACA,uBPg1BZ,CO50BY,gEACI,6CP80BhB,CO50BY,+DACI,UACA,kBP80BhB,CO50BQ,qEACI,UACA,kBP80BZ,CSr5BA,4BACI,aACA,wBACA,mBTu5BJ,CSr5BA,oCAEI,6VAIA,4BACA,8BACA,0DACA,gDACA,4BACA,cACA,gCTm5BJ,CSj5BA,kHACI,aTq5BJ,CUx6BA,sCACI,kBACA,UV86BJ,CU56BA,oCACI,eACA,MACA,OACA,aACA,sBACA,mBACA,sBACA,YACA,YACA,gBACA,YV86BJ,CUr6BA,4BAEI,kBACA,oBACA,gBACA,eACA,8BACA,yBVi7BJ,CU96BI,oCACI,WVg7BR,CUj7BI,mCACI,WVw7BR,CUz7BI,oCACI,WVg8BR,CUj8BI,mCACI,WVw8BR,CUz8BI,oCACI,WVg9BR,CUj9BI,qCACI,WVw9BR,CUv8BA,+EAEI,gBACA,6BACA,iBACA,iBV29BJ,CUz9BI,qFACI,SACA,eV49BR,CUn9BA,4CAEI,iBV+9BJ,CU79BI,gDACI,cACA,kBACA,aV+9BR,CU79BA,uFACI,aACA,mBACA,uBACA,gBACA,cVg+BJ,CU99BI,2FACI,iBVi+BR,CU/9BA,+CAEI,kBACA,OACA,QACA,SACA,eACA,UACA,gBACA,qDVg+BJ,CU99BI,iDACI,kBVg+BR,CU99BA,4EACI,MACA,UACA,qDVg+BJ,CU99BA,8EACI,8BVg+BJ,CU39BA,8EACI,uBVk+BJ,CU79BA,gCACI,aACA,mBACA,kBACA,yBVo+BJ,CUl+BA,iCACI,eVo+BJ,CUl+BA,qCACI,gBACA,kBVo+BJ,CUl+BA,0CACI,gDACA,cACA,cVo+BJ,CUl+BA,qFACI,gBVo+BJ,CU/9BA,qFACI,cVs+BJ,CUj+BA,oCAEI,cVu+BJ,CUr+BI,+CACI,oBACA,iCACA,+BVu+BR,CU/9BA,+EACI,gBVy+BJ,CUv+BI,0FACI,qBVy+BR,CUj+BA,+EACI,cV2+BJ,CUz+BI,0FACI,mBV2+BR,CUn+BA,mCAEI,4BV4+BJ,CUz+BI,kDACI,oBV2+BR,CUt+BA,oCACI,4CV6+BJ,CUz+BA,kCACI,sBACA,kBACA,WACA,aACA,SACA,cACA,6BACA,SACA,eACA,cACA,aACA,cACA,SV2+BJ,CUr+BA,6EACI,SACA,UV6+BJ,CUv+BA,yEACI,oBV++BJ,CU5+BA,6EACI,WACA,YV8+BJ,CUx+BA,2CACI,YACA,aVg/BJ,CU9+BA,4CACI,eVg/BJ,CU9+BA,wCACI,YACA,aACA,qBVg/BJ,CWpqCA,+EACI,eX4qCJ,CY3qCqE,4BAAA,aV1E7D,sBFqQN,CGrKkB,QD9EhB,YFyWF,CG3RkB,QD3EhB,cFyWF,CG9RkB,QDxEhB,aFyWF,CGjSkB,SDrEhB,oBFyWF,CGpSkB,SDlEhB,oBFyWF,CGvSkB,QD/DhB,aFyWF,CG1SkB,SD5DhB,kBFyWF,CG7SkB,YDzDhB,iBFyWF,CGhTkB,kBDtDhB,uBFyWF,CGnTkB,eDnDhB,oBFyWF,CGtTkB,qBDhDhB,0BFyWF,CGzTkB,kBC9GhB,gBACA,uBACA,wBJygBF,CG7ZkB,aCjChB,2BArBA,yBJ2kBF,CGrhBkB,eC7BhB,4BAtBA,yBJ4kBF,CGzhBkB,cCzBhB,4BA1BA,yBJglBF,CG7hBkB,eCrBhB,yBA3BA,yBJilBF,CGjiBkB,cCjBhB,6BA/BA,yBJqlBF,CGriBkB,aCAhB,yBJklBF,CGllBkB,cCGhB,0BJklBF,CGrlBkB,eCMhB,2BJklBF,CGxlBkB,gBCShB,4BJklBF,CG3lBkB,eCwBhB,2BJ8lBF,CGtnBkB,eC2BhB,2BJ8lBF,CGznBkB,eCuChB,eJ6mBF,CGppBkB,aC0ChB,eJ6mBF,CY7qBmE,UL1E7D,cACA,WP4yBN,CYnuBmE,mBL/D7D,gBP8yBN,CAnjBF,CY/DyD,wBAAA,gBVnMjD,sBFsQN,CACF,CYjFwD,4BAAA,cVlLhD,sBFuQN,CACF,CGlLqD,wBAEjC,QD9EhB,YFmSF,CGrNkB,QD3EhB,cFmSF,CGxNkB,QDxEhB,aFmSF,CG3NkB,SDrEhB,oBFmSF,CG9NkB,SDlEhB,oBFmSF,CGjOkB,QD/DhB,aFmSF,CGpOkB,SD5DhB,kBFmSF,CGvOkB,YDzDhB,iBFmSF,CG1OkB,kBDtDhB,uBFmSF,CG7OkB,eDnDhB,oBFmSF,CGhPkB,qBDhDhB,0BFmSF,CGnPkB,kBC9GhB,gBACA,uBACA,wBJ2fF,CG/YkB,aCjChB,2BArBA,yBJ+hBF,CGzekB,eC7BhB,4BAtBA,yBJgiBF,CG7ekB,cCzBhB,4BA1BA,yBJoiBF,CGjfkB,eCrBhB,yBA3BA,yBJqiBF,CGrfkB,cCjBhB,6BA/BA,yBJyiBF,CGzfkB,aCAhB,yBJsjBF,CGtjBkB,cCGhB,0BJsjBF,CGzjBkB,eCMhB,2BJsjBF,CG5jBkB,gBCShB,4BJsjBF,CG/jBkB,eCwBhB,2BJ8kBF,CGtmBkB,eC2BhB,2BJ8kBF,CGzmBkB,eCuChB,eJ6lBF,CGpoBkB,aC0ChB,eJ6lBF,CYzrBiE,oCF1B3D,aVi7BN,CYv5BiE,+EFgB3D,oBACA,8BV89BN,CU59BM,qFACI,iBV+9BV,CYn/BiE,8EFgE3D,2BVi+BN,CYjiCiE,qFF8F3D,cVq+BN,CYnkCiE,qFFoG3D,cVu+BN,CY3kCiE,oCFgH3D,gBVw+BN,CUt+BM,+CACI,qBVw+BV,CY3lCiE,+EF4H3D,cV0+BN,CUx+BM,0FACI,mBV0+BV,CYzmCiE,kCF6K3D,YACA,UV4+BN,CY1pCiE,6EFqL3D,YACA,WV8+BN,CA93BF,CGtPqD,wBAEjC,QD9EhB,YFsUF,CGxPkB,QD3EhB,cFsUF,CG3PkB,QDxEhB,aFsUF,CG9PkB,SDrEhB,oBFsUF,CGjQkB,SDlEhB,oBFsUF,CGpQkB,QD/DhB,aFsUF,CGvQkB,SD5DhB,kBFsUF,CG1QkB,YDzDhB,iBFsUF,CG7QkB,kBDtDhB,uBFsUF,CGhRkB,eDnDhB,oBFsUF,CGnRkB,qBDhDhB,0BFsUF,CGtRkB,kBC9GhB,gBACA,uBACA,wBJkgBF,CGtZkB,aCjChB,2BArBA,yBJqjBF,CG/fkB,eC7BhB,4BAtBA,yBJsjBF,CGngBkB,cCzBhB,4BA1BA,yBJ0jBF,CGvgBkB,eCrBhB,yBA3BA,yBJ2jBF,CG3gBkB,cCjBhB,6BA/BA,yBJ+jBF,CG/gBkB,aCAhB,yBJokBF,CGpkBkB,cCGhB,0BJokBF,CGvkBkB,eCMhB,2BJokBF,CG1kBkB,gBCShB,4BJokBF,CG7kBkB,eCwBhB,2BJslBF,CG9mBkB,eC2BhB,2BJslBF,CGjnBkB,eCuChB,eJqmBF,CG5oBkB,aC0ChB,eJqmBF,CYnrBkE,oCF5C5D,uBACA,cV+6BN,CYp4BkE,mFFnB5D,SVy9BN,CYt8BkE,mEFf5D,YACA,WACA,gBACA,qBV09BN,CY98BkE,8EFwD5D,uBVm+BN,CY3hCkE,+EF0H5D,cV4+BN,CU1+BM,0FACI,mBV4+BV,CYzmCkE,kDFwIxD,2BV4+BV,CYpnCkE,6EFmL5D,aACA,YV++BN,CYnqCkE,wCFmM5D,MACA,MVi/BN,CA13BF,CUnVqC,wBAAA,oCACzB,UVg7BV,CACF,CUl7BqC,wBAAA,mCACzB,UVw7BV,CACF,CU17BqC,wBAAA,oCACzB,UVg8BV,CACF,CUl8BqC,wBAAA,mCACzB,UVw8BV,CACF,CU18BqC,wBAAA,oCACzB,UVg9BV,CACF,CUl9BqC,wBAAA,qCACzB,UVw9BV,CACF,CAAA",file:"styles.styl",sourcesContent:["@require '../tools/mixins'\n\n$errorColor=#F52D2D\n$errorBackground=#FFF2F2\n\n$successColor=#35CE68\n$warningColor=#FF962F\n$infoColor=#34373F\n\n// @stylint off\n/*------------------------------------*\\\n Palette\n =====\n\\*------------------------------------*/\n/*\n Settings\n\n Weight: -10\n\n Styleguide Settings\n*/\n\n/*\n Colors\n\n Colors used in the user interface.\n\n ℹ️ In general, you are advised to use [theme colors](#kssref-settings-theme) when\n building your components: this will ensure your components react correctly when\n changing the theme.\n\n If you need to access an absolute color that is not semantic, you can use\n\n ```\n import palette from 'cozy-ui/transpiled/react/palette'\n <div style={{ backgroundColor: palette.melon }} />\n ```\n\n Styleguide Settings.colors\n*/\nhtml\n /*\n Grey\n\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\n Styleguide Settings.colors.grey\n */\n --white #FFFFFF\n --paleGrey #F5F6F7\n --silver #D6D8Da\n --coolGrey #95999D\n --slateGrey #5D6165\n --charcoalGrey #32363F\n --black #000000\n --overlay rgba(50, 54, 63, .5)\n\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 /*\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 /*\n Orange\n\n Stylus: mango - #FF962F, CSS: var(--mango)\n\n Styleguide Settings.colors.orange\n */\n --mango #FF962F\n\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\n/*\n Theme\n\n Semantic colors suitable for theming. We encourage users of cozy-ui to use semantic colors\n instead of absolute colors to facilitate theming.\n\n We try to use a naming schema that is close to what is use in [Material-UI React's theming](https://material-ui.com/customization/palette/#palette-colors).\n It is possible that we have some discrepancies. If you see something that seems out\n of the ordinary and where you think we could reduce the difference with MUI, please\n do not hesitate to [open an issue](https://github.com/cozy/cozy-ui/issues/new).\n\n Styleguide Settings.theme\n*/\nhtml, .CozyTheme--normal\n /*\n Primary\n\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColorLightest - #9FC4FB, CSS: var(--primaryColorLightest)\n Stylus: primaryContrastTextColor - #FFFFFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColor #297EF2\n --primaryColorDark #0B61D6\n --primaryColorLight #5C9DF5\n --primaryColorLightest #9FC4FB\n\n /*\n Secondary\n\n Stylus: secondaryColor - #fd7461, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #E3503B, CSS: var(--secondaryColorDark)\n Stylus: secondaryColorLight - #ffdeda, CSS: var(--secondaryColorLight)\n Stylus: secondaryColorLightest - #FECDC6, CSS: var(--secondaryColorLightest)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColor #fd7461\n --secondaryColorDark #E3503B\n --secondaryColorLight #ffdeda // lighten(dodgerBlue, 24)\n --secondaryColorLightest #FECDC6\n\n /*\n Background colors\n\n Stylus: primaryBackgroundLight - #F5FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F5F6F7, CSS: var(--defaultBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #F5FAFF\n --paperBackgroundColor: #FFF\n --defaultBackgroundColor: #F5F6F7 // paleGrey\n\n /*\n Text colors\n\n Stylus: primaryTextColor - #32363F, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #95999D, CSS: var(--secondaryTextColor)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor #32363F\n --secondaryTextColor #95999D\n --primaryContrastTextColor #FFF\n --secondaryContrastTextColor #FFF\n\n\n /*\n Components colors\n\n Be careful to use the semantic variable, not the hexa color.\n In this case the real color is `#1D212A1F`, and becomes `#E3E4E5` on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.components\n */\n --dividerColor: #1D212A1F // grey[900] with 12% opacity\n\n /*\n Intention colors\n\n Stylus: successColor - #35CE68, CSS: var(--successColor)\n Stylus: warningColor - #FF962F, CSS: var(--warningColor)\n Stylus: errorColor - #F52D2D, CSS: var(--errorColor)\n Stylus: infoColor - #34373F, CSS: var(--infoColor)\n\n Styleguide Settings.theme.intention\n */\n --successColor: $successColor\n --warningColor: $warningColor\n\n --errorColor: $errorColor\n --errorColorDark: darken($errorColor, 24)\n --errorColorLight: lighten($errorColor, 30)\n --errorColorLightest: lighten($errorColor, 38)\n --errorBackground: $errorBackground\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\n --linkColor var(--primaryColor)\n --linkTextDecoration none\n --linkColorActive var(--primaryColorDark)\n\n --invertedTabsActiveTextColor var(--primaryContrastTextColor)\n --invertedTabsInactiveTextColor var(--primaryContrastTextColor)\n --invertedTabsIndicatorColor var(--primaryContrastTextColor)\n --invertedTabsBackgroundColor var(--primaryColor)\n\n --regularButtonPrimaryColor: var(--primaryColor)\n --regularButtonSecondaryColor: var(--primaryColor)\n --regularButtonActiveColor: var(--primaryColorDark)\n --regularButtonConstrastColor: var(--primaryContrastTextColor)\n\n --secondaryButtonPrimaryColor: #FFF\n --secondaryButtonSecondaryColor: var(--silver)\n --secondaryButtonActiveColor: var(--silver)\n --secondaryButtonContrastColor: var(--black)\n\n --dividerColor2: var(--coolGrey)\n\n --iconColor: currentColor\n --textIconColor: var(--charcoalGrey)\n --actionMenuIconColor: var(--slateGrey)\n\n --neutralBackground: var(--paleGrey)\n\n --buttonTextTransform uppercase\n --buttonBorderRadius rem(2)\n\n --navTextColor var(--slateGrey)\n --navTextActiveColor var(--slateGrey)\n --navTextHoverColor var(--charcoalGrey)\n\n --alertErrorColor #fff\n --alertErrorBackgroundColor var(--errorColor)\n\n --alertSuccessColor #fff\n --alertSuccessBackgroundColor var(--successColor)\n\n --alertInfoColor #fff\n --alertInfoBackgroundColor var(--slateGrey)\n// @stylint on\n","html {\n/*\n Grey\n\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\n Styleguide Settings.colors.grey\n */\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\n\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColorLightest - #9FC4FB, CSS: var(--primaryColorLightest)\n Stylus: primaryContrastTextColor - #FFFFFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColor: #297ef2;\n --primaryColorDark: #0b61d6;\n --primaryColorLight: #5c9df5;\n --primaryColorLightest: #9fc4fb;\n/*\n Secondary\n\n Stylus: secondaryColor - #fd7461, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #E3503B, CSS: var(--secondaryColorDark)\n Stylus: secondaryColorLight - #ffdeda, CSS: var(--secondaryColorLight)\n Stylus: secondaryColorLightest - #FECDC6, CSS: var(--secondaryColorLightest)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColor: #fd7461;\n --secondaryColorDark: #e3503b;\n --secondaryColorLight: #ffdeda;\n --secondaryColorLightest: #fecdc6;\n/*\n Background colors\n\n Stylus: primaryBackgroundLight - #F5FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F5F6F7, CSS: var(--defaultBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #f5faff;\n --paperBackgroundColor: #fff;\n --defaultBackgroundColor: #f5f6f7;\n/*\n Text colors\n\n Stylus: primaryTextColor - #32363F, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #95999D, CSS: var(--secondaryTextColor)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor: #32363f;\n --secondaryTextColor: #95999d;\n --primaryContrastTextColor: #fff;\n --secondaryContrastTextColor: #fff;\n/*\n Components colors\n\n Be careful to use the semantic variable, not the hexa color.\n In this case the real color is `#1D212A1F`, and becomes `#E3E4E5` on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.components\n */\n --dividerColor: rgba(29,33,42,0.122);\n/*\n Intention colors\n\n Stylus: successColor - #35CE68, CSS: var(--successColor)\n Stylus: warningColor - #FF962F, CSS: var(--warningColor)\n Stylus: errorColor - #F52D2D, CSS: var(--errorColor)\n Stylus: infoColor - #34373F, CSS: var(--infoColor)\n\n Styleguide Settings.theme.intention\n */\n --successColor: #35ce68;\n --warningColor: #ff962f;\n --errorColor: #f52d2d;\n --errorColorDark: #a00808;\n --errorColorLight: #fcbfbf;\n --errorColorLightest: #fee6e6;\n --errorBackground: #fff2f2;\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}\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:global(.u-visuallyhidden) {\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:global(.u-hide) {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n :global(.u-hide--mob) {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n :global(.u-hide--tablet) {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n :global(.u-hide--desk) {\n display: none !important;\n }\n}\n:global(.u-dn) {\n display: none;\n}\n:global(.u-di) {\n display: inline;\n}\n:global(.u-db) {\n display: block;\n}\n:global(.u-dib) {\n display: inline-block;\n}\n:global(.u-dit) {\n display: inline-table;\n}\n:global(.u-dt) {\n display: table;\n}\n:global(.u-dtc) {\n display: table-cell;\n}\n:global(.u-dt-row) {\n display: table-row;\n}\n:global(.u-dt-row-group) {\n display: table-row-group;\n}\n:global(.u-dt-column) {\n display: table-column;\n}\n:global(.u-dt-column-group) {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n :global(.u-dn-t) {\n display: none;\n }\n :global(.u-di-t) {\n display: inline;\n }\n :global(.u-db-t) {\n display: block;\n }\n :global(.u-dib-t) {\n display: inline-block;\n }\n :global(.u-dit-t) {\n display: inline-table;\n }\n :global(.u-dt-t) {\n display: table;\n }\n :global(.u-dtc-t) {\n display: table-cell;\n }\n :global(.u-dt-row-t) {\n display: table-row;\n }\n :global(.u-dt-row-group-t) {\n display: table-row-group;\n }\n :global(.u-dt-column-t) {\n display: table-column;\n }\n :global(.u-dt-column-group-t) {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-dn-s) {\n display: none;\n }\n :global(.u-di-s) {\n display: inline;\n }\n :global(.u-db-s) {\n display: block;\n }\n :global(.u-dib-s) {\n display: inline-block;\n }\n :global(.u-dit-s) {\n display: inline-table;\n }\n :global(.u-dt-s) {\n display: table;\n }\n :global(.u-dtc-s) {\n display: table-cell;\n }\n :global(.u-dt-row-s) {\n display: table-row;\n }\n :global(.u-dt-row-group-s) {\n display: table-row-group;\n }\n :global(.u-dt-column-s) {\n display: table-column;\n }\n :global(.u-dt-column-group-s) {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-dn-m) {\n display: none;\n }\n :global(.u-di-m) {\n display: inline;\n }\n :global(.u-db-m) {\n display: block;\n }\n :global(.u-dib-m) {\n display: inline-block;\n }\n :global(.u-dit-m) {\n display: inline-table;\n }\n :global(.u-dt-m) {\n display: table;\n }\n :global(.u-dtc-m) {\n display: table-cell;\n }\n :global(.u-dt-row-m) {\n display: table-row;\n }\n :global(.u-dt-row-group-m) {\n display: table-row-group;\n }\n :global(.u-dt-column-m) {\n display: table-column;\n }\n :global(.u-dt-column-group-m) {\n display: table-column-group;\n }\n}\n:global(.u-black) {\n color: var(--black) !important;\n}\n:global(.u-charcoalGrey) {\n color: var(--charcoalGrey) !important;\n}\n:global(.u-coolGrey) {\n color: var(--coolGrey) !important;\n}\n:global(.u-silver) {\n color: var(--silver) !important;\n}\n:global(.u-slateGrey) {\n color: var(--slateGrey) !important;\n}\n:global(.u-lightishPurple) {\n color: #b449e7 !important;\n}\n:global(.u-dodgerBlue) {\n color: #297ef2 !important;\n}\n:global(.u-overlay) {\n color: var(--overlay) !important;\n}\n:global(.u-paleGrey) {\n color: var(--paleGrey) !important;\n}\n:global(.u-monza) {\n color: #dd0505 !important;\n}\n:global(.u-pomegranate) {\n color: #f52d2d !important;\n}\n:global(.u-primaryBackgroundLight) {\n color: var(--primaryBackgroundLight) !important;\n}\n:global(.u-primaryColor) {\n color: var(--primaryColor) !important;\n}\n:global(.u-primaryColorLight) {\n color: var(--primaryColorLight) !important;\n}\n:global(.u-primaryContrastTextColor) {\n color: var(--primaryContrastTextColor) !important;\n}\n:global(.u-error) {\n color: var(--errorColor) !important;\n}\n:global(.u-errorBackground) {\n color: var(--errorBackground) !important;\n}\n:global(.u-success) {\n color: var(--successColor) !important;\n}\n:global(.u-warning) {\n color: var(--warningColor) !important;\n}\n:global(.u-info) {\n color: var(--infoColor) !important;\n}\n:global(.u-weirdGreen) {\n color: #40de8e !important;\n}\n:global(.u-white) {\n color: var(--white) !important;\n}\n:global(.u-breakword) {\n word-break: break-word;\n}\n:global(.u-ellipsis) {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n:global(.u-spacellipsis) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n}\n@media (max-width: 30rem) {\n :global(.u-spacellipsis-t) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-spacellipsis-s) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-spacellipsis-m) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n:global(.u-midellipsis) {\n display: flex;\n flex-wrap: nowrap;\n}\n:global(.u-midellipsis) > * {\n display: inline-block;\n max-width: 50%;\n overflow: hidden;\n white-space: pre;\n}\n:global(.u-midellipsis) > :first-child {\n text-overflow: ellipsis;\n}\n:global(.u-midellipsis) > :last-child {\n text-overflow: clip;\n direction: rtl;\n}\n@supports (text-overflow: '[...]') {\n :global(.u-midellipsis) > :first-child {\n text-overflow: '[...]';\n }\n}\n:global(.u-link):link {\n color: var(--linkColor) !important;\n text-decoration: var(--linkTextDecoration) !important;\n}\n:global(.u-link):visited,\n:global(.u-link):active,\n:global(.u-link):hover,\n:global(.u-link):focus {\n color: var(--linkColorActive) !important;\n}\n:global(.u-lh-tiny) {\n line-height: 1 !important;\n}\n:global(.u-lh-xsmall) {\n line-height: 1.1 !important;\n}\n:global(.u-lh-small) {\n line-height: 1.2 !important;\n}\n:global(.u-lh-medium) {\n line-height: 1.3 !important;\n}\n:global(.u-lh-large) {\n line-height: 1.4 !important;\n}\n:global(.u-lh-xlarge) {\n line-height: 1.5 !important;\n}\n:global(.u-fz-tiny) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n}\n:global(.u-fz-xsmall) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n}\n:global(.u-fz-small) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n}\n:global(.u-fz-medium) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n}\n:global(.u-fz-large) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n}\n@media (max-width: 30rem) {\n :global(.u-fz-tiny-t) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-t) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-t) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-t) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.u-fz-large-t) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fz-tiny-s) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-s) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-s) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-s) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.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 :global(.u-fz-tiny-m) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-m) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-m) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-m) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.u-fz-large-m) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n:global(.u-ta-left) {\n text-align: left !important;\n}\n:global(.u-ta-right) {\n text-align: right !important;\n}\n:global(.u-ta-center) {\n text-align: center !important;\n}\n:global(.u-ta-justify) {\n text-align: justify !important;\n}\n@media (max-width: 30rem) {\n :global(.u-ta-left-t) {\n text-align: left !important;\n }\n :global(.u-ta-right-t) {\n text-align: right !important;\n }\n :global(.u-ta-center-t) {\n text-align: center !important;\n }\n :global(.u-ta-justify-t) {\n text-align: justify !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-ta-left-s) {\n text-align: left !important;\n }\n :global(.u-ta-right-s) {\n text-align: right !important;\n }\n :global(.u-ta-center-s) {\n text-align: center !important;\n }\n :global(.u-ta-justify-s) {\n text-align: justify !important;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-ta-left-m) {\n text-align: left !important;\n }\n :global(.u-ta-right-m) {\n text-align: right !important;\n }\n :global(.u-ta-center-m) {\n text-align: center !important;\n }\n :global(.u-ta-justify-m) {\n text-align: justify !important;\n }\n}\n:global(.u-fs-normal) {\n font-style: normal !important;\n}\n:global(.u-fs-italic) {\n font-style: italic !important;\n}\n@media (max-width: 30rem) {\n :global(.u-fs-normal-t) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-t) {\n font-style: italic !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fs-normal-s) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-s) {\n font-style: italic !important;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-fs-normal-m) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-m) {\n font-style: italic !important;\n }\n}\n:global(.u-fw-normal) {\n font-weight: normal;\n}\n:global(.u-fw-bold) {\n font-weight: bold;\n}\n@media (max-width: 30rem) {\n :global(.u-fw-normal-t) {\n font-weight: normal;\n }\n :global(.u-fw-bold-t) {\n font-weight: bold;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fw-normal-s) {\n font-weight: normal;\n }\n :global(.u-fw-bold-s) {\n font-weight: bold;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-fw-normal-m) {\n font-weight: normal;\n }\n :global(.u-fw-bold-m) {\n font-weight: bold;\n }\n}\n@media (pointer: coarse) {\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}\nhtml {\n --primaryFont: Lato, sans-serif;\n}\nbody,\nbody button,\nbody input,\nbody optgroup,\nbody select,\nbody textarea {\n font-family: var(--primaryFont);\n}\nhtml {\n font-size: 100%;\n}\nbody {\n font: 100%/1.5;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n}\nhtml {\n height: 100%;\n}\nbody {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n width: 100vw;\n height: 100%;\n margin: 0;\n}\n@media (max-width: 63.938rem) {\n html,\n body {\n display: block;\n height: auto;\n }\n}\n[role=application] {\n display: flex;\n height: inherit;\n flex: 1 1 100%;\n overflow-x: hidden;\n overflow-y: auto;\n}\n@media (max-width: 63.938rem) {\n [role=application] {\n overflow: visible;\n }\n}\nhtml,\nbody {\n background-color: var(--white);\n color: var(--black);\n}\n[data-input=radio],\n[data-input=checkbox] {\n display: flex;\n}\n[data-input=radio] input[type=radio],\n[data-input=checkbox] input[type=radio],\n[data-input=radio] input[type=checkbox],\n[data-input=checkbox] input[type=checkbox] {\n display: none !important;\n visibility: hidden !important;\n}\n[data-input=radio] label,\n[data-input=checkbox] label {\n position: relative;\n display: inline-block;\n width: 1rem;\n height: 1rem;\n padding-left: 1.4rem;\n cursor: pointer;\n}\n[data-input=radio] label::before,\n[data-input=checkbox] label::before,\n[data-input=radio] label::after,\n[data-input=checkbox] label::after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n box-sizing: border-box;\n width: 1rem;\n height: 1rem;\n}\n[data-input=radio] label::before,\n[data-input=checkbox] label::before {\n transition: box-shadow 350ms cubic-bezier(0, 0.89, 0.44, 1);\n}\n[data-input=radio] label::after,\n[data-input=checkbox] label::after {\n transition-duration: 0.2s;\n transition-property: opacity, transform;\n}\n@media (max-width: 48rem) {\n}\n@media (max-width: 48rem) {\n}\n[data-input=radio] label::before {\n border-radius: 50%;\n border: 0.125rem solid var(--coolGrey);\n box-shadow: inset 0 0 0 1rem transparent;\n}\n[data-input=radio] input[type=radio]:checked + label::before {\n box-shadow: inset 0 0 0 0.188rem var(--paleGrey), inset 0 0 0 1rem var(--dodgerBlue);\n}\n[data-input=checkbox] label::before,\n[data-input=checkbox] label::after {\n border-radius: 0.125rem;\n}\n[data-input=checkbox] label::before {\n background-color: var(--white);\n box-shadow: inset 0 0 0 0.125rem var(--silver);\n}\n[data-input=checkbox] label::before:hover {\n box-shadow: inset 0 0 0 0.125rem var(--dodgerBlue);\n}\n[data-input=checkbox] label::after {\n background-image: url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMjAnIGhlaWdodD0nMjAnIHZpZXdCb3g9JzAgMCAyMCAyMCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJz4KICAgIDxwYXRoIGQ9J00zIDEwLjAxOWw0LjUyMyA0LjUyMyA5LjU0MS05LjU0MScgc3Ryb2tlPScjRkZGJyBzdHJva2Utd2lkdGg9JzInIGZpbGw9Im5vbmUiLz4KPC9zdmc+Cg==\");\n background-size: contain;\n}\n[data-input=checkbox][aria-checked='mixed'] label::after {\n background-image: url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj48cGF0aCBkPSJNMy40OTcgMTBoMTMuMDA2IiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iMiIgLz48L3N2Zz4K\");\n background-size: contain;\n}\n[data-input=checkbox] input[type=checkbox]:checked + label::before {\n box-shadow: inset 0 0 0 1rem var(--dodgerBlue);\n}\n[data-input=checkbox] input[type=checkbox]:checked + label::after {\n opacity: 1;\n transform: scale(1);\n}\n[data-input=checkbox] input[type=checkbox]:not(:checked) + label::after {\n opacity: 0;\n transform: scale(0);\n}\n.c-modal {\n display: flex;\n flex-flow: column nowrap;\n align-items: stretch;\n}\n.c-modal-content {\n 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%;\n background-repeat: no-repeat;\n background-color: var(--white);\n background-size: 100% 2rem, 100% 2rem, 100% 0.5rem, 100% 0.5rem;\n background-attachment: local, local, scroll, scroll;\n background-clip: padding-box;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n.c-modal-header,\n.c-modal-header--branded,\n.c-modal-footer {\n flex: 0 0 auto;\n}\n@media (max-width: 63.938rem) {\n}\n@media (max-width: 63.938rem) {\n}\n.c-modal-container {\n position: relative;\n z-index: 70;\n}\n.c-modal-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n box-sizing: border-box;\n width: 100vw;\n height: 100%;\n overflow-y: auto;\n padding: 3rem;\n}\n@media (max-width: 48rem) {\n .c-modal-wrapper {\n justify-content: center;\n padding: 1.5rem;\n }\n}\n@media (max-width: 30rem) {\n .c-modal-wrapper {\n padding: 0.5rem;\n }\n}\n.c-modal {\n position: relative;\n border-radius: 0.5rem;\n max-height: 100%;\n max-width: 100%;\n background-color: var(--white);\n color: var(--charcoalGrey);\n}\n.c-modal--xsmall {\n width: 24rem;\n}\n@media (max-width: 25rem) {\n .c-modal--xsmall {\n width: 100%;\n }\n}\n.c-modal--small {\n width: 34rem;\n}\n@media (max-width: 35rem) {\n .c-modal--small {\n width: 100%;\n }\n}\n.c-modal--medium {\n width: 36rem;\n}\n@media (max-width: 39rem) {\n .c-modal--medium {\n width: 100%;\n }\n}\n.c-modal--large {\n width: 40rem;\n}\n@media (max-width: 46rem) {\n .c-modal--large {\n width: 100%;\n }\n}\n.c-modal--xlarge {\n width: 50rem;\n}\n@media (max-width: 56rem) {\n .c-modal--xlarge {\n width: 100%;\n }\n}\n.c-modal--xxlarge {\n width: 60rem;\n}\n@media (max-width: 66rem) {\n .c-modal--xxlarge {\n width: 100%;\n }\n}\n@media (max-width: 48rem) {\n .c-modal-wrapper.c-modal-wrapper--fullscreen {\n padding: 0;\n }\n}\n@media (max-width: 48rem) {\n .c-modal.c-modal--fullscreen {\n height: 100%;\n width: 100%;\n border-radius: 0;\n box-sizing: border-box;\n }\n}\n.c-modal-header,\n.c-modal-header--branded {\n margin: 0 0 1rem;\n padding: 1.687rem 3rem 0 2rem;\n overflow: visible;\n min-height: 2.5rem;\n}\n.c-modal-header h2,\n.c-modal-header--branded h2 {\n margin: 0;\n font-weight: bold;\n}\n@media (max-width: 30rem) {\n .c-modal-header,\n .c-modal-header--branded {\n margin-bottom: 0.5rem;\n padding: 1.187rem 2rem 0 1.5rem;\n }\n .c-modal-header h2,\n .c-modal-header--branded h2 {\n font-size: 1.25rem;\n }\n}\n.c-modal-header--branded {\n padding: 1rem 3rem;\n}\n.c-modal-header--branded img {\n display: block;\n max-height: 3.5rem;\n margin: 0 auto;\n}\n.c-modal-illu-header,\n.c-modal-illu-header--ghost {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 0 1rem;\n max-width: 100%;\n}\n.c-modal-illu-header > *,\n.c-modal-illu-header--ghost > * {\n max-width: inherit;\n}\n.c-modal-illu-header--ghost {\n position: absolute;\n left: 0;\n right: 0;\n top: 1rem;\n margin: 0.5rem 0;\n opacity: 0;\n max-height: 2rem;\n transition: opacity 150ms ease-in, top 150ms 50ms ease-in;\n}\n.c-modal-illu-header--ghost > * {\n max-height: inherit;\n}\n.c-modal-illu-header--ghost.is-active {\n top: 0;\n opacity: 1;\n transition: opacity 150ms 50ms ease-in, top 150ms ease-in;\n}\n.c-modal--small-spacing .c-modal-header {\n padding: 1.187rem 3rem 0 1.5rem;\n}\n@media (max-width: 30rem) {\n .c-modal--small-spacing .c-modal-header {\n padding: 0.687rem 2rem 0 1rem;\n }\n}\n.c-modal--large-spacing .c-modal-header {\n padding: 2.687rem 3rem 0 3rem;\n}\n@media (max-width: 48rem) {\n .c-modal--large-spacing .c-modal-header {\n padding: 1.687rem 2rem 0 2rem;\n }\n}\n.c-modal-app {\n display: flex;\n align-items: center;\n font-size: 1.25rem;\n color: var(--charcoalGrey);\n}\n.c-app-editor {\n font-weight: normal;\n}\n.c-modal-app-icon {\n height: 1.125rem;\n margin-right: 0.5rem;\n}\n.c-modal-content-fixed {\n border-bottom: 0.063rem solid var(--dividerColor);\n flex: 0 0 auto;\n padding: 0 2rem;\n}\n.c-modal--small-spacing .c-modal-content-fixed {\n padding: 0 1.5rem;\n}\n@media (max-width: 30rem) {\n .c-modal--small-spacing .c-modal-content-fixed {\n padding: 0 1rem;\n }\n}\n.c-modal--large-spacing .c-modal-content-fixed {\n padding: 0 3rem;\n}\n@media (max-width: 30rem) {\n .c-modal--large-spacing .c-modal-content-fixed {\n padding: 0 2rem;\n }\n}\n.c-modal-content {\n padding: 0 2rem;\n}\n.c-modal-content:last-child {\n padding-bottom: 2rem;\n border-bottom-right-radius: 0.5rem;\n border-bottom-left-radius: 0.5rem;\n}\n@media (max-width: 30rem) {\n .c-modal-content {\n padding: 0 1.5rem;\n }\n .c-modal-content:last-child {\n padding-bottom: 1.5rem;\n }\n}\n.c-modal--small-spacing .c-modal-content {\n padding: 0 1.5rem;\n}\n.c-modal--small-spacing .c-modal-content:last-child {\n padding-bottom: 1.5rem;\n}\n@media (max-width: 30rem) {\n .c-modal--small-spacing .c-modal-content {\n padding: 0 1rem;\n }\n .c-modal--small-spacing .c-modal-content:last-child {\n padding-bottom: 1rem;\n }\n}\n.c-modal--large-spacing .c-modal-content {\n padding: 0 3rem;\n}\n.c-modal--large-spacing .c-modal-content:last-child {\n padding-bottom: 3rem;\n}\n@media (max-width: 48rem) {\n .c-modal--large-spacing .c-modal-content {\n padding: 0 2rem;\n }\n .c-modal--large-spacing .c-modal-content:last-child {\n padding-bottom: 2rem;\n }\n}\n.c-modal-footer {\n padding: 1rem 1.25rem 1.25rem;\n}\n.c-modal-footer--button button {\n margin-bottom: 0.25rem;\n}\n@media (max-width: 48rem) {\n .c-modal-footer--button button {\n min-width: calc(50% - 0.5rem);\n }\n}\n.c-modal-section {\n border-top: 0.063rem solid var(--dividerColor);\n}\n.c-modal-close {\n box-sizing: border-box;\n position: absolute;\n top: 1.5rem;\n right: 1.5rem;\n margin: 0;\n padding: 0.5rem;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n display: block;\n width: 2.5rem;\n height: 2.5rem;\n z-index: 1;\n}\n@media (max-width: 30rem) {\n .c-modal-close {\n top: 0.813rem;\n right: 1rem;\n }\n}\n.c-modal--small-spacing .c-modal-close {\n top: 1rem;\n right: 1rem;\n}\n@media (max-width: 30rem) {\n .c-modal--small-spacing .c-modal-close {\n top: 0.313rem;\n right: 0.5rem;\n }\n}\n.c-modal--closable .c-modal-header {\n padding-right: 4.5rem;\n}\n.c-modal--large-spacing .c-modal-close {\n top: 2.5rem;\n right: 2.5rem;\n}\n@media (max-width: 48rem) {\n .c-modal--large-spacing .c-modal-close {\n top: 1.313rem;\n right: 1.5rem;\n }\n}\n.c-modal-close--notitle {\n top: 0.375rem;\n right: 0.375rem;\n}\n.c-modal--overflowHidden {\n overflow: hidden;\n}\n.c-modal-back-button {\n top: 0.375rem;\n left: 0.375rem;\n color: var(--coolGrey);\n}\n@media (max-width: 48rem) {\n .c-modal-back-button {\n top: 0;\n left: 0;\n }\n}\n.c-modal-close--notitle + .c-modal-content {\n margin-top: 3rem;\n}\n","/*------------------------------------*\\\n Animations\n\\*------------------------------------*/\n/*\n Animations\n\n Available animations:\n\n spin - Animates an element by rotating it endlessly by 360 deg (used by the loading spinner)\n\n Styleguide Generic.animation\n*/\n@keyframes spin\n from\n transform rotate(0deg)\n to\n transform rotate(359deg)\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$transition-transform-ease-out\n transition transform .1s ease-out\n\n$spin-anim\n // arguments' order is important: the animation name must stay first\n // so that scoping works\n animation spin 1s linear infinite\n\n@media (prefers-reduced-motion: reduce)\n $transition-transform-ease-out\n transition none\n $spin-anim\n animation none","@require '../settings/breakpoints'\n@require '../tools/mixins'\n\n/*------------------------------------*\\\n Display utilities\n\\*------------------------------------*/\n\n/*\n Visually hidden element but still readable by screen-readers\n FR : http://www.ffoodd.fr/cache-cache-css/\n EN : http://hugogiraudel.com/2016/10/13/css-hide-and-seek/\n*/\n\nhidden()\n // @stylint off\n position absolute !important\n border 0 !important\n width rem(1) !important\n height rem(1) !important\n overflow hidden !important\n padding 0 !important\n white-space nowrap !important\n clip rect(rem(1), rem(1), rem(1), rem(1)) !important\n clip-path inset(50%) !important\n // @stylint on\n\n$visuallyhidden\n hidden()\n\n// Because Stylus doesn't allow me to @extend inside @media… yeah… that sucks\n+medium-screen()\n $visuallyhidden-mobile\n hidden()\n\n$hide\n hide()\n\n$hide--mob\n +lt-desktop()\n display none !important // @stylint ignore\n\n$hide--tablet\n +gt-tablet()\n display none !important // @stylint ignore\n\n$hide--desk\n +gt-mobile()\n display none !important // @stylint ignore\n\n// Global classes\nglobal('.u-visuallyhidden', $visuallyhidden)\nglobal('.u-hide', $hide)\nglobal('.u-hide--mob', $hide--mob)\nglobal('.u-hide--tablet', $hide--tablet)\nglobal('.u-hide--desk', $hide--desk)\n\ndisplay-none()\n display none\n\ndisplay-inline()\n display inline\n\ndisplay-block()\n display block\n\ndisplay-inline-block()\n display inline-block\n\ndisplay-inline-table()\n display inline-table\n\ndisplay-table()\n display table\n\ndisplay-table-cell()\n display table-cell\n\ndisplay-table-row()\n display table-row\n\ndisplay-table-row-group()\n display table-row-group\n\ndisplay-table-column()\n display table-column\n\ndisplay-table-column-group()\n display table-column-group\n\nprops = {\n 'display-none': 'dn',\n 'display-inline': 'di',\n 'display-block': 'db',\n 'display-inline-block': 'dib',\n 'display-inline-table': 'dit',\n 'display-table': 'dt',\n 'display-table-cell': 'dtc',\n 'display-table-row': 'dt-row',\n 'display-table-row-group': 'dt-row-group',\n 'display-table-column': 'dt-column',\n 'display-table-column-group': 'dt-column-group'\n}\n\nif cssmodules == true\n cssModulesUtils(props, breakpoints)\nelse\n nativeUtils(props, breakpoints)\n\n\n","/*------------------------------------*\\\n Mixins\n =====\n\n This file contains mixins:\n - hide()\n - reset()\n\\*------------------------------------*/\n/*\n Tools\n\n Weight: -9\n\n Styleguide Tools\n*/\n/*\n Mixins\n\n Available mixins\n\n Styleguide Tools.mixins\n*/\n// @stylint off\nuse('../scripts/deprecate.js')\n// @stylint on\n\n// Default Font-size\n$basefont ?= 16px\n\nrem($value, $base = $basefont)\n $max = length($value)\n\n $remValues = ()\n for $i in (0...$max)\n push($remValues, _convert-to-rem($value[$i], $base))\n\n return $remValues\n\n_convert-to-rem($px, $base)\n if (typeof($px) == 'unit')\n if ((unit($px) == '' || unit($px) == 'px') && ($px != 0))\n return (round($px / $base, 3))rem\n else\n return 0\n\n/*\n rem($value, $basefont)\n\n rem() takes one or more numeric values in pixel and calculates the rem values from it.\n\n NB: you don't have to explicitly write the `px` unit.\n\n $value - The value in pixel you want to translate in rem. For multiple values you can use `rem(14 12)` for shorthand properties such as `margin`. ⚠ Multiples values should be separated by spaces.\n $basefont - If you need to overwrite the default `$basefont` value of `16`\n\n Weight: 1\n\n Styleguide Tools.mixins.rem\n*/\n\n/*\n hide()\n\n hide() mixin definitely hides an element. This mixin doesn't take parameters.\n\n Weight: 2\n\n Styleguide Tools.mixins.hide\n*/\nhide()\n display none !important // @stylint ignore\n visibility hidden !important // @stylint ignore\n\n/*\n visually-hide()\n\n visually-hide() mixin visually hides an element. The element is still visible by screen readers.\n This mixin doesn't take parameters.\n\n Weight: 3\n\n Styleguide Tools.mixins.hide\n*/\nvisually-hide()\n border 0\n clip rect(0 0 0 0)\n clip-path polygon(0 0, 0 0, 0 0)\n height 1px\n margin -1px\n overflow hidden\n padding 0\n position absolute\n width 1px\n white-space nowrap\n\n/*\n reset()\n\n reset() mixin removes every padding, margin and border of an element.\n This mixin doesn't take parameters.\n\n Weight: 4\n\n Styleguide Tools.mixins.reset\n*/\nreset()\n margin 0\n padding 0\n border 0\n\nglobal(selector, placeholder, type = extend)\n if type == extend\n if cssmodules == true\n :global({selector})\n @extend {placeholder} // @stylint ignore\n else\n {selector}\n @extend {placeholder} // @stylint ignore\n else if type == mixin\n if cssmodules == true\n :global({selector})\n {placeholder}() // @stylint ignore\n else\n {selector}\n {placeholder}() // @stylint ignore\n\ncssModulesUtils(props, breakpoints)\n for kBp, vBp in breakpoints\n if vBp == ''\n for kProp, vProp in props\n :global(.u-{vProp})\n {kProp}()\n else\n @media (max-width: rem(lookup('BP-'+kBp)))\n for kProp, vProp in props\n :global(.u-{vProp}-{vBp}) // @stylint ignore\n {kProp}()\n\nnativeUtils(props, breakpoints)\n for kBp, vBp in breakpoints\n if vBp == ''\n for kProp, vProp in props\n .u-{vProp}\n {kProp}()\n else\n @media (max-width: rem(lookup('BP-'+kBp)))\n for kProp, vProp in props\n .u-{vProp}-{vBp} // @stylint ignore\n {kProp}()\n\n// @stylint on\n","@require '../tools/mixins'\n@require './colors'\n\n/*------------------------------------*\\\n Text utilities\n\\*------------------------------------*/\n\njson_colors=json('../settings/palette.json', { hash: true })\n\nfor color in utility_colors\n $color-{color}\n color: json_colors[color] !important // @stylint ignore\n\n global('.u-' + color, '$color-' + color)\n\n\n$breakword\n word-break break-word\n\n$ellipsis\n white-space nowrap\n overflow hidden\n text-overflow ellipsis\n\nspacellipsis()\n overflow hidden\n text-overflow ellipsis\n white-space break-spaces\n\nspace-ellipsis = {\n 'spacellipsis': 'spacellipsis'\n}\n\nif cssmodules == true\n cssModulesUtils(space-ellipsis, breakpoints)\nelse\n nativeUtils(space-ellipsis, breakpoints)\n\n$midellipsis\n display flex\n flex-wrap nowrap\n\n > * // @stylint ignore\n display inline-block\n max-width 50%\n overflow hidden\n white-space pre\n\n > :first-child\n text-overflow ellipsis\n\n > :last-child\n text-overflow clip\n direction rtl\n\n @supports(text-overflow: '[...]')\n > :first-child\n text-overflow '[...]'\n\n$link\n &:link\n color var(--linkColor) !important // @stylint ignore\n text-decoration var(--linkTextDecoration) !important // @stylint ignore\n\n &:visited\n &:active\n &:hover\n &:focus\n color var(--linkColorActive) !important // @stylint ignore\n\n// @stylint off\nlh-tiny()\n line-height 1!important\n\nlh-xsmall()\n line-height 1.1!important\n\nlh-small()\n line-height 1.2!important\n\nlh-medium()\n line-height 1.3!important\n\nlh-large()\n line-height 1.4!important\n\nlh-xlarge()\n line-height 1.5!important\n\nglobal('.u-lh-tiny', lh-tiny, mixin)\n\nglobal('.u-lh-xsmall', lh-xsmall, mixin)\n\nglobal('.u-lh-small', lh-small, mixin)\n\nglobal('.u-lh-medium', lh-medium, mixin)\n\nglobal('.u-lh-large', lh-large, mixin)\n\nglobal('.u-lh-xlarge', lh-xlarge, mixin)\n\nfz-tiny()\n font-size rem(12)!important\n lh-medium()\n\nfz-xsmall()\n font-size rem(13)!important\n lh-large()\n\nfz-small()\n font-size rem(14)!important\n lh-large()\n\nfz-medium()\n font-size rem(16)!important\n lh-xlarge()\n\nfz-large()\n font-size rem(18)!important\n lh-xlarge()\n\nfontsize = {\n 'fz-tiny': 'fz-tiny',\n 'fz-xsmall': 'fz-xsmall',\n 'fz-small': 'fz-small',\n 'fz-medium': 'fz-medium',\n 'fz-large': 'fz-large'\n}\n\nif cssmodules == true\n cssModulesUtils(fontsize, breakpoints)\nelse\n nativeUtils(fontsize, breakpoints)\n\nta-left()\n text-align left!important\n\nta-right()\n text-align right!important\n\nta-center()\n text-align center!important\n\nta-justify()\n text-align justify!important\n\ntextalign = {\n 'ta-left': 'ta-left',\n 'ta-right': 'ta-right',\n 'ta-center': 'ta-center',\n 'ta-justify': 'ta-justify'\n}\n\nif cssmodules == true\n cssModulesUtils(textalign, breakpoints)\nelse\n nativeUtils(textalign, breakpoints)\n\nfs-normal()\n font-style normal!important\n\nfs-italic()\n font-style italic!important\n\nfontstyle = {\n 'fs-normal': 'fs-normal',\n 'fs-italic': 'fs-italic'\n}\nif cssmodules == true\n cssModulesUtils(fontstyle, breakpoints)\nelse\n nativeUtils(fontstyle, breakpoints)\n\nfw-normal()\n font-weight normal\n\nfw-bold()\n font-weight bold\n\nfontweight = {\n 'fw-normal': 'fw-normal',\n 'fw-bold': 'fw-bold'\n}\nif cssmodules == true\n cssModulesUtils(fontweight, breakpoints)\nelse\n nativeUtils(fontweight, breakpoints)\n// @stylint on\n\n// Global classes\nglobal('.u-breakword', $breakword)\nglobal('.u-ellipsis', $ellipsis)\nglobal('.u-midellipsis', $midellipsis)\nglobal('.u-link', $link)\n","/*------------------------------------*\\\n Please, edit this file properly, with a 10 based incrementation,\n and keep things in order so it remains easily readable.\n\n How to use: just import this file in your component's style and call\n the related variable\n e.g.\n .my-app\n z-index $app-index\n\\*------------------------------------*/\n\n/*\n Z-Index\n\n List of every z-index related to components in order to keep a clean\n & maintainable order of indexes.\n\n Those indexes are 10 based so you can deal with extra layers using `$index + 1`\n\n $below-index - **index -1** Layer below the app, mostly for hiding purpose\n $app-index - **index 0** App index, the ground zero.\n $low-index - **index 1** Low level index, to make sure a positionned element goes over elements with z-index 0.\n $alert-index-mobile - **index 10** Alert index like success, errors, infos *mobile only*\n $nav-index - **index 20** Nav index\n $bar-index - **index 21** Bar index equals Nav index + 1, not actually used, just as reference.\n $selection-index - **index 30** Selection bar index, with actions for selected items\n $popover-index - **index 40** Popover index used by dropdown menu for example\n $overlay - **index 50** Overlay index for modals background\n $file-action-menu - **index 60** File action menu index *mobile only*\n $modal-index - **index 70** Modal index\n $modal-footer-index - **index 71** Modal footer index\n $modal-toolbar-index - **index 72** Modal toolbar index\n $alert-index - **index 80** Alert index such as success, errors, infos\n\n Styleguide Settings.z-index\n*/\n\n$below-index = -1\n$app-index = 0\n$low-index = 1\n$alert-index-mobile = 10\n$nav-index = 20\n$bar-index = $nav-index + 1 // Not actually used, just as reference\n$selection-index = 30\n$popover-index = 40\n$overlay-index = 50\n$file-action-menu = 60 // replaced by $drawer-index\n$drawer-index = 60\n$modal-index = 70\n$modal-footer-index = $modal-index + 1\n$modal-toolbar-index = $modal-footer-index + 1\n$alert-index = 80\n\n// @stylint off\nhtml\n --zIndex-below $below-index\n --zIndex-app $app-index\n --zIndex-low $low-index\n --zIndex-alertMobile $alert-index-mobile\n --zIndex-nav $nav-index\n --zIndex-bar $bar-index\n --zIndex-selection $selection-index\n --zIndex-popover $popover-index\n --zIndex-overlay $overlay-index\n --zIndex-fileActionMenu $file-action-menu\n --zIndex-drawer $drawer-index\n --zIndex-modal $modal-index\n --zindex-alert $alert-index\n// @stylint on\n\n","/*------------------------------------*\\\n Font Stack\n\\*------------------------------------*/\n\n/*\n Font Stack\n\n There's only one font available, Lato, which is used on body, so basically everywhere. It's also available in bold.\n\n Markup:\n <p>This is basic text</p>\n <p><strong>And this is bold text</strong></p>\n\n Styleguide Settings.fonts\n*/\nhtml\n --primaryFont Lato, sans-serif\n\n$font-labor\n font-family var(--primaryFont)\n","// @stylint off\n\n// FONTS\n@require '../settings/fontstack'\n@require '../settings/breakpoints'\n@require '../tools/mixins'\n\nhtml\n font-size 100%\n\nbody\n font 100%/1.5\n -moz-osx-font-smoothing grayscale\n -webkit-font-smoothing antialiased\n @extend $font-labor\n\n // Overrides Normalize.css default style\n button,\n input,\n optgroup,\n select,\n textarea\n @extend $font-labor\n\n// LAYOUT\nhtml\n height 100%\n\nbody\n display flex\n flex-direction column\n align-items stretch\n width 100vw\n height 100%\n margin 0\n\nhtml\nbody\n +medium-screen()\n display block\n height auto\n\n[role=application]\n display flex\n height inherit\n flex 1 1 100%\n overflow-x hidden\n overflow-y auto\n\n +medium-screen()\n overflow visible\n\n// COLORS\nhtml,\nbody\n background-color var(--white)\n color var(--black)\n\n// FORMS\n@require '../components/forms'\n\n[data-input=radio]\n @extend $form-checkbox\n\n label::before\n border-radius 50%\n border rem(2) solid var(--coolGrey)\n box-shadow inset 0 0 0 checkbox-size transparent\n\n input[type=radio]:checked + label::before\n box-shadow inset 0 0 0 rem(3) var(--paleGrey), inset 0 0 0 checkbox-size var(--dodgerBlue)\n\n\n[data-input=checkbox]\n @extend $form-checkbox\n\n label\n &::before\n &::after\n border-radius rem(2)\n\n &::before\n background-color var(--white)\n box-shadow inset 0 0 0 rem(2) var(--silver)\n\n &:hover\n box-shadow inset 0 0 0 rem(2) var(--dodgerBlue)\n\n &::after\n background-image embedurl('../../assets/icons/illus/check-white.svg')\n background-size contain\n\n &[aria-checked='mixed'] label::after\n background-image embedurl('../../assets/icons/illus/dash-white.svg')\n background-size contain\n\n input[type=checkbox]\n &:checked\n & + label::before\n box-shadow inset 0 0 0 checkbox-size var(--dodgerBlue)\n\n & + label::after\n opacity 1\n transform scale(1)\n\n &:not(:checked) + label::after\n opacity 0\n transform scale(0)\n// @stylint on\n","/*------------------------------------*\\\n Forms\n =====\n\n This file contains all needs for forms, inputs, labels...\n\\*------------------------------------*/\n\n@require '../components/button'\n@require '../tools/mixins'\n\ncheckbox-size = rem(16)\n\n$form\n .coz-form\n margin rem(16 0 8)\n\n a,\n a:visited\n color var(--dodgerBlue)\n text-decoration none\n\n a:hover,\n a:active\n text-decoration underline\n\n .coz-form\n .coz-form-group\n position relative\n // Managing input width with flex\n display flex\n flex-direction column\n\n .coz-form-desc\n margin-bottom rem(8)\n line-height 1.5\n\n .coz-form-label // Deprecated\n display block\n text-transform uppercase\n color var(--coolGrey)\n font-size rem(12)\n padding rem(9) 0\n margin-top rem(16)\n\n .coz-form-label--error // Deprecated\n display none\n color var(--pomegranate)\n\n .coz-form-errors\n color var(--pomegranate)\n\n$form-button\n .coz-form-controls\n display flex\n flex-direction row\n justify-content flex-end\n margin rem(16 0 8)\n\n a\n button\n input[type=submit]\n flex 0 0 auto\n margin rem(0 0 8 8)\n\n .coz-form-controls--full\n a\n button\n input[type=submit]\n flex 0 0 100%\n margin-bottom rem(8)\n\n .coz-form-controls--dispatch\n justify-content space-between\n\n a\n button\n input[type=submit]\n flex 0 0 49%\n margin 0 0 rem(8)\n\n &:last-child\n margin-left auto\n\n\n$form-text\n input[type=text]\n input[type=password]\n input[type=email]\n input[type=url]\n display inline-block\n padding rem(14) rem(12) rem(12) rem(14)\n box-sizing border-box\n border-radius rem(2)\n background var(--white)\n border rem(1) solid var(--dividerColor)\n color var(--black)\n\n &::placeholder\n color var(--coolGrey)\n font-size rem(16)\n\n &:focus\n border rem(1) solid var(--dodgerBlue)\n outline 0\n\n &:hover\n border rem(1) solid var(--coolGrey)\n\n &.error\n border rem(1) solid var(--pomegranate)\n\n\n$form-textarea\n textarea\n display inline-block\n padding rem(14 12 12 14)\n box-sizing border-box\n border-radius rem(2)\n background var(--white)\n border rem(1) solid var(--dividerColor)\n color var(--black)\n\n &::placeholder\n color var(--coolGrey)\n font-size rem(16)\n\n &:focus\n border rem(1) solid var(--dodgerBlue)\n outline 0\n\n &:hover\n border rem(1) solid var(--coolGrey)\n\n &.error\n border rem(1) solid var(--pomegranate)\n\n\n$form-select\n select\n display inline-block\n padding rem(12 12 14)\n border-radius rem(4)\n box-sizing border-box\n background var(--white)\n border rem(1) solid var(--dividerColor)\n color var(--black)\n appearance none\n background-image embedurl('../../assets/icons/ui/dropdown.svg')\n background-position right rem(8) center\n background-repeat no-repeat\n\n &::-ms-expand\n display none\n\n &::placeholder\n color var(--slateGrey)\n font-size rem(17)\n\n &:focus\n border rem(1) solid var(--dodgerBlue)\n\n &:hover\n border rem(1) solid var(--coolGrey)\n\n &.error\n border rem(1) solid var(--pomegranate)\n background none\n\n\n$form-checkbox\n // To make sure that checkbox's wrapper have the height of the checkbox\n display flex\n\n input[type=radio]\n input[type=checkbox]\n hide()\n\n label\n position relative\n display inline-block\n width checkbox-size\n height checkbox-size\n padding-left checkbox-size * 1.4\n cursor pointer\n\n &::before\n &::after\n content ''\n position absolute\n left 0\n top 0\n box-sizing border-box\n width checkbox-size\n height checkbox-size\n\n &::before\n transition box-shadow 350ms cubic-bezier(0, .89, .44, 1)\n\n &::after\n transition-duration .2s\n transition-property opacity, transform\n\n\n$form-progress\n progress\n margin rem(8) 0\n width 100%\n height rem(8)\n color var(--dodgerBlue)\n background var(--paleGrey)\n border 0\n border-radius rem(18)\n\n // chrome and safari\n &::-webkit-progress-bar\n background var(--paleGrey)\n border-radius rem(18)\n\n &::-webkit-progress-value\n background var(--charcoalGrey)\n border-radius rem(18)\n\n // firefox\n &::-moz-progress-bar\n background var(--charcoalGrey)\n border-radius rem(18)\n\n// New styles\n$label\n text-transform uppercase\n color var(--secondaryTextColor)\n font-size rem(13)\n font-weight bold\n line-height rem(16)\n\n &.is-error\n color var(--pomegranate)\n\n$label--block\n display block\n padding rem(8) 0\n\n$input--disabled\n cursor not-allowed\n background-color var(--paleGrey)\n color var(--charcoalGrey)\n\n &:hover\n &:focus\n border rem(1) solid var(--dividerColor)\n\n$input-text\n display inline-block\n width 100%\n max-width rem(512)\n padding rem(13 16)\n box-sizing border-box\n border-radius rem(3)\n background var(--white)\n border rem(1) solid var(--dividerColor)\n font-size rem(16)\n line-height 1.25\n color var(--charcoalGrey)\n outline 0\n\n &::placeholder\n color var(--coolGrey)\n font-size rem(16)\n\n &:hover\n border rem(1) solid var(--coolGrey)\n\n &:focus\n border rem(1) solid var(--dodgerBlue)\n outline 0\n\n &.is-error\n &:not(:focus):invalid\n border rem(1) solid var(--pomegranate)\n\n &[aria-disabled=true]\n &[disabled]\n @extend $input--disabled\n\n\ninput-text--tiny =\n border-radius rem(2)\n padding rem(4 8 6)\n$input-text--tiny\n {input-text--tiny}\n\ninput-text--medium =\n border-radius rem(2)\n padding rem(8 16 10)\n$input-text--medium\n {input-text--medium}\n\ninput-text--large =\n border-radius rem(3)\n padding rem(13 16)\n$input-text--large\n {input-text--large}\n\ninput-text--fullwidth =\n max-width 100%\n$input-text--fullwidth\n {input-text--fullwidth}\n\n$checkbox\n // To make sure that checkbox's wrapper have the height of the checkbox\n display flex\n align-items center\n min-width checkbox-size\n min-height checkbox-size\n\n span\n position relative\n display inline-block\n padding-left checkbox-size * 1.5\n cursor pointer\n line-height 1.5\n\n &::before\n &::after\n content ''\n position absolute\n left 0\n top 50%\n box-sizing border-box\n width checkbox-size\n height checkbox-size\n border-radius rem(2)\n\n &::before\n transition box-shadow 350ms cubic-bezier(0, .89, .44, 1)\n background-color var(--white)\n box-shadow inset 0 0 0 rem(2) var(--silver)\n transform translateY(-50%)\n\n &:hover::before\n box-shadow inset 0 0 0 rem(2) var(--dodgerBlue)\n\n &::after\n background-image embedurl('../../assets/icons/illus/check-white.svg')\n background-size contain\n transition-duration .2s\n transition-property opacity, transform\n\n &[aria-checked='mixed'] span::after\n background-image embedurl('../../assets/icons/illus/dash-white.svg')\n background-size contain\n\n &[aria-disabled=true]\n span\n opacity .5\n cursor not-allowed\n\n :hover::before\n box-shadow inset 0 0 0 rem(2) var(--silver)\n\n ::before\n background-color var(--paleGrey)\n\n input\n visually-hide()\n\n &:focus + span::before\n box-shadow inset 0 0 0 rem(2) var(--dodgerBlue)\n\n &:checked\n & + span::before\n box-shadow inset 0 0 0 checkbox-size var(--dodgerBlue)\n\n & + span::after\n opacity 1\n transform translateY(-50%) scale(1)\n\n &:not(:checked) + span::after\n opacity 0\n transform translateY(-50%) scale(0)\n\n &.is-error span\n color var(--pomegranate)\n\n &::before\n box-shadow inset 0 0 0 rem(2) var(--pomegranate)\n background-color var(--yourPink)\n\n &--noGutter span\n padding-left 0\n\n\n$radio\n @extend $checkbox\n span\n &::before\n &::after\n border-radius 50%\n\n &::after\n content ''\n background var(--white)\n border rem(5) solid var(--dodgerBlue)\n box-sizing border-box\n width rem(16)\n height rem(16)\n\n$textarea\n @extend $input-text\n display block\n width 100%\n min-height rem(120)\n resize vertical\n\n$textarea--tiny\n @extend $input-text--tiny\n min-height rem(48)\n\n$textarea--medium\n @extend $input-text--medium\n min-height rem(80)\n\n$textarea--fullwidth\n @extend $input-text--fullwidth\n\n\n$select-arrow-padding\n padding-right rem(38)\n\n$select\n @extend $input-text\n @extend $select-arrow-padding\n appearance none\n background embedurl('../../assets/icons/illus/bottom-select.svg') right rem(16) center no-repeat\n background-size rem(14)\n text-align left\n\n &::-ms-expand\n display none\n\n$select--disabled\n @extend $input--disabled\n\n &:hover\n &:focus\n // Border is set to 0, otherwise SelectBox will\n // get large borders on hover\n border-width 0\n\n$select--tiny\n @extend $input-text--tiny\n @extend $select-arrow-padding\n\n$select--medium\n @extend $input-text--medium\n @extend $select-arrow-padding\n\n$select--fullwidth\n @extend $input-text--fullwidth\n @extend $select-arrow-padding\n\n$field\n position relative\n display flex\n flex-direction column\n margin rem(8 0 16)\n\n$field-inline\n display flex\n align-items flex-start\n flex-direction row\n margin rem(8 0 8 24)\n\n +small-screen()\n flex-direction column\n margin-left 0\n\n$inputgroup\n display inline-flex\n flex-direction row\n box-sizing border-box\n align-items stretch\n width 100%\n max-width rem(512)\n border rem(1) solid var(--dividerColor)\n border-radius rem(2)\n &:hover\n border rem(1) solid var(--coolGrey)\n\n$inputgroup--focus\n &\n &:hover\n border-color var(--dodgerBlue)\n\n$inputgroup--error\n border-color var(--pomegranate)\n\n$inputgroup--fullwidth\n max-width none\n\n$inputgroup-main\n flex 1 1 auto\n\n$inputgroup-input\n @extend $input-text\n border 0\n padding-right rem(8)\n &:hover\n &:focus\n position relative\n z-index 1\n border 0\n outline 0\n\n$inputgroup-side\n display flex\n flex-direction column\n justify-content center\n flex 0 1 auto\n max-width rem(140)\n\n$double-field\n width 100%\n\n$double-field--with-button\n box-sizing border-box\n position relative\n padding-right 2.5rem\n\n$double-field-line\n position relative\n\n$double-field-label\n min-height rem(40)\n\n$double-field-button\n position absolute\n right rem(-40)\n top rem(10)\n\n$double-field-wrapper\n display inline-flex\n width 100%\n margin-bottom rem(8)\n\n +small-screen()\n flex-direction column\n\n$double-field-input\n box-sizing border-box\n flex 1 1 70%\n & + &\n flex 1 1 auto\n","@require '../tools/mixins'\n@require '../settings/breakpoints'\n@require '../settings/z-index'\n@require '../elements/defaults'\n\n/*------------------------------------*\\\n Layout vars\n\\*------------------------------------*/\nbarHeight = rem(48)\nnavHeight = rem(48)\n\n/*------------------------------------*\\\n Layouts\n\\*------------------------------------*/\n\n$centerized\n position absolute\n top 50%\n left 50%\n transform translateX(-50%) translateY(-50%)\n\n\n$content-center\n display flex\n align-items center\n justify-content center\n\n\n$fullbleed\n position fixed\n bottom 0\n top 0\n left 0\n right 0\n\n// Elastic Layout — Usually with fixed header and/or fixed footer and an extensible content zone with scrolling inside\n$elastic\n display flex\n flex-flow column nowrap\n align-items stretch\n\n$elastic-content\n // Those backgrounds give a visual information that the content is scrollable\n background linear-gradient(white 30%, rgba(255, 255, 255, 0)),\n linear-gradient(rgba(255, 255, 255, 0), white 70%) 0 100%,\n linear-gradient(rgba(214, 216, 218, .25) 0, rgba(214, 216, 218, .25) 25%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 100%),\n linear-gradient(rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) 74%, rgba(214, 216, 218, .25) 75%, rgba(214, 216, 218, .25) 100%) 0 100%\n background-repeat no-repeat\n background-color var(--white)\n background-size 100% rem(32), 100% rem(32), 100% rem(8), 100% rem(8)\n background-attachment local, local, scroll, scroll\n background-clip padding-box\n overflow auto\n -webkit-overflow-scrolling touch\n\n$elastic-bar\n flex 0 0 auto\n\n// One column layout\n$app\n box-sizing border-box\n display flex\n max-width 100%\n width 100%\n height 100%\n\n main\n display flex\n flex-direction column\n flex 0 0 auto\n\n main,\n main > [role=contentinfo], // Deprecated\n main > [role=main]\n position relative\n display flex\n flex-direction column\n flex 1 1 auto\n box-sizing border-box\n height 100%\n overflow-x hidden\n overflow-y auto\n\n +medium-screen()\n display block\n\n // iPhone X environment tweak\n main\n padding-left env(safe-area-inset-left)\n padding-right env(safe-area-inset-right)\n padding-bottom env(safe-area-inset-bottom)\n\n main,\n main > [role=contentinfo], // Deprecated\n main > [role=main]\n display block\n overflow visible\n\n // These pseudo-element are \"ghost\" elements replacing bar and nav\n &:before\n &:after\n content ''\n display block\n\n &:before\n height barHeight\n\n &:after\n height navHeight\n\n// STICKY layout\n// When you want a sidebar and you want it to act like a sticky footer on mobile\n$app-2panes-sticky\n @extend $app\n flex 0 0 100%\n align-items stretch\n\n & > aside\n display flex\n flex-direction column\n flex 0 0 auto\n\n main,\n main > [role=contentinfo], // Deprecated\n main > [role=main]\n height auto\n\n +medium-screen()\n > aside\n position fixed\n bottom 0\n left 0\n display block\n z-index $nav-index\n width 100%\n","@require '../settings/z-index'\n@require '../settings/breakpoints'\n@require '../objects/layouts'\n@require '../tools/mixins'\n\n/*------------------------------------*\\\n Modals\n ======\n\n This file contains all needs for modals\n\\*------------------------------------*/\n\n// Modal sizes\nxsmall-width = rem(384)\nsmall-width = rem(544)\nmedium-width = rem(576)\nlarge-width = rem(640)\nxlarge-width = rem(800)\nxxlarge-width = rem(960)\n\n// Modal margins\nxsmall-margin = rem(8)\nsmall-margin = rem(8)\nmedium-margin = rem(24)\nlarge-margin = rem(48)\nxlarge-margin = rem(48)\nxxlarge-margin = rem(48)\n\n// Modal paddings\ntiny-padding = rem(16)\nsmall-padding = rem(24)\nmedium-padding = rem(32)\nlarge-padding = rem(48)\nxlarge-padding = rem(48)\nxxlarge-padding = rem(48)\n\n\n$modals\n position relative\n z-index $modal-index\n\n$modal-wrapper\n position fixed\n top 0\n left 0\n display flex\n flex-direction column\n align-items center\n box-sizing border-box\n width 100vw\n height 100%\n overflow-y auto\n padding large-margin\n\n +small-screen()\n justify-content center\n padding medium-margin\n\n +tiny-screen()\n padding small-margin\n\n$modal\n @extend $elastic\n position relative\n border-radius rem(8)\n max-height 100%\n max-width 100%\n background-color var(--white)\n color var(--charcoalGrey)\n\nfor size in 'xsmall' 'small' 'medium' 'large' 'xlarge' 'xxlarge'\n $modal--{size}\n width lookup(size + '-width')\n\n $max-width=lookup(size + '-width') + lookup(size + '-margin') * 2\n @media (max-width: $max-width)\n width 100%\n\n$modal-wrapper--fullscreen\n +small-screen()\n padding 0\n\n$modal--fullscreen\n +small-screen()\n height 100%\n width 100%\n border-radius 0\n box-sizing border-box\n\n$modal-header\n @extend $elastic-bar\n margin 0 0 rem(16)\n padding (medium-padding - rem(5)) rem(48) 0 medium-padding\n overflow visible\n min-height rem(40)\n\n h2\n margin 0\n font-weight bold\n\n +tiny-screen()\n margin-bottom rem(8)\n padding (small-padding - rem(5)) rem(32) 0 small-padding\n\n h2\n font-size rem(20)\n\n$modal-header--branded\n @extend $modal-header\n padding rem(16 48)\n\n img\n display block\n max-height rem(56)\n margin 0 auto\n\n$modal-header-icon\n display flex\n align-items center\n justify-content center\n margin 0 0 rem(16)\n max-width 100%\n\n > * // @stylint ignore\n max-width inherit\n\n$modal-header-icon--ghost\n @extend $modal-header-icon\n position absolute\n left 0\n right 0\n top rem(16)\n margin rem(8) 0\n opacity 0\n max-height rem(32)\n transition opacity 150ms ease-in, top 150ms 50ms ease-in\n\n > * // @stylint ignore\n max-height inherit\n\n$modal-header-icon--ghost-active\n top 0\n opacity 1\n transition opacity 150ms 50ms ease-in, top 150ms ease-in\n\n$modal-header--small\n padding (small-padding - rem(5)) rem(48) 0 small-padding\n\n +tiny-screen()\n padding (tiny-padding - rem(5)) rem(32) 0 tiny-padding\n\n$modal-header--large\n padding (large-padding - rem(5)) rem(48) 0 large-padding\n\n +small-screen()\n padding (medium-padding - rem(5)) rem(32) 0 medium-padding\n\n$modal-header-app\n display flex\n align-items center\n font-size rem(20)\n color var(--charcoalGrey)\n\n$modal-header-app-editor\n font-weight normal\n\n$modal-header-app-icon\n height rem(18)\n margin-right rem(8)\n\n$modal-content-fixed\n border-bottom rem(1) solid var(--dividerColor)\n flex 0 0 auto\n padding 0 medium-padding\n\n$modal-content-fixed--small\n padding 0 small-padding\n\n +tiny-screen()\n padding 0 tiny-padding\n\n$modal-content-fixed--large\n padding 0 large-padding\n\n +tiny-screen()\n padding 0 medium-padding\n\n$modal-content\n @extend $elastic-content\n padding 0 medium-padding\n\n &:last-child\n padding-bottom medium-padding\n border-bottom-right-radius rem(8)\n border-bottom-left-radius rem(8)\n\n +tiny-screen()\n padding 0 small-padding\n\n &:last-child\n padding-bottom small-padding\n\n$modal-content--small\n padding 0 small-padding\n\n &:last-child\n padding-bottom small-padding\n\n +tiny-screen()\n padding 0 tiny-padding\n\n &:last-child\n padding-bottom tiny-padding\n\n$modal-content--large\n padding 0 large-padding\n\n &:last-child\n padding-bottom large-padding\n\n +small-screen()\n padding 0 medium-padding\n\n &:last-child\n padding-bottom medium-padding\n\n$modal-footer\n @extend $elastic-bar\n padding tiny-padding (small-padding - rem(4)) (small-padding - rem(4))\n\n$modal-footer--button\n button\n margin-bottom rem(4)\n\n +small-screen()\n min-width calc(50% - .5rem)\n\n$modal-section\n border-top rem(1) solid var(--dividerColor)\n\ncross-size=rem(40)\n\n$modal-close\n box-sizing border-box\n position absolute\n top rem(24)\n right rem(24)\n margin 0\n padding rem(8)\n background-color transparent\n border 0\n cursor pointer\n display block\n width cross-size\n height cross-size\n z-index 1\n\n +tiny-screen()\n top rem(13)\n right rem(16)\n\n$modal-close--small\n top rem(16)\n right rem(16)\n\n +tiny-screen()\n top rem(5)\n right rem(8)\n\n$modal-header--closable\n padding-right cross-size + rem(32)\n\n\n$modal-close--large\n top rem(40)\n right rem(40)\n\n +small-screen()\n top rem(21)\n right rem(24)\n\n$modal-close--notitle\n top rem(6)\n right rem(6)\n\n$modal--hidden\n overflow hidden\n\n$modal-back-button\n top rem(6)\n left rem(6)\n color var(--coolGrey)\n\n +small-screen()\n top 0\n left 0\n","@require '../../stylus/tools/mixins'\n@require '../../stylus/settings/palette'\n@require '../../stylus/components/button'\n@require '../../stylus/utilities/display'\n@require '../../stylus/components/modals'\n\n.c-modal-container\n @extend $modals\n\n.c-modal-wrapper\n @extend $modal-wrapper\n\n &.c-modal-wrapper--fullscreen\n @extend $modal-wrapper--fullscreen\n\n.c-modal\n @extend $modal\n\n &.c-modal--fullscreen\n @extend $modal--fullscreen\n\n.c-modal--xsmall\n @extend $modal--xsmall\n\n.c-modal--small\n @extend $modal--small\n\n.c-modal--medium\n @extend $modal--medium\n\n.c-modal--large\n @extend $modal--large\n\n.c-modal--xlarge\n @extend $modal--xlarge\n\n.c-modal--xxlarge\n @extend $modal--xxlarge\n\n\n.c-modal-header\n @extend $modal-header\n\n .c-modal--closable &\n @extend $modal-header--closable\n\n.c-modal-header--branded\n @extend $modal-header--branded\n\n.c-modal-illu-header\n @extend $modal-header-icon\n\n.c-modal-illu-header--ghost\n @extend $modal-header-icon--ghost\n\n &.is-active\n @extend $modal-header-icon--ghost-active\n\n.c-modal-app\n @extend $modal-header-app\n\n.c-app-editor\n @extend $modal-header-app-editor\n\n.c-modal-app-icon\n @extend $modal-header-app-icon\n\n.c-modal-footer\n @extend $modal-footer\n\n.c-modal-footer--button\n @extend $modal-footer--button\n\n.c-modal-section\n @extend $modal-section\n\n.c-modal-content\n @extend $modal-content\n\n.c-modal-content-fixed\n @extend $modal-content-fixed\n\n.c-modal--small-spacing\n .c-modal-close\n @extend $modal-close--small\n .c-modal-header\n @extend $modal-header--small\n .c-modal-content\n @extend $modal-content--small\n .c-modal-content-fixed\n @extend $modal-content-fixed--small\n\n.c-modal--large-spacing\n .c-modal-close\n @extend $modal-close--large\n .c-modal-header\n @extend $modal-header--large\n .c-modal-content\n @extend $modal-content--large\n .c-modal-content-fixed\n @extend $modal-content-fixed--large\n\n.c-modal-close\n @extend $modal-close\n\n.c-modal-close--notitle\n @extend $modal-close--notitle\n\n.c-modal--overflowHidden\n @extend $modal--hidden\n\n.c-modal-close--notitle + .c-modal-content\n margin-top rem(48)\n\n.c-modal-back-button\n @extend $modal-back-button\n","@require '../tools/mixins'\n\n/*------------------------------------*\\\n Breakpoints\n =====\n\\*------------------------------------*/\n\n// variables\n\nBP-teeny = 375\nBP-tiny = 480\nBP-small = 768\nBP-medium = 1023\nBP-large = 1200\nBP-extra-large = 1439\n\n// Standard breakpoints collection for utilities\nbreakpoints = {\n 'none': '',\n 'tiny': 't',\n 'small': 's',\n 'medium': 'm',\n}\n\n/*\n Breakpoints\n\n This is the collection of available breakpoint variables:<br><br>\n - `BP-teeny` - 375px\n - `BP-tiny` - 480px\n - `BP-small` - 768px\n - `BP-medium` - 1023px\n - `BP-large` - 1200px\n - `BP-extra-large` - 1439px\n\n <br>Also we have a standard breakpoints collection meant to be used as suffixes for some utility classes<br>\n\n If you want a utility class to trigger only at defined breakpoints you can use those:<br><br>\n - `-t` - refers to `tiny` breakpoint (max-width: 480px)\n - `-s` - refers to `small` breakpoint (max-width: 768px)\n - `-m` - refers to `medium` breakpoint (max-width: 1023px)\n\n Styleguide Settings.breakpoints\n*/\n\n/*\n Media Queries mixins\n\n You can use these mixins with no arguments and they will output\n the desired a `max-width` media-query. Use the direction argument\n to set it to `min`.\n\n Styleguide Settings.breakpoints.mixins\n*/\n\n// mixins\n// @stylint off\nsize-helper(direction, size)\n direction == 'min' ? size + 1 : size\n\n/*\n teeny-screen()\n\n teeny-screen() Refers to (max-width: 375px)\n teeny-screen('min') Refers to (min-width: 376px)\n\n Weight: -6\n\n Styleguide Settings.breakpoints.mixins.teeny\n*/\nteeny-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-teeny)))\n {block}\n\n/*\n tiny-screen()\n\n tiny-screen() Refers to (max-width: 480px)\n tiny-screen('min') Refers to (min-width: 481px)\n\n Weight: -5\n\n Styleguide Settings.breakpoints.mixins.tiny\n*/\ntiny-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-tiny)))\n {block}\n\n/*\n small-screen()\n\n small-screen() Refers to (max-width: 768px)\n small-screen('min') Refers to (min-width: 769px)\n\n Weight: -4\n\n Styleguide Settings.breakpoints.mixins.small\n*/\nsmall-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-small)))\n {block}\n\n/*\n medium-screen()\n\n medium-screen() Refers to (max-width: 1023px)\n medium-screen('min') Refers to (min-width: 1024px)\n\n Weight: -3\n\n Styleguide Settings.breakpoints.mixins.medium\n*/\nmedium-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-medium)))\n {block}\n\n/*\n large-screen()\n\n large-screen() Refers to (max-width: 1200px)\n large-screen('min') Refers to (min-width: 1201px)\n\n Weight: -2\n\n Styleguide Settings.breakpoints.mixins.large\n*/\nlarge-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-large)))\n {block}\n\n/*\n extra-large-screen()\n\n extra-large-screen() Refers to (max-width: 1439px)\n extra-large-screen('min') Refers to (min-width: 1440px)\n\n Weight: -1\n\n Styleguide Settings.breakpoints.mixins.extra-large\n*/\nextra-large-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-extra-large)))\n {block}\n\n// mixins named\n\n/*\n small-device()\n\n Refers to (max-width: 543px), (max-height: 375px)\n Triggers when the viewport has a width smaller than 543px OR a height smaller than 375px\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.small-device\n*/\n\nsmall-device()\n @media (max-width: rem(size-helper('max', BP-tiny))), (max-height: rem(size-helper('max', BP-teeny)))\n {block}\n\n/*\n medium-device()\n\n Refers to (min-width: 543px) and (min-height: 375px)\n Triggers when the viewport has a width bigger than 543px AND a height bigger than 375px\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.medium-device\n*/\n\nmedium-device()\n @media (min-width: rem(size-helper('min', BP-tiny))) and (min-height: rem(size-helper('min', BP-teeny)))\n {block}\n\n/*\n desktop()\n\n Refers to (min-width: 1024px)\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.desktop\n*/\ndesktop()\n @media (min-width: rem(size-helper('min', BP-medium)))\n {block}\n\n/*\n tablet()\n\n Refers to (min-width: 769px) and (max-width: 1023px)\n\n Weight: 1\n\n Styleguide Settings.breakpoints.mixins.tablet\n*/\ntablet()\n @media (min-width: rem(size-helper('min', BP-small))) and (max-width: rem(size-helper('max', BP-medium)))\n {block}\n\n/*\n mobile()\n\n Refers to small-screen() which is (max-width: 768px)\n\n Weight: 2\n\n Styleguide Settings.breakpoints.mixins.mobile\n*/\nmobile()\n +small-screen()\n {block}\n\n/*\n gt-mobile()\n\n Refers to (min-width: 769px)\n\n Weight: 3\n\n Styleguide Settings.breakpoints.mixins.gt-mobile\n*/\ngt-mobile()\n @media (min-width: rem(size-helper('min', BP-small)))\n {block}\n\n/*\n gt-tablet()\n\n Refers to (min-width: 1024px)\n\n Weight: 4\n\n Styleguide Settings.breakpoints.mixins.gt-tablet\n*/\ngt-tablet()\n @media (min-width: rem(size-helper('min', BP-medium)))\n {block}\n\n/*\n lt-desktop()\n\n Refers to medium-screen() which is (max-width: 1023px)\n\n Weight: 5\n\n Styleguide Settings.breakpoints.mixins.lt-desktop\n*/\nlt-desktop()\n +medium-screen()\n {block}\n// @stylint on\n"],sourceRoot:""}]),t.locals={"CozyTheme--normal":"cozy-ui-bar-CozyTheme--normal--GgDII","c-modal":"cozy-ui-bar-c-modal--2ICub","c-modal-content":"cozy-ui-bar-c-modal-content--KVDws","c-modal-header":"cozy-ui-bar-c-modal-header--XED91","c-modal-header--branded":"cozy-ui-bar-c-modal-header--branded--uEj-8","c-modal-footer":"cozy-ui-bar-c-modal-footer--14fzp","c-modal-container":"cozy-ui-bar-c-modal-container--30qmf","c-modal-wrapper":"cozy-ui-bar-c-modal-wrapper--17kzj","c-modal--xsmall":"cozy-ui-bar-c-modal--xsmall--35998","c-modal--small":"cozy-ui-bar-c-modal--small--3G05m","c-modal--medium":"cozy-ui-bar-c-modal--medium--39Q8p","c-modal--large":"cozy-ui-bar-c-modal--large--NVdKg","c-modal--xlarge":"cozy-ui-bar-c-modal--xlarge--2JDmw","c-modal--xxlarge":"cozy-ui-bar-c-modal--xxlarge--2GW6J","c-modal-illu-header":"cozy-ui-bar-c-modal-illu-header--2k0gQ","c-modal-illu-header--ghost":"cozy-ui-bar-c-modal-illu-header--ghost--3zgoT","is-active":"cozy-ui-bar-is-active--M5uQG","c-modal--small-spacing":"cozy-ui-bar-c-modal--small-spacing--2NmIi","c-modal--large-spacing":"cozy-ui-bar-c-modal--large-spacing--oIddB","c-modal-app":"cozy-ui-bar-c-modal-app--1Vluy","c-app-editor":"cozy-ui-bar-c-app-editor--2Ha3Y","c-modal-app-icon":"cozy-ui-bar-c-modal-app-icon--2Pyc-","c-modal-content-fixed":"cozy-ui-bar-c-modal-content-fixed--2C_-7","c-modal-footer--button":"cozy-ui-bar-c-modal-footer--button--3yPje","c-modal-section":"cozy-ui-bar-c-modal-section--2tQ5k","c-modal-close":"cozy-ui-bar-c-modal-close--HM_QO","c-modal--closable":"cozy-ui-bar-c-modal--closable--2sytJ","c-modal-close--notitle":"cozy-ui-bar-c-modal-close--notitle--2a-O4","c-modal--overflowHidden":"cozy-ui-bar-c-modal--overflowHidden--JNfIY","c-modal-back-button":"cozy-ui-bar-c-modal-back-button--aTdxE","c-modal-wrapper--fullscreen":"cozy-ui-bar-c-modal-wrapper--fullscreen--12m40","c-modal--fullscreen":"cozy-ui-bar-c-modal--fullscreen--1k9gf",spin:"cozy-ui-bar-spin--1NeSh",shake:"cozy-ui-bar-shake--8T61M"}},function(e,t,n){var r=n(467);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){var r=n(116);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(211),o=n(366),i=n(149),a=n(213);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t,n){var r=n(83);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(n,a,u):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.QueryDefinition=t.MutationTypes=t.Mutations=t.getDoctypeFromOperation=t.uploadFile=t.removeReferencedBy=t.addReferencedBy=t.removeReferencesTo=t.addReferencesTo=t.deleteDocument=t.updateDocuments=t.updateDocument=t.createDocument=t.isAGetByIdQuery=t.Q=void 0;var o=r(n(2)),i=r(n(4)),a=r(n(6)),u=r(n(26)),c=r(n(507));n(22);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,e),this.doctype=t.doctype,this.id=t.id,this.ids=t.ids,this.selector=t.selector,this.fields=t.fields,this.indexedFields=t.indexedFields,this.partialFilter=t.partialFilter,this.sort=t.sort,this.includes=t.includes,this.referenced=t.referenced,this.limit=t.limit,this.skip=t.skip,this.cursor=t.cursor,this.bookmark=t.bookmark}return(0,a.default)(e,[{key:"checkSortOrder",value:function(e){var t=e.sort,n=e.selector,r=e.indexedFields,o=this.sort||t,i=this.selector||n||{},a=this.indexedFields||r;if(o){var u=a||Object.keys(i);if(u&&!(u.length<1))if(o.length>u.length)console.warn("You should not sort on non-indexed fields.\n\n Sort: ".concat(JSON.stringify(o),"\n\n Indexed fields: ").concat(u));else for(var c=0;c<o.length;c++)if(Object.keys(o[c])[0]!==u[c])return void console.warn("The sort order should be the same than the indexed fields.\n\n Sort: ".concat(JSON.stringify(o),"\n\n Indexed fields: ").concat(u,"\n"))}}},{key:"checkSelector",value:function(e){(0,c.default)(e,["$exists",!1])&&console.warn('The "$exists: false" predicate should be defined as a partial index for better performance.\n\n Selector: '.concat(e)),(0,c.default)(e,"$ne")&&console.info("The use of the $ne operator is more efficient with a partial index.\n\n Selector: ".concat(e))}},{key:"getById",value:function(t){if(!t)throw new Error("getById called with undefined id");return new e(l(l({},this.toDefinition()),{},{id:t}))}},{key:"getByIds",value:function(t){return new e(l(l({},this.toDefinition()),{},{ids:t}))}},{key:"where",value:function(t){return this.checkSortOrder({selector:t}),this.checkSelector(t),new e(l(l({},this.toDefinition()),{},{selector:t}))}},{key:"select",value:function(t){return new e(l(l({},this.toDefinition()),{},{fields:t}))}},{key:"indexFields",value:function(t){return this.checkSortOrder({indexedFields:t}),new e(l(l({},this.toDefinition()),{},{indexedFields:t}))}},{key:"partialIndex",value:function(t){return new e(l(l({},this.toDefinition()),{},{partialFilter:t}))}},{key:"sortBy",value:function(t){if(!(0,u.default)(t))throw new Error('Invalid sort, should be an array ([{ label: "desc"}, { name: "asc"}]), you passed '.concat(JSON.stringify(t),"."));return this.checkSortOrder({sort:t}),new e(l(l({},this.toDefinition()),{},{sort:t}))}},{key:"include",value:function(t){if(!Array.isArray(t))throw new Error("include() takes an array of relationship names");return new e(l(l({},this.toDefinition()),{},{includes:t}))}},{key:"limitBy",value:function(t){return new e(l(l({},this.toDefinition()),{},{limit:t}))}},{key:"UNSAFE_noLimit",value:function(){return new e(l(l({},this.toDefinition()),{},{limit:null}))}},{key:"offset",value:function(t){return new e(l(l({},this.toDefinition()),{},{bookmark:void 0,cursor:void 0,skip:t}))}},{key:"offsetCursor",value:function(t){return new e(l(l({},this.toDefinition()),{},{bookmark:void 0,skip:void 0,cursor:t}))}},{key:"offsetBookmark",value:function(t){return new e(l(l({},this.toDefinition()),{},{skip:void 0,cursor:void 0,bookmark:t}))}},{key:"referencedBy",value:function(t){return new e(l(l({},this.toDefinition()),{},{referenced:t}))}},{key:"toDefinition",value:function(){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}}}]),e}();t.QueryDefinition=f;t.Q=function(e){return new f({doctype:e})};t.isAGetByIdQuery=function(e){if(!e)return!1;var t=Object.values(e);return 0!==t.length&&(2===t.filter((function(e){return void 0!==e})).length&&void 0!==e.id)};var d=function(e){return{mutationType:C.CREATE_DOCUMENT,document:e}};t.createDocument=d;var p=function(e){return{mutationType:C.UPDATE_DOCUMENT,document:e}};t.updateDocument=p;var h=function(e){return{mutationType:C.UPDATE_DOCUMENTS,documents:e}};t.updateDocuments=h;var m=function(e){return{mutationType:C.DELETE_DOCUMENT,document:e}};t.deleteDocument=m;var y=function(e,t){return{mutationType:C.ADD_REFERENCES_TO,referencedDocuments:t,document:e}};t.addReferencesTo=y;var v=function(e,t){return{mutationType:C.REMOVE_REFERENCES_TO,referencedDocuments:t,document:e}};t.removeReferencesTo=v;var g=function(e,t){return{mutationType:C.ADD_REFERENCED_BY,referencedDocuments:t,document:e}};t.addReferencedBy=g;var b=function(e,t){return{mutationType:C.REMOVE_REFERENCED_BY,referencedDocuments:t,document:e}};t.removeReferencedBy=b;var w=function(e,t){return{mutationType:C.UPLOAD_FILE,file:e,dirPath:t}};t.uploadFile=w;t.getDoctypeFromOperation=function(e){if(!e.mutationType)return e.doctype;var t=e.mutationType;switch(t){case"CREATE_DOCUMENT":case"UPDATE_DOCUMENT":return e.document._type;case"UPDATE_DOCUMENTS":return e.documents[0]._type;case"DELETE_DOCUMENT":return e.document._type;case"ADD_REFERENCES_TO":case"UPLOAD_FILE":throw new Error("Not implemented");default:throw new Error("Unknown mutationType ".concat(t))}};var x={createDocument:d,updateDocument:p,updateDocuments:h,deleteDocument:m,addReferencesTo:y,removeReferencesTo:v,addReferencedBy:g,removeReferencedBy:b,uploadFile:w};t.Mutations=x;var C={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"};t.MutationTypes=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(21);t.default={}},function(e,t,n){"use strict";n.r(t);var r=n(12),o=n.n(r),i=n(4),a=n.n(i),u=n(6),c=n.n(u),s=n(11),l=n.n(s),f=n(8),d=n.n(f),p=n(10),h=n.n(p),m=n(5),y=n.n(m),v=n(2),g=n.n(v),b=n(0),w=n.n(b),x=n(1),C=n.n(x),k=n(135),S=n.n(k),_=n(102),A=n(336),O=n.n(A),E=function(e){return'The "'.concat(e,"\" 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.")},B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P,r={};try{r[t]=n(242)("./".concat(t,"/index.js"))}catch(e){console.warn(E(t))}if(e&&e!==t)try{r[e]=n(242)("./".concat(e,"/index.js"))}catch(t){console.warn(E(e))}return function(t,n){return O()(t,n,{locale:r[e]})}};function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}n.d(t,"DEFAULT_LANG",(function(){return P})),n.d(t,"I18nContext",(function(){return T})),n.d(t,"I18n",(function(){return z})),n.d(t,"translate",(function(){return I})),n.d(t,"useI18n",(function(){return D})),n.d(t,"createUseI18n",(function(){return R})),n.d(t,"initTranslation",(function(){return _.b})),n.d(t,"extend",(function(){return _.a}));var P="en",T=w.a.createContext(),z=function(e){d()(n,e);var t=j(n);function n(e){var r;return a()(this,n),r=t.call(this,e),g()(l()(r),"UNSAFE_componentWillReceiveProps",(function(e){e.lang!==r.props.lang&&r.init(e)})),r.init(r.props),r}return c()(n,[{key:"init",value:function(e){var t=e.polyglot,n=e.lang,r=e.dictRequire,o=e.context,i=e.defaultLang;this.translator=t||Object(_.b)(n,r,o,i),this.format=B(n,i),this.t=this.translator.t.bind(this.translator),this.contextValue=this.getContextValue(e)}},{key:"getContextValue",value:function(e){return{t:this.t,f:this.format,lang:(e||this.props).lang}}},{key:"getChildContext",value:function(){return this.contextValue}},{key:"render",value:function(){return w.a.createElement(T.Provider,{value:this.contextValue},this.props.children)}}]),n}(b.Component);z.propTypes={lang:C.a.string.isRequired,polyglot:C.a.object,dictRequire:C.a.func,context:C.a.string,defaultLang:C.a.string},z.defaultProps={defaultLang:P},z.childContextTypes={t:C.a.func,f:C.a.func,lang:C.a.string};var I=function(){return function(e){var t=function(t){var n=Object(b.useContext)(T);return w.a.createElement(e,o()({},t,{t:n&&n.t,f:n&&n.f,lang:n&&n.lang}))};return t.displayName="withI18n(".concat(e.displayName||e.name,")"),t}},D=function(){return Object(b.useContext)(T)},R=function(e){return function(){var t=(D()||{lang:P}).lang;return Object(b.useMemo)((function(){var n=new S.a({lang:t,phrases:e[t]}),r=B(t);return{t:n.t.bind(n),f:r,lang:t}}),[t])}};t.default=z},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"checkApp",{enumerable:!0,get:function(){return i.checkApp}}),Object.defineProperty(t,"getDeviceName",{enumerable:!0,get:function(){return o.getDeviceName}}),Object.defineProperty(t,"getPlatform",{enumerable:!0,get:function(){return r.getPlatform}}),Object.defineProperty(t,"hasDevicePlugin",{enumerable:!0,get:function(){return a.hasDevicePlugin}}),Object.defineProperty(t,"hasInAppBrowserPlugin",{enumerable:!0,get:function(){return a.hasInAppBrowserPlugin}}),Object.defineProperty(t,"hasNetworkInformationPlugin",{enumerable:!0,get:function(){return a.hasNetworkInformationPlugin}}),Object.defineProperty(t,"hasSafariPlugin",{enumerable:!0,get:function(){return a.hasSafariPlugin}}),Object.defineProperty(t,"isAndroid",{enumerable:!0,get:function(){return r.isAndroid}}),Object.defineProperty(t,"isAndroidApp",{enumerable:!0,get:function(){return r.isAndroidApp}}),Object.defineProperty(t,"isCordova",{enumerable:!0,get:function(){return u.isCordova}}),Object.defineProperty(t,"isFlagshipApp",{enumerable:!0,get:function(){return r.isFlagshipApp}}),Object.defineProperty(t,"isIOS",{enumerable:!0,get:function(){return r.isIOS}}),Object.defineProperty(t,"isIOSApp",{enumerable:!0,get:function(){return r.isIOSApp}}),Object.defineProperty(t,"isMobile",{enumerable:!0,get:function(){return r.isMobile}}),Object.defineProperty(t,"isMobileApp",{enumerable:!0,get:function(){return r.isMobileApp}}),Object.defineProperty(t,"isWebApp",{enumerable:!0,get:function(){return r.isWebApp}}),Object.defineProperty(t,"nativeLinkOpen",{enumerable:!0,get:function(){return c.nativeLinkOpen}}),Object.defineProperty(t,"openDeeplinkOrRedirect",{enumerable:!0,get:function(){return s.openDeeplinkOrRedirect}}),Object.defineProperty(t,"startApp",{enumerable:!0,get:function(){return i.startApp}});var r=n(144),o=n(349),i=n(357),a=n(147),u=n(103),c=n(358),s=n(359)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c}));var r,o=n(139),i=function(){if(!r)throw new Error("client not initialized in cozy-bar");return r},a={init:function(e){return(r=o.b).init(e)},get:{app:function(){var e;return(e=i().get).app.apply(e,arguments)},apps:function(){var e;return(e=i().get).apps.apply(e,arguments)},context:function(){var e;return(e=i().get).context.apply(e,arguments)},storageData:function(){var e;return(e=i().get).storageData.apply(e,arguments)},iconProps:function(){var e;return(e=i().get).iconProps.apply(e,arguments)},cozyURL:function(){var e;return(e=i().get).cozyURL.apply(e,arguments)},settingsAppURL:function(){var e;return(e=i().get).settingsAppURL.apply(e,arguments)}},updateAccessToken:function(){var e;return(e=i()).updateAccessToken.apply(e,arguments)},logout:function(){var e;return(e=i()).logout.apply(e,arguments)},cozyFetchJSON:function(){var e;return(e=i()).cozyFetchJSON.apply(e,arguments)},getStack:i,getIntents:function(){return i().get.intents()}};t.b=a;var u=a.cozyFetchJSON,c=a.getIntents},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=SyntaxError,o=Function,i=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new i},s=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,l=n(168)(),f=Object.getPrototypeOf||function(e){return e.__proto__},d={},p="undefined"==typeof Uint8Array?void 0:f(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":l?f([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?f(f([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?f((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?f((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?f(""[Symbol.iterator]()):void 0,"%Symbol%":l?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":s,"%TypedArray%":p,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},m={"%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"]},y=n(89),v=n(167),g=y.call(Function.call,Array.prototype.concat),b=y.call(Function.apply,Array.prototype.splice),w=y.call(Function.call,String.prototype.replace),x=y.call(Function.call,String.prototype.slice),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,S=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return w(e,C,(function(e,t,n,r){o[o.length]=n?w(r,k,"$1"):t||e})),o},_=function(e,t){var n,o=e;if(v(m,o)&&(o="%"+(n=m[o])[0]+"%"),v(h,o)){var u=h[o];if(u===d&&(u=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return h[t]=n,n}(o)),void 0===u&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:u}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');var n=S(e),o=n.length>0?n[0]:"",a=_("%"+o+"%",t),c=a.name,s=a.value,l=!1,f=a.alias;f&&(o=f[0],b(n,g([0,1],f)));for(var d=1,p=!0;d<n.length;d+=1){var m=n[d],y=x(m,0,1),w=x(m,-1);if(('"'===y||"'"===y||"`"===y||'"'===w||"'"===w||"`"===w)&&y!==w)throw new r("property names with quotes must have matching quotes");if("constructor"!==m&&p||(l=!0),v(h,c="%"+(o+="."+m)+"%"))s=h[c];else if(null!=s){if(!(m in s)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&d+1>=n.length){var C=u(s,m);s=(p=!!C)&&"get"in C&&!("originalValue"in C.get)?C.get:s[m]}else p=v(s,m),s=s[m];p&&!l&&(h[c]=s)}}return s}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0});var i={CozyLink:!0,StackLink:!0,compose:!0,QueryDefinition:!0,Q:!0,Mutations:!0,MutationTypes:!0,getDoctypeFromOperation:!0,Association:!0,HasMany:!0,HasOne:!0,HasOneInPlace:!0,HasManyInPlace:!0,HasManyTriggers:!0,isReferencedBy:!0,isReferencedById:!0,getReferencedBy:!0,getReferencedById:!0,dehydrate:!0,generateWebLink:!0,rootCozyUrl:!0,InvalidCozyUrlError:!0,InvalidProtocolError:!0,cancelable:!0,isQueryLoading:!0,hasQueryBeenLoaded:!0,getQueryFromState:!0,Registry:!0,RealTimeQueries:!0,manifest:!0,CozyProvider:!0,withMutation:!0,withMutations:!0,Query:!0,queryConnect:!0,queryConnectFlat:!0,withClient:!0,models:!0,fetchPolicies:!0,BulkEditError:!0};Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"CozyLink",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"StackLink",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"compose",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"QueryDefinition",{enumerable:!0,get:function(){return l.QueryDefinition}}),Object.defineProperty(t,"Q",{enumerable:!0,get:function(){return l.Q}}),Object.defineProperty(t,"Mutations",{enumerable:!0,get:function(){return l.Mutations}}),Object.defineProperty(t,"MutationTypes",{enumerable:!0,get:function(){return l.MutationTypes}}),Object.defineProperty(t,"getDoctypeFromOperation",{enumerable:!0,get:function(){return l.getDoctypeFromOperation}}),Object.defineProperty(t,"Association",{enumerable:!0,get:function(){return f.Association}}),Object.defineProperty(t,"HasMany",{enumerable:!0,get:function(){return f.HasMany}}),Object.defineProperty(t,"HasOne",{enumerable:!0,get:function(){return f.HasOne}}),Object.defineProperty(t,"HasOneInPlace",{enumerable:!0,get:function(){return f.HasOneInPlace}}),Object.defineProperty(t,"HasManyInPlace",{enumerable:!0,get:function(){return f.HasManyInPlace}}),Object.defineProperty(t,"HasManyTriggers",{enumerable:!0,get:function(){return f.HasManyTriggers}}),Object.defineProperty(t,"isReferencedBy",{enumerable:!0,get:function(){return d.isReferencedBy}}),Object.defineProperty(t,"isReferencedById",{enumerable:!0,get:function(){return d.isReferencedById}}),Object.defineProperty(t,"getReferencedBy",{enumerable:!0,get:function(){return d.getReferencedBy}}),Object.defineProperty(t,"getReferencedById",{enumerable:!0,get:function(){return d.getReferencedById}}),Object.defineProperty(t,"dehydrate",{enumerable:!0,get:function(){return p.dehydrate}}),Object.defineProperty(t,"generateWebLink",{enumerable:!0,get:function(){return p.generateWebLink}}),Object.defineProperty(t,"rootCozyUrl",{enumerable:!0,get:function(){return p.rootCozyUrl}}),Object.defineProperty(t,"InvalidCozyUrlError",{enumerable:!0,get:function(){return p.InvalidCozyUrlError}}),Object.defineProperty(t,"InvalidProtocolError",{enumerable:!0,get:function(){return p.InvalidProtocolError}}),Object.defineProperty(t,"cancelable",{enumerable:!0,get:function(){return h.cancelable}}),Object.defineProperty(t,"isQueryLoading",{enumerable:!0,get:function(){return h.isQueryLoading}}),Object.defineProperty(t,"hasQueryBeenLoaded",{enumerable:!0,get:function(){return h.hasQueryBeenLoaded}}),Object.defineProperty(t,"getQueryFromState",{enumerable:!0,get:function(){return m.getQueryFromState}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"RealTimeQueries",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"CozyProvider",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"withMutation",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"withMutations",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"Query",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"queryConnect",{enumerable:!0,get:function(){return k.queryConnect}}),Object.defineProperty(t,"queryConnectFlat",{enumerable:!0,get:function(){return k.queryConnectFlat}}),Object.defineProperty(t,"withClient",{enumerable:!0,get:function(){return k.withClient}}),Object.defineProperty(t,"fetchPolicies",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"BulkEditError",{enumerable:!0,get:function(){return E.BulkEditError}}),t.models=t.manifest=void 0;var a=o(n(41)),u=o(n(186)),c=o(n(274)),s=o(n(586)),l=n(21),f=n(126),d=n(191),p=n(192),h=n(592),m=n(60),y=o(n(178)),v=o(n(593)),g=r(n(594));t.manifest=g;var b=o(n(595)),w=o(n(596)),x=o(n(597)),C=o(n(299)),k=n(598),S=r(n(600));t.models=S;var _=o(n(294)),A=n(665);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var O=n(666);Object.keys(O).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===O[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return O[e]}}))}));var E=n(275)},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeDoc=F,t.normalizeDoctype=t.default=void 0;var i=o(n(31)),a=o(n(17)),u=o(n(7)),c=o(n(46)),s=o(n(9)),l=o(n(4)),f=o(n(6)),d=o(n(2)),p=o(n(503)),h=n(44),m=o(n(125)),y=o(n(76)),v=o(n(264)),g=o(n(512)),b=o(n(516)),w=n(267),x=r(n(72)),C=r(n(183));n(58);function k(){var e=(0,c.default)(["/data/","/_design/","/copy?rev=",""]);return k=function(){return e},e}function S(){var e=(0,c.default)(["/data/","/_design/","?rev=",""]);return S=function(){return e},e}function _(){var e=(0,c.default)(["/data/","/_design_docs?include_docs=true"]);return _=function(){return e},e}function A(){var e=(0,c.default)(["/data/","/_index"]);return A=function(){return e},e}function O(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(){var e=(0,c.default)(["/data/","/","?rev=",""]);return B=function(){return e},e}function j(){var e=(0,c.default)(["/data/","/",""]);return j=function(){return e},e}function P(){var e=(0,c.default)(["/data/","/",""]);return P=function(){return e},e}function T(){var e=(0,c.default)(["/data/","/_all_docs?include_docs=true"]);return T=function(){return e},e}function z(){var e=(0,c.default)(["/data/","/_find"]);return z=function(){return e},e}function I(){var e=(0,c.default)(["/data/","/",""]);return I=function(){return e},e}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,d.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e._id||e.id;return R({id:n,_id:n,_type:t},e)}var M=function(e){return Object.assign({},(0,y.default)(e,"_type"),{_deleted:!0})},N=function(){function e(t,n){(0,l.default)(this,e),this.doctype=t,this.stackClient=n,this.indexes={},this.endpoint="/data/".concat(this.doctype,"/")}var t,n,r,o,c,E,D,N,L,U,$,G,q,J,H,W,Q,V,Y,K,Z;return(0,f.default)(e,[{key:"all",value:(Z=(0,s.default)(u.default.mark((function e(){var t,n,r,o,i,a,c,s,l,f,d,p,m,y,v,b=this,w=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=w.length>0&&void 0!==w[0]?w[0]:{},n=t.limit,r=void 0===n?100:n,o=t.skip,i=void 0===o?0:o,a=t.bookmark,c=t.keys,l=(s=!!c||null===r)?"_all_docs":"_normal_docs",f=(0,h.uri)(I(),this.doctype,l),d={include_docs:!0,limit:r,skip:i,keys:c,bookmark:a},p=C.buildURL(f,d),e.prev=7,e.next=10,this.stackClient.fetchJSON("GET",p);case 10:m=e.sent,e.next=16;break;case 13:return e.prev=13,e.t0=e.catch(7),e.abrupt("return",(0,x.dontThrowNotFoundError)(e.t0));case 16:return y=s?m.rows.filter((function(e){return e&&null!==e.doc&&!e.error&&!(0,g.default)(e.id,"_design")})).map((function(e){return F(e.doc,b.doctype)})):m.rows.map((function(e){return F(e,b.doctype)})),v=a?m.rows.length>=r:i+m.rows.length<m.total_rows,e.abrupt("return",{data:y,meta:{count:s?y.length:m.total_rows},skip:i,bookmark:m.bookmark,next:v});case 19:case"end":return e.stop()}}),e,this,[[7,13]])}))),function(){return Z.apply(this,arguments)})},{key:"fetchDocumentsWithMango",value:(K=(0,s.default)(u.default.mark((function e(t,n){var r,o=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},e.abrupt("return",this.stackClient.fetchJSON("POST",t,this.toMangoOptions(n,r)));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return K.apply(this,arguments)})},{key:"migrateUnamedIndex",value:(Y=(0,s.default)(u.default.mark((function e(t,n){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.copyIndex(t,n);case 3:return e.next=5,this.destroyIndex(t);case 5:e.next=16;break;case 7:if(e.prev=7,e.t0=e.catch(0),(0,x.isDocumentUpdateConflict)(e.t0)){e.next=11;break}throw e.t0;case 11:return(0,h.sleep)(1e3),e.next=14,this.copyIndex(t,n);case 14:return e.next=16,this.destroyIndex(t);case 16:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(e,t){return Y.apply(this,arguments)})},{key:"handleMissingIndex",value:(V=(0,s.default)(u.default.mark((function e(t,n){var r,o,i,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.indexedFields,o=n.partialFilter,r||(r=(0,w.getIndexFields)({sort:n.sort,selector:t})),e.next=4,this.findExistingIndex(t,n);case 4:if(i=e.sent,a=(0,w.getIndexNameFromFields)(r),i){e.next=11;break}return e.next=9,this.createIndex(r,{partialFilter:o,indexName:a});case 9:e.next=17;break;case 11:if(i._id==="_design/".concat(a)){e.next=16;break}return e.next=14,this.migrateUnamedIndex(i,a);case 14:e.next=17;break;case 16:throw new Error("Index unusable for query, index used: ".concat(a));case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return V.apply(this,arguments)})},{key:"findWithMango",value:(Q=(0,s.default)(u.default.mark((function e(t,n){var r,o,i=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},e.prev=1,e.next=4,this.fetchDocumentsWithMango(t,n,r);case 4:o=e.sent,e.next=18;break;case 7:if(e.prev=7,e.t0=e.catch(1),(0,x.isIndexNotFoundError)(e.t0)||(0,x.isNoUsableIndexError)(e.t0)){e.next=13;break}throw e.t0;case 13:return e.next=15,this.handleMissingIndex(n,r);case 15:return e.next=17,this.fetchDocumentsWithMango(t,n,r);case 17:o=e.sent;case 18:return e.abrupt("return",o);case 19:case"end":return e.stop()}}),e,this,[[1,7]])}))),function(e,t){return Q.apply(this,arguments)})},{key:"find",value:(W=(0,s.default)(u.default.mark((function e(t){var n,r,o,i,a,c=this,s=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=n.skip,o=void 0===r?0:r,e.prev=2,a=(0,h.uri)(z(),this.doctype),e.next=6,this.findWithMango(a,t,n);case 6:i=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",(0,x.dontThrowNotFoundError)(e.t0));case 12:return e.abrupt("return",{data:i.docs.map((function(e){return F(e,c.doctype)})),next:i.next,skip:o,bookmark:i.bookmark,execution_stats:i.execution_stats});case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return W.apply(this,arguments)})},{key:"get",value:(H=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",x.default.get(this.stackClient,"".concat(this.endpoint).concat(encodeURIComponent(t)),{normalize:this.constructor.normalizeDoctype(this.doctype)}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return H.apply(this,arguments)})},{key:"getAll",value:(J=(0,s.default)(u.default.mark((function e(t){var n,r,o=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.stackClient.fetchJSON("POST",(0,h.uri)(T(),this.doctype),{keys:t});case 3:n=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",(0,x.dontThrowNotFoundError)(e.t0));case 9:return r=n.rows.filter((function(e){return e.doc})),e.abrupt("return",{data:r.map((function(e){return F(e.doc,o.doctype)})),meta:{count:r.length}});case 11:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e){return J.apply(this,arguments)})},{key:"create",value:(q=(0,s.default)(u.default.mark((function e(t){var n,r,o,i,c,s;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id,t._type,r=(0,a.default)(t,["_id","_type"]),i=(o=!!n)?"PUT":"POST",c=(0,h.uri)(P(),this.doctype,o?n:""),e.next=6,this.stackClient.fetchJSON(i,c,r);case 6:return s=e.sent,e.abrupt("return",{data:F(s.data,this.doctype)});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return q.apply(this,arguments)})},{key:"update",value:(G=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("PUT",(0,h.uri)(j(),this.doctype,t._id),t);case 2:return n=e.sent,e.abrupt("return",{data:F(n.data,this.doctype)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"destroy",value:($=(0,s.default)(u.default.mark((function e(t){var n,r,o,i;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id,r=t._rev,o=(0,a.default)(t,["_id","_rev"]),e.next=3,this.stackClient.fetchJSON("DELETE",(0,h.uri)(B(),this.doctype,n,r));case 3:return i=e.sent,e.abrupt("return",{data:F(R(R({},o),{},{_id:n,_rev:i.rev,_deleted:!0}),this.doctype)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return $.apply(this,arguments)})},{key:"updateAll",value:(U=(0,s.default)(u.default.mark((function e(t){var n,r,o,i,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.stackClient,(r=t?t.map((function(e){return(0,y.default)(e,"_type")})):t)&&r.length){e.next=4;break}return e.abrupt("return",Promise.resolve([]));case 4:return e.prev=4,e.next=7,n.fetchJSON("POST","/data/".concat(this.doctype,"/_bulk_docs"),{docs:r});case 7:return o=e.sent,e.abrupt("return",o);case 11:if(e.prev=11,e.t0=e.catch(4),!e.t0.reason||!e.t0.reason.reason||"Database does not exist."!==e.t0.reason.reason){e.next=24;break}return e.next=16,this.create(r[0]);case 16:return i=e.sent,e.next=19,this.updateAll(r.slice(1));case 19:return(a=e.sent).unshift({ok:!0,id:i._id,rev:i._rev}),e.abrupt("return",a);case 24:throw e.t0;case 25:case"end":return e.stop()}}),e,this,[[4,11]])}))),function(e){return U.apply(this,arguments)})},{key:"destroyAll",value:function(e){return this.updateAll(e.map(M))}},{key:"toMangoOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.sort,r=t.indexedFields,o=t.fields,a=t.skip,u=void 0===a?0:a,c=t.limit,s=t.bookmark;n=(0,w.transformSort)(n),r=r||(0,w.getIndexFields)({sort:n,selector:e});var l=t.indexId||"_design/".concat((0,w.getIndexNameFromFields)(r));if(n){var f=(0,m.default)(n.map((function(e){return(0,v.default)(Object.values(e))})));if(f.length>1)throw new Error("Mango sort can only use a single order (asc or desc).");var h,y=f.length>0?(0,v.default)(f):"asc",g=O(r);try{var b=function(){var e=h.value;n.find((function(t){return(0,v.default)(Object.keys(t))===e}))||n.push((0,d.default)({},e,y))};for(g.s();!(h=g.n()).done;)b()}catch(e){g.e(e)}finally{g.f()}}var x={selector:e,use_index:l,fields:o?[].concat((0,i.default)(o),["_id","_type","class"]):void 0,limit:c,skip:u,bookmark:t.bookmark||s,sort:n,execution_stats:!!(0,p.default)("debug")||void 0};return x}},{key:"checkUniquenessOf",value:(L=(0,s.default)(u.default.mark((function e(t,n){var r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getUniqueIndexId(t);case 2:return r=e.sent,e.next=5,this.find((0,d.default)({},t,n),{indexId:r,fields:["_id"]});case 5:return o=e.sent,e.abrupt("return",0===o.data.length);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return L.apply(this,arguments)})},{key:"getUniqueIndexId",value:function(e){return this.getIndexId([e],{indexName:"".concat(this.doctype,"/").concat(e)})}},{key:"getIndexId",value:(N=(0,s.default)(u.default.mark((function e(t,n){var r,o,i,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.partialFilter,o=n.indexName,i=void 0===o?this.getIndexNameFromFields(t):o,this.indexes[i]){e.next=20;break}return e.prev=2,e.next=5,this.createIndex(t,{partialFilter:r});case 5:a=e.sent,e.next=19;break;case 8:if(e.prev=8,e.t0=e.catch(2),(0,x.isIndexConflictError)(e.t0)){e.next=14;break}throw e.t0;case 14:return e.next=16,(0,h.sleep)(1e3);case 16:return e.next=18,this.createIndex(t,{partialFilter:r});case 18:a=e.sent;case 19:this.indexes[i]=a;case 20:return e.abrupt("return",this.indexes[i].id);case 21:case"end":return e.stop()}}),e,this,[[2,8]])}))),function(e,t){return N.apply(this,arguments)})},{key:"createIndex",value:(D=(0,s.default)(u.default.mark((function e(t){var n,r,o,i,a,c,s,l,f=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.partialFilter,o=n.indexName,i={index:{fields:t}},o&&(i.ddoc=o),r&&(i.index.partial_filter_selector=r),e.prev=4,e.next=7,this.stackClient.fetchJSON("POST",(0,h.uri)(A(),this.doctype),i);case 7:a=e.sent,e.next=17;break;case 10:if(e.prev=10,e.t0=e.catch(4),(0,x.isIndexConflictError)(e.t0)){e.next=16;break}throw e.t0;case 16:return e.abrupt("return");case 17:if(c={id:a.id,fields:t},"exists"!==a.result){e.next=20;break}return e.abrupt("return",c);case 20:return s={},t.forEach((function(e){return s[e]={$gt:null}})),l={indexId:c.id,limit:1},e.next=25,(0,h.attempt)(this.find(s,l));case 25:if(!e.sent){e.next=27;break}return e.abrupt("return",c);case 27:return e.next=29,(0,h.sleep)(1e3);case 29:return e.next=31,(0,h.attempt)(this.find(s,l));case 31:if(!e.sent){e.next=33;break}return e.abrupt("return",c);case 33:return e.next=35,(0,h.sleep)(500);case 35:return e.abrupt("return",c);case 36:case"end":return e.stop()}}),e,this,[[4,10]])}))),function(e){return D.apply(this,arguments)})},{key:"fetchAllMangoIndexes",value:(E=(0,s.default)(u.default.mark((function e(){var t,n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,h.uri)(_(),this.doctype),e.next=3,this.stackClient.fetchJSON("GET",t);case 3:return n=e.sent,e.abrupt("return",n.rows.filter((function(e){return"query"===e.doc.language})).map((function(e){return(0,w.normalizeDesignDoc)(e)})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return E.apply(this,arguments)})},{key:"destroyIndex",value:(c=(0,s.default)(u.default.mark((function e(t){var n,r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id.split("/")[1],r=t._rev,o=(0,h.uri)(S(),this.doctype,n,r),e.abrupt("return",this.stackClient.fetchJSON("DELETE",o));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"copyIndex",value:(o=(0,s.default)(u.default.mark((function e(t,n){var r,o,i,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t._id.split("/")[1],o=t._rev,i=(0,h.uri)(k(),this.doctype,r,o),a={headers:{Destination:"_design/".concat(n)}},e.abrupt("return",this.stackClient.fetchJSON("POST",i,null,a));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"findExistingIndex",value:(r=(0,s.default)(u.default.mark((function e(t,n){var r,o,i,a,c,s,l,f,d;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.sort,o=n.indexedFields,i=n.partialFilter,e.next=3,this.fetchAllMangoIndexes();case 3:if(!((a=e.sent).length<1)){e.next=6;break}return e.abrupt("return",null);case 6:r=(0,w.transformSort)(r),c=o||(0,w.getIndexFields)({sort:r,selector:t}),s=a.find((function(e){return(0,w.isMatchingIndex)(e,c,i)})),l=O(a),e.prev=10,l.s();case 12:if((f=l.n()).done){e.next=19;break}if(d=f.value,!(0,w.isInconsistentIndex)(d)){e.next=17;break}return e.next=17,this.destroyIndex(d);case 17:e.next=12;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(10),l.e(e.t0);case 24:return e.prev=24,l.f(),e.finish(24);case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}}),e,this,[[10,21,24,27]])}))),function(e,t){return r.apply(this,arguments)})},{key:"fetchChangesRaw",value:(n=(0,s.default)(u.default.mark((function e(t){var n,r,o,i,a,c;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.doc_ids&&t.doc_ids.length>0,r="?".concat([b.default.stringify(R(R({},(0,y.default)(t,["doc_ids","includeDocs"])),{},{include_docs:t.includeDocs})),n&&void 0===t.filter?"filter=_doc_ids":void 0].filter(Boolean).join("&")),o=n?"POST":"GET",i="/data/".concat(this.doctype,"/_changes").concat(r),a=n?{doc_ids:t.doc_ids}:void 0,e.next=7,this.stackClient.fetchJSON(o,i,a);case 7:return c=e.sent,e.abrupt("return",c);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"fetchChanges",value:(t=(0,s.default)(u.default.mark((function e(){var t,n,r,o,i,a,c=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},n=c.length>1&&void 0!==c[1]?c[1]:{},r={includeDocs:!0},"object"!=typeof t?(r.since=t,console.warn('fetchChanges use couchOptions as Object not a string, since is deprecated, please use fetchChanges({since: "'.concat(t,'"}).'))):Object.keys(t).length>0&&Object.assign(r,t),e.next=6,this.fetchChangesRaw(r);case 6:return o=e.sent,i=o.last_seq,a=o.results.map((function(e){return e.doc})).filter(Boolean),n.includeDesign||(a=a.filter((function(e){return 0!==e._id.indexOf("_design")}))),n.includeDeleted||(a=a.filter((function(e){return!e._deleted}))),e.abrupt("return",{newLastSeq:i,documents:a});case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}],[{key:"normalizeDoctype",value:function(e){return this.normalizeDoctypeRawApi(e)}},{key:"normalizeDoctypeJsonApi",value:function(e){return function(t,n){return F(t,e)}}},{key:"normalizeDoctypeRawApi",value:function(e){return function(t,n){return F(n,e)}}}]),e}(),L=N;t.default=L;var U=N.normalizeDoctype;t.normalizeDoctype=U},function(e,t,n){var r=n(469),o=n(247),i=n(149),a=n(470);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";var r=n(331),o="object"==typeof self&&self&&self.Object===Object&&self,i=(r.a||o||Function("return this")()).Symbol,a=Object.prototype,u=a.hasOwnProperty,c=a.toString,s=i?i.toStringTag:void 0;var l=function(e){var t=u.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=c.call(e);return r&&(t?e[s]=n:delete e[s]),o},f=Object.prototype.toString;var d=function(e){return f.call(e)},p=i?i.toStringTag:void 0;var h=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":p&&p in Object(e)?l(e):d(e)};var m=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var y=function(e){return null!=e&&"object"==typeof e},v=Function.prototype,g=Object.prototype,b=v.toString,w=g.hasOwnProperty,x=b.call(Object);var C=function(e){if(!y(e)||"[object Object]"!=h(e))return!1;var t=m(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&b.call(n)==x},k=n(134),S="@@redux/INIT";function _(e,t,n){var r;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(_)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,a=[],u=a,c=!1;function s(){u===a&&(u=a.slice())}function l(){return i}function f(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return s(),u.push(e),function(){if(t){t=!1,s();var n=u.indexOf(e);u.splice(n,1)}}}function d(e){if(!C(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw new Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=u,n=0;n<t.length;n++){(0,t[n])()}return e}return d({type:S}),(r={dispatch:d,subscribe:f,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,d({type:S})}})[k.default]=function(){var e,t=f;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[k.default]=function(){return this},e},r}function A(e,t){var n=t&&t.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function O(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}var i=Object.keys(n);var a=void 0;try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:S}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+S+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){a=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(a)throw a;for(var r=!1,o={},u=0;u<i.length;u++){var c=i[u],s=n[c],l=e[c],f=s(l,t);if(void 0===f){var d=A(c,t);throw new Error(d)}o[c]=f,r=r||f!==l}return r?o:e}}function E(e,t){return function(){return t(e.apply(void 0,arguments))}}function B(e,t){if("function"==typeof e)return E(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],a=e[i];"function"==typeof a&&(r[i]=E(a,t))}return r}function j(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}var P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function T(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var i,a=e(n,r,o),u=a.dispatch,c={getState:a.getState,dispatch:function(e){return u(e)}};return i=t.map((function(e){return e(c)})),u=j.apply(void 0,i)(a.dispatch),P({},a,{dispatch:u})}}}n.d(t,"e",(function(){return _})),n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return B})),n.d(t,"a",(function(){return T})),n.d(t,"d",(function(){return j}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(5),o=n(165),i=n(427),a=n(428);function u(t){var n="function"==typeof Map?new Map:void 0;return e.exports=u=function(e){if(null===e||!i(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),o(t,e)},u(t)}e.exports=u},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.r(t);var o=n(0),i=n(1),a=n.n(i),u=a.a.shape({trySubscribe:a.a.func.isRequired,tryUnsubscribe:a.a.func.isRequired,notifyNestedSubs:a.a.func.isRequired,isSubscribed:a.a.func.isRequired}),c=a.a.shape({subscribe:a.a.func.isRequired,dispatch:a.a.func.isRequired,getState:a.a.func.isRequired});function s(e){var t;void 0===e&&(e="store");var n=e+"Subscription",i=function(t){r(a,t);var i=a.prototype;function a(n,r){var o;return(o=t.call(this,n,r)||this)[e]=n.store,o}return i.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},i.render=function(){return o.Children.only(this.props.children)},a}(o.Component);return i.propTypes={store:c.isRequired,children:a.a.element.isRequired},i.childContextTypes=((t={})[e]=c.isRequired,t[n]=u,t),i}var l=s();function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var d=n(28),p=n(36),h=n(79),m=n.n(h),y=n(141),v=n.n(y),g=n(77),b={notify:function(){}};var w=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=b}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,r=0;r<n.length;r++)n[r]()},get:function(){return t},subscribe:function(n){var r=!0;return t===e&&(t=e.slice()),t.push(n),function(){r&&null!==e&&(r=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=b)},e}(),x=0,C={};function k(){}function S(e,t){var n,i;void 0===t&&(t={});var a=t,s=a.getDisplayName,l=void 0===s?function(e){return"ConnectAdvanced("+e+")"}:s,h=a.methodName,y=void 0===h?"connectAdvanced":h,b=a.renderCountProp,S=void 0===b?void 0:b,_=a.shouldHandleStateChanges,A=void 0===_||_,O=a.storeKey,E=void 0===O?"store":O,B=a.withRef,j=void 0!==B&&B,P=Object(p.a)(a,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),T=E+"Subscription",z=x++,I=((n={})[E]=c,n[T]=u,n),D=((i={})[T]=u,i);return function(t){v()(Object(g.isValidElementType)(t),"You must pass a component to the function returned by "+y+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",i=l(n),a=Object(d.a)({},P,{getDisplayName:l,methodName:y,renderCountProp:S,shouldHandleStateChanges:A,storeKey:E,withRef:j,displayName:i,wrappedComponentName:n,WrappedComponent:t}),u=function(n){function u(e,t){var r;return(r=n.call(this,e,t)||this).version=z,r.state={},r.renderCount=0,r.store=e[E]||t[E],r.propsMode=Boolean(e[E]),r.setWrappedInstance=r.setWrappedInstance.bind(f(f(r))),v()(r.store,'Could not find "'+E+'" in either the context or props of "'+i+'". Either wrap the root component in a <Provider>, or explicitly pass "'+E+'" as a prop to "'+i+'".'),r.initSelector(),r.initSubscription(),r}r(u,n);var c=u.prototype;return c.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[T]=t||this.context[T],e},c.componentDidMount=function(){A&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},c.componentWillReceiveProps=function(e){this.selector.run(e)},c.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},c.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=k,this.store=null,this.selector.run=k,this.selector.shouldComponentUpdate=!1},c.getWrappedInstance=function(){return v()(j,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+y+"() call."),this.wrappedInstance},c.setWrappedInstance=function(e){this.wrappedInstance=e},c.initSelector=function(){var t=e(this.store.dispatch,a);this.selector=function(e,t){var n={run:function(r){try{var o=e(t.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},c.initSubscription=function(){if(A){var e=(this.propsMode?this.props:this.context)[T];this.subscription=new w(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},c.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(C)):this.notifyNestedSubs()},c.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},c.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},c.addExtraProps=function(e){if(!(j||S||this.propsMode&&this.subscription))return e;var t=Object(d.a)({},e);return j&&(t.ref=this.setWrappedInstance),S&&(t[S]=this.renderCount++),this.propsMode&&this.subscription&&(t[T]=this.subscription),t},c.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(o.createElement)(t,this.addExtraProps(e.props))},u}(o.Component);return u.WrappedComponent=t,u.displayName=i,u.childContextTypes=D,u.contextTypes=I,u.propTypes=I,m()(u,t)}}var _=Object.prototype.hasOwnProperty;function A(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function O(e,t){if(A(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!_.call(t,n[o])||!A(e[n[o]],t[n[o]]))return!1;return!0}var E=n(32);function B(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function j(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function P(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=j(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=j(o),o=r(t,n)),o},r}}var T=[function(e){return"function"==typeof e?P(e):void 0},function(e){return e?void 0:B((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?B((function(t){return Object(E.b)(e,t)})):void 0}];var z=[function(e){return"function"==typeof e?P(e):void 0},function(e){return e?void 0:B((function(){return{}}))}];function I(e,t,n){return Object(d.a)({},n,e,t)}var D=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,u){var c=e(t,n,u);return a?o&&i(c,r)||(r=c):(a=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return I}}];function R(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function F(e,t,n,r,o){var i,a,u,c,s,l=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,p=!1;function h(o,p){var h,m,y=!f(p,a),v=!l(o,i);return i=o,a=p,y&&v?(u=e(i,a),t.dependsOnOwnProps&&(c=t(r,a)),s=n(u,c,a)):y?(e.dependsOnOwnProps&&(u=e(i,a)),t.dependsOnOwnProps&&(c=t(r,a)),s=n(u,c,a)):v?(h=e(i,a),m=!d(h,u),u=h,m&&(s=n(u,c,a)),s):s}return function(o,l){return p?h(o,l):(u=e(i=o,a=l),c=t(r,a),s=n(u,c,a),p=!0,s)}}function M(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Object(p.a)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),u=r(e,i),c=o(e,i);return(i.pure?F:R)(a,u,c,e,i)}function N(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function L(e,t){return e===t}var U,$,G,q,J,H,W,Q,V,Y,K,Z,X=(G=($=void 0===U?{}:U).connectHOC,q=void 0===G?S:G,J=$.mapStateToPropsFactories,H=void 0===J?z:J,W=$.mapDispatchToPropsFactories,Q=void 0===W?T:W,V=$.mergePropsFactories,Y=void 0===V?D:V,K=$.selectorFactory,Z=void 0===K?M:K,function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.pure,a=void 0===i||i,u=o.areStatesEqual,c=void 0===u?L:u,s=o.areOwnPropsEqual,l=void 0===s?O:s,f=o.areStatePropsEqual,h=void 0===f?O:f,m=o.areMergedPropsEqual,y=void 0===m?O:m,v=Object(p.a)(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),g=N(e,H,"mapStateToProps"),b=N(t,Q,"mapDispatchToProps"),w=N(n,Y,"mergeProps");return q(Z,Object(d.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:g,initMapDispatchToProps:b,initMergeProps:w,pure:a,areStatesEqual:c,areOwnPropsEqual:l,areStatePropsEqual:h,areMergedPropsEqual:y},v))});n.d(t,"Provider",(function(){return l})),n.d(t,"createProvider",(function(){return s})),n.d(t,"connectAdvanced",(function(){return S})),n.d(t,"connect",(function(){return X}))},function(e,t,n){var r=n(207),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";(function(e){var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(246)),a=o(n(19)),u=o(n(31)),c=o(n(17)),s=o(n(7)),l=o(n(9)),f=o(n(4)),d=o(n(6)),p=o(n(2)),h=o(n(75)),m=o(n(472)),y=o(n(171)),v=o(n(474)),g=o(n(479)),b=o(n(483)),w=o(n(18)),x=o(n(45)),C=r(n(256)),k=n(59),S=o(n(274)),_=n(126),A=n(191),O=n(192),E=n(21),B=n(569),j=o(n(570)),P=r(n(60)),T=o(n(294)),z=o(n(572)),I=n(186),D=o(n(295)),R=n(578),F=o(n(187)),M=(n(22),n(188)),N=o(n(579)),L=o(n(583)),U=n(584);function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(e){return Array.isArray(e)?e:[e]},W=function(e){return{get:function(t,n){return console.warn(e),t[n]}}},Q=function(e){return e.prototype.addReferences&&e.prototype.removeReferences},V=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,f.default)(this,t),(0,p.default)(this,"fetchQueryAndGetFromState",function(){var t=(0,l.default)(s.default.mark((function t(n){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.query(n.definition,n.options);case 3:return t.abrupt("return",e.getQueryFromState(n.options.as));case 6:throw t.prev=6,t.t0=t.catch(0),t.t0;case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e){return t.apply(this,arguments)}}());var r=n.link,o=n.links,i=n.schema,a=void 0===i?{}:i,u=n.appMetadata,d=void 0===u?{}:u,h=n.capabilities,m=(0,c.default)(n,["link","links","schema","appMetadata","capabilities"]);r&&console.warn("`link` is deprecated, use `links`"),this.appMetadata=d,this.options=m,this.queryIdGenerator=new M.QueryIDGenerator,this.isLogged=!1,this.instanceOptions={},this.handleRevocationChange=this.handleRevocationChange.bind(this),this.handleTokenRefresh=this.handleTokenRefresh.bind(this),this.createClient();var y=this.getStackClient();y.on("error",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.emit.apply(e,["error"].concat(n))})),this.links=H(r||o||new S.default),this.registerClientOnLinks(),this.chain=(0,I.chain)(this.links),this.schema=new z.default(a,y),this.capabilities=h||null,this.plugins={};try{this.loadInstanceOptionsFromDOM()}catch(e){}m.uri&&m.token&&this.login(),this.storeAccesors=null,!1!==m.store&&this.ensureStore(),this._promiseCache=new L.default}var n,r,o,x,T,$,J,V,Y,K,Z,X,ee,te,ne,re;return(0,d.default)(t,[{key:"emit",value:function(){}},{key:"on",value:function(){}},{key:"removeListener",value:function(){}},{key:"registerPlugin",value:function(e,t){if(!e.pluginName)throw new Error("Cannot register a plugin whose class does not have `pluginName` attribute.");if(this.plugins[e.pluginName])throw new Error("Cannot register plugin ".concat(e.pluginName,". A plugin with the same name has already been registered."));var n=new e(this,t);return this.plugins[e.pluginName]=n,n}},{key:"addSchema",value:function(e){this.schema.add(e)}},{key:"registerClientOnLinks",value:function(){var e,t=q(this.links);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.registerClient)try{n.registerClient(this)}catch(e){console.warn(e)}}}catch(e){t.e(e)}finally{t.f()}}},{key:"login",value:function(e){return this.isLogged&&!this.isRevoked?(console.warn("CozyClient is already logged."),this.loginPromise):this.loginPromise=this._login(e)}},{key:"_login",value:(re=(0,l.default)(s.default.mark((function e(t){var n,r,o;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.emit("beforeLogin"),this.registerClientOnLinks(),t&&(t.uri&&this.stackClient.setUri(t.uri),t.token&&this.stackClient.setToken(t.token)),n=q(this.links),e.prev=4,n.s();case 6:if((r=n.n()).done){e.next=13;break}if(!(o=r.value).onLogin){e.next=11;break}return e.next=11,o.onLogin();case 11:e.next=6;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(4),n.e(e.t0);case 18:return e.prev=18,n.f(),e.finish(18);case 21:this.isLogged=!0,this.isRevoked=!1,this.emit("login");case 24:case"end":return e.stop()}}),e,this,[[4,15,18,21]])}))),function(e){return re.apply(this,arguments)})},{key:"logout",value:(ne=(0,l.default)(s.default.mark((function e(){var t,n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isLogged){e.next=3;break}return F.default.warn("CozyClient isn't logged."),e.abrupt("return");case 3:if(this.emit("beforeLogout"),this.isLogged=!1,!(this.stackClient instanceof C.OAuthClient)){e.next=17;break}if(e.prev=6,!this.stackClient.unregister||this.stackClient.isRegistered&&!this.stackClient.isRegistered()){e.next=10;break}return e.next=10,this.stackClient.unregister();case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),F.default.warn("Impossible to unregister client on stack: ".concat(e.t0));case 15:e.next=25;break;case 17:return e.prev=17,e.next=20,this.stackClient.fetch("DELETE","/auth/login");case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(17),F.default.warn("Impossible to log out: ".concat(e.t1));case 25:t=q(this.links),e.prev=26,t.s();case 28:if((n=t.n()).done){e.next=41;break}if(!(r=n.value).reset){e.next=39;break}return e.prev=31,e.next=34,r.reset();case 34:e.next=39;break;case 36:e.prev=36,e.t2=e.catch(31),console.warn(e.t2);case 39:e.next=28;break;case 41:e.next=46;break;case 43:e.prev=43,e.t3=e.catch(26),t.e(e.t3);case 46:return e.prev=46,t.f(),e.finish(46);case 49:this.store&&this.dispatch((0,P.resetState)()),this.emit("logout");case 51:case"end":return e.stop()}}),e,this,[[6,12],[17,22],[26,43,46,49],[31,36]])}))),function(){return ne.apply(this,arguments)})},{key:"collection",value:function(e){return this.getStackClient().collection(e)}},{key:"fetch",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.getStackClient().fetch(e,t,n,r)}},{key:"all",value:function(e){return F.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'))"),(0,E.Q)(e)}},{key:"find",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return console.warn("client.find(doctype, selector) is deprecated, please use Q(doctype).where(selector) to build the same query."),new E.QueryDefinition({doctype:e,selector:t})}},{key:"get",value:function(e,t){return console.warn("client.get(".concat(e,", id) is deprecated, please use Q(").concat(e,").getById(id) to build the same query.")),new E.QueryDefinition({doctype:e,id:t})}},{key:"create",value:(te=(0,l.default)(s.default.mark((function e(t,n,r){var o,i,a,u=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>3&&void 0!==u[3]?u[3]:{},n._type,i=(0,c.default)(n,["_type"]),a=G({_type:t},i),e.next=5,this.schema.validate(a);case 5:if(!0===e.sent){e.next=8;break}throw new Error("Validation failed");case 8:return e.abrupt("return",this.mutate(this.getDocumentSavePlan(a,r),o));case 9:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return te.apply(this,arguments)})},{key:"validate",value:function(e){return this.schema.validate(e)}},{key:"save",value:(ee=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},r=t._type,o=(0,c.default)(t,["_type"]),r){e.next=4;break}throw new Error("The document must have a `_type` property");case 4:return i=G({_type:r},o),e.next=7,this.schema.validate(i);case 7:if(!0===e.sent){e.next=10;break}throw new Error("Validation failed");case 10:return e.abrupt("return",this.mutate(this.getDocumentSavePlan(i),n));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return ee.apply(this,arguments)})},{key:"saveAll",value:(X=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a,u=this,c=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:{},1===Array.from(new Set(t.map((function(e){return e._type})))).length){e.next=4;break}throw new Error("saveAll can only save documents with the same doctype");case 4:return e.next=6,Promise.all(t.map((function(e){return u.schema.validate(e)})));case 6:if(r=e.sent,!((o=r.filter((function(e){return!0!==e}))).length>0)){e.next=11;break}throw console.warn("There has been some validation errors while bulk saving",o),new Error("Validation failed for at least one doc");case 11:return i=t.map((function(e){return u.prepareDocumentForSave(e)})),a=E.Mutations.updateDocuments(i),e.abrupt("return",this.mutate(a,n));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return X.apply(this,arguments)})},{key:"ensureCozyMetadata",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{event:"creation"},r=1;if(void 0===this.appMetadata)return e;if(e._type){var o=this.schema.getDoctypeSchema(e._type);t=(0,w.default)(o,"doctypeVersion")}var i=this.appMetadata,a=i.slug,c=i.sourceAccount,s=i.version,l=(new Date).toISOString(),f=(0,w.default)(e,"cozyMetadata",{});return"creation"===n.event?f=G({metadataVersion:r,doctypeVersion:t,createdByApp:a,sourceAccount:c,createdAt:l,createdByAppVersion:s,updatedAt:l,updatedByApps:a?[{date:l,slug:a,version:s}]:[]},f):"update"===n.event&&(f=G(G({},f),{},{updatedAt:l,updatedByApps:[{date:l,slug:a,version:s}].concat((0,u.default)((0,w.default)(e,"cozyMetadata.updatedByApps",[]).filter((function(e){return e.slug!==a}))))})),G(G({},e),{},{cozyMetadata:f})}},{key:"prepareDocumentForSave",value:function(e){var t=!e._rev;return this.ensureCozyMetadata((0,O.dehydrate)(e),{event:t?"creation":"update"})}},{key:"getDocumentSavePlan",value:function(e,t){var n,r=this,o=!e._rev,i=this.prepareDocumentForSave(e),u=o?E.Mutations.createDocument(i):E.Mutations.updateDocument(i);if(!(t&&Object.values(t).filter((function(e){return Array.isArray(e)?e.length>0:e})).length>0))return u;for(var c=0,s=Object.keys(t);c<s.length;c++){var l=s[c],f=e._type,d=this.schema.getRelationship(f,l),p=d.type;if(!Q(p))throw n=d.name,new Error('The "'.concat(n,'" relationship does not support references. If you need to add references to a document, its relationship class must have the methods {add,remove}References'))}if(t&&!o)throw new Error("Unable to save external relationships on a not-new document");return[u,function(e){var n=r.hydrateDocument(e.data);return Object.entries(t).map((function(e){var t=(0,a.default)(e,2),r=t[0],o=t[1];return n[r].addReferences(o)}))}]}},{key:"triggerHook",value:function(e,n){if(t.hooks){var r,o=q((t.hooks[n._type]||{})[e]||[]);try{for(o.s();!(r=o.n()).done;){(0,r.value)(this,n)}}catch(e){o.e(e)}finally{o.f()}}}},{key:"destroy",value:(Z=(0,l.default)(s.default.mark((function e(t){var n,r,o=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.triggerHook("before:destroy",t);case 3:return e.next=5,this.mutate(E.Mutations.deleteDocument(t),n);case 5:return r=e.sent,e.next=8,this.triggerHook("after:destroy",t);case 8:return e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return Z.apply(this,arguments)})},{key:"upload",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.mutate(E.Mutations.uploadFile(e,t),n)}},{key:"ensureQueryExists",value:function(e,t,n){this.ensureStore(),"loaded"===(0,P.getQueryFromState)(this.store.getState(),e).fetchStatus&&(t.skip||t.bookmark)||this.dispatch((0,P.initQuery)(e,t,n))}},{key:"query",value:(K=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a,u,l=this,f=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.update,o=(0,c.default)(n,["update"]),this.ensureStore(),i=o.as||this.queryIdGenerator.generateId(t),a=this.getQueryFromState(i),!o.fetchPolicy){e.next=11;break}if(o.as){e.next=8;break}throw new Error("Cannot use `fetchPolicy` without naming the query, please use `as` to name the query");case 8:if(o.fetchPolicy(a)){e.next=11;break}return e.abrupt("return");case 11:if(!(a&&Object.keys(a).length>0)){e.next=14;break}if("loading"!==a.fetchStatus){e.next=14;break}return e.abrupt("return",this._promiseCache.get((function(){return(0,N.default)(t)})));case 14:return this.ensureQueryExists(i,t,o),e.prev=15,this.dispatch((0,P.loadQuery)(i)),e.next=19,this._promiseCache.exec((function(){return l.requestQuery(t)}),(function(){return(0,N.default)(t)}));case 19:return u=e.sent,this.dispatch((0,P.receiveQueryResult)(i,u,{update:r})),e.abrupt("return",u);case 24:if(e.prev=24,e.t0=e.catch(15),this.dispatch((0,P.receiveQueryError)(i,e.t0)),!o.onError){e.next=31;break}o.onError(e.t0),e.next=36;break;case 31:if(!this.options.onError){e.next=35;break}this.options.onError(e.t0),e.next=36;break;case 35:throw e.t0;case 36:case"end":return e.stop()}}),e,this,[[15,24]])}))),function(e){return K.apply(this,arguments)})},{key:"queryAll",value:(Y=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a,c,l=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:{},r=n.as||this.queryIdGenerator.generateId(t),o=G(G({},n),{},{as:r}),e.next=5,this.query(t,o);case 5:i=e.sent,a=i.data;case 7:if(!i||!i.next){e.next=21;break}if(!i.bookmark){e.next=14;break}return e.next=11,this.query(t.offsetBookmark(i.bookmark),o);case 11:i=e.sent,e.next=18;break;case 14:return c=(0,P.getRawQueryFromState)(this.store.getState(),r),e.next=17,this.query(t.offset(c.data.length),o);case 17:i=e.sent;case 18:a.push.apply(a,(0,u.default)(i.data)),e.next=7;break;case 21:return e.abrupt("return",a);case 22:case"end":return e.stop()}}),e,this)}))),function(e){return Y.apply(this,arguments)})},{key:"watchQuery",value:function(){return console.warn("client.watchQuery is deprecated, please use client.makeObservableQuery."),this.makeObservableQuery.apply(this,arguments)}},{key:"makeObservableQuery",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.ensureStore();var n=t.as||this.queryIdGenerator.generateId(e);return this.ensureQueryExists(n,e),new D.default(n,e,this,t)}},{key:"mutate",value:(V=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a,u,l=arguments;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:{},r=n.update,o=n.updateQueries,i=(0,c.default)(n,["update","updateQueries"]),this.ensureStore(),a=i.as||this.queryIdGenerator.generateId(t),this.dispatch((0,P.initMutation)(a,t)),e.prev=5,e.next=8,this.requestMutation(t);case 8:return u=e.sent,this.dispatch((0,P.receiveMutationResult)(a,u,{update:r,updateQueries:o},t)),e.abrupt("return",u);case 13:throw e.prev=13,e.t0=e.catch(5),this.dispatch((0,P.receiveMutationError)(a,e.t0,t)),e.t0;case 17:case"end":return e.stop()}}),e,this,[[5,13]])}))),function(e){return V.apply(this,arguments)})},{key:"requestQuery",value:(J=(0,l.default)(s.default.mark((function e(t){var n,r;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.chain.request(t);case 2:if(n=e.sent,t.includes){e.next=5;break}return e.abrupt("return",n);case 5:return e.next=7,this.fetchRelationships(n,this.getIncludesRelationships(t));case 7:return r=e.sent,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return J.apply(this,arguments)})},{key:"fetchRelationships",value:($=(0,l.default)(s.default.mark((function e(t,n){var r,o,i,u,c,l,f,d,p,h,m,w,x,C,k,S,_,O,B,P=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=!Array.isArray(t.data))||0!==t.data.length){e.next=3;break}return e.abrupt("return",t);case 3:return o=r?[t.data]:t.data,i=new Map,u=[],c=[],o.forEach((function(e){return(0,b.default)(n,(function(t,n){try{var r=t.type.query(e,P,t),o=e._id;i.set(r,[o,n]),r instanceof E.QueryDefinition?c.push(r):u.push(r)}catch(e){}}))})),l=(0,j.default)(c),e.next=11,Promise.all(l.map((function(e){return P.chain.request(e)})));case 11:f=e.sent,d=(0,v.default)((0,y.default)(u),"_id"),p=(0,y.default)(f.map((function(e){return e.included||e.data}))).concat(d).filter(Boolean),h={},m=q((0,g.default)(l,f));try{for(m.s();!(w=m.n()).done;)x=(0,a.default)(w.value,2),C=x[0],k=x[1],(S=i.get(C))&&(_=(0,a.default)(S,2),O=_[0],B=_[1],h[O]=h[O]||{},h[O][B]=(0,A.responseToRelationship)(k))}catch(e){m.e(e)}finally{m.f()}return e.abrupt("return",G(G({},(0,A.attachRelationships)(t,h)),{},{included:p}));case 18:case"end":return e.stop()}}),e)}))),function(e,t){return $.apply(this,arguments)})},{key:"requestMutation",value:(T=(0,l.default)(s.default.mark((function e(t){var n,r,o,a,u=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t)){e.next=8;break}return n=(0,i.default)(t),r=n[0],o=n.slice(1),e.next=4,this.requestMutation(r);case 4:return a=e.sent,e.next=7,Promise.all(o.map((function(e){var t="function"==typeof e?e(a):e;return u.requestMutation(t)})));case 7:return e.abrupt("return",a);case 8:return e.abrupt("return",this.chain.request(t));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return T.apply(this,arguments)})},{key:"getIncludesRelationships",value:function(e){var t=this,n=e.includes,r=e.doctype;return n?(0,m.default)(n.map((function(e){return[e,t.schema.getRelationship(r,e)]}))):{}}},{key:"hydrateDocuments",value:function(e,t){var n=this;if(!1===this.options.autoHydrate)return t;var r=this.schema.getDoctypeSchema(e);return r.relationships?t.map((function(e){return n.hydrateDocument(e,r)})):t}},{key:"hydrateDocument",value:function(e,t){if(!e)return e;var n=t||this.schema.getDoctypeSchema(e._type);return G(G({},e),this.hydrateRelationships(e,n.relationships))}},{key:"hydrateRelationships",value:function(e,t){var n=this.getRelationshipStoreAccessors();return(0,h.default)(t,(function(t,r){return(0,_.create)(e,t,n)}))}},{key:"makeNewDocument",value:function(e){var t={_type:e};return this.hydrateDocument(t)}},{key:"generateRandomId",value:function(){return this.queryIdGenerator.generateRandomId()}},{key:"getAssociation",value:function(e,t){return(0,_.create)(e,this.schema.getRelationship(e._type,t),this.getRelationshipStoreAccessors())}},{key:"getRelationshipStoreAccessors",value:function(){var e=this;return this.storeAccesors||(this.storeAccessors={get:this.getDocumentFromState.bind(this),save:function(t,n){return e.save.call(e,t,n)},dispatch:this.dispatch.bind(this),query:function(t,n){return e.query.call(e,t,n)},mutate:function(t,n){return e.mutate.call(e,t,n)}}),this.storeAccessors}},{key:"getCollectionFromState",value:function(e){try{return(0,P.getCollectionFromState)(this.store.getState(),e)}catch(t){return F.default.warn("Could not getCollectionFromState",e,t.message),null}}},{key:"getDocumentFromState",value:function(e,t){try{return(0,P.getDocumentFromState)(this.store.getState(),e,t)}catch(n){return F.default.warn("Could not getDocumentFromState",e,t,n.message),null}}},{key:"getQueryFromState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.hydrated||!1,r=t.singleDocData||!1;try{var o=(0,P.getQueryFromState)(this.store.getState(),e),i=o.definition&&o.definition.doctype,a=o.definition&&o.definition.id;if(!n&&!r)return o;var u=n&&i?this.hydrateDocuments(i,o.data):o.data;return G(G({},o),{},{data:a&&r?u[0]:u})}catch(t){return console.warn("Could not get query from state. queryId: ".concat(e,", error: ").concat(t.message)),null}}},{key:"register",value:function(e){return this.getStackClient().setUri(e),this.startOAuthFlow(B.authFunction)}},{key:"isReactNative",value:function(){return"undefined"!=typeof navigator&&"ReactNative"==navigator.product}},{key:"startOAuthFlow",value:(x=(0,l.default)(s.default.mark((function e(t){var n;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getStackClient(),e.next=3,n.register();case 3:if(!n.oauthOptions.shouldRequireFlagshipPermissions){e.next=6;break}return e.next=6,(0,U.certifyFlagship)(n.oauthOptions.certificationConfig,this);case 6:return e.abrupt("return",this.authorize(t));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"authorize",value:(o=(0,l.default)(s.default.mark((function e(t){var n,r,o,i,a,u;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=this.getStackClient(),r=n.generateStateCode(),o=n.getAuthCodeURL(r),e.next=6,t(o);case 6:return i=e.sent,a=n.getAccessCodeFromURL(i,r),e.next=10,n.fetchAccessToken(a);case 10:return u=e.sent,n.setToken(u),e.abrupt("return",{token:u,infos:n.oauthOptions,client:n.oauthOptions});case 15:throw e.prev=15,e.t0=e.catch(0),e.t0.message===k.REGISTRATION_ABORT&&this.getStackClient().unregister(),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return o.apply(this,arguments)})},{key:"renewAuthorization",value:function(){return this.authorize(B.authFunction)}},{key:"setStore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force,r=void 0!==n&&n;if(void 0===e)throw new Error("Store is undefined");if(this.store&&!r)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=e}},{key:"ensureStore",value:function(){this.store||this.setStore((0,P.createStore)())}},{key:"checkForRevocation",value:(r=(0,l.default)(s.default.mark((function e(){return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stackClient.checkForRevocation());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"handleRevocationChange",value:function(e){e?(this.isRevoked=!0,this.emit("revoked")):(this.isRevoked=!1,this.emit("unrevoked"))}},{key:"handleTokenRefresh",value:function(e){this.emit("tokenRefreshed"),this.options.onTokenRefresh&&(W("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(e))}},{key:"createClient",value:function(){this.options.client&&console.warn("CozyClient: Using options.client is deprecated, please use options.stackClient.");var e=void 0===this.options.warningForCustomHandlers||this.options.warningForCustomHandlers,t=this.options.client||this.options.stackClient,n={onRevocationChange:this.handleRevocationChange,onTokenRefresh:this.handleTokenRefresh};if(t){this.stackClient=t,t.options||(t.options={});for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];t.options[i]?e&&console.warn("You passed a stackClient with its own ".concat(i,". It is not supported, unexpected things might happen.")):t.options[i]=n[i]}}else{var a=G(G({},this.options),n);this.stackClient=this.options.oauth?new C.OAuthClient(a):new C.default(a)}this.client=new Proxy(this.stackClient,W("Using cozyClient.client is deprecated, please use cozyClient.stackClient."))}},{key:"getClient",value:function(){return console.warn("CozyClient: getClient() is deprecated, please use getStackClient()."),this.getStackClient()}},{key:"getStackClient",value:function(){return this.stackClient||this.createClient(),this.stackClient}},{key:"reducer",value:function(){return P.default}},{key:"dispatch",value:function(e){return this.store.dispatch(e)}},{key:"getInstanceOptions",value:function(){return this.instanceOptions}},{key:"loadInstanceOptionsFromDOM",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[role=application]",t=document.querySelector(e);if(!(t instanceof HTMLElement))throw new Error("The selector that is passed does not return an HTMLElement");var n=t.dataset,r=n.cozy,o=void 0===r?"{}":r,i=(0,c.default)(n,["cozy"]);this.instanceOptions=G(G({},JSON.parse(o)),i),this.capabilities=this.instanceOptions.capabilities||null}},{key:"setData",value:function(e){var t=this;this.ensureStore(),Object.entries(e).forEach((function(e){var n=(0,a.default)(e,2),r=(n[0],n[1]);t.dispatch((0,P.receiveQueryResult)(null,{data:r}))}))}},{key:"setOnError",value:function(e){if(this.options&&this.options.onError)throw new Error("On Error is already defined");this.options.onError=e}},{key:"toJSON",value:function(){return new R.CozyClient({uri:this.options.uri})}}],[{key:"fromOldClient",value:function(e,n){return new t(G({uri:e._url,token:e._token.token},n))}},{key:"fromOldOAuthClient",value:(n=(0,l.default)(s.default.mark((function e(n,r){var o,i;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n._oauth){e.next=8;break}return e.next=3,n.authorize();case 3:return o=e.sent,i={oauth:o.client,token:o.token,scope:o.token.scope},e.abrupt("return",new t(G(G({uri:n._url},i),r)));case 8:throw new Error("Cannot instantiate a new client: old client is not an OAuth client. CozyClient.fromOldClient might be more suitable.");case 9:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"fromEnv",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n||(void 0!==e?Object({USE_REACT:!0}):{}),i=o.COZY_URL,a=o.COZY_CREDENTIALS,u=o.NODE_ENV;if(!i||!a)throw new Error("Env used to instantiate CozyClient must have COZY_URL and COZY_CREDENTIALS");return"development"===u?r.oauth=JSON.parse(a):r.token=a.trim(),r.uri=i.trim(),new t(G({},r))}},{key:"fromDOM",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"[role=application]",r=document.querySelector(n);if(!(r instanceof HTMLElement))throw new Error("Cannot find an HTMLElement corresponding to ".concat(n));if(!r||!r.dataset)throw new Error("Found no data in ".concat(n," to instantiate cozyClient"));var o=r.dataset.cozy?JSON.parse(r.dataset.cozy):G({},r.dataset),i=o.domain,a=o.token;if(i&&a||(i=i||o.cozyDomain,a=a||o.cozyToken),!i||!a)throw new Error("Found no data in ".concat(r.dataset," to instantiate cozyClient"));return new t(G({uri:"".concat(window.location.protocol,"//").concat(i),token:a,capabilities:o.capabilities},e))}},{key:"registerHook",value:function(e,n,r){var o=t.hooks[e]=t.hooks[e]||{};o[n]=o[n]||[],o[n].push(r)}}]),t}();V.hooks=V.hooks||{},V.fetchPolicies=T.default,V.version="27.14.4",x.default.mixin(V);var Y=V;t.default=Y}).call(this,n(468))},function(e,t,n){var r=n(153);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes=t.slugify=t.sleep=t.attempt=t.uri=void 0;t.uri=function(e){for(var t=[e[0]],n=0;n<(arguments.length<=1?0:arguments.length-1);n++)t.push(encodeURIComponent(n+1<1||arguments.length<=n+1?void 0:arguments[n+1])+e[n+1]);return t.join("")};t.attempt=function(e){return e.then((function(){return!0})).catch((function(){return!1}))};t.sleep=function(e,t){return new Promise((function(n){setTimeout(n,e,t)}))};t.slugify=function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")};t.formatBytes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=1024,r=t<0?0:t,o=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+" "+o[i]}},function(e,t){function n(){this._events={}}n.prototype={on:function(e,t){this._events||(this._events={});var n=this._events;return(n[e]||(n[e]=[])).push(t),this},removeListener:function(e,t){var n,r=this._events[e]||[];for(n=r.length-1;n>=0&&r[n];n--)r[n]!==t&&r[n].cb!==t||r.splice(n,1)},removeAllListeners:function(e){e?this._events[e]&&(this._events[e]=[]):this._events={}},listeners:function(e){return this._events&&this._events[e]||[]},emit:function(e){this._events||(this._events={});var t,n=Array.prototype.slice.call(arguments,1),r=this._events[e]||[];for(t=r.length-1;t>=0&&r[t];t--)r[t].apply(this,n);return this},when:function(e,t){return this.once(e,t,!0)},once:function(e,t,n){if(!t)return this;function r(){n||this.removeListener(e,r),t.apply(this,arguments)&&n&&this.removeListener(e,r)}return r.cb=t,this.on(e,r),this}},n.mixin=function(e){var t,r=n.prototype;for(t in r)r.hasOwnProperty(t)&&(e.prototype[t]=r[t])},e.exports=n},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){var r=n(152),o=n(157);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){function r(){}n(45).mixin(r),r.prototype.write=function(e,t,n){this.emit("item",e,t,n)},r.prototype.end=function(){this.emit("end"),this.removeAllListeners()},r.prototype.pipe=function(e){var t=this;function n(){e.write.apply(e,Array.prototype.slice.call(arguments))}function r(){!e._isStdio&&e.end()}return t.emit("unpipe",e),e.emit("pipe",t),t.on("item",n),t.on("end",r),t.when("unpipe",(function(o){var i=o===e||void 0===o;return i&&(t.removeListener("item",n),t.removeListener("end",r),e.emit("unpipe")),i})),e},r.prototype.unpipe=function(e){return this.emit("unpipe",e),this},r.prototype.format=function(e){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"))},r.mixin=function(e){var t,n=r.prototype;for(t in n)n.hasOwnProperty(t)&&(e.prototype[t]=n[t])},e.exports=r},function(e,t,n){"use strict";var r=n(449),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=Object.defineProperty,c=u&&function(){var e={};try{for(var t in u(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),s=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(c?u(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},l=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var u=0;u<i.length;u+=1)s(e,i[u],t[i[u]],n[i[u]])};l.supportsDescriptors=!!c,e.exports=l},function(e,t,n){function r(){}n(45).mixin(r),r.prototype.write=function(e,t,n){this.emit("item",e,t,n)},r.prototype.end=function(){this.emit("end"),this.removeAllListeners()},r.prototype.pipe=function(e){var t=this;function n(){e.write.apply(e,Array.prototype.slice.call(arguments))}function r(){!e._isStdio&&e.end()}return t.emit("unpipe",e),e.emit("pipe",t),t.on("item",n),t.on("end",r),t.when("unpipe",(function(o){var i=o===e||void 0===o;return i&&(t.removeListener("item",n),t.removeListener("end",r),e.emit("unpipe")),i})),e},r.prototype.unpipe=function(e){return this.emit("unpipe",e),this},r.prototype.format=function(e){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"))},r.mixin=function(e){var t,n=r.prototype;for(t in n)n.hasOwnProperty(t)&&(e.prototype[t]=n[t])},e.exports=r},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,"@-webkit-keyframes cozy-ui-bar-spin--39OaW{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes cozy-ui-bar-spin--39OaW{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@-webkit-keyframes cozy-ui-bar-shake--34qwk{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 cozy-ui-bar-shake--34qwk{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)}}.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}.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}.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}.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}.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}.u-fs-normal{font-style:normal!important}.u-fs-italic{font-style:italic!important}.u-fw-normal{font-weight:400}.u-fw-bold{font-weight:700}.cozy-ui-bar-c-btn--3Vk8q,.cozy-ui-bar-c-btn--regular--2vXm9{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:700;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)}.cozy-ui-bar-c-btn--3Vk8q svg,.cozy-ui-bar-c-btn--regular--2vXm9 svg{fill:currentColor}.cozy-ui-bar-c-btn--3Vk8q svg+span,.cozy-ui-bar-c-btn--regular--2vXm9 svg+span{margin-left:.375rem}.cozy-ui-bar-c-btn--3Vk8q input,.cozy-ui-bar-c-btn--regular--2vXm9 input{cursor:pointer}.cozy-ui-bar-c-btn--3Vk8q>span,.cozy-ui-bar-c-btn--regular--2vXm9>span{display:flex;align-items:center;justify-content:center;width:100%}.cozy-ui-bar-c-btn--3Vk8q[disabled],.cozy-ui-bar-c-btn--regular--2vXm9[disabled],.cozy-ui-bar-c-btn--3Vk8q[aria-disabled=true],.cozy-ui-bar-c-btn--regular--2vXm9[aria-disabled=true]{opacity:.5;cursor:not-allowed}.cozy-ui-bar-c-btn--3Vk8q[disabled] input,.cozy-ui-bar-c-btn--regular--2vXm9[disabled] input,.cozy-ui-bar-c-btn--3Vk8q[aria-disabled=true] input,.cozy-ui-bar-c-btn--regular--2vXm9[aria-disabled=true] input{cursor:not-allowed}.cozy-ui-bar-c-btn--3Vk8q[aria-busy=true],.cozy-ui-bar-c-btn--regular--2vXm9[aria-busy=true]{opacity:.5;pointer-events:none}.cozy-ui-bar-c-btn--3Vk8q:visited,.cozy-ui-bar-c-btn--regular--2vXm9:visited{color:var(--regularButtonConstrastColor)}.cozy-ui-bar-c-btn--3Vk8q:active,.cozy-ui-bar-c-btn--regular--2vXm9:active,.cozy-ui-bar-c-btn--3Vk8q:hover,.cozy-ui-bar-c-btn--regular--2vXm9:hover,.cozy-ui-bar-c-btn--3Vk8q:focus,.cozy-ui-bar-c-btn--regular--2vXm9:focus{border-color:var(--regularButtonActiveColor);background-color:var(--regularButtonActiveColor)}.cozy-ui-bar-c-btn--3Vk8q[disabled]:hover,.cozy-ui-bar-c-btn--regular--2vXm9[disabled]:hover,.cozy-ui-bar-c-btn--3Vk8q[aria-disabled=true]:hover,.cozy-ui-bar-c-btn--regular--2vXm9[aria-disabled=true]:hover{border-color:var(--regularButtonSecondaryColor);background-color:var(--regularButtonPrimaryColor)}.cozy-ui-bar-c-btn--ghost--2erzD{background-color:var(--zircon);color:var(--primaryColor);border-color:#c2dcff;border-style:dashed}.cozy-ui-bar-c-btn--ghost--2erzD:visited{color:var(--primaryColor)}.cozy-ui-bar-c-btn--ghost--2erzD:active,.cozy-ui-bar-c-btn--ghost--2erzD:hover,.cozy-ui-bar-c-btn--ghost--2erzD:focus{border-color:#c2dcff;background-color:#c2dcff}.cozy-ui-bar-c-btn--ghost--2erzD[disabled]:hover,.cozy-ui-bar-c-btn--ghost--2erzD[aria-disabled=true]:hover{border-color:#c2dcff;background-color:var(--zircon)}.cozy-ui-bar-c-btn--highlight--139k0{background-color:#35ce68;color:var(--white);border-color:#35ce68}.cozy-ui-bar-c-btn--highlight--139k0:visited{color:var(--white)}.cozy-ui-bar-c-btn--highlight--139k0:active,.cozy-ui-bar-c-btn--highlight--139k0:hover,.cozy-ui-bar-c-btn--highlight--139k0:focus{border-color:#08b442;background-color:#08b442}.cozy-ui-bar-c-btn--highlight--139k0[disabled]:hover,.cozy-ui-bar-c-btn--highlight--139k0[aria-disabled=true]:hover{border-color:#35ce68;background-color:#35ce68}.cozy-ui-bar-c-btn--alpha--3xuwd,.cozy-ui-bar-c-btn--action--1mNtp,.cozy-ui-bar-c-btn--close--m97vB{background-color:transparent;color:var(--white);border-color:var(--white)}.cozy-ui-bar-c-btn--alpha--3xuwd:visited,.cozy-ui-bar-c-btn--action--1mNtp:visited,.cozy-ui-bar-c-btn--close--m97vB:visited{color:var(--white)}.cozy-ui-bar-c-btn--alpha--3xuwd:active,.cozy-ui-bar-c-btn--action--1mNtp:active,.cozy-ui-bar-c-btn--close--m97vB:active,.cozy-ui-bar-c-btn--alpha--3xuwd:hover,.cozy-ui-bar-c-btn--action--1mNtp:hover,.cozy-ui-bar-c-btn--close--m97vB:hover,.cozy-ui-bar-c-btn--alpha--3xuwd:focus,.cozy-ui-bar-c-btn--action--1mNtp:focus,.cozy-ui-bar-c-btn--close--m97vB:focus{border-color:var(--scienceBlue);background-color:var(--scienceBlue)}.cozy-ui-bar-c-btn--alpha--3xuwd[disabled]:hover,.cozy-ui-bar-c-btn--action--1mNtp[disabled]:hover,.cozy-ui-bar-c-btn--close--m97vB[disabled]:hover,.cozy-ui-bar-c-btn--alpha--3xuwd[aria-disabled=true]:hover,.cozy-ui-bar-c-btn--action--1mNtp[aria-disabled=true]:hover,.cozy-ui-bar-c-btn--close--m97vB[aria-disabled=true]:hover{border-color:var(--white);background-color:transparent}.cozy-ui-bar-c-btn--danger--3pdnK{background-color:#f52d2d;color:var(--white);border-color:#f52d2d}.cozy-ui-bar-c-btn--danger--3pdnK:visited{color:var(--white)}.cozy-ui-bar-c-btn--danger--3pdnK:active,.cozy-ui-bar-c-btn--danger--3pdnK:hover,.cozy-ui-bar-c-btn--danger--3pdnK:focus{border-color:var(--monza);background-color:var(--monza)}.cozy-ui-bar-c-btn--danger--3pdnK[disabled]:hover,.cozy-ui-bar-c-btn--danger--3pdnK[aria-disabled=true]:hover{border-color:#f52d2d;background-color:#f52d2d}.cozy-ui-bar-c-btn--secondary--2JUsA{background-color:var(--secondaryButtonPrimaryColor);color:var(--secondaryButtonContrastColor);border-color:var(--secondaryButtonSecondaryColor)}.cozy-ui-bar-c-btn--secondary--2JUsA:visited{color:var(--secondaryButtonContrastColor)}.cozy-ui-bar-c-btn--secondary--2JUsA:active,.cozy-ui-bar-c-btn--secondary--2JUsA:hover,.cozy-ui-bar-c-btn--secondary--2JUsA:focus{border-color:var(--secondaryButtonActiveColor);background-color:var(--secondaryButtonActiveColor)}.cozy-ui-bar-c-btn--secondary--2JUsA[disabled]:hover,.cozy-ui-bar-c-btn--secondary--2JUsA[aria-disabled=true]:hover{border-color:var(--secondaryButtonSecondaryColor);background-color:var(--secondaryButtonPrimaryColor)}.cozy-ui-bar-c-btn--danger-outline--2Bltk{background-color:var(--white);color:#f52d2d;border-color:#fdcbcb}.cozy-ui-bar-c-btn--danger-outline--2Bltk:visited{color:#f52d2d}.cozy-ui-bar-c-btn--danger-outline--2Bltk:active,.cozy-ui-bar-c-btn--danger-outline--2Bltk:hover,.cozy-ui-bar-c-btn--danger-outline--2Bltk:focus{border-color:#fdcbcb;background-color:#fdcbcb}.cozy-ui-bar-c-btn--danger-outline--2Bltk[disabled]:hover,.cozy-ui-bar-c-btn--danger-outline--2Bltk[aria-disabled=true]:hover{border-color:#fdcbcb;background-color:var(--white)}.cozy-ui-bar-c-btn--text--1M_ap{background-color:transparent;color:var(--primaryColor);border-color:transparent}.cozy-ui-bar-c-btn--text--1M_ap:visited{color:var(--primaryColor)}.cozy-ui-bar-c-btn--text--1M_ap:active,.cozy-ui-bar-c-btn--text--1M_ap:hover,.cozy-ui-bar-c-btn--text--1M_ap:focus{border-color:transparent;background-color:transparent}.cozy-ui-bar-c-btn--text--1M_ap[disabled]:hover,.cozy-ui-bar-c-btn--text--1M_ap[aria-disabled=true]:hover{border-color:transparent;background-color:transparent}.cozy-ui-bar-c-btn--text--1M_ap:hover,.cozy-ui-bar-c-btn--text--1M_ap:focus{color:var(--primaryColorDark)}.cozy-ui-bar-c-btn--action--1mNtp{border-color:transparent;padding:.5rem;opacity:.5}.cozy-ui-bar-c-btn--action--1mNtp:active,.cozy-ui-bar-c-btn--action--1mNtp:hover,.cozy-ui-bar-c-btn--action--1mNtp:focus{background-color:transparent;border-color:transparent}.cozy-ui-bar-c-btn--close--m97vB{border-color:transparent;padding:.5rem}.cozy-ui-bar-c-btn--close--m97vB:active,.cozy-ui-bar-c-btn--close--m97vB:hover,.cozy-ui-bar-c-btn--close--m97vB:focus{background-color:transparent;border-color:transparent}.cozy-ui-bar-c-btn--left--3xEmE>span{justify-content:flex-start}.cozy-ui-bar-c-btn--center--T8nT8>span{justify-content:center}.cozy-ui-bar-c-btn--right--3pX-0>span{justify-content:flex-end}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--tiny--15Am0{min-height:1.5rem;min-width:5rem;padding:.125rem 1rem;font-size:.75rem;line-height:1.3}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--small--gNd1_{min-height:2rem;min-width:6rem;padding:.188rem .5rem;font-size:.813rem;line-height:1.4}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--large--VoQ1T{min-height:3rem;min-width:10rem;padding:.5rem 1.5rem;font-size:1rem;line-height:1.5}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--full--257V_{width:100%;margin-left:0;margin-right:0}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--narrow--37r_T,.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--round--TSd9o{min-width:auto}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--round--TSd9o{border-radius:100%;min-height:auto;padding:.25rem}.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--round--TSd9o svg{width:.625rem;height:.625rem}.cozy-ui-bar-c-btn--subtle--225Zu{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:700;text-transform:uppercase}.cozy-ui-bar-c-btn--subtle--225Zu:active,.cozy-ui-bar-c-btn--subtle--225Zu:focus,.cozy-ui-bar-c-btn--subtle--225Zu:hover{color:var(--regularButtonActiveColor)}.cozy-ui-bar-c-btn--subtle--225Zu>span{display:flex;align-items:center;justify-content:center;width:100%}.cozy-ui-bar-c-btn--subtle--225Zu[disabled],.cozy-ui-bar-c-btn--subtle--225Zu[aria-disabled=true]{opacity:.5;cursor:not-allowed}.cozy-ui-bar-c-btn--subtle--225Zu[disabled]:hover,.cozy-ui-bar-c-btn--subtle--225Zu[aria-disabled=true]:hover{background:transparent}.cozy-ui-bar-c-btn--subtle--225Zu[aria-busy=true]{opacity:.5;cursor:not-allowed;pointer-events:none}.cozy-ui-bar-c-btn--subtle--225Zu[aria-busy=true]:hover{background:transparent}.cozy-ui-bar-c-btn--subtle--225Zu:active,.cozy-ui-bar-c-btn--subtle--225Zu:hover,.cozy-ui-bar-c-btn--subtle--225Zu:focus,.cozy-ui-bar-c-btn--subtle--225Zu:visited{color:var(--primaryColorDark);background:transparent}*+.cozy-ui-bar-c-btn--subtle--225Zu{margin-left:.063rem}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--tiny--15Am0{min-height:0;min-width:0;padding:0;font-size:.563rem}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--small--gNd1_{min-height:0;min-width:0;padding:0;font-size:.75rem}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--large--VoQ1T{min-height:0;min-width:0;padding:0;font-size:1rem}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--danger--3pdnK{color:#f52d2d}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--danger--3pdnK:active,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--danger--3pdnK:focus,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--danger--3pdnK:hover{color:var(--monza)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--highlight--139k0{color:#35ce68}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--highlight--139k0:active,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--highlight--139k0:focus,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--highlight--139k0:hover{color:#08b442}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--regular--2vXm9{color:var(--regularButtonSecondaryColor)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--regular--2vXm9:active,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--regular--2vXm9:focus,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--regular--2vXm9:hover{color:var(--regularButtonActiveColor)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA{color:var(--slateGrey)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:active,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:focus,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:hover{color:var(--charcoalGrey)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:active svg,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:focus svg,.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA:hover svg{color:var(--slateGrey)}.cozy-ui-bar-c-btn--subtle--225Zu.cozy-ui-bar-c-btn--secondary--2JUsA svg{color:var(--coolGrey)}@media(max-width:63.938rem){.u-hide--mob{display:none!important}.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-spacellipsis-m{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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-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-m{font-style:normal!important}.u-fs-italic-m{font-style:italic!important}.u-fw-normal-m{font-weight:400}.u-fw-bold-m{font-weight:700}}@media(min-width:64rem){.u-hide--tablet{display:none!important}}@media(min-width:48.063rem){.u-hide--desk{display:none!important}}@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}.u-spacellipsis-t{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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}.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}.u-fs-normal-t{font-style:normal!important}.u-fs-italic-t{font-style:italic!important}.u-fw-normal-t{font-weight:400}.u-fw-bold-t{font-weight:700}}@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}.u-spacellipsis-s{overflow:hidden;text-overflow:ellipsis;white-space:break-spaces}.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}.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}.u-fs-normal-s{font-style:normal!important}.u-fs-italic-s{font-style:italic!important}.u-fw-normal-s{font-weight:400}.u-fw-bold-s{font-weight:700}}@media(pointer:coarse){.cozy-ui-bar-c-btn--3Vk8q.cozy-ui-bar-c-btn--round--TSd9o:after{content:'';position:absolute;top:-.875rem;right:-.875rem;bottom:-.875rem;left:-.875rem}}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/generic/animations.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/utilities/display.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/tools/mixins.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/utilities/text.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/components/button.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Button/node_modules/cozy-ui/stylus/settings/breakpoints.styl"],names:[],mappings:"AAYA,2CACI,KACI,sBCHN,CDIE,GACI,wBCFN,CACF,CDHA,mCACI,KACI,sBCaN,CDZE,GACI,wBCcN,CACF,CDbA,4CACI,QACI,+BC6BN,CD3BE,QACI,8BC6BN,CD3BE,YACI,+BC6BN,CD3BE,QACI,8BC6BN,CACF,CDzCA,oCACI,QACI,+BCyDN,CDvDE,QACI,8BCyDN,CDvDE,YACI,+BCyDN,CDvDE,QACI,8BCyDN,CACF,CC7DA,kBAXI,4BACA,mBACA,wBACA,yBACA,0BACA,oBACA,6BACA,qDACA,uCAAA,8BD2EJ,CChEA,QCoCI,uBACA,2BF+BJ,CE4BgB,MDzEZ,YD+DJ,CEUgB,MDtEZ,cD+DJ,CEOgB,MDnEZ,aD+DJ,CEIgB,ODhEZ,oBD+DJ,CECgB,OD7DZ,oBD+DJ,CEFgB,MD1DZ,aD+DJ,CELgB,ODvDZ,kBD+DJ,CERgB,UDpDZ,iBD+DJ,CEXgB,gBDjDZ,uBD+DJ,CEdgB,aD9CZ,oBD+DJ,CEjBgB,mBD3CZ,0BD+DJ,CG5II,SACI,4BHuPR,CGxPI,gBACI,mCH0PR,CG3PI,YACI,+BH6PR,CG9PI,UACI,6BHgQR,CGjQI,aACI,gCHmQR,CGpQI,kBACI,uBHsQR,CGvQI,cACI,uBHyQR,CG1QI,WACI,8BH4QR,CG7QI,YACI,+BH+QR,CGhRI,SACI,uBHkRR,CGnRI,eACI,uBHqRR,CGtRI,0BACI,6CHwRR,CGzRI,gBACI,mCH2RR,CG5RI,qBACI,wCH8RR,CG/RI,4BACI,+CHiSR,CGlSI,SACI,iCHoSR,CGrSI,mBACI,sCHuSR,CGxSI,WACI,mCH0SR,CG3SI,WACI,mCH6SR,CG9SI,QACI,gCHgTR,CGjTI,cACI,uBHmTR,CGpTI,SACI,4BHsTR,CGjTA,aACI,qBHmTJ,CGjTA,YACI,mBACA,gBACA,sBHmTJ,CEvMgB,gBCzGZ,gBACA,uBACA,wBHmTJ,CGxSA,eACI,aACA,gBH+TJ,CG7TI,iBACI,qBACA,cACA,gBACA,eH+TR,CG7TI,4BACI,sBH+TR,CG7TI,2BACI,mBACA,aH+TR,CG7ToC,iCAC5B,4BACI,qBH+TV,CACF,CG7TI,aACI,iCACA,4DAAA,mDH+TR,CG7TI,2DAII,sCH+TR,CE3QY,WChDR,uBH8TJ,CE9QY,aC7CR,yBH8TJ,CEjRY,YC1CR,yBH8TJ,CEpRY,aCvCR,yBH8TJ,CEvRY,YCpCR,yBH8TJ,CE1RY,aCjCR,yBH8TJ,CEnRgB,WC5BZ,2BArBA,yBHwUJ,CEvRgB,aCxBZ,4BAtBA,yBHyUJ,CE3RgB,YCpBZ,4BA1BA,yBH6UJ,CE/RgB,aChBZ,yBA3BA,yBH8UJ,CEnSgB,YCZZ,6BA/BA,yBHkVJ,CEvSgB,WCKZ,yBHuWJ,CE5WgB,YCQZ,0BHuWJ,CE/WgB,aCWZ,2BHuWJ,CElXgB,cCcZ,4BHuWJ,CErXgB,aC6BZ,2BHqYJ,CElagB,aCgCZ,2BHqYJ,CEragB,aC4CZ,eHoZJ,CEhcgB,WC+CZ,eHoZJ,CIjgBA,6DACI,kBACA,sBACA,oBACA,gBACA,qBACA,mBACA,wCACA,kBACA,eACA,qBACA,mBACA,kBACA,kBACA,gBACA,cACA,0CACA,qBACA,eACA,mBA1CA,kDACA,yCACA,+CJukBJ,CI7hBI,qEACI,iBJgiBR,CI9hBQ,+EACI,mBJiiBZ,CI/hBI,yEACI,cJkiBR,CIhiBI,uEACI,aACA,mBACA,uBACA,UJmiBR,CIjiBI,sLAEI,WACA,kBJqiBR,CIniBQ,8MACI,kBJwiBZ,CItiBI,6FACI,WACA,mBJyiBR,CI1mBI,6EACI,wCJ6mBR,CI3mBI,6NAGI,6CACA,gDJgnBR,CI5mBQ,8MACI,gDACA,iDJinBZ,CInjBA,iCA/EI,+BACA,0BACA,qBA+EA,mBJujBJ,CIpoBI,yCACI,yBJsoBR,CIpoBI,sHAGI,qBACA,wBJsoBR,CIloBQ,4GACI,qBACA,8BJqoBZ,CInkBA,qCAnFI,yBACA,mBACA,oBJypBJ,CIvpBI,6CACI,kBJypBR,CIvpBI,kIAGI,qBACA,wBJypBR,CIrpBQ,oHACI,qBACA,wBJwpBZ,CInlBA,oGAtFI,6BACA,mBACA,yBJ8qBJ,CI5qBI,4HACI,kBJgrBR,CI9qBI,qWAGI,gCACA,mCJsrBR,CIlrBQ,sUACI,0BACA,4BJyrBZ,CIjnBA,kCAzFI,yBACA,mBACA,oBJ6sBJ,CI3sBI,0CACI,kBJ6sBR,CI3sBI,yHAGI,0BACA,6BJ6sBR,CIzsBQ,8GACI,qBACA,wBJ4sBZ,CIjoBA,qCA5FI,oDACA,0CACA,iDJguBJ,CI9tBI,6CACI,yCJguBR,CI9tBI,kIAGI,+CACA,kDJguBR,CI5tBQ,oHACI,kDACA,mDJ+tBZ,CI9oBA,0CAlGI,8BACA,cACA,oBJmvBJ,CIjvBI,kDACI,aJmvBR,CIjvBI,iJAGI,qBACA,wBJmvBR,CI/uBQ,8HACI,qBACA,6BJkvBZ,CI9pBA,gCArGI,6BACA,0BACA,wBJswBJ,CIpwBI,wCACI,yBJswBR,CIpwBI,mHAGI,yBACA,4BJswBR,CIlwBQ,0GACI,yBACA,4BJqwBZ,CI3qBI,4EAEI,6BJ6qBR,CI3qBA,kCAEI,yBACA,cACA,UJ4qBJ,CI1qBI,yHAGI,6BACA,wBJ4qBR,CI1qBA,iCAEI,yBACA,aJ2qBJ,CIzqBI,sHAGI,6BACA,wBJ2qBR,CI9iBI,qCACI,0BJgjBR,CI3iBI,uCACI,sBJ6iBR,CIxiBI,sCACI,wBJ0iBR,CI7hBA,yDALI,kBACA,eACA,qBACA,iBACA,eJqiBJ,CI3hBA,0DALI,gBACA,eACA,sBACA,kBACA,eJmiBJ,CIzhBA,0DALI,gBACA,gBACA,qBACA,eACA,eJiiBJ,CI1hBA,yDACI,WACA,cACA,cJ4hBJ,CI1hBA,qHACI,cJ6hBJ,CIxhBA,0DAEI,mBACA,gBACA,cJyhBJ,CIvhBI,8DACI,cACA,cJyhBR,CIpZA,kCAjBI,yCAmBA,gBACA,eACA,SACA,cACA,UACA,wBACA,uBACA,eACA,kBACA,gBACA,wBJgaJ,CI3bI,yHAGI,qCJ6bR,CInaI,uCACI,aACA,mBACA,uBACA,UJqaR,CInaI,kGAEI,WACA,kBJqaR,CInaQ,8GACI,sBJsaZ,CIpaI,kDACI,WACA,mBACA,mBJsaR,CIpaQ,wDACI,sBJsaZ,CIpaI,mKAII,8BACA,sBJsaR,CIpaI,oCACI,mBJsaR,CIpaA,iEAnDI,aACA,YACA,UACA,iBJ0dJ,CIvaA,kEAtDI,aACA,YACA,UACA,gBJgeJ,CI1aA,kEAzDI,aACA,YACA,UACA,cJseJ,CI7aA,mEAxEI,aJwfJ,CItfI,4NAGI,kBJwfR,CIlbA,sEA3EI,aJggBJ,CI9fI,qOAGI,aJggBR,CIvbA,oEA9EI,wCJwgBJ,CItgBI,+NAGI,qCJwgBR,CI5bA,sEAGI,sBJ4bJ,CI1bI,qOAGI,yBJ4bR,CI3bQ,iPACK,sBJ+bb,CI9bI,0EACI,qBJgcR,CKn5BqE,4BAAA,aJ1E7D,sBDmEN,CE6BkB,QD9EhB,YDuKF,CEzFkB,QD3EhB,cDuKF,CE5FkB,QDxEhB,aDuKF,CE/FkB,SDrEhB,oBDuKF,CElGkB,SDlEhB,oBDuKF,CErGkB,QD/DhB,aDuKF,CExGkB,SD5DhB,kBDuKF,CE3GkB,YDzDhB,iBDuKF,CE9GkB,kBDtDhB,uBDuKF,CEjHkB,eDnDhB,oBDuKF,CEpHkB,qBDhDhB,0BDuKF,CEvHkB,kBC9GhB,gBACA,uBACA,wBHuUF,CE3NkB,aCjChB,2BArBA,yBHyYF,CEnVkB,eC7BhB,4BAtBA,yBH0YF,CEvVkB,cCzBhB,4BA1BA,yBH8YF,CE3VkB,eCrBhB,yBA3BA,yBH+YF,CE/VkB,cCjBhB,6BA/BA,yBHmZF,CEnWkB,aCAhB,yBHgZF,CEhZkB,cCGhB,0BHgZF,CEnZkB,eCMhB,2BHgZF,CEtZkB,gBCShB,4BHgZF,CEzZkB,eCwBhB,2BH4ZF,CEpbkB,eC2BhB,2BH4ZF,CEvbkB,eCuChB,eH2aF,CEldkB,aC0ChB,eH2aF,CAjfF,CKmIyD,wBAAA,gBJnMjD,sBDoEN,CACF,CKiHwD,4BAAA,cJlLhD,sBDqEN,CACF,CEgBqD,wBAEjC,QD9EhB,YDiGF,CEnBkB,QD3EhB,cDiGF,CEtBkB,QDxEhB,aDiGF,CEzBkB,SDrEhB,oBDiGF,CE5BkB,SDlEhB,oBDiGF,CE/BkB,QD/DhB,aDiGF,CElCkB,SD5DhB,kBDiGF,CErCkB,YDzDhB,iBDiGF,CExCkB,kBDtDhB,uBDiGF,CE3CkB,eDnDhB,oBDiGF,CE9CkB,qBDhDhB,0BDiGF,CEjDkB,kBC9GhB,gBACA,uBACA,wBHyTF,CE7MkB,aCjChB,2BArBA,yBH6VF,CEvSkB,eC7BhB,4BAtBA,yBH8VF,CE3SkB,cCzBhB,4BA1BA,yBHkWF,CE/SkB,eCrBhB,yBA3BA,yBHmWF,CEnTkB,cCjBhB,6BA/BA,yBHuWF,CEvTkB,aCAhB,yBHoXF,CEpXkB,cCGhB,0BHoXF,CEvXkB,eCMhB,2BHoXF,CE1XkB,gBCShB,4BHoXF,CE7XkB,eCwBhB,2BH4YF,CEpakB,eC2BhB,2BH4YF,CEvakB,eCuChB,eH2ZF,CElckB,aC0ChB,eH2ZF,CAnZF,CEpDqD,wBAEjC,QD9EhB,YDoIF,CEtDkB,QD3EhB,cDoIF,CEzDkB,QDxEhB,aDoIF,CE5DkB,SDrEhB,oBDoIF,CE/DkB,SDlEhB,oBDoIF,CElEkB,QD/DhB,aDoIF,CErEkB,SD5DhB,kBDoIF,CExEkB,YDzDhB,iBDoIF,CE3EkB,kBDtDhB,uBDoIF,CE9EkB,eDnDhB,oBDoIF,CEjFkB,qBDhDhB,0BDoIF,CEpFkB,kBC9GhB,gBACA,uBACA,wBHgUF,CEpNkB,aCjChB,2BArBA,yBHmXF,CE7TkB,eC7BhB,4BAtBA,yBHoXF,CEjUkB,cCzBhB,4BA1BA,yBHwXF,CErUkB,eCrBhB,yBA3BA,yBHyXF,CEzUkB,cCjBhB,6BA/BA,yBH6XF,CE7UkB,aCAhB,yBHkYF,CElYkB,cCGhB,0BHkYF,CErYkB,eCMhB,2BHkYF,CExYkB,gBCShB,4BHkYF,CE3YkB,eCwBhB,2BHoZF,CE5akB,eC2BhB,2BHoZF,CE/akB,eCuChB,eHmaF,CE1ckB,aC0ChB,eHmaF,CAxXF,CI0J2B,uBACnB,gEACI,WACA,kBACA,aACA,eACA,gBACA,aJwhBV,CACF,CAAA",file:"styles.styl",sourcesContent:["/*------------------------------------*\\\n Animations\n\\*------------------------------------*/\n/*\n Animations\n\n Available animations:\n\n spin - Animates an element by rotating it endlessly by 360 deg (used by the loading spinner)\n\n Styleguide Generic.animation\n*/\n@keyframes spin\n from\n transform rotate(0deg)\n to\n transform rotate(359deg)\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$transition-transform-ease-out\n transition transform .1s ease-out\n\n$spin-anim\n // arguments' order is important: the animation name must stay first\n // so that scoping works\n animation spin 1s linear infinite\n\n@media (prefers-reduced-motion: reduce)\n $transition-transform-ease-out\n transition none\n $spin-anim\n animation none","@-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:global(.u-visuallyhidden) {\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:global(.u-hide) {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n :global(.u-hide--mob) {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n :global(.u-hide--tablet) {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n :global(.u-hide--desk) {\n display: none !important;\n }\n}\n:global(.u-dn) {\n display: none;\n}\n:global(.u-di) {\n display: inline;\n}\n:global(.u-db) {\n display: block;\n}\n:global(.u-dib) {\n display: inline-block;\n}\n:global(.u-dit) {\n display: inline-table;\n}\n:global(.u-dt) {\n display: table;\n}\n:global(.u-dtc) {\n display: table-cell;\n}\n:global(.u-dt-row) {\n display: table-row;\n}\n:global(.u-dt-row-group) {\n display: table-row-group;\n}\n:global(.u-dt-column) {\n display: table-column;\n}\n:global(.u-dt-column-group) {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n :global(.u-dn-t) {\n display: none;\n }\n :global(.u-di-t) {\n display: inline;\n }\n :global(.u-db-t) {\n display: block;\n }\n :global(.u-dib-t) {\n display: inline-block;\n }\n :global(.u-dit-t) {\n display: inline-table;\n }\n :global(.u-dt-t) {\n display: table;\n }\n :global(.u-dtc-t) {\n display: table-cell;\n }\n :global(.u-dt-row-t) {\n display: table-row;\n }\n :global(.u-dt-row-group-t) {\n display: table-row-group;\n }\n :global(.u-dt-column-t) {\n display: table-column;\n }\n :global(.u-dt-column-group-t) {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-dn-s) {\n display: none;\n }\n :global(.u-di-s) {\n display: inline;\n }\n :global(.u-db-s) {\n display: block;\n }\n :global(.u-dib-s) {\n display: inline-block;\n }\n :global(.u-dit-s) {\n display: inline-table;\n }\n :global(.u-dt-s) {\n display: table;\n }\n :global(.u-dtc-s) {\n display: table-cell;\n }\n :global(.u-dt-row-s) {\n display: table-row;\n }\n :global(.u-dt-row-group-s) {\n display: table-row-group;\n }\n :global(.u-dt-column-s) {\n display: table-column;\n }\n :global(.u-dt-column-group-s) {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-dn-m) {\n display: none;\n }\n :global(.u-di-m) {\n display: inline;\n }\n :global(.u-db-m) {\n display: block;\n }\n :global(.u-dib-m) {\n display: inline-block;\n }\n :global(.u-dit-m) {\n display: inline-table;\n }\n :global(.u-dt-m) {\n display: table;\n }\n :global(.u-dtc-m) {\n display: table-cell;\n }\n :global(.u-dt-row-m) {\n display: table-row;\n }\n :global(.u-dt-row-group-m) {\n display: table-row-group;\n }\n :global(.u-dt-column-m) {\n display: table-column;\n }\n :global(.u-dt-column-group-m) {\n display: table-column-group;\n }\n}\n:global(.u-black) {\n color: var(--black) !important;\n}\n:global(.u-charcoalGrey) {\n color: var(--charcoalGrey) !important;\n}\n:global(.u-coolGrey) {\n color: var(--coolGrey) !important;\n}\n:global(.u-silver) {\n color: var(--silver) !important;\n}\n:global(.u-slateGrey) {\n color: var(--slateGrey) !important;\n}\n:global(.u-lightishPurple) {\n color: #b449e7 !important;\n}\n:global(.u-dodgerBlue) {\n color: #297ef2 !important;\n}\n:global(.u-overlay) {\n color: var(--overlay) !important;\n}\n:global(.u-paleGrey) {\n color: var(--paleGrey) !important;\n}\n:global(.u-monza) {\n color: #dd0505 !important;\n}\n:global(.u-pomegranate) {\n color: #f52d2d !important;\n}\n:global(.u-primaryBackgroundLight) {\n color: var(--primaryBackgroundLight) !important;\n}\n:global(.u-primaryColor) {\n color: var(--primaryColor) !important;\n}\n:global(.u-primaryColorLight) {\n color: var(--primaryColorLight) !important;\n}\n:global(.u-primaryContrastTextColor) {\n color: var(--primaryContrastTextColor) !important;\n}\n:global(.u-error) {\n color: var(--errorColor) !important;\n}\n:global(.u-errorBackground) {\n color: var(--errorBackground) !important;\n}\n:global(.u-success) {\n color: var(--successColor) !important;\n}\n:global(.u-warning) {\n color: var(--warningColor) !important;\n}\n:global(.u-info) {\n color: var(--infoColor) !important;\n}\n:global(.u-weirdGreen) {\n color: #40de8e !important;\n}\n:global(.u-white) {\n color: var(--white) !important;\n}\n:global(.u-breakword) {\n word-break: break-word;\n}\n:global(.u-ellipsis) {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n:global(.u-spacellipsis) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n}\n@media (max-width: 30rem) {\n :global(.u-spacellipsis-t) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-spacellipsis-s) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-spacellipsis-m) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n:global(.u-midellipsis) {\n display: flex;\n flex-wrap: nowrap;\n}\n:global(.u-midellipsis) > * {\n display: inline-block;\n max-width: 50%;\n overflow: hidden;\n white-space: pre;\n}\n:global(.u-midellipsis) > :first-child {\n text-overflow: ellipsis;\n}\n:global(.u-midellipsis) > :last-child {\n text-overflow: clip;\n direction: rtl;\n}\n@supports (text-overflow: '[...]') {\n :global(.u-midellipsis) > :first-child {\n text-overflow: '[...]';\n }\n}\n:global(.u-link):link {\n color: var(--linkColor) !important;\n text-decoration: var(--linkTextDecoration) !important;\n}\n:global(.u-link):visited,\n:global(.u-link):active,\n:global(.u-link):hover,\n:global(.u-link):focus {\n color: var(--linkColorActive) !important;\n}\n:global(.u-lh-tiny) {\n line-height: 1 !important;\n}\n:global(.u-lh-xsmall) {\n line-height: 1.1 !important;\n}\n:global(.u-lh-small) {\n line-height: 1.2 !important;\n}\n:global(.u-lh-medium) {\n line-height: 1.3 !important;\n}\n:global(.u-lh-large) {\n line-height: 1.4 !important;\n}\n:global(.u-lh-xlarge) {\n line-height: 1.5 !important;\n}\n:global(.u-fz-tiny) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n}\n:global(.u-fz-xsmall) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n}\n:global(.u-fz-small) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n}\n:global(.u-fz-medium) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n}\n:global(.u-fz-large) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n}\n@media (max-width: 30rem) {\n :global(.u-fz-tiny-t) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-t) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-t) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-t) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.u-fz-large-t) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fz-tiny-s) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-s) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-s) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-s) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.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 :global(.u-fz-tiny-m) {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n :global(.u-fz-xsmall-m) {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-small-m) {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n :global(.u-fz-medium-m) {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n :global(.u-fz-large-m) {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n:global(.u-ta-left) {\n text-align: left !important;\n}\n:global(.u-ta-right) {\n text-align: right !important;\n}\n:global(.u-ta-center) {\n text-align: center !important;\n}\n:global(.u-ta-justify) {\n text-align: justify !important;\n}\n@media (max-width: 30rem) {\n :global(.u-ta-left-t) {\n text-align: left !important;\n }\n :global(.u-ta-right-t) {\n text-align: right !important;\n }\n :global(.u-ta-center-t) {\n text-align: center !important;\n }\n :global(.u-ta-justify-t) {\n text-align: justify !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-ta-left-s) {\n text-align: left !important;\n }\n :global(.u-ta-right-s) {\n text-align: right !important;\n }\n :global(.u-ta-center-s) {\n text-align: center !important;\n }\n :global(.u-ta-justify-s) {\n text-align: justify !important;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-ta-left-m) {\n text-align: left !important;\n }\n :global(.u-ta-right-m) {\n text-align: right !important;\n }\n :global(.u-ta-center-m) {\n text-align: center !important;\n }\n :global(.u-ta-justify-m) {\n text-align: justify !important;\n }\n}\n:global(.u-fs-normal) {\n font-style: normal !important;\n}\n:global(.u-fs-italic) {\n font-style: italic !important;\n}\n@media (max-width: 30rem) {\n :global(.u-fs-normal-t) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-t) {\n font-style: italic !important;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fs-normal-s) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-s) {\n font-style: italic !important;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-fs-normal-m) {\n font-style: normal !important;\n }\n :global(.u-fs-italic-m) {\n font-style: italic !important;\n }\n}\n:global(.u-fw-normal) {\n font-weight: normal;\n}\n:global(.u-fw-bold) {\n font-weight: bold;\n}\n@media (max-width: 30rem) {\n :global(.u-fw-normal-t) {\n font-weight: normal;\n }\n :global(.u-fw-bold-t) {\n font-weight: bold;\n }\n}\n@media (max-width: 48rem) {\n :global(.u-fw-normal-s) {\n font-weight: normal;\n }\n :global(.u-fw-bold-s) {\n font-weight: bold;\n }\n}\n@media (max-width: 63.938rem) {\n :global(.u-fw-normal-m) {\n font-weight: normal;\n }\n :global(.u-fw-bold-m) {\n font-weight: bold;\n }\n}\n.c-btn,\n.c-btn--regular {\n position: relative;\n box-sizing: border-box;\n display: inline-flex;\n margin: 0 0.25rem;\n border-width: 0.063rem;\n border-style: solid;\n border-radius: var(--buttonBorderRadius);\n min-height: 2.5rem;\n min-width: 7rem;\n padding: 0.188rem 1rem;\n vertical-align: top;\n text-align: center;\n font-size: 0.875rem;\n font-weight: bold;\n line-height: 1;\n text-transform: var(--buttonTextTransform);\n text-decoration: none;\n cursor: pointer;\n align-items: center;\n background-color: var(--regularButtonPrimaryColor);\n color: var(--regularButtonConstrastColor);\n border-color: var(--regularButtonSecondaryColor);\n}\n.c-btn svg,\n.c-btn--regular svg {\n fill: currentColor;\n}\n.c-btn svg + span,\n.c-btn--regular svg + span {\n margin-left: 0.375rem;\n}\n.c-btn input,\n.c-btn--regular input {\n cursor: pointer;\n}\n.c-btn > span,\n.c-btn--regular > span {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n}\n.c-btn[disabled],\n.c-btn--regular[disabled],\n.c-btn[aria-disabled=true],\n.c-btn--regular[aria-disabled=true] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.c-btn[disabled] input,\n.c-btn--regular[disabled] input,\n.c-btn[aria-disabled=true] input,\n.c-btn--regular[aria-disabled=true] input {\n cursor: not-allowed;\n}\n.c-btn[aria-busy=true],\n.c-btn--regular[aria-busy=true] {\n opacity: 0.5;\n pointer-events: none;\n}\n.c-btn:visited,\n.c-btn--regular:visited {\n color: var(--regularButtonConstrastColor);\n}\n.c-btn:active,\n.c-btn--regular:active,\n.c-btn:hover,\n.c-btn--regular:hover,\n.c-btn:focus,\n.c-btn--regular:focus {\n border-color: var(--regularButtonActiveColor);\n background-color: var(--regularButtonActiveColor);\n}\n.c-btn[disabled]:hover,\n.c-btn--regular[disabled]:hover,\n.c-btn[aria-disabled=true]:hover,\n.c-btn--regular[aria-disabled=true]:hover {\n border-color: var(--regularButtonSecondaryColor);\n background-color: var(--regularButtonPrimaryColor);\n}\n.c-btn--ghost {\n background-color: var(--zircon);\n color: var(--primaryColor);\n border-color: #c2dcff;\n border-style: dashed;\n}\n.c-btn--ghost:visited {\n color: var(--primaryColor);\n}\n.c-btn--ghost:active,\n.c-btn--ghost:hover,\n.c-btn--ghost:focus {\n border-color: #c2dcff;\n background-color: #c2dcff;\n}\n.c-btn--ghost[disabled]:hover,\n.c-btn--ghost[aria-disabled=true]:hover {\n border-color: #c2dcff;\n background-color: var(--zircon);\n}\n.c-btn--highlight {\n background-color: #35ce68;\n color: var(--white);\n border-color: #35ce68;\n}\n.c-btn--highlight:visited {\n color: var(--white);\n}\n.c-btn--highlight:active,\n.c-btn--highlight:hover,\n.c-btn--highlight:focus {\n border-color: #08b442;\n background-color: #08b442;\n}\n.c-btn--highlight[disabled]:hover,\n.c-btn--highlight[aria-disabled=true]:hover {\n border-color: #35ce68;\n background-color: #35ce68;\n}\n.c-btn--alpha,\n.c-btn--action,\n.c-btn--close {\n background-color: transparent;\n color: var(--white);\n border-color: var(--white);\n}\n.c-btn--alpha:visited,\n.c-btn--action:visited,\n.c-btn--close:visited {\n color: var(--white);\n}\n.c-btn--alpha:active,\n.c-btn--action:active,\n.c-btn--close:active,\n.c-btn--alpha:hover,\n.c-btn--action:hover,\n.c-btn--close:hover,\n.c-btn--alpha:focus,\n.c-btn--action:focus,\n.c-btn--close:focus {\n border-color: var(--scienceBlue);\n background-color: var(--scienceBlue);\n}\n.c-btn--alpha[disabled]:hover,\n.c-btn--action[disabled]:hover,\n.c-btn--close[disabled]:hover,\n.c-btn--alpha[aria-disabled=true]:hover,\n.c-btn--action[aria-disabled=true]:hover,\n.c-btn--close[aria-disabled=true]:hover {\n border-color: var(--white);\n background-color: transparent;\n}\n.c-btn--danger {\n background-color: #f52d2d;\n color: var(--white);\n border-color: #f52d2d;\n}\n.c-btn--danger:visited {\n color: var(--white);\n}\n.c-btn--danger:active,\n.c-btn--danger:hover,\n.c-btn--danger:focus {\n border-color: var(--monza);\n background-color: var(--monza);\n}\n.c-btn--danger[disabled]:hover,\n.c-btn--danger[aria-disabled=true]:hover {\n border-color: #f52d2d;\n background-color: #f52d2d;\n}\n.c-btn--secondary {\n background-color: var(--secondaryButtonPrimaryColor);\n color: var(--secondaryButtonContrastColor);\n border-color: var(--secondaryButtonSecondaryColor);\n}\n.c-btn--secondary:visited {\n color: var(--secondaryButtonContrastColor);\n}\n.c-btn--secondary:active,\n.c-btn--secondary:hover,\n.c-btn--secondary:focus {\n border-color: var(--secondaryButtonActiveColor);\n background-color: var(--secondaryButtonActiveColor);\n}\n.c-btn--secondary[disabled]:hover,\n.c-btn--secondary[aria-disabled=true]:hover {\n border-color: var(--secondaryButtonSecondaryColor);\n background-color: var(--secondaryButtonPrimaryColor);\n}\n.c-btn--danger-outline {\n background-color: var(--white);\n color: #f52d2d;\n border-color: #fdcbcb;\n}\n.c-btn--danger-outline:visited {\n color: #f52d2d;\n}\n.c-btn--danger-outline:active,\n.c-btn--danger-outline:hover,\n.c-btn--danger-outline:focus {\n border-color: #fdcbcb;\n background-color: #fdcbcb;\n}\n.c-btn--danger-outline[disabled]:hover,\n.c-btn--danger-outline[aria-disabled=true]:hover {\n border-color: #fdcbcb;\n background-color: var(--white);\n}\n.c-btn--text {\n background-color: transparent;\n color: var(--primaryColor);\n border-color: transparent;\n}\n.c-btn--text:visited {\n color: var(--primaryColor);\n}\n.c-btn--text:active,\n.c-btn--text:hover,\n.c-btn--text:focus {\n border-color: transparent;\n background-color: transparent;\n}\n.c-btn--text[disabled]:hover,\n.c-btn--text[aria-disabled=true]:hover {\n border-color: transparent;\n background-color: transparent;\n}\n.c-btn--text:hover,\n.c-btn--text:focus {\n color: var(--primaryColorDark);\n}\n.c-btn--action {\n border-color: transparent;\n padding: 0.5rem;\n opacity: 0.5;\n}\n.c-btn--action:active,\n.c-btn--action:hover,\n.c-btn--action:focus {\n background-color: transparent;\n border-color: transparent;\n}\n.c-btn--close {\n border-color: transparent;\n padding: 0.5rem;\n}\n.c-btn--close:active,\n.c-btn--close:hover,\n.c-btn--close:focus {\n background-color: transparent;\n border-color: transparent;\n}\n.c-btn--left > span {\n justify-content: flex-start;\n}\n.c-btn--center > span {\n justify-content: center;\n}\n.c-btn--right > span {\n justify-content: flex-end;\n}\n.c-btn.c-btn--tiny {\n min-height: 1.5rem;\n min-width: 5rem;\n padding: 0.125rem 1rem;\n font-size: 0.75rem;\n line-height: 1.3;\n}\n.c-btn.c-btn--small {\n min-height: 2rem;\n min-width: 6rem;\n padding: 0.188rem 0.5rem;\n font-size: 0.813rem;\n line-height: 1.4;\n}\n.c-btn.c-btn--large {\n min-height: 3rem;\n min-width: 10rem;\n padding: 0.5rem 1.5rem;\n font-size: 1rem;\n line-height: 1.5;\n}\n.c-btn.c-btn--full {\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n}\n.c-btn.c-btn--narrow,\n.c-btn.c-btn--round {\n min-width: auto;\n}\n.c-btn.c-btn--round {\n border-radius: 100%;\n min-height: auto;\n padding: 0.25rem;\n}\n.c-btn.c-btn--round svg {\n width: 0.625rem;\n height: 0.625rem;\n}\n@media (pointer: coarse) {\n .c-btn.c-btn--round:after {\n content: '';\n position: absolute;\n top: -0.875rem;\n right: -0.875rem;\n bottom: -0.875rem;\n left: -0.875rem;\n }\n}\n.c-btn--subtle {\n color: var(--regularButtonSecondaryColor);\n min-height: auto;\n min-width: auto;\n border: 0;\n margin: 1rem 0;\n padding: 0;\n vertical-align: baseline;\n background: transparent;\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: bold;\n text-transform: uppercase;\n}\n.c-btn--subtle:active,\n.c-btn--subtle:focus,\n.c-btn--subtle:hover {\n color: var(--regularButtonActiveColor);\n}\n.c-btn--subtle > span {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n}\n.c-btn--subtle[disabled],\n.c-btn--subtle[aria-disabled=true] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.c-btn--subtle[disabled]:hover,\n.c-btn--subtle[aria-disabled=true]:hover {\n background: transparent;\n}\n.c-btn--subtle[aria-busy=true] {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n.c-btn--subtle[aria-busy=true]:hover {\n background: transparent;\n}\n.c-btn--subtle:active,\n.c-btn--subtle:hover,\n.c-btn--subtle:focus,\n.c-btn--subtle:visited {\n color: var(--primaryColorDark);\n background: transparent;\n}\n* + .c-btn--subtle {\n margin-left: 0.063rem;\n}\n.c-btn--subtle.c-btn--tiny {\n min-height: 0;\n min-width: 0;\n padding: 0;\n font-size: 0.563rem;\n}\n.c-btn--subtle.c-btn--small {\n min-height: 0;\n min-width: 0;\n padding: 0;\n font-size: 0.75rem;\n}\n.c-btn--subtle.c-btn--large {\n min-height: 0;\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n}\n.c-btn--subtle.c-btn--danger {\n color: #f52d2d;\n}\n.c-btn--subtle.c-btn--danger:active,\n.c-btn--subtle.c-btn--danger:focus,\n.c-btn--subtle.c-btn--danger:hover {\n color: var(--monza);\n}\n.c-btn--subtle.c-btn--highlight {\n color: #35ce68;\n}\n.c-btn--subtle.c-btn--highlight:active,\n.c-btn--subtle.c-btn--highlight:focus,\n.c-btn--subtle.c-btn--highlight:hover {\n color: #08b442;\n}\n.c-btn--subtle.c-btn--regular {\n color: var(--regularButtonSecondaryColor);\n}\n.c-btn--subtle.c-btn--regular:active,\n.c-btn--subtle.c-btn--regular:focus,\n.c-btn--subtle.c-btn--regular:hover {\n color: var(--regularButtonActiveColor);\n}\n.c-btn--subtle.c-btn--secondary {\n color: var(--slateGrey);\n}\n.c-btn--subtle.c-btn--secondary:active,\n.c-btn--subtle.c-btn--secondary:focus,\n.c-btn--subtle.c-btn--secondary:hover {\n color: var(--charcoalGrey);\n}\n.c-btn--subtle.c-btn--secondary:active svg,\n.c-btn--subtle.c-btn--secondary:focus svg,\n.c-btn--subtle.c-btn--secondary:hover svg {\n color: var(--slateGrey);\n}\n.c-btn--subtle.c-btn--secondary svg {\n color: var(--coolGrey);\n}\n","@require '../settings/breakpoints'\n@require '../tools/mixins'\n\n/*------------------------------------*\\\n Display utilities\n\\*------------------------------------*/\n\n/*\n Visually hidden element but still readable by screen-readers\n FR : http://www.ffoodd.fr/cache-cache-css/\n EN : http://hugogiraudel.com/2016/10/13/css-hide-and-seek/\n*/\n\nhidden()\n // @stylint off\n position absolute !important\n border 0 !important\n width rem(1) !important\n height rem(1) !important\n overflow hidden !important\n padding 0 !important\n white-space nowrap !important\n clip rect(rem(1), rem(1), rem(1), rem(1)) !important\n clip-path inset(50%) !important\n // @stylint on\n\n$visuallyhidden\n hidden()\n\n// Because Stylus doesn't allow me to @extend inside @media… yeah… that sucks\n+medium-screen()\n $visuallyhidden-mobile\n hidden()\n\n$hide\n hide()\n\n$hide--mob\n +lt-desktop()\n display none !important // @stylint ignore\n\n$hide--tablet\n +gt-tablet()\n display none !important // @stylint ignore\n\n$hide--desk\n +gt-mobile()\n display none !important // @stylint ignore\n\n// Global classes\nglobal('.u-visuallyhidden', $visuallyhidden)\nglobal('.u-hide', $hide)\nglobal('.u-hide--mob', $hide--mob)\nglobal('.u-hide--tablet', $hide--tablet)\nglobal('.u-hide--desk', $hide--desk)\n\ndisplay-none()\n display none\n\ndisplay-inline()\n display inline\n\ndisplay-block()\n display block\n\ndisplay-inline-block()\n display inline-block\n\ndisplay-inline-table()\n display inline-table\n\ndisplay-table()\n display table\n\ndisplay-table-cell()\n display table-cell\n\ndisplay-table-row()\n display table-row\n\ndisplay-table-row-group()\n display table-row-group\n\ndisplay-table-column()\n display table-column\n\ndisplay-table-column-group()\n display table-column-group\n\nprops = {\n 'display-none': 'dn',\n 'display-inline': 'di',\n 'display-block': 'db',\n 'display-inline-block': 'dib',\n 'display-inline-table': 'dit',\n 'display-table': 'dt',\n 'display-table-cell': 'dtc',\n 'display-table-row': 'dt-row',\n 'display-table-row-group': 'dt-row-group',\n 'display-table-column': 'dt-column',\n 'display-table-column-group': 'dt-column-group'\n}\n\nif cssmodules == true\n cssModulesUtils(props, breakpoints)\nelse\n nativeUtils(props, breakpoints)\n\n\n","/*------------------------------------*\\\n Mixins\n =====\n\n This file contains mixins:\n - hide()\n - reset()\n\\*------------------------------------*/\n/*\n Tools\n\n Weight: -9\n\n Styleguide Tools\n*/\n/*\n Mixins\n\n Available mixins\n\n Styleguide Tools.mixins\n*/\n// @stylint off\nuse('../scripts/deprecate.js')\n// @stylint on\n\n// Default Font-size\n$basefont ?= 16px\n\nrem($value, $base = $basefont)\n $max = length($value)\n\n $remValues = ()\n for $i in (0...$max)\n push($remValues, _convert-to-rem($value[$i], $base))\n\n return $remValues\n\n_convert-to-rem($px, $base)\n if (typeof($px) == 'unit')\n if ((unit($px) == '' || unit($px) == 'px') && ($px != 0))\n return (round($px / $base, 3))rem\n else\n return 0\n\n/*\n rem($value, $basefont)\n\n rem() takes one or more numeric values in pixel and calculates the rem values from it.\n\n NB: you don't have to explicitly write the `px` unit.\n\n $value - The value in pixel you want to translate in rem. For multiple values you can use `rem(14 12)` for shorthand properties such as `margin`. ⚠ Multiples values should be separated by spaces.\n $basefont - If you need to overwrite the default `$basefont` value of `16`\n\n Weight: 1\n\n Styleguide Tools.mixins.rem\n*/\n\n/*\n hide()\n\n hide() mixin definitely hides an element. This mixin doesn't take parameters.\n\n Weight: 2\n\n Styleguide Tools.mixins.hide\n*/\nhide()\n display none !important // @stylint ignore\n visibility hidden !important // @stylint ignore\n\n/*\n visually-hide()\n\n visually-hide() mixin visually hides an element. The element is still visible by screen readers.\n This mixin doesn't take parameters.\n\n Weight: 3\n\n Styleguide Tools.mixins.hide\n*/\nvisually-hide()\n border 0\n clip rect(0 0 0 0)\n clip-path polygon(0 0, 0 0, 0 0)\n height 1px\n margin -1px\n overflow hidden\n padding 0\n position absolute\n width 1px\n white-space nowrap\n\n/*\n reset()\n\n reset() mixin removes every padding, margin and border of an element.\n This mixin doesn't take parameters.\n\n Weight: 4\n\n Styleguide Tools.mixins.reset\n*/\nreset()\n margin 0\n padding 0\n border 0\n\nglobal(selector, placeholder, type = extend)\n if type == extend\n if cssmodules == true\n :global({selector})\n @extend {placeholder} // @stylint ignore\n else\n {selector}\n @extend {placeholder} // @stylint ignore\n else if type == mixin\n if cssmodules == true\n :global({selector})\n {placeholder}() // @stylint ignore\n else\n {selector}\n {placeholder}() // @stylint ignore\n\ncssModulesUtils(props, breakpoints)\n for kBp, vBp in breakpoints\n if vBp == ''\n for kProp, vProp in props\n :global(.u-{vProp})\n {kProp}()\n else\n @media (max-width: rem(lookup('BP-'+kBp)))\n for kProp, vProp in props\n :global(.u-{vProp}-{vBp}) // @stylint ignore\n {kProp}()\n\nnativeUtils(props, breakpoints)\n for kBp, vBp in breakpoints\n if vBp == ''\n for kProp, vProp in props\n .u-{vProp}\n {kProp}()\n else\n @media (max-width: rem(lookup('BP-'+kBp)))\n for kProp, vProp in props\n .u-{vProp}-{vBp} // @stylint ignore\n {kProp}()\n\n// @stylint on\n","@require '../tools/mixins'\n@require './colors'\n\n/*------------------------------------*\\\n Text utilities\n\\*------------------------------------*/\n\njson_colors=json('../settings/palette.json', { hash: true })\n\nfor color in utility_colors\n $color-{color}\n color: json_colors[color] !important // @stylint ignore\n\n global('.u-' + color, '$color-' + color)\n\n\n$breakword\n word-break break-word\n\n$ellipsis\n white-space nowrap\n overflow hidden\n text-overflow ellipsis\n\nspacellipsis()\n overflow hidden\n text-overflow ellipsis\n white-space break-spaces\n\nspace-ellipsis = {\n 'spacellipsis': 'spacellipsis'\n}\n\nif cssmodules == true\n cssModulesUtils(space-ellipsis, breakpoints)\nelse\n nativeUtils(space-ellipsis, breakpoints)\n\n$midellipsis\n display flex\n flex-wrap nowrap\n\n > * // @stylint ignore\n display inline-block\n max-width 50%\n overflow hidden\n white-space pre\n\n > :first-child\n text-overflow ellipsis\n\n > :last-child\n text-overflow clip\n direction rtl\n\n @supports(text-overflow: '[...]')\n > :first-child\n text-overflow '[...]'\n\n$link\n &:link\n color var(--linkColor) !important // @stylint ignore\n text-decoration var(--linkTextDecoration) !important // @stylint ignore\n\n &:visited\n &:active\n &:hover\n &:focus\n color var(--linkColorActive) !important // @stylint ignore\n\n// @stylint off\nlh-tiny()\n line-height 1!important\n\nlh-xsmall()\n line-height 1.1!important\n\nlh-small()\n line-height 1.2!important\n\nlh-medium()\n line-height 1.3!important\n\nlh-large()\n line-height 1.4!important\n\nlh-xlarge()\n line-height 1.5!important\n\nglobal('.u-lh-tiny', lh-tiny, mixin)\n\nglobal('.u-lh-xsmall', lh-xsmall, mixin)\n\nglobal('.u-lh-small', lh-small, mixin)\n\nglobal('.u-lh-medium', lh-medium, mixin)\n\nglobal('.u-lh-large', lh-large, mixin)\n\nglobal('.u-lh-xlarge', lh-xlarge, mixin)\n\nfz-tiny()\n font-size rem(12)!important\n lh-medium()\n\nfz-xsmall()\n font-size rem(13)!important\n lh-large()\n\nfz-small()\n font-size rem(14)!important\n lh-large()\n\nfz-medium()\n font-size rem(16)!important\n lh-xlarge()\n\nfz-large()\n font-size rem(18)!important\n lh-xlarge()\n\nfontsize = {\n 'fz-tiny': 'fz-tiny',\n 'fz-xsmall': 'fz-xsmall',\n 'fz-small': 'fz-small',\n 'fz-medium': 'fz-medium',\n 'fz-large': 'fz-large'\n}\n\nif cssmodules == true\n cssModulesUtils(fontsize, breakpoints)\nelse\n nativeUtils(fontsize, breakpoints)\n\nta-left()\n text-align left!important\n\nta-right()\n text-align right!important\n\nta-center()\n text-align center!important\n\nta-justify()\n text-align justify!important\n\ntextalign = {\n 'ta-left': 'ta-left',\n 'ta-right': 'ta-right',\n 'ta-center': 'ta-center',\n 'ta-justify': 'ta-justify'\n}\n\nif cssmodules == true\n cssModulesUtils(textalign, breakpoints)\nelse\n nativeUtils(textalign, breakpoints)\n\nfs-normal()\n font-style normal!important\n\nfs-italic()\n font-style italic!important\n\nfontstyle = {\n 'fs-normal': 'fs-normal',\n 'fs-italic': 'fs-italic'\n}\nif cssmodules == true\n cssModulesUtils(fontstyle, breakpoints)\nelse\n nativeUtils(fontstyle, breakpoints)\n\nfw-normal()\n font-weight normal\n\nfw-bold()\n font-weight bold\n\nfontweight = {\n 'fw-normal': 'fw-normal',\n 'fw-bold': 'fw-bold'\n}\nif cssmodules == true\n cssModulesUtils(fontweight, breakpoints)\nelse\n nativeUtils(fontweight, breakpoints)\n// @stylint on\n\n// Global classes\nglobal('.u-breakword', $breakword)\nglobal('.u-ellipsis', $ellipsis)\nglobal('.u-midellipsis', $midellipsis)\nglobal('.u-link', $link)\n","@require '../settings/icons'\n@require '../utilities/display'\n@require '../utilities/text'\n@require '../tools/mixins'\n\npalette=json('../settings/palette.json', { hash: true })\n\n/*------------------------------------*\\\n Variants\n\\*------------------------------------*/\nregularTheme = {\n primaryColor: var(--regularButtonPrimaryColor),\n secondaryColor: var(--regularButtonSecondaryColor),\n activeColor: var(--regularButtonActiveColor),\n contrastColor: var(--regularButtonConstrastColor)\n}\nsecondaryTheme = {\n primaryColor: var(--secondaryButtonPrimaryColor),\n secondaryColor: var(--secondaryButtonSecondaryColor),\n activeColor: var(--secondaryButtonActiveColor),\n contrastColor: var(--secondaryButtonContrastColor)\n}\nghostTheme = {\n primaryColor: var(--zircon), secondaryColor: palette['frenchPass'], activeColor: palette['frenchPass'], contrastColor: var(--primaryColor)\n}\nhighlightTheme = {\n primaryColor: palette['emerald'], secondaryColor: palette['emerald'], activeColor: palette['malachite'], contrastColor: var(--white)\n}\ndangerTheme = {\n primaryColor: palette['pomegranate'], secondaryColor: palette['pomegranate'], activeColor: var(--monza), contrastColor: var(--white)\n}\nalphaTheme = {\n primaryColor: transparent, secondaryColor: var(--white), activeColor: var(--scienceBlue), contrastColor: var(--white)\n}\ndangerOutlineTheme = {\n primaryColor: var(--white), secondaryColor: palette['yourPink'], activeColor: palette['yourPink'], contrastColor: palette['pomegranate']\n}\ntext = {\n primaryColor: transparent, secondaryColor: transparent, activeColor: transparent, contrastColor: var(--primaryColor)\n}\n\n// We turn stylint off since without semicolons, stylus fails to\n// parse the following code block.\n// @stylint off\nthemedBtn(theme)\n background-color: theme['primaryColor']\n color: theme['contrastColor']\n border-color: theme['secondaryColor']\n\n &:visited\n color: theme['contrastColor']\n\n &:active\n &:hover\n &:focus\n border-color: theme['activeColor']\n background-color: theme['activeColor']\n\n &[disabled]\n &[aria-disabled=true]\n &:hover\n border-color: theme['secondaryColor']\n background-color: theme['primaryColor']\n\n/*------------------------------------*\\\n Button\n\\*------------------------------------*/\n\n$button\n position relative\n box-sizing border-box\n display inline-flex\n margin 0 rem(4)\n border-width rem(1)\n border-style solid\n border-radius var(--buttonBorderRadius)\n min-height rem(40)\n min-width rem(112)\n padding rem(3 16)\n vertical-align top\n text-align center\n font-size rem(14)\n font-weight bold\n line-height 1\n text-transform var(--buttonTextTransform)\n text-decoration none\n cursor pointer\n align-items center\n\n svg\n fill currentColor\n\n & + span\n margin-left rem(6)\n\n input\n cursor pointer\n\n > span\n display flex\n align-items center\n justify-content center\n width 100%\n\n &[disabled]\n &[aria-disabled=true]\n opacity .5\n cursor not-allowed\n\n input\n cursor not-allowed\n\n &[aria-busy=true]\n opacity .5\n pointer-events none\n\n themedBtn(regularTheme)\n\n$button--regular // Deprecated\n @extend $button\n\n$button--regularInverted\n themedBtn(regularInvertedTheme)\n\n$button--ghost\n themedBtn(ghostTheme)\n border-style dashed\n\n$button--highlight\n themedBtn(highlightTheme)\n\n$button--alpha\n themedBtn(alphaTheme)\n\n$button--danger\n themedBtn(dangerTheme)\n\n$button--secondary\n themedBtn(secondaryTheme)\n\n$button--secondaryInverted\n themedBtn(secondaryInvertedTheme)\n\n$button--danger-outline\n themedBtn(dangerOutlineTheme)\n\n$button--text\n themedBtn(text)\n\n// @stylint on\n\n$button--text\n &:hover\n &:focus\n color var(--primaryColorDark)\n\n$button--action\n @extend $button--alpha\n border-color transparent\n padding rem(8)\n opacity .5\n\n &:active\n &:hover\n &:focus\n background-color transparent\n border-color transparent\n\n$button--close\n @extend $button--alpha\n border-color transparent\n padding rem(8)\n\n &:active\n &:hover\n &:focus\n background-color transparent\n border-color transparent\n\n$button-alert\n border 0\n height auto\n padding rem(8 16)\n background-color var(--white)\n font-weight bold\n font-size rem(14)\n text-decoration none\n\n$button-alert--error\n @extend $button-alert\n color: palette['pomegranate'] // @stylint ignore\n\n &:visited\n color: palette['pomegranate'] // @stylint ignore\n\n &:active\n &:hover\n &:focus\n color var(--monza)\n background-color: palette['yourPink'] // @stylint ignore\n\n$button-alert--info\n @extend $button-alert\n color var(--white)\n background-color var(--coolGrey)\n\n &[disabled]\n &[aria-disabled=true]\n &:hover\n background-color var(--coolGrey)\n\n &:visited\n color var(--white)\n\n &:active\n &:hover\n &:focus\n background-color var(--charcoalGrey)\n\n$button-alert--success\n @extend $button-alert\n color: palette['emerald'] // @stylint ignore\n\n &:visited\n color: palette['emerald'] // @stylint ignore\n\n &:active\n &:hover\n &:focus\n color: palette['malachite'] // @stylint ignore\n background-color: palette['grannyApple'] // @stylint ignore\n\n$button-client\n @extend $button\n @extend $button--secondary\n display flex\n justify-content center\n align-items center\n height auto\n min-height rem(56)\n margin 0\n padding-left rem(16)\n padding-right rem(16)\n background-color transparent\n text-align left\n font-size rem(13)\n font-weight bold\n line-height 1.3\n color var(--slateGrey)\n\n &:visited\n color var(--slateGrey)\n\n span\n flex 0 1 auto\n\n figure\n flex 0 0 rem(32)\n margin 0 rem(12) 0 0\n\n\n$button-client-mobile\n @extend $button-client\n display flex\n justify-content flex-start\n background-color var(--dodgerBlue)\n border 0\n border-radius 0\n margin 0\n padding rem(8 48 8 16)\n font-size rem(16)\n font-weight normal\n color var(--white)\n text-decoration none\n text-transform none\n\n &[disabled]\n &[aria-disabled=true]\n &:hover\n background-color var(--dodgerBlue)\n\n &:visited\n color var(--white)\n\n &:active\n &:hover\n &:focus\n background-color var(--dodgerBlue)\n\n figure\n flex 0 0 rem(44)\n border-radius rem(8)\n border rem(5) solid var(--white)\n background-color var(--white)\n\n svg\n display block\n\n/*------------------------------------*\\\n Text alignment\n\\*------------------------------------*/\nbutton--left =\n & > span\n justify-content flex-start\n$button--left\n {button--left}\n\nbutton--center =\n & > span\n justify-content center\n$button--center\n {button--center}\n\nbutton--right =\n & > span\n justify-content flex-end\n$button--right\n {button--right}\n\n/*------------------------------------*\\\n Sizes\n\\*------------------------------------*/\nbutton--tiny =\n min-height rem(24)\n min-width rem(80)\n padding rem(2 16)\n font-size rem(12)\n line-height 1.3\n$button--tiny\n {button--tiny}\n\nbutton--small =\n min-height rem(32)\n min-width rem(96)\n padding rem(3 8)\n font-size rem(13)\n line-height 1.4\n$button--small\n {button--small}\n\nbutton--large =\n min-height rem(48)\n min-width rem(160)\n padding rem(8 24)\n font-size rem(16)\n line-height 1.5\n$button--large\n {button--large}\n\n/*------------------------------------*\\\n Extensions\n\\*------------------------------------*/\n$button--full\n width 100%\n margin-left 0\n margin-right 0\n\n$button--narrow\n min-width auto\n\n/*------------------------------------*\\\n Round button\n\\*------------------------------------*/\n$button--round\n @extend $button--narrow\n border-radius 100%\n min-height auto\n padding rem(4)\n\n svg\n width rem(10)\n height rem(10)\n\n // Expand clickable area for touch devices\n @media (pointer: coarse)\n &:after\n content ''\n position absolute\n top rem(-14)\n right rem(-14)\n bottom rem(-14)\n left rem(-14)\n\n/*------------------------------------*\\\n Action button\n\\*------------------------------------*/\n$actionbtn\n @extend $button\n border-color var(--silver)\n text-transform none\n max-width rem(200)\n min-height rem(32)\n width 100%\n padding-right rem(8)\n text-align left\n line-height 1.3\n outline 0\n\n > span\n justify-content flex-start\n flex-wrap nowrap\n\n [data-action='icon']\n border-left rem(1) solid var(--dividerColor)\n\n &:not([disabled]):hover\n &:not([disabled]):focus\n [data-action='icon']\n border-color currentColor\n\n$actionbtn--compact\n @extend $button--narrow\n position relative\n border 0\n background-color transparent\n padding 0\n margin 0\n min-height rem(32)\n width rem(40)\n\n > span\n justify-content center\n\n [data-action='label']\n @extend $hide\n\n [data-action='icon']\n border-left none\n margin-left 0\n padding 0\n\n &:hover\n &:focus\n background-color var(--paleGrey)\n border 0\n\nactionbtnVariant(bgColor, txtColor, bdColor)\n background-color bgColor\n color txtColor\n border-color bdColor\n\n [data-action='icon']\n border-color bdColor\n\n &:hover\n &:focus\n background-color bdColor\n border-color bdColor\n\n &[disabled]:hover\n &[aria-disabled=true]:hover\n background-color bgColor\n\n$actionbtn--normal\n actionbtnVariant(var(--paleGrey), var(--charcoalGrey), var(--silver))\n\n$actionbtn--error\n actionbtnVariant(var(--chablis), palette['pomegranate'], palette['yourPink'])\n\n$actionbtn--new\n actionbtnVariant(var(--zircon), var(--dodgerBlue), palette['frenchPass'])\n border-width rem(1)\n border-style dashed\n\n &:hover:not([disabled])\n &:focus:not([disabled])\n border-style solid\n\n$actionbtn-label\n @extend $ellipsis\n padding-right rem(8)\n\n$actionbtn-icon\n display block\n margin-left auto\n padding-left rem(8)\n\n svg\n display block\n\n/*------------------------------------*\\\n Variants\n\\*------------------------------------*/\n// We turn stylint off since without semicolons, stylus fails to\n// parse the following code block.\n// @stylint off\nthemedBtnSubtle(theme)\n color: theme['secondaryColor']\n\n &:active\n &:focus\n &:hover\n color: theme['activeColor']\n\nsizedBtnSubtle(size)\n sizes = {\n tiny: rem(9), small: rem(12), large: rem(16)\n }\n\n min-height 0\n min-width 0\n padding 0\n font-size sizes[size]\n\n$button-subtle\n themedBtnSubtle(regularTheme)\n min-height auto\n min-width auto\n border 0\n margin rem(16) 0\n padding 0\n vertical-align baseline\n background transparent\n cursor pointer\n font-size rem(14)\n font-weight bold\n text-transform uppercase\n\n > span\n display flex\n align-items center\n justify-content center\n width 100%\n\n &[disabled]\n &[aria-disabled=true]\n opacity .5\n cursor not-allowed\n\n &:hover\n background transparent\n\n &[aria-busy=true]\n opacity .5\n cursor not-allowed\n pointer-events none\n\n &:hover\n background transparent\n\n &:active\n &:hover\n &:focus\n &:visited\n color var(--primaryColorDark)\n background transparent\n\n * + &\n margin-left rem(1)\n\n$button-subtle--tiny\n sizedBtnSubtle('tiny')\n\n$button-subtle--small\n sizedBtnSubtle('small')\n\n$button-subtle--large\n sizedBtnSubtle('large')\n\n$button-subtle--danger\n themedBtnSubtle(dangerTheme)\n\n$button-subtle--highlight\n themedBtnSubtle(highlightTheme)\n\n$button-subtle--regular\n themedBtnSubtle(regularTheme)\n\n$button-subtle--secondary\n // Not using themedBtnSubtle(secondaryTheme) because\n // silver color for a single text was too bright\n color var(--slateGrey)\n\n &:active\n &:focus\n &:hover\n color var(--charcoalGrey)\n svg\n color var(--slateGrey)\n svg\n color var(--coolGrey)\n// @stylint on\n","@require '../tools/mixins'\n\n/*------------------------------------*\\\n Breakpoints\n =====\n\\*------------------------------------*/\n\n// variables\n\nBP-teeny = 375\nBP-tiny = 480\nBP-small = 768\nBP-medium = 1023\nBP-large = 1200\nBP-extra-large = 1439\n\n// Standard breakpoints collection for utilities\nbreakpoints = {\n 'none': '',\n 'tiny': 't',\n 'small': 's',\n 'medium': 'm',\n}\n\n/*\n Breakpoints\n\n This is the collection of available breakpoint variables:<br><br>\n - `BP-teeny` - 375px\n - `BP-tiny` - 480px\n - `BP-small` - 768px\n - `BP-medium` - 1023px\n - `BP-large` - 1200px\n - `BP-extra-large` - 1439px\n\n <br>Also we have a standard breakpoints collection meant to be used as suffixes for some utility classes<br>\n\n If you want a utility class to trigger only at defined breakpoints you can use those:<br><br>\n - `-t` - refers to `tiny` breakpoint (max-width: 480px)\n - `-s` - refers to `small` breakpoint (max-width: 768px)\n - `-m` - refers to `medium` breakpoint (max-width: 1023px)\n\n Styleguide Settings.breakpoints\n*/\n\n/*\n Media Queries mixins\n\n You can use these mixins with no arguments and they will output\n the desired a `max-width` media-query. Use the direction argument\n to set it to `min`.\n\n Styleguide Settings.breakpoints.mixins\n*/\n\n// mixins\n// @stylint off\nsize-helper(direction, size)\n direction == 'min' ? size + 1 : size\n\n/*\n teeny-screen()\n\n teeny-screen() Refers to (max-width: 375px)\n teeny-screen('min') Refers to (min-width: 376px)\n\n Weight: -6\n\n Styleguide Settings.breakpoints.mixins.teeny\n*/\nteeny-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-teeny)))\n {block}\n\n/*\n tiny-screen()\n\n tiny-screen() Refers to (max-width: 480px)\n tiny-screen('min') Refers to (min-width: 481px)\n\n Weight: -5\n\n Styleguide Settings.breakpoints.mixins.tiny\n*/\ntiny-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-tiny)))\n {block}\n\n/*\n small-screen()\n\n small-screen() Refers to (max-width: 768px)\n small-screen('min') Refers to (min-width: 769px)\n\n Weight: -4\n\n Styleguide Settings.breakpoints.mixins.small\n*/\nsmall-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-small)))\n {block}\n\n/*\n medium-screen()\n\n medium-screen() Refers to (max-width: 1023px)\n medium-screen('min') Refers to (min-width: 1024px)\n\n Weight: -3\n\n Styleguide Settings.breakpoints.mixins.medium\n*/\nmedium-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-medium)))\n {block}\n\n/*\n large-screen()\n\n large-screen() Refers to (max-width: 1200px)\n large-screen('min') Refers to (min-width: 1201px)\n\n Weight: -2\n\n Styleguide Settings.breakpoints.mixins.large\n*/\nlarge-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-large)))\n {block}\n\n/*\n extra-large-screen()\n\n extra-large-screen() Refers to (max-width: 1439px)\n extra-large-screen('min') Refers to (min-width: 1440px)\n\n Weight: -1\n\n Styleguide Settings.breakpoints.mixins.extra-large\n*/\nextra-large-screen(direction='max')\n @media ({direction}-width: rem(size-helper(direction, BP-extra-large)))\n {block}\n\n// mixins named\n\n/*\n small-device()\n\n Refers to (max-width: 543px), (max-height: 375px)\n Triggers when the viewport has a width smaller than 543px OR a height smaller than 375px\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.small-device\n*/\n\nsmall-device()\n @media (max-width: rem(size-helper('max', BP-tiny))), (max-height: rem(size-helper('max', BP-teeny)))\n {block}\n\n/*\n medium-device()\n\n Refers to (min-width: 543px) and (min-height: 375px)\n Triggers when the viewport has a width bigger than 543px AND a height bigger than 375px\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.medium-device\n*/\n\nmedium-device()\n @media (min-width: rem(size-helper('min', BP-tiny))) and (min-height: rem(size-helper('min', BP-teeny)))\n {block}\n\n/*\n desktop()\n\n Refers to (min-width: 1024px)\n\n Weight: 0\n\n Styleguide Settings.breakpoints.mixins.desktop\n*/\ndesktop()\n @media (min-width: rem(size-helper('min', BP-medium)))\n {block}\n\n/*\n tablet()\n\n Refers to (min-width: 769px) and (max-width: 1023px)\n\n Weight: 1\n\n Styleguide Settings.breakpoints.mixins.tablet\n*/\ntablet()\n @media (min-width: rem(size-helper('min', BP-small))) and (max-width: rem(size-helper('max', BP-medium)))\n {block}\n\n/*\n mobile()\n\n Refers to small-screen() which is (max-width: 768px)\n\n Weight: 2\n\n Styleguide Settings.breakpoints.mixins.mobile\n*/\nmobile()\n +small-screen()\n {block}\n\n/*\n gt-mobile()\n\n Refers to (min-width: 769px)\n\n Weight: 3\n\n Styleguide Settings.breakpoints.mixins.gt-mobile\n*/\ngt-mobile()\n @media (min-width: rem(size-helper('min', BP-small)))\n {block}\n\n/*\n gt-tablet()\n\n Refers to (min-width: 1024px)\n\n Weight: 4\n\n Styleguide Settings.breakpoints.mixins.gt-tablet\n*/\ngt-tablet()\n @media (min-width: rem(size-helper('min', BP-medium)))\n {block}\n\n/*\n lt-desktop()\n\n Refers to medium-screen() which is (max-width: 1023px)\n\n Weight: 5\n\n Styleguide Settings.breakpoints.mixins.lt-desktop\n*/\nlt-desktop()\n +medium-screen()\n {block}\n// @stylint on\n"],sourceRoot:""}]),t.locals={"c-btn":"cozy-ui-bar-c-btn--3Vk8q","c-btn--regular":"cozy-ui-bar-c-btn--regular--2vXm9","c-btn--ghost":"cozy-ui-bar-c-btn--ghost--2erzD","c-btn--highlight":"cozy-ui-bar-c-btn--highlight--139k0","c-btn--alpha":"cozy-ui-bar-c-btn--alpha--3xuwd","c-btn--action":"cozy-ui-bar-c-btn--action--1mNtp","c-btn--close":"cozy-ui-bar-c-btn--close--m97vB","c-btn--danger":"cozy-ui-bar-c-btn--danger--3pdnK","c-btn--secondary":"cozy-ui-bar-c-btn--secondary--2JUsA","c-btn--danger-outline":"cozy-ui-bar-c-btn--danger-outline--2Bltk","c-btn--text":"cozy-ui-bar-c-btn--text--1M_ap","c-btn--left":"cozy-ui-bar-c-btn--left--3xEmE","c-btn--center":"cozy-ui-bar-c-btn--center--T8nT8","c-btn--right":"cozy-ui-bar-c-btn--right--3pX-0","c-btn--tiny":"cozy-ui-bar-c-btn--tiny--15Am0","c-btn--small":"cozy-ui-bar-c-btn--small--gNd1_","c-btn--large":"cozy-ui-bar-c-btn--large--VoQ1T","c-btn--full":"cozy-ui-bar-c-btn--full--257V_","c-btn--narrow":"cozy-ui-bar-c-btn--narrow--37r_T","c-btn--round":"cozy-ui-bar-c-btn--round--TSd9o","c-btn--subtle":"cozy-ui-bar-c-btn--subtle--225Zu",spin:"cozy-ui-bar-spin--39OaW",shake:"cozy-ui-bar-shake--34qwk"}},function(e,t,n){var r=n(64),o=n(351),i=n(352),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(368),o=n(410),i=n(88),a=n(26),u=n(414);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t,n){var r=n(380),o=n(383);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(456),o=n(240),i=/[T ]/,a=/:/,u=/^(\d{2})$/,c=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],s=/^(\d{4})/,l=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],f=/^-(\d{2})$/,d=/^-?(\d{3})$/,p=/^-?(\d{2})-?(\d{2})$/,h=/^-?W(\d{2})$/,m=/^-?W(\d{2})-?(\d{1})$/,y=/^(\d{2}([.,]\d*)?)$/,v=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,g=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,b=/([Z+-].*)$/,w=/^(Z)$/,x=/^([+-])(\d{2})$/,C=/^([+-])(\d{2}):?(\d{2})$/;function k(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}e.exports=function(e,t){if(o(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?2:Number(n);var S=function(e){var t,n={},r=e.split(i);a.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var o=b.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}(e),_=function(e,t){var n,r=c[t],o=l[t];if(n=s.exec(e)||o.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=u.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(S.date,n),A=_.year,O=function(e,t){if(null===t)return null;var n,r,o,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=f.exec(e))return r=new Date(0),o=parseInt(n[1],10)-1,r.setUTCFullYear(t,o),r;if(n=d.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return r.setUTCFullYear(t,0,a),r}if(n=p.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var u=parseInt(n[2],10);return r.setUTCFullYear(t,o,u),r}if(n=h.exec(e))return i=parseInt(n[1],10)-1,k(t,i);if(n=m.exec(e)){i=parseInt(n[1],10)-1;var c=parseInt(n[2],10)-1;return k(t,i,c)}return null}(_.restDateString,A);if(O){var E,B=O.getTime(),j=0;if(S.time&&(j=function(e){var t,n,r;if(t=y.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*36e5;if(t=v.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*36e5+6e4*r;if(t=g.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return n%24*36e5+6e4*r+1e3*o}return null}(S.time)),S.timezone)E=6e4*function(e){var t,n;if(t=w.exec(e))return 0;if(t=x.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=C.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(S.timezone);else{var P=B+j,T=new Date(P);E=r(T);var z=new Date(P);z.setDate(T.getDate()+1);var I=r(z)-r(T);I>0&&(E+=I)}return new Date(B+j+E)}return new Date(e)}},function(e,t){var n=["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"];e.exports=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);var o=n.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+o.join("|")+"|.)","g")}},function(e,t,n){var r=n(88),o=n(251),i=n(253);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.FetchError=t.default=void 0;var o=r(n(4)),i=r(n(11)),a=r(n(8)),u=r(n(10)),c=r(n(5)),s=r(n(35));function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var o=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var f={EXPIRED_TOKEN:/Expired token/,CLIENT_NOT_FOUND:/Client not found/,INVALID_TOKEN:/Invalid JWT token/};t.default=f;var d=function(e){(0,a.default)(n,e);var t=l(n);function n(e,r){var a;return(0,o.default)(this,n),a=t.call(this),Error.captureStackTrace&&Error.captureStackTrace((0,i.default)(a),a.constructor),a.name="FetchError",a.response=e,a.url=e.url,a.status=e.status,a.reason=r,Object.defineProperty((0,i.default)(a),"message",{value:r.message||("string"==typeof r?r:JSON.stringify(r))}),a}return n}((0,s.default)(Error));t.FetchError=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DOCTYPE_FILES=t.REGISTRATION_ABORT=void 0;t.REGISTRATION_ABORT="REGISTRATION_ABORT";t.DOCTYPE_FILES="io.cozy.files"},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"initQuery",{enumerable:!0,get:function(){return f.initQuery}}),Object.defineProperty(t,"loadQuery",{enumerable:!0,get:function(){return f.loadQuery}}),Object.defineProperty(t,"receiveQueryResult",{enumerable:!0,get:function(){return f.receiveQueryResult}}),Object.defineProperty(t,"receiveQueryError",{enumerable:!0,get:function(){return f.receiveQueryError}}),Object.defineProperty(t,"initMutation",{enumerable:!0,get:function(){return d.initMutation}}),Object.defineProperty(t,"receiveMutationResult",{enumerable:!0,get:function(){return d.receiveMutationResult}}),Object.defineProperty(t,"receiveMutationError",{enumerable:!0,get:function(){return d.receiveMutationError}}),t.resetState=t.getRawQueryFromState=t.getQueryFromState=t.getQueryFromStore=t.getDocumentFromState=t.getCollectionFromState=t.getStateRoot=t.createStore=t.default=t.StoreProxy=void 0;var i=o(n(2)),a=o(n(4)),u=o(n(6)),c=n(205),s=o(n(203)),l=r(n(278)),f=r(n(188)),d=n(190);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.resetState=function(){return{type:"COZY_CLIENT.RESET_STATE"}};var m=function(){function e(t){(0,a.default)(this,e),this.state=t}return(0,u.default)(e,[{key:"readDocument",value:function(e,t){return this.state.documents[e][t]}},{key:"writeDocument",value:function(e){this.setState((function(t){return h(h({},t),{},{documents:h(h({},t.documents),{},(0,i.default)({},e._type,h(h({},t.documents[e._type]),{},(0,i.default)({},e._id,e))))})}))}},{key:"setState",value:function(e){this.state=e(this.state)}},{key:"getState",value:function(){return this.state}}]),e}();t.StoreProxy=m;var y={documents:{},queries:{}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0;if("COZY_CLIENT.RESET_STATE"==t.type)return y;if(!(0,f.isQueryAction)(t)&&!(0,d.isMutationAction)(t))return e;if(t.update){var n=new m(e);return t.update(n,t.response),{documents:n.getState().documents,queries:(0,f.default)(n.getState().queries,t,n.getState().documents)}}var r=(0,l.default)(e.documents,t),o=r!==e.documents;return{documents:r,queries:(0,f.default)(e.queries,t,r,o)}},g=v;t.default=g;t.createStore=function(){return(0,c.createStore)((0,c.combineReducers)({cozy:v}),(0,c.applyMiddleware)(s.default))};var b=function(e){return e.cozy||{}};t.getStateRoot=b;t.getCollectionFromState=function(e,t){return(0,l.getCollectionFromSlice)(b(e).documents,t)};t.getDocumentFromState=function(e,t,n){return(0,l.getDocumentFromSlice)(b(e).documents,t,n)};t.getQueryFromStore=function(e,t){return w(e.getState(),t)};var w=function(e,t){return(0,f.getQueryFromSlice)(b(e).queries,t,b(e).documents)};t.getQueryFromState=w;t.getRawQueryFromState=function(e,t){return(0,f.getQueryFromSlice)(b(e).queries,t)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=(n(22),n(21),function(){function e(t,n,r,i){(0,o.default)(this,e);var a=i.dispatch,u=i.get,c=i.query,s=i.mutate,l=i.save;this.target=t,this.name=n,this.doctype=r,this.get=u,this.query=c,this.mutate=s,this.save=l,this.dispatch=a}return(0,i.default)(e,[{key:"raw",get:function(){throw new Error("A relationship must define its raw getter")}},{key:"data",get:function(){throw new Error("A relationship must define its data getter")}}],[{key:"query",value:function(e,t,n){throw new Error("A custom relationship must define its query() function")}}]),e}());t.default=a},function(e,t,n){"use strict";var r=n(27),o=n(99),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},function(e,t,n){var r=n(145);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(39).Symbol;e.exports=r},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var r=n(407),o=n(151),i=n(408),a=n(224),u=n(225),c=n(52),s=n(214),l=s(r),f=s(o),d=s(i),p=s(a),h=s(u),m=c;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||i&&"[object Promise]"!=m(i.resolve())||a&&"[object Set]"!=m(new a)||u&&"[object WeakMap]"!=m(new u))&&(m=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case d:return"[object Promise]";case p:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(26),o=n(160),i=n(411),a=n(63);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(82);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(232);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var a=e[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r=n(162),o=n(69);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var u=-1,c=t.length;++u<c;){var s=t[u],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),a?o(n,s,l):r(n,s,l)}return n}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Collection=t.isDocumentUpdateConflict=t.isNoUsableIndexError=t.isIndexConflictError=t.isIndexNotFoundError=t.dontThrowNotFoundError=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(4)),u=r(n(6)),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.message.match(/not_found/)){var n=Array.isArray(t);return n?{data:t,meta:{count:0},skip:0,next:!1}:{data:t}}throw e};t.dontThrowNotFoundError=c;t.isIndexNotFoundError=function(e){return e.message.match(/no_index/)};t.isIndexConflictError=function(e){return e.message.match(/error_saving_ddoc/)};t.isNoUsableIndexError=function(e){return e.message.match(/no_usable_index/)};t.isDocumentUpdateConflict=function(e){return e.message.match(/Document update conflict/)};var s=function(){function e(){(0,a.default)(this,e)}var t;return(0,u.default)(e,null,[{key:"get",value:(t=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u,s,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.normalize,a=void 0===i?function(e,t){return e}:i,u=r.method,s=void 0===u?"GET":u,e.prev=1,e.next=4,t.fetchJSON(s,n);case 4:return l=e.sent,e.abrupt("return",{data:a(l.data,l)});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",c(e.t0,null));case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),function(e,n,r){return t.apply(this,arguments)})}]),e}();t.Collection=s;var l=s;t.default=l},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="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},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(73)),u=s(n(200)),c=s(n(130));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="style",this.isProcessed=!1;var o=r.sheet,i=r.Renderer,a=r.selector;this.key=t,this.options=r,this.style=n,a&&(this.selectorText=a),this.renderer=o?o.renderer:new i}return i(e,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var o=n&&r;if(o?delete this.style[e]:this.style[e]=t,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var i=this.options.sheet;return i&&i.attached&&(0,a.default)(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":o(n))?e[t]=n:Array.isArray(n)&&(e[t]=(0,c.default)(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=!!t&&t.options.link?r({},e,{allowEmpty:!0}):e;return(0,u.default)(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),e}();t.default=l},function(e,t,n){var r=n(69),o=n(170),i=n(53);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},function(e,t,n){var r=n(43),o=n(258),i=n(509),a=n(67),u=n(71),c=n(511),s=n(180),l=n(163),f=s((function(e,t){var n={};if(null==e)return n;var s=!1;t=r(t,(function(t){return t=a(t,e),s||(s=t.length>1),t})),u(e,l(e),n),s&&(n=o(n,7,c));for(var f=t.length;f--;)i(n,t[f]);return n}));e.exports=f},function(e,t,n){"use strict";e.exports=n(444)},function(e,t,n){"use strict";var r=n(3)(n(118));"undefined"!=typeof window&&(r.default.connect=n(433).default,r.default.FlagSwitcher=n(436).default,r.default.useFlag=n(437).default),"undefined"!=typeof __ENABLED_FLAGS__&&r.default.enable(__ENABLED_FLAGS__),e.exports=r.default},function(e,t,n){"use strict";var r=n(77),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(e){return r.isMemo(e)?a:u[e.$$typeof]||o}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var u=c(t),m=c(n),y=0;y<a.length;++y){var v=a[y];if(!(i[v]||r&&r[v]||m&&m[v]||u&&u[v])){var g=d(n,v);try{s(t,v,g)}catch(e){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return u}));var r="SET_LOCALE",o=function(e){return{type:r,lang:e}},i=function(){return document.documentElement.getAttribute("lang")||"en"},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i(),t=arguments.length>1?arguments[1]:void 0;return t.type===r?t.lang:e},u=function(e){return e}},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,".cozy-ui-bar-c-loading-placeholder--215aK{-webkit-animation-delay:.1s;animation-delay:.1s;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:cozy-ui-bar-placeHolderShimmer--3-jlD;animation-name:cozy-ui-bar-placeHolderShimmer--3-jlD;-webkit-animation-timing-function:linear;animation-timing-function:linear;background-position:-20rem 0;background-image:linear-gradient(to right,silver 0,#fcfcfc 50%,silver 100%);background-size:20rem 10rem;background-repeat:no-repeat;background-color:silver;border-radius:.15rem;max-width:100%;position:relative;margin:.1rem 0}.cozy-ui-bar-c-app-icon--3Xbeb,.cozy-ui-bar-c-app-icon--3Xbeb svg{height:100%;width:100%;flex-grow:0;flex-shrink:0;-o-object-fit:contain;object-fit:contain}.cozy-ui-bar-c-app-icon-default--2Jv93{color:var(--silver)}@-webkit-keyframes cozy-ui-bar-placeHolderShimmer--3-jlD{0%{background-position:-20rem 0}80%{background-position:20rem 0}80.1%{background-position:-20rem 0}100%{background-position:-20rem 0}}@keyframes cozy-ui-bar-placeHolderShimmer--3-jlD{0%{background-position:-20rem 0}80%{background-position:20rem 0}80.1%{background-position:-20rem 0}100%{background-position:-20rem 0}}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/AppIcon/node_modules/cozy-ui/react/AppIcon/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/AppIcon/styles.styl"],names:[],mappings:"AAOA,0CACI,4BAAA,oBACA,8BAAA,sBACA,2CAAA,mCACA,6DAAA,qDACA,yCAAA,iCACA,6BACA,4EACA,4BACA,4BACA,wBACA,qBACA,eACA,kBACA,cCNJ,CDSA,kEAEI,YACA,WAEA,YACA,cACA,sBAAA,kBCRJ,CDWA,uCACI,mBCTJ,CD1BA,yDACE,GAAK,4BC2CL,CD1CA,IAAM,2BC6CN,CD5CA,MAAQ,4BC+CR,CD9CA,KAAO,4BCiDP,CACF,CDtDA,iDACE,GAAK,4BCuEL,CDtEA,IAAM,2BCyEN,CDxEA,MAAQ,4BC2ER,CD1EA,KAAO,4BC6EP,CACF,CAAA",file:"styles.styl",sourcesContent:["@keyframes placeHolderShimmer {\n 0% { background-position: -20rem 0; }\n 80% { background-position: 20rem 0; }\n 80.1% { background-position: -20rem 0; }\n 100% { background-position: -20rem 0; }\n}\n\n.c-loading-placeholder {\n animation-delay: 0.1s;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-name: placeHolderShimmer;\n animation-timing-function: linear;\n background-position: -20rem 0;\n background-image: linear-gradient(to right, silver 0%, #fcfcfc 50%, silver 100%);\n background-size: 20rem 10rem;\n background-repeat: no-repeat;\n background-color: silver;\n border-radius: 0.15rem;\n max-width: 100%;\n position: relative;\n margin: .1rem 0;\n}\n\n.c-app-icon,\n.c-app-icon svg {\n height 100%\n width 100%\n // Prevent flex-grow and flex-shrink\n flex-grow 0\n flex-shrink 0\n object-fit contain\n}\n\n.c-app-icon-default {\n color var(--silver)\n}\n",".c-loading-placeholder {\n animation-delay: 0.1s;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-name: placeHolderShimmer;\n animation-timing-function: linear;\n background-position: -20rem 0;\n background-image: linear-gradient(to right, #c0c0c0 0%, #fcfcfc 50%, #c0c0c0 100%);\n background-size: 20rem 10rem;\n background-repeat: no-repeat;\n background-color: #c0c0c0;\n border-radius: 0.15rem;\n max-width: 100%;\n position: relative;\n margin: 0.1rem 0;\n}\n.c-app-icon,\n.c-app-icon svg {\n height: 100%;\n width: 100%;\n flex-grow: 0;\n flex-shrink: 0;\n object-fit: contain;\n}\n.c-app-icon-default {\n color: var(--silver);\n}\n@-moz-keyframes placeHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n 80% {\n background-position: 20rem 0;\n }\n 80.1% {\n background-position: -20rem 0;\n }\n 100% {\n background-position: -20rem 0;\n }\n}\n@-webkit-keyframes placeHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n 80% {\n background-position: 20rem 0;\n }\n 80.1% {\n background-position: -20rem 0;\n }\n 100% {\n background-position: -20rem 0;\n }\n}\n@-o-keyframes placeHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n 80% {\n background-position: 20rem 0;\n }\n 80.1% {\n background-position: -20rem 0;\n }\n 100% {\n background-position: -20rem 0;\n }\n}\n@keyframes placeHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n 80% {\n background-position: 20rem 0;\n }\n 80.1% {\n background-position: -20rem 0;\n }\n 100% {\n background-position: -20rem 0;\n }\n}\n"],sourceRoot:""}]),t.locals={"c-loading-placeholder":"cozy-ui-bar-c-loading-placeholder--215aK",placeHolderShimmer:"cozy-ui-bar-placeHolderShimmer--3-jlD","c-app-icon":"cozy-ui-bar-c-app-icon--3Xbeb","c-app-icon-default":"cozy-ui-bar-c-app-icon-default--2Jv93"}},function(e,t,n){var r=n(52),o=n(40);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(221),o=n(159),i=n(47);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(403),o=n(40),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=c},function(e,t,n){(function(e){var r=n(39),o=n(404),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;e.exports=c}).call(this,n(112)(e))},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var r=n(446);e.exports=Function.prototype.bind||r},function(e,t,n){var r=n(91),o=n(92);e.exports={distanceInWords:r(),format:o()}},function(e,t){e.exports=function(){var e={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"}};return{localize:function(t,n,r){var o;return r=r||{},o="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+o:o+" ago":o}}}},function(e,t,n){var r=n(56);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=["AM","PM"],u=["am","pm"],c=["a.m.","p.m."],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return i[e.getDay()]},A:function(e){return e.getHours()/12>=1?a[1]:a[0]},a:function(e){return e.getHours()/12>=1?u[1]:u[0]},aa:function(e){return e.getHours()/12>=1?c[1]:c[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){s[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:s,formattingTokensRegExp:r(s)}}},function(e,t){e.exports=function(){var e={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"}};return{localize:function(t,n,r){var o;return r=r||{},o="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"en "+o:"hace "+o:o}}}},function(e,t,n){var r=n(56);e.exports=function(){var e=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],t=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],n=["do","lu","ma","mi","ju","vi","sa"],o=["dom","lun","mar","mié","jue","vie","sáb"],i=["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],a=["AM","PM"],u=["am","pm"],c=["a.m.","p.m."],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return i[e.getDay()]},A:function(e){return e.getHours()/12>=1?a[1]:a[0]},a:function(e){return e.getHours()/12>=1?u[1]:u[0]},aa:function(e){return e.getHours()/12>=1?c[1]:c[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){s[e+"o"]=function(t,n){return n[e](t)+"º"}})),{formatters:s,formattingTokensRegExp:r(s)}}},function(e,t){e.exports=function(){var e={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"}};return{localize:function(t,n,r){var o;return r=r||{},o="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"dans "+o:"il y a "+o:o}}}},function(e,t,n){var r=n(56);e.exports=function(){var e=["janv.","févr.","mars","avr.","mai","juin","juill.","août","sept.","oct.","nov.","déc."],t=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],n=["di","lu","ma","me","je","ve","sa"],o=["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],i=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],a=["AM","PM"],u=["am","pm"],c=["du matin","de l’après-midi","du soir"],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return i[e.getDay()]},A:function(e){return e.getHours()/12>=1?a[1]:a[0]},a:function(e){return e.getHours()/12>=1?u[1]:u[0]},aa:function(e){var t=e.getHours();return t<=12?c[0]:t<=16?c[1]:c[2]},Wo:function(e,t){return function(e){if(1===e)return"1re";return e+"e"}(t.W(e))}};return["M","D","DDD","d","Q"].forEach((function(e){s[e+"o"]=function(t,n){return function(e){if(1===e)return"1er";return e+"e"}(n[e](t))}})),["MMM","MMMM"].forEach((function(e){s["Do "+e]=function(t,n){var r=1===t.getDate()?"Do":"D";return(s[r]||n[r])(t,n)+" "+s[e](t)}})),{formatters:s,formattingTokensRegExp:r(s)}}},function(e,t,n){var r=n(526);function o(t,n,i){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=o=Reflect.get:e.exports=o=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},o(t,n,i||t)}e.exports=o},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.updateRelationship=t.updateHasManyItem=t.removeHasManyItem=t.setHasManyItem=t.getHasManyItems=t.getHasManyItem=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(11)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(2)),f=r(n(31)),d=r(n(18)),p=r(n(127)),h=n(21),m=n(60),y=(n(22),r(n(61)));function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,l.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var w=function(e){(0,u.default)(n,e);var t=b(n);function n(){var e;(0,o.default)(this,n);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return e=t.call.apply(t,[this].concat(i)),(0,l.default)((0,a.default)(e),"updateRelationshipData",(function(t){return function(n,r){var o=(0,m.getDocumentFromState)(r(),e.target._type,e.target._id);n((0,m.receiveQueryResult)(null,{data:g(g({},o),{},{relationships:g(g({},o.relationships),{},(0,l.default)({},e.name,t(o.relationships[e.name])))})}))}})),e}return(0,i.default)(n,[{key:"fetchMore",value:function(){throw"Not implemented"}},{key:"exists",value:function(e){return this.existsById(e._id)}},{key:"containsById",value:function(e){return void 0!==this.getRelationship().data.find((function(t){var n=t._id;return e===n}))}},{key:"existsById",value:function(e){return Boolean(this.containsById(e)&&this.get(this.doctype,e))}},{key:"add",value:function(e){var t=(Array.isArray(e)?e:[e]).map((function(e){return e._id}));return this.addById(t)}},{key:"remove",value:function(e){var t=(Array.isArray(e)?e:[e]).map((function(e){return e._id}));return this.removeById(t)}},{key:"addTargetRelationships",value:function(e){var t,n=this;this.target.relationships||(this.target.relationships={}),this.target.relationships[this.name]||(this.target.relationships[this.name]={data:[]});var r=(Array.isArray(e)?e:[e]).filter((function(e){return!n.existsById(e)})).map((function(e){return{_id:e,_type:n.doctype}}));(t=this.target.relationships[this.name].data).push.apply(t,(0,f.default)(r)),this.updateMetaCount()}},{key:"addById",value:function(e){return this.addTargetRelationships(e),this.save(this.target)}},{key:"removeTargetRelationships",value:function(e){var t=Array.isArray(e)?e:[e];this.target.relationships[this.name].data=this.target.relationships[this.name].data.filter((function(e){var n=e._id;return!t.includes(n)})),this.updateMetaCount()}},{key:"removeById",value:function(e){return this.removeTargetRelationships(e),this.save(this.target)}},{key:"updateMetaCount",value:function(){void 0!==(0,d.default)(this.target.relationships[this.name],"meta.count")&&(this.target.relationships[this.name].meta=g(g({},this.target.relationships[this.name].meta),{},{count:this.target.relationships[this.name].data.length}))}},{key:"getRelationship",value:function(){var e=this.target[this.name],t=(0,d.default)(this.target,"relationships.".concat(this.name));return t||(e&&e.length&&console.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"),{data:[],next:!0,meta:{count:0}})}},{key:"updateTargetRelationship",value:function(e,t){var n=e.readDocument(this.target._type,this.target._id);e.writeDocument(this.updateRelationship(n,t))}},{key:"updateRelationship",value:function(e,t){return n.updateRelationship(e,this.name,t)}},{key:"dehydrate",value:function(e){return g(g({},e),{},{relationships:g(g({},e.relationships),{},(0,l.default)({},this.name,{data:this.raw}))})}},{key:"raw",get:function(){return this.getRelationship().data}},{key:"data",get:function(){var e=this;return this.getRelationship().data.map((function(t){var n=t._id,r=t._type;return e.get(r,n)})).filter(Boolean)}},{key:"hasMore",get:function(){return this.getRelationship().next}},{key:"count",get:function(){var e=this.getRelationship();return e.meta?e.meta.count:e.data.length}}],[{key:"query",value:function(e,t,n){var r=(0,d.default)(e,"relationships.".concat(n.name,".data"),[]).map((function(e){return e._id}));return new h.QueryDefinition({doctype:n.doctype,ids:r})}}]),n}(y.default),x=w.getHasManyItem=function(e,t,n){return(0,d.default)(e,"relationships.".concat(t,".data"),[]).find((function(e){return e._id==n}))};t.getHasManyItem=x;var C=w.getHasManyItems=function(e,t){return(0,d.default)(e,"relationships.".concat(t,".data"),[])};t.getHasManyItems=C;var k=w.setHasManyItem=function(e,t,n,r){var o,i,a,u,c=w.getHasManyItems(e,t),s=c.findIndex((function(e){return e._id===n})),l=(0,p.default)({},c[s],r),d=(o=c,a=l,u=-1===(i=s)?o.length:i,[].concat((0,f.default)(o.slice(0,u)),[a],(0,f.default)(o.slice(u+1))));return w.updateRelationship(e,t,(function(e){return(0,p.default)({},e,{data:d})}))};t.setHasManyItem=k;var S=w.removeHasManyItem=function(e,t,n){var r=w.getHasManyItems(e,t).filter((function(e){return e._id!==n}));return w.updateRelationship(e,t,(function(){return{data:r}}))};t.removeHasManyItem=S;var _=w.updateHasManyItem=function(e,t,n,r){var o=r(w.getHasManyItem(e,t,n));return w.setHasManyItem(e,t,n,o)};t.updateHasManyItem=_;var A=w.updateRelationship=function(e,t,n){return g(g({},e),{},{relationships:g(g({},e.relationships),{},(0,l.default)({},t,g(g({},e.relationships?e.relationships[t]:{}),n(e.relationships?e.relationships[t]:{}))))})};t.updateRelationship=A;var O=w;t.default=O},function(e,t,n){"use strict";var r=n(89),o=n(27),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||r.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),s=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var t=u(r,a,arguments);if(c&&s){var n=c(t,"length");n.configurable&&s(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,i,arguments)};s?s(e.exports,"apply",{value:f}):e.exports.apply=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=s(n(131)),a=s(n(324)),u=s(n(74)),c=s(n(689));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.map={},this.raw={},this.index=[],this.update=function(e,t){var r=n.options,o=r.jss.plugins,i=r.sheet;if("string"==typeof e)o.onUpdate(t,n.get(e),i);else for(var a=0;a<n.index.length;a++)o.onUpdate(e,n.index[a],i)},this.options=t,this.classes=t.classes}return o(e,[{key:"add",value:function(e,t,n){var o=this.options,a=o.parent,s=o.sheet,l=o.jss,f=o.Renderer,d=o.generateClassName;!(n=r({classes:this.classes,parent:a,sheet:s,jss:l,Renderer:f,generateClassName:d},n)).selector&&this.classes[e]&&(n.selector="."+(0,c.default)(this.classes[e])),this.raw[e]=t;var p=(0,i.default)(e,t,n),h=void 0;!n.selector&&p instanceof u.default&&(h=d(p,s),p.selector="."+(0,c.default)(h)),this.register(p,h);var m=void 0===n.index?this.index.length:n.index;return this.index.splice(m,0,p),p}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){this.map[e.key]=e,e instanceof u.default&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof u.default&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var r=e[n],o=this.options.sheet.renderer.getKey(r);t[o]&&(o=t[o]);var i=this.map[o];i&&(0,a.default)(i,r)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=0;o<this.index.length;o++){var i=this.index[o].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t}}]),e}();t.default=l},function(e,t,n){e.exports=window.ReactDOM||n(438)},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));var r,o=n(135),i=n.n(o),a=n(23),u=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.DEFAULT_LANG;if(r=new i.a({phrases:t(o),locale:o}),e&&e!==o)try{var u=t(e);r.extend(u),r.locale(e)}catch(t){console.warn('The dict phrases for "'.concat(e,"\" can't be loaded"))}if(n)try{var c=t(e,n);r.extend(c)}catch(t){console.warn("The context ".concat(n," cannot be loaded for lang ").concat(e))}return r},c=function(e){return r&&r.extend(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCordova=void 0;t.isCordova=function(){return"undefined"!=typeof window&&void 0!==window.cordova}},function(e,t,n){var r=n(105),o=n(375),i=n(376),a=n(377),u=n(378),c=n(379);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=c,e.exports=s},function(e,t,n){var r=n(370),o=n(371),i=n(372),a=n(373),u=n(374);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,e.exports=c},function(e,t,n){var r=n(84);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(54)(Object,"create");e.exports=r},function(e,t,n){var r=n(392);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(153),o=n(397),i=n(398);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(405),o=n(65),i=n(158),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67),o=n(68);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(221),o=n(416),i=n(47);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.initialize=t.initializeFromDOM=t.getTemplateData=t.initializeFromRemote=t.enable=t.resetFlags=t.listFlags=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(7)),u=r(n(9)),c=r(n(19)),s=new(r(n(431)).default),l=function(){var e=[].slice.call(arguments);return 1===e.length?s.get(e[0]):(s.set(e[0],e[1]),e[1])},f=function(){return s.keys().sort()};t.listFlags=f;var d=function(){f().forEach((function(e){return s.remove(e)}))};t.resetFlags=d;var p=function(e){var t;if(Array.isArray(e)?(console.log("flags.enable: Deprecation warning: prefer to use an object { flag1: true, flag2: true } instead of an array when using flags.enable"),t=e.map((function(e){return[e,!0]}))):"object"==typeof e&&(t=Object.entries(e)),t){var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=(0,c.default)(i.value,2),s=u[0],f=u[1];l(s,f)}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}};t.enable=p;var h=function(){var e=(0,u.default)(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.query(t.get("io.cozy.settings","flags"));case 2:n=e.sent,r=n.data.attributes,p(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initializeFromRemote=h;var m=function(e){if("undefined"==typeof document)return null;var t,n=document.querySelector("[data-cozy]"),r=document.querySelector("[data-cozy-".concat(e,"]"));try{return n?JSON.parse(n.dataset.cozy)[e]:r?(console.warn('Prefer to use [data-cozy] to store template data. <div data-cozy="{{.CozyData}}></div>. "'),JSON.parse(r.dataset["cozy".concat((t=e,t[0].toUpperCase()+t.slice(1)))])):null}catch(e){return null}};t.getTemplateData=m;var y=function(){var e=(0,u.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=m("flags")){e.next=3;break}return e.abrupt("return",!1);case 3:return p(t),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.initializeFromDOM=y;var v=function(){var e=(0,u.default)(a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y();case 2:if(0!=e.sent){e.next=6;break}return e.next=6,h(t);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initialize=v;var g=function(){function e(t){(0,o.default)(this,e),this.client=t,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(),t.isLogged&&this.handleLogin()}var t,n,r;return(0,i.default)(e,[{key:"refresh",value:(r=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.initializeFromRemote(this.client);case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setupInitializing",value:function(){var e=this;this.initializing=new Promise((function(t){e.resolveInitializing=t}))}},{key:"handleLogin",value:(n=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.initialize(this.client);case 2:this.resolveInitializing(),this.client.emit("plugin:flag:login");case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"handleLogout",value:(t=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l.reset(),this.setupInitializing(),this.client.emit("plugin:flag:logout");case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();g.pluginName="flags",l.store=s,l.list=f,l.reset=d,l.enable=p,l.initializeFromRemote=h,l.initializeFromDOM=y,l.initialize=v,l.plugin=g;var b=l;t.default=b},function(e,t,n){"use strict";var r=TypeError,o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch(e){o=null}var i=function(){throw new r},a=o?function(){try{return i}catch(e){try{return o(arguments,"callee").get}catch(e){return i}}}():i,u=n(168)(),c=Object.getPrototypeOf||function(e){return e.__proto__},s=void 0,l="undefined"==typeof Uint8Array?void 0:c(Uint8Array),f={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":u?c([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":s&&u&&Symbol.asyncIterator?s[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?c(c([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?c((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?c((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":u?c(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":u?Symbol:void 0,"%SymbolPrototype%":u?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":a,"%TypedArray%":l,"%TypedArrayPrototype%":l?l.prototype:void 0,"%TypeError%":r,"%TypeErrorPrototype%":r.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},d=n(89).call(Function.call,String.prototype.replace),p=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h=/\\(\\)?/g,m=function(e){var t=[];return d(e,p,(function(e,n,r,o){t[t.length]=r?d(o,h,"$1"):n||e})),t},y=function(e,t){if(!(e in f))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===f[e]&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return f[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=m(e),i=y("%"+(n.length>0?n[0]:"")+"%",t),a=1;a<n.length;a+=1)if(null!=i)if(o&&a+1>=n.length){var u=o(i,n[a]);if(!t&&!(n[a]in i))throw new r("base intrinsic for "+e+" exists, but the property is not available.");i=u?u.get||u.value:i[n[a]]}else i=i[n[a]];return i}},function(e,t,n){var r=n(93),o=n(94);e.exports={distanceInWords:r(),format:o()}},function(e,t,n){var r=n(95),o=n(96);e.exports={distanceInWords:r(),format:o()}},function(e,t,n){var r=n(111),o=n(473);e.exports=function e(t,n,i,a,u){var c=-1,s=t.length;for(i||(i=o),u||(u=[]);++c<s;){var l=t[c];n>0&&i(l)?n>1?e(l,n-1,i,a,u):r(u,l):a||(u[u.length]=l)}return u}},function(e,t,n){var r=n(47),o=n(40);e.exports=function(e){return o(e)&&r(e)}},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(172);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HasManyFiles",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"HasMany",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"HasOne",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"HasOneInPlace",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"HasManyInPlace",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"HasManyTriggers",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Association",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"resolveClass",{enumerable:!0,get:function(){return f.resolveClass}}),Object.defineProperty(t,"create",{enumerable:!0,get:function(){return f.create}}),Object.defineProperty(t,"isReferencedBy",{enumerable:!0,get:function(){return f.isReferencedBy}}),Object.defineProperty(t,"isReferencedById",{enumerable:!0,get:function(){return f.isReferencedById}}),Object.defineProperty(t,"getReferencedBy",{enumerable:!0,get:function(){return f.getReferencedBy}}),Object.defineProperty(t,"getReferencedById",{enumerable:!0,get:function(){return f.getReferencedById}});var o=r(n(277)),i=r(n(98)),a=r(n(291)),u=r(n(292)),c=r(n(293)),s=r(n(568)),l=r(n(61)),f=n(191)},function(e,t,n){var r=n(563),o=n(566)((function(e,t,n){r(e,t,n)}));e.exports=o},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(0),i=r(n(196)),a=(r(n(41)),function(){return(0,o.useContext)(i.default).client});t.default=a},function(e,t,n){"use strict";n.r(t);var r=n(316),o=n.n(r);n.d(t,"componentPropType",(function(){return o.a}));var i=n(317),a=n.n(i);n.d(t,"chainPropTypes",(function(){return a.a}));var u=n(318),c=n.n(u);n.d(t,"exactProp",(function(){return c.a}));var s=n(319),l=n.n(s);n.d(t,"getDisplayName",(function(){return l.a}));var f=n(320),d=n.n(f);n.d(t,"ponyfillGlobal",(function(){return d.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var o=0;o<e.length&&"!important"!==e[o];o++)n&&(n+=", "),n+=r(e[o]," ");else n=r(e,", ");t||"!important"!==e[e.length-1]||(n+=" !important");return n};var r=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],a=n.jss,u=(0,i.default)(t),c=a.plugins.onCreateRule(e,u,n);if(c)return c;"@"===e[0]&&(0,r.default)(!1,"[JSS] Unknown at-rule %s",e);return new o.default(e,u,n)};var r=a(n(73)),o=a(n(74)),i=a(n(688));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n.r(t),n.d(t,"isBrowser",(function(){return o}));var r="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},o="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType;t.default=o},function(e,t,n){e.exports=function(){"use strict";var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function i(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){r.isMergeableObject(t[o])&&e[o]?i[o]=function(e,t){if(!t.customMerge)return a;var n=t.customMerge(e);return"function"==typeof n?n:a}(o,r)(e[o],t[o],r):i[o]=n(t[o],r)})),i}function a(t,o,a){(a=a||{}).arrayMerge=a.arrayMerge||r,a.isMergeableObject=a.isMergeableObject||e;var u=Array.isArray(o);return u===Array.isArray(t)?u?a.arrayMerge(t,o,a):i(t,o,a):n(o,a)}return a.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return a(e,n,t)}),{})},a}()},function(e,t,n){"use strict";n.r(t),function(e,r){var o,i=n(330);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(i.a)(o);t.default=a}.call(this,n(33),n(430)(e))},function(e,t,n){"use strict";var r=n(445),o=n(37),i=n(167),a=n(447),u=function(e){o(!1,e)},c=String.prototype.replace,s=String.prototype.split,l=function(e){var t=e%100,n=t%10;return 11!==t&&1===n?0:2<=n&&n<=4&&!(t>=12&&t<=14)?1:2},f={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:l,chinese:function(){return 0},croatian:l,french:function(e){return e>1?1:0},german:function(e){return 1!==e?1:0},russian:l,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3}},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 d(e,t){var n,o,i=(n=e.pluralTypeToLanguages,o={},r(n,(function(e,t){r(e,(function(e){o[e]=t}))})),o);return i[t]||i[s.call(t,/-/,1)[0]]||i.en}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var h=/%\{(.*?)\}/g;function m(e,t,n,r,o){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var u=e,l=r||h,p=o||f,m="number"==typeof t?{smart_count:t}:t;if(null!=m.smart_count&&u){var y=s.call(u,"||||");u=a(y[function(e,t,n){return e.pluralTypes[d(e,t)](n)}(p,n||"en",m.smart_count)]||y[0])}return u=c.call(u,l,(function(e,t){return i(m,t)&&null!=m[t]?m[t]:e}))}function y(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?m:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||u,this.tokenRegex=function(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if("||||"===t||"||||"===n)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(p(t)+"(.*?)"+p(n),"g")}(t.interpolation),this.pluralRules=t.pluralRules||f}y.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},y.prototype.extend=function(e,t){r(e,(function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.extend(e,r):this.phrases[r]=e}),this)},y.prototype.unset=function(e,t){"string"==typeof e?delete this.phrases[e]:r(e,(function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.unset(e,r):delete this.phrases[r]}),this)},y.prototype.clear=function(){this.phrases={}},y.prototype.replace=function(e){this.clear(),this.extend(e)},y.prototype.t=function(e,t){var n,r,o=null==t?{}:t;if("string"==typeof this.phrases[e])n=this.phrases[e];else if("string"==typeof o._)n=o._;else if(this.onMissingKey){r=(0,this.onMissingKey)(e,o,this.currentLocale,this.tokenRegex,this.pluralRules)}else this.warn('Missing translation for key: "'+e+'"'),r=e;return"string"==typeof n&&(r=m(n,o,this.currentLocale,this.tokenRegex,this.pluralRules)),r},y.prototype.has=function(e){return i(this.phrases,e)},y.transformPhrase=function(e,t,n){return m(e,t,n)},e.exports=y},function(e,t){e.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"}},function(e,t,n){var r=n(671),o=n(34);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(204),a=n.n(i),u=window.minilog||a.a,c=u("cozy-bar");o()("bar.debug")||u.suggest.deny("cozy-bar","info"),t.a=c},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=n(9),a=n.n(i),u=n(327),c=n.n(u),s=n(328),l={},f={gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"};function d(){return(d=a()(o.a.mark((function e(t){var n,r,i,a,u,c,s,d=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=d.length>1&&void 0!==d[1]?d[1]:{},!((r=!(d.length>2&&void 0!==d[2])||d[2])&&l.icons&&l.icons[i])){e.next=4;break}return e.abrupt("return",l.icons[i]);case 4:if(i=n.links&&n.links.icon){e.next=7;break}return e.abrupt("return","");case 7:return e.prev=7,e.next=10,t(i);case 10:if((u=e.sent).ok){e.next=13;break}throw new Error("Error while fetching icon ".concat(u.statusText,": ").concat(i));case 13:return e.next=15,u.blob();case 15:a=e.sent,e.next=21;break;case 18:throw e.prev=18,e.t0=e.catch(7),e.t0;case 21:if(a.type){e.next=30;break}if(n.icon){e.next=24;break}throw new Error("".concat(n.name,": Cannot detect mime type for icon ").concat(i));case 24:if(c=n.icon.split(".").pop()){e.next=27;break}throw new Error("".concat(n.name,": Unable to detect icon mime type from extension (").concat(n.icon,")"));case 27:if(f[c]){e.next=29;break}throw new Error("".concat(n.name,": 'Unexpected icon extension (").concat(n.icon,")"));case 29:a=new Blob([a],{type:f[c]});case 30:if(!a.type.match(/^image\/.*$/)){e.next=34;break}return s=URL.createObjectURL(a),r&&(l.icons=l.icons||{},l.icons[i]=s),e.abrupt("return",s);case 34:throw new Error("".concat(n.name,": icon ").concat(i," is not an image."));case 35:case"end":return e.stop()}}),e,null,[[7,18]])})))).apply(this,arguments)}var p=n(329),h=n.n(p);var m=function(e){var t=e.getApp,n=e.onCreate,r=e.onDelete,i=e.cozyClient,u=function(){var e=a()(o.a.mark((function e(r){var i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(r.slug);case 3:i=e.sent,e.next=9;break;case 6:throw e.prev=6,e.t0=e.catch(0),new Error("Cannot fetch app ".concat(r.slug,": ").concat(e.t0.message));case 9:"function"==typeof n&&n(i);case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}();try{var c=new h.a({client:i});c.subscribe("created","io.cozy.apps",u),c.subscribe("deleted","io.cozy.apps",(function(e){"function"==typeof r&&r(e)}))}catch(e){console.warn("Cannot initialize realtime in Cozy-bar: ".concat(e.message))}},y=n(4),v=n.n(y),g=n(8),b=n.n(g),w=n(10),x=n.n(w),C=n(5),k=n.n(C),S=n(35),_=n.n(S);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k()(e);if(t){var o=k()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x()(this,n)}}var O=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="Forbidden",r.status=403,r.message=e||"The application does not have permission to access this resource.",r.stack=(new Error).stack,r}return n}(_()(Error)),E=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="ServerError",r.status=500,r.message=e||"A server error occurred",r.stack=(new Error).stack,r}return n}(_()(Error)),B=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="NotFound",r.status=404,r.message=e||"The ressource was not found",r.stack=(new Error).stack,r}return n}(_()(Error)),j=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="MethodNotAllowed",r.status=405,r.message=e||"Method not allowed",r.stack=(new Error).stack,r}return n}(_()(Error)),P=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="UnavailableStack",r.message=e||"The stack is temporarily unavailable",r.stack=(new Error).stack,r}return n}(_()(Error)),T=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="UnauthorizedStack",r.status=401,r.message=e||"The app is not allowed to access to the requested resource",r.stack=(new Error).stack,r}return n}(_()(Error)),z=function(e){b()(n,e);var t=A(n);function n(e){var r;return v()(this,n),(r=t.call(this)).name="UnavailableSettings",r.message=e||"The 'Settings' application isn't available or installed in the stack",r.stack=(new Error).stack,r}return n}(_()(Error)),I=n(24);n.d(t,"a",(function(){return H}));var D,R,F,M,N={401:T,403:O,404:B,405:j,500:E},L=function(){return D.getStackClient()},U=function(){return new URL(L().uri)},$=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.headers=r.headers||{};return o.Accept="application/json","GET"!==e&&"HEAD"!==e&&void 0!==n&&(o["Content-Type"]||(o["Content-Type"]="application/json",n=JSON.stringify(n))),L().fetch(e,t,n,r).then((function(e){if("function"==typeof N[e.status])throw new N[e.status];if(!e.headers.get("content-type").includes("json"))throw new Error("Server response not in JSON");return e.json()}))},G=function(e){if(!e)throw new Error("Missing slug");return $("GET","/apps/".concat(e)).then((function(e){if(e.error)throw new Error(e.error);return e.data}))},q=Math.pow(10,12),J=function(e){return L().fetch("GET",e)},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=D?D.constructor:{},r=null!==t?t:n;if(!r.version)return!1;var o=c()(r.version,e);return o>=0};t.b={get:{app:G,apps:function(){return $("GET","/apps/").then((function(e){if(e.error)throw new Error(e.error);return e.data}))},context:(R=function(){return $("GET","/settings/context")},F={},M=void 0,a()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==M){e.next=10;break}return e.prev=1,e.next=4,R();case 4:M=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),t=e.t0,M=["NotFoundException","NotFound","FetchError"].includes(t.name)&&t.status&&404===t.status?F:void 0;case 10:return e.abrupt("return",M);case 11:case"end":return e.stop()}var t}),e,null,[[1,7]])})))),storageData:function(){return $("GET","/settings/disk-usage").then((function(e){var t=parseInt(e.data.attributes.used,10);return{usage:t,quota:parseInt(e.data.attributes.quota,10)||Math.max(q,10*t),isLimited:e.data.attributes.is_limited}})).catch((function(){throw new P}))},iconProps:function(){var e={fetchIcon:function(e){return function(e){return d.apply(this,arguments)}(J,e,!0)}},t={domain:U().host,secure:"https:"===U().protocol};return Object(I.isMobileApp)()?e:t},cozyURL:function(){return U().origin},intents:function(){return new s.Intents({client:D})},settingsAppURL:function(){return G("settings").then((function(e){if(!e)throw new z;return e.links.related}))}},updateAccessToken:function(){throw new Error("updateAccessToken should not be used with a cozy-client instance initialization")},cozyFetchJSON:function(e,t,n,r){return $(t,n,r).then((function(e){var t=Object.assign({},e.data);return t.id&&(t._id=t.id),t}))},logout:function(){return L().fetch("DELETE","/auth/login").then((function(e){if(401===e.status)throw new T;return 204===e.status&&window.location.reload(),!0})).catch((function(){throw new P}))},init:function(e){var t=e.cozyClient,n=e.onCreate,r=e.onDelete;(D=t).isLogged&&m({getApp:G,onCreate:n,onDelete:r,cozyClient:D})}}},function(e){e.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"}}}')},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],l=0;(c=new Error(t.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,n){var r;
|
|
7
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
8
|
+
* http://hammerjs.github.io/
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
11
|
+
* Licensed under the MIT license */!function(o,i,a,u){"use strict";var c,s=["","webkit","Moz","MS","ms","o"],l=i.createElement("div"),f=Math.round,d=Math.abs,p=Date.now;function h(e,t,n){return setTimeout(x(e,n),t)}function m(e,t,n){return!!Array.isArray(e)&&(y(e,n[t],n),!0)}function y(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function v(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=o.console&&(o.console.warn||o.console.log);return i&&i.call(o.console,r,n),e.apply(this,arguments)}}c="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var g=v((function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&void 0===e[r[o]])&&(e[r[o]]=t[r[o]]),o++;return e}),"extend","Use `assign`."),b=v((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function w(e,t,n){var r,o=t.prototype;(r=e.prototype=Object.create(o)).constructor=e,r._super=o,n&&c(r,n)}function x(e,t){return function(){return e.apply(t,arguments)}}function C(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function k(e,t){return void 0===e?t:e}function S(e,t,n){y(E(t),(function(t){e.addEventListener(t,n,!1)}))}function _(e,t,n){y(E(t),(function(t){e.removeEventListener(t,n,!1)}))}function A(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function O(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function B(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function j(e){return Array.prototype.slice.call(e,0)}function P(e,t,n){for(var r=[],o=[],i=0;i<e.length;){var a=t?e[i][t]:e[i];B(o,a)<0&&r.push(e[i]),o[i]=a,i++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function T(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),i=0;i<s.length;){if((r=(n=s[i])?n+o:t)in e)return r;i++}}var z=1;function I(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}var D="ontouchstart"in o,R=void 0!==T(o,"PointerEvent"),F=D&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),M=["x","y"],N=["clientX","clientY"];function L(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){C(e.options.enable,[e])&&n.handler(t)},this.init()}function U(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,i=1&t&&r-o==0,a=12&t&&r-o==0;n.isFirst=!!i,n.isFinal=!!a,i&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=$(t));o>1&&!n.firstMultiple?n.firstMultiple=$(t):1===o&&(n.firstMultiple=!1);var i=n.firstInput,a=n.firstMultiple,u=a?a.center:i.center,c=t.center=G(r);t.timeStamp=p(),t.deltaTime=t.timeStamp-i.timeStamp,t.angle=W(u,c),t.distance=H(u,c),function(e,t){var n=t.center,r=e.offsetDelta||{},o=e.prevDelta||{},i=e.prevInput||{};1!==t.eventType&&4!==i.eventType||(o=e.prevDelta={x:i.deltaX||0,y:i.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=o.x+(n.x-r.x),t.deltaY=o.y+(n.y-r.y)}(n,t),t.offsetDirection=J(t.deltaX,t.deltaY);var s=q(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=s.x,t.overallVelocityY=s.y,t.overallVelocity=d(s.x)>d(s.y)?s.x:s.y,t.scale=a?(l=a.pointers,f=r,H(f[0],f[1],N)/H(l[0],l[1],N)):1,t.rotation=a?function(e,t){return W(t[1],t[0],N)+W(e[1],e[0],N)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,o,i,a=e.lastInterval||t,u=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(u>25||void 0===a.velocity)){var c=t.deltaX-a.deltaX,s=t.deltaY-a.deltaY,l=q(u,c,s);r=l.x,o=l.y,n=d(l.x)>d(l.y)?l.x:l.y,i=J(c,s),e.lastInterval=t}else n=a.velocity,r=a.velocityX,o=a.velocityY,i=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=i}(n,t);var l,f;var h=e.element;A(t.srcEvent.target,h)&&(h=t.srcEvent.target);t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function $(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:f(e.pointers[n].clientX),clientY:f(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:G(t),deltaX:e.deltaX,deltaY:e.deltaY}}function G(e){var t=e.length;if(1===t)return{x:f(e[0].clientX),y:f(e[0].clientY)};for(var n=0,r=0,o=0;o<t;)n+=e[o].clientX,r+=e[o].clientY,o++;return{x:f(n/t),y:f(r/t)}}function q(e,t,n){return{x:t/e||0,y:n/e||0}}function J(e,t){return e===t?1:d(e)>=d(t)?e<0?2:4:t<0?8:16}function H(e,t,n){n||(n=M);var r=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return Math.sqrt(r*r+o*o)}function W(e,t,n){n||(n=M);var r=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return 180*Math.atan2(o,r)/Math.PI}L.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(I(this.element),this.evWin,this.domHandler)}};var Q={mousedown:1,mousemove:2,mouseup:4};function V(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,L.apply(this,arguments)}w(V,L,{handler:function(e){var t=Q[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var Y={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},K={2:"touch",3:"pen",4:"mouse",5:"kinect"},Z="pointerdown",X="pointermove pointerup pointercancel";function ee(){this.evEl=Z,this.evWin=X,L.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(Z="MSPointerDown",X="MSPointerMove MSPointerUp MSPointerCancel"),w(ee,L,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),o=Y[r],i=K[e.pointerType]||e.pointerType,a="touch"==i,u=B(t,e.pointerId,"pointerId");1&o&&(0===e.button||a)?u<0&&(t.push(e),u=t.length-1):12&o&&(n=!0),u<0||(t[u]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(u,1))}});var te={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ne(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,L.apply(this,arguments)}function re(e,t){var n=j(e.touches),r=j(e.changedTouches);return 12&t&&(n=P(n.concat(r),"identifier",!0)),[n,r]}w(ne,L,{handler:function(e){var t=te[e.type];if(1===t&&(this.started=!0),this.started){var n=re.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var oe={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},L.apply(this,arguments)}function ae(e,t){var n=j(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var o,i,a=j(e.changedTouches),u=[],c=this.target;if(i=n.filter((function(e){return A(e.target,c)})),1===t)for(o=0;o<i.length;)r[i[o].identifier]=!0,o++;for(o=0;o<a.length;)r[a[o].identifier]&&u.push(a[o]),12&t&&delete r[a[o].identifier],o++;return u.length?[P(i.concat(u),"identifier",!0),u]:void 0}w(ie,L,{handler:function(e){var t=oe[e.type],n=ae.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}});function ue(){L.apply(this,arguments);var e=x(this.handler,this);this.touch=new ie(this.manager,e),this.mouse=new V(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ce(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,se.call(this,t)):12&e&&se.call(this,t)}function se(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function le(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var o=this.lastTouches[r],i=Math.abs(t-o.x),a=Math.abs(n-o.y);if(i<=25&&a<=25)return!0}return!1}w(ue,L,{handler:function(e,t,n){var r="touch"==n.pointerType,o="mouse"==n.pointerType;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ce.call(this,t,n);else if(o&&le.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var fe=T(l.style,"touchAction"),de=void 0!==fe,pe=function(){if(!de)return!1;var e={},t=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||o.CSS.supports("touch-action",n)})),e}();function he(e,t){this.manager=e,this.set(t)}he.prototype={set:function(e){"compute"==e&&(e=this.compute()),de&&this.manager.element.style&&pe[e]&&(this.manager.element.style[fe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return y(this.manager.recognizers,(function(t){C(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(O(e,"none"))return"none";var t=O(e,"pan-x"),n=O(e,"pan-y");if(t&&n)return"none";if(t||n)return t?"pan-x":"pan-y";if(O(e,"manipulation"))return"manipulation";return"auto"}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,o=O(r,"none")&&!pe.none,i=O(r,"pan-y")&&!pe["pan-y"],a=O(r,"pan-x")&&!pe["pan-x"];if(o){var u=1===e.pointers.length,c=e.distance<2,s=e.deltaTime<250;if(u&&c&&s)return}if(!a||!i)return o||i&&6&n||a&&24&n?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};function me(e){this.options=c({},this.defaults,e||{}),this.id=z++,this.manager=null,this.options.enable=k(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function ye(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function ve(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function ge(e,t){var n=t.manager;return n?n.get(e):e}function be(){me.apply(this,arguments)}function we(){be.apply(this,arguments),this.pX=null,this.pY=null}function xe(){be.apply(this,arguments)}function Ce(){me.apply(this,arguments),this._timer=null,this._input=null}function ke(){be.apply(this,arguments)}function Se(){be.apply(this,arguments)}function _e(){me.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ae(e,t){return(t=t||{}).recognizers=k(t.recognizers,Ae.defaults.preset),new Oe(e,t)}me.prototype={defaults:{},set:function(e){return c(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(m(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ge(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return m(e,"dropRecognizeWith",this)||(e=ge(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(m(e,"requireFailure",this))return this;var t=this.requireFail;return-1===B(t,e=ge(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(m(e,"dropRequireFailure",this))return this;e=ge(e,this);var t=B(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+ye(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+ye(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=c({},e);if(!C(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},w(be,me,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,o=this.attrTest(e);return r&&(8&n||!o)?16|t:r||o?4&n?8|t:2&t?4|t:2:32}}),w(we,be,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push("pan-y"),24&e&&t.push("pan-x"),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,o=e.direction,i=e.deltaX,a=e.deltaY;return o&t.direction||(6&t.direction?(o=0===i?1:i<0?2:4,n=i!=this.pX,r=Math.abs(e.deltaX)):(o=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=o,n&&r>t.threshold&&o&t.direction},attrTest:function(e){return be.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ve(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),w(xe,be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),w(Ce,me,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!o)this.reset();else if(1&e.eventType)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),w(ke,be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),w(Se,be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return we.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&d(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=ve(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),w(_e,me,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&o&&n){if(4!=e.eventType)return this.failTimeout();var i=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||H(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&i?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=h((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ae.VERSION="2.0.7",Ae.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[ke,{enable:!1}],[xe,{enable:!1},["rotate"]],[Se,{direction:6}],[we,{direction:6},["swipe"]],[_e],[_e,{event:"doubletap",taps:2},["tap"]],[Ce]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Oe(e,t){var n;this.options=c({},Ae.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(R?ee:F?ie:D?ue:V))(n,U),this.touchAction=new he(this,this.options.touchAction),Ee(this,!0),y(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Ee(e,t){var n,r=e.element;r.style&&(y(e.options.cssProps,(function(o,i){n=T(r.style,i),t?(e.oldCssProps[n]=r.style[n],r.style[n]=o):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Oe.prototype={set:function(e){return c(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,o=t.curRecognizer;(!o||o&&8&o.state)&&(o=t.curRecognizer=null);for(var i=0;i<r.length;)n=r[i],2===t.stopped||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(e),!o&&14&n.state&&(o=t.curRecognizer=n),i++}},get:function(e){if(e instanceof me)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(m(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(m(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=B(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(void 0!==e&&void 0!==t){var n=this.handlers;return y(E(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(void 0!==e){var n=this.handlers;return y(E(e),(function(e){t?n[e]&&n[e].splice(B(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=i.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&Ee(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(Ae,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Oe,Input:L,TouchAction:he,TouchInput:ie,MouseInput:V,PointerEventInput:ee,TouchMouseInput:ue,SingleTouchInput:ne,Recognizer:me,AttrRecognizer:be,Tap:_e,Pan:we,Swipe:Se,Pinch:xe,Rotate:ke,Press:Ce,on:S,off:_,each:y,merge:b,extend:g,assign:c,inherit:w,bindFn:x,prefixed:T}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=Ae,void 0===(r=function(){return Ae}.call(t,n,t,e))||(e.exports=r)}(window,document)},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,"html{--white:#fff;--paleGrey:#f5f6f7;--silver:#d6d8da;--coolGrey:#95999d;--slateGrey:#5d6165;--charcoalGrey:#32363f;--black:#000;--overlay:rgba(50,54,63,.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,.cozy-ui-bar-CozyTheme--normal--1OuNS{--primaryColor:#297ef2;--primaryColorDark:#0b61d6;--primaryColorLight:#5c9df5;--primaryColorLightest:#9fc4fb;--secondaryColor:#fd7461;--secondaryColorDark:#e3503b;--secondaryColorLight:#ffdeda;--secondaryColorLightest:#fecdc6;--primaryBackgroundLight:#f5faff;--paperBackgroundColor:#fff;--defaultBackgroundColor:#f5f6f7;--primaryTextColor:#32363f;--secondaryTextColor:#95999d;--primaryContrastTextColor:#fff;--secondaryContrastTextColor:#fff;--dividerColor:rgba(29,33,42,.122);--successColor:#35ce68;--warningColor:#ff962f;--errorColor:#f52d2d;--errorColorDark:#a00808;--errorColorLight:#fcbfbf;--errorColorLightest:#fee6e6;--errorBackground:#fff2f2;--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)}@-webkit-keyframes cozy-ui-bar-spin--3DZqI{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes cozy-ui-bar-spin--3DZqI{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@-webkit-keyframes cozy-ui-bar-shake--1gzL2{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 cozy-ui-bar-shake--1gzL2{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)}}.cozy-ui-bar-c-spinner--3vDLT{display:inline-block;margin:0 .5rem}.cozy-ui-bar-c-spinner--3vDLT:before{content:''}.cozy-ui-bar-c-spinner--3vDLT p{margin-top:.938rem;line-height:1.5}.cozy-ui-bar-c-spinner--middle--1Nmj_{position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);text-align:center}.cozy-ui-bar-c-spinner--middle--1Nmj_:before{display:block;margin:0 auto}.cozy-ui-bar-c-spinner--nomargin--2GQe1{margin:0}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Spinner/node_modules/cozy-ui/stylus/settings/palette.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Spinner/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Spinner/node_modules/cozy-ui/stylus/generic/animations.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Spinner/node_modules/cozy-ui/react/Spinner/styles.styl"],names:[],mappings:"AAwCA,KAeI,aACA,mBACA,iBACA,mBACA,oBACA,uBACA,aACA,4BAWA,iBACA,qBACA,sBAWA,qBACA,kBACA,oBASA,gBAaA,kBACA,mBACA,kBACA,sBACA,eC3CJ,CD0DA,2CAYI,uBACA,2BACA,4BACA,+BAYA,yBACA,6BACA,8BACA,iCAWA,iCACA,4BACA,iCAYA,2BACA,6BACA,gCACA,kCAaA,mCAYA,uBACA,uBAEA,qBACA,yBACA,0BACA,6BACA,0BAMA,mCAEA,gCACA,0BACA,0CAEA,8DACA,gEACA,6DACA,kDAEA,gDACA,kDACA,mDACA,8DAEA,mCACA,8CACA,2CACA,4CAEA,gCAEA,yBACA,oCACA,uCAEA,oCAEA,gCACA,6BAEA,gCACA,sCACA,wCAEA,uBACA,8CAEA,yBACA,kDAEA,sBACA,2CC3EJ,CCrLA,2CACI,KACI,sBD+LN,CC9LE,GACI,wBDgMN,CACF,CCrMA,mCACI,KACI,sBD+MN,CC9ME,GACI,wBDgNN,CACF,CC/MA,4CACI,QACI,+BD+NN,CC7NE,QACI,8BD+NN,CC7NE,YACI,+BD+NN,CC7NE,QACI,8BD+NN,CACF,CC3OA,oCACI,QACI,+BD2PN,CCzPE,QACI,8BD2PN,CCzPE,YACI,+BD2PN,CCzPE,QACI,8BD2PN,CACF,CErRA,8BACI,qBACA,cFuRJ,CEnRI,qCACI,UFqRR,CEnRI,gCACI,mBACA,eFqRR,CEhRA,sCACI,kBACA,QACA,SACA,4CACA,iBFkRJ,CEhRI,6CACI,cACA,aFkRR,CEhRA,wCACI,QFkRJ,CAAA",file:"styles.styl",sourcesContent:["@require '../tools/mixins'\n\n$errorColor=#F52D2D\n$errorBackground=#FFF2F2\n\n$successColor=#35CE68\n$warningColor=#FF962F\n$infoColor=#34373F\n\n// @stylint off\n/*------------------------------------*\\\n Palette\n =====\n\\*------------------------------------*/\n/*\n Settings\n\n Weight: -10\n\n Styleguide Settings\n*/\n\n/*\n Colors\n\n Colors used in the user interface.\n\n ℹ️ In general, you are advised to use [theme colors](#kssref-settings-theme) when\n building your components: this will ensure your components react correctly when\n changing the theme.\n\n If you need to access an absolute color that is not semantic, you can use\n\n ```\n import palette from 'cozy-ui/transpiled/react/palette'\n <div style={{ backgroundColor: palette.melon }} />\n ```\n\n Styleguide Settings.colors\n*/\nhtml\n /*\n Grey\n\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\n Styleguide Settings.colors.grey\n */\n --white #FFFFFF\n --paleGrey #F5F6F7\n --silver #D6D8Da\n --coolGrey #95999D\n --slateGrey #5D6165\n --charcoalGrey #32363F\n --black #000000\n --overlay rgba(50, 54, 63, .5)\n\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 /*\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 /*\n Orange\n\n Stylus: mango - #FF962F, CSS: var(--mango)\n\n Styleguide Settings.colors.orange\n */\n --mango #FF962F\n\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\n/*\n Theme\n\n Semantic colors suitable for theming. We encourage users of cozy-ui to use semantic colors\n instead of absolute colors to facilitate theming.\n\n We try to use a naming schema that is close to what is use in [Material-UI React's theming](https://material-ui.com/customization/palette/#palette-colors).\n It is possible that we have some discrepancies. If you see something that seems out\n of the ordinary and where you think we could reduce the difference with MUI, please\n do not hesitate to [open an issue](https://github.com/cozy/cozy-ui/issues/new).\n\n Styleguide Settings.theme\n*/\nhtml, .CozyTheme--normal\n /*\n Primary\n\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColorLightest - #9FC4FB, CSS: var(--primaryColorLightest)\n Stylus: primaryContrastTextColor - #FFFFFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColor #297EF2\n --primaryColorDark #0B61D6\n --primaryColorLight #5C9DF5\n --primaryColorLightest #9FC4FB\n\n /*\n Secondary\n\n Stylus: secondaryColor - #fd7461, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #E3503B, CSS: var(--secondaryColorDark)\n Stylus: secondaryColorLight - #ffdeda, CSS: var(--secondaryColorLight)\n Stylus: secondaryColorLightest - #FECDC6, CSS: var(--secondaryColorLightest)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColor #fd7461\n --secondaryColorDark #E3503B\n --secondaryColorLight #ffdeda // lighten(dodgerBlue, 24)\n --secondaryColorLightest #FECDC6\n\n /*\n Background colors\n\n Stylus: primaryBackgroundLight - #F5FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F5F6F7, CSS: var(--defaultBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #F5FAFF\n --paperBackgroundColor: #FFF\n --defaultBackgroundColor: #F5F6F7 // paleGrey\n\n /*\n Text colors\n\n Stylus: primaryTextColor - #32363F, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #95999D, CSS: var(--secondaryTextColor)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor #32363F\n --secondaryTextColor #95999D\n --primaryContrastTextColor #FFF\n --secondaryContrastTextColor #FFF\n\n\n /*\n Components colors\n\n Be careful to use the semantic variable, not the hexa color.\n In this case the real color is `#1D212A1F`, and becomes `#E3E4E5` on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.components\n */\n --dividerColor: #1D212A1F // grey[900] with 12% opacity\n\n /*\n Intention colors\n\n Stylus: successColor - #35CE68, CSS: var(--successColor)\n Stylus: warningColor - #FF962F, CSS: var(--warningColor)\n Stylus: errorColor - #F52D2D, CSS: var(--errorColor)\n Stylus: infoColor - #34373F, CSS: var(--infoColor)\n\n Styleguide Settings.theme.intention\n */\n --successColor: $successColor\n --warningColor: $warningColor\n\n --errorColor: $errorColor\n --errorColorDark: darken($errorColor, 24)\n --errorColorLight: lighten($errorColor, 30)\n --errorColorLightest: lighten($errorColor, 38)\n --errorBackground: $errorBackground\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\n --linkColor var(--primaryColor)\n --linkTextDecoration none\n --linkColorActive var(--primaryColorDark)\n\n --invertedTabsActiveTextColor var(--primaryContrastTextColor)\n --invertedTabsInactiveTextColor var(--primaryContrastTextColor)\n --invertedTabsIndicatorColor var(--primaryContrastTextColor)\n --invertedTabsBackgroundColor var(--primaryColor)\n\n --regularButtonPrimaryColor: var(--primaryColor)\n --regularButtonSecondaryColor: var(--primaryColor)\n --regularButtonActiveColor: var(--primaryColorDark)\n --regularButtonConstrastColor: var(--primaryContrastTextColor)\n\n --secondaryButtonPrimaryColor: #FFF\n --secondaryButtonSecondaryColor: var(--silver)\n --secondaryButtonActiveColor: var(--silver)\n --secondaryButtonContrastColor: var(--black)\n\n --dividerColor2: var(--coolGrey)\n\n --iconColor: currentColor\n --textIconColor: var(--charcoalGrey)\n --actionMenuIconColor: var(--slateGrey)\n\n --neutralBackground: var(--paleGrey)\n\n --buttonTextTransform uppercase\n --buttonBorderRadius rem(2)\n\n --navTextColor var(--slateGrey)\n --navTextActiveColor var(--slateGrey)\n --navTextHoverColor var(--charcoalGrey)\n\n --alertErrorColor #fff\n --alertErrorBackgroundColor var(--errorColor)\n\n --alertSuccessColor #fff\n --alertSuccessBackgroundColor var(--successColor)\n\n --alertInfoColor #fff\n --alertInfoBackgroundColor var(--slateGrey)\n// @stylint on\n","html {\n/*\n Grey\n\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\n Styleguide Settings.colors.grey\n */\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\n\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColorLightest - #9FC4FB, CSS: var(--primaryColorLightest)\n Stylus: primaryContrastTextColor - #FFFFFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColor: #297ef2;\n --primaryColorDark: #0b61d6;\n --primaryColorLight: #5c9df5;\n --primaryColorLightest: #9fc4fb;\n/*\n Secondary\n\n Stylus: secondaryColor - #fd7461, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #E3503B, CSS: var(--secondaryColorDark)\n Stylus: secondaryColorLight - #ffdeda, CSS: var(--secondaryColorLight)\n Stylus: secondaryColorLightest - #FECDC6, CSS: var(--secondaryColorLightest)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColor: #fd7461;\n --secondaryColorDark: #e3503b;\n --secondaryColorLight: #ffdeda;\n --secondaryColorLightest: #fecdc6;\n/*\n Background colors\n\n Stylus: primaryBackgroundLight - #F5FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F5F6F7, CSS: var(--defaultBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #f5faff;\n --paperBackgroundColor: #fff;\n --defaultBackgroundColor: #f5f6f7;\n/*\n Text colors\n\n Stylus: primaryTextColor - #32363F, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #95999D, CSS: var(--secondaryTextColor)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor: #32363f;\n --secondaryTextColor: #95999d;\n --primaryContrastTextColor: #fff;\n --secondaryContrastTextColor: #fff;\n/*\n Components colors\n\n Be careful to use the semantic variable, not the hexa color.\n In this case the real color is `#1D212A1F`, and becomes `#E3E4E5` on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.components\n */\n --dividerColor: rgba(29,33,42,0.122);\n/*\n Intention colors\n\n Stylus: successColor - #35CE68, CSS: var(--successColor)\n Stylus: warningColor - #FF962F, CSS: var(--warningColor)\n Stylus: errorColor - #F52D2D, CSS: var(--errorColor)\n Stylus: infoColor - #34373F, CSS: var(--infoColor)\n\n Styleguide Settings.theme.intention\n */\n --successColor: #35ce68;\n --warningColor: #ff962f;\n --errorColor: #f52d2d;\n --errorColorDark: #a00808;\n --errorColorLight: #fcbfbf;\n --errorColorLightest: #fee6e6;\n --errorBackground: #fff2f2;\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}\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.c-spinner {\n display: inline-block;\n margin: 0 0.5rem;\n}\n.c-spinner:before {\n content: '';\n}\n.c-spinner p {\n margin-top: 0.938rem;\n line-height: 1.5;\n}\n.c-spinner--middle {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n text-align: center;\n}\n.c-spinner--middle:before {\n display: block;\n margin: 0 auto;\n}\n.c-spinner--nomargin {\n margin: 0;\n}\n","/*------------------------------------*\\\n Animations\n\\*------------------------------------*/\n/*\n Animations\n\n Available animations:\n\n spin - Animates an element by rotating it endlessly by 360 deg (used by the loading spinner)\n\n Styleguide Generic.animation\n*/\n@keyframes spin\n from\n transform rotate(0deg)\n to\n transform rotate(359deg)\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$transition-transform-ease-out\n transition transform .1s ease-out\n\n$spin-anim\n // arguments' order is important: the animation name must stay first\n // so that scoping works\n animation spin 1s linear infinite\n\n@media (prefers-reduced-motion: reduce)\n $transition-transform-ease-out\n transition none\n $spin-anim\n animation none","@require '../../stylus/settings/palette'\n@require '../../stylus/settings/icons'\n@require '../../stylus/tools/mixins'\n\n.c-spinner\n display inline-block\n margin 0 rem(8)\n\n\n\n &:before\n content ''\n\n p\n margin-top rem(15)\n line-height 1.5\n\n// === Modifiers ===\n\n// Box-model\n.c-spinner--middle\n position absolute\n top 50%\n left 50%\n transform translateX(-50%) translateY(-50%)\n text-align center\n\n &:before\n display block\n margin 0 auto\n\n.c-spinner--nomargin\n margin 0\n"],sourceRoot:""}]),t.locals={"CozyTheme--normal":"cozy-ui-bar-CozyTheme--normal--1OuNS","c-spinner":"cozy-ui-bar-c-spinner--3vDLT","c-spinner--middle":"cozy-ui-bar-c-spinner--middle--1Nmj_","c-spinner--nomargin":"cozy-ui-bar-c-spinner--nomargin--2GQe1",spin:"cozy-ui-bar-spin--3DZqI",shake:"cozy-ui-bar-shake--1gzL2"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebApp=t.isMobileApp=t.isMobile=t.isIOSApp=t.isIOS=t.isFlagshipApp=t.isAndroidApp=t.isAndroid=t.getPlatform=void 0;var r=n(103),o=function(){return(0,r.isCordova)()?window.cordova.platformId:"web"};t.getPlatform=o;var i=function(e){return o()===e};t.isIOSApp=function(){return i("ios")};t.isAndroidApp=function(){return i("android")};t.isWebApp=function(){return i("web")};t.isMobileApp=function(){return(0,r.isCordova)()};var a=function(){return window.navigator.userAgent&&window.navigator.userAgent.indexOf("Android")>=0};t.isAndroid=a;var u=function(){return window.navigator.userAgent&&/iPad|iPhone|iPod/.test(window.navigator.userAgent)};t.isIOS=u;t.isMobile=function(){return a()||u()};t.isFlagshipApp=function(){var e;return null===(e=window.cozy)||void 0===e?void 0:e.isFlagshipApp}},function(e,t,n){var r=n(64),o=n(43),i=n(26),a=n(82),u=r?r.prototype:void 0,c=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasSafariPlugin=t.hasNetworkInformationPlugin=t.hasInAppBrowserPlugin=t.hasDevicePlugin=void 0;var r=n(103);t.hasDevicePlugin=function(){return(0,r.isCordova)()&&void 0!==window.device};t.hasInAppBrowserPlugin=function(){return(0,r.isCordova)()&&void 0!==window.cordova.InAppBrowser};t.hasSafariPlugin=function(){return new Promise((function(e){(0,r.isCordova)()&&void 0!==window.SafariViewController?window.SafariViewController.isAvailable((function(t){return e(t)})):e(!1)}))};t.hasNetworkInformationPlugin=function(){return(0,r.isCordova)()&&void 0!==window.navigator.connection}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeQueryString=t.buildRedirectionURL=t.pickService=t.errorSerializer=void 0;var r,o=(r=function(e,t){var n=Object.assign(t,e);return["name","message"].reduce((function(n,r){return e[r]&&(t[r]=e[r]),n}),n)},{serialize:function(e){return r(e,{})},deserialize:function(e){return r(e,new Error(e.message))}});t.errorSerializer=o;t.pickService=function(e,t){var n=e.attributes.services||[],r=t?n.find(t):n[0];if(!r)throw new Error("Unable to find a service");return r};t.buildRedirectionURL=function(e,t){var n=Object.keys(t).filter((function(e){return n=t[e],!["object","function"].includes(typeof n);var n})).map((function(e){return"".concat(e,"=").concat(t[e])}));return n.length?"".concat(e,"?").concat(n.join("&")):e};t.removeQueryString=function(e){return e.replace(/\?[^/#]*/,"")}},function(e,t,n){var r=n(212);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){var r=n(43),o=n(53),i=n(230),a=n(163);e.exports=function(e,t){if(null==e)return{};var n=r(a(e),(function(e){return[e]}));return t=o(t),i(e,n,(function(e,n){return t(e,n[0])}))}},function(e,t,n){var r=n(54)(n(39),"Map");e.exports=r},function(e,t,n){var r=n(52),o=n(34);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(384),o=n(391),i=n(393),a=n(394),u=n(395);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,e.exports=c},function(e,t,n){var r=n(396),o=n(40);e.exports=function e(t,n,i,a,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,u))}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(219),o=n(220),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=u},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(207),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(this,n(112)(e))},function(e,t,n){var r=n(115),o=n(406),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(26),o=n(82),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(69),o=n(84),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(218),o=n(233),i=n(117);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(223)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r,o,i=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw o}}),o={}}catch(e){a=null}else a=null;var u=/^\s*class\b/,c=function(e){try{var t=i.call(e);return u.test(t)}catch(e){return!1}},s=Object.prototype.toString,l="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=a?function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{a(e,null,r)}catch(e){if(e!==o)return!1}return!c(e)}:function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(l)return function(e){try{return!c(e)&&(i.call(e),!0)}catch(e){return!1}}(e);if(c(e))return!1;var t=s.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},function(e,t,n){"use strict";var r=n(89);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";(function(t){var r=t.Symbol,o=n(448);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,n(33))},function(e,t,n){var r=n(461);e.exports=function(e){return r(e,{weekStartsOn:1})}},function(e,t,n){var r=n(248),o=n(85);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(122);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(109),o=n(173),i=n(174),a=n(110),u=n(478),c=n(155);e.exports=function(e,t,n){var s=-1,l=o,f=e.length,d=!0,p=[],h=p;if(n)d=!1,l=i;else if(f>=200){var m=t?null:u(e);if(m)return c(m);d=!1,l=a,h=new r}else h=t?[]:p;e:for(;++s<f;){var y=e[s],v=t?t(y):y;if(y=n||0!==y?y:0,d&&v==v){for(var g=h.length;g--;)if(h[g]===v)continue e;t&&h.push(v),p.push(y)}else l(h,v,n)||(h!==p&&h.push(v),p.push(y))}return p}},function(e,t,n){var r=n(249);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(170),o=n(484)(r);e.exports=o},function(e,t,n){var r=n(216);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(34),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.registryEndpoint=t.transformRegistryFormatToStackFormat=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(4)),u=r(n(6)),c=r(n(2)),s=r(n(18));n(500);var l=r(n(501)),f=n(502);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.transformRegistryFormatToStackFormat=function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:(0,s.default)(e,"latest_version.manifest.source"),attributes:(0,s.default)(e,"latest_version.manifest")},e)};t.registryEndpoint="/registry/";var p=function(e){var t=e.type,n=t===f.APP_TYPE.KONNECTOR||"node"===t?"konnectors":"apps";return"/".concat(n)},h=function(){function e(t){if((0,a.default)(this,e),!t.client)throw new Error("Need to pass a client to instantiate a Registry API.");this.client=t.client}var t,n,r;return(0,u.default)(e,[{key:"installApp",value:(r=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,u,c,s,f;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slug,i=t.terms,a={},(u=t.installed)&&(a.PermissionsAcked=u),n&&(a.Source=n),o=void 0,o=new URLSearchParams(a).toString(),c=o?"?".concat(o):"",!i){e.next=9;break}return e.next=9,l.default.save(this.client,i);case 9:return s=t.installed?"PUT":"POST",f=p(t),e.abrupt("return",this.client.stackClient.fetchJSON(s,"".concat(f,"/").concat(r).concat(c)));case 12:case"end":return e.stop()}var o}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"uninstallApp",value:(n=(0,i.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slug,r=p(t),e.abrupt("return",this.client.stackClient.fetchJSON("DELETE","".concat(r,"/").concat(n)));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"fetchApps",value:(t=(0,i.default)(o.default.mark((function e(t){var n,r,i,a,u,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.channel,r=t.type,i=t.limit,a=new URLSearchParams({limit:void 0===i?"200":i,versionsChannel:n,latestChannelVersion:n}).toString(),r&&(a+="&filter[type]=".concat(r)),e.next=6,this.client.stackClient.fetchJSON("GET","/registry?".concat(a));case 6:return u=e.sent,c=u.data,e.abrupt("return",c);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"fetchAppsInMaintenance",value:function(){return this.client.stackClient.fetchJSON("GET","/registry/maintenance")}},{key:"fetchApp",value:function(e){return this.client.stackClient.fetchJSON("GET","/registry/".concat(e))}},{key:"fetchAppVersion",value:function(e){if(!e.slug)throw new Error("Need to pass a slug to use fetchAppVersion");var t=e.slug,n=e.channel,r=e.version,o=n||r&&"latest"!==r?n:"stable",i="/registry/".concat(t,"/");return i+=o?"".concat(o,"/").concat(r||"latest"):"".concat(r),this.client.stackClient.fetchJSON("GET",i)}}]),e}();t.default=h},function(e,t,n){var r=n(52),o=n(164),i=n(40),a=Function.prototype,u=Object.prototype,c=a.toString,s=u.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(e,t,n){var r=n(171),o=n(251),i=n(253);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],u=Object.keys(a),c=0;c<u.length;++c){var s=u[c],l=a[s];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:s}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n){if(0===e.length)return e;var r=e;if("symbol"==typeof e?r=Symbol.prototype.toString.call(e):"string"!=typeof e&&(r=String(e)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<r.length;++a){var u=r.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?o+=r.charAt(a):u<128?o+=i[u]:u<2048?o+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?o+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&r.charCodeAt(a)),o+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var u=t;return o(t)&&!o(n)&&(u=a(t,i)),o(t)&&o(n)?(n.forEach((function(n,o){if(r.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,i):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return r.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),u)}}},function(e,t,n){var r=n(154);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.buildURL=t.encode=void 0;var o=r(n(19)),i=r(n(150)),a=function(e){return Object.entries(e).map((function(e){var t=(0,o.default)(e,2),n=t[0],r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)?"["+t.map((function(t){return e(t,!0)})).join(",")+"]":n?encodeURIComponent('"'.concat(t,'"')):encodeURIComponent(t)}(t[1]);return"".concat(n,"=").concat(r)})).join("&")};t.encode=a;t.buildURL=function(e,t){var n=a((0,i.default)(t));return n?"".concat(e,"?").concat(n):e}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.isDirectory=t.isFile=void 0;var i=o(n(17)),a=o(n(46)),u=o(n(7)),c=o(n(9)),s=o(n(4)),l=o(n(6)),f=o(n(11)),d=o(n(8)),p=o(n(10)),h=o(n(5)),m=o(n(2)),y=o(n(520)),v=o(n(269)),g=o(n(18)),b=o(n(76)),w=o(n(185)),x=(n(267),r(n(30))),C=n(44),k=(n(58),n(72)),S=n(270),_=r(n(183));function A(){var e=(0,a.default)(["/files/_changes"]);return A=function(){return e},e}function O(){var e=(0,a.default)(["/data/","/","/relationships/not_synchronizing"]);return O=function(){return e},e}function E(){var e=(0,a.default)(["/data/","/","/relationships/not_synchronizing"]);return E=function(){return e},e}function B(){var e=(0,a.default)(["/data/","/","/relationships/not_synchronizing"]);return B=function(){return e},e}function j(){var e=(0,a.default)(["/files/","/versions"]);return j=function(){return e},e}function P(){var e=(0,a.default)(["/files/upload/metadata"]);return P=function(){return e},e}function T(){var e=(0,a.default)(["/files/",""]);return T=function(){return e},e}function z(){var e=(0,a.default)(["/files/","?Name=","&Type=directory"]);return z=function(){return e},e}function I(){var e=(0,a.default)(["/files/metadata?Path=",""]);return I=function(){return e},e}function D(){var e=(0,a.default)(["/files/",""]);return D=function(){return e},e}function R(){var e=(0,a.default)(["/files/downloads?Path=",""]);return R=function(){return e},e}function F(){var e=(0,a.default)(["/files/downloads?VersionId=","&Filename=",""]);return F=function(){return e},e}function M(){var e=(0,a.default)(["/files/downloads?Id=","&Filename=",""]);return M=function(){return e},e}function N(){var e=(0,a.default)(["/files/","?Name=","&Type=file&Executable=",""]);return N=function(){return e},e}function L(){var e=(0,a.default)(["/files/","?Name=","&Type=file&Executable=","&MetadataID=","&Size=",""]);return L=function(){return e},e}function U(){var e=(0,a.default)(["/files/",""]);return U=function(){return e},e}function $(){var e=(0,a.default)(["/files/trash/",""]);return $=function(){return e},e}function G(){var e=(0,a.default)(["/files/",""]);return G=function(){return e},e}function q(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(){var e=(0,a.default)(["/data/","/","/relationships/references"]);return H=function(){return e},e}function W(){var e=(0,a.default)(["/data/","/","/relationships/references"]);return W=function(){return e},e}function Q(){var e=(0,a.default)(["/files/","/relationships/referenced_by"]);return Q=function(){return e},e}function V(){var e=(0,a.default)(["/files/","/relationships/referenced_by"]);return V=function(){return e},e}function Y(){var e=(0,a.default)(["/data/","/","/relationships/references"]);return Y=function(){return e},e}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,h.default)(e);if(t){var o=(0,h.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){(0,m.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ee=function(e){return X(X({},(0,x.normalizeDoc)(e,"io.cozy.files")),e.attributes)},te=function(e){return e?e.map((function(e){return{_type:e.type,_id:e.id}})):[]},ne=function(e){return e&&e.trim()},re=function(e){var t=ne(e);if("string"!=typeof t||""===t)throw new Error("Missing name argument");if("."===e||".."===e)throw new Error("Invalid filename: ".concat(e));var n=(0,S.getIllegalCharacters)(t);if(n.length)throw new Error("Invalid filename containing illegal character(s): ".concat(n));return t};t.isFile=function(e){var t=e._type,n=e.type;return"io.cozy.files"===t||"directory"===n||"file"===n};t.isDirectory=function(e){return"directory"===e.type};var oe=function(e,t){return new Promise((function(n){e.forEach((function(e){return e.then((function(e){t(e)&&n(!0)}))})),Promise.all(e).then((function(){return n(!1)}))}))},ie=function(e){(0,d.default)(Ee,e);var t,n,r,o,a,p,h,x,S,J,Z,ie,ae,ue,ce,se,le,fe,de,pe,he,me,ye,ve,ge,be,we,xe,Ce,ke,Se,_e,Ae,Oe=K(Ee);function Ee(e,t){var n;return(0,s.default)(this,Ee),n=Oe.call(this,e,t),(0,m.default)((0,f.default)(n),"extractResponseLinkRelated",(function(e){var t=e.links&&e.links.related;if(!t)throw new Error("No related link in server response");return n.stackClient.fullpath(t)})),(0,m.default)((0,f.default)(n),"forceFileDownload",(function(e,t){var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)})),n.specialDirectories={},n}return(0,l.default)(Ee,[{key:"get",value:function(e){return this.statById(e)}},{key:"fetchFindFiles",value:(Ae=(0,c.default)(u.default.mark((function e(t,n){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stackClient.fetchJSON("POST","/files/_find",this.toMangoOptions(t,n)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return Ae.apply(this,arguments)})},{key:"find",value:(_e=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c,s,l,f=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f.length>1&&void 0!==f[1]?f[1]:{},r=n.skip,o=void 0===r?0:r,e.prev=2,a="/files/_find",e.next=6,this.findWithMango(a,t,n);case 6:i=e.sent,e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",(0,k.dontThrowNotFoundError)(e.t0));case 12:return c=(0,g.default)(i,"links.next",""),s=new URL("".concat(this.stackClient.uri).concat(c)),l=s.searchParams.get("page[cursor]"),e.abrupt("return",{data:i.data.map((function(e){return ee(e)})),meta:i.meta,next:i.meta.count>o+i.data.length,skip:o,bookmark:l||void 0,execution_stats:i.meta.execution_stats});case 16:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(e){return _e.apply(this,arguments)})},{key:"findReferencedBy",value:(Se=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c,s,l,f,d=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:{},r=n.skip,o=void 0===r?0:r,i=n.limit,a=n.cursor,c={include:"files","page[limit]":i,"page[cursor]":a,sort:"datetime"},s=(0,C.uri)(Y(),t._type,t._id),l=_.buildURL(s,c),e.next=6,this.stackClient.fetchJSON("GET",l);case 6:return f=e.sent,e.abrupt("return",{data:te(f.data),included:f.included?f.included.map((function(e){return ee(e)})):[],next:(0,v.default)(f,"links.next"),meta:f.meta,skip:o});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return Se.apply(this,arguments)})},{key:"addReferencedBy",value:(ke=(0,c.default)(u.default.mark((function e(t,n){var r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return{id:e._id,type:e._type}})),e.next=3,this.stackClient.fetchJSON("POST",(0,C.uri)(V(),t._id),{data:r});case 3:return o=e.sent,e.abrupt("return",{data:te(o.data),meta:o.meta});case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return ke.apply(this,arguments)})},{key:"removeReferencedBy",value:(Ce=(0,c.default)(u.default.mark((function e(t,n){var r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return{id:e._id,type:e._type}})),e.next=3,this.stackClient.fetchJSON("DELETE",(0,C.uri)(Q(),t._id),{data:r});case 3:return o=e.sent,e.abrupt("return",{data:te(o.data),meta:o.meta});case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return Ce.apply(this,arguments)})},{key:"addReferencesTo",value:(xe=(0,c.default)(u.default.mark((function e(t,n){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return{id:e._id,type:"io.cozy.files"}})),e.abrupt("return",this.stackClient.fetchJSON("POST",(0,C.uri)(W(),t._type,t._id),{data:r}));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return xe.apply(this,arguments)})},{key:"removeReferencesTo",value:(we=(0,c.default)(u.default.mark((function e(t,n){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return{id:e._id,type:"io.cozy.files"}})),e.abrupt("return",this.stackClient.fetchJSON("DELETE",(0,C.uri)(H(),t._type,t._id),{data:r}));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return we.apply(this,arguments)})},{key:"destroy",value:(be=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c,s,l,f,d=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=d.length>1&&void 0!==d[1]?d[1]:{},r=n.ifMatch,o=void 0===r?"":r,i=t._id,!((a=t.relationships)&&a.referenced_by&&Array.isArray(a.referenced_by.data))){e.next=20;break}c=q(a.referenced_by.data),e.prev=4,c.s();case 6:if((s=c.n()).done){e.next=12;break}return l=s.value,e.next=10,this.removeReferencesTo({_id:l.id,_type:l.type},[{_id:i}]);case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),c.e(e.t0);case 17:return e.prev=17,c.f(),e.finish(17);case 20:return e.next=22,this.stackClient.fetchJSON("DELETE",(0,C.uri)(G(),i),void 0,{headers:{"If-Match":o}});case 22:return f=e.sent,e.abrupt("return",{data:ee(f.data)});case 24:case"end":return e.stop()}}),e,this,[[4,14,17,20]])}))),function(e){return be.apply(this,arguments)})},{key:"emptyTrash",value:function(){return this.stackClient.fetchJSON("DELETE","/files/trash")}},{key:"restore",value:function(e){return this.stackClient.fetchJSON("POST",(0,C.uri)($(),e))}},{key:"deleteFilePermanently",value:(ge=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("PATCH",(0,C.uri)(U(),t),{data:{type:"io.cozy.files",id:t,attributes:{permanent_delete:!0}}});case 2:return n=e.sent,e.abrupt("return",n.data);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return ge.apply(this,arguments)})},{key:"upload",value:(ve=(0,c.default)(u.default.mark((function e(t,n){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.ensureDirectoryExists(n);case 2:return r=e.sent,e.abrupt("return",this.createFile(t,{dirId:r}));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return ve.apply(this,arguments)})},{key:"create",value:(ye=(0,c.default)(u.default.mark((function e(t){var n,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("directory"!==t.type){e.next=4;break}return e.abrupt("return",this.createDirectory(t));case 4:return n=t.data,r=(0,i.default)(t,["data"]),e.abrupt("return",this.createFile(n,r));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return ye.apply(this,arguments)})},{key:"update",value:(me=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.updateAttributes(t.id,t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return me.apply(this,arguments)})},{key:"createFile",value:(he=(0,c.default)(u.default.mark((function e(t){var n,r,o,a,c,s,l,f,d,p,h,m,y,v=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=v.length>1&&void 0!==v[1]?v[1]:{},r=n.name,o=n.dirId,a=void 0===o?"":o,c=n.executable,s=n.metadata,l=(0,i.default)(n,["name","dirId","executable","metadata"]),d=c,(f=r)||"string"!=typeof t.name||(f=t.name),f=re(f),void 0===d&&(d=!1),p="",!s){e.next=13;break}return e.next=11,this.createFileMetadata(s);case 11:h=e.sent,p=h.data.id;case 13:return m="",l.contentLength&&(m=String(l.contentLength)),y=(0,C.uri)(L(),a,f,d,p,m),e.abrupt("return",this.doUpload(t,y,l));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return he.apply(this,arguments)})},{key:"updateFile",value:(pe=(0,c.default)(u.default.mark((function e(t){var n,r,o,a,c,s,l,f,d,p,h,m,y,v,g=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.length>1&&void 0!==g[1]?g[1]:{},r=n.executable,o=void 0!==r&&r,a=n.fileId,c=n.name,s=void 0===c?"":c,l=n.metadata,f=(0,i.default)(n,["executable","fileId","name","metadata"]),a&&"string"==typeof a){e.next=4;break}throw new Error("missing fileId argument");case 4:if((d=s||t.name)&&"string"==typeof d){e.next=7;break}throw new Error("missing name in data argument");case 7:if(p=re(d),m=(0,C.uri)(N(),a,p,o),!l){e.next=15;break}return e.next=12,this.createFileMetadata(l);case 12:y=e.sent,h=y.data.id,m+="&MetadataID=".concat(h);case 15:return v="",f.contentLength&&(v=String(f.contentLength),m+="&Size=".concat(v)),e.abrupt("return",this.doUpload(t,m,f,"PUT"));case 18:case"end":return e.stop()}}),e,this)}))),function(e){return pe.apply(this,arguments)})},{key:"getDownloadLinkById",value:function(e,t){return this.stackClient.fetchJSON("POST",(0,C.uri)(M(),e,t)).then(this.extractResponseLinkRelated)}},{key:"getDownloadLinkByRevision",value:function(e,t){return this.stackClient.fetchJSON("POST",(0,C.uri)(F(),e,t)).then(this.extractResponseLinkRelated)}},{key:"getDownloadLinkByPath",value:function(e){return this.stackClient.fetchJSON("POST",(0,C.uri)(R(),e)).then(this.extractResponseLinkRelated)}},{key:"download",value:(de=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:null,r=a.length>2&&void 0!==a[2]?a[2]:void 0,i=r||t.name,n){e.next=9;break}return e.next=6,this.getDownloadLinkById(t._id,i);case 6:o=e.sent,e.next=12;break;case 9:return e.next=11,this.getDownloadLinkByRevision(n,i);case 11:o=e.sent;case 12:this.forceFileDownload("".concat(o,"?Dl=1"),i);case 13:case"end":return e.stop()}}),e,this)}))),function(e){return de.apply(this,arguments)})},{key:"fetchFileContent",value:(fe=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("FileCollection.fetchFileContent() is deprecated. Use FileCollection.fetchFileContentById() instead"),e.abrupt("return",this.fetchFileContentById(t));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return fe.apply(this,arguments)})},{key:"fetchFileContentById",value:(le=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stackClient.fetch("GET","/files/download/".concat(t)));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return le.apply(this,arguments)})},{key:"getBeautifulSize",value:function(e,t){return(0,C.formatBytes)(parseInt(e.size),t)}},{key:"downloadArchive",value:(se=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"files",r=(0,C.slugify)(n),e.next=4,this.getArchiveLinkByIds(t,r);case 4:o=e.sent,i=this.stackClient.fullpath(o),this.forceFileDownload(i,r+".zip");case 7:case"end":return e.stop()}}),e,this)}))),function(e){return se.apply(this,arguments)})},{key:"getArchiveLinkByIds",value:(ce=(0,c.default)(u.default.mark((function e(t){var n,r,o=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:"files",e.next=3,this.stackClient.fetchJSON("POST","/files/archive",{data:{type:"io.cozy.archives",attributes:{name:n,ids:t}}});case 3:return r=e.sent,e.abrupt("return",r.links.related);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return ce.apply(this,arguments)})},{key:"isChildOf",value:(ue=(0,c.default)(u.default.mark((function e(t,n){var r,o,i,a,c,s,l,f,d,p=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(r="object"==typeof t?t:{_id:t})._id,i=r.dirID,a=r.path,c=("object"==typeof n?n:{_id:n})._id,o!==c&&i!==c){e.next=4;break}return e.abrupt("return",!0);case 4:if(a){e.next=10;break}return e.next=7,this.statById(o);case 7:s=e.sent,a=s.data.path,i=s.data.dirID;case 10:for(l=a,f=[a];""!=l;)h=void 0,h=(u=l).lastIndexOf("/"),""!=(d=u.substring(0,h))&&f.push(d),l=d;return f.reverse(),e.abrupt("return",oe(f.map((function(e){return p.statByPath(e)})),(function(e){return e.data._id==c})));case 15:case"end":return e.stop()}var u,h}),e,this)}))),function(e,t){return ue.apply(this,arguments)})},{key:"statById",value:(ae=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},r=(0,w.default)(n,["page[limit]","page[skip]","page[cursor]"]),o=(0,C.uri)(D(),t),i=_.buildURL(o,r),e.next=6,this.stackClient.fetchJSON("GET",i);case 6:return a=e.sent,e.abrupt("return",{data:ee(a.data),included:a.included&&a.included.map((function(e){return ee(e)})),links:a.links});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return ae.apply(this,arguments)})},{key:"statByPath",value:(ie=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET",(0,C.uri)(I(),t));case 2:return n=e.sent,e.abrupt("return",{data:ee(n.data),included:n.included&&n.included.map((function(e){return ee(e)}))});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return ie.apply(this,arguments)})},{key:"createDirectory",value:(Z=(0,c.default)(u.default.mark((function e(){var t,n,r,o,i,a,c,s=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},n=t.name,r=t.dirId,o=t.lastModifiedDate,i=re(n),a=o&&("string"==typeof o?new Date(o):o),e.next=6,this.stackClient.fetchJSON("POST",(0,C.uri)(z(),r,i),void 0,{headers:{Date:a?a.toGMTString():""}});case 6:return c=e.sent,e.abrupt("return",{data:ee(c.data)});case 8:case"end":return e.stop()}}),e,this)}))),function(){return Z.apply(this,arguments)})},{key:"ensureDirectoryExists",value:(J=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.specialDirectories[t]){e.next=5;break}return e.next=3,this.createDirectoryByPath(t);case 3:n=e.sent,this.specialDirectories[t]=n.data._id;case 5:return e.abrupt("return",this.specialDirectories[t]);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return J.apply(this,arguments)})},{key:"getDirectoryOrCreate",value:(S=(0,c.default)(u.default.mark((function e(t,n){var r,o,i,a,c;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||n.attributes){e.next=2;break}throw new Error("Malformed parent directory");case 2:return r=ne(t),o="".concat("io.cozy.files.root-dir"===n._id?"":n.attributes.path,"/").concat(r),e.prev=4,e.next=7,this.statByPath(o||"/");case 7:return i=e.sent,e.abrupt("return",i);case 11:if(e.prev=11,e.t0=e.catch(4),a=JSON.parse(e.t0.message),!(c=a.errors)||!c.length||"404"!==c[0].status){e.next=17;break}return e.abrupt("return",this.createDirectory({name:r,dirId:n&&n._id}));case 17:throw c;case 18:case"end":return e.stop()}}),e,this,[[4,11]])}))),function(e,t){return S.apply(this,arguments)})},{key:"createDirectoryByPath",value:(x=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").filter((function(e){return""!==e})),e.next=3,this.statById("io.cozy.files.root-dir");case 3:if(r=e.sent,n.length){e.next=6;break}return e.abrupt("return",r);case 6:o=r,i=q(n),e.prev=8,i.s();case 10:if((a=i.n()).done){e.next=17;break}return c=a.value,e.next=14,this.getDirectoryOrCreate(c,o.data);case 14:o=e.sent;case 15:e.next=10;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),i.e(e.t0);case 22:return e.prev=22,i.f(),e.finish(22);case 25:return e.abrupt("return",o);case 26:case"end":return e.stop()}}),e,this,[[8,19,22,25]])}))),function(e){return x.apply(this,arguments)})},{key:"updateAttributes",value:(h=(0,c.default)(u.default.mark((function e(t,n){var r,o;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=X({},n),n.name&&(r.name=re(n.name)),e.next=4,this.stackClient.fetchJSON("PATCH",(0,C.uri)(T(),t),{data:{type:"io.cozy.files",id:t,attributes:r}});case 4:return o=e.sent,e.abrupt("return",{data:ee(o.data)});case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"updateFileMetadata",value:(p=(0,c.default)(u.default.mark((function e(t,n){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("CozyClient FileCollection updateFileMetadata method is deprecated. Use updateAttributes instead"),e.abrupt("return",this.updateAttributes(t,n));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"createFileMetadata",value:(a=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("POST",(0,C.uri)(P()),{data:{type:"io.cozy.files.metadata",attributes:t}});case 2:return n=e.sent,e.abrupt("return",{data:n.data});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"updateMetadataAttribute",value:(o=(0,c.default)(u.default.mark((function e(t,n){var r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("POST",(0,C.uri)(j(),t),{data:{type:"io.cozy.files.metadata",attributes:n}});case 2:return r=e.sent,e.abrupt("return",{data:r.data});case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getFileTypeFromName",value:function(e){return y.default.getType(e)||"application/octet-stream"}},{key:"doUpload",value:(r=(0,c.default)(u.default.mark((function e(t,n,r){var o,i,a,c,s,l,f,d,p,h,m,y,v,g,b,w,x,C,k=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=k.length>3&&void 0!==k[3]?k[3]:"POST",i=t){e.next=4;break}throw new Error("missing data argument");case 4:if(i.buffer&&i.buffer instanceof ArrayBuffer&&(i=i.buffer),a="undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer,c="undefined"!=typeof File&&i instanceof File,s="undefined"!=typeof Blob&&i instanceof Blob,l=!0===i.readable&&"function"==typeof i.pipe,f="string"==typeof i,a||c||s||l||f){e.next=12;break}throw new Error("invalid data type");case 12:return p=(d=r||{}).contentType,h=d.contentLength,m=d.checksum,y=d.lastModifiedDate,v=d.ifMatch,p||("string"==typeof i?p="text/plain":i.type?p=i.type:(g=n.split("?"),b=g.length>1?g[1]:"",w=new URLSearchParams(b).get("Name"),p=this.getFileTypeFromName(w.toLowerCase()))),(y=y||i.lastModified)&&(y=new Date(y)),x={"Content-Type":p},h&&(x["Content-Length"]=String(h)),m&&(x["Content-MD5"]=m),y&&(x.Date=y.toGMTString()),v&&(x["If-Match"]=v),e.next=23,this.stackClient.fetchJSON(o,n,i,{headers:x,onUploadProgress:r.onUploadProgress});case 23:return C=e.sent,e.abrupt("return",{data:ee(C.data)});case 25:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"findNotSynchronizedDirectories",value:(n=(0,c.default)(u.default.mark((function e(t){var n,r,o,i,a,c,s,l,f,d,p=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=p.length>1&&void 0!==p[1]?p[1]:{},r=n.skip,o=void 0===r?0:r,i=n.limit,a=n.cursor,c=n.includeFiles,s={include:void 0!==c&&c?"files":void 0,"page[limit]":i,"page[cursor]":a,sort:"id"},l=(0,C.uri)(B(),t._type,t._id),f=_.buildURL(l,s),e.next=6,this.stackClient.fetchJSON("GET",f);case 6:return d=e.sent,e.abrupt("return",{data:d.data.map((function(e){return ee(e)})),included:d.included?d.included.map((function(e){return ee(e)})):[],next:(0,v.default)(d,"links.next"),meta:d.meta,skip:o});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"addNotSynchronizedDirectories",value:function(e,t){var n=t.map((function(e){return{id:e._id,type:e._type}}));return this.stackClient.fetchJSON("POST",(0,C.uri)(E(),e._type,e._id),{data:n})}},{key:"removeNotSynchronizedDirectories",value:function(e,t){var n=t.map((function(e){return{id:e._id,type:e._type}}));return this.stackClient.fetchJSON("DELETE",(0,C.uri)(O(),e._type,e._id),{data:n})}},{key:"fetchChanges",value:(t=(0,c.default)(u.default.mark((function e(){var t,n,r,o,i,a,c,s,l,f,d=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{},n=d.length>1&&void 0!==d[1]?d[1]:{},r={},"object"!=typeof t?(r.since=t,console.warn('fetchChanges use couchOptions as Object not a string, since is deprecated, please use fetchChanges({since: "'.concat(t,'"}).'))):Object.keys(t).length>0&&Object.assign(r,t),Object.keys(n).length>0&&(Object.assign(r,n),(n.skipTrashed||n.includeFilePath)&&(r.includeDocs=!0)),o=X(X({},(0,b.default)(r,["fields","includeDocs","includeFilePath","skipDeleted","skipTrashed"])),{},{fields:r.fields?r.fields.join(","):null,include_docs:r.includeDocs,include_file_path:r.includeFilePath,skip_deleted:r.skipDeleted,skip_trashed:r.skipTrashed}),i=(0,C.uri)(A()),a=_.buildURL(i,o),e.next=10,this.stackClient.fetchJSON("GET",a);case 10:return c=e.sent,s=c.last_seq,l=c.pending,f=c.results,e.abrupt("return",{newLastSeq:s,pending:l,results:f});case 15:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),Ee}(x.default);t.default=ie},function(e,t,n){var r=n(524),o=n(180)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.chain=t.default=void 0;var o=r(n(31)),i=r(n(4)),a=r(n(6)),u=function(){function e(t){(0,i.default)(this,e),"function"==typeof t&&(this.request=t)}return(0,a.default)(e,[{key:"request",value:function(e,t,n){throw new Error("request is not implemented")}}]),e}();t.default=u;var c=function(e){return"function"==typeof e?new u(e):e},s=function(e,t){if(t)return t;if(e.execute)return e.execute();throw new Error("No link could handle operation ".concat(JSON.stringify(e)))};t.chain=function(e){return[].concat((0,o.default)(e),[s]).map(c).reduce(l)};var l=function(e,t){return new u((function(n,r,o){return e.request(n,r,(function(e,n){return t.request(e,n,o)}))}))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(204)),i=(0,o.default)("cozy-client");o.default.suggest.deny("cozy-client","info");var a=i;t.default=a},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.QueryIDGenerator=t.getQueryFromSlice=t.receiveQueryError=t.receiveQueryResult=t.loadQuery=t.initQuery=t.default=t.makeSorterFromDefinition=t.mergeSelectorAndPartialIndex=t.convert$gtNullSelectors=t.isReceivingData=t.isQueryAction=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(19)),u=r(n(2)),c=r(n(31)),s=r(n(75)),l=r(n(282)),f=r(n(550)),d=r(n(283)),p=r(n(552)),h=r(n(179)),m=r(n(125)),y=r(n(553)),v=r(n(26)),g=r(n(189)),b=r(n(18)),w=r(n(558)),x=r(n(559)),C=n(278),k=n(190),S=n(287),_=n(21);n(22);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E="INIT_QUERY",B="LOAD_QUERY",j="RECEIVE_QUERY_RESULT",P="RECEIVE_QUERY_ERROR",T=(0,x.default)("debug"),z=function(e){return-1!==[E,B,j,P].indexOf(e.type)};t.isQueryAction=z;t.isReceivingData=function(e){return e.type===j};var I={id:null,definition:null,fetchStatus:"pending",lastFetch:null,lastUpdate:null,lastErrorUpdate:null,lastError:null,hasMore:!1,count:0,data:[],bookmark:null},D=function(e,t,n){var r=(0,m.default)([].concat((0,c.default)(e.data),(0,c.default)(t.data.map(S.properId))));if(e.definition.sort){var o=U(e.definition),i=n[e.definition.doctype],a=i?r.map((function(e){return i[e]})).filter(Boolean):[];r=o(a).map(S.properId)}return r},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;switch(t.type){case E:return e.lastUpdate&&e.id===t.queryId&&e.definition===t.queryDefinition?e:O(O({},e),{},{id:t.queryId,definition:t.queryDefinition,options:t.options,fetchStatus:e.lastUpdate?e.fetchStatus:"pending"});case B:return"loading"===e.fetchStatus?e:O(O({},e),{},{fetchStatus:"loading"});case j:var r=t.response;if(!r.data)return e;var o=O({fetchStatus:"loaded",lastFetch:Date.now(),lastUpdate:Date.now()},T&&{execution_stats:r.execution_stats});return Array.isArray(r.data)?O(O(O({},e),o),{},{bookmark:r.bookmark||null,hasMore:void 0!==r.next?r.next:e.hasMore,count:r.meta&&r.meta.count?r.meta.count:r.data.length,data:D(e,r,n)}):O(O(O({},e),o),{},{hasMore:!1,count:1,data:[(0,S.properId)(r.data)]});case P:return O(O({},e),{},{id:t.queryId,fetchStatus:"failed",lastError:t.error,lastErrorUpdate:Date.now()});default:return e}},F=function e(t){for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=(0,a.default)(o[r],2),u=i[0],c=i[1],s=(0,h.default)(c)?e(c):c;n["$gt"===u&&null===s?"$gtnull":u]=s}return n};t.convert$gtNullSelectors=F;var M=function(e){return O(O({},e.selector),(0,b.default)(e,"partialFilter"))};t.mergeSelectorAndPartialIndex=M;var N=function(e){var t=e.definition.doctype,n=function(e){if(e.selector){var t=M(e);return w.default.use({$gtnull:function(e,t){return!!t}}),(0,w.default)(F(t))}if(e.id){var n={_id:e.id};return(0,w.default)(n)}if(e.ids){var r={_id:{$in:e.ids}};return(0,w.default)(r)}return null}(e.definition);return function(e){return e._type===t&&(!e._deleted&&(!n||!!n(e)))}},L=function(e){return function(t){var n=(0,b.default)(t,e);return(0,g.default)(n)?n.toLowerCase():n}},U=function(e){var t=e.sort;if(t){if((0,v.default)(e.sort)){var n=t.map((function(e){return Object.entries(e)[0]})),r=n.map((function(e){return e[0]})).map(L),o=n.map((function(e){return e[1]}));return function(e){return(0,y.default)(e,r,o)}}return console.warn("Correct update of queries with a sort that is not an array is not supported. Use an array as argument of QueryDefinition::sort"),function(e){return e}}return function(e){return e}};t.makeSorterFromDefinition=U;var $=function(e,t){return function(n){var r=(0,b.default)(e,"response.data")||(0,b.default)(e,"definition.document");return r?(Array.isArray(r)||(r=[r]),r.length?n.definition.doctype!==r[0]._type?n:function(e,t,n){var r=N(e),o=(0,s.default)((0,l.default)(t,r),(function(e){return e.map(S.properId)})),i=o.true,a=void 0===i?[]:i,u=o.false,c=void 0===u?[]:u,h=e.data,m=e.options&&e.options.autoUpdate,y=!m||!1!==m.remove,v=!m||!1!==m.add,g=!m||!1!==m.update,b=y?(0,d.default)(h,c):[],w=v?(0,f.default)(a,h):[],x=g?(0,d.default)(h,a):[],C=b.length||w.length||x.length,k=(0,f.default)((0,p.default)(h,w),b);if(e.definition.sort&&n){var _=U(e.definition),A=n[e.definition.doctype],E=k.map((function(e){return A[e]}));k=_(E).map(S.properId)}return O(O({},e),{},{data:k,count:k.length,lastUpdate:C?Date.now():e.lastUpdate})}(n,r,t):n):n}},G=function(e,t){return function(n){var r=e.updateQueries,o=e.response,i=r[n.id];if(!i)return n;var a=n.definition.doctype,u=n.data,c=i(J(t,a,u),o).map(S.properId);return O(O({},n),{},{data:c,count:c.length,lastUpdate:Date.now()})}},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.type==E){var o=R(e[t.queryId],t,n);return o===e[t.queryId]?e:O(O({},e),{},(0,u.default)({},t.queryId,o))}if(z(t)){var i=$(t,n);return(0,s.default)(e,(function(e){return e.id==t.queryId?R(e,t,n):r?i(e):e}))}if((0,k.isReceivingMutationResult)(t)){var a=t.updateQueries?G(t,n):$(t,n);return(0,s.default)(e,a)}return e};t.default=q;t.initQuery=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t.doctype)throw new Error("Cannot init query with no doctype");return{type:E,queryId:e,queryDefinition:t,options:n}};t.loadQuery=function(e){return{type:B,queryId:e}};t.receiveQueryResult=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return O({type:j,queryId:e,response:t},n)};t.receiveQueryError=function(e,t){return{type:P,queryId:e,error:t}};var J=function(e,t,n){return n.map((function(n){return(0,C.getDocumentFromSlice)(e,t,n)}))};t.getQueryFromSlice=function(e,t,n){if(!e||!e[t])return O(O({},I),{},{id:t,data:null});var r=e[t];return n?O(O({},r),{},{data:J(n,r.definition.doctype,r.data)}):r};var H=function(){function e(){(0,o.default)(this,e),this.idCounter=1}return(0,i.default)(e,[{key:"generateRandomId",value:function(){var e=this.idCounter;return this.idCounter++,e.toString()}},{key:"generateId",value:function(e){if((0,_.isAGetByIdQuery)(e)){var t=e.id,n=e.doctype;return"".concat(n,"/").concat(t)}return this.generateRandomId()}}]),e}();t.QueryIDGenerator=H,H.UNNAMED="unnamed"},function(e,t,n){var r=n(52),o=n(26),i=n(40);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.receiveMutationError=t.receiveMutationResult=t.initMutation=t.isReceivingMutationResult=t.isMutationAction=void 0;var o=r(n(2));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u="INIT_MUTATION",c="RECEIVE_MUTATION_RESULT",s="RECEIVE_MUTATION_ERROR";t.isMutationAction=function(e){return-1!==[u,c,s].indexOf(e.type)};t.isReceivingMutationResult=function(e){return e.type===c};t.initMutation=function(e,t){return{type:u,mutationId:e,definition:t}};t.receiveMutationResult=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(a({type:c,mutationId:e,response:t},n),{},{definition:r})};t.receiveMutationError=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{type:s,mutationId:e,error:t,definition:n}}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getReferencedById=t.getReferencedBy=t.isReferencedById=t.isReferencedBy=t.create=t.resolveClass=t.attachRelationships=t.responseToRelationship=t.pickTypeAndId=void 0;var o=r(n(2)),i=r(n(185)),a=r(n(150)),u=r(n(61)),c=r(n(291)),s=r(n(292)),l=r(n(98)),f=r(n(293)),d=r(n(277));n(22);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(e){return(0,i.default)(e,"_type","_id")};t.pickTypeAndId=m;t.responseToRelationship=function(e){return(0,a.default)({data:(t=m,n=e.data,Array.isArray(n)?n.map(t):t(n)),meta:e.meta,next:e.next,skip:e.skip,bookmark:e.bookmark});var t,n};var y=function(e,t){return h(h({},e),{},{relationships:h(h({},e.relationships),t)})};t.attachRelationships=function(e,t){if(Array.isArray(e.data))return h(h({},e),{},{data:e.data.map((function(e){return y(e,t[e._id])}))});var n=e.data;return h(h({},e),{},{data:y(n,t[n._id])})};var v={"io.cozy.files:has-many":d.default,"has-many":l.default,"belongs-to-in-place":s.default,"has-one":c.default,"has-one-in-place":s.default,"has-many-in-place":f.default};t.resolveClass=function(e,t){if(void 0===t)throw new Error("Undefined type for "+e);if("string"!=typeof t)return t;var n="".concat(e,":").concat(t),r=v[n]||v[t];if(r)return r;throw new Error("Unknown association '".concat(t,"'"))};t.create=function(e,t,n){var r=t.name,o=t.type,i=t.doctype;if(e[r]instanceof u.default)throw new Error("Association ".concat(r," already exists"));return new o(e,r,i,n)};t.isReferencedBy=function(e,t){var n,r;return((null==e||null===(n=e.relationships)||void 0===n||null===(r=n.referenced_by)||void 0===r?void 0:r.data)||(null==e?void 0:e.referenced_by)||[]).some((function(e){return e.type===t}))};t.isReferencedById=function(e,t,n){var r,o;return((null==e||null===(r=e.relationships)||void 0===r||null===(o=r.referenced_by)||void 0===o?void 0:o.data)||(null==e?void 0:e.referenced_by)||[]).some((function(e){return e.type===t&&e.id===n}))};t.getReferencedBy=function(e,t){var n,r;return((null==e||null===(n=e.relationships)||void 0===n||null===(r=n.referenced_by)||void 0===r?void 0:r.data)||(null==e?void 0:e.referenced_by)||[]).filter((function(e){return e.type===t}))};t.getReferencedById=function(e,t,n){var r,o;return((null==e||null===(r=e.relationships)||void 0===r||null===(o=r.referenced_by)||void 0===o?void 0:o.data)||(null==e?void 0:e.referenced_by)||[]).filter((function(e){return e.type===t&&e.id===n}))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.rootCozyUrl=t.InvalidCozyUrlError=t.InvalidProtocolError=t.generateWebLink=t.dehydrate=void 0;var o=r(n(31)),i=r(n(246)),a=r(n(7)),u=r(n(9)),c=r(n(4)),s=r(n(8)),l=r(n(10)),f=r(n(5)),d=r(n(35)),p=r(n(19)),h=n(126);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.dehydrate=function(e){return Object.entries(e).reduce((function(e,t){var n=(0,p.default)(t,2),r=n[0],o=n[1],i=e;if(o instanceof h.Association){if(!o.dehydrate)throw new Error("Association on key ".concat(r," should have a dehydrate method"));i=o.dehydrate(i)}else i[r]=o;return i}),{})};t.generateWebLink=function(e){var t,n=e.cozyUrl,r=e.searchParams,o=e.pathname,i=e.hash,a=e.slug,u=e.subDomainType,c=r||[],s=new URL(n);s.host="nested"===u?"".concat(a,".").concat(s.host):s.host.split(".").map((function(e,t){return 0===t?e+"-"+a:e})).join("."),s.pathname=o,s.hash=(t=i)?t.startsWith("/")?t:"/"+t:"/";var l,f=y(c);try{for(f.s();!(l=f.n()).done;){var d=(0,p.default)(l.value,2),h=d[0],m=d[1];s.searchParams.set(h,m)}}catch(e){f.e(e)}finally{f.f()}return s.toString()};var g=function(e){(0,s.default)(n,e);var t=m(n);function n(e){var r;return(0,c.default)(this,n),(r=t.call(this,"Invalid URL protocol ".concat(e.protocol))).url=e,r}return n}((0,d.default)(Error));t.InvalidProtocolError=g;var b=function(e){(0,s.default)(n,e);var t=m(n);function n(e){var r;return(0,c.default)(this,n),(r=t.call(this,"URL ".concat(e.toString()," does not seem to be a valid Cozy URL"))).url=e,r}return n}((0,d.default)(Error));t.InvalidCozyUrlError=b;var w=function(e){var t=e.protocol,n=e.hostname,r=e.port;return(""!==t?"".concat(t,"//"):"https://")+n+(""!==r?":".concat(r):"")},x=function(e){return w(e)+"/.well-known/change-password"},C=function(){var e=(0,u.default)(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(x(t));case 2:if(n=e.sent,404!==(r=n.status)){e.next=6;break}throw new b(t);case 6:return e.abrupt("return",200===r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){var e=(0,u.default)(a.default.mark((function e(t){var n,r,u,c,s,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(["http:","https:"].includes(t.protocol)){e.next=2;break}throw new g(t);case 2:return e.next=4,C(t);case 4:if(!e.sent){e.next=6;break}return e.abrupt("return",t);case 6:if(!/^[^.-][^.]+-[^.-]+\./.test(t.hostname)){e.next=13;break}return n=t.hostname.split("."),r=(0,i.default)(n),u=r[0],c=r.slice(1),s=[u.replace(/-.+/,"")].concat((0,o.default)(c)).join("."),e.next=11,C({protocol:t.protocol,hostname:s,port:t.port});case 11:if(!e.sent){e.next=13;break}return e.abrupt("return",new URL(w({protocol:t.protocol,hostname:s,port:t.port})));case 13:return l=t.hostname.split(".").splice(1).join("."),e.next=16,C({protocol:t.protocol,hostname:l,port:t.port});case 16:if(!e.sent){e.next=18;break}return e.abrupt("return",new URL(w({protocol:t.protocol,hostname:l,port:t.port})));case 18:throw new b(t);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.rootCozyUrl=k},function(e,t,n){var r=n(177),o=n(194);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(177),o=n(194);function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.clientContext=void 0;var o=n(0),i=(r(n(41)),(0,o.createContext)({client:null,store:null}));t.clientContext=i;var a=i;t.default=a},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getQualification=t.setQualification=t.Qualification=void 0;var i=o(n(2)),a=o(n(4)),u=o(n(6)),c=n(605),s=r(n(606));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.default)(this,e);var r=s.qualifications.find((function(e){return e.label===t}));if(!r)throw new Error("No qualification found for the label ".concat(t));this.label=r.label,this.purpose=n.purpose||r.purpose,this.sourceCategory=n.sourceCategory||r.sourceCategory,this.sourceSubCategory=n.sourceSubCategory||r.sourceSubCategory,this.subjects=n.subjects||r.subjects}return(0,u.default)(e,[{key:"checkAttributes",value:function(e){if(this.purpose!==e.purpose){if(this.purpose)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");s.purposeKnownValues.includes(e.purpose)||console.info("This purpose is not listed among the known values: ".concat(e.purpose,". ")+"Please open an issue on https://github.com/cozy/cozy-client/issues")}if(this.sourceCategory!==e.sourceCategory){if(this.sourceCategory)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");s.sourceCategoryKnownValues.includes(e.sourceCategory)||console.info("This sourceCategory is not listed among the known values: ".concat(e.sourceCategory,". ")+"Please open an issue on https://github.com/cozy/cozy-client/issues")}if(this.sourceSubCategory!==e.sourceSubCategory){if(this.sourceSubCategory)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");s.sourceSubCategoryKnownValues.includes(e.sourceSubCategory)||console.info("This sourceSubCategory is not listed among the known values: ".concat(e.sourceSubCategory,". ")+"Please open an issue on https://github.com/cozy/cozy-client/issues")}if((0,c.difference)(this.subjects,e.subjects).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 t=(0,c.difference)(e.subjects,this.subjects);if(t.length>0){var n=(0,c.difference)(t,s.subjectsKnownValues);n.length>0&&console.info("These subjects are not listed among the known values: ".concat(n,". ")+"Please open an issue on https://github.com/cozy/cozy-client/issues")}}},{key:"setPurpose",value:function(t){return new e(this.label,f(f({},this.toQualification()),{},{purpose:t}))}},{key:"setSourceCategory",value:function(t){return new e(this.label,f(f({},this.toQualification()),{},{sourceCategory:t}))}},{key:"setSourceSubCategory",value:function(t){return new e(this.label,f(f({},this.toQualification()),{},{sourceSubCategory:t}))}},{key:"setSubjects",value:function(t){return new e(this.label,f(f({},this.toQualification()),{},{subjects:t}))}},{key:"toQualification",value:function(){return{label:this.label,purpose:this.purpose,sourceCategory:this.sourceCategory,sourceSubCategory:this.sourceSubCategory,subjects:this.subjects}}}]),e}();t.Qualification=d,d.getByLabel=function(e){return new d(e)};t.setQualification=function(e,t){if(!t.label)throw new Error("You must set a label to qualify");return new d(t.label).checkAttributes(t),(0,c.set)(e,"metadata.qualification",t)};t.getQualification=function(e){var t=(0,c.get)(e,"metadata.qualification");return new d(t.label,t.qualification).toQualification()}},function(e,t,n){"use strict";var r=n(623);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var a={},u=void 0,c=void 0;for(u=0,c=n.length;u<c;u++)a[n[u]]=!0;for(u=0,c=o.length;u<c;u++){var s=o[u],l=e[s],f=t[s];if(l!==f){if(!a[s]||null===l||null===f||"object"!==(void 0===l?"undefined":r(l))||"object"!==(void 0===f?"undefined":r(f)))return!0;var d=Object.keys(l),p=Object.keys(f);if(d.length!==p.length)return!0;for(var h=0,m=d.length;h<m;h++){var y=d[h];if(l[y]!==f[y])return!0}}}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var o=n.indent,u=void 0===o?0:o,c=t.fallbacks;if(u++,c)if(Array.isArray(c))for(var s=0;s<c.length;s++){var l=c[s];for(var f in l){var d=l[f];null!=d&&(r+="\n"+a(f+": "+(0,i.default)(d)+";",u))}}else for(var p in c){var h=c[p];null!=h&&(r+="\n"+a(p+": "+(0,i.default)(h)+";",u))}for(var m in t){var y=t[m];null!=y&&"fallbacks"!==m&&(r+="\n"+a(m+": "+(0,i.default)(y)+";",u))}return r||n.allowEmpty?(u--,r=a(e+" {"+r+"\n",u)+a("}",u)):r};var r,o=n(130),i=(r=o)&&r.__esModule?r:{default:r};function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(322),i=(r=o)&&r.__esModule?r:{default:r};t.default=new i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(132);var i="",a="";if(((r=o)&&r.__esModule?r:{default:r}).default){var u={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},c=document.createElement("p").style;for(var s in u)if(s+"Transform"in c){i=s,a=u[s];break}}t.default={js:i,css:a}},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}n.r(t);var o=r();o.withExtraArgument=r,t.default=o},function(e,t,n){var r=n(542),o=r.enable,i=r.disable,a="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),u=n(544);if(r.defaultBackend=a?u.minilog:u,"undefined"!=typeof window){try{r.enable(JSON.parse(window.localStorage.minilogSettings))}catch(e){}if(window.location&&window.location.search){var c=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);c&&r.enable(decodeURIComponent(c[1]))}}r.enable=function(){o.call(r,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(e){}return this},r.disable=function(){i.call(r);try{delete window.localStorage.minilogSettings}catch(e){}return this},(e.exports=r).backends={array:n(547),browser:r.defaultBackend,localStorage:n(548),jQuery:n(549)}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return s})),n.d(t,"applyMiddleware",(function(){return y})),n.d(t,"bindActionCreators",(function(){return h})),n.d(t,"combineReducers",(function(){return d})),n.d(t,"compose",(function(){return m})),n.d(t,"createStore",(function(){return f}));var u="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function l(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function f(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(a(1));return n(f)(e,t)}if("function"!=typeof e)throw new Error(a(2));var o=e,i=t,c=[],d=c,p=!1;function h(){d===c&&(d=c.slice())}function m(){if(p)throw new Error(a(3));return i}function y(e){if("function"!=typeof e)throw new Error(a(4));if(p)throw new Error(a(5));var t=!0;return h(),d.push(e),function(){if(t){if(p)throw new Error(a(6));t=!1,h();var n=d.indexOf(e);d.splice(n,1),c=null}}}function v(e){if(!l(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(p)throw new Error(a(9));try{p=!0,i=o(i,e)}finally{p=!1}for(var t=c=d,n=0;n<t.length;n++){(0,t[n])()}return e}function g(e){if("function"!=typeof e)throw new Error(a(10));o=e,v({type:s.REPLACE})}function b(){var e,t=y;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(m())}return n(),{unsubscribe:t(n)}}})[u]=function(){return this},e}return v({type:s.INIT}),(r={dispatch:v,subscribe:y,getState:m,replaceReducer:g})[u]=b,r}function d(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"==typeof e[o]&&(n[o]=e[o])}var i,u=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:s.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},c=0;c<u.length;c++){var s=u[c],l=n[s],f=e[s],d=l(f,t);if(void 0===d){t&&t.type;throw new Error(a(14))}o[s]=d,r=r||d!==f}return(r=r||u.length!==Object.keys(e).length)?o:e}}function p(e,t){return function(){return t(e.apply(this,arguments))}}function h(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(a(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=p(o,t))}return n}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(a(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},u=t.map((function(e){return e(o)}));return r=m.apply(void 0,u)(n.dispatch),i(i({},n),{},{dispatch:r})}}}},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,".cozy-ui-bar-icon--spin--3IvCw{-webkit-animation:cozy-ui-bar-spin--3r0RK 1s linear infinite;animation:cozy-ui-bar-spin--3r0RK 1s linear infinite}@-webkit-keyframes cozy-ui-bar-spin--3r0RK{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes cozy-ui-bar-spin--3r0RK{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@-webkit-keyframes cozy-ui-bar-shake--1Tqb8{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 cozy-ui-bar-shake--1Tqb8{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)}}.cozy-ui-bar-icon--3NURx{fill:var(--iconColor);transform:translateZ(0)}.cozy-ui-bar-icon--preserveColor--bqA0L{fill:inherit}@media(prefers-reduced-motion:reduce){.cozy-ui-bar-icon--spin--3IvCw{-webkit-animation:none;animation:none}}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Icon/node_modules/cozy-ui/stylus/generic/animations.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Icon/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Icon/node_modules/cozy-ui/react/Icon/styles.styl"],names:[],mappings:"AAkCA,+BAGI,6DAAA,oDCnCJ,CDUA,2CACI,KACI,sBCKN,CDJE,GACI,wBCMN,CACF,CDXA,mCACI,KACI,sBCqBN,CDpBE,GACI,wBCsBN,CACF,CDrBA,4CACI,QACI,+BCqCN,CDnCE,QACI,8BCqCN,CDnCE,YACI,+BCqCN,CDnCE,QACI,8BCqCN,CACF,CDjDA,oCACI,QACI,+BCiEN,CD/DE,QACI,8BCiEN,CD/DE,YACI,+BCiEN,CD/DE,QACI,8BCiEN,CACF,CC7FA,yBACI,sBAEA,uBD8FJ,CC5FA,wCACI,YD8FJ,CD/DsC,sCAGlC,+BACI,uBAAA,cCrCN,CACF,CAAA",file:"styles.styl",sourcesContent:["/*------------------------------------*\\\n Animations\n\\*------------------------------------*/\n/*\n Animations\n\n Available animations:\n\n spin - Animates an element by rotating it endlessly by 360 deg (used by the loading spinner)\n\n Styleguide Generic.animation\n*/\n@keyframes spin\n from\n transform rotate(0deg)\n to\n transform rotate(359deg)\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$transition-transform-ease-out\n transition transform .1s ease-out\n\n$spin-anim\n // arguments' order is important: the animation name must stay first\n // so that scoping works\n animation spin 1s linear infinite\n\n@media (prefers-reduced-motion: reduce)\n $transition-transform-ease-out\n transition none\n $spin-anim\n animation none",".icon--spin {\n animation: spin 1s linear infinite;\n}\n@media (prefers-reduced-motion: reduce) {\n .icon--spin {\n animation: none;\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.icon {\n fill: var(--iconColor);\n transform: translateZ(0);\n}\n.icon--preserveColor {\n fill: inherit;\n}\n","@require 'settings/icons.styl'\n\n.icon\n fill var(--iconColor)\n // Fix blurry icons on Firefox\n transform translateZ(0)\n\n.icon--preserveColor\n fill inherit\n\n.icon--spin\n @extend $icon-spin\n"],sourceRoot:""}]),t.locals={"icon--spin":"cozy-ui-bar-icon--spin--3IvCw",spin:"cozy-ui-bar-spin--3r0RK",icon:"cozy-ui-bar-icon--3NURx","icon--preserveColor":"cozy-ui-bar-icon--preserveColor--bqA0L",shake:"cozy-ui-bar-shake--1Tqb8"}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(33))},function(e,t,n){var r=n(209);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},function(e,t){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},function(e,t,n){var r=n(355),o=n(146),i=n(356);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(109),o=n(399),i=n(110);e.exports=function(e,t,n,a,u,c){var s=1&n,l=e.length,f=t.length;if(l!=f&&!(s&&f>l))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var p=-1,h=!0,m=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++p<l;){var y=e[p],v=t[p];if(a)var g=s?a(v,y,p,t,e,c):a(y,v,p,e,t,c);if(void 0!==g){if(g)continue;h=!1;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(y===e||u(y,e,n,a,c)))return m.push(t)}))){h=!1;break}}else if(y!==v&&!u(y,v,n,a,c)){h=!1;break}}return c.delete(e),c.delete(t),h}},function(e,t,n){var r=n(39).Uint8Array;e.exports=r},function(e,t,n){var r=n(218),o=n(156),i=n(85);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(111),o=n(26);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(222),o=n(86),i=n(26),a=n(87),u=n(113),c=n(114),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&c(e),p=n||l||f||d,h=p?r(e.length,String):[],m=h.length;for(var y in e)!t&&!s.call(e,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,m))||h.push(y);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(54)(n(39),"Set");e.exports=r},function(e,t,n){var r=n(54)(n(39),"WeakMap");e.exports=r},function(e,t,n){var r=n(34);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(413),o=n(229);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){var r=n(67),o=n(86),i=n(26),a=n(113),u=n(157),c=n(68);e.exports=function(e,t,n){for(var s=-1,l=(t=r(t,e)).length,f=!1;++s<l;){var d=c(t[s]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++s!=l?f:!!(l=null==e?0:e.length)&&u(l)&&a(d,l)&&(i(e)||o(e))}},function(e,t,n){var r=n(116),o=n(231),i=n(67);e.exports=function(e,t,n){for(var a=-1,u=t.length,c={};++a<u;){var s=t[a],l=r(e,s);n(l,s)&&o(c,i(s,e),l)}return c}},function(e,t,n){var r=n(162),o=n(67),i=n(113),a=n(34),u=n(68);e.exports=function(e,t,n,c){if(!a(e))return e;for(var s=-1,l=(t=o(t,e)).length,f=l-1,d=e;null!=d&&++s<l;){var p=u(t[s]),h=n;if(s!=f){var m=d[p];void 0===(h=c?c(m,p,d):void 0)&&(h=a(m)?m:i(t[s+1])?[]:{})}r(d,p,h),d=d[p]}return e}},function(e,t,n){var r=n(54),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(111),o=n(164),i=n(156),a=n(220),u=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=u},function(e,t){var n={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};e.exports=function(e,t){return t?"color: #fff; background: "+n[e]+";":"color: "+n[e]+";"}},function(e,t,n){"use strict";
|
|
12
|
+
/*
|
|
13
|
+
object-assign
|
|
14
|
+
(c) Sindre Sorhus
|
|
15
|
+
@license MIT
|
|
16
|
+
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,u,c=a(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(c[l]=n[l]);if(r){u=r(n);for(var f=0;f<u.length;f++)i.call(n,u[f])&&(c[u[f]]=n[u[f]])}}return c}},function(e,t,n){"use strict";var r=n(89),o=n(119),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||r.call(a,i);e.exports=function(){return u(r,a,arguments)},e.exports.apply=function(){return u(r,i,arguments)}},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(451),o=n(452),i=n(453)("String.prototype.replace"),a=/^[\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]+/,u=/[\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]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),u,"")}},function(e,t,n){"use strict";var r=n(238);e.exports=function(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:r}},function(e,t){e.exports=function(e){return e instanceof Date}},function(e,t,n){var r=n(55),o=n(169);e.exports=function(e){var t=r(e),n=t.getFullYear(),i=new Date(0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);var a=o(i),u=new Date(0);u.setFullYear(n,0,4),u.setHours(0,0,0,0);var c=o(u);return t.getTime()>=a.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},function(e,t,n){var r={"./_lib/build_formatting_tokens_reg_exp":56,"./_lib/build_formatting_tokens_reg_exp/":56,"./_lib/build_formatting_tokens_reg_exp/index":56,"./_lib/build_formatting_tokens_reg_exp/index.js":56,"./en":90,"./en/":90,"./en/build_distance_in_words_locale":91,"./en/build_distance_in_words_locale/":91,"./en/build_distance_in_words_locale/index":91,"./en/build_distance_in_words_locale/index.js":91,"./en/build_format_locale":92,"./en/build_format_locale/":92,"./en/build_format_locale/index":92,"./en/build_format_locale/index.js":92,"./en/index":90,"./en/index.d.ts":464,"./en/index.js":90,"./en/package":243,"./en/package.json":243,"./es":120,"./es/":120,"./es/build_distance_in_words_locale":93,"./es/build_distance_in_words_locale/":93,"./es/build_distance_in_words_locale/index":93,"./es/build_distance_in_words_locale/index.js":93,"./es/build_format_locale":94,"./es/build_format_locale/":94,"./es/build_format_locale/index":94,"./es/build_format_locale/index.js":94,"./es/index":120,"./es/index.d.ts":465,"./es/index.js":120,"./es/package":244,"./es/package.json":244,"./fr":121,"./fr/":121,"./fr/build_distance_in_words_locale":95,"./fr/build_distance_in_words_locale/":95,"./fr/build_distance_in_words_locale/index":95,"./fr/build_distance_in_words_locale/index.js":95,"./fr/build_format_locale":96,"./fr/build_format_locale/":96,"./fr/build_format_locale/index":96,"./fr/build_format_locale/index.js":96,"./fr/index":121,"./fr/index.d.ts":466,"./fr/index.js":121,"./fr/package":245,"./fr/package.json":245};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=242},function(e){e.exports=JSON.parse('{"typings":"../../typings.d.ts"}')},function(e){e.exports=JSON.parse('{"typings":"../../typings.d.ts"}')},function(e){e.exports=JSON.parse('{"typings":"../../typings.d.ts"}')},function(e,t,n){var r=n(211),o=n(247),i=n(149),a=n(213);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t,n){var r=n(471)();e.exports=r},function(e,t,n){var r=n(475),o=n(476),i=n(477);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(252),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,u=o(i.length-t,0),c=Array(u);++a<u;)c[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=n(c),r(e,this,s)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(480),o=n(482)(r);e.exports=o},function(e,t,n){var r=n(219),o=n(43),i=n(161),a=n(222),u=n(123),c=Math.max;e.exports=function(e){if(!e||!e.length)return[];var t=0;return e=r(e,(function(e){if(u(e))return t=c(e.length,t),!0})),a(t,(function(t){return o(e,i(t))}))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"OAuthClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"errors",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"FetchError",{enumerable:!0,get:function(){return u.FetchError}}),Object.defineProperty(t,"normalizeDoc",{enumerable:!0,get:function(){return c.normalizeDoc}});var i=o(n(257)),a=o(n(538)),u=r(n(58)),c=n(30)},function(e,t,n){"use strict";(function(e){var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(7)),a=o(n(9)),u=o(n(2)),c=o(n(4)),s=o(n(6)),l=o(n(486)),f=r(n(262)),d=o(n(519)),p=(o(n(268)),o(n(30))),h=o(n(184)),m=r(n(271)),y=r(n(525)),v=o(n(527)),g=o(n(528)),b=r(n(272)),w=r(n(529)),x=r(n(530)),C=r(n(532)),k=r(n(533)),S=r(n(534)),_=o(n(535)),A=o(n(273)),O=r(n(58)),E=n(537),B=o(n(45));function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(e){return e.message&&O.default.CLIENT_NOT_FOUND.test(e.message)},z=function(){function t(e){(0,c.default)(this,t);var n=P({},e),r=n.token,o=n.uri,i=void 0===o?"":o;this.options=n,this.setUri(i),this.setToken(r),this.konnectors=new y.default(this),this.jobs=new m.default(this)}var n,r,o,u;return(0,s.default)(t,[{key:"collection",value:function(e){if(!e)throw new Error("CozyStackClient.collection() called without a doctype");switch(e){case f.APPS_DOCTYPE:return new f.default(this);case y.KONNECTORS_DOCTYPE:return new y.default(this);case"io.cozy.files":return new h.default(e,this);case"io.cozy.sharings":return new v.default(e,this);case"io.cozy.permissions":return new g.default(e,this);case S.CONTACTS_DOCTYPE:return new S.default(e,this);case b.TRIGGERS_DOCTYPE:return new b.default(this);case m.JOBS_DOCTYPE:return new m.default(this);case w.SETTINGS_DOCTYPE:return new w.default(this);case x.NOTES_DOCTYPE:return new x.default(this);case C.OAUTH_CLIENTS_DOCTYPE:return new C.default(this);case k.SHORTCUTS_DOCTYPE:return new k.default(this);default:return new p.default(e,this)}}},{key:"fetch",value:function(e){function t(t,n,r){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,a.default)(i.default.mark((function e(t,n,r){var o,a,u,c,s,l,f=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=f.length>3&&void 0!==f[3]?f[3]:{},(a=P({},o)).method=t,u=a.headers=P({},o.headers),"GET"!==t&&"HEAD"!==t&&void 0!==r&&u["Content-Type"]&&(a.body=r),u.Authorization||(u.Authorization=this.getAuthorizationHeader()),a.credentials="include",c=this.fullpath(n),s=(0,E.shouldXMLHTTPRequestBeUsed)(t,n,a)?E.fetchWithXMLHttpRequest:fetch,e.prev=9,e.next=12,s(c,a);case 12:return(l=e.sent).ok||this.emit("error",new O.FetchError(l,"".concat(l.status," ").concat(l.statusText))),e.abrupt("return",l);case 17:throw e.prev=17,e.t0=e.catch(9),T(e.t0)&&this.onRevocationChange(!0),e.t0;case 21:case"end":return e.stop()}}),e,this,[[9,17]])})));return function(t,n,r){return e.apply(this,arguments)}}())},{key:"onTokenRefresh",value:function(e){this.options&&this.options.onTokenRefresh&&this.options.onTokenRefresh(e)}},{key:"onRevocationChange",value:function(e){this.options&&this.options.onRevocationChange&&this.options.onRevocationChange(e)}},{key:"checkForRevocation",value:(u=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchInformation();case 3:return e.abrupt("return",!1);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",T(e.t0));case 9:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(){return u.apply(this,arguments)})},{key:"refreshToken",value:(o=(0,a.default)(i.default.mark((function t(){var n,r,o,a,u,c,s,l,f;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.token){t.next=2;break}throw new Error("Cannot refresh an empty token");case 2:if(n={method:"GET",credentials:"include"},e.document){t.next=5;break}throw new Error("Not in a web context, cannot refresh token");case 5:return t.next=7,fetch("/",n);case 7:if((r=t.sent).ok){t.next=10;break}throw new Error("couldn't fetch a new token - response "+r.statusCode);case 10:return t.next=12,r.text();case 12:if(o=t.sent,a=new DOMParser,u=a.parseFromString(o,"text/html")){t.next=17;break}throw Error("couldn't fetch a new token - doc is not html");case 17:if(c=u.querySelector('div[role="application"]')){t.next=20;break}throw Error("couldn't fetch a new token - no div[role=application]");case 20:if(s=c.dataset.cozy?JSON.parse(c.dataset.cozy):P({},c.dataset),(l=s.token)&&(l=l||s.cozyToken),l){t.next=25;break}throw Error("couldn't fetch a new token -- missing data-cozy or data-cozy-token attribute");case 25:return f=new d.default(l),this.onTokenRefresh(f),t.abrupt("return",f);case 28:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"fetchJSON",value:(r=(0,a.default)(i.default.mark((function e(t,n,r){var o,a,u=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=u.length>3&&void 0!==u[3]?u[3]:{},e.prev=1,e.next=4,this.fetchJSONWithCurrentToken(t,n,r,o);case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),!O.default.EXPIRED_TOKEN.test(e.t0.message)&&!O.default.INVALID_TOKEN.test(e.t0.message)){e.next=25;break}return e.prev=10,e.next=13,this.refreshToken();case 13:a=e.sent,e.next=19;break;case 16:throw e.prev=16,e.t1=e.catch(10),e.t0;case 19:return this.setToken(a),e.next=22,this.fetchJSONWithCurrentToken(t,n,r,o);case 22:return e.abrupt("return",e.sent);case 25:throw e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,7],[10,16]])}))),function(e,t,n){return r.apply(this,arguments)})},{key:"fetchJSONWithCurrentToken",value:(n=(0,a.default)(i.default.mark((function e(t,n,r){var o,a,u,c,s,f,d,p,h=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=h.length>3&&void 0!==h[3]?h[3]:{},a=(0,l.default)(o),(u=a.headers=a.headers||{}).Accept="application/json",c=r,"GET"!==t&&"HEAD"!==t&&void 0!==c&&(u["Content-Type"]||(u["Content-Type"]="application/json",c=JSON.stringify(c))),e.next=8,this.fetch(t,n,c,a);case 8:return s=e.sent,f=s.headers.get("content-type"),d=f&&f.indexOf("json")>=0,e.next=13,d?s.json():s.text();case 13:if(p=e.sent,!s.ok){e.next=16;break}return e.abrupt("return",p);case 16:throw new O.FetchError(s,p);case 17:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"fullpath",value:function(e){return e.startsWith("http")?e:this.uri+e}},{key:"getAuthorizationHeader",value:function(){return this.token?this.token.toAuthHeader():null}},{key:"setCredentials",value:function(e){return(0,A.default)("CozyStackClient::setCredentials is deprecated, use CozyStackClient::setToken"),this.setToken(e)}},{key:"getCredentials",value:function(){return(0,A.default)("CozyStackClient::getCredentials is deprecated, use CozyStackClient::getAuthorizationHeader"),this.getAuthorizationHeader()}},{key:"setToken",value:function(e){if(e){if(e.toAuthHeader)this.token=e;else{if("string"!=typeof e)throw console.warn("Cozy-Client: Unknown token format",e),new Error("Cozy-Client: Unknown token format");this.token=new d.default(e)}this.onRevocationChange(!1)}else this.token=null}},{key:"getAccessToken",value:function(){return this.token&&this.token.getAccessToken()}},{key:"setUri",value:function(e){this.uri=function(e){var t=e;if(null===t)return null;for(;"/"===t[t.length-1];)t=t.slice(0,-1);return t}(e)}},{key:"getIconURL",value:function(e){return(0,_.default)(this,e)}}]),t}();B.default.mixin(z);var I=z;t.default=I}).call(this,n(33))},function(e,t,n){var r=n(104),o=n(255),i=n(162),a=n(487),u=n(488),c=n(259),s=n(124),l=n(489),f=n(490),d=n(217),p=n(163),h=n(66),m=n(491),y=n(492),v=n(261),g=n(26),b=n(87),w=n(496),x=n(34),C=n(498),k=n(85),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,_,A,O,E){var B,j=1&n,P=2&n,T=4&n;if(_&&(B=O?_(t,A,O,E):_(t)),void 0!==B)return B;if(!x(t))return t;var z=g(t);if(z){if(B=m(t),!j)return s(t,B)}else{var I=h(t),D="[object Function]"==I||"[object GeneratorFunction]"==I;if(b(t))return c(t,j);if("[object Object]"==I||"[object Arguments]"==I||D&&!O){if(B=P||D?{}:v(t),!j)return P?f(t,u(B,t)):l(t,a(B,t))}else{if(!S[I])return O?t:{};B=y(t,I,j)}}E||(E=new r);var R=E.get(t);if(R)return R;E.set(t,B),C(t)?t.forEach((function(r){B.add(e(r,n,_,r,t,E))})):w(t)&&t.forEach((function(r,o){B.set(o,e(r,n,_,o,t,E))}));var F=T?P?p:d:P?keysIn:k,M=z?void 0:F(t);return o(M||t,(function(r,o){M&&(r=t[o=r]),i(B,o,e(r,n,_,o,t,E))})),B}},function(e,t,n){(function(e){var r=n(39),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(112)(e))},function(e,t,n){var r=n(176);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(177),o=n(164),i=n(115);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.normalizeApp=t.APPS_DOCTYPE=void 0;var i=o(n(7)),a=o(n(9)),u=o(n(4)),c=o(n(6)),s=o(n(8)),l=o(n(10)),f=o(n(5)),d=o(n(2)),p=o(n(18)),h=n(178),m=o(n(72)),y=r(n(30));n(58);function v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,d.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.APPS_DOCTYPE="io.cozy.apps";var C=function(e,t){return x(x(x(x({},e.attributes),e),(0,y.normalizeDoc)(e,t)),{},{id:e.id})};t.normalizeApp=C;var k=function(e){(0,s.default)(d,e);var t,n,r,o,l,f=b(d);function d(e){var t;return(0,u.default)(this,d),(t=f.call(this,"io.cozy.apps",e)).endpoint="/apps/",t}return(0,c.default)(d,[{key:"get",value:(l=(0,a.default)(i.default.mark((function e(t,n){var r,o,a,u,c,s,l,f,d,g=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.indexOf("/")>-1?r=t.split("/")[1]:(console.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(t,"\n\n- Q('io.cozy.apps').getById('banks')\n+ Q('io.cozy.apps').getById('io.cozy.apps/banks')")),r=t),!n||!n.sources||Array.isArray(n.sources)&&0!==n.sources.length){e.next=3;break}throw new Error('Invalid "sources" attribute passed in query, please use an array with at least one element.');case 3:o=(0,p.default)(n,"sources",["stack"]),a={stack:function(){return m.default.get(g.stackClient,"".concat(g.endpoint).concat(encodeURIComponent(r)),{normalize:g.constructor.normalizeDoctype(g.doctype)})},registry:function(){return g.stackClient.fetchJSON("GET",h.registryEndpoint+r)}},u=v(o),e.prev=6,u.s();case 8:if((c=u.n()).done){e.next=27;break}return s=c.value,e.prev=10,e.next=13,a[s]();case 13:if(l=e.sent,"registry"===s){e.next=16;break}return e.abrupt("return",l);case 16:return f=(0,h.transformRegistryFormatToStackFormat)(l),d=(0,y.normalizeDoc)(f,this.doctype),e.abrupt("return",{data:d});case 21:if(e.prev=21,e.t0=e.catch(10),s!==o[o.length-1]){e.next=25;break}throw e.t0;case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),u.e(e.t1);case 32:return e.prev=32,u.f(),e.finish(32);case 35:case"end":return e.stop()}}),e,this,[[6,29,32,35],[10,21]])}))),function(e,t){return l.apply(this,arguments)})},{key:"all",value:(o=(0,a.default)(i.default.mark((function e(){var t,n=this;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET",this.endpoint);case 2:return t=e.sent,e.abrupt("return",{data:t.data.map((function(e){return C(e,n.doctype)})),meta:{count:t.meta.count},skip:0,next:!1});case 4:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"create",value:(r=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("create() method is not available for applications");case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"update",value:(n=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("update() method is not available for applications");case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"destroy",value:(t=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("destroy() method is not available for applications");case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),d}(y.default);k.normalizeDoctype=y.default.normalizeDoctypeJsonApi;var S=k;t.default=S},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t){e.exports=function(e){return e&&e.length?e[0]:void 0}},function(e,t,n){var r=n(34),o=n(82),i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||c.test(e)?s(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i=n(181),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.isMatchingIndex=t.isInconsistentIndex=t.getIndexFields=t.transformSort=t.getIndexNameFromFields=t.normalizeDesignDoc=void 0;var o=r(n(31)),i=r(n(2)),a=n(44),u=r(n(264)),c=r(n(18)),s=r(n(182));function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.normalizeDesignDoc=function(e){var t=e._id||e.id;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:t,_id:t},e.doc)};t.getIndexNameFromFields=function(e){return"by_".concat(e.join("_and_"))};t.transformSort=function(e){return!e||Array.isArray(e)?e:(console.warn('Passing an object to the "sort" is deprecated, please use an array instead.'),(0,a.transform)(e,(function(e,t,n){return e.push((0,i.default)({},n,t))}),[]))};t.getIndexFields=function(e){var t=e.selector,n=e.sort,r=void 0===n?[]:n;return Array.from(new Set([].concat((0,o.default)(r.map((function(e){return(0,u.default)(Object.keys(e))}))),(0,o.default)(t?Object.keys(t):[]))))};t.isInconsistentIndex=function(e){var t=e._id;if(!t.startsWith("_design/by_"))return!1;var n=t.split("_design/by_")[1].split("_and_"),r=Object.keys((0,c.default)(e,"views"))[0],o=Object.keys((0,c.default)(e,"views.".concat(r,".map.fields")));return!(0,s.default)(n,o)};t.isMatchingIndex=function(e,t,n){var r=Object.keys((0,c.default)(e,"views"))[0],o=Object.keys((0,c.default)(e,"views.".concat(r,".map.fields")));if((0,s.default)(o,t)){if(!n)return!0;var i=(0,c.default)(e,"views.".concat(r,".map.partial_filter_selector"));if((0,s.default)(n,i))return!0}return!1}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=function(){function e(t){(0,o.default)(this,e);var n=t;"string"==typeof n&&(n=JSON.parse(n)),this.tokenType=n.token_type||n.tokenType,this.accessToken=n.access_token||n.accessToken,this.refreshToken=n.refresh_token||n.refreshToken,this.scope=n.scope}return(0,i.default)(e,[{key:"toAuthHeader",value:function(){return"Bearer "+this.accessToken}},{key:"toBasicAuth",value:function(){return"user:".concat(this.accessToken,"@")}},{key:"toJSON",value:function(){return{tokenType:this.tokenType,accessToken:this.accessToken,refreshToken:this.refreshToken,scope:this.scope}}},{key:"toString",value:function(){return JSON.stringify(this.toJSON())}},{key:"getAccessToken",value:function(){return this.accessToken}}]),e}();t.default=a},function(e,t,n){var r=n(523),o=n(229);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIllegalCharacters=void 0;t.getIllegalCharacters=function(e){var t=e.match(/\/|\x00|\n|\r/g);return t?t.join(" "):""}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.hasJobFinished=t.normalizeJob=t.JOBS_DOCTYPE=void 0;var o=r(n(7)),i=r(n(46)),a=r(n(9)),u=r(n(4)),c=r(n(6)),s=r(n(2)),l=r(n(72)),f=n(30),d=n(44);function p(){var e=(0,i.default)(["/jobs/",""]);return p=function(){return e},e}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.JOBS_DOCTYPE="io.cozy.jobs";var y=function(e){return new Promise((function(t){return setTimeout(t,e)}))},v=function(e){return m(m(m({},e),(0,f.normalizeDoc)(e,"io.cozy.jobs")),e.attributes)};t.normalizeJob=v;var g=function(e){return"done"===e.state||"errored"===e.state};t.hasJobFinished=g;var b=function(){function e(t){(0,u.default)(this,e),this.stackClient=t}var t,n,r;return(0,c.default)(e,[{key:"queued",value:function(e){return this.stackClient.fetchJSON("GET","/jobs/queue/".concat(e))}},{key:"create",value:function(e,t,n){return this.stackClient.fetchJSON("POST","/jobs/queue/".concat(e),{data:{type:"io.cozy.jobs",attributes:{arguments:t||{},options:n||{}}}})}},{key:"get",value:(r=(0,a.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",l.default.get(this.stackClient,(0,d.uri)(p(),t),{normalize:v}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"update",value:(n=(0,a.default)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("client"===t.worker){e.next=2;break}throw new Error("JobCollection.update only works for client workers. ".concat(t.worker," given"));case 2:return e.next=4,this.stackClient.fetchJSON("PATCH","/jobs/".concat(t._id),{data:{type:"io.cozy.jobs",id:t._id,attributes:{state:t.attributes.state,error:t.attributes.error}}});case 4:return n=e.sent,e.abrupt("return",v(n.data));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"waitFor",value:(t=(0,a.default)(o.default.mark((function e(t){var n,r,i,a,u,c,s,l,f,d,p,h,m=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=m.length>1&&void 0!==m[1]?m[1]:{},r=n.onUpdate,i=void 0===r?null:r,a=n.until,u=void 0===a?g:a,c=n.delay,s=void 0===c?5e3:c,l=n.timeout,f=void 0===l?3e5:l,d=Date.now(),e.next=4,this.get(t);case 4:p=e.sent.data.attributes;case 5:if(p&&u(p)){e.next=17;break}return e.next=8,y(s);case 8:return e.next=10,this.get(t);case 10:if(p=e.sent.data.attributes,i&&i(p),h=Date.now(),!(d-h>f)){e.next=15;break}throw new Error("Timeout for JobCollection::waitFor");case 15:e.next=5;break;case 17:return e.abrupt("return",p);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();t.default=b},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.isForAccount=t.isForKonnector=t.normalizeTrigger=t.TRIGGERS_DOCTYPE=t.JOBS_DOCTYPE=void 0;var i=o(n(17)),a=o(n(46)),u=o(n(7)),c=o(n(9)),s=o(n(4)),l=o(n(6)),f=o(n(97)),d=o(n(8)),p=o(n(10)),h=o(n(5)),m=o(n(2)),y=r(n(72)),v=r(n(30)),g=n(271),b=n(44);n(58);function w(){var e=(0,a.default)(["/jobs/triggers/","/launch"]);return w=function(){return e},e}function x(){var e=(0,a.default)(["/jobs/triggers/",""]);return x=function(){return e},e}function C(){var e=(0,a.default)(["/jobs/triggers/",""]);return C=function(){return e},e}function k(){var e=(0,a.default)(["/jobs/triggers"]);return k=function(){return e},e}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,h.default)(e);if(t){var o=(0,h.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,m.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.JOBS_DOCTYPE="io.cozy.jobs";t.TRIGGERS_DOCTYPE="io.cozy.triggers";var O=function(e){return A(A(A({},e),(0,v.normalizeDoc)(e,"io.cozy.triggers")),e.attributes)};t.normalizeTrigger=O;t.isForKonnector=function(e,t){return"konnector"===e.worker&&e.message.konnector==t};t.isForAccount=function(e,t){return e.message.account==t};var E=function(e,t){var n=new URLSearchParams;return e&&(Array.isArray(e.$in)?n.set("Worker",e.$in.join(",")):n.set("Worker",e)),t&&(Array.isArray(t.$in)?n.set("Type",t.$in.join(",")):n.set("Type",t)),n.toString()},B=function(e){(0,d.default)(_,e);var t,n,r,o,a,p,m,v=S(_);function _(e){return(0,s.default)(this,_),v.call(this,"io.cozy.triggers",e)}return(0,l.default)(_,[{key:"all",value:(m=(0,c.default)(u.default.mark((function e(){var t,n=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.length>0&&void 0!==n[0]&&n[0],e.prev=1,e.next=4,this.stackClient.fetchJSON("GET","/jobs/triggers");case 4:return t=e.sent,e.abrupt("return",{data:t.data.map((function(e){return O(e)})),meta:{count:t.data.length},next:!1,skip:0});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",(0,y.dontThrowNotFoundError)(e.t0));case 11:case"end":return e.stop()}}),e,this,[[1,8]])}))),function(){return m.apply(this,arguments)})},{key:"create",value:(p=(0,c.default)(u.default.mark((function e(t){var n,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,b.uri)(k()),e.next=3,this.stackClient.fetchJSON("POST",n,{data:{attributes:t}});case 3:return r=e.sent,e.abrupt("return",{data:O(r.data)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"destroy",value:(a=(0,c.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t._id){e.next=3;break}throw new Error("TriggerCollection.destroy needs a document with an _id");case 3:return e.next=5,this.stackClient.fetchJSON("DELETE",(0,b.uri)(C(),n));case 5:return e.abrupt("return",{data:O(A(A({},t),{},{_deleted:!0}))});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"find",value:(o=(0,c.default)(u.default.mark((function e(){var t,n,r,o,a,c,s,l=arguments;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l.length>0&&void 0!==l[0]?l[0]:{},n=l.length>1&&void 0!==l[1]?l[1]:{},r=t.worker,o=t.type,a=(0,i.default)(t,["worker","type"]),0!==Object.keys(a).length){e.next=18;break}return c="/jobs/triggers?".concat(E(r,o)),e.prev=6,e.next=9,this.stackClient.fetchJSON("GET",c);case 9:return s=e.sent,e.abrupt("return",{data:s.data.map((function(e){return O(e)})),meta:{count:s.data.length},next:!1,skip:0});case 13:return e.prev=13,e.t0=e.catch(6),e.abrupt("return",(0,y.dontThrowNotFoundError)(e.t0));case 16:e.next=19;break;case 18:return e.abrupt("return",(0,f.default)((0,h.default)(_.prototype),"find",this).call(this,t,n));case 19:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(){return o.apply(this,arguments)})},{key:"get",value:(r=(0,c.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",y.default.get(this.stackClient,(0,b.uri)(x(),t),{normalize:O}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"launch",value:(n=(0,c.default)(u.default.mark((function e(t){var n,r;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,b.uri)(w(),t._id),e.next=3,this.stackClient.fetchJSON("POST",n);case 3:return r=e.sent,e.abrupt("return",{data:(0,g.normalizeJob)(r.data)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"update",value:(t=(0,c.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("update() method is not available for triggers");case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),_}(v.default);B.normalizeDoctype=v.default.normalizeDoctypeJsonApi;var j=B;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e;(e=console).warn.apply(e,arguments)};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.transformBulkDocsResponse=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(17)),u=r(n(4)),c=r(n(6)),s=r(n(8)),l=r(n(10)),f=r(n(5)),d=r(n(2)),p=n(21),h=r(n(186)),m=(n(22),n(59)),y=n(275),v=r(n(276));function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,d.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){var n=(0,v.default)(e,t,(function(e,t){return e.ok?w(w({},t),{},{_id:e.id,_rev:e.rev}):t}));if(e.find((function(e){return!e.ok})))throw new y.BulkEditError(e,n);return{data:n}};t.transformBulkDocsResponse=x;var C=function(e){(0,s.default)(r,e);var t,n=g(r);function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.client,i=t.stackClient;return(0,u.default)(this,r),e=n.call(this),o&&console.warn("Using options.client is deprecated, prefer options.stackClient"),e.stackClient=i||o,e}return(0,c.default)(r,[{key:"registerClient",value:function(e){this.stackClient=e.stackClient||e.client}},{key:"reset",value:function(){this.stackClient=null}},{key:"request",value:function(e,t,n){return e.mutationType?this.executeMutation(e,t,n):this.executeQuery(e)}},{key:"executeQuery",value:function(e){var t=e.doctype,n=e.selector,r=e.id,o=e.ids,i=e.referenced,u=(0,a.default)(e,["doctype","selector","id","ids","referenced"]);if(!t)throw console.warn("Bad query",e),new Error("No doctype found in a query definition");var c=this.stackClient.collection(t);return r?c.get(r,e):o?c.getAll(o):i?c.findReferencedBy(i,u):n||u.sort?c.find(n,u):c.all(u)}},{key:"executeMutation",value:(t=(0,i.default)(o.default.mark((function e(t,n,r){var i,u,c,s,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.mutationType,u=t.document,c=t.documents,s=(0,a.default)(t,["mutationType","document","documents"]),e.t0=i,e.next=e.t0===p.MutationTypes.CREATE_DOCUMENT?4:e.t0===p.MutationTypes.UPDATE_DOCUMENTS?5:e.t0===p.MutationTypes.UPDATE_DOCUMENT?9:e.t0===p.MutationTypes.DELETE_DOCUMENT?10:e.t0===p.MutationTypes.ADD_REFERENCES_TO?11:e.t0===p.MutationTypes.REMOVE_REFERENCES_TO?12:e.t0===p.MutationTypes.ADD_REFERENCED_BY?13:e.t0===p.MutationTypes.REMOVE_REFERENCED_BY?18:e.t0===p.MutationTypes.UPLOAD_FILE?23:24;break;case 4:return e.abrupt("return",this.stackClient.collection(u._type).create(u));case 5:return e.next=7,this.stackClient.collection(c[0]._type).updateAll(c);case 7:return l=e.sent,e.abrupt("return",x(l,c));case 9:return e.abrupt("return",this.stackClient.collection(u._type).update(u));case 10:return e.abrupt("return",this.stackClient.collection(u._type).destroy(u));case 11:return e.abrupt("return",this.stackClient.collection(s.referencedDocuments[0]._type).addReferencesTo(u,s.referencedDocuments));case 12:return e.abrupt("return",this.stackClient.collection(s.referencedDocuments[0]._type).removeReferencesTo(u,s.referencedDocuments));case 13:if(u._type!==m.DOCTYPE_FILES){e.next=17;break}return e.abrupt("return",this.stackClient.collection(m.DOCTYPE_FILES).addReferencedBy(u,s.referencedDocuments));case 17:throw new Error("The document type should be io.cozy.files");case 18:if(u._type!==m.DOCTYPE_FILES){e.next=22;break}return e.abrupt("return",this.stackClient.collection(m.DOCTYPE_FILES).removeReferencedBy(u,s.referencedDocuments));case 22:throw new Error("The document type should be io.cozy.files");case 23:return e.abrupt("return",this.stackClient.collection(m.DOCTYPE_FILES).upload(s.file,s.dirPath));case 24:return e.abrupt("return",r(t,n));case 25:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})}]),r}(h.default);t.default=C},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.BulkEditError=void 0;var o=r(n(2)),i=r(n(4)),a=r(n(6)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(35)),f=r(n(276));n(22);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var m=function(e){(0,u.default)(n,e);var t=h(n);function n(e,r){var o;return(0,i.default)(this,n),(o=t.call(this,"Error while bulk saving")).name="BulkEditError",o.results=(0,f.default)(e,r,(function(e,t){return p(p({},e),{},{doc:t})})),o}return(0,a.default)(n,[{key:"getUpdatedDocuments",value:function(){return this.results.filter((function(e){return e.ok})).map((function(e){return e.doc}))}},{key:"getErrors",value:function(){return this.results.filter((function(e){return!e.ok}))}}]),n}((0,l.default)(Error));t.BulkEditError=m},function(e,t,n){var r=n(57),o=n(539),i=r((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,o(e,n)}));e.exports=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(31)),a=r(n(2)),u=r(n(9)),c=r(n(4)),s=r(n(6)),l=r(n(97)),f=r(n(8)),d=r(n(10)),p=r(n(5)),h=r(n(19)),m=r(n(18)),y=r(n(76)),v=r(n(125)),g=n(21),b=n(60),w=(n(22),n(59)),x=(r(n(61)),r(n(98)));function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,p.default)(e);if(t){var o=(0,p.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.default)(this,n)}}var _=function(e,t){var n=(0,h.default)(e,3),r=n[0],o=n[1],i=n[2];return[i?[r,o,i]:[r,o],t]},A=function(e){(0,f.default)(d,e);var t,n,r,a=S(d);function d(){return(0,c.default)(this,d),a.apply(this,arguments)}return(0,s.default)(d,[{key:"fetchMore",value:(r=(0,u.default)(o.default.mark((function e(){var t,n,r,a=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new g.QueryDefinition({doctype:w.DOCTYPE_FILES}),n=this.getRelationship().data,r=n[n.length-1],e.next=5,this.dispatch(function(){var e=(0,u.default)(o.default.mark((function e(u,c){var s,l,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=(0,b.getDocumentFromState)(c(),r._type,r._id),l=s.attributes.metadata.datetime,f=_([a.target._type,a.target._id,l],n[n.length-1]._id),e.next=5,a.query(t.referencedBy(a.target).offsetCursor(f));case 5:return(d=e.sent).data.shift(),e.next=9,a.dispatch(a.updateRelationshipData((function(e){return k(k({},e),{},{data:[].concat((0,i.default)(e.data),(0,i.default)(d.data)),next:d.next})})));case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"addById",value:(n=(0,u.default)(o.default.mark((function e(t){var n,r,i=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Array.isArray(t)?t:[t],r=n.map((function(e){return{_id:e,_type:i.doctype}})),e.next=4,this.mutate(this.addReferences(r));case 4:this.addTargetRelationships(n);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"removeById",value:(t=(0,u.default)(o.default.mark((function e(t){var n,r,i=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Array.isArray(t)?t:[t],r=n.map((function(e){return{_id:e,_type:i.doctype}})),e.next=4,this.mutate(this.removeReferences(r));case 4:this.removeTargetRelationships(n);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"addReferences",value:function(e){if(this.target._type===w.DOCTYPE_FILES)return g.Mutations.addReferencedBy(this.target,e);if(e[0]._type===w.DOCTYPE_FILES)return g.Mutations.addReferencesTo(this.target,e);throw new Error("Either the document or the references should be io.cozy.files")}},{key:"removeReferences",value:function(e){if(this.target._type===w.DOCTYPE_FILES)return g.Mutations.removeReferencedBy(this.target,e);if(e[0]._type===w.DOCTYPE_FILES)return g.Mutations.removeReferencesTo(this.target,e);throw new Error("Either the document or the references should be io.cozy.files")}},{key:"dehydrate",value:function(e){return(0,y.default)(e,[this.name,"relationships.".concat(this.name)])}},{key:"data",get:function(){var e=this;return this.target._type===w.DOCTYPE_FILES?(0,m.default)(this.target,"referenced_by",[]).map((function(t){var n=t.id,r=t.type;return e.get(r,n)})).filter(Boolean):(0,l.default)((0,p.default)(d.prototype),"data",this)}}],[{key:"query",value:function(e,t,n){if(e._type===w.DOCTYPE_FILES){var r=(0,m.default)(e,"relationships.referenced_by.data",[]),o=(0,v.default)(r.filter((function(e){return e.type===n.doctype})).map((function(e){return e.id})));return o.length>0?(0,g.Q)(n.doctype).getByIds(o):null}var i=_([e._type,e._id],"");return(0,g.Q)(n.doctype).referencedBy(e).offsetCursor(i)}}]),d}(x.default);t.default=A},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.extractAndMergeDocument=t.getCollectionFromSlice=t.getDocumentFromSlice=t.default=t.mergeDocumentsWithRelationships=void 0;var o=r(n(2)),i=r(n(279)),a=r(n(18)),u=r(n(182)),c=r(n(76)),s=r(n(187)),l=n(188),f=n(21),d=n(190),p=(n(22),n(287));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e,t){var n=t._type;if(!n)throw new Error("Document without _type");if(!(0,p.properId)(t))throw new Error("Document without id");var r=(0,a.default)(e,[n,(0,p.properId)(t)]);return(0,u.default)(r,t)?e:m(m({},e),{},(0,o.default)({},n,m(m({},e[n]),{},(0,o.default)({},(0,p.properId)(t),v(r,t)))))},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=m(m({},e),t);return(e.relationships||t.relationships)&&(n.relationships=m(m({},e.relationships),t.relationships)),n};t.mergeDocumentsWithRelationships=v;var g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(!(0,l.isReceivingData)(t)&&!(0,d.isReceivingMutationResult)(t))return e;if(t&&t.definition&&t.definition.mutationType===f.MutationTypes.DELETE_DOCUMENT){var n=t.definition.document._id,r=t.definition.document._type;return m(m({},e),{},(0,o.default)({},r,(0,c.default)(e[r],n)))}var i=t.response,a=i.data,u=i.included;if(!a||Array.isArray(a)&&0===a.length)return e;var s=u?u.reduce(y,e):e;return Array.isArray(a)?b(a,s):y(s,a)};t.default=g;t.getDocumentFromSlice=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(!t)throw new Error("getDocumentFromSlice: Cannot retrieve document with undefined doctype");if(!n)throw new Error("getDocumentFromSlice: Cannot retrieve document with undefined id");return e[t]&&e[t][n]?e[t][n]:null};t.getCollectionFromSlice=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(!t)throw new Error("getDocumentFromSlice: Cannot retrieve document with undefined doctype");return e[t]?Object.values(e[t]):null};var b=function(e,t){var n=e[0]._type;if(!n)throw s.default.info("Document without _type",e[0]),new Error("Document without _type");var r=(0,i.default)(e,p.properId),o=Object.assign({},t);return Object.values(r).map((function(e){o[n]||(o[n]={});var t=(0,p.properId)(e);o[n][t]?o[n][t]=m(m({},o[n][t]),e):o[n][t]=e})),o};t.extractAndMergeDocument=b},function(e,t,n){var r=n(69),o=n(280)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){var r=n(540),o=n(541),i=n(53),a=n(26);e.exports=function(e,t){return function(n,u){var c=a(n)?r:o,s=t?t():{};return c(n,e,i(u,2),s)}}},function(e,t){var n={black:"#000",red:"#c23621",green:"#25bc26",yellow:"#bbbb00",blue:"#492ee1",magenta:"#d338d3",cyan:"#33bbc8",gray:"#808080",purple:"#708"};e.exports=function(e,t){return t?"color: #fff; background: "+n[e]+";":"color: "+n[e]+";"}},function(e,t,n){var r=n(69),o=n(280),i=Object.prototype.hasOwnProperty,a=o((function(e,t,n){i.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=a},function(e,t,n){var r=n(43),o=n(284),i=n(57),a=n(285),u=i((function(e){var t=r(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=u},function(e,t,n){var r=n(109),o=n(173),i=n(174),a=n(43),u=n(65),c=n(110),s=Math.min;e.exports=function(e,t,n){for(var l=n?i:o,f=e[0].length,d=e.length,p=d,h=Array(d),m=1/0,y=[];p--;){var v=e[p];p&&t&&(v=a(v,u(t))),m=s(v.length,m),h[p]=!n&&(t||f>=120&&v.length>=120)?new r(p&&v):void 0}v=e[0];var g=-1,b=h[0];e:for(;++g<f&&y.length<m;){var w=v[g],x=t?t(w):w;if(w=n||0!==w?w:0,!(b?c(b,x):l(y,x,n))){for(p=d;--p;){var C=h[p];if(!(C?c(C,x):l(e[p],x,n)))continue e}b&&b.push(x),y.push(w)}}return y}},function(e,t,n){var r=n(123);e.exports=function(e){return r(e)?e:[]}},function(e,t,n){var r=n(43),o=n(53),i=n(554),a=n(555),u=n(65),c=n(556),s=n(88);e.exports=function(e,t,n){var l=-1;t=r(t.length?t:[s],u(o));var f=i(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++l,value:e}}));return a(f,(function(e,t){return c(e,t,n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.properId=void 0;t.properId=function(e){return e.id||e._id}},function(e,t,n){var r=n(69),o=n(84);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){var r=n(84),o=n(47),i=n(113),a=n(34);e.exports=function(e,t,n){if(!a(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(2)),i=r(n(4)),a=r(n(6)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(18)),f=r(n(567)),d=n(21);n(22);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var y=function(e){(0,u.default)(n,e);var t=m(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"add",value:function(e){return this.setRelationship(e),this.save(this.target)}},{key:"remove",value:function(){return this.setRelationship(void 0),this.save(this.target)}},{key:"setRelationship",value:function(e){if(e&&e._type!==this.doctype)throw new Error("Tried to associate a ".concat(e._type," document to a HasOne relationship on ").concat(this.doctype," document"));var t="relationships[".concat(this.name,"].data");e?(0,f.default)(this.target,t,{_id:e._id,_type:e._type}):(0,f.default)(this.target,t,void 0)}},{key:"set",value:function(e){console.warn("set is deprecated for has-one relationships. Use `add` instead."),this.setRelationship(e)}},{key:"unset",value:function(){console.warn("unset is deprecated for has-one relationships. Use `remove` instead."),this.setRelationship(void 0)}},{key:"dehydrate",value:function(e){return this.raw?h(h({},e),{},{relationships:h(h({},e.relationships),{},(0,o.default)({},this.name,{data:this.raw}))}):e}},{key:"raw",get:function(){return(0,l.default)(this.target,"relationships[".concat(this.name,"].data"),null)}},{key:"data",get:function(){return this.raw?this.get(this.doctype,this.raw._id):null}}],[{key:"query",value:function(e,t,n){var r=(0,l.default)(e,"relationships.".concat(n.name,".data"),{});return r&&r._id?(0,d.Q)(n.doctype).getById(r._id):null}}]),n}(r(n(61)).default);t.default=y},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.BelongsToInPlace=t.default=void 0;var o=r(n(2)),i=r(n(4)),a=r(n(6)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(61)),f=n(21);n(22);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var m=function(e){(0,u.default)(n,e);var t=h(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"dehydrate",value:function(e){return p(p({},e),{},(0,o.default)({},this.name,this.raw||void 0))}},{key:"raw",get:function(){return this.target[this.name]}},{key:"data",get:function(){return this.get(this.doctype,this.raw)}}],[{key:"query",value:function(e,t,n){var r=e[n.name];return t.getDocumentFromState(n.doctype,r)||(0,f.Q)(n.doctype).getById(r)}}]),n}(l.default);t.default=m;var y=m;t.BelongsToInPlace=y},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(2)),i=r(n(4)),a=r(n(6)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=n(21);n(22);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var h=function(e){(0,u.default)(n,e);var t=p(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"addById",value:function(e){this.getRelationship().push(e)}},{key:"removeById",value:function(e){var t=this.getRelationship(),n=t.indexOf(e);-1!==n&&t.splice(n,1)}},{key:"existsById",value:function(e){return-1!==this.getRelationship().indexOf(e)}},{key:"getRelationship",value:function(){return this.target[this.name]=this.target[this.name]||[],this.target[this.name]}},{key:"dehydrate",value:function(e){return d(d({},e),{},(0,o.default)({},this.name,this.raw||[]))}},{key:"raw",get:function(){return this.target[this.name]}},{key:"data",get:function(){var e=this,t=this.doctype;return(this.raw||[]).map((function(n){return e.get(t,n)}))}}],[{key:"query",value:function(e,t,n){var r=e[n.name];return r&&r>0?(0,l.Q)(n.doctype).getByIds(r):null}}]),n}(r(n(61)).default);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={olderThan:function(e){return function(t){return!t||!t.lastUpdate||Date.now()-t.lastUpdate>e}},noFetch:function(){return!1}};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(2)),u=r(n(18)),c=n(60),s=Object.prototype.hasOwnProperty,l=function(){function e(t,n,r,i){var u=this;if((0,o.default)(this,e),(0,a.default)(this,"handleStoreChange",(function(){var e=u.currentRawResult();(function(e,t){if(f(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!s.call(t,n[o])||!f(e[n[o]],t[n[o]]))return!1;return!0})(e,u.lastResult)||(u.lastResult=e,u.notifyObservers())})),!t||!n||!r)throw new Error("ObservableQuery takes 3 arguments: queryId, definition and client");this.queryId=t,this.definition=n,this.client=r,this.observers={},this.idCounter=1,this.lastResult=this.currentRawResult(),this.options=i}return(0,i.default)(e,[{key:"currentResult",value:function(){return this.client.getQueryFromState(this.queryId,{hydrated:(0,u.default)(this.options,"hydrated",!0),singleDocData:!0})}},{key:"fetch",value:function(){return this.client.query(this.definition,{as:this.queryId})}},{key:"fetchMore",value:function(){var e=this.currentRawResult();return e.bookmark?this.client.query(this.definition.offsetBookmark(e.bookmark),{as:this.queryId}):this.client.query(this.definition.offset(e.data.length),{as:this.queryId})}},{key:"currentRawResult",value:function(){return(0,c.getRawQueryFromState)(this.getStore().getState(),this.queryId)}},{key:"notifyObservers",value:function(){var e=this;Object.keys(this.observers).forEach((function(t){return e.observers[t]()}))}},{key:"subscribeToStore",value:function(){if(this._unsubscribeStore)throw new Error("ObservableQuery instance is already subscribed to store.");this._unsubscribeStore=this.getStore().subscribe(this.handleStoreChange)}},{key:"unsubscribeFromStore",value:function(){if(!this._unsubscribeStore)throw new Error("ObservableQuery instance is not subscribed to store");this._unsubscribeStore()}},{key:"subscribe",value:function(e){var t=this,n=this.idCounter;return this.idCounter++,this.observers[n]=e,1===Object.keys(this.observers).length&&this.subscribeToStore(),function(){return t.unsubscribe(n)}}},{key:"unsubscribe",value:function(e){if(!this.observers[e])throw new Error("Cannot unsubscribe unknown callbackId ".concat(e));delete this.observers[e],0===Object.keys(this.observers).length&&(this.unsubscribeFromStore(),this._unsubscribeStore=null)}},{key:"getStore",value:function(){return this.client.store}}]),e}();function f(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}t.default=l},function(e,t,n){var r=n(193),o=n(180),i=n(297),a=n(298),u=n(26),c=n(589);e.exports=function(e){return o((function(t){var n=t.length,o=n,s=r.prototype.thru;for(e&&t.reverse();o--;){var l=t[o];if("function"!=typeof l)throw new TypeError("Expected a function");if(s&&!f&&"wrapper"==a(l))var f=new r([],!0)}for(o=f?o:n;++o<n;){l=t[o];var d=a(l),p="wrapper"==d?i(l):void 0;f=p&&c(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?f[a(p[0])].apply(f,p[3]):1==l.length&&c(l)?f[d]():f.thru(l)}return function(){var e=arguments,r=e[0];if(f&&1==e.length&&u(r))return f.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}},function(e,t,n){var r=n(587),o=n(250),i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t,n){var r=n(588),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],i=o.call(r,t)?n.length:0;i--;){var a=n[i],u=a.func;if(null==u||u==e)return a.name}return t}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.computeChildrenArgs=t.getQueryAttributes=t.default=t.fetchQuery=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(11)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(2)),f=r(n(17)),d=n(0),p=(r(n(41)),r(n(1)));r(n(295));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,l.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={},g=function(e,t){return t.fetch?t.fetch():e.query(t.definition,{as:t.queryId})};t.fetchQuery=g;var b=function(e,t){var n=e.create.bind(e),r=e.save.bind(e),o=e.destroy.bind(e),i=e.getAssociation.bind(e),a="function"==typeof t.query?t.query(e,t):t.query,u=e.makeObservableQuery(a,t),c=u.fetchMore.bind(u),s=t.mutations,l=(0,f.default)(t,["mutations"]),d="function"==typeof s?s(e,u,l):s,p=u.fetch?u.fetch.bind(u):null;return{client:e,observableQuery:u,queryDefinition:a,createDocument:n,saveDocument:r,deleteDocument:o,getAssociation:i,fetchMore:c,fetch:p,mutations:d}};t.getQueryAttributes=b;var w=function(e){var t=e.observableQuery,n=e.fetchMore,r=e.fetch,o=e.createDocument,i=e.saveDocument,a=e.deleteDocument,u=e.getAssociation,c=e.mutations;return[y({fetchMore:n,fetch:r},t.currentResult()),y({createDocument:o,saveDocument:i,deleteDocument:a,getAssociation:u},c)]};t.computeChildrenArgs=w;var x=function(e){(0,u.default)(n,e);var t=h(n);function n(e,r){var i;(0,o.default)(this,n),i=t.call(this,e,r),(0,l.default)((0,a.default)(i),"onQueryChange",(function(){i.recomputeChildrenArgs(),i.setState(v)}));var u=r.client;if(!r.client)throw new Error("Query should be used with client in context (use CozyProvider to set context)");return i.client=u,i.observableQuery=null,i.queryUnsubscribe=null,Object.assign((0,a.default)(i),b(u,e)),i.recomputeChildrenArgs(),i}return(0,i.default)(n,[{key:"componentDidMount",value:function(){this.queryUnsubscribe=this.observableQuery.subscribe(this.onQueryChange),!1!==this.props.enabled&&this.executeQueryRespectingFetchPolicy()}},{key:"executeQueryRespectingFetchPolicy",value:function(){if(this.props.fetchPolicy){var e=this.client.getQueryFromState(this.props.as);this.props.fetchPolicy&&"function"==typeof this.props.fetchPolicy&&this.props.fetchPolicy(e)&&g(this.client,this.observableQuery)}else g(this.client,this.observableQuery)}},{key:"componentDidUpdate",value:function(e){!1===e.enabled&&!1!==this.props.enabled&&this.executeQueryRespectingFetchPolicy()}},{key:"componentWillUnmount",value:function(){this.queryUnsubscribe&&this.queryUnsubscribe()}},{key:"recomputeChildrenArgs",value:function(){this.childrenArgs=w(this)}},{key:"render",value:function(){return(0,this.props.children)(this.childrenArgs[0],this.childrenArgs[1])}}]),n}(d.Component);t.default=x,x.contextTypes={client:p.default.object,store:p.default.object};var C=p.default.object;x.propTypes={query:p.default.oneOfType([p.default.func,C]).isRequired,enabled:p.default.bool,as:p.default.string,children:p.default.func.isRequired,fetchPolicy:p.default.func},x.defaultProps={enabled:!0}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.useQueries=void 0;var o=r(n(19)),i=r(n(2)),a=n(0),u=n(746),c=r(n(18)),s=r(n(128)),l=r(n(187)),f=(n(22),n(196));n(21);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,u.createSelectorHook)(f.clientContext),m=function(e,t){if(!h)throw new Error("You must use react-redux > 7.1.0 to use useQuery (uses useSelector) under the hood");if(!e)throw l.default.warn("Bad query",e),new Error("Bad query");var n,r="function"==typeof(n=e)?n():n,o=t.as,i=t.enabled,u=void 0===i||i;if(!o)throw new Error("You must specify options.as when using useQuery");var f=(0,s.default)(),d=h((function(){return void 0===t.singleDocData&&e.id&&l.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."),f.getQueryFromState(o,{hydrated:(0,c.default)(t,"hydrated",!0),singleDocData:(0,c.default)(t,"singleDocData",!1)})}));(0,a.useEffect)((function(){!1!==u&&f.query(r,t)}),[o,u]);var m=(0,a.useCallback)((function(){var e,t=f.getQueryFromState(o);return f.query((e=t).bookmark?e.definition.offsetBookmark(e.bookmark):e.definition.offset(e.data.length),{as:o})}),[o,f]),y=(0,a.useCallback)((function(){return f.query(r,t)}),[f,r,t]);return p(p({},d),{},{fetchMore:m,fetch:y})};t.useQueries=function(e){for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=(0,o.default)(r[n],2),a=i[0],u=i[1];t[a]=m(u.query,u)}return t};var y=m;t.default=y},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.setContractSyncStatusInAccount=t.getContractSyncStatusFromAccount=t.muteError=t.getMutedErrors=void 0;var o=r(n(2)),i=r(n(18)),a=r(n(127)),u=n(98);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return(0,i.default)(e,"mutedErrors",[])};t.getMutedErrors=l;t.muteError=function(e,t){var n=l(e);return n.push({type:t,mutedAt:(new Date).toISOString()}),s(s({},e),{},{mutedErrors:n})};t.getContractSyncStatusFromAccount=function(e,t){var n=(0,u.getHasManyItem)(e,"contracts",t);if(!n)throw new Error("Cannot find contrat ".concat(t," in account"));return(0,i.default)(n,"metadata.imported",!0)};t.setContractSyncStatusInAccount=function(e,t,n){return(0,u.updateHasManyItem)(e,"contracts",t,(function(e){if(void 0===e)throw new Error("Cannot find contrat ".concat(t," in account"));return(0,a.default)({},e,{metadata:{imported:n}})}))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getAppDisplayName=t.getUrl=t.isInstalled=t.getStoreInstallationURL=t.getStoreURL=void 0;var o=r(n(18)),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.slug)throw new Error("Expected app / konnector with the defined slug");var n=a(e,{slug:"store"});if(!n)return null;var r=n.links&&n.links.related;return r?"".concat(r,"#/discover/").concat(t.slug):null};t.getStoreURL=i;t.getStoreInstallationURL=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t);return n?"".concat(n,"/install"):null};var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.find((function(e){return e.attributes&&e.attributes.slug===t.slug}))};t.isInstalled=a;t.getUrl=function(e){return e.links&&e.links.related};t.getAppDisplayName=function(e,t){var n=(0,o.default)(e,"name_prefix"),r=(0,o.default)(e,"name"),i=(0,o.default)(e,["locales",t,"name"],r),a=(0,o.default)(e,["locales",t,"name_prefix"],n);return a&&"cozy"!==a.toLowerCase()?"".concat(a," ").concat(i):i}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=function(e){var t=e._id||e.id,n=e._type||p.DOCTYPE_FILES;return v({_id:t,id:t,_type:n},e)},t.ensureFilePath=function(e,t){if(e.path)return e;if(!t||!t.path)throw new Error("Could not define a file path for ".concat(e._id||e.id));return v({path:t.path+"/"+e.name},e)},t.getParentFolderId=function(e){var t=(0,u.default)(e,"attributes.dir_id");return""===t?null:t},t.fetchBlobFileById=t.isFromKonnector=t.hasCertifications=t.hasQualifications=t.isPlainText=t.doMobileUpload=t.readMobileFile=t.uploadFileWithConflictStrategy=t.generateFileNameForRevision=t.generateNewFileNameOnConflict=t.overrideFileForPath=t.move=t.getFullpath=t.hasMetadataAttribute=t.isReferencedByAlbum=t.fetchFilesByQualificationRules=t.saveFileQualification=t.isSharingShorcutNew=t.isSharingShortcutNew=t.isSharingShorcut=t.isSharingShortcut=t.getSharingShortcutTargetDoctype=t.getSharingShortcutTargetMime=t.getSharingShortcutStatus=t.isShortcut=t.shouldBeOpenedByOnlyOffice=t.isOnlyOfficeFile=t.isNote=t.isDirectory=t.isFile=t.splitFilename=t.ALBUMS_DOCTYPE=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(2)),u=r(n(18)),c=r(n(189)),s=r(n(269)),l=r(n(603)),f=n(197),d=n(21),p=(n(22),n(59));r(n(41));function h(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.ALBUMS_DOCTYPE="io.cozy.photos.albums";var g=/(.+)(\..*)$/,b=function(e){if(!(0,c.default)(e.name))throw new Error("file should have a name property");if("file"===e.type){var t=e.name.match(g);if(t)return{filename:t[1],extension:t[2]}}return{filename:e.name,extension:""}};t.splitFilename=b;var w=function(e){return e&&"file"===e.type};t.isFile=w;t.isDirectory=function(e){return e&&"directory"===e.type};var x=function(e){return!!(e&&e.name&&e.name.endsWith(".cozy-note")&&"file"===e.type&&e.metadata&&void 0!==e.metadata.content&&void 0!==e.metadata.schema&&void 0!==e.metadata.title&&void 0!==e.metadata.version)};t.isNote=x;var C=function(e){return w(e)&&!x(e)&&("text"===e.class||"spreadsheet"===e.class||"slide"===e.class)};t.isOnlyOfficeFile=C;t.shouldBeOpenedByOnlyOffice=function(e){return C(e)&&!e.name.endsWith(".txt")&&!e.name.endsWith(".md")};t.isShortcut=function(e){return e&&"shortcut"===e.class};var k=function(e){return(0,u.default)(e,"metadata.sharing.status")};t.getSharingShortcutStatus=k;t.getSharingShortcutTargetMime=function(e){return(0,u.default)(e,"metadata.target.mime")};t.getSharingShortcutTargetDoctype=function(e){return(0,u.default)(e,"metadata.target._type")};var S=function(e){return Boolean(k(e))};t.isSharingShortcut=S;t.isSharingShorcut=function(e){return console.warn("Deprecation: `isSharingShorcut` is deprecated, please use `isSharingShortcut` instead"),S(e)};var _=function(e){return"new"===k(e)};t.isSharingShortcutNew=_;t.isSharingShorcutNew=function(e){return console.warn("Deprecation: `isSharingShorcutNew` is deprecated, please use `isSharingShortcutNew` instead"),_(e)};var A=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,f.setQualification)(n,r),e.abrupt("return",t.collection(p.DOCTYPE_FILES).updateMetadataAttribute(n._id,i.metadata));case 2:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.saveFileQualification=A;var O=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.rules,i=n.count,a=(0,d.Q)(p.DOCTYPE_FILES).where(v({},r)).partialIndex({trashed:!1}).indexFields(["cozyMetadata.updatedAt","metadata.qualification"]).sortBy([{"cozyMetadata.updatedAt":"desc"}]).limitBy(i||1),e.next=4,t.query(a);case 4:return u=e.sent,e.abrupt("return",u);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchFilesByQualificationRules=O;t.isReferencedByAlbum=function(e){if(e.relationships&&e.relationships.referenced_by&&e.relationships.referenced_by.data&&e.relationships.referenced_by.data.length>0){var t,n=h(e.relationships.referenced_by.data);try{for(n.s();!(t=n.n()).done;){if("io.cozy.photos.albums"===t.value.type)return!0}}catch(e){n.e(e)}finally{n.f()}}return!1};t.hasMetadataAttribute=function(e){var t=e.file,n=e.attribute;return(0,s.default)(t,"metadata.".concat(n))};var E=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("You must provide a dirId");case 2:return e.next=4,t.query((0,d.Q)(p.DOCTYPE_FILES).getById(n));case 4:return i=e.sent,a=i.data,u=(0,l.default)(a.path,"/"),e.abrupt("return","".concat(u,"/").concat(r));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.getFullpath=E;var B=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u,c,s,l,f,h,m,y,v=arguments;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=v.length>3&&void 0!==v[3]&&v[3],a=r.folderId,u=r.path,e.prev=2,e.next=5,t.collection(p.DOCTYPE_FILES).updateFileMetadata(n,{dir_id:a});case 5:return c=e.sent,e.abrupt("return",{moved:c.data,deleted:null});case 9:if(e.prev=9,e.t0=e.catch(2),409!==e.t0.status||!i){e.next=35;break}if(!u){e.next=16;break}s=u,e.next=24;break;case 16:return e.next=18,t.query((0,d.Q)(p.DOCTYPE_FILES).getById(n));case 18:return l=e.sent,f=l.data,h=f.name,e.next=23,E(t,a,h);case 23:s=e.sent;case 24:return e.next=26,t.collection(p.DOCTYPE_FILES).statByPath(s);case 26:return m=e.sent,e.next=29,t.collection(p.DOCTYPE_FILES).destroy(m.data);case 29:return e.next=31,t.collection(p.DOCTYPE_FILES).updateFileMetadata(n,{dir_id:a});case 31:return y=e.sent,e.abrupt("return",{moved:y.data,deleted:m.data.id});case 35:throw e.t0;case 36:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.move=B;var j=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r,i){var a,u,c,s,l,f,d,h,m;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=n).endsWith("/")||(a+="/"),u=t.collection(p.DOCTYPE_FILES),e.prev=3,e.next=6,u.statByPath(a+r.name);case 6:return c=e.sent,s=c.data,l=s.id,f=s.dir_id,e.next=10,u.updateFile(r,{dirId:f,fileId:l,metadata:i});case 10:return d=e.sent,e.abrupt("return",d);case 14:if(e.prev=14,e.t0=e.catch(3),!/Not Found/.test(e.t0)){e.next=24;break}return e.next=19,u.ensureDirectoryExists(a);case 19:return h=e.sent,e.next=22,u.createFile(r,{dirId:h,metadata:i});case 22:return m=e.sent,e.abrupt("return",m);case 24:throw e.t0;case 25:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t,n,r,o){return e.apply(this,arguments)}}();t.overrideFileForPath=j;var P=function(e){var t=new RegExp("(_)([0-9]+)$"),n=e.match(t);if(n){var r=parseInt(n[2]);return r++,e.replace(new RegExp("(_)([0-9]+)$"),"_".concat(r))}return"".concat(e,"_1")};t.generateNewFileNameOnConflict=P;t.generateFileNameForRevision=function(e,t,n){var r=b(e),o=r.filename,i=r.extension;return"".concat(o,"_").concat(n(t.updated_at,"DD MMMM - HH[h]mm")).concat(i)};var T=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u,c,s,l,f,d,h,m,y;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.name,a=r.dirId,u=r.conflictStrategy,e.prev=1,e.next=4,E(t,a,i);case 4:return c=e.sent,e.next=7,t.collection(p.DOCTYPE_FILES).statByPath(c);case 7:if(s=e.sent,l=s.data.id,"erase"!==u){e.next=16;break}return e.next=12,t.collection(p.DOCTYPE_FILES).updateFile(n,v(v({},r),{},{fileId:l}));case 12:return f=e.sent,e.abrupt("return",f);case 16:return d=b({name:i,type:"file"}),h=d.filename,m=d.extension,y=P(h)+m,e.abrupt("return",T(t,n,v(v({},r),{},{name:y})));case 19:e.next=26;break;case 21:if(e.prev=21,e.t0=e.catch(1),!/Not Found/.test(e.t0.message)){e.next=25;break}return e.abrupt("return",t.collection(p.DOCTYPE_FILES).createFile(n,r));case 25:throw e.t0;case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.uploadFileWithConflictStrategy=T;var z=function(){var e=(0,i.default)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Promise((function(e,n){var r=function(){var t=(0,i.default)(o.default.mark((function t(r){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.file(function(){var t=(0,i.default)(o.default.mark((function t(n){var r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=new FileReader).onloadend=(0,i.default)(o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e(r.result);case 1:case"end":return t.stop()}}),t)}))),r.readAsArrayBuffer(n);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(function(e){console.error("error getting fileentry file!"+e),n(e)}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();window.resolveLocalFileSystemURL(t,r,(function(e){n(e)}))})),e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.readMobileFile=z;var I=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(n);case 2:return i=e.sent,e.abrupt("return",T(t,i,r));case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.doMobileUpload=I;t.isPlainText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?/^text\//.test(e):/\.(txt|md)$/.test(t)};t.hasQualifications=function(e){return(0,s.default)(e,"metadata.qualification")};t.hasCertifications=function(e){return(0,u.default)(e,"metadata.carbonCopy",!1)||(0,u.default)(e,"metadata.electronicSafe",!1)};t.isFromKonnector=function(e){return(0,s.default)(e,"cozyMetadata.sourceAccount")};var D=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.collection(p.DOCTYPE_FILES),e.next=3,r.fetchFileContentById(n);case 3:return i=e.sent,e.next=6,i.blob();case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchBlobFileById=D},function(e,t,n){"use strict";e.exports=n(618)},function(e,t,n){"use strict";var r=n(27),o=n(62),i=r("%TypeError%"),a=n(619),u=n(306),c=n(624),s=n(625),l=n(627),f=n(647),d=n(648),p=n(649),h=o("String.prototype.split"),m=Object("a"),y="a"!==m[0]||!(0 in m);e.exports=function(e){var t,n=f(this),r=y&&p(this)?h(this,""):n,o=l(r);if(!s(e))throw new i("Array.prototype.forEach callback must be a function");arguments.length>1&&(t=arguments[1]);for(var m=0;m<o;){var v=d(m),g=c(r,v);if(g){var b=u(r,v);a(e,t,[b,m,r])}m+=1}}},function(e,t,n){"use strict";var r=n(27)("%TypeError%"),o=n(621),i=n(307),a=n(198);e.exports=function(e,t){if("Object"!==a(e))throw new r("Assertion failed: Type(O) is not Object");if(!i(t))throw new r("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=n(652),o=n(305);e.exports=function(){var e=Array.prototype.forEach;return r(e)?e:o}},function(e,t,n){"use strict";var r=n(311),o=n(62),i=o("Object.prototype.propertyIsEnumerable"),a=o("Array.prototype.push");e.exports=function(e){var t=r(e),n=[];for(var o in t)i(t,o)&&a(n,[o,t[o]]);return n}},function(e,t,n){"use strict";e.exports=n(655)},function(e,t,n){"use strict";var r=n(310);e.exports=function(){return"function"==typeof Object.entries?Object.entries:r}},function(e,t,n){"use strict";var r=n(311),o=n(658),i=n(62)("String.prototype.replace"),a=/^[\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]+/,u=/[\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]+$/;e.exports=function(){var e=o(r(this));return i(i(e,a,""),u,"")}},function(e,t,n){"use strict";var r=n(313);e.exports=function(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.themesList=void 0;var r=n(197),o=(n(22),function(e){return e.map((function(e){try{return r.Qualification.getByLabel(e)}catch(e){return console.log("error",e),null}})).filter((function(e){return e}))}),i=[{id:"theme1",label:"identity",icon:"people",items:o(["identity_photo","national_id_card","passport","residence_permit","family_record_book","birth_certificate","driver_license","citizen_registration_certificate","other_identity_document"]),defaultItems:["birth_certificate"]},{id:"theme2",label:"family",icon:"team",items:o(["family_record_book","birth_certificate","wedding","pacs","divorce","large_family_card","caf","payment_proof_family_allowance","other_family_document"]),defaultItems:["family_record_book"]},{id:"theme3",label:"work_study",icon:"company",items:o(["diploma","work_contract","pay_sheet","unemployment_benefit","pension","work_disability_recognition","gradebook","student_card","school_attendance_certificate","resume","motivation_letter","other_work_document"])},{id:"theme4",label:"health",icon:"heart",items:o(["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","other_health_document"])},{id:"theme5",label:"home",icon:"home",items:o(["phone_invoice","isp_invoice","telecom_invoice","energy_invoice","water_invoice","house_sale_agreeement","building_permit","technical_diagnostic_record","unfit_for_habitation_declaration","lease","rent_receipt","accommodation_proof","house_insurance","work_quote","work_invoice","other_house_document"])},{id:"theme6",label:"transport",icon:"car",items:o(["driver_license","vehicle_registration","car_insurance","mechanic_invoice","transport_invoice","other_transport_document"]),defaultItems:["driver_license"]},{id:"theme7",label:"activity",icon:"compass",items:o(["personal_sporting_licence","other_activity_document"])},{id:"theme8",label:"finance",icon:"bank",items:o(["tax_return","tax_notice","tax_timetable","receipt","other_tax_document","bank_details","bank_statement","loan_agreement","payment_proof_family_allowance","other_bank_document","other_revenue"])},{id:"theme9",label:"invoice",icon:"bill",items:o(["phone_invoice","isp_invoice","telecom_invoice","energy_invoice","water_invoice","appliance_invoice","web_service_invoice","restaurant_invoice","work_invoice","transport_invoice","health_invoice","other_invoice"])}];t.themesList=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;r(n(83)),n(77);var o=function(){return null};o.isRequired=function(){return null};var i=o;t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){return function(){return null}};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.specialProperty=void 0;r(n(2)),r(n(12));t.specialProperty="exact-prop: ";var o=function(e){return e};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionName=o,t.default=void 0;var r=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){var t="".concat(e).match(r);return t&&t[1]||""}var i=function(e){return"string"==typeof e?e:e?e.displayName||e.name||o(e)||"Component":void 0};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.createGenerateClassName=t.sheets=t.RuleList=t.SheetsManager=t.SheetsRegistry=t.toCssValue=t.getDynamicStyles=void 0;var r=n(686);Object.defineProperty(t,"getDynamicStyles",{enumerable:!0,get:function(){return f(r).default}});var o=n(130);Object.defineProperty(t,"toCssValue",{enumerable:!0,get:function(){return f(o).default}});var i=n(322);Object.defineProperty(t,"SheetsRegistry",{enumerable:!0,get:function(){return f(i).default}});var a=n(687);Object.defineProperty(t,"SheetsManager",{enumerable:!0,get:function(){return f(a).default}});var u=n(100);Object.defineProperty(t,"RuleList",{enumerable:!0,get:function(){return f(u).default}});var c=n(201);Object.defineProperty(t,"sheets",{enumerable:!0,get:function(){return f(c).default}});var s=n(325);Object.defineProperty(t,"createGenerateClassName",{enumerable:!0,get:function(){return f(s).default}});var l=f(n(691));function f(e){return e&&e.__esModule?e:{default:e}}var d=t.create=function(e){return new l.default(e)};t.default=d()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.registry=[]}return r(e,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter((function(e){return e.attached})).map((function(t){return t.toString(e)})).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(134),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){return e&&e[i.default]&&e===e[i.default]()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(73)),o=(i(n(326)),i(n(690)));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){var e=0;return function(t,n){(e+=1)>1e10&&(0,r.default)(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var i="c",a="";return n&&(i=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(a+=n.options.jss.id)),""+i+o.default+a+e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(324)),a=u(n(100));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t,n){var o=this;for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.update=function(e,t){return"string"==typeof e?o.rules.update(e,t):o.rules.update(e),o},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=r({},n,{sheet:this,parent:this,classes:this.classes}),this.renderer=new n.Renderer(this),this.rules=new a.default(this.options),t)this.rules.add(i,t[i]);this.rules.process()}return o(e,[{key:"attach",value:function(){return this.attached||(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0),this}},{key:"detach",value:function(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&(0,i.default)(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),e}();t.default=c},function(e,t){e.exports=function(e,t){for(var n=e.split("."),r=t.split("."),o=0;o<3;o++){var i=Number(n[o]),a=Number(r[o]);if(i>a)return 1;if(a>i)return-1;if(!isNaN(i)&&isNaN(a))return 1;if(isNaN(i)&&!isNaN(a))return-1}return 0}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Intents",{enumerable:!0,get:function(){return o.default}});var o=r(n(360))},function(e,t,n){"use strict";(function(e){var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getWebSocketToken=t.getWebSocketUrl=t.generateKey=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(19)),u=r(n(4)),c=r(n(6)),s=r(n(2)),l=r(n(45)),f=r(n(367)),d=r(n(418)),p=void 0!==typeof window&&window.minilog||d.default,h=p("cozy-realtime");p.suggest.deny("cozy-realtime","info");var m=function(e,t,n){return"".concat(e).concat("//").concat(t).concat("//").concat(n)};t.generateKey=m;var y=function(e,t){if("function"!=typeof e&&"function"!=typeof t)throw new Error("You should call this function with an handler");var n,r;return t?(n=e,r=t):(n=void 0,r=e),{id:n,handler:r}},v=function(e,t,n,r){var o;if(["created","updated","deleted"].includes(e)||(o="'".concat(e,"' is not a valid event, valid events are 'created', 'updated' or 'deleted'.")),"string"!=typeof t&&(o="'".concat(t,"' is not a valide type, it should be a string.")),n&&"created"===e&&(o="The 'id' should not be specified for 'created' event."),"function"!=typeof r&&(o="The handler '".concat(r,"' should be a function.")),o)throw h.error(o),new Error(o)},g=function(e){var t=e.stackClient.uri,n=function(e){return!!e.match("^(https:/{2})")}(t)?"wss:":"ws:",r=new URL(t).host;return"".concat(n,"//").concat(r,"/realtime/")};t.getWebSocketUrl=g;var b=function(e){return e.stackClient.token.accessToken||e.stackClient.token.token};t.getWebSocketToken=b;var w=function(){function t(n){var r=n.cozyClient,o=n.client;if((0,u.default)(this,t),(0,s.default)(this,"_cozyClient",null),(0,s.default)(this,"_socket",null),(0,s.default)(this,"_retryDelay",1e3),(0,s.default)(this,"_retryLimit",60),r&&console.warn("Realtime: options.cozyClient is deprecated, please use options.client"),this._cozyClient=o||r,!this._cozyClient)throw new Error("Realtime must be initialized with a client. Ex: new Realtime({ client })");this._updateAuthentication=this._updateAuthentication.bind(this),this.unsubscribeAll=this.unsubscribeAll.bind(this),this._receiveMessage=this._receiveMessage.bind(this),this._receiveError=this._receiveError.bind(this),this._resubscribe=this._resubscribe.bind(this),this._beforeUnload=this._beforeUnload.bind(this),this._resetSocket=this._resetSocket.bind(this),this._createSocket(),this._cozyClient.on("login",this._updateAuthentication),this._cozyClient.on("tokenRefreshed",this._updateAuthentication),this._cozyClient.on("logout",this.unsubscribeAll),e&&(e.addEventListener("beforeunload",this._beforeUnload),e.addEventListener("online",this._resubscribe),e.removeEventListener("offline",this._resetSocket))}return(0,c.default)(t,[{key:"_beforeUnload",value:function(){e.removeEventListener("beforeunload",this._windowUnload),this.unsubscribeAll()}},{key:"_createSocket",value:function(){var e=this;if(!this._socket){this._socket=new f.default((function(){return g(e._cozyClient)}),(function(){return b(e._cozyClient)})),this._socket.on("message",this._receiveMessage),this._socket.on("error",this._receiveError)}}},{key:"_receiveError",value:function(t){h.info("Receive error: ".concat(t)),this._resetSocket(),0===this._retryLimit?this.emit("error",t):(this.retry&&clearTimeout(this.retry),e.navigator.onLine&&(this.retry=setTimeout(this._resubscribe,this._retryDelay)))}},{key:"_resubscribe",value:function(){var e=this;this._retryLimit--;var t=Object.keys(this._events).map((function(t){if(t.includes("//")&&0!==e._events[t].length){var n=t.split("//"),r=(0,a.default)(n,3),o=r[1],i=r[2];return"undefined"===i&&(i=void 0),{type:o,id:i}}})).filter(Boolean),n=!0,r=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var c=i.value,s=c.type,l=c.id;this._socket.subscribe(s,l)}}catch(e){r=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}}},{key:"_receiveMessage",value:function(e,t){var n=e.type,r=e.id,o=e.eventName,i=[m(o,n)];r&&i.push(m(o,n,r));for(var a=0;a<i.length;a++){var u=i[a];h.debug("Emitting",u,t),this.emit(u,t)}}},{key:"_updateAuthentication",value:function(){h.info("Update token on socket"),this._socket.authenticate()}},{key:"_resetSocket",value:function(){this._socket&&(this._socket.close(),this._socket=null),this._createSocket()}},{key:"subscribe",value:function(e,t,n,r){var a=this,u=y(n,r),c=u.handler,s=u.id;return v(e,t,s,c),this._socket.isConnecting()?new Promise((function(u){a._socket.once("open",(0,i.default)(o.default.mark((function i(){return o.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,a.subscribe(e,t,n,r);case 2:u();case 3:case"end":return o.stop()}}),i)}))))})):new Promise((function(n){var r=m(e,t,s);a.on(r,c),a._socket.once("subscribe_".concat(t,"_").concat(s),n),a._socket.subscribe(t,s)}))}},{key:"unsubscribe",value:function(e,t,n,r){var o=y(n,r),i=o.handler,a=o.id;v(e,t,a,i);var u=m(e,t,a);this.removeListener(u,i),this._haveEventHandler()||this._resetSocket()}},{key:"unsubscribeAll",value:function(){var e=this;this._getEventKeys().map((function(t){return e._events[t].length>0&&t})).filter(Boolean).forEach((function(t){return e._events[t]=[]})),this._resetSocket()}},{key:"_getEventKeys",value:function(){return this._events?Object.keys(this._events).map((function(e){return e.includes("//")&&e})).filter(Boolean):[]}},{key:"_haveEventHandler",value:function(){var e=this;return this._getEventKeys().map((function(t){return e._events[t].length})).filter(Boolean).length>0}}]),t}();l.default.mixin(w);var x=w;t.default=x}).call(this,n(33))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(33))},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function u(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var o=e.length,i=n+(r?1:-1);for(;r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,l,n);var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function c(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)if(n(t,e[r]))return!0;return!1}function s(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function l(e){return e!=e}function f(e,t){return e.has(t)}function d(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var p,h=Array.prototype,m=Function.prototype,y=Object.prototype,v=i["__core-js_shared__"],g=(p=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",b=m.toString,w=y.hasOwnProperty,x=y.toString,C=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=i.Symbol,S=y.propertyIsEnumerable,_=h.splice,A=k?k.isConcatSpreadable:void 0,O=Math.max,E=N(i,"Map"),B=N(i,"Set"),j=N(Object,"create");function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(e){var t=-1,n=e?e.length:0;for(this.__data__=new z;++t<n;)this.add(e[t])}function D(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function R(e){return!(!Q(e)||(t=e,g&&g in t))&&(W(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?C:n).test(function(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}P.prototype.clear=function(){this.__data__=j?j(null):{}},P.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},P.prototype.get=function(e){var t=this.__data__;if(j){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return w.call(t,e)?t[e]:void 0},P.prototype.has=function(e){var t=this.__data__;return j?void 0!==t[e]:w.call(t,e)},P.prototype.set=function(e,t){return this.__data__[e]=j&&void 0===t?"__lodash_hash_undefined__":t,this},T.prototype.clear=function(){this.__data__=[]},T.prototype.delete=function(e){var t=this.__data__,n=D(t,e);return!(n<0)&&(n==t.length-1?t.pop():_.call(t,n,1),!0)},T.prototype.get=function(e){var t=this.__data__,n=D(t,e);return n<0?void 0:t[n][1]},T.prototype.has=function(e){return D(this.__data__,e)>-1},T.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},z.prototype.clear=function(){this.__data__={hash:new P,map:new(E||T),string:new P}},z.prototype.delete=function(e){return M(this,e).delete(e)},z.prototype.get=function(e){return M(this,e).get(e)},z.prototype.has=function(e){return M(this,e).has(e)},z.prototype.set=function(e,t){return M(this,e).set(e,t),this},I.prototype.add=I.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},I.prototype.has=function(e){return this.__data__.has(e)};var F=B&&1/d(new B([,-0]))[1]==1/0?function(e){return new B(e)}:function(){};function M(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function N(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return R(n)?n:void 0}function L(e){return q(e)||function(e){return H(e)&&w.call(e,"callee")&&(!S.call(e,"callee")||"[object Arguments]"==x.call(e))}(e)||!!(A&&e&&e[A])}var U,$,G=(U=function(e){var t,n,r=(n=(t=e)?t.length:0)?t[n-1]:void 0;return H(r)&&(r=void 0),function(e,t,n){var r=-1,o=u,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=c;else if(i>=200){var p=t?null:F(e);if(p)return d(p);a=!1,o=f,l=new I}else l=t?[]:s;e:for(;++r<i;){var h=e[r],m=t?t(h):h;if(h=n||0!==h?h:0,a&&m==m){for(var y=l.length;y--;)if(l[y]===m)continue e;t&&l.push(m),s.push(h)}else o(l,m,n)||(l!==s&&l.push(m),s.push(h))}return s}(function e(t,n,r,o,i){var a=-1,u=t.length;for(r||(r=L),i||(i=[]);++a<u;){var c=t[a];n>0&&r(c)?n>1?e(c,n-1,r,o,i):s(i,c):o||(i[i.length]=c)}return i}(e,1,H,!0),void 0,r)},$=O(void 0===$?U.length-1:$,0),function(){for(var e=arguments,t=-1,n=O(e.length-$,0),r=Array(n);++t<n;)r[t]=e[$+t];t=-1;for(var o=Array($+1);++t<$;)o[t]=e[t];return o[$]=r,a(U,this,o)});var q=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!W(e)}function H(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}function W(e){var t=Q(e)?x.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=G}).call(this,n(33))},function(e){e.exports=JSON.parse('{"drawer":"Show menu drawer","profile":"Profile","connectedDevices":"Connected devices","storage":"Storage","storage_phrase":"%{diskUsage} GB of %{diskQuota} GB used","view_offers":"View offers","view_my_offer":"My offer","help":"Help","logout":"Sign 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 home...","home":"Back to home","home_title":"Home"},"Categories":{"cozy":"Cozy apps","partners":"Partners apps","ptnb":"expPTNB","others":"Other apps"},"claudy":{"title":"How to drive your Cozy?"},"searchbar":{"placeholder":"Search anything","empty":"No result has been found for the query “%{query}”"},"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"}}}')},function(e){e.exports=JSON.parse('{"drawer":"Afficher le menu latéral","profile":"Profil","connectedDevices":"Appareils connectés","storage":"Espace disque","storage_phrase":"%{diskUsage} Go sur %{diskQuota} Go","view_offers":"Voir les offres","view_my_offer":"Mon offre","help":"Aide","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 à l\'accueil...","home":"Retour à l\'accueil","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 ?"},"searchbar":{"placeholder":"Rechercher","empty":"Aucun résultat trouvé pour la requête \\"%{query}\\""},"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"}}}')},function(e){e.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?"},"searchbar":{"placeholder":"Buscar","empty":"No se ha encontrado ningún resultado para su consulta “%{query}”"},"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"}}}')},function(e,t,n){var r=n(455),o=n(460),i=n(241),a=n(55),u=n(463),c=n(90);var s={M:function(e){return e.getMonth()+1},MM:function(e){return d(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return d(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return d(r(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return o(e)},WW:function(e){return d(o(e),2)},YY:function(e){return d(e.getFullYear(),4).substr(2)},YYYY:function(e){return d(e.getFullYear(),4)},GG:function(e){return String(i(e)).substr(2)},GGGG:function(e){return i(e)},H:function(e){return e.getHours()},HH:function(e){return d(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return d(s.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return d(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return d(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return d(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return d(e.getMilliseconds(),3)},Z:function(e){return f(e.getTimezoneOffset(),":")},ZZ:function(e){return f(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function l(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function f(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),o=r%60;return n+d(Math.floor(r/60),2)+t+d(o,2)}function d(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}e.exports=function(e,t,n){var r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",o=(n||{}).locale,i=c.format.formatters,f=c.format.formattingTokensRegExp;o&&o.format&&o.format.formatters&&(i=o.format.formatters,o.format.formattingTokensRegExp&&(f=o.format.formattingTokensRegExp));var d=a(e);return u(d)?function(e,t,n){var r,o,i=e.match(n),a=i.length;for(r=0;r<a;r++)o=t[i[r]]||s[i[r]],i[r]=o||l(i[r]);return function(e){for(var t="",n=0;n<a;n++)i[n]instanceof Function?t+=i[n](e,s):t+=i[n];return t}}(r,i,f)(d):"Invalid Date"}},function(e,t,n){"use strict";e.exports=n(673).default},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,s=u||c||Function("return this")(),l=Object.prototype.toString,f=Math.max,d=Math.min,p=function(){return s.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var u=o.test(e);return u||i.test(e)?a(e.slice(2),u?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,a,u,c,s=0,l=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,i=o;return r=o=void 0,s=t,a=e.apply(i,n)}function b(e){return s=e,u=setTimeout(x,t),l?g(e):a}function w(e){var n=e-c;return void 0===c||n>=t||n<0||y&&e-s>=i}function x(){var e=p();if(w(e))return C(e);u=setTimeout(x,function(e){var n=t-(e-c);return y?d(n,i-(e-s)):n}(e))}function C(e){return u=void 0,v&&r?g(e):(r=o=void 0,a)}function k(){var e=p(),n=w(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return b(c);if(y)return u=setTimeout(x,t),g(c)}return void 0===u&&(u=setTimeout(x,t)),a}return t=m(t)||0,h(n)&&(l=!!n.leading,i=(y="maxWait"in n)?f(m(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=c=o=u=void 0},k.flush=function(){return void 0===u?a:C(p())},k}}).call(this,n(33))},function(e,t,n){var r=n(63),o=0;e.exports=function(e){var t=++o;return r(e)+t}},function(e,t,n){(t=e.exports=n(70)(!0)).push([e.i,"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}.cozy-ui-bar-c-overlay--3097A{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}","",{version:3,sources:["/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Overlay/node_modules/cozy-ui/stylus/settings/z-index.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Overlay/styles.styl","/home/anc/cozy/cozy-bar/node_modules/cozy-ui/react/Overlay/node_modules/cozy-ui/stylus/components/overlay.styl"],names:[],mappings:"AAsDA,KACI,kBACA,eACA,eACA,wBACA,gBACA,gBACA,sBACA,oBACA,oBACA,2BACA,mBACA,kBACA,iBCrDJ,CCZA,8BACI,WACA,eACA,MACA,OACA,YACA,WACA,0BACA,mBACA,6CDcJ,CAAA",file:"styles.styl",sourcesContent:["/*------------------------------------*\\\n Please, edit this file properly, with a 10 based incrementation,\n and keep things in order so it remains easily readable.\n\n How to use: just import this file in your component's style and call\n the related variable\n e.g.\n .my-app\n z-index $app-index\n\\*------------------------------------*/\n\n/*\n Z-Index\n\n List of every z-index related to components in order to keep a clean\n & maintainable order of indexes.\n\n Those indexes are 10 based so you can deal with extra layers using `$index + 1`\n\n $below-index - **index -1** Layer below the app, mostly for hiding purpose\n $app-index - **index 0** App index, the ground zero.\n $low-index - **index 1** Low level index, to make sure a positionned element goes over elements with z-index 0.\n $alert-index-mobile - **index 10** Alert index like success, errors, infos *mobile only*\n $nav-index - **index 20** Nav index\n $bar-index - **index 21** Bar index equals Nav index + 1, not actually used, just as reference.\n $selection-index - **index 30** Selection bar index, with actions for selected items\n $popover-index - **index 40** Popover index used by dropdown menu for example\n $overlay - **index 50** Overlay index for modals background\n $file-action-menu - **index 60** File action menu index *mobile only*\n $modal-index - **index 70** Modal index\n $modal-footer-index - **index 71** Modal footer index\n $modal-toolbar-index - **index 72** Modal toolbar index\n $alert-index - **index 80** Alert index such as success, errors, infos\n\n Styleguide Settings.z-index\n*/\n\n$below-index = -1\n$app-index = 0\n$low-index = 1\n$alert-index-mobile = 10\n$nav-index = 20\n$bar-index = $nav-index + 1 // Not actually used, just as reference\n$selection-index = 30\n$popover-index = 40\n$overlay-index = 50\n$file-action-menu = 60 // replaced by $drawer-index\n$drawer-index = 60\n$modal-index = 70\n$modal-footer-index = $modal-index + 1\n$modal-toolbar-index = $modal-footer-index + 1\n$alert-index = 80\n\n// @stylint off\nhtml\n --zIndex-below $below-index\n --zIndex-app $app-index\n --zIndex-low $low-index\n --zIndex-alertMobile $alert-index-mobile\n --zIndex-nav $nav-index\n --zIndex-bar $bar-index\n --zIndex-selection $selection-index\n --zIndex-popover $popover-index\n --zIndex-overlay $overlay-index\n --zIndex-fileActionMenu $file-action-menu\n --zIndex-drawer $drawer-index\n --zIndex-modal $modal-index\n --zindex-alert $alert-index\n// @stylint on\n\n","html {\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.c-overlay {\n z-index: 50;\n position: fixed;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background: var(--overlay);\n visibility: visible;\n transition: opacity 0.3s, visibility 0s ease-out;\n}\n","@require '../settings/z-index'\n\n$overlay\n z-index $overlay-index\n position fixed\n top 0\n left 0\n height 100%\n width 100%\n background var(--overlay)\n visibility visible\n transition opacity .3s, visibility 0s ease-out\n"],sourceRoot:""}]),t.locals={"c-overlay":"cozy-ui-bar-c-overlay--3097A"}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var o=r(n(684))},function(e,t,n){(function(e){!function(t){"use strict";function n(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 o(e,t,n){o.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function i(e,t){i.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function u(e,t,n){u.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0})}function c(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e}function s(e){var t=void 0===e?"undefined":k(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,n,r,f,d,p){p=p||[];var h=(f=f||[]).slice(0);if(void 0!==d){if(r){if("function"==typeof r&&r(h,d))return;if("object"===(void 0===r?"undefined":k(r))){if(r.prefilter&&r.prefilter(h,d))return;if(r.normalize){var m=r.normalize(h,d,e,t);m&&(e=m[0],t=m[1])}}}h.push(d)}"regexp"===s(e)&&"regexp"===s(t)&&(e=e.toString(),t=t.toString());var y=void 0===e?"undefined":k(e),v=void 0===t?"undefined":k(t),g="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),b="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!g&&b)n(new i(h,t));else if(!b&&g)n(new a(h,e));else if(s(e)!==s(t))n(new o(h,e,t));else if("date"===s(e)&&e-t!=0)n(new o(h,e,t));else if("object"===y&&null!==e&&null!==t)if(p.filter((function(t){return t.lhs===e})).length)e!==t&&n(new o(h,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var w;for(e.length,w=0;w<e.length;w++)w>=t.length?n(new u(h,w,new a(void 0,e[w]))):l(e[w],t[w],n,r,h,w,p);for(;w<t.length;)n(new u(h,w,new i(void 0,t[w++])))}else{var x=Object.keys(e),C=Object.keys(t);x.forEach((function(o,i){var a=C.indexOf(o);a>=0?(l(e[o],t[o],n,r,h,o,p),C=c(C,a)):l(e[o],void 0,n,r,h,o,p)})),C.forEach((function(e){l(void 0,t[e],n,r,h,e,p)}))}p.length=p.length-1}else e!==t&&("number"===y&&isNaN(e)&&isNaN(t)||n(new o(h,e,t)))}function f(e,t,n,r){return r=r||[],l(e,t,(function(e){e&&r.push(e)}),n),r.length?r:void 0}function d(e,t,n){if(e&&t&&n&&n.kind){for(var r=e,o=-1,i=n.path?n.path.length-1:0;++o<i;)void 0===r[n.path[o]]&&(r[n.path[o]]="number"==typeof n.path[o]?[]:{}),r=r[n.path[o]];switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var o,i=t[n],a=r.path.length-1;for(o=0;o<a;o++)i=i[r.path[o]];switch(r.kind){case"A":e(i[r.path[o]],r.index,r.item);break;case"D":delete i[r.path[o]];break;case"E":case"N":i[r.path[o]]=r.rhs}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":t=c(t,n);break;case"E":case"N":t[n]=r.rhs}return t}(n.path?r[n.path[o]]:r,n.index,n.item);break;case"D":delete r[n.path[o]];break;case"E":case"N":r[n.path[o]]=n.rhs}}}function p(e){return"color: "+A[e].color+"; font-weight: bold"}function h(e,t,n,r){var o=f(e,t);try{r?n.groupCollapsed("diff"):n.group("diff")}catch(e){n.log("diff")}o?o.forEach((function(e){var t=e.kind,r=function(e){var t=e.kind,n=e.path,r=e.lhs,o=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[n.join("."),r,"→",o];case"N":return[n.join("."),o];case"D":return[n.join(".")];case"A":return[n.join(".")+"["+i+"]",a];default:return[]}}(e);n.log.apply(n,["%c "+A[t].text,p(t)].concat(S(r)))})):n.log("—— no diff ——");try{n.groupEnd()}catch(e){n.log("—— diff end —— ")}}function m(e,t,n,r){switch(void 0===e?"undefined":k(e)){case"object":return"function"==typeof e[r]?e[r].apply(e,S(n)):e[r];case"function":return e(t);default:return e}}function y(e,t){var n=t.logger,r=t.actionTransformer,o=t.titleFormatter,i=void 0===o?function(e){var t=e.timestamp,n=e.duration;return function(e,r,o){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+r),n&&i.push("%c(in "+o.toFixed(2)+" ms)"),i.join(" ")}}(t):o,a=t.collapsed,u=t.colors,c=t.level,s=t.diff,l=void 0===t.titleFormatter;e.forEach((function(o,f){var d=o.started,p=o.startedTime,y=o.action,v=o.prevState,g=o.error,b=o.took,w=o.nextState,C=e[f+1];C&&(w=C.prevState,b=C.started-d);var k=r(y),S="function"==typeof a?a((function(){return w}),y,o):a,_=x(p),A=u.title?"color: "+u.title(k)+";":"",O=["color: gray; font-weight: lighter;"];O.push(A),t.timestamp&&O.push("color: gray; font-weight: lighter;"),t.duration&&O.push("color: gray; font-weight: lighter;");var E=i(k,_,b);try{S?u.title&&l?n.groupCollapsed.apply(n,["%c "+E].concat(O)):n.groupCollapsed(E):u.title&&l?n.group.apply(n,["%c "+E].concat(O)):n.group(E)}catch(e){n.log(E)}var B=m(c,k,[v],"prevState"),j=m(c,k,[k],"action"),P=m(c,k,[g,v],"error"),T=m(c,k,[w],"nextState");if(B)if(u.prevState){var z="color: "+u.prevState(v)+"; font-weight: bold";n[B]("%c prev state",z,v)}else n[B]("prev state",v);if(j)if(u.action){var I="color: "+u.action(k)+"; font-weight: bold";n[j]("%c action ",I,k)}else n[j]("action ",k);if(g&&P)if(u.error){var D="color: "+u.error(g,v)+"; font-weight: bold;";n[P]("%c error ",D,g)}else n[P]("error ",g);if(T)if(u.nextState){var R="color: "+u.nextState(w)+"; font-weight: bold";n[T]("%c next state",R,w)}else n[T]("next state",w);s&&h(v,w,n,S);try{n.groupEnd()}catch(e){n.log("—— log end ——")}}))}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},O,e),n=t.logger,r=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,u=t.diffPredicate;if(void 0===n)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 c=[];return function(e){var n=e.getState;return function(e){return function(s){if("function"==typeof i&&!i(n,s))return e(s);var l={};c.push(l),l.started=C.now(),l.startedTime=new Date,l.prevState=r(n()),l.action=s;var f=void 0;if(a)try{f=e(s)}catch(e){l.error=o(e)}else f=e(s);l.took=C.now()-l.started,l.nextState=r(n());var d=t.diff&&"function"==typeof u?u(n,s):t.diff;if(y(c,Object.assign({},t,{diff:d})),c.length=0,l.error)throw l.error;return f}}}}var g,b,w=function(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e},x=function(e){return w(e.getHours(),2)+":"+w(e.getMinutes(),2)+":"+w(e.getSeconds(),2)+"."+w(e.getMilliseconds(),3)},C="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,k="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},S=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},_=[];g="object"===(void 0===e?"undefined":k(e))&&e?e:"undefined"!=typeof window?window:{},(b=g.DeepDiff)&&_.push((function(){void 0!==b&&g.DeepDiff===f&&(g.DeepDiff=b,b=void 0)})),n(o,r),n(i,r),n(a,r),n(u,r),Object.defineProperties(f,{diff:{value:f,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:function(e,t,n){e&&t&&l(e,t,(function(r){n&&!n(e,t,r)||d(e,t,r)}))},enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:function(e,t,n){if(e&&t&&n&&n.kind){var r,o,i=e;for(o=n.path.length-1,r=0;r<o;r++)void 0===i[n.path[r]]&&(i[n.path[r]]={}),i=i[n.path[r]];switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var o,i=t[n],a=r.path.length-1;for(o=0;o<a;o++)i=i[r.path[o]];switch(r.kind){case"A":e(i[r.path[o]],r.index,r.item);break;case"D":case"E":i[r.path[o]]=r.lhs;break;case"N":delete i[r.path[o]]}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":case"E":t[n]=r.lhs;break;case"N":t=c(t,n)}return t}(i[n.path[r]],n.index,n.item);break;case"D":case"E":i[n.path[r]]=n.lhs;break;case"N":delete i[n.path[r]]}}},enumerable:!0},isConflict:{value:function(){return void 0!==b},enumerable:!0},noConflict:{value:function(){return _&&(_.forEach((function(e){e()})),_=null),f},enumerable:!0}});var A={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},O={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},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,n=e.getState;return"function"==typeof t||"function"==typeof n?v()({dispatch:t,getState:n}):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")};t.defaults=O,t.createLogger=v,t.logger=E,t.default=E,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,n(33))},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(743),i=(r=o)&&r.__esModule?r:{default:r};t.default=(0,i.default)("local")},function(e){e.exports=JSON.parse('["apps","context"]')},,,,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===l)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function f(){}function d(){}function p(){}var h={};h[o]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(S([])));y&&y!==t&&n.call(y,o)&&(h=y);var v=p.prototype=f.prototype=Object.create(h);function g(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return d.prototype=v.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,u(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},g(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(v),u(v,a,"Generator"),v[o]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getDeviceName=void 0;var o=r(n(350)),i=n(103),a=n(147),u=n(144);t.getDeviceName=function(){if(!(0,a.hasDevicePlugin)())return(0,i.isCordova)()&&console.warn("You should install `cordova-plugin-device`."),"Device";var e=window.device,t=e.manufacturer,n=e.model,r=(0,u.isIOSApp)()?function(e){for(var t=0,n=["iPhone","iPad","Watch","AppleTV"];t<n.length;t++){var r=n[t];if(e.match(new RegExp(r)))return r}return"Device"}(n):n;return"".concat((0,o.default)(t)," ").concat(r)}},function(e,t,n){var r=n(63),o=n(353);e.exports=function(e){return o(r(e).toLowerCase())}},function(e,t,n){var r=n(64),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(354)("toUpperCase");e.exports=r},function(e,t,n){var r=n(208),o=n(146),i=n(210),a=n(63);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,u=n?n[0]:t.charAt(0),c=n?r(n,1).join(""):t.slice(1);return u[e]()+c}}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+o+")"+"?",s="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[i,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[i+r+"?",r,a,u,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+s,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.startApp=t.default=t.checkApp=void 0;var o=r(n(7)),i=r(n(9)),a=n(144),u=function(){return window.startApp},c=function(e){var t=e.appId,n=e.uri;return(0,a.isAndroidApp)()?{package:t}:n},s={},l=s.startApp=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=window.startApp,e.next=3,s.checkApp(t);case 3:if(!e.sent){e.next=9;break}return r=c(t),e.abrupt("return",new Promise((function(e,t){u()?n.set(r).start(e,t):t(new Error("Cordova plugin 'com.lampa.startapp' is not installed. This plugin is needed to start a native app. Required by cozy-bar"))})));case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.startApp=l;var f=s.checkApp=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=window.startApp,r=c(t),e.abrupt("return",new Promise((function(e,t){u()?n.set(r).check((function(t){e("OK"===t||t)}),(function(n){!1===n||0===n.indexOf("NameNotFoundException")?e(!1):t(n)})):t(new Error("Cordova plugin 'com.lampa.startapp' is not installed."))})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.checkApp=f;var d=s;t.default=d},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.nativeLinkOpen=void 0;var o=r(n(7)),i=r(n(9)),a=n(147),u=function(){var e=(0,i.default)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,e.next=3,(0,a.hasSafariPlugin)();case 3:if(e.t0=e.sent,!e.t0){e.next=6;break}e.t0=window.SafariViewController;case 6:if(!e.t0){e.next=10;break}window.SafariViewController.show({url:n,transition:"curl"},(function(e){"closed"===e.event&&window.SafariViewController.hide()}),(function(){window.SafariViewController.hide()})),e.next=11;break;case 10:(0,a.hasInAppBrowserPlugin)()?("_blank","clearcache=yes,zoom=no",window.cordova.InAppBrowser.open(n,"_blank","clearcache=yes,zoom=no")):window.location=n;case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.nativeLinkOpen=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openDeeplinkOrRedirect=void 0;var r=function(e,t){var n=Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5);window.addEventListener("blur",i);var r=function(e,t,n){var r=document.createElement("iframe");return r.src=t,r.id="hiddenIframe_".concat(n),r.style.display="none",e.appendChild(r),r}(document.body,"about:blank",n),o=setTimeout((function(){t(),window.removeEventListener("blur",i),r.parentElement.removeChild(r)}),500);function i(){clearTimeout(o),window.removeEventListener("blur",i),r.parentElement.removeChild(r)}r.contentWindow.location.href=e};t.openDeeplinkOrRedirect=function(e,t){if(navigator.msLaunchUri)!function(e,t){navigator.msLaunchUri(e,void 0,t)}(e,t);else{var n=(o=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,i=navigator.userAgent.toLowerCase(),a=i.includes("safari")&&!i.includes("chrome")||Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,u=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=u&&(i.includes("os 12_2")||i.includes("os 12_3")),{isOpera:o,isFirefox:"undefined"!=typeof InstallTrigger,isSafari:a,isChrome:!!window.chrome&&!o,isIOS122:c,isIOS:u});n.isChrome||n.isIOS&&!n.isIOS122?function(e,t){for(var n=setTimeout((function(){t(),r.removeEventListener("blur",o)}),500),r=window;r!=r.parent;)r=r.parent;function o(){clearTimeout(n),r.removeEventListener("blur",o)}r.addEventListener("blur",o),window.location=e}(e,t):n.isSafari&&!n.isIOS122||n.isFirefox?r(e,t):t()}var o,i,a,u,c}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(7)),a=o(n(9)),u=o(n(4)),c=o(n(6)),s=r(n(361)),l=r(n(364)),f=o(n(365)),d=n(148),p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.client;(0,u.default)(this,e),this.request=new f.default(n),this.create=this.create.bind(this)}var t,n;return(0,c.default)(e,[{key:"create",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!e)throw new Error('Misformed intent, "action" property must be provided');if(!t)throw new Error('Misformed intent, "type" property must be provided');var i=this.request.post(e,t,r,o);return i.start=function(e,t){var o,a={filteredServices:r.filteredServices,onReadyCallback:t};delete r.filteredServices;var u=i.then((function(t){return o=s.start(n.create,t,e,r,a)}));return u.stop=function(){o&&o.destroy()},u},i}},{key:"createService",value:function(e,t){return l.start(this.request)(e,t)}},{key:"getRedirectionURL",value:(n=(0,a.default)(i.default.mark((function e(t,n){var r,o,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t||n){e.next=2;break}throw new Error("Cannot retrieve redirection, at least type or doc must be provided");case 2:return e.next=4,this.create("REDIRECT",t,n);case 4:return r=e.sent,o=(0,d.pickService)(r),a=(0,d.removeQueryString)(o.href),e.abrupt("return",n?(0,d.buildRedirectionURL)(a,n):a);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"redirect",value:(t=(0,a.default)(i.default.mark((function e(t,n,r){var o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window){e.next=2;break}throw new Error("redirect() method can only be called in a browser");case 2:return e.next=4,this.getRedirectionURL(t,n);case 4:if(o=e.sent,!r||"function"!=typeof r){e.next=7;break}return e.abrupt("return",r(o));case 7:window.location.href=o;case 8:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})}]),e}();t.default=p},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.start=function e(t,n,r,o){var d,p,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},m=function(){p&&s.remove(p),d&&d.stopListening()},y=function(){m()},v=new Promise((function(m,v){var g=(0,c.pickService)(n,h.filterServices);p=s.insertIntentIframe(n,r,g.href,h.onReadyCallback);var b=f(g.href);(d=new l.default({intentId:n.id,origin:b,onReady:function(e){e.source.postMessage(o,e.origin)},onDone:function(e){m(e.data.document),y()},onCancel:function(){m(null),y()},onError:function(e){v(e instanceof Event?c.errorSerializer.deserialize(e.data.error):e),y()},onResize:function(e){var t=e.data,n=t.transition,o=t.dimensions;s.applyStyle(r,(0,u.default)({transition:n},o))},onExposeFrameRemoval:function(e){m({document:e.document,removeIntentIframe:function(){return s.remove(p)}})},onCompose:function(){var n=(0,a.default)(i.default.mark((function n(o){var a,c,l,f,d,h,m,y;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=o.data,c=a.action,l=a.doctype,f=a.data,d=o.source,h=o.origin,n.next=4,t(c,l,f);case 4:return m=n.sent,s.hide(p),n.prev=6,n.next=9,e(t,m,r,(0,u.default)({},f,{exposeIntentFrameRemoval:!1}));case 9:y=n.sent,d.postMessage(y,h);case 11:return n.prev=11,s.show(p),n.finish(11);case 14:case"end":return n.stop()}}),n,null,[[6,,11,14]])})));return function(e){return n.apply(this,arguments)}}()})).listen()}));return v.destroy=m,v};var i=o(n(7)),a=o(n(9)),u=o(n(14)),c=n(148),s=r(n(362)),l=o(n(363)),f=function(e){return e.split("/",3).join("/")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hide=function(e){e.style.display="none"},t.show=function(e){e.style.display="block"},t.remove=function(e){if(!e.parentNode)return;e.parentNode.removeChild(e)},t.iframeFromIntent=a,t.insertIntentIframe=function(e,t,n,r){i(t);var o=a(e,t,n);"function"==typeof r&&(o.onload=r);return t.appendChild(o),o.focus(),o},t.assertOKForIntentIframe=t.applyStyle=void 0;var r=function(e){return e+"px"},o={width:r,height:r,maxWidth:r,maxHeight:r};t.applyStyle=function(e,t){Object.keys(t).forEach((function(n){var r=t[n];e.style[n]="".concat(o[n]?o[n](r):r)}))};var i=function(e){var t=e.ownerDocument;if(!t)throw console.warn("assertProperForIframe: bad node",e),new Error("Cannot retrieve document object from given node");if(!t.defaultView)throw console.warn("assertProperForIframe: bad document",t),new Error("Cannot retrieve window object from document")};function a(e,t,n){var r=t.ownerDocument;if(!r)throw new Error("Cannot retrieve document object from given node");var o=r.createElement("iframe");return o.setAttribute("id","intent-".concat(e.id)),o.setAttribute("src",n),o.classList.add("coz-intent"),o}t.assertOKForIntentIframe=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=/intent-(.*):(.*)/,u=function(){function e(t){(0,o.default)(this,e),this.state={handshaken:!1},this.options=t,this.handleMessageWrapper=this.handleMessageWrapper.bind(this)}return(0,i.default)(e,[{key:"handleMessage",value:function(e){if(e.origin===this.options.origin){var t=e.data.type;if("load"!==t){var n=a.exec(t);if(n){var r=n[1];c(r==this.options.intentId,"Invalid event id","eventId: ".concat(r," != listener eventId ").concat(this.options.intentId));var o=n[2];"ready"!==o?c(this.state.handshaken,"Unexpected handshake message from intent service"):this.state.handshaken=!0;var i=this.options["on"+s(o)];if(i)return i(e);console.warn("intents: Unhandled event ".concat(o))}else console.warn("intents: Message type ".concat(t," not matching intent format"))}else console.warn&&console.warn("Cozy Client ignored MessageEvent having data.type `load`.")}}},{key:"handleMessageWrapper",value:function(e){try{this.handleMessage(e)}catch(e){this.options.onError(e)}}},{key:"listen",value:function(){window.addEventListener("message",this.handleMessageWrapper)}},{key:"stopListening",value:function(){window.removeEventListener("message",this.handleMessageWrapper)}}]),e}();t.default=u;var c=function(e,t,n){if(!e)throw n&&console.warn(n),new Error(t)},s=function(e){return e[0].toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.start=void 0;var r=n(148);function o(e){e&&e.style&&(e.style.height="100%")}t.start=function(e){return function(t,n){return(n=n||"undefined"!=typeof window&&window)&&n.document?(n.addEventListener("load",(function(){var e=n.document;[e.documentElement,e.body].forEach(o)})),(t=t||n.location.search.split("=")[1])?e.get(t).then((function(e){var t=!1,o=function(r){if(t)throw new Error("Intent service has already been terminated");n.parent.postMessage(r,e.attributes.client)},i=function(t,r,i){return new Promise((function(a){n.addEventListener("message",(function t(r){if(r.origin===e.attributes.client)return n.removeEventListener("message",t),a(r.data)})),o({type:"intent-".concat(e._id,":compose"),action:t,doctype:r,data:i})}))},a=function(e){o(e),t=!0},u=function(n,r){if(t)throw new Error("Intent service has been terminated");o({type:"intent-".concat(e._id,":resize"),dimensions:n.element?Object.assign({},n,{maxHeight:n.element.clientHeight,maxWidth:n.element.clientWidth}):n,transition:r})},c=function(){a({type:"intent-".concat(e._id,":cancel")})};return n.addEventListener("unload",(function(){t||c()})),function(e,t){return new Promise((function(n){t.addEventListener("message",(function r(o){o.origin===e.attributes.client&&(t.removeEventListener("message",r),n(o.data))})),t.parent.postMessage({type:"intent-".concat(e._id,":ready")},e.attributes.client)}))}(e,n).then((function(t){return{compose:i,getData:function(){return t},getIntent:function(){return e},terminate:function(n){var r=t&&t.exposeIntentFrameRemoval?"exposeFrameRemoval":"done";return a({type:"intent-".concat(e._id,":").concat(r),document:n})},throw:function(t){return a({type:"intent-".concat(e._id,":error"),error:r.errorSerializer.serialize(t)})},resizeClient:u,cancel:c}}))})):Promise.reject(new Error("Cannot retrieve intent from URL"))):Promise.reject(new Error("Intent service should be used in browser"))}}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=function(){function e(t){(0,o.default)(this,e),this.stackClient=t.stackClient}return(0,i.default)(e,[{key:"get",value:function(e){return this.stackClient.fetchJSON("GET","/intents/".concat(e)).then((function(e){var t=e.data;return t._id||(t._id=t.id),t}))}},{key:"post",value:function(e,t,n,r){return this.stackClient.fetchJSON("POST","/intents",{data:{type:"io.cozy.intents",attributes:{action:e,type:t,data:n,permissions:r}}}).then((function(e){return e.data}))}}]),e}();t.default=a},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(4)),u=r(n(6)),c=r(n(2)),s=r(n(45)),l=r(n(150)),f=function(){function e(t,n){(0,a.default)(this,e),(0,c.default)(this,"_doctype","io.cozy.websocket"),(0,c.default)(this,"_webSocket",null),(0,c.default)(this,"_url",null),(0,c.default)(this,"_token",null),this._getUrl=t,this._getToken=n,this.removeAllListeners=this.removeAllListeners.bind(this),this.on("close",this.removeAllListeners)}var t;return(0,u.default)(e,[{key:"isOpen",value:function(){return!(!this._webSocket||this._webSocket.readyState!==WebSocket.OPEN)}},{key:"isConnecting",value:function(){return!(!this._webSocket||this._webSocket.readyState!==WebSocket.CONNECTING)}},{key:"connect",value:function(){var e=this;return new Promise((function(t,n){e._webSocket=new WebSocket(e._getUrl(),e._doctype),e._webSocket.onmessage=function(t){var n=JSON.parse(t.data),r=n.event.toLowerCase(),o=n.payload,i=o.type,a=o.id,u=o.doc;e.emit("message",{type:i,id:a,eventName:r},u)},e._webSocket.onclose=function(t){return e.emit("close",t)},e._webSocket.onerror=function(t){e._webSocket=null,e.emit("error",t),n(t)},e._webSocket.onopen=function(n){e.authenticate(),e.emit("open",n),t(n)}}))}},{key:"authenticate",value:function(){this.isOpen()&&this._webSocket.send(JSON.stringify({method:"AUTH",payload:this._getToken()}))}},{key:"subscribe",value:(t=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isOpen()){e.next=3;break}return e.next=3,this.connect();case 3:r=(0,l.default)({type:t,id:n}),i=JSON.stringify({method:"SUBSCRIBE",payload:r}),this._webSocket.send(i),this.emit("subscribe_".concat(t,"_").concat(n));case 7:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"close",value:function(){this.isOpen()?this._webSocket.close():this.removeAllListeners(),this._webSocket=null}}]),e}();s.default.mixin(f);var d=f;t.default=d},function(e,t,n){var r=n(369),o=n(409),i=n(227);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(104),o=n(154);e.exports=function(e,t,n,i){var a=n.length,u=a,c=!i;if(null==e)return!u;for(e=Object(e);a--;){var s=n[a];if(c&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<u;){var l=(s=n[a])[0],f=e[l],d=s[1];if(c&&s[2]){if(void 0===f&&!(l in e))return!1}else{var p=new r;if(i)var h=i(f,d,l,e,t,p);if(!(void 0===h?o(d,f,3,i,p):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(106),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(106);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(106);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(106);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(105);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(105),o=n(151),i=n(153);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(152),o=n(381),i=n(34),a=n(214),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,l=c.toString,f=s.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:u).test(a(e))}},function(e,t,n){var r,o=n(382),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(39)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(385),o=n(105),i=n(151);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(386),o=n(387),i=n(388),a=n(389),u=n(390);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,e.exports=c},function(e,t,n){var r=n(107);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(107),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(107),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(107);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(108);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(108);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(108);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(108);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(104),o=n(215),i=n(400),a=n(402),u=n(66),c=n(26),s=n(87),l=n(114),f="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,h,m){var y=c(e),v=c(t),g=y?"[object Array]":u(e),b=v?"[object Array]":u(t),w=(g="[object Arguments]"==g?f:g)==f,x=(b="[object Arguments]"==b?f:b)==f,C=g==b;if(C&&s(e)){if(!s(t))return!1;y=!0,w=!1}if(C&&!w)return m||(m=new r),y||l(e)?o(e,t,n,p,h,m):i(e,t,g,n,p,h,m);if(!(1&n)){var k=w&&d.call(e,"__wrapped__"),S=x&&d.call(t,"__wrapped__");if(k||S){var _=k?e.value():e,A=S?t.value():t;return m||(m=new r),h(_,A,n,p,m)}}return!!C&&(m||(m=new r),a(e,t,n,p,h,m))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(64),o=n(216),i=n(84),a=n(215),u=n(401),c=n(155),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=u;case"[object Set]":var h=1&r;if(p||(p=c),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;r|=2,d.set(e,t);var y=a(p(e),p(t),r,s,f,d);return d.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(217),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,u){var c=1&n,s=r(e),l=s.length;if(l!=r(t).length&&!c)return!1;for(var f=l;f--;){var d=s[f];if(!(c?d in t:o.call(t,d)))return!1}var p=u.get(e);if(p&&u.get(t))return p==t;var h=!0;u.set(e,t),u.set(t,e);for(var m=c;++f<l;){var y=e[d=s[f]],v=t[d];if(i)var g=c?i(v,y,d,t,e,u):i(y,v,d,e,t,u);if(!(void 0===g?y===v||a(y,v,n,i,u):g)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return u.delete(e),u.delete(t),h}},function(e,t,n){var r=n(52),o=n(40);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(52),o=n(157),i=n(40),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(223)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(54)(n(39),"DataView");e.exports=r},function(e,t,n){var r=n(54)(n(39),"Promise");e.exports=r},function(e,t,n){var r=n(226),o=n(85);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(154),o=n(18),i=n(228),a=n(160),u=n(226),c=n(227),s=n(68);e.exports=function(e,t){return a(e)&&u(t)?c(s(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(412),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(42);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(161),o=n(415),i=n(160),a=n(68);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t,n){var r=n(116);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(34),o=n(115),i=n(417),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(419),o=r.enable,i=r.disable,a="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),u=n(421);if(r.defaultBackend=a?u.minilog:u,"undefined"!=typeof window){try{r.enable(JSON.parse(window.localStorage.minilogSettings))}catch(e){}if(window.location&&window.location.search){var c=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);c&&r.enable(decodeURIComponent(c[1]))}}r.enable=function(){o.call(r,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(e){}return this},r.disable=function(){i.call(r);try{delete window.localStorage.minilogSettings}catch(e){}return this},(e.exports=r).backends={array:n(424),browser:r.defaultBackend,localStorage:n(425),jQuery:n(426)}},function(e,t,n){var r=n(48),o=n(420),i=new r,a=Array.prototype.slice;(t=e.exports=function(e){var n=function(){return i.write(e,void 0,a.call(arguments)),n};return n.debug=function(){return i.write(e,"debug",a.call(arguments)),n},n.info=function(){return i.write(e,"info",a.call(arguments)),n},n.warn=function(){return i.write(e,"warn",a.call(arguments)),n},n.error=function(){return i.write(e,"error",a.call(arguments)),n},n.log=n.debug,n.suggest=t.suggest,n.format=i.format,n}).defaultBackend=t.defaultFormatter=null,t.pipe=function(e){return i.pipe(e)},t.end=t.unpipe=t.disable=function(e){return i.unpipe(e)},t.Transform=r,t.Filter=o,t.suggest=new o,t.enable=function(){return t.defaultFormatter?i.pipe(t.suggest).pipe(t.defaultFormatter).pipe(t.defaultBackend):i.pipe(t.suggest).pipe(t.defaultBackend)}},function(e,t,n){var r=n(48),o={debug:1,info:2,warn:3,error:4};function i(){this.enabled=!0,this.defaultResult=!0,this.clear()}function a(e,t){return e.n.test?e.n.test(t):e.n==t}r.mixin(i),i.prototype.allow=function(e,t){return this._white.push({n:e,l:o[t]}),this},i.prototype.deny=function(e,t){return this._black.push({n:e,l:o[t]}),this},i.prototype.clear=function(){return this._white=[],this._black=[],this},i.prototype.test=function(e,t){var n,r=Math.max(this._white.length,this._black.length);for(n=0;n<r;n++){if(this._white[n]&&a(this._white[n],e)&&o[t]>=this._white[n].l)return!0;if(this._black[n]&&a(this._black[n],e)&&o[t]<=this._black[n].l)return!1}return this.defaultResult},i.prototype.write=function(e,t,n){if(!this.enabled||this.test(e,t))return this.emit("item",e,t,n)},e.exports=i},function(e,t,n){var r=n(48),o=/\n+$/,i=new r;i.write=function(e,t,n){var r=n.length-1;if("undefined"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[e,t].concat(n));if(JSON&&JSON.stringify){n[r]&&"string"==typeof n[r]&&(n[r]=n[r].replace(o,""));try{for(r=0;r<n.length;r++)n[r]=JSON.stringify(n[r])}catch(e){}console.log(n.join(" "))}}},i.formatters=["color","minilog"],i.color=n(422),i.minilog=n(423),e.exports=i},function(e,t,n){var r=n(48),o=n(234),i={debug:["cyan"],info:["purple"],warn:["yellow",!0],error:["red",!0]},a=new r;a.write=function(e,t,n){console.log;console[t]&&console[t].apply&&console[t].apply(console,["%c"+e+" %c"+t,o("gray"),o.apply(o,i[t])].concat(n))},a.pipe=function(){},e.exports=a},function(e,t,n){var r=n(48),o=n(234),i={debug:["gray"],info:["purple"],warn:["yellow",!0],error:["red",!0]},a=new r;a.write=function(e,t,n){var r=console.log;"debug"!=t&&console[t]&&(r=console[t]);var a=0;if("info"!=t){for(;a<n.length&&"string"==typeof n[a];a++);r.apply(console,["%c"+e+" "+n.slice(0,a).join(" "),o.apply(o,i[t])].concat(n.slice(a)))}else r.apply(console,["%c"+e,o.apply(o,i[t])].concat(n))},a.pipe=function(){},e.exports=a},function(e,t,n){var r=n(48),o=[],i=new r;i.write=function(e,t,n){o.push([e,t,n])},i.get=function(){return o},i.empty=function(){o=[]},e.exports=i},function(e,t,n){var r=n(48),o=!1,i=new r;i.write=function(e,t,n){if("undefined"!=typeof window&&"undefined"!=typeof JSON&&JSON.stringify&&JSON.parse)try{o||(o=window.localStorage.minilog?JSON.parse(window.localStorage.minilog):[]),o.push([(new Date).toString(),e,t,n]),window.localStorage.minilog=JSON.stringify(o)}catch(e){}},e.exports=i},function(e,t,n){var r=n(48),o=(new Date).valueOf().toString(36);function i(e){this.url=e.url||"",this.cache=[],this.timer=null,this.interval=e.interval||3e4,this.enabled=!0,this.jQuery=window.jQuery,this.extras={}}r.mixin(i),i.prototype.write=function(e,t,n){this.timer||this.init(),this.cache.push([e,t].concat(n))},i.prototype.init=function(){if(this.enabled&&this.jQuery){var e=this;this.timer=setTimeout((function(){var t,n,r=[],i=e.url;if(0==e.cache.length)return e.init();for(t=0;t<e.cache.length;t++)try{JSON.stringify(e.cache[t]),r.push(e.cache[t])}catch(e){}e.jQuery.isEmptyObject(e.extras)?(n=JSON.stringify({logs:r}),i=e.url+"?client_id="+o):n=JSON.stringify(e.jQuery.extend({logs:r},e.extras)),e.jQuery.ajax(i,{type:"POST",cache:!1,processData:!1,data:n,contentType:"application/json",timeout:1e4}).success((function(t,n,r){t.interval&&(e.interval=Math.max(1e3,t.interval))})).error((function(){e.interval=3e4})).always((function(){e.init()})),e.cache=[]}),this.interval)}},i.prototype.end=function(){},i.jQueryWait=function(e){if("undefined"!=typeof window&&(window.jQuery||window.$))return e(window.jQuery||window.$);"undefined"!=typeof window&&setTimeout((function(){i.jQueryWait(e)}),200)},e.exports=i},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(165),o=n(429);function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(19)),i=r(n(4)),a=r(n(6)),u=r(n(45)),c=r(n(432)),s=function(){function e(){(0,i.default)(this,e),this.store={},"undefined"!=typeof localStorage&&(this.longtermStore=c.default),this.restore()}return(0,a.default)(e,[{key:"restore",value:function(){if(this.longtermStore)for(var e=this.longtermStore.getAll(),t=0,n=Object.entries(e);t<n.length;t++){var r=(0,o.default)(n[t],2),i=r[0],a=r[1];this.store[i]=a,this.emit("change",i)}}},{key:"keys",value:function(){return Object.keys(this.store)}},{key:"get",value:function(e){return this.store.hasOwnProperty(e)||(this.store[e]=null),this.store[e]}},{key:"set",value:function(e,t){this.longtermStore&&this.longtermStore.setItem(e,t),this.store[e]=t,this.emit("change",e)}},{key:"remove",value:function(e){delete this.store[e],this.longtermStore&&this.longtermStore.removeItem(e),this.emit("change",e)}}]),e}();u.default.mixin(s);var l=s;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getKey=t.prefix=void 0;t.prefix="flag__";var r=function(e){return"flag__"+e};t.getKey=r;var o=function(){return Object.keys(localStorage).filter((function(e){return 0===e.indexOf("flag__")})).map((function(e){return e.replace("flag__","")}))},i=function(e){var t=localStorage.getItem(r(e));return t?JSON.parse(t):t},a=function(e){return localStorage.removeItem(r(e))},u={getAll:function(){var e={},t=!0,n=!1,r=void 0;try{for(var a,u=o()[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var c=a.value;e[c]=i(c)}}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}return e},getItem:i,setItem:function(e,t){var n=JSON.stringify(t);return localStorage.setItem(r(e),n)},clearAll:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=o()[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var u=r.value;a(u)}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}},removeItem:a};t.default=u},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(10)),u=r(n(5)),c=r(n(11)),s=r(n(8)),l=r(n(0)),f=r(n(118)),d=function(e){var t=function(t){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,u.default)(n).call(this,e))).handleChange=t.handleChange.bind((0,c.default)(t)),t}return(0,s.default)(n,t),(0,i.default)(n,[{key:"componentDidMount",value:function(){f.default.store.on("change",this.handleChange)}},{key:"componentWillUnmount",value:function(){f.default.store.removeListener("change",this.handleChange)}},{key:"handleChange",value:function(){this.forceUpdate()}},{key:"render",value:function(){return l.default.createElement(e,this.props)}}]),n}(l.default.Component);return t.displayName="withFlags(".concat(e.displayName||e.name,")"),t};t.default=d},function(e,t,n){"use strict";e.exports=n(435)},function(e,t,n){"use strict";
|
|
17
|
+
/** @license React v16.13.1
|
|
18
|
+
* react.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/var r=n(235),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}function x(){}function C(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var k=C.prototype=new x;k.constructor=C,r(k,w.prototype),k.isPureReactComponent=!0;var S={current:null},_=Object.prototype.hasOwnProperty,A={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!A.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];o.children=s}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:S.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var B=/\/+/g,j=[];function P(e,t,n,r){if(j.length){var o=j.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function T(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function z(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case a:c=!0}}if(c)return r(o,t,""===n?"."+I(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var l=n+I(u=t[s],s);c+=e(u,l,r,o)}else if(null===t||"object"!=typeof t?l=null:l="function"==typeof(l=y&&t[y]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),s=0;!(u=t.next()).done;)c+=e(u=u.value,l=n+I(u,s++),r,o);else if("object"===u)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return c}(e,"",t,n)}function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?F(e,r,n,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(B,"$&/")+"/")+n)),r.push(e))}function F(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(B,"$&/")+"/"),z(e,R,t=P(t,i,r,o)),T(t)}var M={current:null};function N(){var e=M.current;if(null===e)throw Error(v(321));return e}var L={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return F(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;z(e,D,t=P(null,null,t,n)),T(t)},count:function(e){return z(e,(function(){return null}),null)},toArray:function(e){var t=[];return F(e,t,null,(function(e){return e})),t},only:function(e){if(!E(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=u,t.Profiler=s,t.PureComponent=C,t.StrictMode=c,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var o=r({},e.props),a=e.key,u=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,c=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)_.call(t,l)&&!A.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){s=Array(l);for(var f=0;f<l;f++)s[f]=arguments[f+2];o.children=s}return{$$typeof:i,type:e.type,key:a,ref:u,props:o,_owner:c}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(10)),u=r(n(5)),c=r(n(8)),s=r(n(0)),l=r(n(118)),f=function(e){var t=e.name,n=e.onChange;return s.default.createElement("input",{type:"checkbox",checked:(0,l.default)(t),onChange:function(e){return(0,l.default)(t,JSON.parse(e.target.checked))&&n&&n()}})},d=function(e){var t=e.children,n=e.onClick;return s.default.createElement("button",{type:"button",onClick:n,style:{position:"absolute",top:"100%",left:"0"}},t)},p=l.default.connect((function(){var e=l.default.list();return s.default.createElement("div",null,e.map((function(e){return s.default.createElement("div",{key:e},function(e){return e.replace(/[a-z][A-Z]/g,(function(e){return e[0]+" "+e[1].toLowerCase()}))}(e)," : ",s.default.createElement(f,{onChange:function(){},name:e}))})))})),h=function(e){function t(e){var n;return(0,o.default)(this,t),(n=(0,a.default)(this,(0,u.default)(t).call(this,e))).state={folded:!0},n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e,t=this;return(0,l.default)("switcher")&&s.default.createElement("div",{className:"flag-switcher",style:(e=this.state,{borderBottomLeftRadius:".5rem",padding:".5rem",position:"absolute",zIndex:1e3,color:"white",background:"rgba(74,68,90,0.85)",top:0,right:0,transform:"translateY(".concat(e.folded?"-100%":"0",")")})},s.default.createElement(d,{onClick:function(){return t.setState((function(e){return{folded:!e.folded}}))}},this.state.folded?"Show":"Hide"," flags"),s.default.createElement("button",{onClick:function(){return t.setState({date:Date.now()})}},"refresh")," ",s.default.createElement("button",{onClick:function(){return l.default.reset()&&(0,l.default)("switcher",!0)&&t.forceUpdate()}},"reset"),s.default.createElement(p,null))}}]),t}(s.default.Component);t.default=h,h.List=p},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=(0,i.useState)((0,a.default)(e)),n=(0,o.default)(t,2),r=n[0],u=n[1];return(0,i.useEffect)((function(){var t=function(t){t===e&&u((0,a.default)(e))};return a.default.store.on("change",t),function(){a.default.store.removeListener("change",t)}}),[u,e]),r};var o=r(n(19)),i=n(0),a=r(n(118))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(439)},function(e,t,n){"use strict";
|
|
25
|
+
/** @license React v16.13.1
|
|
26
|
+
* react-dom.production.min.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var r=n(0),o=n(235),i=n(440);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function u(e,t,n,r,o,i,a,u,c){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var c=!1,s=null,l=!1,f=null,d={onError:function(e){c=!0,s=e}};function p(e,t,n,r,o,i,a,l,f){c=!1,s=null,u.apply(d,arguments)}var h=null,m=null,y=null;function v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=y(n),function(e,t,n,r,o,i,u,d,h){if(p.apply(this,arguments),c){if(!c)throw Error(a(198));var m=s;c=!1,s=null,l||(l=!0,f=m)}}(r,t,void 0,e),e.currentTarget=null}var g=null,b={};function w(){if(g)for(var e in b){var t=b[e],n=g.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!C[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in C[n]=t,n=t.eventTypes){var o=void 0,i=n[r],u=t,c=r;if(k.hasOwnProperty(c))throw Error(a(99,c));k[c]=i;var s=i.phasedRegistrationNames;if(s){for(o in s)s.hasOwnProperty(o)&&x(s[o],u,c);o=!0}else i.registrationName?(x(i.registrationName,u,c),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function x(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,_[e]=t.eventTypes[n].dependencies}var C=[],k={},S={},_={};function A(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var O=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),E=null,B=null,j=null;function P(e){if(e=m(e)){if("function"!=typeof E)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),E(e.stateNode,e.type,t))}}function T(e){B?j?j.push(e):j=[e]:B=e}function z(){if(B){var e=B,t=j;if(j=B=null,P(e),t)for(e=0;e<t.length;e++)P(t[e])}}function I(e,t){return e(t)}function D(e,t,n,r,o){return e(t,n,r,o)}function R(){}var F=I,M=!1,N=!1;function L(){null===B&&null===j||(R(),z())}function U(e,t,n){if(N)return e(t,n);N=!0;try{return F(e,t,n)}finally{N=!1,L()}}var $=/^[: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]*$/,G=Object.prototype.hasOwnProperty,q={},J={};function H(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var W={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){W[e]=new H(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];W[t]=new H(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){W[e]=new H(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){W[e]=new H(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){W[e]=new H(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){W[e]=new H(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){W[e]=new H(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){W[e]=new H(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){W[e]=new H(e,5,!1,e.toLowerCase(),null,!1)}));var Q=/[\-:]([a-z])/g;function V(e){return e[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(e){var t=e.replace(Q,V);W[t]=new H(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Q,V);W[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Q,V);W[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){W[e]=new H(e,1,!1,e.toLowerCase(),null,!1)})),W.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){W[e]=new H(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function K(e,t,n,r){var o=W.hasOwnProperty(t)?W[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!G.call(J,e)||!G.call(q,e)&&($.test(e)?J[e]=!0:(q[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,X="function"==typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,ue=X?Symbol.for("react.concurrent_mode"):60111,ce=X?Symbol.for("react.forward_ref"):60112,se=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,de=X?Symbol.for("react.lazy"):60116,pe=X?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function me(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ye(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case se:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ce:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ye(e.type);case pe:return ye(e.render);case de:if(e=1===e._status?e._result:null)return ye(e)}return null}function ve(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ye(e.type);n=null,r&&(n=ye(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Z,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ce(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ke(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ge(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&K(e,"checked",t,!1)}function _e(e,t){Se(e,t);var n=ge(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oe(e,t.type,ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ae(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Oe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ee(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Be(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function je(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ge(n)}}function Te(e,t){var n=ge(t.value),r=ge(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ze(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Ie="http://www.w3.org/1999/xhtml",De="http://www.w3.org/2000/svg";function Re(e){switch(e){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 Fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Me,Ne=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==De||"innerHTML"in e)e.innerHTML=t;else{for((Me=Me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ue(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $e={animationend:Ue("Animation","AnimationEnd"),animationiteration:Ue("Animation","AnimationIteration"),animationstart:Ue("Animation","AnimationStart"),transitionend:Ue("Transition","TransitionEnd")},Ge={},qe={};function Je(e){if(Ge[e])return Ge[e];if(!$e[e])return e;var t,n=$e[e];for(t in n)if(n.hasOwnProperty(t)&&t in qe)return Ge[e]=n[t];return e}O&&(qe=document.createElement("div").style,"AnimationEvent"in window||(delete $e.animationend.animation,delete $e.animationiteration.animation,delete $e.animationstart.animation),"TransitionEvent"in window||delete $e.transitionend.transition);var He=Je("animationend"),We=Je("animationiteration"),Qe=Je("animationstart"),Ve=Je("transitionend"),Ye="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ke=new("function"==typeof WeakMap?WeakMap:Map);function Ze(e){var t=Ke.get(e);return void 0===t&&(t=new Map,Ke.set(e,t)),t}function Xe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Xe(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return tt(o),e;if(i===r)return tt(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,c=o.child;c;){if(c===n){u=!0,n=o,r=i;break}if(c===r){u=!0,r=o,n=i;break}c=c.sibling}if(!u){for(c=i.child;c;){if(c===n){u=!0,n=i,r=o;break}if(c===r){u=!0,r=i,n=o;break}c=c.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ot(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)v(e,t[r],n[r]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ut(e){if(null!==e&&(it=rt(it,e)),e=it,it=null,e){if(ot(e,at),it)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function ct(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function st(e){if(!O)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var lt=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>lt.length&<.push(e)}function dt(e,t,n,r){if(lt.length){var o=lt.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=On(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=ct(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var u=null,c=0;c<C.length;c++){var s=C[c];s&&(s=s.extractEvents(r,t,i,o,a))&&(u=rt(u,s))}ut(u)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":Qt(t,"scroll",!0);break;case"focus":case"blur":Qt(t,"focus",!0),Qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":st(e)&&Qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ye.indexOf(e)&&Wt(e,t)}n.set(e,null)}}var mt,yt,vt,gt=!1,bt=[],wt=null,xt=null,Ct=null,kt=new Map,St=new Map,_t=[],At="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ot="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Et(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Bt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":xt=null;break;case"mouseover":case"mouseout":Ct=null;break;case"pointerover":case"pointerout":kt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function jt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Et(t,n,r,o,i),null!==t&&(null!==(t=En(t))&&yt(t)),e):(e.eventSystemFlags|=r,e)}function Pt(e){var t=On(e.target);if(null!==t){var n=Xe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){vt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Tt(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=En(t);return null!==n&&yt(n),e.blockedOn=t,!1}return!0}function zt(e,t,n){Tt(e)&&n.delete(t)}function It(){for(gt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=En(e.blockedOn))&&mt(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&Tt(wt)&&(wt=null),null!==xt&&Tt(xt)&&(xt=null),null!==Ct&&Tt(Ct)&&(Ct=null),kt.forEach(zt),St.forEach(zt)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,It)))}function Rt(e){function t(t){return Dt(t,e)}if(0<bt.length){Dt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&Dt(wt,e),null!==xt&&Dt(xt,e),null!==Ct&&Dt(Ct,e),kt.forEach(t),St.forEach(t),n=0;n<_t.length;n++)(r=_t[n]).blockedOn===e&&(r.blockedOn=null);for(;0<_t.length&&null===(n=_t[0]).blockedOn;)Pt(n),null===n.blockedOn&&_t.shift()}var Ft={},Mt=new Map,Nt=new Map,Lt=["abort","abort",He,"animationEnd",We,"animationIteration",Qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ve,"transitionEnd","waiting","waiting"];function Ut(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Nt.set(r,t),Mt.set(r,i),Ft[o]=i}}Ut("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ut("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ut(Lt,2);for(var $t="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Gt=0;Gt<$t.length;Gt++)Nt.set($t[Gt],0);var qt=i.unstable_UserBlockingPriority,Jt=i.unstable_runWithPriority,Ht=!0;function Wt(e,t){Qt(t,e,!1)}function Qt(e,t,n){var r=Nt.get(t);switch(void 0===r?2:r){case 0:r=Vt.bind(null,t,1,e);break;case 1:r=Yt.bind(null,t,1,e);break;default:r=Kt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Vt(e,t,n,r){M||R();var o=Kt,i=M;M=!0;try{D(o,e,t,n,r)}finally{(M=i)||L()}}function Yt(e,t,n,r){Jt(qt,Kt.bind(null,e,t,n,r))}function Kt(e,t,n,r){if(Ht)if(0<bt.length&&-1<At.indexOf(e))e=Et(null,e,t,n,r),bt.push(e);else{var o=Zt(e,t,n,r);if(null===o)Bt(e,r);else if(-1<At.indexOf(e))e=Et(o,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return wt=jt(wt,e,t,n,r,o),!0;case"dragenter":return xt=jt(xt,e,t,n,r,o),!0;case"mouseover":return Ct=jt(Ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return kt.set(i,jt(kt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,St.set(i,jt(St.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Bt(e,r),e=dt(e,r,null,t);try{U(pt,e)}finally{ft(e)}}}}function Zt(e,t,n,r){if(null!==(n=On(n=ct(r)))){var o=Xe(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=et(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=dt(e,r,n,t);try{U(pt,e)}finally{ft(e)}return null}var Xt={animationIterationCount:!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},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Xt.hasOwnProperty(e)&&Xt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Xt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xt[t]=Xt[e]}))}));var rn=o({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 on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){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 un=Ie;function cn(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=_[t];for(var r=0;r<t.length;r++)ht(t[r],e,n)}function sn(){}function ln(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function pn(){for(var e=window,t=ln();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=ln((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mn=null,yn=null;function vn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Cn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var kn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+kn,_n="__reactEventHandlers$"+kn,An="__reactContainere$"+kn;function On(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[An]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Cn(e);null!==e;){if(n=e[Sn])return n;e=Cn(e)}return t}n=(e=n).parentNode}return null}function En(e){return!(e=e[Sn]||e[An])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Bn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function jn(e){return e[_n]||null}function Pn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Tn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function zn(e,t,n){(t=Tn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function In(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Pn(t);for(t=n.length;0<t--;)zn(n[t],"captured",e);for(t=0;t<n.length;t++)zn(n[t],"bubbled",e)}}function Dn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Tn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Rn(e){e&&e.dispatchConfig.registrationName&&Dn(e._targetInst,null,e)}function Fn(e){ot(e,In)}var Mn=null,Nn=null,Ln=null;function Un(){if(Ln)return Ln;var e,t,n=Nn,r=n.length,o="value"in Mn?Mn.value:Mn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Ln=o.slice(e,1<t?1-t:void 0)}function $n(){return!0}function Gn(){return!1}function qn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?$n:Gn,this.isPropagationStopped=Gn,this}function Jn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Hn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Wn(e){e.eventPool=[],e.getPooled=Jn,e.release=Hn}o(qn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=$n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$n)},persist:function(){this.isPersistent=$n},isPersistent:Gn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Gn,this._dispatchInstances=this._dispatchListeners=null}}),qn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Wn(n),n},Wn(qn);var Qn=qn.extend({data:null}),Vn=qn.extend({data:null}),Yn=[9,13,27,32],Kn=O&&"CompositionEvent"in window,Zn=null;O&&"documentMode"in document&&(Zn=document.documentMode);var Xn=O&&"TextEvent"in window&&!Zn,er=O&&(!Kn||Zn&&8<Zn&&11>=Zn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function or(e,t){switch(e){case"keyup":return-1!==Yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var ur={eventTypes:nr,extractEvents:function(e,t,n,r){var o;if(Kn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else ar?or(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(o=Un()):(Nn="value"in(Mn=r)?Mn.value:Mn.textContent,ar=!0)),i=Qn.getPooled(i,t,n,r),o?i.data=o:null!==(o=ir(n))&&(i.data=o),Fn(i),o=i):o=null,(e=Xn?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Kn&&or(e,t)?(e=Un(),Ln=Nn=Mn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Vn.getPooled(nr.beforeInput,t,n,r)).data=e,Fn(t)):t=null,null===o?t:null===t?o:[o,t]}},cr={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!cr[e.type]:"textarea"===t}var lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=qn.getPooled(lr.change,e,t,n)).type="change",T(n),Fn(e),e}var dr=null,pr=null;function hr(e){ut(e)}function mr(e){if(xe(Bn(e)))return e}function yr(e,t){if("change"===e)return t}var vr=!1;function gr(){dr&&(dr.detachEvent("onpropertychange",br),pr=dr=null)}function br(e){if("value"===e.propertyName&&mr(pr))if(e=fr(pr,e,ct(e)),M)ut(e);else{M=!0;try{I(hr,e)}finally{M=!1,L()}}}function wr(e,t,n){"focus"===e?(gr(),pr=n,(dr=t).attachEvent("onpropertychange",br)):"blur"===e&&gr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return mr(pr)}function Cr(e,t){if("click"===e)return mr(t)}function kr(e,t){if("input"===e||"change"===e)return mr(t)}O&&(vr=st("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:lr,_isInputEventSupported:vr,extractEvents:function(e,t,n,r){var o=t?Bn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=yr;else if(sr(o))if(vr)a=kr;else{a=xr;var u=wr}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Cr);if(a&&(a=a(e,t)))return fr(a,n,r);u&&u(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Oe(o,"number",o.value)}},_r=qn.extend({view:null,detail:null}),Ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Or(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ar[e])&&!!t[e]}function Er(){return Or}var Br=0,jr=0,Pr=!1,Tr=!1,zr=_r.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Er,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Br;return Br=e.screenX,Pr?"mousemove"===e.type?e.screenX-t:0:(Pr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=jr;return jr=e.screenY,Tr?"mousemove"===e.type?e.screenY-t:0:(Tr=!0,0)}}),Ir=zr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Dr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Rr={eventTypes:Dr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?On(t):null)&&(t!==Xe(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var u=zr,c=Dr.mouseLeave,s=Dr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(u=Ir,c=Dr.pointerLeave,s=Dr.pointerEnter,l="pointer");if(e=null==a?i:Bn(a),i=null==t?i:Bn(t),(c=u.getPooled(c,a,n,r)).type=l+"leave",c.target=e,c.relatedTarget=i,(n=u.getPooled(s,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(s=l,a=0,e=u=r;e;e=Pn(e))a++;for(e=0,t=s;t;t=Pn(t))e++;for(;0<a-e;)u=Pn(u),a--;for(;0<e-a;)s=Pn(s),e--;for(;a--;){if(u===s||u===s.alternate)break e;u=Pn(u),s=Pn(s)}u=null}else u=null;for(s=u,u=[];r&&r!==s&&(null===(a=r.alternate)||a!==s);)u.push(r),r=Pn(r);for(r=[];l&&l!==s&&(null===(a=l.alternate)||a!==s);)r.push(l),l=Pn(l);for(l=0;l<u.length;l++)Dn(u[l],"bubbled",c);for(l=r.length;0<l--;)Dn(r[l],"captured",n);return 0==(64&o)?[c]:[c,n]}};var Fr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Mr=Object.prototype.hasOwnProperty;function Nr(e,t){if(Fr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Mr.call(t,n[r])||!Fr(e[n[r]],t[n[r]]))return!1;return!0}var Lr=O&&"documentMode"in document&&11>=document.documentMode,Ur={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},$r=null,Gr=null,qr=null,Jr=!1;function Hr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Jr||null==$r||$r!==ln(n)?null:("selectionStart"in(n=$r)&&hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},qr&&Nr(qr,n)?null:(qr=n,(e=qn.getPooled(Ur.select,Gr,e,t)).type="select",e.target=$r,Fn(e),e))}var Wr={eventTypes:Ur,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Ze(o),i=_.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Bn(t):window,e){case"focus":(sr(o)||"true"===o.contentEditable)&&($r=o,Gr=t,qr=null);break;case"blur":qr=Gr=$r=null;break;case"mousedown":Jr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Jr=!1,Hr(n,r);case"selectionchange":if(Lr)break;case"keydown":case"keyup":return Hr(n,r)}return null}},Qr=qn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Vr=qn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yr=_r.extend({relatedTarget:null});function Kr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Zr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xr={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"},eo=_r.extend({key:function(e){if(e.key){var t=Zr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Kr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Xr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Er,charCode:function(e){return"keypress"===e.type?Kr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Kr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),to=zr.extend({dataTransfer:null}),no=_r.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Er}),ro=qn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),oo=zr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),io={eventTypes:Ft,extractEvents:function(e,t,n,r){var o=Mt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Kr(n))return null;case"keydown":case"keyup":e=eo;break;case"blur":case"focus":e=Yr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=zr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=to;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=no;break;case He:case We:case Qe:e=Qr;break;case Ve:e=ro;break;case"scroll":e=_r;break;case"wheel":e=oo;break;case"copy":case"cut":case"paste":e=Vr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ir;break;default:e=qn}return Fn(t=e.getPooled(o,t,n,r)),t}};if(g)throw Error(a(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=jn,m=En,y=Bn,A({SimpleEventPlugin:io,EnterLeaveEventPlugin:Rr,ChangeEventPlugin:Sr,SelectEventPlugin:Wr,BeforeInputEventPlugin:ur});var ao=[],uo=-1;function co(e){0>uo||(e.current=ao[uo],ao[uo]=null,uo--)}function so(e,t){uo++,ao[uo]=e.current,e.current=t}var lo={},fo={current:lo},po={current:!1},ho=lo;function mo(e,t){var n=e.type.contextTypes;if(!n)return lo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!=(e=e.childContextTypes)}function vo(){co(po),co(fo)}function go(e,t,n){if(fo.current!==lo)throw Error(a(168));so(fo,t),so(po,n)}function bo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ye(t)||"Unknown",i));return o({},n,{},r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lo,ho=fo.current,so(fo,e),so(po,po.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bo(e,t,ho),r.__reactInternalMemoizedMergedChildContext=e,co(po),co(fo),so(fo,e)):co(po),so(po,n)}var Co=i.unstable_runWithPriority,ko=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,_o=i.unstable_requestPaint,Ao=i.unstable_now,Oo=i.unstable_getCurrentPriorityLevel,Eo=i.unstable_ImmediatePriority,Bo=i.unstable_UserBlockingPriority,jo=i.unstable_NormalPriority,Po=i.unstable_LowPriority,To=i.unstable_IdlePriority,zo={},Io=i.unstable_shouldYield,Do=void 0!==_o?_o:function(){},Ro=null,Fo=null,Mo=!1,No=Ao(),Lo=1e4>No?Ao:function(){return Ao()-No};function Uo(){switch(Oo()){case Eo:return 99;case Bo:return 98;case jo:return 97;case Po:return 96;case To:return 95;default:throw Error(a(332))}}function $o(e){switch(e){case 99:return Eo;case 98:return Bo;case 97:return jo;case 96:return Po;case 95:return To;default:throw Error(a(332))}}function Go(e,t){return e=$o(e),Co(e,t)}function qo(e,t,n){return e=$o(e),ko(e,t,n)}function Jo(e){return null===Ro?(Ro=[e],Fo=ko(Eo,Wo)):Ro.push(e),zo}function Ho(){if(null!==Fo){var e=Fo;Fo=null,So(e)}Wo()}function Wo(){if(!Mo&&null!==Ro){Mo=!0;var e=0;try{var t=Ro;Go(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ro=null}catch(t){throw null!==Ro&&(Ro=Ro.slice(e+1)),ko(Eo,Ho),t}finally{Mo=!1}}}function Qo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Vo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Yo={current:null},Ko=null,Zo=null,Xo=null;function ei(){Xo=Zo=Ko=null}function ti(e){var t=Yo.current;co(Yo),e.type._context._currentValue=t}function ni(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ri(e,t){Ko=e,Xo=Zo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(ja=!0),e.firstContext=null)}function oi(e,t){if(Xo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Xo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Zo){if(null===Ko)throw Error(a(308));Zo=t,Ko.dependencies={expirationTime:0,firstContext:t,responders:null}}else Zo=Zo.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function ci(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function si(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function li(e,t){var n=e.alternate;null!==n&&ui(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function fi(e,t,n,r){var i=e.updateQueue;ii=!1;var a=i.baseQueue,u=i.shared.pending;if(null!==u){if(null!==a){var c=a.next;a.next=u.next,u.next=c}a=u,i.shared.pending=null,null!==(c=e.alternate)&&(null!==(c=c.updateQueue)&&(c.baseQueue=u))}if(null!==a){c=a.next;var s=i.baseState,l=0,f=null,d=null,p=null;if(null!==c)for(var h=c;;){if((u=h.expirationTime)<r){var m={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===p?(d=p=m,f=s):p=p.next=m,u>l&&(l=u)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),ic(u,h.suspenseConfig);e:{var y=e,v=h;switch(u=t,m=n,v.tag){case 1:if("function"==typeof(y=v.payload)){s=y.call(m,s,u);break e}s=y;break e;case 3:y.effectTag=-4097&y.effectTag|64;case 0:if(null==(u="function"==typeof(y=v.payload)?y.call(m,s,u):y))break e;s=o({},s,u);break e;case 2:ii=!0}}null!==h.callback&&(e.effectTag|=32,null===(u=i.effects)?i.effects=[h]:u.push(h))}if(null===(h=h.next)||h===c){if(null===(u=i.shared.pending))break;h=a.next=u.next,u.next=c,i.baseQueue=a=u,i.shared.pending=null}}null===p?f=s:p.next=d,i.baseState=f,i.baseQueue=p,ac(l),e.expirationTime=l,e.memoizedState=s}}function di(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var pi=Y.ReactCurrentBatchConfig,hi=(new r.Component).refs;function mi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Xe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Hu(),o=pi.suspense;(o=ci(r=Wu(r,e,o),o)).payload=t,null!=n&&(o.callback=n),si(e,o),Qu(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Hu(),o=pi.suspense;(o=ci(r=Wu(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),si(e,o),Qu(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Hu(),r=pi.suspense;(r=ci(n=Wu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),si(e,r),Qu(e,n)}};function vi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Nr(n,r)||!Nr(o,i))}function gi(e,t,n){var r=!1,o=lo,i=t.contextType;return"object"==typeof i&&null!==i?i=oi(i):(o=yo(t)?ho:fo.current,i=(r=null!=(r=t.contextTypes))?mo(e,o):lo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function wi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=hi,ai(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=oi(i):(i=yo(t)?ho:fo.current,o.context=mo(e,i)),fi(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(mi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),fi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Ci(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===hi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ki(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ac(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Bc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ci(e,t,n),r.return=e,r):((r=Oc(n.type,n.key,n.props,null,e.mode,r)).ref=Ci(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=jc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Ec(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Bc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Oc(t.type,t.key,t.props,null,e.mode,n)).ref=Ci(e,null,t),n.return=e,n;case te:return(t=jc(t,e.mode,n)).return=e,t}if(xi(t)||me(t))return(t=Ec(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(xi(n)||me(n))return null!==o?null:f(e,t,n,r,null);ki(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||me(r))return f(t,e=e.get(n)||null,r,o,null);ki(t,r)}return null}function m(o,a,u,c){for(var s=null,l=null,f=a,m=a=0,y=null;null!==f&&m<u.length;m++){f.index>m?(y=f,f=null):y=f.sibling;var v=p(o,f,u[m],c);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,m),null===l?s=v:l.sibling=v,l=v,f=y}if(m===u.length)return n(o,f),s;if(null===f){for(;m<u.length;m++)null!==(f=d(o,u[m],c))&&(a=i(f,a,m),null===l?s=f:l.sibling=f,l=f);return s}for(f=r(o,f);m<u.length;m++)null!==(y=h(f,o,m,u[m],c))&&(e&&null!==y.alternate&&f.delete(null===y.key?m:y.key),a=i(y,a,m),null===l?s=y:l.sibling=y,l=y);return e&&f.forEach((function(e){return t(o,e)})),s}function y(o,u,c,s){var l=me(c);if("function"!=typeof l)throw Error(a(150));if(null==(c=l.call(c)))throw Error(a(151));for(var f=l=null,m=u,y=u=0,v=null,g=c.next();null!==m&&!g.done;y++,g=c.next()){m.index>y?(v=m,m=null):v=m.sibling;var b=p(o,m,g.value,s);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(o,m),u=i(b,u,y),null===f?l=b:f.sibling=b,f=b,m=v}if(g.done)return n(o,m),l;if(null===m){for(;!g.done;y++,g=c.next())null!==(g=d(o,g.value,s))&&(u=i(g,u,y),null===f?l=g:f.sibling=g,f=g);return l}for(m=r(o,m);!g.done;y++,g=c.next())null!==(g=h(m,o,y,g.value,s))&&(e&&null!==g.alternate&&m.delete(null===g.key?y:g.key),u=i(g,u,y),null===f?l=g:f.sibling=g,f=g);return e&&m.forEach((function(e){return t(o,e)})),l}return function(e,r,i,c){var s="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;s&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,s=r;null!==s;){if(s.key===l){switch(s.tag){case 7:if(i.type===ne){n(e,s.sibling),(r=o(s,i.props.children)).return=e,e=r;break e}break;default:if(s.elementType===i.type){n(e,s.sibling),(r=o(s,i.props)).ref=Ci(e,s,i),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}i.type===ne?((r=Ec(i.props.children,e.mode,c,i.key)).return=e,e=r):((c=Oc(i.type,i.key,i.props,null,e.mode,c)).ref=Ci(e,r,i),c.return=e,e=c)}return u(e);case te:e:{for(s=i.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=jc(i,e.mode,c)).return=e,e=r}return u(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Bc(i,e.mode,c)).return=e,e=r),u(e);if(xi(i))return m(e,r,i,c);if(me(i))return y(e,r,i,c);if(l&&ki(e,i),void 0===i&&!s)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var _i=Si(!0),Ai=Si(!1),Oi={},Ei={current:Oi},Bi={current:Oi},ji={current:Oi};function Pi(e){if(e===Oi)throw Error(a(174));return e}function Ti(e,t){switch(so(ji,t),so(Bi,e),so(Ei,Oi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fe(null,"");break;default:t=Fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}co(Ei),so(Ei,t)}function zi(){co(Ei),co(Bi),co(ji)}function Ii(e){Pi(ji.current);var t=Pi(Ei.current),n=Fe(t,e.type);t!==n&&(so(Bi,e),so(Ei,n))}function Di(e){Bi.current===e&&(co(Ei),co(Bi))}var Ri={current:0};function Fi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Mi(e,t){return{responder:e,props:t}}var Ni=Y.ReactCurrentDispatcher,Li=Y.ReactCurrentBatchConfig,Ui=0,$i=null,Gi=null,qi=null,Ji=!1;function Hi(){throw Error(a(321))}function Wi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Qi(e,t,n,r,o,i){if(Ui=i,$i=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ni.current=null===e||null===e.memoizedState?va:ga,e=n(r,o),t.expirationTime===Ui){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,qi=Gi=null,t.updateQueue=null,Ni.current=ba,e=n(r,o)}while(t.expirationTime===Ui)}if(Ni.current=ya,t=null!==Gi&&null!==Gi.next,Ui=0,qi=Gi=$i=null,Ji=!1,t)throw Error(a(300));return e}function Vi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qi?$i.memoizedState=qi=e:qi=qi.next=e,qi}function Yi(){if(null===Gi){var e=$i.alternate;e=null!==e?e.memoizedState:null}else e=Gi.next;var t=null===qi?$i.memoizedState:qi.next;if(null!==t)qi=t,Gi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Gi=e).memoizedState,baseState:Gi.baseState,baseQueue:Gi.baseQueue,queue:Gi.queue,next:null},null===qi?$i.memoizedState=qi=e:qi=qi.next=e}return qi}function Ki(e,t){return"function"==typeof t?t(e):t}function Zi(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Gi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var u=o.next;o.next=i.next,i.next=u}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var c=u=i=null,s=o;do{var l=s.expirationTime;if(l<Ui){var f={expirationTime:s.expirationTime,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===c?(u=c=f,i=r):c=c.next=f,l>$i.expirationTime&&($i.expirationTime=l,ac(l))}else null!==c&&(c=c.next={expirationTime:1073741823,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),ic(l,s.suspenseConfig),r=s.eagerReducer===e?s.eagerState:e(r,s.action);s=s.next}while(null!==s&&s!==o);null===c?i=r:c.next=u,Fr(r,t.memoizedState)||(ja=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Xi(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var u=o=o.next;do{i=e(i,u.action),u=u.next}while(u!==o);Fr(i,t.memoizedState)||(ja=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ea(e){var t=Vi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:e}).dispatch=ma.bind(null,$i,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=$i.updateQueue)?(t={lastEffect:null},$i.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Yi().memoizedState}function ra(e,t,n,r){var o=Vi();$i.effectTag|=e,o.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function oa(e,t,n,r){var o=Yi();r=void 0===r?null:r;var i=void 0;if(null!==Gi){var a=Gi.memoizedState;if(i=a.destroy,null!==r&&Wi(r,a.deps))return void ta(t,n,i,r)}$i.effectTag|=e,o.memoizedState=ta(1|t,n,i,r)}function ia(e,t){return ra(516,4,e,t)}function aa(e,t){return oa(516,4,e,t)}function ua(e,t){return oa(4,2,e,t)}function ca(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function sa(e,t,n){return n=null!=n?n.concat([e]):null,oa(4,2,ca.bind(null,t,e),n)}function la(){}function fa(e,t){return Vi().memoizedState=[e,void 0===t?null:t],e}function da(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Wi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pa(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Wi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ha(e,t,n){var r=Uo();Go(98>r?98:r,(function(){e(!0)})),Go(97<r?97:r,(function(){var r=Li.suspense;Li.suspense=void 0===t?null:t;try{e(!1),n()}finally{Li.suspense=r}}))}function ma(e,t,n){var r=Hu(),o=pi.suspense;o={expirationTime:r=Wu(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===$i||null!==i&&i===$i)Ji=!0,o.expirationTime=Ui,$i.expirationTime=Ui;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=i(a,n);if(o.eagerReducer=i,o.eagerState=u,Fr(u,a))return}catch(e){}Qu(e,r)}}var ya={readContext:oi,useCallback:Hi,useContext:Hi,useEffect:Hi,useImperativeHandle:Hi,useLayoutEffect:Hi,useMemo:Hi,useReducer:Hi,useRef:Hi,useState:Hi,useDebugValue:Hi,useResponder:Hi,useDeferredValue:Hi,useTransition:Hi},va={readContext:oi,useCallback:fa,useContext:oi,useEffect:ia,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=Vi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ma.bind(null,$i,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Vi().memoizedState=e},useState:ea,useDebugValue:la,useResponder:Mi,useDeferredValue:function(e,t){var n=ea(e),r=n[0],o=n[1];return ia((function(){var n=Li.suspense;Li.suspense=void 0===t?null:t;try{o(e)}finally{Li.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[fa(ha.bind(null,t,e),[t,e]),n]}},ga={readContext:oi,useCallback:da,useContext:oi,useEffect:aa,useImperativeHandle:sa,useLayoutEffect:ua,useMemo:pa,useReducer:Zi,useRef:na,useState:function(){return Zi(Ki)},useDebugValue:la,useResponder:Mi,useDeferredValue:function(e,t){var n=Zi(Ki),r=n[0],o=n[1];return aa((function(){var n=Li.suspense;Li.suspense=void 0===t?null:t;try{o(e)}finally{Li.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zi(Ki),n=t[0];return t=t[1],[da(ha.bind(null,t,e),[t,e]),n]}},ba={readContext:oi,useCallback:da,useContext:oi,useEffect:aa,useImperativeHandle:sa,useLayoutEffect:ua,useMemo:pa,useReducer:Xi,useRef:na,useState:function(){return Xi(Ki)},useDebugValue:la,useResponder:Mi,useDeferredValue:function(e,t){var n=Xi(Ki),r=n[0],o=n[1];return aa((function(){var n=Li.suspense;Li.suspense=void 0===t?null:t;try{o(e)}finally{Li.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Xi(Ki),n=t[0];return t=t[1],[da(ha.bind(null,t,e),[t,e]),n]}},wa=null,xa=null,Ca=!1;function ka(e,t){var n=Sc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function _a(e){if(Ca){var t=xa;if(t){var n=t;if(!Sa(e,t)){if(!(t=xn(n.nextSibling))||!Sa(e,t))return e.effectTag=-1025&e.effectTag|2,Ca=!1,void(wa=e);ka(wa,n)}wa=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ca=!1,wa=e}}function Aa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function Oa(e){if(e!==wa)return!1;if(!Ca)return Aa(e),Ca=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gn(t,e.memoizedProps))for(t=xa;t;)ka(e,t),t=xn(t.nextSibling);if(Aa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}xa=null}}else xa=wa?xn(e.stateNode.nextSibling):null;return!0}function Ea(){xa=wa=null,Ca=!1}var Ba=Y.ReactCurrentOwner,ja=!1;function Pa(e,t,n,r){t.child=null===e?Ai(t,null,n,r):_i(t,e.child,n,r)}function Ta(e,t,n,r,o){n=n.render;var i=t.ref;return ri(t,o),r=Qi(e,t,n,r,i,o),null===e||ja?(t.effectTag|=1,Pa(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||_c(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Oc(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ia(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Nr)(o,r)&&e.ref===t.ref)?Qa(e,t,i):(t.effectTag|=1,(e=Ac(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ia(e,t,n,r,o,i){return null!==e&&Nr(e.memoizedProps,r)&&e.ref===t.ref&&(ja=!1,o<i)?(t.expirationTime=e.expirationTime,Qa(e,t,i)):Ra(e,t,n,r,i)}function Da(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ra(e,t,n,r,o){var i=yo(n)?ho:fo.current;return i=mo(t,i),ri(t,o),n=Qi(e,t,n,r,i,o),null===e||ja?(t.effectTag|=1,Pa(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function Fa(e,t,n,r,o){if(yo(n)){var i=!0;wo(t)}else i=!1;if(ri(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),gi(t,n,r),wi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var c=a.context,s=n.contextType;"object"==typeof s&&null!==s?s=oi(s):s=mo(t,s=yo(n)?ho:fo.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&bi(t,a,r,s),ii=!1;var d=t.memoizedState;a.state=d,fi(t,r,a,o),c=t.memoizedState,u!==r||d!==c||po.current||ii?("function"==typeof l&&(mi(t,n,l,r),c=t.memoizedState),(u=ii||vi(t,n,u,r,d,c,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=s,r=u):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ui(e,t),u=t.memoizedProps,a.props=t.type===t.elementType?u:Vo(t.type,u),c=a.context,"object"==typeof(s=n.contextType)&&null!==s?s=oi(s):s=mo(t,s=yo(n)?ho:fo.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||c!==s)&&bi(t,a,r,s),ii=!1,c=t.memoizedState,a.state=c,fi(t,r,a,o),d=t.memoizedState,u!==r||c!==d||po.current||ii?("function"==typeof l&&(mi(t,n,l,r),d=t.memoizedState),(l=ii||vi(t,n,u,r,c,d,s))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,s)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=s,r=l):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Ma(e,t,n,r,i,o)}function Ma(e,t,n,r,o,i){Da(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Qa(e,t,i);r=t.stateNode,Ba.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=_i(t,e.child,null,i),t.child=_i(t,null,u,i)):Pa(e,t,u,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Na(e){var t=e.stateNode;t.pendingContext?go(0,t.pendingContext,t.pendingContext!==t.context):t.context&&go(0,t.context,!1),Ti(e,t.containerInfo)}var La,Ua,$a,Ga={dehydrated:null,retryTime:0};function qa(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Ri.current,u=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(u=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),so(Ri,1&a),null===e){if(void 0!==i.fallback&&_a(t),u){if(u=i.fallback,(i=Ec(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ec(u,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ga,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Ai(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,u){if(i=i.fallback,(n=Ac(e,e.pendingProps)).return=t,0==(2&t.mode)&&(u=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=u;null!==u;)u.return=n,u=u.sibling;return(o=Ac(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ga,t.child=n,o}return n=_i(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,u){if(u=i.fallback,(i=Ec(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ec(u,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ga,t.child=i,n}return t.memoizedState=null,t.child=_i(t,e,i.children,n)}function Ja(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ni(e.return,t)}function Ha(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Wa(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Pa(e,t,r.children,n),0!=(2&(r=Ri.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ja(e,n);else if(19===e.tag)Ja(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(so(Ri,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Fi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ha(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Fi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ha(t,!0,n,null,i,t.lastEffect);break;case"together":Ha(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Qa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&ac(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ac(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ac(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Va(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ya(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return yo(t.type)&&vo(),null;case 3:return zi(),co(po),co(fo),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Oa(t)||(t.effectTag|=4),null;case 5:Di(t),n=Pi(ji.current);var i=t.type;if(null!==e&&null!=t.stateNode)Ua(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Pi(Ei.current),Oa(t)){r=t.stateNode,i=t.type;var u=t.memoizedProps;switch(r[Sn]=t,r[_n]=u,i){case"iframe":case"object":case"embed":Wt("load",r);break;case"video":case"audio":for(e=0;e<Ye.length;e++)Wt(Ye[e],r);break;case"source":Wt("error",r);break;case"img":case"image":case"link":Wt("error",r),Wt("load",r);break;case"form":Wt("reset",r),Wt("submit",r);break;case"details":Wt("toggle",r);break;case"input":ke(r,u),Wt("invalid",r),cn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Wt("invalid",r),cn(n,"onChange");break;case"textarea":Pe(r,u),Wt("invalid",r),cn(n,"onChange")}for(var c in on(i,u),e=null,u)if(u.hasOwnProperty(c)){var s=u[c];"children"===c?"string"==typeof s?r.textContent!==s&&(e=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(e=["children",""+s]):S.hasOwnProperty(c)&&null!=s&&cn(n,c)}switch(i){case"input":we(r),Ae(r,u,!0);break;case"textarea":we(r),ze(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=sn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(c=9===n.nodeType?n:n.ownerDocument,e===un&&(e=Re(i)),e===un?"script"===i?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=c.createElement(i,{is:r.is}):(e=c.createElement(i),"select"===i&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,i),e[Sn]=t,e[_n]=r,La(e,t),t.stateNode=e,c=an(i,r),i){case"iframe":case"object":case"embed":Wt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ye.length;s++)Wt(Ye[s],e);s=r;break;case"source":Wt("error",e),s=r;break;case"img":case"image":case"link":Wt("error",e),Wt("load",e),s=r;break;case"form":Wt("reset",e),Wt("submit",e),s=r;break;case"details":Wt("toggle",e),s=r;break;case"input":ke(e,r),s=Ce(e,r),Wt("invalid",e),cn(n,"onChange");break;case"option":s=Ee(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=o({},r,{value:void 0}),Wt("invalid",e),cn(n,"onChange");break;case"textarea":Pe(e,r),s=je(e,r),Wt("invalid",e),cn(n,"onChange");break;default:s=r}on(i,s);var l=s;for(u in l)if(l.hasOwnProperty(u)){var f=l[u];"style"===u?nn(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&Ne(e,f):"children"===u?"string"==typeof f?("textarea"!==i||""!==f)&&Le(e,f):"number"==typeof f&&Le(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(S.hasOwnProperty(u)?null!=f&&cn(n,u):null!=f&&K(e,u,f,c))}switch(i){case"input":we(e),Ae(e,r,!1);break;case"textarea":we(e),ze(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ge(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Be(e,!!r.multiple,n,!1):null!=r.defaultValue&&Be(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=sn)}vn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)$a(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Pi(ji.current),Pi(Ei.current),Oa(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return co(Ri),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Oa(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(u=t.firstEffect)?(t.firstEffect=i,i.nextEffect=u):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ri.current)?Ou===wu&&(Ou=xu):(Ou!==wu&&Ou!==xu||(Ou=Cu),0!==Tu&&null!==Su&&(zc(Su,Au),Ic(Su,Tu)))),(n||r)&&(t.effectTag|=4),null);case 4:return zi(),null;case 10:return ti(t),null;case 17:return yo(t.type)&&vo(),null;case 19:if(co(Ri),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(u=r.rendering)){if(i)Va(r,!1);else if(Ou!==wu||null!==e&&0!=(64&e.effectTag))for(u=t.child;null!==u;){if(null!==(e=Fi(u))){for(t.effectTag|=64,Va(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)u=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=u,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,u=e.dependencies,i.dependencies=null===u?null:{expirationTime:u.expirationTime,firstContext:u.firstContext,responders:u.responders}),r=r.sibling;return so(Ri,1&Ri.current|2),t.child}u=u.sibling}}else{if(!i)if(null!==(e=Fi(u))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Va(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Lo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Va(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Lo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Lo(),n.sibling=null,t=Ri.current,so(Ri,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Ka(e){switch(e.tag){case 1:yo(e.type)&&vo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(zi(),co(po),co(fo),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Di(e),null;case 13:return co(Ri),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return co(Ri),null;case 4:return zi(),null;case 10:return ti(e),null;default:return null}}function Za(e,t){return{value:e,source:t,stack:ve(t)}}La=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var u,c,s=t.stateNode;switch(Pi(Ei.current),e=null,n){case"input":a=Ce(s,a),r=Ce(s,r),e=[];break;case"option":a=Ee(s,a),r=Ee(s,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=je(s,a),r=je(s,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(s.onclick=sn)}for(u in on(n,r),n=null,a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if("style"===u)for(c in s=a[u])s.hasOwnProperty(c)&&(n||(n={}),n[c]="");else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(S.hasOwnProperty(u)?e||(e=[]):(e=e||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=a?a[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(c in s)!s.hasOwnProperty(c)||l&&l.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in l)l.hasOwnProperty(c)&&s[c]!==l[c]&&(n||(n={}),n[c]=l[c])}else n||(e||(e=[]),e.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(e=e||[]).push(u,l)):"children"===u?s===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(S.hasOwnProperty(u)?(null!=l&&cn(i,u),e||s===l||(e=[])):(e=e||[]).push(u,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},$a=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Xa="function"==typeof WeakSet?WeakSet:Set;function eu(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ve(n)),null!==n&&ye(n.type),t=t.value,null!==e&&1===e.tag&&ye(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function tu(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){gc(e,t)}else t.current=null}function nu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Vo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ru(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ou(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function iu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ou(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Vo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&di(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}di(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&vn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Rt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function au(e,t,n){switch("function"==typeof Cc&&Cc(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Go(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){gc(o,e)}}e=e.next}while(e!==r)}))}break;case 1:tu(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){gc(e,t)}}(t,n);break;case 5:tu(t);break;case 4:lu(e,t,n)}}function uu(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&uu(t)}function cu(e){return 5===e.tag||3===e.tag||4===e.tag}function su(e){e:{for(var t=e.return;null!==t;){if(cu(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Le(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||cu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=sn));else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function lu(e,t,n){for(var r,o,i=t,u=!1;;){if(!u){u=i.return;e:for(;;){if(null===u)throw Error(a(160));switch(r=u.stateNode,u.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}u=u.return}u=!0}if(5===i.tag||6===i.tag){e:for(var c=e,s=i,l=n,f=s;;)if(au(c,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===s)break e;for(;null===f.sibling;){if(null===f.return||f.return===s)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(c=r,s=i.stateNode,8===c.nodeType?c.parentNode.removeChild(s):c.removeChild(s)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(au(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(u=!1)}i.sibling.return=i.return,i=i.sibling}}function fu(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void ru(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[_n]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),an(e,o),t=an(e,r),o=0;o<i.length;o+=2){var u=i[o],c=i[o+1];"style"===u?nn(n,c):"dangerouslySetInnerHTML"===u?Ne(n,c):"children"===u?Le(n,c):K(n,u,c,t)}switch(e){case"input":_e(n,r);break;case"textarea":Te(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Be(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Be(n,!!r.multiple,r.defaultValue,!0):Be(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Rt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Iu=Lo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=tn("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void du(t);case 19:return void du(t);case 17:return}throw Error(a(163))}function du(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xa),t.forEach((function(t){var r=wc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var pu="function"==typeof WeakMap?WeakMap:Map;function hu(e,t,n){(n=ci(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ru||(Ru=!0,Fu=r),eu(e,t)},n}function mu(e,t,n){(n=ci(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return eu(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Mu?Mu=new Set([this]):Mu.add(this),eu(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var yu,vu=Math.ceil,gu=Y.ReactCurrentDispatcher,bu=Y.ReactCurrentOwner,wu=0,xu=3,Cu=4,ku=0,Su=null,_u=null,Au=0,Ou=wu,Eu=null,Bu=1073741823,ju=1073741823,Pu=null,Tu=0,zu=!1,Iu=0,Du=null,Ru=!1,Fu=null,Mu=null,Nu=!1,Lu=null,Uu=90,$u=null,Gu=0,qu=null,Ju=0;function Hu(){return 0!=(48&ku)?1073741821-(Lo()/10|0):0!==Ju?Ju:Ju=1073741821-(Lo()/10|0)}function Wu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Uo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&ku))return Au;if(null!==n)e=Qo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Qo(e,150,100);break;case 97:case 96:e=Qo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Su&&e===Au&&--e,e}function Qu(e,t){if(50<Gu)throw Gu=0,qu=null,Error(a(185));if(null!==(e=Vu(e,t))){var n=Uo();1073741823===t?0!=(8&ku)&&0==(48&ku)?Xu(e):(Ku(e),0===ku&&Ho()):Ku(e),0==(4&ku)||98!==n&&99!==n||(null===$u?$u=new Map([[e,t]]):(void 0===(n=$u.get(e))||n>t)&&$u.set(e,t))}}function Vu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Su===o&&(ac(t),Ou===Cu&&zc(o,Au)),Ic(o,t)),o}function Yu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Tc(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Ku(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Jo(Xu.bind(null,e));else{var t=Yu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Hu();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==zo&&So(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Jo(Xu.bind(null,e)):qo(r,Zu.bind(null,e),{timeout:10*(1073741821-t)-Lo()}),e.callbackNode=t}}}function Zu(e,t){if(Ju=0,t)return Dc(e,t=Hu()),Ku(e),null;var n=Yu(e);if(0!==n){if(t=e.callbackNode,0!=(48&ku))throw Error(a(327));if(mc(),e===Su&&n===Au||nc(e,n),null!==_u){var r=ku;ku|=16;for(var o=oc();;)try{cc();break}catch(t){rc(e,t)}if(ei(),ku=r,gu.current=o,1===Ou)throw t=Eu,nc(e,n),zc(e,n),Ku(e),t;if(null===_u)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ou,Su=null,r){case wu:case 1:throw Error(a(345));case 2:Dc(e,2<n?2:n);break;case xu:if(zc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fc(o)),1073741823===Bu&&10<(o=Iu+500-Lo())){if(zu){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,nc(e,n);break}}if(0!==(i=Yu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(dc.bind(null,e),o);break}dc(e);break;case Cu:if(zc(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fc(o)),zu&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,nc(e,n);break}if(0!==(o=Yu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==ju?r=10*(1073741821-ju)-Lo():1073741823===Bu?r=0:(r=10*(1073741821-Bu)-5e3,0>(r=(o=Lo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vu(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(dc.bind(null,e),r);break}dc(e);break;case 5:if(1073741823!==Bu&&null!==Pu){i=Bu;var u=Pu;if(0>=(r=0|u.busyMinDurationMs)?r=0:(o=0|u.busyDelayMs,r=(i=Lo()-(10*(1073741821-i)-(0|u.timeoutMs||5e3)))<=o?0:o+r-i),10<r){zc(e,n),e.timeoutHandle=bn(dc.bind(null,e),r);break}}dc(e);break;default:throw Error(a(329))}if(Ku(e),e.callbackNode===t)return Zu.bind(null,e)}}return null}function Xu(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&ku))throw Error(a(327));if(mc(),e===Su&&t===Au||nc(e,t),null!==_u){var n=ku;ku|=16;for(var r=oc();;)try{uc();break}catch(t){rc(e,t)}if(ei(),ku=n,gu.current=r,1===Ou)throw n=Eu,nc(e,t),zc(e,t),Ku(e),n;if(null!==_u)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Su=null,dc(e),Ku(e)}return null}function ec(e,t){var n=ku;ku|=1;try{return e(t)}finally{0===(ku=n)&&Ho()}}function tc(e,t){var n=ku;ku&=-2,ku|=8;try{return e(t)}finally{0===(ku=n)&&Ho()}}function nc(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==_u)for(n=_u.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&vo();break;case 3:zi(),co(po),co(fo);break;case 5:Di(r);break;case 4:zi();break;case 13:case 19:co(Ri);break;case 10:ti(r)}n=n.return}Su=e,_u=Ac(e.current,null),Au=t,Ou=wu,Eu=null,ju=Bu=1073741823,Pu=null,Tu=0,zu=!1}function rc(e,t){for(;;){try{if(ei(),Ni.current=ya,Ji)for(var n=$i.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ui=0,qi=Gi=$i=null,Ji=!1,null===_u||null===_u.return)return Ou=1,Eu=t,_u=null;e:{var o=e,i=_u.return,a=_u,u=t;if(t=Au,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u;if(0==(2&a.mode)){var s=a.alternate;s?(a.updateQueue=s.updateQueue,a.memoizedState=s.memoizedState,a.expirationTime=s.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Ri.current),f=i;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var h=f.memoizedProps;d=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(d){var m=f.updateQueue;if(null===m){var y=new Set;y.add(c),f.updateQueue=y}else m.add(c);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=ci(1073741823,null);v.tag=2,si(a,v)}a.expirationTime=1073741823;break e}u=void 0,a=t;var g=o.pingCache;if(null===g?(g=o.pingCache=new pu,u=new Set,g.set(c,u)):void 0===(u=g.get(c))&&(u=new Set,g.set(c,u)),!u.has(a)){u.add(a);var b=bc.bind(null,o,c,a);c.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);u=Error((ye(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ve(a))}5!==Ou&&(Ou=2),u=Za(u,a),f=i;do{switch(f.tag){case 3:c=u,f.effectTag|=4096,f.expirationTime=t,li(f,hu(f,c,t));break e;case 1:c=u;var w=f.type,x=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Mu||!Mu.has(x)))){f.effectTag|=4096,f.expirationTime=t,li(f,mu(f,c,t));break e}}f=f.return}while(null!==f)}_u=lc(_u)}catch(e){t=e;continue}break}}function oc(){var e=gu.current;return gu.current=ya,null===e?ya:e}function ic(e,t){e<Bu&&2<e&&(Bu=e),null!==t&&e<ju&&2<e&&(ju=e,Pu=t)}function ac(e){e>Tu&&(Tu=e)}function uc(){for(;null!==_u;)_u=sc(_u)}function cc(){for(;null!==_u&&!Io();)_u=sc(_u)}function sc(e){var t=yu(e.alternate,e,Au);return e.memoizedProps=e.pendingProps,null===t&&(t=lc(e)),bu.current=null,t}function lc(e){_u=e;do{var t=_u.alternate;if(e=_u.return,0==(2048&_u.effectTag)){if(t=Ya(t,_u,Au),1===Au||1!==_u.childExpirationTime){for(var n=0,r=_u.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}_u.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=_u.firstEffect),null!==_u.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=_u.firstEffect),e.lastEffect=_u.lastEffect),1<_u.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=_u:e.firstEffect=_u,e.lastEffect=_u))}else{if(null!==(t=Ka(_u)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=_u.sibling))return t;_u=e}while(null!==_u);return Ou===wu&&(Ou=5),null}function fc(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function dc(e){var t=Uo();return Go(99,pc.bind(null,e,t)),null}function pc(e,t){do{mc()}while(null!==Lu);if(0!=(48&ku))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=fc(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Su&&(_u=Su=null,Au=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=ku;ku|=32,bu.current=null,mn=Ht;var u=pn();if(hn(u)){if("selectionStart"in u)var c={start:u.selectionStart,end:u.selectionEnd};else e:{var s=(c=(c=u.ownerDocument)&&c.defaultView||window).getSelection&&c.getSelection();if(s&&0!==s.rangeCount){c=s.anchorNode;var l=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{c.nodeType,f.nodeType}catch(e){c=null;break e}var d=0,p=-1,h=-1,m=0,y=0,v=u,g=null;t:for(;;){for(var b;v!==c||0!==l&&3!==v.nodeType||(p=d+l),v!==f||0!==s&&3!==v.nodeType||(h=d+s),3===v.nodeType&&(d+=v.nodeValue.length),null!==(b=v.firstChild);)g=v,v=b;for(;;){if(v===u)break t;if(g===c&&++m===l&&(p=d),g===f&&++y===s&&(h=d),null!==(b=v.nextSibling))break;g=(v=g).parentNode}v=b}c=-1===p||-1===h?null:{start:p,end:h}}else c=null}c=c||{start:0,end:0}}else c=null;yn={activeElementDetached:null,focusedElem:u,selectionRange:c},Ht=!1,Du=o;do{try{hc()}catch(e){if(null===Du)throw Error(a(330));gc(Du,e),Du=Du.nextEffect}}while(null!==Du);Du=o;do{try{for(u=e,c=t;null!==Du;){var w=Du.effectTag;if(16&w&&Le(Du.stateNode,""),128&w){var x=Du.alternate;if(null!==x){var C=x.ref;null!==C&&("function"==typeof C?C(null):C.current=null)}}switch(1038&w){case 2:su(Du),Du.effectTag&=-3;break;case 6:su(Du),Du.effectTag&=-3,fu(Du.alternate,Du);break;case 1024:Du.effectTag&=-1025;break;case 1028:Du.effectTag&=-1025,fu(Du.alternate,Du);break;case 4:fu(Du.alternate,Du);break;case 8:lu(u,l=Du,c),uu(l)}Du=Du.nextEffect}}catch(e){if(null===Du)throw Error(a(330));gc(Du,e),Du=Du.nextEffect}}while(null!==Du);if(C=yn,x=pn(),w=C.focusedElem,c=C.selectionRange,x!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==c&&hn(w)&&(x=c.start,void 0===(C=c.end)&&(C=x),"selectionStart"in w?(w.selectionStart=x,w.selectionEnd=Math.min(C,w.value.length)):(C=(x=w.ownerDocument||document)&&x.defaultView||window).getSelection&&(C=C.getSelection(),l=w.textContent.length,u=Math.min(c.start,l),c=void 0===c.end?u:Math.min(c.end,l),!C.extend&&u>c&&(l=c,c=u,u=l),l=dn(w,u),f=dn(w,c),l&&f&&(1!==C.rangeCount||C.anchorNode!==l.node||C.anchorOffset!==l.offset||C.focusNode!==f.node||C.focusOffset!==f.offset)&&((x=x.createRange()).setStart(l.node,l.offset),C.removeAllRanges(),u>c?(C.addRange(x),C.extend(f.node,f.offset)):(x.setEnd(f.node,f.offset),C.addRange(x))))),x=[];for(C=w;C=C.parentNode;)1===C.nodeType&&x.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<x.length;w++)(C=x[w]).element.scrollLeft=C.left,C.element.scrollTop=C.top}Ht=!!mn,yn=mn=null,e.current=n,Du=o;do{try{for(w=e;null!==Du;){var k=Du.effectTag;if(36&k&&iu(w,Du.alternate,Du),128&k){x=void 0;var S=Du.ref;if(null!==S){var _=Du.stateNode;switch(Du.tag){case 5:x=_;break;default:x=_}"function"==typeof S?S(x):S.current=x}}Du=Du.nextEffect}}catch(e){if(null===Du)throw Error(a(330));gc(Du,e),Du=Du.nextEffect}}while(null!==Du);Du=null,Do(),ku=i}else e.current=n;if(Nu)Nu=!1,Lu=e,Uu=t;else for(Du=o;null!==Du;)t=Du.nextEffect,Du.nextEffect=null,Du=t;if(0===(t=e.firstPendingTime)&&(Mu=null),1073741823===t?e===qu?Gu++:(Gu=0,qu=e):Gu=0,"function"==typeof xc&&xc(n.stateNode,r),Ku(e),Ru)throw Ru=!1,e=Fu,Fu=null,e;return 0!=(8&ku)||Ho(),null}function hc(){for(;null!==Du;){var e=Du.effectTag;0!=(256&e)&&nu(Du.alternate,Du),0==(512&e)||Nu||(Nu=!0,qo(97,(function(){return mc(),null}))),Du=Du.nextEffect}}function mc(){if(90!==Uu){var e=97<Uu?97:Uu;return Uu=90,Go(e,yc)}}function yc(){if(null===Lu)return!1;var e=Lu;if(Lu=null,0!=(48&ku))throw Error(a(331));var t=ku;for(ku|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:ru(5,n),ou(5,n)}}catch(t){if(null===e)throw Error(a(330));gc(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return ku=t,Ho(),!0}function vc(e,t,n){si(e,t=hu(e,t=Za(n,t),1073741823)),null!==(e=Vu(e,1073741823))&&Ku(e)}function gc(e,t){if(3===e.tag)vc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){vc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Mu||!Mu.has(r))){si(n,e=mu(n,e=Za(t,e),1073741823)),null!==(n=Vu(n,1073741823))&&Ku(n);break}}n=n.return}}function bc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Su===e&&Au===n?Ou===Cu||Ou===xu&&1073741823===Bu&&Lo()-Iu<500?nc(e,Au):zu=!0:Tc(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Ku(e)))}function wc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Wu(t=Hu(),e,null)),null!==(e=Vu(e,t))&&Ku(e)}yu=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||po.current)ja=!0;else{if(r<n){switch(ja=!1,t.tag){case 3:Na(t),Ea();break;case 5:if(Ii(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:yo(t.type)&&wo(t);break;case 4:Ti(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,so(Yo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?qa(e,t,n):(so(Ri,1&Ri.current),null!==(t=Qa(e,t,n))?t.sibling:null);so(Ri,1&Ri.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Wa(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),so(Ri,Ri.current),!r)return null}return Qa(e,t,n)}ja=!1}}else ja=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=mo(t,fo.current),ri(t,n),o=Qi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;wo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(t);var u=r.getDerivedStateFromProps;"function"==typeof u&&mi(t,r,u,e),o.updater=yi,t.stateNode=o,o._reactInternalFiber=t,wi(t,r,e,n),t=Ma(null,t,r,!0,i,n)}else t.tag=0,Pa(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return _c(e)?1:0;if(null!=e){if((e=e.$$typeof)===ce)return 11;if(e===fe)return 14}return 2}(o),e=Vo(o,e),i){case 0:t=Ra(null,t,o,e,n);break e;case 1:t=Fa(null,t,o,e,n);break e;case 11:t=Ta(null,t,o,e,n);break e;case 14:t=za(null,t,o,Vo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Vo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Fa(e,t,r,o=t.elementType===r?o:Vo(r,o),n);case 3:if(Na(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ui(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)Ea(),t=Qa(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),wa=t,o=Ca=!0),o)for(n=Ai(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Pa(e,t,r,n),Ea();t=t.child}return t;case 5:return Ii(t),null===e&&_a(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,gn(r,o)?u=null:null!==i&&gn(r,i)&&(t.effectTag|=16),Da(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Pa(e,t,u,n),t=t.child),t;case 6:return null===e&&_a(t),null;case 13:return qa(e,t,n);case 4:return Ti(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_i(t,null,r,n):Pa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ta(e,t,r,o=t.elementType===r?o:Vo(r,o),n);case 7:return Pa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Pa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,u=t.memoizedProps,i=o.value;var c=t.type._context;if(so(Yo,c._currentValue),c._currentValue=i,null!==u)if(c=u.value,0===(i=Fr(c,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(c,i):1073741823))){if(u.children===o.children&&!po.current){t=Qa(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var s=c.dependencies;if(null!==s){u=c.child;for(var l=s.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===c.tag&&((l=ci(n,null)).tag=2,si(c,l)),c.expirationTime<n&&(c.expirationTime=n),null!==(l=c.alternate)&&l.expirationTime<n&&(l.expirationTime=n),ni(c.return,n),s.expirationTime<n&&(s.expirationTime=n);break}l=l.next}}else u=10===c.tag&&c.type===t.type?null:c.child;if(null!==u)u.return=c;else for(u=c;null!==u;){if(u===t){u=null;break}if(null!==(c=u.sibling)){c.return=u.return,u=c;break}u=u.return}c=u}Pa(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ri(t,n),r=r(o=oi(o,i.unstable_observedBits)),t.effectTag|=1,Pa(e,t,r,n),t.child;case 14:return i=Vo(o=t.type,t.pendingProps),za(e,t,o,i=Vo(o.type,i),r,n);case 15:return Ia(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Vo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,yo(r)?(e=!0,wo(t)):e=!1,ri(t,n),gi(t,r,o),wi(t,r,o,n),Ma(null,t,r,!0,e,n);case 19:return Wa(e,t,n)}throw Error(a(156,t.tag))};var xc=null,Cc=null;function kc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Sc(e,t,n,r){return new kc(e,t,n,r)}function _c(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ac(e,t){var n=e.alternate;return null===n?((n=Sc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Oc(e,t,n,r,o,i){var u=2;if(r=e,"function"==typeof e)_c(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case ne:return Ec(n.children,o,i,t);case ue:u=8,o|=7;break;case re:u=8,o|=1;break;case oe:return(e=Sc(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case se:return(e=Sc(13,n,t,o)).type=se,e.elementType=se,e.expirationTime=i,e;case le:return(e=Sc(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:u=10;break e;case ae:u=9;break e;case ce:u=11;break e;case fe:u=14;break e;case de:u=16,r=null;break e;case pe:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Sc(u,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Ec(e,t,n,r){return(e=Sc(7,e,r,t)).expirationTime=n,e}function Bc(e,t,n){return(e=Sc(6,e,null,t)).expirationTime=n,e}function jc(e,t,n){return(t=Sc(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pc(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Tc(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function zc(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Ic(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Dc(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Rc(e,t,n,r){var o=t.current,i=Hu(),u=pi.suspense;i=Wu(i,o,u);e:if(n){t:{if(Xe(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(yo(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(a(171))}if(1===n.tag){var s=n.type;if(yo(s)){n=bo(n,s,c);break e}}n=c}else n=lo;return null===t.context?t.context=n:t.pendingContext=n,(t=ci(i,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),si(o,t),Qu(o,i),i}function Fc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Mc(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Nc(e,t){Mc(e,t),(e=e.alternate)&&Mc(e,t)}function Lc(e,t,n){var r=new Pc(e,t,n=null!=n&&!0===n.hydrate),o=Sc(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ai(o),e[An]=r.current,n&&0!==t&&function(e,t){var n=Ze(t);At.forEach((function(e){ht(e,t,n)})),Ot.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Uc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $c(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=Fc(a);u.call(e)}}Rc(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Lc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var c=o;o=function(){var e=Fc(a);c.call(e)}}tc((function(){Rc(t,a,e,o)}))}return Fc(a)}function Gc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uc(t))throw Error(a(200));return Gc(e,t,null,n)}Lc.prototype.render=function(e){Rc(e,this._internalRoot,null,null)},Lc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Rc(null,e,null,(function(){t[An]=null}))},mt=function(e){if(13===e.tag){var t=Qo(Hu(),150,100);Qu(e,t),Nc(e,t)}},yt=function(e){13===e.tag&&(Qu(e,3),Nc(e,3))},vt=function(e){if(13===e.tag){var t=Hu();Qu(e,t=Wu(t,e,null)),Nc(e,t)}},E=function(e,t,n){switch(t){case"input":if(_e(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=jn(r);if(!o)throw Error(a(90));xe(r),_e(r,o)}}}break;case"textarea":Te(e,n);break;case"select":null!=(t=n.value)&&Be(e,!!n.multiple,t,!1)}},I=ec,D=function(e,t,n,r,o){var i=ku;ku|=4;try{return Go(98,e.bind(null,t,n,r,o))}finally{0===(ku=i)&&Ho()}},R=function(){0==(49&ku)&&(function(){if(null!==$u){var e=$u;$u=null,e.forEach((function(e,t){Dc(t,e),Ku(t)})),Ho()}}(),mc())},F=function(e,t){var n=ku;ku|=2;try{return e(t)}finally{0===(ku=n)&&Ho()}};var Jc,Hc,Wc={Events:[En,Bn,jn,A,k,Fn,function(e){ot(e,Rn)},T,z,Kt,ut,mc,{current:!1}]};Hc=(Jc={findFiberByHostInstance:On,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);xc=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Cc=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},Jc,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Hc?Hc(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wc,t.createPortal=qc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&ku))throw Error(a(187));var n=ku;ku|=1;try{return Go(99,e.bind(null,t))}finally{ku=n,Ho()}},t.hydrate=function(e,t,n){if(!Uc(t))throw Error(a(200));return $c(null,e,t,!0,n)},t.render=function(e,t,n){if(!Uc(t))throw Error(a(200));return $c(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Uc(e))throw Error(a(40));return!!e._reactRootContainer&&(tc((function(){$c(null,null,e,!1,(function(){e._reactRootContainer=null,e[An]=null}))})),!0)},t.unstable_batchedUpdates=ec,t.unstable_createPortal=function(e,t){return qc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Uc(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return $c(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=n(441)},function(e,t,n){"use strict";
|
|
33
|
+
/** @license React v0.19.1
|
|
34
|
+
* scheduler.production.min.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/var r,o,i,a,u;if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,s=null,l=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(l,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(l,0))},o=function(e,t){s=setTimeout(e,t)},i=function(){clearTimeout(s)},a=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var v=p.now();t.unstable_now=function(){return p.now()-v}}var g=!1,b=null,w=-1,x=5,C=0;a=function(){return t.unstable_now()>=C},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,S=k.port2;k.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();C=e+x;try{b(!0,e)?S.postMessage(null):(g=!1,b=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){b=e,g||(g=!0,S.postMessage(null))},o=function(e,n){w=h((function(){e(t.unstable_now())}),n)},i=function(){m(w),w=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<E(o,t)))break e;e[r]=t,e[n]=o,n=r}}function A(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,c=e[u];if(void 0!==a&&0>E(a,n))void 0!==c&&0>E(c,a)?(e[r]=c,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==c&&0>E(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var B=[],j=[],P=1,T=null,z=3,I=!1,D=!1,R=!1;function F(e){for(var t=A(j);null!==t;){if(null===t.callback)O(j);else{if(!(t.startTime<=e))break;O(j),t.sortIndex=t.expirationTime,_(B,t)}t=A(j)}}function M(e){if(R=!1,F(e),!D)if(null!==A(B))D=!0,r(N);else{var t=A(j);null!==t&&o(M,t.startTime-e)}}function N(e,n){D=!1,R&&(R=!1,i()),I=!0;var r=z;try{for(F(n),T=A(B);null!==T&&(!(T.expirationTime>n)||e&&!a());){var u=T.callback;if(null!==u){T.callback=null,z=T.priorityLevel;var c=u(T.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?T.callback=c:T===A(B)&&O(B),F(n)}else O(B);T=A(B)}if(null!==T)var s=!0;else{var l=A(j);null!==l&&o(M,l.startTime-n),s=!1}return s}finally{T=null,z=r,I=!1}}function L(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=u;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||I||(D=!0,r(N))},t.unstable_getCurrentPriorityLevel=function(){return z},t.unstable_getFirstCallbackNode=function(){return A(B)},t.unstable_next=function(e){switch(z){case 1:case 2:case 3:var t=3;break;default:t=z}var n=z;z=t;try{return e()}finally{z=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=z;z=e;try{return t()}finally{z=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?u+c:u,a="number"==typeof a.timeout?a.timeout:L(e)}else a=L(e),c=u;return e={id:P++,callback:n,priorityLevel:e,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>u?(e.sortIndex=c,_(j,e),null===A(B)&&e===A(j)&&(R?i():R=!0,o(M,c-u))):(e.sortIndex=a,_(B,e),D||I||(D=!0,r(N))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();F(e);var n=A(B);return n!==T&&null!==T&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<T.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=z;return function(){var n=z;z=t;try{return e.apply(this,arguments)}finally{z=n}}}},function(e,t,n){"use strict";var r=n(443);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=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");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";
|
|
41
|
+
/** @license React v16.13.1
|
|
42
|
+
* react-is.production.min.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case c:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case v:case y:case s:return e;default:return t}}case i:return t}}}function k(e){return C(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=y,t.Portal=i,t.Profiler=c,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||C(e)===f},t.isConcurrentMode=k,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return C(e)===p},t.isFragment=function(e){return C(e)===a},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===y},t.isPortal=function(e){return C(e)===i},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===u},t.isSuspense=function(e){return C(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===c||e===u||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===x||e.$$typeof===g)},t.typeOf=C},function(e,t,n){"use strict";var r=n(166),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},u=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},c=function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),"[object Array]"===o.call(e)?a(e,t,i):"string"==typeof e?u(e,t,i):c(e,t,i)}},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.call(t))throw new TypeError(r+t);for(var n,a=o.call(arguments,1),u=function(){if(this instanceof n){var r=t.apply(this,a.concat(o.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(o.call(arguments)))},c=Math.max(0,t.length-a.length),s=[],l=0;l<c;l++)s.push("$"+l);if(n=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var f=function(){};f.prototype=t.prototype,n.prototype=new f,f.prototype=null}return n}},function(e,t,n){"use strict";var r=n(236),o=n(49),i=n(238),a=n(239),u=n(454),c=r(a());o(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(237),i=Object.keys,a=i?function(e){return i(e)}:n(450),u=Object.keys;a.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return o(e)?u(r.call(e)):u(e)}):Object.keys=a;return Object.keys||a},e.exports=a},function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(237),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),s=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=a(e),u=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=s&&n;if(u&&e.length>0&&!o.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(r&&e.length>0)for(var y=0;y<e.length;++y)d.push(String(y));else for(var v in e)h&&"prototype"===v||!o.call(e,v)||d.push(String(v));if(c)for(var g=function(e){if("undefined"==typeof window||!p)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)g&&"constructor"===l[b]||!o.call(e,l[b])||d.push(l[b]);return d}}e.exports=r},function(e,t,n){"use strict";var r=n(119)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(119),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){"use strict";var r=n(119),o=n(236),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")?o(n):n}},function(e,t,n){"use strict";var r=n(49),o=n(239);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){var r=n(55),o=n(457),i=n(458);e.exports=function(e){var t=r(e);return i(t,o(t))+1}},function(e,t){e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},function(e,t,n){var r=n(55);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},function(e,t,n){var r=n(459);e.exports=function(e,t){var n=r(e),o=r(t),i=n.getTime()-6e4*n.getTimezoneOffset(),a=o.getTime()-6e4*o.getTimezoneOffset();return Math.round((i-a)/864e5)}},function(e,t,n){var r=n(55);e.exports=function(e){var t=r(e);return t.setHours(0,0,0,0),t}},function(e,t,n){var r=n(55),o=n(169),i=n(462);e.exports=function(e){var t=r(e),n=o(t).getTime()-i(t).getTime();return Math.round(n/6048e5)+1}},function(e,t,n){var r=n(55);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,o=r(e),i=o.getDay(),a=(i<n?7:0)+i-n;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}},function(e,t,n){var r=n(241),o=n(169);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),o(n)}},function(e,t,n){var r=n(240);e.exports=function(e){if(r(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")}},function(e,t){throw new Error("Module parse failed: Unexpected token (1:8)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n> declare module 'date-fns/locale/en' { }\n| ")},function(e,t){throw new Error("Module parse failed: Unexpected token (1:8)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n> declare module 'date-fns/locale/es' { }\n| ")},function(e,t){throw new Error("Module parse failed: Unexpected token (1:8)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n> declare module 'date-fns/locale/fr' { }\n| ")},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=s.length;t;){for(c=s,s=[];++f<t;)c&&c[f].run();f=-1,t=s.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new h(e,t)),1!==s.length||l||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(212);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(){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(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}}},function(e,t){e.exports=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}},function(e,t,n){var r=n(64),o=n(86),i=n(26),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(53),o=n(172);e.exports=function(e,t){return e&&e.length?o(e,r(t,2)):[]}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(224),o=n(250),i=n(155),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},function(e,t,n){var r=n(57)(n(254));e.exports=r},function(e,t,n){var r=n(481),o=n(232),i=n(88),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(255),o=n(175),i=n(485),a=n(26);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t,n){var r=n(47);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&!1!==o(u[a],a,u););return n}}},function(e,t,n){var r=n(88);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(258);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(71),o=n(85);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(71),o=n(117);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(71),o=n(156);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(71),o=n(233);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(176),o=n(493),i=n(494),a=n(495),u=n(260);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(e,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Set]":return new c;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(176);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(64),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(497),o=n(65),i=n(158),a=i&&i.isMap,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(66),o=n(40);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(499),o=n(65),i=n(158),a=i&&i.isSet,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(66),o=n(40);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){(function(e){!function(e){"use strict";var t,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),r=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),i=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),a=l.prototype,u=!(!e.Symbol||!e.Symbol.iterator);if(!(n&&r&&o&&i)){var c;a.append=function(e,t){m(this.__URLSearchParams__,e,t)},a.delete=function(e){delete this.__URLSearchParams__[e]},a.get=function(e){var t=this.__URLSearchParams__;return this.has(e)?t[e][0]:null},a.getAll=function(e){var t=this.__URLSearchParams__;return this.has(e)?t[e].slice(0):[]},a.has=function(e){return v(this.__URLSearchParams__,e)},a.set=function(e,t){this.__URLSearchParams__[e]=[""+t]},a.toString=function(){var e,t,n,r,o=this.__URLSearchParams__,i=[];for(t in o)for(n=f(t),e=0,r=o[t];e<r.length;e++)i.push(n+"="+f(r[e]));return i.join("&")},!!o&&n&&!r&&e.Proxy?(c=new Proxy(n,{construct:function(e,t){return new e(new l(t[0]).toString())}})).toString=Function.prototype.toString.bind(l):c=l,Object.defineProperty(e,"URLSearchParams",{value:c});var s=e.URLSearchParams.prototype;s.polyfill=!0,s.forEach=s.forEach||function(e,t){var n=h(this.toString());Object.getOwnPropertyNames(n).forEach((function(r){n[r].forEach((function(n){e.call(t,n,r,this)}),this)}),this)},s.sort=s.sort||function(){var e,t,n,r=h(this.toString()),o=[];for(e in r)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],a=r[i];for(n=0;n<a.length;n++)this.append(i,a[n])}},s.keys=s.keys||function(){var e=[];return this.forEach((function(t,n){e.push(n)})),p(e)},s.values=s.values||function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},s.entries=s.entries||function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),p(e)},u&&(s[e.Symbol.iterator]=s[e.Symbol.iterator]||s.entries)}function l(e){((e=e||"")instanceof URLSearchParams||e instanceof l)&&(e=e.toString()),this.__URLSearchParams__=h(e)}function f(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function d(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(e){return decodeURIComponent(e)}))}function p(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return u&&(n[e.Symbol.iterator]=function(){return n}),n}function h(e){var t={};if("object"==typeof e)if(y(e))for(var n=0;n<e.length;n++){var r=e[n];if(!y(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");m(t,r[0],r[1])}else for(var o in e)e.hasOwnProperty(o)&&m(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),a=0;a<i.length;a++){var u=i[a],c=u.indexOf("=");-1<c?m(t,d(u.slice(0,c)),d(u.slice(c+1))):u&&m(t,d(u),"")}}return t}function m(e,t,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);v(e,t)?e[t].push(r):e[t]=[r]}function y(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==e?e:"undefined"!=typeof window?window:this)}).call(this,n(33))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(2)),a=r(n(17)),u=r(n(9));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(){return(l=(0,u.default)(o.default.mark((function e(t,n){var r,i,u,c,l,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.id,i=(0,a.default)(n,["id"]),e.next=3,t.query({doctype:"io.cozy.terms",selector:{termsId:r,version:i.version},limit:1});case 3:if(u=e.sent,!(c=u.data)||!c.length){e.next=13;break}if((l=c[0]).termsId!=r||l.version!=i.version||l.url==i.url){e.next=11;break}return f=s(s({_type:"io.cozy.terms"},l),{},{url:i.url}),e.next=11,t.save(f);case 11:e.next=16;break;case 13:return d=s(s({_type:"io.cozy.terms"},i),{},{termsId:r,accepted:!0,acceptedAt:new Date}),e.next=16,t.save(d);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f={save:function(e,t){return l.apply(this,arguments)}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APP_TYPE=void 0;t.APP_TYPE={KONNECTOR:"konnector",WEBAPP:"webapp"}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(504));"undefined"!=typeof __ENABLED_FLAGS__&&o.default.enable(__ENABLED_FLAGS__);var i=o.default;t.default=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.initialize=t.initializeFromDOM=t.getTemplateData=t.initializeFromRemote=t.enable=t.resetFlags=t.listFlags=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(7)),u=r(n(9)),c=r(n(19)),s=r(n(505)),l=n(21);function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=new s.default,h=function(){var e=[].slice.call(arguments);return 1===e.length?p.get(e[0]):(p.set(e[0],e[1]),e[1])},m=function(){return p.keys().sort()};t.listFlags=m;var y=function(){m().forEach((function(e){return p.remove(e)}))};t.resetFlags=y;var v=function(e){var t;if(Array.isArray(e)?(console.log("flags.enable: Deprecation warning: prefer to use an object { flag1: true, flag2: true } instead of an array when using flags.enable"),t=e.map((function(e){return[e,!0]}))):"object"==typeof e&&(t=Object.entries(e)),t){var n,r=f(t);try{for(r.s();!(n=r.n()).done;){var o=(0,c.default)(n.value,2),i=o[0],a=o[1];h(i,a)}}catch(e){r.e(e)}finally{r.f()}}};t.enable=v;var g=function(){var e=(0,u.default)(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.query((0,l.Q)("io.cozy.settings").getById("flags"));case 2:n=e.sent,r=n.data.attributes,v(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initializeFromRemote=g;var b=function(e){if("undefined"==typeof document)return null;var t,n=document.querySelector("[data-cozy]"),r=document.querySelector("[data-cozy-".concat(e,"]"));try{return n?JSON.parse(n.dataset.cozy)[e]:r?(console.warn('Prefer to use [data-cozy] to store template data. <div data-cozy="{{.CozyData}}></div>. "'),JSON.parse(r.dataset["cozy".concat((t=e,t[0].toUpperCase()+t.slice(1)))])):null}catch(e){return null}};t.getTemplateData=b;var w=function(){var e=(0,u.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=b("flags")){e.next=3;break}return e.abrupt("return",!1);case 3:return v(t),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.initializeFromDOM=w;var x=function(){var e=(0,u.default)(a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:if(0!=e.sent){e.next=6;break}return e.next=6,g(t);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initialize=x;var C=function(){function e(t){(0,o.default)(this,e),this.client=t,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(),t.isLogged&&this.handleLogin()}var t,n,r;return(0,i.default)(e,[{key:"refresh",value:(r=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.initializeFromRemote(this.client);case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setupInitializing",value:function(){var e=this;this.initializing=new Promise((function(t){e.resolveInitializing=t}))}},{key:"handleLogin",value:(n=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.initialize(this.client);case 2:this.resolveInitializing(),this.client.emit("plugin:flag:login");case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"handleLogout",value:(t=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h.reset(),this.setupInitializing(),this.client.emit("plugin:flag:logout");case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();C.pluginName="flags",h.store=p,h.list=m,h.reset=y,h.enable=v,h.initializeFromRemote=g,h.initializeFromDOM=w,h.initialize=x,h.plugin=C;var k=h;t.default=k},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(19)),i=r(n(4)),a=r(n(6)),u=r(n(45)),c=r(n(506)),s=function(){function e(){(0,i.default)(this,e),this.store={},"undefined"!=typeof localStorage&&(this.longtermStore=c.default),this.restore()}return(0,a.default)(e,[{key:"restore",value:function(){if(this.longtermStore)for(var e=this.longtermStore.getAll(),t=0,n=Object.entries(e);t<n.length;t++){var r=(0,o.default)(n[t],2),i=r[0],a=r[1];this.store[i]=a,this.emit("change",i)}}},{key:"keys",value:function(){return Object.keys(this.store)}},{key:"get",value:function(e){return this.store.hasOwnProperty(e)||(this.store[e]=null),this.store[e]}},{key:"set",value:function(e,t){this.longtermStore&&this.longtermStore.setItem(e,t),this.store[e]=t,this.emit("change",e)}},{key:"remove",value:function(e){delete this.store[e],this.longtermStore&&this.longtermStore.removeItem(e),this.emit("change",e)}}]),e}();u.default.mixin(s);var l=s;t.default=l},function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,u=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getKey=t.prefix=void 0;t.prefix="flag__";var i=function(e){return"flag__"+e};t.getKey=i;var a=function(){return Object.keys(localStorage).filter((function(e){return 0===e.indexOf("flag__")})).map((function(e){return e.replace("flag__","")}))},u=function(e){var t=localStorage.getItem(i(e));return t?JSON.parse(t):t},c=function(e){return localStorage.removeItem(i(e))},s={getAll:function(){var e,t={},n=r(a());try{for(n.s();!(e=n.n()).done;){var o=e.value;t[o]=u(o)}}catch(e){n.e(e)}finally{n.f()}return t},getItem:u,setItem:function(e,t){var n=JSON.stringify(t);return localStorage.setItem(i(e),n)},clearAll:function(){var e,t=r(a());try{for(t.s();!(e=t.n()).done;){var n=e.value;c(n)}}catch(e){t.e(e)}finally{t.f()}},removeItem:c};t.default=s},function(e,t,n){var r=n(508),o=n(170),i=n(53);e.exports=function(e,t){return r(e,i(t,3),o)}},function(e,t){e.exports=function(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}},function(e,t,n){var r=n(67),o=n(263),i=n(510),a=n(68);e.exports=function(e,t){return t=r(t,e),null==(e=i(e,t))||delete e[a(o(t))]}},function(e,t,n){var r=n(116),o=n(209);e.exports=function(e,t){return t.length<2?e:r(e,o(t,0,-1))}},function(e,t,n){var r=n(179);e.exports=function(e){return r(e)?void 0:e}},function(e,t,n){var r=n(513),o=n(145),i=n(514),a=n(63);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(i(n),0,e.length),t=o(t),e.slice(n,n+t.length)==t}},function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,n){var r=n(515);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(265);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){"use strict";var r=n(517),o=n(518),i=n(266);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(181),o=n(266),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,s=function(e,t){c.apply(e,u(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,o,i,a,c,l,f,p,h,m,y,v){var g,b=t;if("function"==typeof l?b=l(n,b):b instanceof Date?b=h(b):"comma"===o&&u(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?h(e):e})).join(",")),null===b){if(i)return c&&!y?c(n,d.encoder,v,"key"):n;b=""}if("string"==typeof(g=b)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||r.isBuffer(b))return c?[m(y?n:c(n,d.encoder,v,"key"))+"="+m(c(b,d.encoder,v,"value"))]:[m(n)+"="+m(String(b))];var w,x=[];if(void 0===b)return x;if(u(l))w=l;else{var C=Object.keys(b);w=f?C.sort(f):C}for(var k=0;k<w.length;++k){var S=w[k],_=b[S];if(!a||null!==_){var A=u(b)?"function"==typeof o?o(n,S):n:n+(p?"."+S:"["+S+"]");s(x,e(_,A,o,i,a,c,l,f,p,h,m,y,v))}}return x};e.exports=function(e,t){var n,r=e,c=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=d.filter;return("function"==typeof e.filter||u(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?r=(0,c.filter)("",r):u(c.filter)&&(n=c.filter);var l,f=[];if("object"!=typeof r||null===r)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var h=a[l];n||(n=Object.keys(r)),c.sort&&n.sort(c.sort);for(var m=0;m<n.length;++m){var y=n[m];c.skipNulls&&null===r[y]||s(f,p(r[y],y,h,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.formatter,c.encodeValuesOnly,c.charset))}var v=f.join(c.delimiter),g=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),v.length>0?g+v:""}},function(e,t,n){"use strict";var r=n(181),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},s=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(i),s=u?i.slice(0,u.index):i,l=[];if(s){if(!n.plainObjects&&o.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var f=0;n.depth>0&&null!==(u=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(u[1])}return u&&l.push("["+i.slice(u.index)+"]"),function(e,t,n,r){for(var o=r?t:c(t,n),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var s="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,l=parseInt(s,10);n.parseArrays||""!==s?!isNaN(l)&&u!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[s]=o:a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,s={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),p=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),p=n,n=d.length);for(n=0;n<d.length;++n)if(n!==p){var m,y,v=d[n],g=v.indexOf("]="),b=-1===g?v.indexOf("="):g+1;-1===b?(m=t.decoder(v,a.decoder,h,"key"),y=t.strictNullHandling?null:""):(m=t.decoder(v.slice(0,b),a.decoder,h,"key"),y=r.maybeMap(c(v.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,h,"value")}))),y&&t.interpretNumericEntities&&"iso-8859-1"===h&&(y=u(y)),v.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(s,m)?s[m]=r.combine(s[m],y):s[m]=y}return s}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),p=0;p<d.length;++p){var h=d[p],m=s(h,l[h],n,"string"==typeof e);f=r.merge(f,m,n)}return r.compact(f)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=function(){function e(t){(0,o.default)(this,e),this.token=t||""}return(0,i.default)(e,[{key:"toAuthHeader",value:function(){return"Bearer "+this.token}},{key:"toBasicAuth",value:function(){return"user:".concat(this.token,"@")}},{key:"getAccessToken",value:function(){return this.token}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(521);e.exports=new r(n(522))},function(e,t,n){"use strict";function r(){this._types=Object.create(null),this._extensions=Object.create(null);for(var e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}r.prototype.define=function(e,t){for(var n in e){var r=e[n].map((function(e){return e.toLowerCase()}));n=n.toLowerCase();for(var o=0;o<r.length;o++){if("*"!=(i=r[o])[0]){if(!t&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+n+'".');this._types[i]=n}}if(t||!this._extensions[n]){var i=r[0];this._extensions[n]="*"!=i[0]?i:i.substr(1)}}},r.prototype.getType=function(e){var t=(e=String(e)).replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&this._types[n]||null},r.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null},e.exports=r},function(e,t){e.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":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"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/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"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/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"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-error+xml":["xer"],"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":["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/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"],"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/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/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/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/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/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"]}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e,t){return null!=e&&n.call(e,t)}},function(e,t,n){var r=n(230),o=n(228);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.KONNECTORS_DOCTYPE=void 0;var i=o(n(7)),a=o(n(9)),u=o(n(4)),c=o(n(6)),s=o(n(8)),l=o(n(10)),f=o(n(5)),d=o(n(185)),p=o(n(262)),h=r(n(272)),m=n(30);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}t.KONNECTORS_DOCTYPE="io.cozy.konnectors";var v=function(e){(0,s.default)(p,e);var t,n,r,o,l,f=y(p);function p(e){var t;return(0,u.default)(this,p),(t=f.call(this,e)).doctype="io.cozy.konnectors",t.endpoint="/konnectors/",t}return(0,c.default)(p,[{key:"create",value:(l=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("create() method is not available for konnectors");case 1:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)})},{key:"destroy",value:(o=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("destroy() method is not available for konnectors");case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"findTriggersBySlug",value:(r=(0,a.default)(i.default.mark((function e(t){var n,r,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new h.default(this.stackClient),e.next=3,n.all({limit:null});case 3:return r=e.sent,o=r.data,e.abrupt("return",o.map((function(e){return e.attributes})).filter((function(e){return(0,h.isForKonnector)(e,t)})));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"launch",value:(n=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,u,c=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},r=new h.default(this.stackClient),e.next=4,this.findTriggersBySlug(t);case 4:if(o=e.sent,1!==(a=n.accountId?o.filter((function(e){return(0,h.isForAccount)(e,n.accountId)})):o).length){e.next=10;break}return e.abrupt("return",r.launch(o[0]));case 10:if(u=JSON.stringify((0,d.default)({slug:t,accountId:n.accountId})),0!==a.length){e.next=15;break}throw new Error("No trigger found for ".concat(u));case 15:if(!(a.length>1)){e.next=17;break}throw new Error("More than 1 trigger found for ".concat(u));case 17:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"update",value:(t=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,u,c=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:{},t){e.next=3;break}throw new Error("Cannot call update with no slug");case 3:return r=n.source||null,o=n.sync||!1,a=o?{headers:{Accept:"text/event-stream"}}:{},e.next=8,this.stackClient.fetchJSON("PUT","/konnectors/".concat(t)+(r?"?Source=".concat(r):""),a);case 8:return u=e.sent,e.abrupt("return",(0,m.normalizeDoc)(u));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),p}(p.default);t.default=v},function(e,t,n){var r=n(5);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getSharingRules=t.BITWARDEN_CIPHERS_DOCTYPE=t.BITWARDEN_ORGANIZATIONS_DOCTYPE=t.SHARING_DOCTYPE=void 0;var i=o(n(7)),a=o(n(2)),u=o(n(46)),c=o(n(9)),s=o(n(4)),l=o(n(6)),f=o(n(8)),d=o(n(10)),p=o(n(5)),h=r(n(30)),m=n(184),y=n(44);function v(){var e=(0,u.default)(["/sharings/","/recipients"]);return v=function(){return e},e}function g(){var e=(0,u.default)(["/sharings/","/recipients/self"]);return g=function(){return e},e}function b(){var e=(0,u.default)(["/sharings/","/recipients/",""]);return b=function(){return e},e}function w(){var e=(0,u.default)(["/sharings/","/recipients"]);return w=function(){return e},e}function x(){var e=(0,u.default)(["/sharings/",""]);return x=function(){return e},e}function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(){var e=(0,u.default)(["/sharings/doctype/",""]);return S=function(){return e},e}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,p.default)(e);if(t){var o=(0,p.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,d.default)(this,n)}}t.SHARING_DOCTYPE="io.cozy.sharings";t.BITWARDEN_ORGANIZATIONS_DOCTYPE="com.bitwarden.organizations";t.BITWARDEN_CIPHERS_DOCTYPE="com.bitwarden.ciphers";var A=function(e){return(0,h.normalizeDoc)(e,"io.cozy.sharings")},O=function(e){(0,f.default)(d,e);var t,n,r,o,a,u=_(d);function d(){return(0,s.default)(this,d),u.apply(this,arguments)}return(0,l.default)(d,[{key:"findByDoctype",value:(a=(0,c.default)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET",(0,y.uri)(S(),t));case 2:return n=e.sent,e.abrupt("return",k(k({},n),{},{data:n.data.map(A)}));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"get",value:(o=(0,c.default)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,y.uri)(x(),t),e.next=3,this.stackClient.fetchJSON("GET",n);case 3:return r=e.sent,e.abrupt("return",{data:A(r.data)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"create",value:(r=(0,c.default)(i.default.mark((function e(t){var n,r,o,a,u,c,s,l,f,d,p,h,m;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.document,r=t.description,o=t.previewPath,a=t.rules,u=t.recipients,c=void 0===u?[]:u,s=t.readOnlyRecipients,l=void 0===s?[]:s,f=t.openSharing,d=t.appSlug,p={description:r,preview_path:o,open_sharing:f,rules:a||B(n)},h={},d&&(h={app_slug:d}),e.next=6,this.stackClient.fetchJSON("POST","/sharings/",{data:{type:"io.cozy.sharings",attributes:k(k({},p),h),relationships:k(k({},c.length>0&&{recipients:{data:c.map(R)}}),l.length>0&&{read_only_recipients:{data:l.map(R)}})}});case 6:return m=e.sent,e.abrupt("return",{data:A(m.data)});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"share",value:(n=(0,c.default)(i.default.mark((function e(t,n,r,o){var a,u,c=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>4&&void 0!==c[4]?c[4]:null,console.warn("SharingCollection.share is deprecated, use SharingCollection.create instead"),u="two-way"===r?{recipients:n}:{readOnlyRecipients:n},e.abrupt("return",this.create(k(k({document:t},u),{},{description:o,previewPath:a,openSharing:"two-way"===r,rules:B(t,r)})));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r,o){return n.apply(this,arguments)})},{key:"getDiscoveryLink",value:function(e,t){return this.stackClient.fullpath("/sharings/".concat(e,"/discovery?sharecode=").concat(t))}},{key:"addRecipients",value:(t=(0,c.default)(i.default.mark((function e(t){var n,r,o,a,u,c;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.document,r=t.recipients,o=void 0===r?[]:r,a=t.readOnlyRecipients,u=void 0===a?[]:a,e.next=3,this.stackClient.fetchJSON("POST",(0,y.uri)(w(),n._id),{data:{type:"io.cozy.sharings",id:n._id,relationships:k(k({},o.length>0&&{recipients:{data:o.map(R)}}),u.length>0&&{read_only_recipients:{data:u.map(R)}})}});case 3:return c=e.sent,e.abrupt("return",{data:A(c.data)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"revokeRecipient",value:function(e,t){return this.stackClient.fetchJSON("DELETE",(0,y.uri)(b(),e._id,t))}},{key:"revokeSelf",value:function(e){return this.stackClient.fetchJSON("DELETE",(0,y.uri)(g(),e._id))}},{key:"revokeAllRecipients",value:function(e){return this.stackClient.fetchJSON("DELETE",(0,y.uri)(v(),e._id))}}]),d}(h.default);O.normalizeDoctype=h.default.normalizeDoctypeJsonApi;var E=function(e,t){return(0,m.isFile)(e)?z(e,t):"com.bitwarden.organizations"===e._type?D(e):j(e,t)},B=function(e,t){return t&&console.warn("sharingType is deprecated and will be removed. We now set this default rules: ".concat(E(e),"} \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")),E(e,t)};t.getSharingRules=B;var j=function(e,t){var n=e._id,r=e._type;return[k({title:"collection",doctype:r,values:[n]},T(t)),k({title:"items",doctype:"io.cozy.files",values:["".concat(r,"/").concat(n)],selector:"referenced_by"},P(t))]},P=function(e){return"two-way"===e?{add:"sync",update:"sync",remove:"sync"}:{add:"push",update:"none",remove:"push"}},T=function(e){return e?"two-way"===e?{update:"sync",remove:"revoke"}:{update:"push",remove:"revoke"}:{update:"sync",remove:"revoke"}},z=function(e,t){var n=e._id;return[k({title:e.name,doctype:"io.cozy.files",values:[n]},I(e,t))]},I=function(e,t){return(0,m.isDirectory)(e)?t?"two-way"===t?{add:"sync",update:"sync",remove:"sync"}:{add:"push",update:"push",remove:"push"}:{add:"sync",update:"sync",remove:"sync"}:t?"two-way"===t?{update:"sync",remove:"revoke"}:{update:"push",remove:"revoke"}:{update:"sync",remove:"revoke"}},D=function(e){var t=e._id;return[{title:e.name,doctype:"com.bitwarden.organizations",values:[t],add:"sync",update:"sync",remove:"revoke"},{title:"Ciphers",doctype:"com.bitwarden.ciphers",values:[t],add:"sync",update:"sync",remove:"sync",selector:"organization_id"}]},R=function(e){return{id:e._id,type:e._type}},F=O;t.default=F},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getPermissionsFor=void 0;var i=o(n(31)),a=o(n(2)),u=o(n(17)),c=o(n(7)),s=o(n(46)),l=o(n(9)),f=o(n(4)),d=o(n(6)),p=o(n(8)),h=o(n(10)),m=o(n(5)),y=r(n(30)),v=n(184),g=n(44);function b(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(){var e=(0,s.default)(["/permissions/doctype/","/shared-by-link"]);return k=function(){return e},e}function S(){var e=(0,s.default)(["/permissions/",""]);return S=function(){return e},e}function _(){var e=(0,s.default)(["/permissions/",""]);return _=function(){return e},e}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,m.default)(e);if(t){var o=(0,m.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}var O=function(e){return(0,y.normalizeDoc)(e,"io.cozy.permissions")},E=function(e){(0,p.default)(E,e);var t,n,r,o,a,s,h,m,y,v,w,x=A(E);function E(){return(0,f.default)(this,E),x.apply(this,arguments)}return(0,d.default)(E,[{key:"get",value:(w=(0,l.default)(c.default.mark((function e(t){var n;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET",(0,g.uri)(_(),t));case 2:return n=e.sent,e.abrupt("return",{data:O(n.data)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"create",value:(v=(0,l.default)(c.default.mark((function e(t){var n,r,o,i,a,s,l;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t._id,t._type,n=t.codes,r=void 0===n?"code":n,o=t.ttl,i=t.tiny,a=(0,u.default)(t,["_id","_type","codes","ttl","tiny"]),(s=new URLSearchParams).append("codes",r),o&&s.append("ttl",o),i&&s.append("tiny",!0),e.next=7,this.stackClient.fetchJSON("POST","/permissions?".concat(s),{data:{type:"io.cozy.permissions",attributes:a}});case 7:return l=e.sent,e.abrupt("return",{data:O(l.data)});case 9:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"add",value:(y=(0,l.default)(c.default.mark((function e(t,n){var r,o;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t._type,e.next="io.cozy.apps"===e.t0?3:"io.cozy.konnectors"===e.t0?5:"io.cozy.permissions"===e.t0?7:9;break;case 3:return r="/permissions/apps/".concat(t.slug),e.abrupt("break",10);case 5:return r="/permissions/konnectors/".concat(t.slug),e.abrupt("break",10);case 7:return r="/permissions/".concat(t._id),e.abrupt("break",10);case 9:throw new Error("Permissions can only be added on existing permissions, apps and konnectors.");case 10:return e.next=12,this.stackClient.fetchJSON("PATCH",r,{data:{type:"io.cozy.permissions",attributes:{permissions:n}}});case 12:return o=e.sent,e.abrupt("return",{data:O(o.data)});case 14:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"destroy",value:function(e){return this.stackClient.fetchJSON("DELETE",(0,g.uri)(S(),e.id))}},{key:"findLinksByDoctype",value:(m=(0,l.default)(c.default.mark((function e(t){var n;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET",(0,g.uri)(k(),t));case 2:return n=e.sent,e.abrupt("return",C(C({},n),{},{data:n.data.map(O)}));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return m.apply(this,arguments)})},{key:"findApps",value:(h=(0,l.default)(c.default.mark((function e(){var t;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET","/apps/");case 2:return t=e.sent,e.abrupt("return",C(C({},t),{},{data:t.data.map((function(e){return C({_id:e.id},e)}))}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"createSharingLink",value:(s=(0,l.default)(c.default.mark((function e(t){var n,r,o,i=arguments;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},r=n.verbs,e.next=4,this.stackClient.fetchJSON("POST","/permissions?codes=email",{data:{type:"io.cozy.permissions",attributes:{permissions:B(t,!0,r?{verbs:r}:{})}}});case 4:return o=e.sent,e.abrupt("return",{data:O(o.data)});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"fetchPermissionsByLink",value:(a=(0,l.default)(c.default.mark((function e(t){return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.links||!t.links.next){e.next=4;break}return e.next=3,this.stackClient.fetchJSON("GET",t.links.next);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"fetchAllLinks",value:(o=(0,l.default)(c.default.mark((function e(t){var n,r,o;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.findLinksByDoctype(t._type);case 2:n=e.sent,r=n;case 4:if(!r.links||!r.links.next){e.next=11;break}return e.next=7,this.fetchPermissionsByLink(r);case 7:r=e.sent,(o=n.data).push.apply(o,(0,i.default)(r.data.map(O))),e.next=4;break;case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"revokeSharingLink",value:(r=(0,l.default)(c.default.mark((function e(t){var n,r,o,i,a;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fetchAllLinks(t);case 2:n=e.sent,r=n.data.filter((function(e){return j(e,t)})),o=b(r),e.prev=5,o.s();case 7:if((i=o.n()).done){e.next=13;break}return a=i.value,e.next=11,this.destroy(a);case 11:e.next=7;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),o.e(e.t0);case 18:return e.prev=18,o.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[5,15,18,21]])}))),function(e){return r.apply(this,arguments)})},{key:"getOwnPermissions",value:(n=(0,l.default)(c.default.mark((function e(){return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("getOwnPermissions is deprecated, please use fetchOwnPermissions instead"),e.abrupt("return",this.fetchOwnPermissions());case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"fetchOwnPermissions",value:(t=(0,l.default)(c.default.mark((function e(){var t;return c.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET","/permissions/self");case 2:return t=e.sent,e.abrupt("return",{data:O(t.data),included:t.included?t.included.map(O):[]});case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),E}(y.default),B=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e._id,o=e._type,i=n.verbs?n.verbs:t?["GET"]:["ALL"];return(0,v.isFile)(e)?{files:{type:"io.cozy.files",verbs:i,values:[r]}}:{collection:{type:o,verbs:i,values:[r]},files:{type:"io.cozy.files",verbs:i,values:["".concat(o,"/").concat(r)],selector:"referenced_by"}}};t.getPermissionsFor=B,E.normalizeDoctype=y.default.normalizeDoctypeJsonApi;var j=function(e,t){var n=t._id;return(0,v.isFile)(t)?-1!==e.attributes.permissions.files.values.indexOf(n):-1!==e.attributes.permissions.collection.values.indexOf(n)},P=E;t.default=P},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SETTINGS_DOCTYPE=void 0;var o=r(n(7)),i=r(n(2)),a=r(n(9)),u=r(n(4)),c=r(n(6)),s=r(n(8)),l=r(n(10)),f=r(n(5)),d=r(n(30));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}t.SETTINGS_DOCTYPE="io.cozy.settings";var y=function(e){(0,s.default)(r,e);var t,n=m(r);function r(e){return(0,u.default)(this,r),n.call(this,"io.cozy.settings",e)}return(0,c.default)(r,[{key:"get",value:(t=(0,a.default)(o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET","/settings/".concat(t));case 2:return n=e.sent,e.abrupt("return",{data:d.default.normalizeDoctypeJsonApi("io.cozy.settings")(h({id:"/settings/".concat(t)},n.data),n)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(d.default);y.normalizeDoctype=d.default.normalizeDoctypeJsonApi;var v=y;t.default=v},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NOTES_URL_DOCTYPE=t.NOTES_DOCTYPE=void 0;var o=r(n(46)),i=r(n(7)),a=r(n(9)),u=r(n(4)),c=r(n(6)),s=r(n(8)),l=r(n(10)),f=r(n(5)),d=r(n(2)),p=r(n(30)),h=n(44),m=n(531);function y(){var e=(0,o.default)(["/notes/","/open"]);return y=function(){return e},e}function v(){var e=(0,o.default)(["/files/",""]);return v=function(){return e},e}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,d.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.NOTES_DOCTYPE="io.cozy.notes";t.NOTES_URL_DOCTYPE="io.cozy.notes.url";var x=p.default.normalizeDoctypeJsonApi("io.cozy.notes"),C=function(e){return w(w({},x(e,"io.cozy.notes")),e.attributes)},k=function(e){(0,s.default)(f,e);var t,n,r,o,l=g(f);function f(e){return(0,u.default)(this,f),l.call(this,"io.cozy.notes",e)}return(0,c.default)(f,[{key:"all",value:(o=(0,a.default)(i.default.mark((function e(){var t;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("GET","/notes");case 2:return t=e.sent,e.abrupt("return",w(w({},t),{},{data:t.data.map(C)}));case 4:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"destroy",value:(r=(0,a.default)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id,e.next=3,this.stackClient.fetchJSON("DELETE",(0,h.uri)(v(),n));case 3:return r=e.sent,e.abrupt("return",{data:w(w({},C(r.data)),{},{_deleted:!0})});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"create",value:(n=(0,a.default)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dir_id,e.next=3,this.stackClient.fetchJSON("POST","/notes",{data:{type:"io.cozy.notes.documents",attributes:{title:"",schema:(0,m.getDefaultSchema)(),dir_id:n}}});case 3:return r=e.sent,e.abrupt("return",w(w({},r),{},{data:C(r.data)}));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"fetchURL",value:(t=(0,a.default)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id,e.next=3,this.stackClient.fetchJSON("GET",(0,h.uri)(y(),n));case 3:return r=e.sent,e.abrupt("return",{data:(o=r.data,w(w({},p.default.normalizeDoctypeJsonApi("io.cozy.notes.url")(o)),o.attributes))});case 5:case"end":return e.stop()}var o}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getDefaultSchema",value:function(){return(0,m.getDefaultSchema)()}}]),f}(p.default);k.normalizeDoctype=p.default.normalizeDoctypeJsonApi;var S=k;t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultSchema=t.marks=t.nodes=void 0;var r=[["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:!0,parseDOM:[{tag:"li"}]}],["heading",{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,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:!0,selectable:!1,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:!0,atom:!0,attrs:{cxhtml:{default:null}},parseDOM:[{tag:'div[data-node-type="confluenceUnsupportedInline"]'}]}],["unsupportedBlock",{inline:!1,group:"block",atom:!0,selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedBlock"]'}]}],["unsupportedInline",{inline:!0,group:"inline",selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedInline"]'}]}],["hardBreak",{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}]}],["table",{content:"tableRow+",attrs:{isNumberColumnEnabled:{default:!1},layout:{default:"default"},__autoSize:{default:!1}},tableRole:"table",isolating:!0,selectable:!1,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:!0,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:!0,parseDOM:[{tag:".ak-renderer-table-number-column",ignore:!0},{tag:"td"}]}]];t.nodes=r;var o=[["link",{excludes:"color",group:"link",attrs:{href:{},__confluenceMetadata:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]"}]}],["em",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}]}],["strong",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strong"},{tag:"b"},{style:"font-weight"}]}],["textColor",{attrs:{color:{}},inclusive:!0,group:"color",parseDOM:[{style:"color"}]}],["strike",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strike"},{tag:"s"},{tag:"del"},{style:"text-decoration"}]}],["subsup",{inclusive:!0,group:"fontStyle",attrs:{type:{default:"sub"}},parseDOM:[{tag:"sub",attrs:{type:"sub"}},{tag:"sup",attrs:{type:"sup"}}]}],["underline",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"u"},{style:"text-decoration"}]}],["code",{excludes:"fontStyle link searchQuery color",inclusive:!0,parseDOM:[{tag:"span.code",preserveWhitespace:!0},{tag:"code",preserveWhitespace:!0},{tag:"tt",preserveWhitespace:!0},{tag:"span",preserveWhitespace:!0}]}],["typeAheadQuery",{excludes:"searchQuery",inclusive:!0,group:"searchQuery",parseDOM:[{tag:"span[data-type-ahead-query]"}],attrs:{trigger:{default:""}}}]];t.marks=o;t.getDefaultSchema=function(){return{nodes:r,marks:o}}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.OAUTH_CLIENTS_DOCTYPE=void 0;var i=o(n(7)),a=o(n(46)),u=o(n(9)),c=o(n(4)),s=o(n(6)),l=o(n(8)),f=o(n(10)),d=o(n(5)),p=o(n(2)),h=o(n(18)),m=o(n(30)),y=n(44),v=r(n(183)),g=n(72),b=n(58);function w(){var e=(0,a.default)(["/settings/clients/",""]);return w=function(){return e},e}function x(){var e=(0,a.default)(["/settings/clients/",""]);return x=function(){return e},e}function C(){var e=(0,a.default)(["/settings/clients"]);return C=function(){return e},e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var o=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,f.default)(this,n)}}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.OAUTH_CLIENTS_DOCTYPE="io.cozy.oauth.clients";var A=m.default.normalizeDoctypeJsonApi("io.cozy.oauth.clients"),O=function(e){return _(_({},A(e,"io.cozy.oauth.clients")),e.attributes)},E=function(e){(0,l.default)(a,e);var t,n,r,o=k(a);function a(e){return(0,c.default)(this,a),o.call(this,"io.cozy.oauth.clients",e)}return(0,s.default)(a,[{key:"all",value:(r=(0,u.default)(i.default.mark((function e(){var t,n,r,o,a,u,c,s,l,f,d,p,m,b,w,x=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=x.length>0&&void 0!==x[0]?x[0]:{},n=t.limit,r=void 0===n?100:n,o=t.bookmark,a=t.keys,u={"page[limit]":r,"page[cursor]":o},c=(0,y.uri)(C()),s=v.buildURL(c,u),e.prev=5,e.next=8,this.stackClient.fetchJSON("GET",s);case 8:l=e.sent,e.next=14;break;case 11:return e.prev=11,e.t0=e.catch(5),e.abrupt("return",(0,g.dontThrowNotFoundError)(e.t0));case 14:if(f=(0,h.default)(l,"links.next",""),d=new URL("".concat(this.stackClient.uri).concat(f)),p=d.searchParams.get("page[cursor]")||void 0,m=void 0!==p,!a){e.next=24;break}return b=l.data.filter((function(e){return a.includes(e.id)})).map((function(e){return O(e)})),w=_(_({},l.meta),{},{count:b.length}),e.abrupt("return",{data:b,meta:w,next:a.length>b.length&&m,bookmark:p});case 24:return e.abrupt("return",{data:l.data.map((function(e){return O(e)})),meta:l.meta,next:m,bookmark:p});case 25:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return r.apply(this,arguments)})},{key:"get",value:(n=(0,u.default)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.all({keys:[t]});case 2:n=e.sent;case 3:if(!n.next){e.next=9;break}return e.next=6,this.all({keys:[t],bookmark:n.bookmark});case 6:n=e.sent,e.next=3;break;case 9:if(!n.data.length){e.next=13;break}return e.abrupt("return",{data:O(n.data[0])});case 13:throw n.url=(0,y.uri)(x(),t),n.status="404",new b.FetchError(n,"Not Found");case 16:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"destroy",value:(t=(0,u.default)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._id,e.next=3,this.stackClient.fetchJSON("DELETE",(0,y.uri)(w(),n));case 3:return e.abrupt("return",{data:_(_({},O(t)),{},{_deleted:!0})});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),a}(m.default);E.normalizeDoctype=m.default.normalizeDoctypeJsonApi;var B=E;t.default=B},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SHORTCUTS_DOCTYPE=void 0;var o=r(n(7)),i=r(n(46)),a=r(n(9)),u=r(n(4)),c=r(n(6)),s=r(n(8)),l=r(n(10)),f=r(n(5)),d=r(n(30)),p=n(44),h=n(270);function m(){var e=(0,i.default)(["/shortcuts/",""]);return m=function(){return e},e}function y(){var e=(0,i.default)(["/shortcuts"]);return y=function(){return e},e}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}t.SHORTCUTS_DOCTYPE="io.cozy.files.shortcuts";var g=function(e){(0,s.default)(i,e);var t,n,r=v(i);function i(e){return(0,u.default)(this,i),r.call(this,"io.cozy.files.shortcuts",e)}return(0,c.default)(i,[{key:"create",value:(n=(0,a.default)(o.default.mark((function e(t){var n,r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.type||(t.type="io.cozy.files.shortcuts"),t.name&&t.name.trim()&&t.url&&t.dir_id){e.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:if("."!==(n=t.name.trim())&&".."!==n){e.next=6;break}throw new Error("Invalid filename: ".concat(n));case 6:if(!(r=(0,h.getIllegalCharacters)(n)).length){e.next=9;break}throw new Error("Invalid filename containing illegal character(s): ".concat(r));case 9:return i=(0,p.uri)(y()),e.next=12,this.stackClient.fetchJSON("POST",i,{data:{attributes:t,type:"io.cozy.files.shortcuts"}});case 12:return a=e.sent,e.abrupt("return",{data:d.default.normalizeDoctypeJsonApi("io.cozy.files.shortcuts")(a.data,a)});case 14:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"get",value:(t=(0,a.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,p.uri)(m(),t),e.next=3,this.stackClient.fetchJSON("GET",n);case 3:return r=e.sent,e.abrupt("return",{data:d.default.normalizeDoctypeJsonApi("io.cozy.files.shortcuts")(r.data,r)});case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),i}(d.default);g.normalizeDoctype=d.default.normalizeDoctypeJsonApi;var b=g;t.default=b},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CONTACTS_DOCTYPE=void 0;var i=o(n(7)),a=o(n(9)),u=o(n(4)),c=o(n(6)),s=o(n(97)),l=o(n(8)),f=o(n(10)),d=o(n(5)),p=o(n(2)),h=r(n(30));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var o=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,f.default)(this,n)}}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,p.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){return v(v(v({},(0,h.normalizeDoc)(e.data,w)),e.data.attributes),{},{_rev:e.data.meta.rev})},b=function(e){(0,l.default)(o,e);var t,n,r=m(o);function o(){return(0,u.default)(this,o),r.apply(this,arguments)}return(0,c.default)(o,[{key:"find",value:(n=(0,a.default)(i.default.mark((function e(t,n){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==Object.values(t).length||1!=t.me){e.next=4;break}return e.abrupt("return",this.findMyself());case 4:return e.abrupt("return",(0,s.default)((0,d.default)(o.prototype),"find",this).call(this,t,n));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"findMyself",value:(t=(0,a.default)(i.default.mark((function e(){var t,n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stackClient.fetchJSON("POST","/contacts/myself");case 2:return t=e.sent,n={data:[g(t)],next:!1,meta:null,bookmark:!1},e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),o}(h.default),w="io.cozy.contacts";t.CONTACTS_DOCTYPE=w;var x=b;t.default=x},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getIconURL=t.default=void 0;var i=o(n(7)),a=o(n(9)),u=r(n(536));function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l={gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},f=function(e){if(!e.icon)throw new Error("".concat(e.name,": Cannot detect icon mime type since app has no icon"));var t=e.icon.split(".").pop();if(!t)throw new Error("".concat(e.name,": Unable to detect icon mime type from extension (").concat(e.icon,")"));return t},d=function(){var e=(0,a.default)(i.default.mark((function e(t,n){var r,o,a,u,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=c(t),e.prev=1,o.s();case 3:if((a=o.n()).done){e.next=18;break}return u=a.value,e.prev=5,e.next=8,u();case 8:return s=e.sent,n&&n(s),e.abrupt("return",s);case 13:e.prev=13,e.t0=e.catch(5),r=e.t0;case 16:e.next=3;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),o.e(e.t1);case 23:return e.prev=23,o.f(),e.finish(23);case 26:throw r;case 27:case"end":return e.stop()}}),e,null,[[1,20,23,26],[5,13]])})));return function(t,n){return e.apply(this,arguments)}}(),p=function(e,t,n){return e.fetchJSON("GET","/".concat(t,"s/").concat(n)).then((function(e){return e.data.attributes}))},h=function(e,t,n){return e.fetchJSON("GET","/registry/".concat(n)).then((function(e){return e.latest_version.manifest}))},m=function(){var e=(0,a.default)(i.default.mark((function e(t,n){var r,o,a,u,c,s,m,y,v,g,b;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.type,o=n.slug,a=n.appData,u=n.priority,s=[function(){return t.fetch("GET","/".concat(r,"s/").concat(o,"/icon"))},function(){return t.fetch("GET","/registry/".concat(o,"/icon"))}],"registry"===(c=void 0===u?"stack":u)&&s.reverse(),e.next=5,d(s,(function(e){if(!e.ok)throw new Error("Error while fetching icon ".concat(e.statusText))}));case 5:return m=e.sent,e.next=8,m.blob();case 8:if((y=e.sent).type){e.next=25;break}if(g=[function(){return p(t,r,o)},function(){return h(t,0,o)}],"registry"===c&&g.reverse(),e.t1=a,e.t1){e.next=17;break}return e.next=16,d(g);case 16:e.t1=e.sent;case 17:if(e.t0=e.t1,e.t0){e.next=20;break}e.t0={};case 20:if(v=e.t0,b=f(v),l[b]){e.next=24;break}throw new Error('Unknown image extension "'.concat(b,'" for app ').concat(v.name));case 24:y=new Blob([y],{type:l[b]});case 25:return e.abrupt("return",URL.createObjectURL(y));case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),y=function(){return m.apply(this,arguments).catch((function(e){return new u.ErrorReturned}))};t.getIconURL=y;var v=(0,u.default)(y,{maxDuration:3e5,key:function(e,t){var n=t.type,r=t.slug,o=t.priority;return e.uri+NaN+n+":"+r+":"+o}});t.default=v},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorReturned=t.default=void 0;var o=r(n(4)),i=r(n(8)),a=r(n(10)),u=r(n(5));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.default)(e);if(t){var o=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,a.default)(this,n)}}var s=function(e){(0,i.default)(n,e);var t=c(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return n}((0,r(n(35)).default)(String));t.ErrorReturned=s;var l=function(e,t){for(var n=Date.now(),r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];n-e[i].date>t&&delete e[i]}},f=function(e){return"object"==typeof e&&"function"==typeof e.then},d=function(e,t){var n={};return function(){var r=t.key.apply(null,arguments);l(n,t.maxDuration);var o=n[r];if(o)return o.result;var i=e.apply(this,arguments);return n[r]={result:i,date:Date.now()},f(i)&&i.then((function(e){e instanceof s&&delete n[r]})).catch((function(e){delete n[r]})),i}};t.default=d},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.shouldXMLHTTPRequestBeUsed=t.fetchWithXMLHttpRequest=void 0;var o=r(n(7)),i=r(n(19)),a=r(n(9)),u=r(n(42)),c=function(){var e=(0,a.default)(o.default.mark((function e(t,n){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,r){var o=new XMLHttpRequest;n.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",n.onUploadProgress,!1),o.onload=function(){4==this.readyState?e(this):r(this)},o.onerror=function(e){r(e)},o.open(n.method,t,!0),o.withCredentials=!0;for(var a=0,u=Object.entries(n.headers);a<u.length;a++){var c=(0,i.default)(u[a],2),s=c[0],l=c[1];o.setRequestHeader(s,l)}o.send(n.body)}));case 2:return r=e.sent,e.abrupt("return",{headers:(u=r.getAllResponseHeaders(),new Headers(u.split("\r\n").map((function(e){return e.split(":",2)})).filter((function(e){return 2==e.length})))),ok:r.status>=200&&r.status<300,text:function(){var e=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.responseText);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),json:function(){var e=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(r.responseText));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),status:r.status,statusText:r.statusText});case 4:case"end":return e.stop()}var u}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchWithXMLHttpRequest=c;var s=(0,u.default)((function(){var e=new XMLHttpRequest;return"onload"in e&&"onprogress"in e}));t.shouldXMLHTTPRequestBeUsed=function(e,t,n){return Boolean(n.onUploadProgress)&&s()}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(35)),i=r(n(7)),a=r(n(9)),u=r(n(2)),c=r(n(17)),s=r(n(4)),l=r(n(6)),f=r(n(97)),d=r(n(8)),p=r(n(10)),h=r(n(5)),m=r(n(257)),y=r(n(268)),v=r(n(273));function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,h.default)(e);if(t){var o=(0,h.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}var x={clientID:"",clientName:"",clientKind:"",clientSecret:"",clientURI:"",registrationAccessToken:"",redirectURI:"",softwareID:"",softwareVersion:"",logoURI:"",policyURI:"",notificationPlatform:"",notificationDeviceToken:""},C=function(e){(0,d.default)(C,e);var t,n,r,o,u,p,m,g=w(C);function C(e){var t,n=e.oauth,r=e.scope,o=void 0===r?[]:r,i=e.onTokenRefresh,a=(0,c.default)(e,["oauth","scope","onTokenRefresh"]);return(0,s.default)(this,C),(t=g.call(this,a)).setOAuthOptions(b(b({},x),n)),n.token&&t.setToken(n.token),t.scope=o,t.onTokenRefresh=i,t}return(0,l.default)(C,[{key:"isRegistered",value:function(){return""!==this.oauthOptions.clientID}},{key:"snakeCaseOAuthData",value:function(e){var t={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"},n={};return Object.keys(e).forEach((function(r){var o=t[r]||r,i=e[r];n[o]=i})),n.redirect_uris&&n.redirect_uris instanceof Array==!1&&(n.redirect_uris=[n.redirect_uris]),n}},{key:"camelCaseOAuthData",value:function(e){var t={client_id:"clientID",client_name:"clientName",client_secret:"clientSecret",registration_access_token:"registrationAccessToken",software_id:"softwareID",redirect_uris:"redirectURI"},n={};return Object.keys(e).forEach((function(r){var o=t[r]||r,i=e[r];n[o]=i})),n}},{key:"doRegistration",value:function(){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}))}},{key:"register",value:(m=(0,a.default)(i.default.mark((function e(){var t,n,r,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRegistered()){e.next=2;break}throw new Error("Client already registered");case 2:if(t=["redirectURI"],n=Object.keys(this.oauthOptions),!((r=t.filter((function(e){return n[e]}))).length>0)){e.next=7;break}throw new Error("Can't register client : missing ".concat(r," fields"));case 7:return e.next=9,this.doRegistration();case 9:return o=e.sent,this.setOAuthOptions(b(b({},this.oauthOptions),{},{client_id:o.client_id,client_name:o.client_name,client_secret:o.client_secret,registration_access_token:o.registration_access_token,software_id:o.software_id})),e.abrupt("return",this.oauthOptions);case 12:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"unregister",value:(p=(0,a.default)(i.default.mark((function e(){var t;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isRegistered()){e.next=2;break}throw new k;case 2:return t=this.oauthOptions.clientID,this.oauthOptions.clientID="",e.abrupt("return",this.fetchJSON("DELETE","/auth/register/".concat(t),null,{headers:{Authorization:this.registrationAccessTokenToAuthHeader()}}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"fetchInformation",value:(u=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isRegistered()){e.next=2;break}throw new k;case 2:return e.abrupt("return",this.fetchJSON("GET","/auth/register/".concat(this.oauthOptions.clientID),null,{headers:{Authorization:this.registrationAccessTokenToAuthHeader()}}));case 3:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"updateInformation",value:(o=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,u=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]&&u[1],this.isRegistered()){e.next=3;break}throw new k;case 3:return r={clientID:this.oauthOptions.clientID,clientName:this.oauthOptions.clientName,redirectURI:this.oauthOptions.redirectURI,softwareID:this.oauthOptions.softwareID},o=this.snakeCaseOAuthData(b(b({},r),t)),n&&(o.client_secret=this.oauthOptions.clientSecret),e.next=8,this.fetchJSON("PUT","/auth/register/".concat(this.oauthOptions.clientID),o,{headers:{Authorization:this.registrationAccessTokenToAuthHeader()}});case 8:return a=e.sent,this.setOAuthOptions(b(b({},o),a)),e.abrupt("return",this.oauthOptions);case 11:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"generateStateCode",value:function(){var e;if("undefined"!=typeof window&&void 0!==window.crypto&&"function"==typeof window.crypto.getRandomValues)e=new Uint8Array(16),window.crypto.getRandomValues(e);else{e=new Array(16);for(var t=0;t<e.length;t++)e[t]=Math.floor(255*Math.random())}return btoa(String.fromCharCode.apply(null,e)).replace(/=+$/,"").replace(/\//g,"_").replace(/\+/g,"-")}},{key:"getAuthCodeURL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scope;if(!this.isRegistered())throw new k;var n={client_id:this.oauthOptions.clientID,redirect_uri:this.oauthOptions.redirectURI,state:e,response_type:"code",scope:t.join(" ")};return this.oauthOptions.registerToken&&(n=b(b({},n),{},{registerToken:this.oauthOptions.registerToken})),"".concat(this.uri,"/auth/authorize?").concat(this.dataToQueryString(n))}},{key:"dataToQueryString",value:function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))})).join("&")}},{key:"getAccessCodeFromURL",value:function(e,t){if(!t)throw new Error("Missing state code");var n=new URL(e).searchParams,r=n.get("state"),o=n.get("access_code");if(t!==r)throw new Error("Given state does not match url query state");return o}},{key:"fetchAccessToken",value:(r=(0,a.default)(i.default.mark((function e(t,n,r){var o,a,u;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isRegistered()||n){e.next=2;break}throw new k;case 2:return o=n||this.oauthOptions,a={grant_type:"authorization_code",code:t,client_id:o.clientID,client_secret:o.clientSecret},e.next=6,this.fetchJSON("POST",(r||"")+"/auth/access_token",this.dataToQueryString(a),{headers:{"Content-Type":"application/x-www-form-urlencoded"}});case 6:return u=e.sent,e.abrupt("return",new y.default(u));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"fetchSessionCode",value:(n=(0,a.default)(i.default.mark((function e(){return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.fetchJSON("POST","/auth/session_code"));case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"refreshToken",value:(t=(0,a.default)(i.default.mark((function e(){var t,n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isRegistered()){e.next=2;break}throw new k;case 2:if(this.token){e.next=4;break}throw new Error("No token to refresh");case 4:return t={grant_type:"refresh_token",refresh_token:this.token.refreshToken,client_id:this.oauthOptions.clientID,client_secret:this.oauthOptions.clientSecret},e.next=7,(0,f.default)((0,h.default)(C.prototype),"fetchJSON",this).call(this,"POST","/auth/access_token",this.dataToQueryString(t),{headers:{"Content-Type":"application/x-www-form-urlencoded"}});case 7:return n=e.sent,r=new y.default(b({refresh_token:this.token.refreshToken},n)),this.onTokenRefresh&&"function"==typeof this.onTokenRefresh&&this.onTokenRefresh(r),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"exchangeOAuthSecret",value:function(e,t){return this.fetchJSON("POST",e+"/auth/secret_exchange",{secret:t})}},{key:"setToken",value:function(e){this.token=e?e instanceof y.default?e:new y.default(e):null}},{key:"setCredentials",value:function(e){return(0,v.default)("setCredentials is deprecated, please replace by setToken"),this.setToken(e)}},{key:"setOAuthOptions",value:function(e){this.oauthOptions=this.camelCaseOAuthData(e)}},{key:"resetClientId",value:function(){this.oauthOptions.clientID=""}},{key:"resetClient",value:function(){this.resetClientId(),this.setUri(null),this.setToken(null)}},{key:"registrationAccessTokenToAuthHeader",value:function(){if(!this.oauthOptions.registrationAccessToken)throw new Error("No registration access token");return"Bearer "+this.oauthOptions.registrationAccessToken}}]),C}(m.default),k=function(e){(0,d.default)(n,e);var t=w(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Client not registered or missing OAuth information";return(0,s.default)(this,n),(e=t.call(this,r)).message=r,e.name="NotRegisteredException",e}return n}((0,o.default)(Error)),S=C;t.default=S},function(e,t,n){var r=n(252),o=n(43),i=n(254);e.exports=function(e,t){if(!e||!e.length)return[];var n=i(e);return null==t?n:o(n,(function(e){return r(t,void 0,e)}))}},function(e,t){e.exports=function(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}},function(e,t,n){var r=n(175);e.exports=function(e,t,n,o){return r(e,(function(e,r,i){t(o,e,n(e),i)})),o}},function(e,t,n){var r=n(50),o=n(543),i=new r,a=Array.prototype.slice;(t=e.exports=function(e){var n=function(){return i.write(e,void 0,a.call(arguments)),n};return n.debug=function(){return i.write(e,"debug",a.call(arguments)),n},n.info=function(){return i.write(e,"info",a.call(arguments)),n},n.warn=function(){return i.write(e,"warn",a.call(arguments)),n},n.error=function(){return i.write(e,"error",a.call(arguments)),n},n.group=function(){return i.write(e,"group",a.call(arguments)),n},n.groupEnd=function(){return i.write(e,"groupEnd",a.call(arguments)),n},n.log=n.debug,n.suggest=t.suggest,n.format=i.format,n}).defaultBackend=t.defaultFormatter=null,t.pipe=function(e){return i.pipe(e)},t.end=t.unpipe=t.disable=function(e){return i.unpipe(e)},t.Transform=r,t.Filter=o,t.suggest=new o,t.enable=function(){return t.defaultFormatter?i.pipe(t.suggest).pipe(t.defaultFormatter).pipe(t.defaultBackend):i.pipe(t.suggest).pipe(t.defaultBackend)}},function(e,t,n){var r=n(50),o={debug:1,info:2,warn:3,error:4};function i(){this.enabled=!0,this.defaultResult=!0,this.clear()}function a(e,t){return e.n.test?e.n.test(t):e.n==t}r.mixin(i),i.prototype.allow=function(e,t){return this._white.push({n:e,l:o[t]}),this},i.prototype.deny=function(e,t){return this._black.push({n:e,l:o[t]}),this},i.prototype.clear=function(){return this._white=[],this._black=[],this},i.prototype.test=function(e,t){var n,r=Math.max(this._white.length,this._black.length);for(n=0;n<r;n++){if(this._white[n]&&a(this._white[n],e)&&o[t]>=this._white[n].l)return!0;if(this._black[n]&&a(this._black[n],e)&&o[t]<=this._black[n].l)return!1}return this.defaultResult},i.prototype.write=function(e,t,n){if(!this.enabled||this.test(e,t))return this.emit("item",e,t,n)},e.exports=i},function(e,t,n){var r=n(50),o=/\n+$/,i=new r;i.write=function(e,t,n){var r=n.length-1;if("undefined"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[e,t].concat(n));if(JSON&&JSON.stringify){n[r]&&"string"==typeof n[r]&&(n[r]=n[r].replace(o,""));try{for(r=0;r<n.length;r++)n[r]=JSON.stringify(n[r])}catch(e){}console.log(n.join(" "))}}},i.formatters=["color","minilog"],i.color=n(545),i.minilog=n(546),e.exports=i},function(e,t,n){var r=n(50),o=n(281),i={debug:["cyan"],info:["purple"],warn:["yellow",!0],error:["red",!0]},a=new r;a.write=function(e,t,n){console.log;console[t]&&console[t].apply&&console[t].apply(console,["%c"+e+" %c"+t,o("gray"),o.apply(o,i[t])].concat(n))},a.pipe=function(){},e.exports=a},function(e,t,n){var r=n(50),o=n(281),i={debug:["gray"],info:["purple"],warn:["yellow",!0],error:["red",!0]},a=new r;a.write=function(e,t,n){var r=console.log;"debug"!=t&&console[t]&&(r=console[t]);var a=0;if("info"!=t){for(;a<n.length&&"string"==typeof n[a];a++);r.apply(console,["%c"+e+" "+n.slice(0,a).join(" "),o.apply(o,i[t])].concat(n.slice(a)))}else r.apply(console,["%c"+e,o.apply(o,i[t])].concat(n))},a.pipe=function(){},e.exports=a},function(e,t,n){var r=n(50),o=[],i=new r;i.write=function(e,t,n){o.push([e,t,n])},i.get=function(){return o},i.empty=function(){o=[]},e.exports=i},function(e,t,n){var r=n(50),o=!1,i=new r;i.write=function(e,t,n){if("undefined"!=typeof window&&"undefined"!=typeof JSON&&JSON.stringify&&JSON.parse)try{o||(o=window.localStorage.minilog?JSON.parse(window.localStorage.minilog):[]),o.push([(new Date).toString(),e,t,n]),window.localStorage.minilog=JSON.stringify(o)}catch(e){}},e.exports=i},function(e,t,n){var r=n(50),o=(new Date).valueOf().toString(36);function i(e){this.url=e.url||"",this.cache=[],this.timer=null,this.interval=e.interval||3e4,this.enabled=!0,this.jQuery=window.jQuery,this.extras={}}r.mixin(i),i.prototype.write=function(e,t,n){this.timer||this.init(),this.cache.push([e,t].concat(n))},i.prototype.init=function(){if(this.enabled&&this.jQuery){var e=this;this.timer=setTimeout((function(){var t,n,r=[],i=e.url;if(0==e.cache.length)return e.init();for(t=0;t<e.cache.length;t++)try{JSON.stringify(e.cache[t]),r.push(e.cache[t])}catch(e){}e.jQuery.isEmptyObject(e.extras)?(n=JSON.stringify({logs:r}),i=e.url+"?client_id="+o):n=JSON.stringify(e.jQuery.extend({logs:r},e.extras)),e.jQuery.ajax(i,{type:"POST",cache:!1,processData:!1,data:n,contentType:"application/json",timeout:1e4}).success((function(t,n,r){t.interval&&(e.interval=Math.max(1e3,t.interval))})).error((function(){e.interval=3e4})).always((function(){e.init()})),e.cache=[]}),this.interval)}},i.prototype.end=function(){},i.jQueryWait=function(e){if("undefined"!=typeof window&&(window.jQuery||window.$))return e(window.jQuery||window.$);"undefined"!=typeof window&&setTimeout((function(){i.jQueryWait(e)}),200)},e.exports=i},function(e,t,n){var r=n(551),o=n(122),i=n(57),a=n(123),u=i((function(e,t){return a(e)?r(e,o(t,1,a,!0)):[]}));e.exports=u},function(e,t,n){var r=n(109),o=n(173),i=n(174),a=n(43),u=n(65),c=n(110);e.exports=function(e,t,n,s){var l=-1,f=o,d=!0,p=e.length,h=[],m=t.length;if(!p)return h;n&&(t=a(t,u(n))),s?(f=i,d=!1):t.length>=200&&(f=c,d=!1,t=new r(t));e:for(;++l<p;){var y=e[l],v=null==n?y:n(y);if(y=s||0!==y?y:0,d&&v==v){for(var g=m;g--;)if(t[g]===v)continue e;h.push(y)}else f(t,v,s)||h.push(y)}return h}},function(e,t,n){var r=n(111),o=n(122),i=n(124),a=n(26);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],u=e;u--;)t[u-1]=arguments[u];return r(a(n)?i(n):[n],o(t,1))}},function(e,t,n){var r=n(286),o=n(26);e.exports=function(e,t,n,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=i?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},function(e,t,n){var r=n(175),o=n(47);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},function(e,t,n){var r=n(557);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,a=t.criteria,u=i.length,c=n.length;++o<u;){var s=r(i[o],a[o]);if(s)return o>=c?s:s*("desc"==n[o]?-1:1)}return e.index-t.index}},function(e,t,n){var r=n(82);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e==e,a=r(e),u=void 0!==t,c=null===t,s=t==t,l=r(t);if(!c&&!l&&!a&&e>t||a&&u&&s&&!c&&!l||o&&u&&s||!n&&s||!i)return 1;if(!o&&!a&&!l&&e<t||l&&n&&i&&!o&&!a||c&&n&&i||!u&&i||!s)return-1}return 0}},function(e,t,n){!function(){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return e instanceof Date?e.getTime():r(e)?e.map(o):e&&"function"==typeof e.toJSON?e.toJSON():e}function i(e,t){return n(e.get)?e.get(t):e[t]}function a(e){return function(t,n){if(!r(n)||!n.length)return e(t,n);for(var o=0,a=n.length;o<a;o++)if(e(t,i(n,o)))return!0;return!1}}function u(e,t,n,r){return e.v(e.a,t,n,r)}var c,s={$eq:a((function(e,t){return e(t)})),$ne:(c=function(e,t){return!e(t)},function(e,t){if(!r(t)||!t.length)return c(e,t);for(var n=0,o=t.length;n<o;n++)if(!c(e,i(t,n)))return!1;return!0}),$gt:a((function(e,t){return v.compare(o(t),e)>0})),$gte:a((function(e,t){return v.compare(o(t),e)>=0})),$lt:a((function(e,t){return v.compare(o(t),e)<0})),$lte:a((function(e,t){return v.compare(o(t),e)<=0})),$mod:a((function(e,t){return t%e[0]==e[1]})),$in:function(e,t){if(!(t instanceof Array)){var n=o(t);if(n===t&&"object"==typeof t)for(a=e.length;a--;)if(String(e[a])===String(t)&&"[object Object]"!==String(t))return!0;if(void 0===n)for(a=e.length;a--;)if(null==e[a])return!0;for(a=e.length;a--;){var r=u(y(i(e,a),void 0),t,a,e);if(r&&"[object Object]"!==String(r)&&"[object Object]"!==String(t))return!0}return!!~e.indexOf(n)}for(var a=t.length;a--;)if(~e.indexOf(o(i(t,a))))return!0;return!1},$nin:function(e,t,n,r){return!s.$in(e,t,n,r)},$not:function(e,t,n,r){return!u(e,t,n,r)},$type:function(e,t){return null!=t&&(t instanceof e||t.constructor==e)},$all:function(e,t,n,r){return s.$and(e,t,n,r)},$size:function(e,t){return!!t&&e===t.length},$or:function(e,t,n,r){for(var o=0,a=e.length;o<a;o++)if(u(i(e,o),t,n,r))return!0;return!1},$nor:function(e,t,n,r){return!s.$or(e,t,n,r)},$and:function(e,t,n,r){for(var o=0,a=e.length;o<a;o++)if(!u(i(e,o),t,n,r))return!1;return!0},$regex:a((function(e,t){return"string"==typeof t&&e.test(t)})),$where:function(e,t,n,r){return e.call(t,t,n,r)},$elemMatch:function(e,t,n,o){return r(t)?!!~f(t,e):u(e,t,n,o)},$exists:function(e,t,n,r){return r.hasOwnProperty(n)===e}},l={$eq:function(e){return e instanceof RegExp?function(t){return"string"==typeof t&&e.test(t)}:e instanceof Function?e:r(e)&&!e.length?function(e){return r(e)&&!e.length}:null===e?function(e){return null==e}:function(t){return 0===v.compare(o(t),e)}},$ne:function(e){return l.$eq(e)},$and:function(e){return e.map(m)},$all:function(e){return l.$and(e)},$or:function(e){return e.map(m)},$nor:function(e){return e.map(m)},$not:function(e){return m(e)},$regex:function(e,t){return new RegExp(e,t.$options)},$where:function(e){return"string"==typeof e?new Function("obj","return "+e):e},$elemMatch:function(e){return m(e)},$exists:function(e){return!!e}};function f(e,t){for(var n=0;n<e.length;n++){i(e,n);if(u(t,i(e,n)))return n}return-1}function d(e,t){return{a:e,v:t}}function p(e,t){var n=[];if(function e(t,n,o,a,u){if(o===n.length||null==t)return void u.push([t,n[o-1],a]);var c=i(n,o);if(r(t)&&isNaN(Number(c)))for(var s=0,l=t.length;s<l;s++)e(i(t,s),n,o,t,u);else e(i(t,c),n,o+1,t,u)}(t,e.k,0,t,n),1===n.length){var o=n[0];return u(e.nv,o[0],o[1],o[2])}for(var a=e&&e.q&&void 0!==e.q.$ne,c=a,s=0;s<n.length;s++){var l=n[s],f=u(e.nv,l[0],l[1],l[2]);a?c&=f:c|=f}return c}function h(e,t,n){return{a:{k:e,nv:t,q:n},v:p}}function m(e){var t;(e=o(e))&&((t=e)&&t.constructor===Object)||(e={$eq:e});var n=[];for(var r in e){var i=e[r];if("$options"!==r)if(s[r])l[r]&&(i=l[r](i,e)),n.push(d(o(i),s[r]));else{if(36===r.charCodeAt(0))throw new Error("Unknown operation "+r);n.push(h(r.split("."),m(i),i))}}return 1===n.length?n[0]:d(n,s.$and)}function y(e,t){var n=m(e);return t&&(n={a:n,v:function(e,n,r,o){return u(e,t(n),r,o)}}),n}function v(e,t,r){n(t)&&(r=t,t=void 0);var o=y(e,r);function i(e,t,n){return u(o,e,t,n)}return t?t.filter(i):i}v.use=function(e){if(n(e))return e(v);for(var t in e)36===t.charCodeAt(0)&&(s[t]=e[t])},v.indexOf=function(e,t,n){return f(t,y(e,n))},v.compare=function(e,t){if(e===t)return 0;if(typeof e==typeof t){if(e>t)return 1;if(e<t)return-1}},void 0!==e.exports&&(Object.defineProperty(t,"__esModule",{value:!0}),e.exports=v,t.default=e.exports.default=v),"undefined"!=typeof window&&(window.sift=v)}()},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(560));"undefined"!=typeof __ENABLED_FLAGS__&&o.default.enable(__ENABLED_FLAGS__);var i=o.default;t.default=i},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.initialize=t.initializeFromDOM=t.getTemplateData=t.initializeFromRemote=t.enable=t.resetFlags=t.listFlags=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(7)),u=r(n(9)),c=r(n(19)),s=r(n(561)),l=n(21);function f(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=new s.default,h=function(){var e=[].slice.call(arguments);return 1===e.length?p.get(e[0]):(p.set(e[0],e[1]),e[1])},m=function(){return p.keys().sort()};t.listFlags=m;var y=function(){m().forEach((function(e){return p.remove(e)}))};t.resetFlags=y;var v=function(e){var t;if(Array.isArray(e)?(console.log("flags.enable: Deprecation warning: prefer to use an object { flag1: true, flag2: true } instead of an array when using flags.enable"),t=e.map((function(e){return[e,!0]}))):"object"==typeof e&&(t=Object.entries(e)),t){var n,r=f(t);try{for(r.s();!(n=r.n()).done;){var o=(0,c.default)(n.value,2),i=o[0],a=o[1];h(i,a)}}catch(e){r.e(e)}finally{r.f()}}};t.enable=v;var g=function(){var e=(0,u.default)(a.default.mark((function e(t){var n,r;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.query((0,l.Q)("io.cozy.settings").getById("flags"));case 2:n=e.sent,r=n.data.attributes,v(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initializeFromRemote=g;var b=function(e){if("undefined"==typeof document)return null;var t,n=document.querySelector("[data-cozy]"),r=document.querySelector("[data-cozy-".concat(e,"]"));try{return n?JSON.parse(n.dataset.cozy)[e]:r?(console.warn('Prefer to use [data-cozy] to store template data. <div data-cozy="{{.CozyData}}></div>. "'),JSON.parse(r.dataset["cozy".concat((t=e,t[0].toUpperCase()+t.slice(1)))])):null}catch(e){return null}};t.getTemplateData=b;var w=function(){var e=(0,u.default)(a.default.mark((function e(){var t;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=b("flags")){e.next=3;break}return e.abrupt("return",!1);case 3:return v(t),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();t.initializeFromDOM=w;var x=function(){var e=(0,u.default)(a.default.mark((function e(t){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w();case 2:if(0!=e.sent){e.next=6;break}return e.next=6,g(t);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.initialize=x;var C=function(){function e(t){(0,o.default)(this,e),this.client=t,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(),t.isLogged&&this.handleLogin()}var t,n,r;return(0,i.default)(e,[{key:"refresh",value:(r=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.initializeFromRemote(this.client);case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"setupInitializing",value:function(){var e=this;this.initializing=new Promise((function(t){e.resolveInitializing=t}))}},{key:"handleLogin",value:(n=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.initialize(this.client);case 2:this.resolveInitializing(),this.client.emit("plugin:flag:login");case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"handleLogout",value:(t=(0,u.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h.reset(),this.setupInitializing(),this.client.emit("plugin:flag:logout");case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}();C.pluginName="flags",h.store=p,h.list=m,h.reset=y,h.enable=v,h.initializeFromRemote=g,h.initializeFromDOM=w,h.initialize=x,h.plugin=C;var k=h;t.default=k},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(19)),i=r(n(4)),a=r(n(6)),u=r(n(45)),c=r(n(562)),s=function(){function e(){(0,i.default)(this,e),this.store={},"undefined"!=typeof localStorage&&(this.longtermStore=c.default),this.restore()}return(0,a.default)(e,[{key:"restore",value:function(){if(this.longtermStore)for(var e=this.longtermStore.getAll(),t=0,n=Object.entries(e);t<n.length;t++){var r=(0,o.default)(n[t],2),i=r[0],a=r[1];this.store[i]=a,this.emit("change",i)}}},{key:"keys",value:function(){return Object.keys(this.store)}},{key:"get",value:function(e){return this.store.hasOwnProperty(e)||(this.store[e]=null),this.store[e]}},{key:"set",value:function(e,t){this.longtermStore&&this.longtermStore.setItem(e,t),this.store[e]=t,this.emit("change",e)}},{key:"remove",value:function(e){delete this.store[e],this.longtermStore&&this.longtermStore.removeItem(e),this.emit("change",e)}}]),e}();u.default.mixin(s);var l=s;t.default=l},function(e,t,n){"use strict";function r(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,u=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getKey=t.prefix=void 0;t.prefix="flag__";var i=function(e){return"flag__"+e};t.getKey=i;var a=function(){return Object.keys(localStorage).filter((function(e){return 0===e.indexOf("flag__")})).map((function(e){return e.replace("flag__","")}))},u=function(e){var t=localStorage.getItem(i(e));return t?JSON.parse(t):t},c=function(e){return localStorage.removeItem(i(e))},s={getAll:function(){var e,t={},n=r(a());try{for(n.s();!(e=n.n()).done;){var o=e.value;t[o]=u(o)}}catch(e){n.e(e)}finally{n.f()}return t},getItem:u,setItem:function(e,t){var n=JSON.stringify(t);return localStorage.setItem(i(e),n)},clearAll:function(){var e,t=r(a());try{for(t.s();!(e=t.n()).done;){var n=e.value;c(n)}}catch(e){t.e(e)}finally{t.f()}},removeItem:c};t.default=s},function(e,t,n){var r=n(104),o=n(288),i=n(248),a=n(564),u=n(34),c=n(117),s=n(289);e.exports=function e(t,n,l,f,d){t!==n&&i(n,(function(i,c){if(d||(d=new r),u(i))a(t,n,c,l,e,f,d);else{var p=f?f(s(t,c),i,c+"",t,n,d):void 0;void 0===p&&(p=i),o(t,c,p)}}),c)}},function(e,t,n){var r=n(288),o=n(259),i=n(260),a=n(124),u=n(261),c=n(86),s=n(26),l=n(123),f=n(87),d=n(152),p=n(34),h=n(179),m=n(114),y=n(289),v=n(565);e.exports=function(e,t,n,g,b,w,x){var C=y(e,n),k=y(t,n),S=x.get(k);if(S)r(e,n,S);else{var _=w?w(C,k,n+"",e,t,x):void 0,A=void 0===_;if(A){var O=s(k),E=!O&&f(k),B=!O&&!E&&m(k);_=k,O||E||B?s(C)?_=C:l(C)?_=a(C):E?(A=!1,_=o(k,!0)):B?(A=!1,_=i(k,!0)):_=[]:h(k)||c(k)?(_=C,c(C)?_=v(C):p(C)&&!d(C)||(_=u(k))):A=!1}A&&(x.set(k,_),b(_,k,g,w,x),x.delete(k)),r(e,n,_)}}},function(e,t,n){var r=n(71),o=n(117);e.exports=function(e){return r(e,o(e))}},function(e,t,n){var r=n(57),o=n(290);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))}},function(e,t,n){var r=n(231);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4)),i=r(n(6)),a=r(n(97)),u=r(n(8)),c=r(n(10)),s=r(n(5)),l=r(n(98)),f=n(21);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var p=function(e){(0,u.default)(n,e);var t=d(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"data",get:function(){var e=this;return(0,a.default)((0,s.default)(n.prototype),"data",this).filter((function(t){return t.slug===e.target.slug}))}}],[{key:"query",value:function(e,t){return(0,f.Q)("io.cozy.triggers").where({worker:"konnector"})}}]),n}(l.default);t.default=p},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.authFunction=t.authenticateWithCordova=void 0;var o=r(n(7)),i=r(n(9)),a=n(59),u=n(24),c=(n(22),"undefined"!=typeof window?window:null),s=function(e){return new Promise((function(t,n){c.SafariViewController.show({url:e,transition:"curl"},(function(e){"closed"===e.event&&n(new Error(a.REGISTRATION_ABORT))}),(function(e){console.log("KO: "+e),n(new Error(a.REGISTRATION_ABORT))}));var r=c.handleOpenURL;c.handleOpenURL=function(e){c.SafariViewController.hide(),t(e),r&&(c.handleOpenURL=r)}}))},l=function(e){return new Promise((function(t,n){var r=c.cordova.InAppBrowser.open(e,"_blank","clearcache=yes,zoom=no"),o=function(){r.removeEventListener("loadstart",i),r.removeEventListener("exit",u)},i=function(e){var n=e.url,i=/\?access_code=(.+)$/.test(n),a=/\?state=(.+)$/.test(n);(i||a)&&(t(n),o(),r.close())},u=function(){n(new Error(a.REGISTRATION_ABORT)),o(),r.close()};r.addEventListener("loadstart",i),r.addEventListener("exit",u)}))},f=function(){var e=(0,i.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=(0,u.isIOSApp)(),!e.t0){e.next=5;break}return e.next=4,(0,u.hasSafariPlugin)();case 4:e.t0=e.sent;case 5:if(!e.t0){e.next=9;break}return e.abrupt("return",s(t));case 9:if(!(0,u.hasInAppBrowserPlugin)()){e.next=13;break}return e.abrupt("return",l(t));case 13:return console.log(t),e.abrupt("return",new Promise((function(e){setTimeout((function(){var t=prompt("Paste the url here:");e(t)}),5e3)})));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.authenticateWithCordova=f;var d=f;t.authFunction=d},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(75)),i=r(n(282)),a=r(n(171)),u=r(n(182)),c=r(n(125)),s=r(n(571)),l=n(21),f=function(e){var t=(0,i.default)(e,(function(e){return(t=e).id||t.ids?"idQueries":"others";var t})),n=t.idQueries,r=void 0===n?[]:n,o=t.others,f=void 0===o?[]:o,d=r.length>0?new l.QueryDefinition({doctype:e[0].doctype,ids:(0,c.default)((0,a.default)(r.map((function(e){return e.id||e.ids}))))}):[];return(0,s.default)(f,u.default).concat(d)},d=function(e){var t=(0,i.default)(e,(function(e){return e.doctype}));return(0,a.default)(Object.values((0,o.default)(t,f)))};t.default=d},function(e,t,n){var r=n(172);e.exports=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?r(e,void 0,t):[]}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(4)),u=r(n(6)),c=r(n(2)),s=r(n(279)),l=r(n(75)),f=r(n(127)),d=r(n(573)),p=r(n(577)),h=n(126);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=(0,l.default)(e.relationships||{},(function(e,t){return y(y({},e),{},{name:t,type:(0,h.resolveClass)(e.doctype,e.type)})}));return y(y({},e),{},{relationships:(0,d.default)(t)>0?(0,s.default)(t,"name"):null})},g=function(e,t){if(!e)throw new Error(t)},b=function(e,t){var n=(0,p.default)(e,t,(function(e){return e.name}));g(0===n.length,"Duplicated names in schemas being added: ".concat(n.map((function(e){return e.name})).join(", ")));var r=(0,p.default)(e,t,(function(e){return e.doctype}));g(0===r.length,"Duplicated doctypes in schemas being added: ".concat(r.map((function(e){return e.name})).join(", ")))},w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,a.default)(this,e),this.byDoctype={},this.add(t),this.client=n}var t,n;return(0,u.default)(e,[{key:"add",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.default)(e,(function(e,t){return y({name:t},v(e))}));b(Object.values(t),Object.values(this.byDoctype)),(0,f.default)(this.byDoctype,(0,s.default)(t,(function(e){return e.doctype})))}},{key:"getDoctypeSchema",value:function(e){var t=this.byDoctype[e];return t||(t=v({name:e,doctype:e}),this.byDoctype[e]=t),t}},{key:"getRelationship",value:function(e,t){if(!e)throw new TypeError("Invalid doctype ".concat(e));var n=this.getDoctypeSchema(e);if(!n)throw new Error("Cannot find doctype ".concat(e," in schema"));if(!n.relationships)throw new Error("Schema for doctype ".concat(e," has no relationships"));return n.relationships[t]}},{key:"validate",value:(n=(0,i.default)(o.default.mark((function e(t){var n,r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={},r=this.byDoctype[t._type]){e.next=4;break}return e.abrupt("return",!0);case 4:if(r.attributes){e.next=6;break}return e.abrupt("return",!0);case 6:e.t0=o.default.keys(r.attributes);case 7:if((e.t1=e.t0()).done){e.next=15;break}return i=e.t1.value,e.next=11,this.validateAttribute(t,i,r.attributes[i]);case 11:!0!==(a=e.sent)&&(n[i]=a),e.next=7;break;case 15:if(0!==Object.keys(n).length){e.next=17;break}return e.abrupt("return",!0);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"validateAttribute",value:(t=(0,i.default)(o.default.mark((function e(t,n,r){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.unique||!this.client){e.next=6;break}return e.next=3,this.client.collection(t._type).checkUniquenessOf(n,t[n]);case 3:if(!0===e.sent){e.next=6;break}return e.abrupt("return","must be unique");case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})}]),e}();t.default=w},function(e,t,n){var r=n(159),o=n(66),i=n(47),a=n(189),u=n(574);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?u(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){var r=n(575),o=n(146),i=n(576);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){var r=n(161)("length");e.exports=r},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+o+")"+"?",s="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[i,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[i+r+"?",r,a,u,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+s,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},function(e,t,n){var r=n(43),o=n(284),i=n(53),a=n(57),u=n(285),c=n(263),s=a((function(e){var t=c(e),n=r(e,u);return t===c(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?o(n,i(t,2)):[]}));e.exports=s},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.CozyClient=void 0;var o=r(n(8)),i=r(n(10)),a=r(n(5)),u=r(n(4));function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,a.default)(e);if(t){var o=(0,a.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.default)(this,n)}}var s=function(e){(0,o.default)(n,e);var t=c(n);function n(){return(0,u.default)(this,n),t.apply(this,arguments)}return n}((function e(t){(0,u.default)(this,e),Object.assign(this,t)}));t.CozyClient=s},function(e,t,n){var r="undefined"!=typeof JSON?JSON:n(580);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var a,u="boolean"==typeof t.cycles&&t.cycles,c=t.replacer||function(e,t){return t},s=t.cmp&&(a=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},o={key:n,value:e[n]};return a(r,o)}}),l=[];return function e(t,a,f,d){var p=n?"\n"+new Array(d+1).join(n):"",h=n?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),void 0!==(f=c.call(t,a,f))){if("object"!=typeof f||null===f)return r.stringify(f);if(o(f)){for(var m=[],y=0;y<f.length;y++){var v=e(f,y,f[y],d+1)||r.stringify(null);m.push(p+n+v)}return"["+m.join(",")+p+"]"}if(-1!==l.indexOf(f)){if(u)return r.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}l.push(f);var g=i(f).sort(s&&s(f));for(m=[],y=0;y<g.length;y++){var b=e(f,a=g[y],f[a],d+1);if(b){var w=r.stringify(a)+h+b;m.push(p+n+w)}}return l.splice(l.indexOf(f),1),"{"+m.join(",")+p+"}"}}({"":e},"",e,0)};var o=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},i=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var r in e)t.call(e,r)&&n.push(r);return n}},function(e,t,n){t.parse=n(581),t.stringify=n(582)},function(e,t){var n,r,o,i,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(e){throw{name:"SyntaxError",message:e,at:n,text:o}},c=function(e){return e&&e!==r&&u("Expected '"+e+"' instead of '"+r+"'"),r=o.charAt(n),n+=1,r},s=function(){var e,t="";for("-"===r&&(t="-",c("-"));r>="0"&&r<="9";)t+=r,c();if("."===r)for(t+=".";c()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,c(),"-"!==r&&"+"!==r||(t+=r,c());r>="0"&&r<="9";)t+=r,c();if(e=+t,isFinite(e))return e;u("Bad number")},l=function(){var e,t,n,o="";if('"'===r)for(;c();){if('"'===r)return c(),o;if("\\"===r)if(c(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)n=16*n+e;o+=String.fromCharCode(n)}else{if("string"!=typeof a[r])break;o+=a[r]}else o+=r}u("Bad string")},f=function(){for(;r&&r<=" ";)c()};i=function(){switch(f(),r){case"{":return function(){var e,t={};if("{"===r){if(c("{"),f(),"}"===r)return c("}"),t;for(;r;){if(e=l(),f(),c(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=i(),f(),"}"===r)return c("}"),t;c(","),f()}}u("Bad object")}();case"[":return function(){var e=[];if("["===r){if(c("["),f(),"]"===r)return c("]"),e;for(;r;){if(e.push(i()),f(),"]"===r)return c("]"),e;c(","),f()}}u("Bad array")}();case'"':return l();case"-":return s();default:return r>="0"&&r<="9"?s():function(){switch(r){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}u("Unexpected '"+r+"'")}()}},e.exports=function(e,t){var a;return o=e,n=0,r=" ",a=i(),f(),r&&u("Syntax error"),"function"==typeof t?function e(n,r){var o,i,a=n[r];if(a&&"object"==typeof a)for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(void 0!==(i=e(a,o))?a[o]=i:delete a[o]);return t.call(n,r,a)}({"":a},""):a}},function(e,t){var n,r,o,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function u(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}e.exports=function(e,t,i){var a;if(n="",r="","number"==typeof i)for(a=0;a<i;a+=1)r+=" ";else"string"==typeof i&&(r=i);if(o=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return function e(t,i){var a,c,s,l,f,d=n,p=i[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof o&&(p=o.call(i,t,p)),typeof p){case"string":return u(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(n+=r,f=[],"[object Array]"===Object.prototype.toString.apply(p)){for(l=p.length,a=0;a<l;a+=1)f[a]=e(a,p)||"null";return s=0===f.length?"[]":n?"[\n"+n+f.join(",\n"+n)+"\n"+d+"]":"["+f.join(",")+"]",n=d,s}if(o&&"object"==typeof o)for(l=o.length,a=0;a<l;a+=1)"string"==typeof(c=o[a])&&(s=e(c,p))&&f.push(u(c)+(n?": ":":")+s);else for(c in p)Object.prototype.hasOwnProperty.call(p,c)&&(s=e(c,p))&&f.push(u(c)+(n?": ":":")+s);return s=0===f.length?"{}":n?"{\n"+n+f.join(",\n"+n)+"\n"+d+"}":"{"+f.join(",")+"}",n=d,s}}("",{"":e})}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(4)),u=r(n(6)),c=function(){function e(){(0,a.default)(this,e),this.pending={}}var t;return(0,u.default)(e,[{key:"exec",value:(t=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n(),(i=this.pending[r])?a=i:(a=t(),this.pending[r]=a),e.prev=3,e.next=6,a;case 6:return u=e.sent,e.abrupt("return",u);case 8:return e.prev=8,this.pending[r]=null,e.finish(8);case 11:case"end":return e.stop()}}),e,this,[[3,,8,11]])}))),function(e,n){return t.apply(this,arguments)})},{key:"get",value:function(e){var t=e(),n=this.pending[t];return n||null}}]),e}();t.default=c},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.certifyFlagship=void 0;var o=r(n(7)),i=r(n(9)),a=(r(n(41)),n(585)),u=function(){var e=(0,i.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.getStackClient(),e.next=4,n.fetchJSON("POST","/auth/clients/".concat(n.oauthOptions.clientID,"/challenge"),null,{headers:{Authorization:n.registrationAccessTokenToAuthHeader()}});case 4:return r=e.sent,e.abrupt("return",r.nonce);case 8:throw e.prev=8,e.t0=e.catch(0),new Error("[FLAGSHIP_CERTIFICATION] Something went wrong while requesting a challenge from CozyStack:\n"+e.t0.message);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=t.platform,a=t.attestation,u=t.keyId,c=r.getStackClient(),e.next=5,c.fetchJSON("POST","/auth/clients/".concat(c.oauthOptions.clientID,"/attestation"),{platform:i,attestation:a,challenge:n,keyId:u},{headers:{Authorization:c.registrationAccessTokenToAuthHeader()}});case 5:e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(0),new Error("[FLAGSHIP_CERTIFICATION] Something went wrong while giving attestation to CozyStack:\n"+e.t0.message);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n,r){return e.apply(this,arguments)}}(),s=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("[FLAGSHIP_CERTIFICATION] Certification configuration is not set");case 2:return e.next=4,u(n);case 4:return r=e.sent,e.next=7,(0,a.getAppAttestationFromStore)(r,t);case 7:return i=e.sent,e.next=10,c(i,r,n);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.certifyFlagship=s},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getAppAttestationFromStore=void 0;var o=r(n(7)),i=r(n(9)),a=function(){var e=(0,i.default)(o.default.mark((function e(t,n){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("validateApp can only be called from a React Native container");case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.getAppAttestationFromStore=a},function(e,t,n){var r=n(296)();e.exports=r},function(e,t,n){var r=n(225),o=r&&new r;e.exports=o},function(e,t){e.exports={}},function(e,t,n){var r=n(195),o=n(297),i=n(298),a=n(590);e.exports=function(e){var t=i(e),n=a[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var u=o(n);return!!u&&e===u[0]}},function(e,t,n){var r=n(195),o=n(193),i=n(194),a=n(26),u=n(40),c=n(591),s=Object.prototype.hasOwnProperty;function l(e){if(u(e)&&!a(e)&&!(e instanceof r)){if(e instanceof o)return e;if(s.call(e,"__wrapped__"))return c(e)}return new o(e)}l.prototype=i.prototype,l.prototype.constructor=l,e.exports=l},function(e,t,n){var r=n(195),o=n(193),i=n(124);e.exports=function(e){if(e instanceof r)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasQueryBeenLoaded=t.isQueryLoading=t.cancelable=void 0;t.cancelable=function(e){var t,n=new Promise((function(n,r){t=r,e.then(n),e.catch(r)}));return n.cancel=function(){t({canceled:!0})},n};t.isQueryLoading=function(e){return e?"loading"===e.fetchStatus||"pending"===e.fetchStatus:(console.warn("isQueryLoading called on falsy value."),!1)};t.hasQueryBeenLoaded=function(e){return e.lastFetch}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(2)),u=n(0),c=r(n(128)),s=n(21),l=n(60);r(n(41)),n(22);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(e,t,n,r){var o=function(e,t){return d({id:e._id,_type:t},e)}(n,t),i={data:o};e.dispatch((0,l.receiveMutationResult)(e.generateRandomId(),i,{},r(o)))},h=function(e){var t=e.doctype,n=(0,c.default)();return(0,u.useEffect)((function(){var e=n.plugins.realtime;if(!e)throw new Error("You must include the realtime plugin to use RealTimeQueries");var r=function(e){p(n,t,e,s.Mutations.createDocument)},a=function(e){p(n,t,e,s.Mutations.updateDocument)},u=function(e){p(n,t,d(d({},e),{},{_deleted:!0}),s.Mutations.deleteDocument)};return function(){var n=(0,i.default)(o.default.mark((function n(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.subscribe("created",t,r);case 2:return n.next=4,e.subscribe("updated",t,a);case 4:return n.next=6,e.subscribe("deleted",t,u);case 6:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}()(),function(){e.unsubscribe("created",t,r),e.unsubscribe("updated",t,a),e.unsubscribe("deleted",t,u)}}),[n,t]),null},m=(0,u.memo)(h);t.default=m},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeCategories=u,t.areTermsValid=c,t.isPartnershipValid=s,t.sanitize=function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);!e.categories&&e.category&&"string"==typeof e.category&&(t.categories=[e.category],delete t.category);t.categories=u(t.categories),"object"==typeof e.name&&(t.name=e.name.en);e.available_version&&(t.availableVersion=e.available_version,delete t.available_version);e.latest_version&&(t.latestVersion=e.latestVersion,delete t.latest_version);t.terms&&!c(t.terms)&&delete t.terms;t.partnership&&!s(t.partnership)&&delete t.partnership;return t};var o=r(n(2));n(22);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var a=["banking","cozy","energy","health","host_provider","insurance","isp","mes_infos","online_services","others","partners","press","productivity","ptnb","public_service","shopping","social","telecom","transport"];function u(e){if(!e)return["others"];var t=e.filter((function(e){return a.includes(e)}));return t.length?t:["others"]}function c(e){return Boolean(e&&e.id&&e.url&&e.version)}function s(e){return Boolean(e&&e.description)}},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(4)),a=o(n(6)),u=o(n(8)),c=o(n(10)),s=o(n(5)),l=o(n(2)),f=r(n(0)),d=o(n(1)),p=o(n(196));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var o=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var m=d.default.shape({subscribe:d.default.func.isRequired,dispatch:d.default.func.isRequired,getState:d.default.func.isRequired}),y=function(e){(0,u.default)(n,e);var t=h(n);function n(e,r){var o;if((0,i.default)(this,n),o=t.call(this,e,r),!e.client)throw new Error("CozyProvider was not passed a client instance.");return e.store&&e.client.setStore(e.store),o}return(0,a.default)(n,[{key:"getChildContext",value:function(){return{store:this.props.store||this.context.store||this.props.client.store,client:this.props.client}}},{key:"render",value:function(){return f.default.createElement(p.default.Provider,{value:this.getChildContext()},this.props.children)}}]),n}(f.Component);t.default=y,(0,l.default)(y,"propTypes",{store:m,client:d.default.object.isRequired,children:d.default.element.isRequired}),(0,l.default)(y,"childContextTypes",{store:d.default.object,client:d.default.object.isRequired}),(0,l.default)(y,"contextTypes",{store:d.default.object})},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(12)),a=o(n(4)),u=o(n(6)),c=o(n(11)),s=o(n(8)),l=o(n(10)),f=o(n(5)),d=o(n(2)),p=r(n(0)),h=o(n(1));function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.default)(e);if(t){var o=(0,f.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.displayName||n.name||"Component",o=function(o){(0,s.default)(f,o);var l=m(f);function f(n,o){var i;if((0,a.default)(this,f),i=l.call(this,n,o),(0,d.default)((0,c.default)(i),"mutate",(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return i.client.mutate(e.apply(null,r),t)})),i.client=n.client||o.client,!i.client)throw new Error('Could not find "client" in either the context or props of '.concat(r));return i}return(0,u.default)(f,[{key:"render",value:function(){var e=(0,d.default)({},t.name||"mutate",this.mutate);return p.default.createElement(n,(0,i.default)({},e,this.props))}}]),f}(p.Component);return(0,d.default)(o,"contextTypes",{client:h.default.object}),o.displayName="WithMutation(".concat(r,")"),o}};t.default=y},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(12)),a=o(n(4)),u=o(n(6)),c=o(n(8)),s=o(n(10)),l=o(n(5)),f=o(n(2)),d=o(n(31)),p=o(n(127)),h=r(n(0)),m=o(n(1));function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,f.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,s.default)(this,n)}}var b=function(e,t,n){return p.default.apply(void 0,(0,d.default)(e.map((function(e){return"function"==typeof e?e(t,n):e}))))},w=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n=e.displayName||e.name||"Component",r=function(r){(0,c.default)(s,r);var o=g(s);function s(e,r){var i;(0,a.default)(this,s),i=o.call(this,e,r);var u=e.client||r.client;if(console.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."),!u)throw new Error('Could not find "client" in either the context or props of '.concat(n));return i.mutations=v({createDocument:u.create.bind(u),saveDocument:u.save.bind(u),deleteDocument:u.destroy.bind(u)},b(t,u,e)),i}return(0,u.default)(s,[{key:"render",value:function(){return h.default.createElement(e,(0,i.default)({},this.mutations,this.props))}}]),s}(h.Component);return(0,f.default)(r,"contextTypes",{client:m.default.object}),r.displayName="WithMutations(".concat(n,")"),r}};t.default=w},function(e,t,n){"use strict";var r=n(20),o=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.queryConnectFlat=t.queryConnect=t.withClient=void 0;var i=o(n(2)),a=o(n(12)),u=r(n(0)),c=o(n(1)),s=o(n(599)),l=o(n(299)),f=o(n(128)),d=n(300);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.withClient=function(e){var t=function(t){var n=(0,f.default)();return u.default.createElement(e,(0,a.default)({},t,{client:n}))};return t.displayName="withClient(".concat(e.displayName||e.name,")"),t};t.queryConnect=function(e){return function(t){var n=Object.keys(e).map((function(n){return function(e,t,n){if(!t)throw new Error("withQuery has no options for ".concat(e," (wrapping ").concat(n.name,")"));return function(n){var r=function(r,o){if(!o.client)throw new Error("Should be used with client in context (use CozyProvider to set context)");var a="function"==typeof t?t(r):t;return t.doc?(console.warn("queryOpts.doc is deprecated"),u.default.createElement(n,h((0,i.default)({},e,a.doc),r))):u.default.createElement(l.default,a,(function(t){return u.default.createElement(n,h((0,i.default)({},e,t),r))}))};return r.contextTypes={client:c.default.object},r.displayName="withQuery(".concat(n.displayName||n.name,")"),r}}(n,e[n],t)}));return s.default.apply(null,n)(t)}};t.queryConnectFlat=function(e){return function(t){var n=function(n){var r=(0,d.useQueries)(e);return u.default.createElement(t,(0,a.default)({},n,r))};return n.displayName="queryConnectFlat(".concat(t.displayName||t.name,")"),n}}},function(e,t,n){var r=n(296)(!0);e.exports=r},function(e,t,n){"use strict";var r=n(20);Object.defineProperty(t,"__esModule",{value:!0}),t.timeseries=t.document=t.contact=t.utils=t.permission=t.note=t.account=t.folder=t.file=t.applications=t.instance=t.trigger=t.accounts=t.triggers=void 0;var o=r(n(601));t.trigger=o;var i=r(n(602));t.instance=i;var a=r(n(302));t.applications=a;var u=r(n(303));t.file=u;var c=r(n(607));t.folder=c;var s=r(n(301));t.account=s;var l=r(n(609));t.note=l;var f=r(n(610));t.permission=f;var d=r(n(611));t.utils=d;var p=r(n(612));t.contact=p;var h=r(n(614));t.document=h;var m=r(n(664));t.timeseries=m;var y=o;t.triggers=y;var v=s;t.accounts=v},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.triggers=t.triggerStates=void 0;var o=r(n(18)),i=n(301),a=["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"],u={getLastExecution:function(e){return(0,o.default)(e,"current_state.last_execution")},getLastsuccess:function(e){return console.warn("Deprecated, please use getLastSuccess instead of getLastsuccess"),(0,o.default)(e,"current_state.last_success")},getLastSuccess:function(e){return(0,o.default)(e,"current_state.last_success")},isErrored:function(e){return"errored"===(0,o.default)(e,"current_state.status")},getLastErrorType:function(e){return(0,o.default)(e,"current_state.last_error")}};t.triggerStates=u;var c={isKonnectorWorker:function(e){return"konnector"===e.worker},getKonnector:function(e){return c.isKonnectorWorker(e)?e.message&&e.message.konnector?e.message.konnector:e.message&&e.message.Data?JSON.parse(atob(e.message.Data)).konnector:void 0:null},getAccountId:function(e){var t=(0,o.default)(e,"message.Data");return t?JSON.parse(atob(t)).account:(0,o.default)(e,"message.account")},isLatestErrorMuted:function(e,t){var n=u.getLastErrorType(e),r=u.getLastSuccess(e),o=r?new Date(r):new Date;return(0,i.getMutedErrors)(t).some((function(e){return e.type===n&&(!r||new Date(e.mutedAt)>o)}))},hasActionableError:function(e){return a.includes(e.current_state.last_error)}};t.triggers=c},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.buildPremiumLink=t.hasAnOffer=t.shouldDisplayOffers=t.getUuid=t.isFreemiumUser=t.arePremiumLinksEnabled=t.isSelfHosted=void 0;var o=r(n(18)),i=function(e){return!(0,o.default)(e,"context.data.attributes.manager_url")};t.isSelfHosted=i;var a=function(e){return!!(0,o.default)(e,"context.data.attributes.enable_premium_links")};t.arePremiumLinksEnabled=a;var u=function(e){var t=(0,o.default)(e,"diskUsage.data.attributes.quota",!1);return parseInt(t)<=5e10};t.isFreemiumUser=u;var c=function(e){return(0,o.default)(e,"instance.data.attributes.uuid")};t.getUuid=c;t.shouldDisplayOffers=function(e){return!i(e)&&a(e)&&c(e)&&u(e)};t.hasAnOffer=function(e){return!i(e)&&a(e)&&c(e)&&!u(e)};t.buildPremiumLink=function(e){var t=(0,o.default)(e,"context.data.attributes.manager_url",!1),n=c(e);return t&&n?"".concat(t,"/cozy/instances/").concat(n,"/premium"):null}},function(e,t,n){var r=n(145),o=n(208),i=n(604),a=n(210),u=n(63),c=/\s+$/;e.exports=function(e,t,n){if((e=u(e))&&(n||void 0===t))return e.replace(c,"");if(!e||!(t=r(t)))return e;var s=a(e),l=i(s,a(t))+1;return o(s,0,l).join("")}},function(e,t,n){var r=n(249);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},function(e,t,n){(function(e,r){var o;
|
|
49
|
+
/**
|
|
50
|
+
* @license
|
|
51
|
+
* Lodash <https://lodash.com/>
|
|
52
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
53
|
+
* Released under MIT license <https://lodash.com/license>
|
|
54
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
55
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
56
|
+
*/(function(){var i="Expected a function",a="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",s="[object Array]",l="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",m="[object Map]",y="[object Number]",v="[object Object]",g="[object RegExp]",b="[object Set]",w="[object String]",x="[object Symbol]",C="[object WeakMap]",k="[object ArrayBuffer]",S="[object DataView]",_="[object Float32Array]",A="[object Float64Array]",O="[object Int8Array]",E="[object Int16Array]",B="[object Int32Array]",j="[object Uint8Array]",P="[object Uint16Array]",T="[object Uint32Array]",z=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,M=RegExp(R.source),N=RegExp(F.source),L=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,W=RegExp(H.source),Q=/^\s+|\s+$/g,V=/^\s+/,Y=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",he="[\\ud800-\\udfff]",me="["+pe+"]",ye="["+de+"]",ve="\\d+",ge="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+pe+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xe="\\ud83c[\\udffb-\\udfff]",Ce="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",_e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ae="(?:"+be+"|"+we+")",Oe="(?:"+_e+"|"+we+")",Ee="(?:"+ye+"|"+xe+")"+"?",Be="[\\ufe0e\\ufe0f]?"+Ee+("(?:\\u200d(?:"+[Ce,ke,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Ee+")*"),je="(?:"+[ge,ke,Se].join("|")+")"+Be,Pe="(?:"+[Ce+ye+"?",ye,ke,Se,he].join("|")+")",Te=RegExp("['’]","g"),ze=RegExp(ye,"g"),Ie=RegExp(xe+"(?="+xe+")|"+Pe+Be,"g"),De=RegExp([_e+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[me,_e,"$"].join("|")+")",Oe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[me,_e+Ae,"$"].join("|")+")",_e+"?"+Ae+"+(?:['’](?:d|ll|m|re|s|t|ve))?",_e+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,je].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Fe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Me=["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"],Ne=-1,Le={};Le[_]=Le[A]=Le[O]=Le[E]=Le[B]=Le[j]=Le["[object Uint8ClampedArray]"]=Le[P]=Le[T]=!0,Le[c]=Le[s]=Le[k]=Le[l]=Le[S]=Le[f]=Le[d]=Le[p]=Le[m]=Le[y]=Le[v]=Le[g]=Le[b]=Le[w]=Le[C]=!1;var Ue={};Ue[c]=Ue[s]=Ue[k]=Ue[S]=Ue[l]=Ue[f]=Ue[_]=Ue[A]=Ue[O]=Ue[E]=Ue[B]=Ue[m]=Ue[y]=Ue[v]=Ue[g]=Ue[b]=Ue[w]=Ue[x]=Ue[j]=Ue["[object Uint8ClampedArray]"]=Ue[P]=Ue[T]=!0,Ue[d]=Ue[p]=Ue[C]=!1;var $e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ge=parseFloat,qe=parseInt,Je="object"==typeof e&&e&&e.Object===Object&&e,He="object"==typeof self&&self&&self.Object===Object&&self,We=Je||He||Function("return this")(),Qe=t&&!t.nodeType&&t,Ve=Qe&&"object"==typeof r&&r&&!r.nodeType&&r,Ye=Ve&&Ve.exports===Qe,Ke=Ye&&Je.process,Ze=function(){try{var e=Ve&&Ve.require&&Ve.require("util").types;return e||Ke&&Ke.binding&&Ke.binding("util")}catch(e){}}(),Xe=Ze&&Ze.isArrayBuffer,et=Ze&&Ze.isDate,tt=Ze&&Ze.isMap,nt=Ze&&Ze.isRegExp,rt=Ze&&Ze.isSet,ot=Ze&&Ze.isTypedArray;function it(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function st(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function lt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function ft(e,t){return!!(null==e?0:e.length)&&xt(e,t,0)>-1}function dt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function ht(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function mt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function yt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var gt=_t("length");function bt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function wt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function xt(e,t,n){return t==t?function(e,t,n){var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):wt(e,kt,n)}function Ct(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function kt(e){return e!=e}function St(e,t){var n=null==e?0:e.length;return n?Et(e,t)/n:NaN}function _t(e){return function(t){return null==t?void 0:t[e]}}function At(e){return function(t){return null==e?void 0:e[t]}}function Ot(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Et(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}function Bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function jt(e){return function(t){return e(t)}}function Pt(e,t){return pt(t,(function(t){return e[t]}))}function Tt(e,t){return e.has(t)}function zt(e,t){for(var n=-1,r=e.length;++n<r&&xt(t,e[n],0)>-1;);return n}function It(e,t){for(var n=e.length;n--&&xt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Rt=At({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ft=At({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(e){return"\\"+$e[e]}function Nt(e){return Re.test(e)}function Lt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ut(e,t){return function(n){return e(t(n))}}function $t(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var u=e[n];u!==t&&u!==a||(e[n]=a,i[o++]=n)}return i}function Gt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Jt(e){return Nt(e)?function(e){var t=Ie.lastIndex=0;for(;Ie.test(e);)++t;return t}(e):gt(e)}function Ht(e){return Nt(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.split("")}(e)}var Wt=At({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Qt=function e(t){var n,r=(t=null==t?We:Qt.defaults(We.Object(),t,Qt.pick(We,Me))).Array,o=t.Date,de=t.Error,pe=t.Function,he=t.Math,me=t.Object,ye=t.RegExp,ve=t.String,ge=t.TypeError,be=r.prototype,we=pe.prototype,xe=me.prototype,Ce=t["__core-js_shared__"],ke=we.toString,Se=xe.hasOwnProperty,_e=0,Ae=(n=/[^.]+$/.exec(Ce&&Ce.keys&&Ce.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Oe=xe.toString,Ee=ke.call(me),Be=We._,je=ye("^"+ke.call(Se).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=Ye?t.Buffer:void 0,Ie=t.Symbol,Re=t.Uint8Array,$e=Pe?Pe.allocUnsafe:void 0,Je=Ut(me.getPrototypeOf,me),He=me.create,Qe=xe.propertyIsEnumerable,Ve=be.splice,Ke=Ie?Ie.isConcatSpreadable:void 0,Ze=Ie?Ie.iterator:void 0,gt=Ie?Ie.toStringTag:void 0,At=function(){try{var e=ei(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),Vt=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Yt=o&&o.now!==We.Date.now&&o.now,Kt=t.setTimeout!==We.setTimeout&&t.setTimeout,Zt=he.ceil,Xt=he.floor,en=me.getOwnPropertySymbols,tn=Pe?Pe.isBuffer:void 0,nn=t.isFinite,rn=be.join,on=Ut(me.keys,me),an=he.max,un=he.min,cn=o.now,sn=t.parseInt,ln=he.random,fn=be.reverse,dn=ei(t,"DataView"),pn=ei(t,"Map"),hn=ei(t,"Promise"),mn=ei(t,"Set"),yn=ei(t,"WeakMap"),vn=ei(me,"create"),gn=yn&&new yn,bn={},wn=Oi(dn),xn=Oi(pn),Cn=Oi(hn),kn=Oi(mn),Sn=Oi(yn),_n=Ie?Ie.prototype:void 0,An=_n?_n.valueOf:void 0,On=_n?_n.toString:void 0;function En(e){if(qa(e)&&!za(e)&&!(e instanceof Tn)){if(e instanceof Pn)return e;if(Se.call(e,"__wrapped__"))return Ei(e)}return new Pn(e)}var Bn=function(){function e(){}return function(t){if(!Ga(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function jn(){}function Pn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function In(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Dn;++t<n;)this.add(e[t])}function Fn(e){var t=this.__data__=new In(e);this.size=t.size}function Mn(e,t){var n=za(e),r=!n&&Ta(e),o=!n&&!r&&Fa(e),i=!n&&!r&&!o&&Za(e),a=n||r||o||i,u=a?Bt(e.length,ve):[],c=u.length;for(var s in e)!t&&!Se.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ui(s,c))||u.push(s);return u}function Nn(e){var t=e.length;return t?e[Rr(0,t-1)]:void 0}function Ln(e,t){return Si(go(e),Vn(t,0,e.length))}function Un(e){return Si(go(e))}function $n(e,t,n){(void 0!==n&&!Ba(e[t],n)||void 0===n&&!(t in e))&&Wn(e,t,n)}function Gn(e,t,n){var r=e[t];Se.call(e,t)&&Ba(r,n)&&(void 0!==n||t in e)||Wn(e,t,n)}function qn(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function Jn(e,t,n,r){return er(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Hn(e,t){return e&&bo(t,wu(t),e)}function Wn(e,t,n){"__proto__"==t&&At?At(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:mu(e,t[n]);return i}function Vn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,r,o,i){var a,u=1&t,s=2&t,d=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!Ga(e))return e;var C=za(e);if(C){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Se.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return go(e,a)}else{var z=ri(e),I=z==p||z==h;if(Fa(e))return fo(e,u);if(z==v||z==c||I&&!o){if(a=s||I?{}:ii(e),!u)return s?function(e,t){return bo(e,ni(e),t)}(e,function(e,t){return e&&bo(t,xu(t),e)}(a,e)):function(e,t){return bo(e,ti(e),t)}(e,Hn(a,e))}else{if(!Ue[z])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case k:return po(e);case l:case f:return new r(+e);case S:return function(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case _:case A:case O:case E:case B:case j:case"[object Uint8ClampedArray]":case P:case T:return ho(e,n);case m:return new r;case y:case w:return new r(e);case g:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case x:return o=e,An?me(An.call(o)):{}}var o}(e,z,u)}}i||(i=new Fn);var D=i.get(e);if(D)return D;i.set(e,a),Va(e)?e.forEach((function(r){a.add(Yn(r,t,n,r,e,i))})):Ja(e)&&e.forEach((function(r,o){a.set(o,Yn(r,t,n,o,e,i))}));var R=C?void 0:(d?s?Wo:Ho:s?xu:wu)(e);return ut(R||e,(function(r,o){R&&(r=e[o=r]),Gn(a,o,Yn(r,t,n,o,e,i))})),a}function Kn(e,t,n){var r=n.length;if(null==e)return!r;for(e=me(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new ge(i);return wi((function(){e.apply(void 0,n)}),t)}function Xn(e,t,n,r){var o=-1,i=ft,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=pt(t,jt(n))),r?(i=dt,a=!1):t.length>=200&&(i=Tt,a=!1,t=new Rn(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var d=s;d--;)if(t[d]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}En.templateSettings={escape:L,evaluate:U,interpolate:$,variable:"",imports:{_:En}},En.prototype=jn.prototype,En.prototype.constructor=En,Pn.prototype=Bn(jn.prototype),Pn.prototype.constructor=Pn,Tn.prototype=Bn(jn.prototype),Tn.prototype.constructor=Tn,zn.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Se.call(t,e)?t[e]:void 0},zn.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:Se.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},In.prototype.clear=function(){this.__data__=[],this.size=0},In.prototype.delete=function(e){var t=this.__data__,n=qn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ve.call(t,n,1),--this.size,!0)},In.prototype.get=function(e){var t=this.__data__,n=qn(t,e);return n<0?void 0:t[n][1]},In.prototype.has=function(e){return qn(this.__data__,e)>-1},In.prototype.set=function(e,t){var n=this.__data__,r=qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Dn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(pn||In),string:new zn}},Dn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Dn.prototype.get=function(e){return Zo(this,e).get(e)},Dn.prototype.has=function(e){return Zo(this,e).has(e)},Dn.prototype.set=function(e,t){var n=Zo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Rn.prototype.add=Rn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.clear=function(){this.__data__=new In,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof In){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dn(r)}return n.set(e,t),this.size=n.size,this};var er=Co(cr),tr=Co(sr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function rr(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===u?a==a&&!Ka(a):n(a,u)))var u=a,c=i}return c}function or(e,t){var n=[];return er(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function ir(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=ai),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?ir(u,t-1,n,r,o):ht(o,u):r||(o[o.length]=u)}return o}var ar=ko(),ur=ko(!0);function cr(e,t){return e&&ar(e,t,wu)}function sr(e,t){return e&&ur(e,t,wu)}function lr(e,t){return lt(t,(function(t){return La(e[t])}))}function fr(e,t){for(var n=0,r=(t=uo(t,e)).length;null!=e&&n<r;)e=e[Ai(t[n++])];return n&&n==r?e:void 0}function dr(e,t,n){var r=t(e);return za(e)?r:ht(r,n(e))}function pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":gt&> in me(e)?function(e){var t=Se.call(e,gt),n=e[gt];try{e[gt]=void 0;var r=!0}catch(e){}var o=Oe.call(e);r&&(t?e[gt]=n:delete e[gt]);return o}(e):function(e){return Oe.call(e)}(e)}function hr(e,t){return e>t}function mr(e,t){return null!=e&&Se.call(e,t)}function yr(e,t){return null!=e&&t in me(e)}function vr(e,t,n){for(var o=n?dt:ft,i=e[0].length,a=e.length,u=a,c=r(a),s=1/0,l=[];u--;){var f=e[u];u&&t&&(f=pt(f,jt(t))),s=un(f.length,s),c[u]=!n&&(t||i>=120&&f.length>=120)?new Rn(u&&f):void 0}f=e[0];var d=-1,p=c[0];e:for(;++d<i&&l.length<s;){var h=f[d],m=t?t(h):h;if(h=n||0!==h?h:0,!(p?Tt(p,m):o(l,m,n))){for(u=a;--u;){var y=c[u];if(!(y?Tt(y,m):o(e[u],m,n)))continue e}p&&p.push(m),l.push(h)}}return l}function gr(e,t,n){var r=null==(e=yi(e,t=uo(t,e)))?e:e[Ai(Ni(t))];return null==r?void 0:it(r,e,n)}function br(e){return qa(e)&&pr(e)==c}function wr(e,t,n,r,o){return e===t||(null==e||null==t||!qa(e)&&!qa(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=za(e),u=za(t),p=a?s:ri(e),h=u?s:ri(t),C=(p=p==c?v:p)==v,_=(h=h==c?v:h)==v,A=p==h;if(A&&Fa(e)){if(!Fa(t))return!1;a=!0,C=!1}if(A&&!C)return i||(i=new Fn),a||Za(e)?qo(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!i(new Re(e),new Re(t)));case l:case f:case y:return Ba(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case w:return e==t+"";case m:var u=Lt;case b:var c=1&r;if(u||(u=Gt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var p=qo(u(e),u(t),r,o,i,a);return a.delete(e),p;case x:if(An)return An.call(e)==An.call(t)}return!1}(e,t,p,n,r,o,i);if(!(1&n)){var O=C&&Se.call(e,"__wrapped__"),E=_&&Se.call(t,"__wrapped__");if(O||E){var B=O?e.value():e,j=E?t.value():t;return i||(i=new Fn),o(B,j,n,r,i)}}if(!A)return!1;return i||(i=new Fn),function(e,t,n,r,o,i){var a=1&n,u=Ho(e),c=u.length,s=Ho(t).length;if(c!=s&&!a)return!1;var l=c;for(;l--;){var f=u[l];if(!(a?f in t:Se.call(t,f)))return!1}var d=i.get(e),p=i.get(t);if(d&&p)return d==t&&p==e;var h=!0;i.set(e,t),i.set(t,e);var m=a;for(;++l<c;){f=u[l];var y=e[f],v=t[f];if(r)var g=a?r(v,y,f,t,e,i):r(y,v,f,e,t,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){h=!1;break}m||(m="constructor"==f)}if(h&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i)}(e,t,n,r,wr,o))}function xr(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=me(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var c=(u=n[o])[0],s=e[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in e))return!1}else{var f=new Fn;if(r)var d=r(s,l,c,e,t,f);if(!(void 0===d?wr(l,s,3,r,f):d))return!1}}return!0}function Cr(e){return!(!Ga(e)||(t=e,Ae&&Ae in t))&&(La(e)?je:ae).test(Oi(e));var t}function kr(e){return"function"==typeof e?e:null==e?Hu:"object"==typeof e?za(e)?Br(e[0],e[1]):Er(e):tc(e)}function Sr(e){if(!di(e))return on(e);var t=[];for(var n in me(e))Se.call(e,n)&&"constructor"!=n&&t.push(n);return t}function _r(e){if(!Ga(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=di(e),n=[];for(var r in e)("constructor"!=r||!t&&Se.call(e,r))&&n.push(r);return n}function Ar(e,t){return e<t}function Or(e,t){var n=-1,o=Da(e)?r(e.length):[];return er(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Er(e){var t=Xo(e);return 1==t.length&&t[0][2]?hi(t[0][0],t[0][1]):function(n){return n===e||xr(n,e,t)}}function Br(e,t){return si(e)&&pi(t)?hi(Ai(e),t):function(n){var r=mu(n,e);return void 0===r&&r===t?yu(n,e):wr(t,r,3)}}function jr(e,t,n,r,o){e!==t&&ar(t,(function(i,a){if(o||(o=new Fn),Ga(i))!function(e,t,n,r,o,i,a){var u=gi(e,n),c=gi(t,n),s=a.get(c);if(s)return void $n(e,n,s);var l=i?i(u,c,n+"",e,t,a):void 0,f=void 0===l;if(f){var d=za(c),p=!d&&Fa(c),h=!d&&!p&&Za(c);l=c,d||p||h?za(u)?l=u:Ra(u)?l=go(u):p?(f=!1,l=fo(c,!0)):h?(f=!1,l=ho(c,!0)):l=[]:Wa(c)||Ta(c)?(l=u,Ta(u)?l=au(u):Ga(u)&&!La(u)||(l=ii(c))):f=!1}f&&(a.set(c,l),o(l,c,r,i,a),a.delete(c));$n(e,n,l)}(e,t,a,n,jr,r,o);else{var u=r?r(gi(e,a),i,a+"",e,t,o):void 0;void 0===u&&(u=i),$n(e,a,u)}}),xu)}function Pr(e,t){var n=e.length;if(n)return ui(t+=t<0?n:0,n)?e[t]:void 0}function Tr(e,t,n){t=t.length?pt(t,(function(e){return za(e)?function(t){return fr(t,1===e.length?e[0]:e)}:e})):[Hu];var r=-1;return t=pt(t,jt(Ko())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Or(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;for(;++r<a;){var c=mo(o[r],i[r]);if(c){if(r>=u)return c;var s=n[r];return c*("desc"==s?-1:1)}}return e.index-t.index}(e,t,n)}))}function zr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=fr(e,a);n(u,a)&&Ur(i,uo(a,e),u)}return i}function Ir(e,t,n,r){var o=r?Ct:xt,i=-1,a=t.length,u=e;for(e===t&&(t=go(t)),n&&(u=pt(e,jt(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ve.call(u,c,1),Ve.call(e,c,1);return e}function Dr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;ui(o)?Ve.call(e,o,1):Xr(e,o)}}return e}function Rr(e,t){return e+Xt(ln()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Xt(t/2))&&(e+=e)}while(t);return n}function Mr(e,t){return xi(mi(e,t,Hu),e+"")}function Nr(e){return Nn(Bu(e))}function Lr(e,t){var n=Bu(e);return Si(n,Vn(t,0,n.length))}function Ur(e,t,n,r){if(!Ga(e))return e;for(var o=-1,i=(t=uo(t,e)).length,a=i-1,u=e;null!=u&&++o<i;){var c=Ai(t[o]),s=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var l=u[c];void 0===(s=r?r(l,c,u):void 0)&&(s=Ga(l)?l:ui(t[o+1])?[]:{})}Gn(u,c,s),u=u[c]}return e}var $r=gn?function(e,t){return gn.set(e,t),e}:Hu,Gr=At?function(e,t){return At(e,"toString",{configurable:!0,enumerable:!1,value:Gu(t),writable:!0})}:Hu;function qr(e){return Si(Bu(e))}function Jr(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function Hr(e,t){var n;return er(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function Wr(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!Ka(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return Qr(e,t,Hu,n)}function Qr(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=n(t))!=t,u=null===t,c=Ka(t),s=void 0===t;o<i;){var l=Xt((o+i)/2),f=n(e[l]),d=void 0!==f,p=null===f,h=f==f,m=Ka(f);if(a)var y=r||h;else y=s?h&&(r||d):u?h&&d&&(r||!p):c?h&&d&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);y?o=l+1:i=l}return un(i,4294967294)}function Vr(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!Ba(u,c)){var c=u;i[o++]=0===a?0:a}}return i}function Yr(e){return"number"==typeof e?e:Ka(e)?NaN:+e}function Kr(e){if("string"==typeof e)return e;if(za(e))return pt(e,Kr)+"";if(Ka(e))return On?On.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zr(e,t,n){var r=-1,o=ft,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=dt;else if(i>=200){var s=t?null:Mo(e);if(s)return Gt(s);a=!1,o=Tt,c=new Rn}else c=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),u.push(l)}else o(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u}function Xr(e,t){return null==(e=yi(e,t=uo(t,e)))||delete e[Ai(Ni(t))]}function eo(e,t,n,r){return Ur(e,t,n(fr(e,t)),r)}function to(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?Jr(e,r?0:i,r?i+1:o):Jr(e,r?i+1:0,r?o:i)}function no(e,t){var n=e;return n instanceof Tn&&(n=n.value()),mt(t,(function(e,t){return t.func.apply(t.thisArg,ht([e],t.args))}),n)}function ro(e,t,n){var o=e.length;if(o<2)return o?Zr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],c=-1;++c<o;)c!=i&&(a[i]=Xn(a[i]||u,e[c],t,n));return Zr(ir(a,1),t,n)}function oo(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var u=r<i?t[r]:void 0;n(a,e[r],u)}return a}function io(e){return Ra(e)?e:[]}function ao(e){return"function"==typeof e?e:Hu}function uo(e,t){return za(e)?e:si(e,t)?[e]:_i(uu(e))}var co=Mr;function so(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Jr(e,t,n)}var lo=Vt||function(e){return We.clearTimeout(e)};function fo(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function po(e){var t=new e.constructor(e.byteLength);return new Re(t).set(new Re(e)),t}function ho(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mo(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Ka(e),a=void 0!==t,u=null===t,c=t==t,s=Ka(t);if(!u&&!s&&!i&&e>t||i&&a&&c&&!u&&!s||r&&a&&c||!n&&c||!o)return 1;if(!r&&!i&&!s&&e<t||s&&n&&o&&!r&&!i||u&&n&&o||!a&&o||!c)return-1}return 0}function yo(e,t,n,o){for(var i=-1,a=e.length,u=n.length,c=-1,s=t.length,l=an(a-u,0),f=r(s+l),d=!o;++c<s;)f[c]=t[c];for(;++i<u;)(d||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}function vo(e,t,n,o){for(var i=-1,a=e.length,u=-1,c=n.length,s=-1,l=t.length,f=an(a-c,0),d=r(f+l),p=!o;++i<f;)d[i]=e[i];for(var h=i;++s<l;)d[h+s]=t[s];for(;++u<c;)(p||i<a)&&(d[h+n[u]]=e[i++]);return d}function go(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function bo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],c=r?r(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),o?Wn(n,u,c):Gn(n,u,c)}return n}function wo(e,t){return function(n,r){var o=za(n)?at:Jn,i=t?t():{};return o(n,e,Ko(r,2),i)}}function xo(e){return Mr((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&ci(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=me(t);++r<o;){var u=n[r];u&&e(t,u,r,i)}return t}))}function Co(e,t){return function(n,r){if(null==n)return n;if(!Da(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=me(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function ko(e){return function(t,n,r){for(var o=-1,i=me(t),a=r(t),u=a.length;u--;){var c=a[e?u:++o];if(!1===n(i[c],c,i))break}return t}}function So(e){return function(t){var n=Nt(t=uu(t))?Ht(t):void 0,r=n?n[0]:t.charAt(0),o=n?so(n,1).join(""):t.slice(1);return r[e]()+o}}function _o(e){return function(t){return mt(Lu(Tu(t).replace(Te,"")),e,"")}}function Ao(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return Ga(r)?r:n}}function Oo(e){return function(t,n,r){var o=me(t);if(!Da(t)){var i=Ko(n,3);t=wu(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}}function Eo(e){return Jo((function(t){var n=t.length,r=n,o=Pn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ge(i);if(o&&!u&&"wrapper"==Vo(a))var u=new Pn([],!0)}for(r=u?r:n;++r<n;){var c=Vo(a=t[r]),s="wrapper"==c?Qo(a):void 0;u=s&&li(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Vo(s[0])].apply(u,s[3]):1==a.length&&li(a)?u[c]():u.thru(a)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&za(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Bo(e,t,n,o,i,a,u,c,s,l){var f=128&t,d=1&t,p=2&t,h=24&t,m=512&t,y=p?void 0:Ao(e);return function v(){for(var g=arguments.length,b=r(g),w=g;w--;)b[w]=arguments[w];if(h)var x=Yo(v),C=Dt(b,x);if(o&&(b=yo(b,o,i,h)),a&&(b=vo(b,a,u,h)),g-=C,h&&g<l){var k=$t(b,x);return Ro(e,t,Bo,v.placeholder,n,b,k,c,s,l-g)}var S=d?n:this,_=p?S[e]:e;return g=b.length,c?b=vi(b,c):m&&g>1&&b.reverse(),f&&s<g&&(b.length=s),this&&this!==We&&this instanceof v&&(_=y||Ao(_)),_.apply(S,b)}}function jo(e,t){return function(n,r){return function(e,t,n,r){return cr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Po(e,t){return function(n,r){var o;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(o=n),void 0!==r){if(void 0===o)return r;"string"==typeof n||"string"==typeof r?(n=Kr(n),r=Kr(r)):(n=Yr(n),r=Yr(r)),o=e(n,r)}return o}}function To(e){return Jo((function(t){return t=pt(t,jt(Ko())),Mr((function(n){var r=this;return e(t,(function(e){return it(e,r,n)}))}))}))}function zo(e,t){var n=(t=void 0===t?" ":Kr(t)).length;if(n<2)return n?Fr(t,e):t;var r=Fr(t,Zt(e/Jt(t)));return Nt(t)?so(Ht(r),0,e).join(""):r.slice(0,e)}function Io(e){return function(t,n,o){return o&&"number"!=typeof o&&ci(t,n,o)&&(n=o=void 0),t=nu(t),void 0===n?(n=t,t=0):n=nu(n),function(e,t,n,o){for(var i=-1,a=an(Zt((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,o=void 0===o?t<n?1:-1:nu(o),e)}}function Do(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=iu(t),n=iu(n)),e(t,n)}}function Ro(e,t,n,r,o,i,a,u,c,s){var l=8&t;t|=l?32:64,4&(t&=~(l?64:32))||(t&=-4);var f=[e,t,o,l?i:void 0,l?a:void 0,l?void 0:i,l?void 0:a,u,c,s],d=n.apply(void 0,f);return li(e)&&bi(d,f),d.placeholder=r,Ci(d,e,t)}function Fo(e){var t=he[e];return function(e,n){if(e=iu(e),(n=null==n?0:un(ru(n),292))&&nn(e)){var r=(uu(e)+"e").split("e");return+((r=(uu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Mo=mn&&1/Gt(new mn([,-0]))[1]==1/0?function(e){return new mn(e)}:Ku;function No(e){return function(t){var n=ri(t);return n==m?Lt(t):n==b?qt(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Lo(e,t,n,o,u,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new ge(i);var d=o?o.length:0;if(d||(t&=-97,o=u=void 0),s=void 0===s?s:an(ru(s),0),l=void 0===l?l:ru(l),d-=u?u.length:0,64&t){var p=o,h=u;o=u=void 0}var m=f?void 0:Qo(e),y=[e,t,n,o,u,p,h,c,s,l];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,u=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!u)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var s=e[3];e[3]=s?yo(s,c,t[4]):c,e[4]=s?$t(e[3],a):t[4]}(c=t[5])&&(s=e[5],e[5]=s?vo(s,c,t[6]):c,e[6]=s?$t(e[5],a):t[6]);(c=t[7])&&(e[7]=c);128&r&&(e[8]=null==e[8]?t[8]:un(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(y,m),e=y[0],t=y[1],n=y[2],o=y[3],u=y[4],!(l=y[9]=void 0===y[9]?f?0:e.length:an(y[9]-d,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var o=Ao(e);return function i(){for(var a=arguments.length,u=r(a),c=a,s=Yo(i);c--;)u[c]=arguments[c];var l=a<3&&u[0]!==s&&u[a-1]!==s?[]:$t(u,s);if((a-=l.length)<n)return Ro(e,t,Bo,i.placeholder,void 0,u,l,void 0,void 0,n-a);var f=this&&this!==We&&this instanceof i?o:e;return it(f,this,u)}}(e,t,l):32!=t&&33!=t||u.length?Bo.apply(void 0,y):function(e,t,n,o){var i=1&t,a=Ao(e);return function t(){for(var u=-1,c=arguments.length,s=-1,l=o.length,f=r(l+c),d=this&&this!==We&&this instanceof t?a:e;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++u];return it(d,i?n:this,f)}}(e,t,n,o);else var v=function(e,t,n){var r=1&t,o=Ao(e);return function t(){var i=this&&this!==We&&this instanceof t?o:e;return i.apply(r?n:this,arguments)}}(e,t,n);return Ci((m?$r:bi)(v,y),e,t)}function Uo(e,t,n,r){return void 0===e||Ba(e,xe[n])&&!Se.call(r,n)?t:e}function $o(e,t,n,r,o,i){return Ga(e)&&Ga(t)&&(i.set(t,e),jr(e,t,void 0,$o,i),i.delete(t)),e}function Go(e){return Wa(e)?void 0:e}function qo(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,d=!0,p=2&n?new Rn:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],m=t[f];if(r)var y=a?r(m,h,f,t,e,i):r(h,m,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!vt(t,(function(e,t){if(!Tt(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)}))){d=!1;break}}else if(h!==m&&!o(h,m,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function Jo(e){return xi(mi(e,void 0,Ii),e+"")}function Ho(e){return dr(e,wu,ti)}function Wo(e){return dr(e,xu,ni)}var Qo=gn?function(e){return gn.get(e)}:Ku;function Vo(e){for(var t=e.name+"",n=bn[t],r=Se.call(bn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function Yo(e){return(Se.call(En,"placeholder")?En:e).placeholder}function Ko(){var e=En.iteratee||Wu;return e=e===Wu?kr:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Xo(e){for(var t=wu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,pi(o)]}return t}function ei(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Cr(n)?n:void 0}var ti=en?function(e){return null==e?[]:(e=me(e),lt(en(e),(function(t){return Qe.call(e,t)})))}:oc,ni=en?function(e){for(var t=[];e;)ht(t,ti(e)),e=Je(e);return t}:oc,ri=pr;function oi(e,t,n){for(var r=-1,o=(t=uo(t,e)).length,i=!1;++r<o;){var a=Ai(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&$a(o)&&ui(a,o)&&(za(e)||Ta(e))}function ii(e){return"function"!=typeof e.constructor||di(e)?{}:Bn(Je(e))}function ai(e){return za(e)||Ta(e)||!!(Ke&&e&&e[Ke])}function ui(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function ci(e,t,n){if(!Ga(n))return!1;var r=typeof t;return!!("number"==r?Da(n)&&ui(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function si(e,t){if(za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ka(e))||(q.test(e)||!G.test(e)||null!=t&&e in me(t))}function li(e){var t=Vo(e),n=En[t];if("function"!=typeof n||!(t in Tn.prototype))return!1;if(e===n)return!0;var r=Qo(n);return!!r&&e===r[0]}(dn&&ri(new dn(new ArrayBuffer(1)))!=S||pn&&ri(new pn)!=m||hn&&"[object Promise]"!=ri(hn.resolve())||mn&&ri(new mn)!=b||yn&&ri(new yn)!=C)&&(ri=function(e){var t=pr(e),n=t==v?e.constructor:void 0,r=n?Oi(n):"";if(r)switch(r){case wn:return S;case xn:return m;case Cn:return"[object Promise]";case kn:return b;case Sn:return C}return t});var fi=Ce?La:ic;function di(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function pi(e){return e==e&&!Ga(e)}function hi(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in me(n)))}}function mi(e,t,n){return t=an(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=an(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var c=r(t+1);++i<t;)c[i]=o[i];return c[t]=n(u),it(e,this,c)}}function yi(e,t){return t.length<2?e:fr(e,Jr(t,0,-1))}function vi(e,t){for(var n=e.length,r=un(t.length,n),o=go(e);r--;){var i=t[r];e[r]=ui(i,n)?o[i]:void 0}return e}function gi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bi=ki($r),wi=Kt||function(e,t){return We.setTimeout(e,t)},xi=ki(Gr);function Ci(e,t,n){var r=t+"";return xi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(K,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return ut(u,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Z);return t?t[1].split(X):[]}(r),n)))}function ki(e){var t=0,n=0;return function(){var r=cn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Si(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Rr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var _i=function(e){var t=ka(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,(function(e,n,r,o){t.push(r?o.replace(te,"$1"):n||e)})),t}));function Ai(e){if("string"==typeof e||Ka(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Oi(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ei(e){if(e instanceof Tn)return e.clone();var t=new Pn(e.__wrapped__,e.__chain__);return t.__actions__=go(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Mr((function(e,t){return Ra(e)?Xn(e,ir(t,1,Ra,!0)):[]})),ji=Mr((function(e,t){var n=Ni(t);return Ra(n)&&(n=void 0),Ra(e)?Xn(e,ir(t,1,Ra,!0),Ko(n,2)):[]})),Pi=Mr((function(e,t){var n=Ni(t);return Ra(n)&&(n=void 0),Ra(e)?Xn(e,ir(t,1,Ra,!0),void 0,n):[]}));function Ti(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ru(n);return o<0&&(o=an(r+o,0)),wt(e,Ko(t,3),o)}function zi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=ru(n),o=n<0?an(r+o,0):un(o,r-1)),wt(e,Ko(t,3),o,!0)}function Ii(e){return(null==e?0:e.length)?ir(e,1):[]}function Di(e){return e&&e.length?e[0]:void 0}var Ri=Mr((function(e){var t=pt(e,io);return t.length&&t[0]===e[0]?vr(t):[]})),Fi=Mr((function(e){var t=Ni(e),n=pt(e,io);return t===Ni(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vr(n,Ko(t,2)):[]})),Mi=Mr((function(e){var t=Ni(e),n=pt(e,io);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vr(n,void 0,t):[]}));function Ni(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Li=Mr(Ui);function Ui(e,t){return e&&e.length&&t&&t.length?Ir(e,t):e}var $i=Jo((function(e,t){var n=null==e?0:e.length,r=Qn(e,t);return Dr(e,pt(t,(function(e){return ui(e,n)?+e:e})).sort(mo)),r}));function Gi(e){return null==e?e:fn.call(e)}var qi=Mr((function(e){return Zr(ir(e,1,Ra,!0))})),Ji=Mr((function(e){var t=Ni(e);return Ra(t)&&(t=void 0),Zr(ir(e,1,Ra,!0),Ko(t,2))})),Hi=Mr((function(e){var t=Ni(e);return t="function"==typeof t?t:void 0,Zr(ir(e,1,Ra,!0),void 0,t)}));function Wi(e){if(!e||!e.length)return[];var t=0;return e=lt(e,(function(e){if(Ra(e))return t=an(e.length,t),!0})),Bt(t,(function(t){return pt(e,_t(t))}))}function Qi(e,t){if(!e||!e.length)return[];var n=Wi(e);return null==t?n:pt(n,(function(e){return it(t,void 0,e)}))}var Vi=Mr((function(e,t){return Ra(e)?Xn(e,t):[]})),Yi=Mr((function(e){return ro(lt(e,Ra))})),Ki=Mr((function(e){var t=Ni(e);return Ra(t)&&(t=void 0),ro(lt(e,Ra),Ko(t,2))})),Zi=Mr((function(e){var t=Ni(e);return t="function"==typeof t?t:void 0,ro(lt(e,Ra),void 0,t)})),Xi=Mr(Wi);var ea=Mr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Qi(e,n)}));function ta(e){var t=En(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Jo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Qn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Tn&&ui(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[o],thisArg:void 0}),new Pn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var oa=wo((function(e,t,n){Se.call(e,n)?++e[n]:Wn(e,n,1)}));var ia=Oo(Ti),aa=Oo(zi);function ua(e,t){return(za(e)?ut:er)(e,Ko(t,3))}function ca(e,t){return(za(e)?ct:tr)(e,Ko(t,3))}var sa=wo((function(e,t,n){Se.call(e,n)?e[n].push(t):Wn(e,n,[t])}));var la=Mr((function(e,t,n){var o=-1,i="function"==typeof t,a=Da(e)?r(e.length):[];return er(e,(function(e){a[++o]=i?it(t,e,n):gr(e,t,n)})),a})),fa=wo((function(e,t,n){Wn(e,n,t)}));function da(e,t){return(za(e)?pt:Or)(e,Ko(t,3))}var pa=wo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Mr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ci(e,t[0],t[1])?t=[]:n>2&&ci(t[0],t[1],t[2])&&(t=[t[0]]),Tr(e,ir(t,1),[])})),ma=Yt||function(){return We.Date.now()};function ya(e,t,n){return t=n?void 0:t,Lo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new ge(i);return e=ru(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ga=Mr((function(e,t,n){var r=1;if(n.length){var o=$t(n,Yo(ga));r|=32}return Lo(e,r,t,n,o)})),ba=Mr((function(e,t,n){var r=3;if(n.length){var o=$t(n,Yo(ba));r|=32}return Lo(t,r,e,n,o)}));function wa(e,t,n){var r,o,a,u,c,s,l=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new ge(i);function h(t){var n=r,i=o;return r=o=void 0,l=t,u=e.apply(i,n)}function m(e){return l=e,c=wi(v,t),f?h(e):u}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-l>=a}function v(){var e=ma();if(y(e))return g(e);c=wi(v,function(e){var n=t-(e-s);return d?un(n,a-(e-l)):n}(e))}function g(e){return c=void 0,p&&r?h(e):(r=o=void 0,u)}function b(){var e=ma(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return m(s);if(d)return lo(c),c=wi(v,t),h(s)}return void 0===c&&(c=wi(v,t)),u}return t=iu(t)||0,Ga(n)&&(f=!!n.leading,a=(d="maxWait"in n)?an(iu(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==c&&lo(c),l=0,r=s=o=c=void 0},b.flush=function(){return void 0===c?u:g(ma())},b}var xa=Mr((function(e,t){return Zn(e,1,t)})),Ca=Mr((function(e,t,n){return Zn(e,iu(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ge(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ka.Cache||Dn),n}function Sa(e){if("function"!=typeof e)throw new ge(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Dn;var _a=co((function(e,t){var n=(t=1==t.length&&za(t[0])?pt(t[0],jt(Ko())):pt(ir(t,1),jt(Ko()))).length;return Mr((function(r){for(var o=-1,i=un(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return it(e,this,r)}))})),Aa=Mr((function(e,t){return Lo(e,32,void 0,t,$t(t,Yo(Aa)))})),Oa=Mr((function(e,t){return Lo(e,64,void 0,t,$t(t,Yo(Oa)))})),Ea=Jo((function(e,t){return Lo(e,256,void 0,void 0,void 0,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var ja=Do(hr),Pa=Do((function(e,t){return e>=t})),Ta=br(function(){return arguments}())?br:function(e){return qa(e)&&Se.call(e,"callee")&&!Qe.call(e,"callee")},za=r.isArray,Ia=Xe?jt(Xe):function(e){return qa(e)&&pr(e)==k};function Da(e){return null!=e&&$a(e.length)&&!La(e)}function Ra(e){return qa(e)&&Da(e)}var Fa=tn||ic,Ma=et?jt(et):function(e){return qa(e)&&pr(e)==f};function Na(e){if(!qa(e))return!1;var t=pr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wa(e)}function La(e){if(!Ga(e))return!1;var t=pr(e);return t==p||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ua(e){return"number"==typeof e&&e==ru(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ga(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qa(e){return null!=e&&"object"==typeof e}var Ja=tt?jt(tt):function(e){return qa(e)&&ri(e)==m};function Ha(e){return"number"==typeof e||qa(e)&&pr(e)==y}function Wa(e){if(!qa(e)||pr(e)!=v)return!1;var t=Je(e);if(null===t)return!0;var n=Se.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==Ee}var Qa=nt?jt(nt):function(e){return qa(e)&&pr(e)==g};var Va=rt?jt(rt):function(e){return qa(e)&&ri(e)==b};function Ya(e){return"string"==typeof e||!za(e)&&qa(e)&&pr(e)==w}function Ka(e){return"symbol"==typeof e||qa(e)&&pr(e)==x}var Za=ot?jt(ot):function(e){return qa(e)&&$a(e.length)&&!!Le[pr(e)]};var Xa=Do(Ar),eu=Do((function(e,t){return e<=t}));function tu(e){if(!e)return[];if(Da(e))return Ya(e)?Ht(e):go(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=ri(e);return(t==m?Lt:t==b?Gt:Bu)(e)}function nu(e){return e?(e=iu(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ru(e){var t=nu(e),n=t%1;return t==t?n?t-n:t:0}function ou(e){return e?Vn(ru(e),0,4294967295):0}function iu(e){if("number"==typeof e)return e;if(Ka(e))return NaN;if(Ga(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ga(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Q,"");var n=ie.test(e);return n||ue.test(e)?qe(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function au(e){return bo(e,xu(e))}function uu(e){return null==e?"":Kr(e)}var cu=xo((function(e,t){if(di(t)||Da(t))bo(t,wu(t),e);else for(var n in t)Se.call(t,n)&&Gn(e,n,t[n])})),su=xo((function(e,t){bo(t,xu(t),e)})),lu=xo((function(e,t,n,r){bo(t,xu(t),e,r)})),fu=xo((function(e,t,n,r){bo(t,wu(t),e,r)})),du=Jo(Qn);var pu=Mr((function(e,t){e=me(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&ci(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=xu(i),u=-1,c=a.length;++u<c;){var s=a[u],l=e[s];(void 0===l||Ba(l,xe[s])&&!Se.call(e,s))&&(e[s]=i[s])}return e})),hu=Mr((function(e){return e.push(void 0,$o),it(ku,void 0,e)}));function mu(e,t,n){var r=null==e?void 0:fr(e,t);return void 0===r?n:r}function yu(e,t){return null!=e&&oi(e,t,yr)}var vu=jo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),e[t]=n}),Gu(Hu)),gu=jo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Oe.call(t)),Se.call(e,t)?e[t].push(n):e[t]=[n]}),Ko),bu=Mr(gr);function wu(e){return Da(e)?Mn(e):Sr(e)}function xu(e){return Da(e)?Mn(e,!0):_r(e)}var Cu=xo((function(e,t,n){jr(e,t,n)})),ku=xo((function(e,t,n,r){jr(e,t,n,r)})),Su=Jo((function(e,t){var n={};if(null==e)return n;var r=!1;t=pt(t,(function(t){return t=uo(t,e),r||(r=t.length>1),t})),bo(e,Wo(e),n),r&&(n=Yn(n,7,Go));for(var o=t.length;o--;)Xr(n,t[o]);return n}));var _u=Jo((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return yu(e,n)}))}(e,t)}));function Au(e,t){if(null==e)return{};var n=pt(Wo(e),(function(e){return[e]}));return t=Ko(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var Ou=No(wu),Eu=No(xu);function Bu(e){return null==e?[]:Pt(e,wu(e))}var ju=_o((function(e,t,n){return t=t.toLowerCase(),e+(n?Pu(t):t)}));function Pu(e){return Nu(uu(e).toLowerCase())}function Tu(e){return(e=uu(e))&&e.replace(se,Rt).replace(ze,"")}var zu=_o((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Iu=_o((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Du=So("toLowerCase");var Ru=_o((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fu=_o((function(e,t,n){return e+(n?" ":"")+Nu(t)}));var Mu=_o((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Nu=So("toUpperCase");function Lu(e,t,n){return e=uu(e),void 0===(t=n?void 0:t)?function(e){return Fe.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Uu=Mr((function(e,t){try{return it(e,void 0,t)}catch(e){return Na(e)?e:new de(e)}})),$u=Jo((function(e,t){return ut(t,(function(t){t=Ai(t),Wn(e,t,ga(e[t],e))})),e}));function Gu(e){return function(){return e}}var qu=Eo(),Ju=Eo(!0);function Hu(e){return e}function Wu(e){return kr("function"==typeof e?e:Yn(e,1))}var Qu=Mr((function(e,t){return function(n){return gr(n,e,t)}})),Vu=Mr((function(e,t){return function(n){return gr(e,n,t)}}));function Yu(e,t,n){var r=wu(t),o=lr(t,r);null!=n||Ga(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=lr(t,wu(t)));var i=!(Ga(n)&&"chain"in n&&!n.chain),a=La(e);return ut(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=go(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,ht([this.value()],arguments))})})),e}function Ku(){}var Zu=To(pt),Xu=To(st),ec=To(vt);function tc(e){return si(e)?_t(Ai(e)):function(e){return function(t){return fr(t,e)}}(e)}var nc=Io(),rc=Io(!0);function oc(){return[]}function ic(){return!1}var ac=Po((function(e,t){return e+t}),0),uc=Fo("ceil"),cc=Po((function(e,t){return e/t}),1),sc=Fo("floor");var lc,fc=Po((function(e,t){return e*t}),1),dc=Fo("round"),pc=Po((function(e,t){return e-t}),0);return En.after=function(e,t){if("function"!=typeof t)throw new ge(i);return e=ru(e),function(){if(--e<1)return t.apply(this,arguments)}},En.ary=ya,En.assign=cu,En.assignIn=su,En.assignInWith=lu,En.assignWith=fu,En.at=du,En.before=va,En.bind=ga,En.bindAll=$u,En.bindKey=ba,En.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return za(e)?e:[e]},En.chain=ta,En.chunk=function(e,t,n){t=(n?ci(e,t,n):void 0===t)?1:an(ru(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,u=r(Zt(o/t));i<o;)u[a++]=Jr(e,i,i+=t);return u},En.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},En.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return ht(za(n)?go(n):[n],ir(t,1))},En.cond=function(e){var t=null==e?0:e.length,n=Ko();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new ge(i);return[n(e[0]),e[1]]})):[],Mr((function(n){for(var r=-1;++r<t;){var o=e[r];if(it(o[0],this,n))return it(o[1],this,n)}}))},En.conforms=function(e){return function(e){var t=wu(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},En.constant=Gu,En.countBy=oa,En.create=function(e,t){var n=Bn(e);return null==t?n:Hn(n,t)},En.curry=function e(t,n,r){var o=Lo(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},En.curryRight=function e(t,n,r){var o=Lo(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},En.debounce=wa,En.defaults=pu,En.defaultsDeep=hu,En.defer=xa,En.delay=Ca,En.difference=Bi,En.differenceBy=ji,En.differenceWith=Pi,En.drop=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,(t=n||void 0===t?1:ru(t))<0?0:t,r):[]},En.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,0,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t):[]},En.dropRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0,!0):[]},En.dropWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0):[]},En.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ci(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ru(n))<0&&(n=-n>o?0:o+n),(r=void 0===r||r>o?o:ru(r))<0&&(r+=o),r=n>r?0:ou(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},En.filter=function(e,t){return(za(e)?lt:or)(e,Ko(t,3))},En.flatMap=function(e,t){return ir(da(e,t),1)},En.flatMapDeep=function(e,t){return ir(da(e,t),1/0)},En.flatMapDepth=function(e,t,n){return n=void 0===n?1:ru(n),ir(da(e,t),n)},En.flatten=Ii,En.flattenDeep=function(e){return(null==e?0:e.length)?ir(e,1/0):[]},En.flattenDepth=function(e,t){return(null==e?0:e.length)?ir(e,t=void 0===t?1:ru(t)):[]},En.flip=function(e){return Lo(e,512)},En.flow=qu,En.flowRight=Ju,En.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},En.functions=function(e){return null==e?[]:lr(e,wu(e))},En.functionsIn=function(e){return null==e?[]:lr(e,xu(e))},En.groupBy=sa,En.initial=function(e){return(null==e?0:e.length)?Jr(e,0,-1):[]},En.intersection=Ri,En.intersectionBy=Fi,En.intersectionWith=Mi,En.invert=vu,En.invertBy=gu,En.invokeMap=la,En.iteratee=Wu,En.keyBy=fa,En.keys=wu,En.keysIn=xu,En.map=da,En.mapKeys=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){Wn(n,t(e,r,o),e)})),n},En.mapValues=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){Wn(n,r,t(e,r,o))})),n},En.matches=function(e){return Er(Yn(e,1))},En.matchesProperty=function(e,t){return Br(e,Yn(t,1))},En.memoize=ka,En.merge=Cu,En.mergeWith=ku,En.method=Qu,En.methodOf=Vu,En.mixin=Yu,En.negate=Sa,En.nthArg=function(e){return e=ru(e),Mr((function(t){return Pr(t,e)}))},En.omit=Su,En.omitBy=function(e,t){return Au(e,Sa(Ko(t)))},En.once=function(e){return va(2,e)},En.orderBy=function(e,t,n,r){return null==e?[]:(za(t)||(t=null==t?[]:[t]),za(n=r?void 0:n)||(n=null==n?[]:[n]),Tr(e,t,n))},En.over=Zu,En.overArgs=_a,En.overEvery=Xu,En.overSome=ec,En.partial=Aa,En.partialRight=Oa,En.partition=pa,En.pick=_u,En.pickBy=Au,En.property=tc,En.propertyOf=function(e){return function(t){return null==e?void 0:fr(e,t)}},En.pull=Li,En.pullAll=Ui,En.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,Ko(n,2)):e},En.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,void 0,n):e},En.pullAt=$i,En.range=nc,En.rangeRight=rc,En.rearg=Ea,En.reject=function(e,t){return(za(e)?lt:or)(e,Sa(Ko(t,3)))},En.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ko(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Dr(e,o),n},En.rest=function(e,t){if("function"!=typeof e)throw new ge(i);return Mr(e,t=void 0===t?t:ru(t))},En.reverse=Gi,En.sampleSize=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),(za(e)?Ln:Lr)(e,t)},En.set=function(e,t,n){return null==e?e:Ur(e,t,n)},En.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Ur(e,t,n,r)},En.shuffle=function(e){return(za(e)?Un:qr)(e)},En.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ci(e,t,n)?(t=0,n=r):(t=null==t?0:ru(t),n=void 0===n?r:ru(n)),Jr(e,t,n)):[]},En.sortBy=ha,En.sortedUniq=function(e){return e&&e.length?Vr(e):[]},En.sortedUniqBy=function(e,t){return e&&e.length?Vr(e,Ko(t,2)):[]},En.split=function(e,t,n){return n&&"number"!=typeof n&&ci(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=uu(e))&&("string"==typeof t||null!=t&&!Qa(t))&&!(t=Kr(t))&&Nt(e)?so(Ht(e),0,n):e.split(t,n):[]},En.spread=function(e,t){if("function"!=typeof e)throw new ge(i);return t=null==t?0:an(ru(t),0),Mr((function(n){var r=n[t],o=so(n,0,t);return r&&ht(o,r),it(e,this,o)}))},En.tail=function(e){var t=null==e?0:e.length;return t?Jr(e,1,t):[]},En.take=function(e,t,n){return e&&e.length?Jr(e,0,(t=n||void 0===t?1:ru(t))<0?0:t):[]},En.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t,r):[]},En.takeRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!1,!0):[]},En.takeWhile=function(e,t){return e&&e.length?to(e,Ko(t,3)):[]},En.tap=function(e,t){return t(e),e},En.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new ge(i);return Ga(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wa(e,t,{leading:r,maxWait:t,trailing:o})},En.thru=na,En.toArray=tu,En.toPairs=Ou,En.toPairsIn=Eu,En.toPath=function(e){return za(e)?pt(e,Ai):Ka(e)?[e]:go(_i(uu(e)))},En.toPlainObject=au,En.transform=function(e,t,n){var r=za(e),o=r||Fa(e)||Za(e);if(t=Ko(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ga(e)&&La(i)?Bn(Je(e)):{}}return(o?ut:cr)(e,(function(e,r,o){return t(n,e,r,o)})),n},En.unary=function(e){return ya(e,1)},En.union=qi,En.unionBy=Ji,En.unionWith=Hi,En.uniq=function(e){return e&&e.length?Zr(e):[]},En.uniqBy=function(e,t){return e&&e.length?Zr(e,Ko(t,2)):[]},En.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zr(e,void 0,t):[]},En.unset=function(e,t){return null==e||Xr(e,t)},En.unzip=Wi,En.unzipWith=Qi,En.update=function(e,t,n){return null==e?e:eo(e,t,ao(n))},En.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:eo(e,t,ao(n),r)},En.values=Bu,En.valuesIn=function(e){return null==e?[]:Pt(e,xu(e))},En.without=Vi,En.words=Lu,En.wrap=function(e,t){return Aa(ao(t),e)},En.xor=Yi,En.xorBy=Ki,En.xorWith=Zi,En.zip=Xi,En.zipObject=function(e,t){return oo(e||[],t||[],Gn)},En.zipObjectDeep=function(e,t){return oo(e||[],t||[],Ur)},En.zipWith=ea,En.entries=Ou,En.entriesIn=Eu,En.extend=su,En.extendWith=lu,Yu(En,En),En.add=ac,En.attempt=Uu,En.camelCase=ju,En.capitalize=Pu,En.ceil=uc,En.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=iu(n))==n?n:0),void 0!==t&&(t=(t=iu(t))==t?t:0),Vn(iu(e),t,n)},En.clone=function(e){return Yn(e,4)},En.cloneDeep=function(e){return Yn(e,5)},En.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},En.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},En.conformsTo=function(e,t){return null==t||Kn(e,t,wu(t))},En.deburr=Tu,En.defaultTo=function(e,t){return null==e||e!=e?t:e},En.divide=cc,En.endsWith=function(e,t,n){e=uu(e),t=Kr(t);var r=e.length,o=n=void 0===n?r:Vn(ru(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},En.eq=Ba,En.escape=function(e){return(e=uu(e))&&N.test(e)?e.replace(F,Ft):e},En.escapeRegExp=function(e){return(e=uu(e))&&W.test(e)?e.replace(H,"\\$&"):e},En.every=function(e,t,n){var r=za(e)?st:nr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},En.find=ia,En.findIndex=Ti,En.findKey=function(e,t){return bt(e,Ko(t,3),cr)},En.findLast=aa,En.findLastIndex=zi,En.findLastKey=function(e,t){return bt(e,Ko(t,3),sr)},En.floor=sc,En.forEach=ua,En.forEachRight=ca,En.forIn=function(e,t){return null==e?e:ar(e,Ko(t,3),xu)},En.forInRight=function(e,t){return null==e?e:ur(e,Ko(t,3),xu)},En.forOwn=function(e,t){return e&&cr(e,Ko(t,3))},En.forOwnRight=function(e,t){return e&&sr(e,Ko(t,3))},En.get=mu,En.gt=ja,En.gte=Pa,En.has=function(e,t){return null!=e&&oi(e,t,mr)},En.hasIn=yu,En.head=Di,En.identity=Hu,En.includes=function(e,t,n,r){e=Da(e)?e:Bu(e),n=n&&!r?ru(n):0;var o=e.length;return n<0&&(n=an(o+n,0)),Ya(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&xt(e,t,n)>-1},En.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ru(n);return o<0&&(o=an(r+o,0)),xt(e,t,o)},En.inRange=function(e,t,n){return t=nu(t),void 0===n?(n=t,t=0):n=nu(n),function(e,t,n){return e>=un(t,n)&&e<an(t,n)}(e=iu(e),t,n)},En.invoke=bu,En.isArguments=Ta,En.isArray=za,En.isArrayBuffer=Ia,En.isArrayLike=Da,En.isArrayLikeObject=Ra,En.isBoolean=function(e){return!0===e||!1===e||qa(e)&&pr(e)==l},En.isBuffer=Fa,En.isDate=Ma,En.isElement=function(e){return qa(e)&&1===e.nodeType&&!Wa(e)},En.isEmpty=function(e){if(null==e)return!0;if(Da(e)&&(za(e)||"string"==typeof e||"function"==typeof e.splice||Fa(e)||Za(e)||Ta(e)))return!e.length;var t=ri(e);if(t==m||t==b)return!e.size;if(di(e))return!Sr(e).length;for(var n in e)if(Se.call(e,n))return!1;return!0},En.isEqual=function(e,t){return wr(e,t)},En.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?wr(e,t,void 0,n):!!r},En.isError=Na,En.isFinite=function(e){return"number"==typeof e&&nn(e)},En.isFunction=La,En.isInteger=Ua,En.isLength=$a,En.isMap=Ja,En.isMatch=function(e,t){return e===t||xr(e,t,Xo(t))},En.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,xr(e,t,Xo(t),n)},En.isNaN=function(e){return Ha(e)&&e!=+e},En.isNative=function(e){if(fi(e))throw new de("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Cr(e)},En.isNil=function(e){return null==e},En.isNull=function(e){return null===e},En.isNumber=Ha,En.isObject=Ga,En.isObjectLike=qa,En.isPlainObject=Wa,En.isRegExp=Qa,En.isSafeInteger=function(e){return Ua(e)&&e>=-9007199254740991&&e<=9007199254740991},En.isSet=Va,En.isString=Ya,En.isSymbol=Ka,En.isTypedArray=Za,En.isUndefined=function(e){return void 0===e},En.isWeakMap=function(e){return qa(e)&&ri(e)==C},En.isWeakSet=function(e){return qa(e)&&"[object WeakSet]"==pr(e)},En.join=function(e,t){return null==e?"":rn.call(e,t)},En.kebabCase=zu,En.last=Ni,En.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=ru(n))<0?an(r+o,0):un(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):wt(e,kt,o,!0)},En.lowerCase=Iu,En.lowerFirst=Du,En.lt=Xa,En.lte=eu,En.max=function(e){return e&&e.length?rr(e,Hu,hr):void 0},En.maxBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),hr):void 0},En.mean=function(e){return St(e,Hu)},En.meanBy=function(e,t){return St(e,Ko(t,2))},En.min=function(e){return e&&e.length?rr(e,Hu,Ar):void 0},En.minBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),Ar):void 0},En.stubArray=oc,En.stubFalse=ic,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=fc,En.nth=function(e,t){return e&&e.length?Pr(e,ru(t)):void 0},En.noConflict=function(){return We._===this&&(We._=Be),this},En.noop=Ku,En.now=ma,En.pad=function(e,t,n){e=uu(e);var r=(t=ru(t))?Jt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return zo(Xt(o),n)+e+zo(Zt(o),n)},En.padEnd=function(e,t,n){e=uu(e);var r=(t=ru(t))?Jt(e):0;return t&&r<t?e+zo(t-r,n):e},En.padStart=function(e,t,n){e=uu(e);var r=(t=ru(t))?Jt(e):0;return t&&r<t?zo(t-r,n)+e:e},En.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),sn(uu(e).replace(V,""),t||0)},En.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ci(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=nu(e),void 0===t?(t=e,e=0):t=nu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=ln();return un(e+o*(t-e+Ge("1e-"+((o+"").length-1))),t)}return Rr(e,t)},En.reduce=function(e,t,n){var r=za(e)?mt:Ot,o=arguments.length<3;return r(e,Ko(t,4),n,o,er)},En.reduceRight=function(e,t,n){var r=za(e)?yt:Ot,o=arguments.length<3;return r(e,Ko(t,4),n,o,tr)},En.repeat=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),Fr(uu(e),t)},En.replace=function(){var e=arguments,t=uu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},En.result=function(e,t,n){var r=-1,o=(t=uo(t,e)).length;for(o||(o=1,e=void 0);++r<o;){var i=null==e?void 0:e[Ai(t[r])];void 0===i&&(r=o,i=n),e=La(i)?i.call(e):i}return e},En.round=dc,En.runInContext=e,En.sample=function(e){return(za(e)?Nn:Nr)(e)},En.size=function(e){if(null==e)return 0;if(Da(e))return Ya(e)?Jt(e):e.length;var t=ri(e);return t==m||t==b?e.size:Sr(e).length},En.snakeCase=Ru,En.some=function(e,t,n){var r=za(e)?vt:Hr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},En.sortedIndex=function(e,t){return Wr(e,t)},En.sortedIndexBy=function(e,t,n){return Qr(e,t,Ko(n,2))},En.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Wr(e,t);if(r<n&&Ba(e[r],t))return r}return-1},En.sortedLastIndex=function(e,t){return Wr(e,t,!0)},En.sortedLastIndexBy=function(e,t,n){return Qr(e,t,Ko(n,2),!0)},En.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Wr(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},En.startCase=Fu,En.startsWith=function(e,t,n){return e=uu(e),n=null==n?0:Vn(ru(n),0,e.length),t=Kr(t),e.slice(n,n+t.length)==t},En.subtract=pc,En.sum=function(e){return e&&e.length?Et(e,Hu):0},En.sumBy=function(e,t){return e&&e.length?Et(e,Ko(t,2)):0},En.template=function(e,t,n){var r=En.templateSettings;n&&ci(e,t,n)&&(t=void 0),e=uu(e),t=lu({},t,r,Uo);var o,i,a=lu({},t.imports,r.imports,Uo),u=wu(a),c=Pt(a,u),s=0,l=t.interpolate||le,f="__p += '",d=ye((t.escape||le).source+"|"+l.source+"|"+(l===$?ne:le).source+"|"+(t.evaluate||le).source+"|$","g"),p="//# sourceURL="+(Se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ne+"]")+"\n";e.replace(d,(function(t,n,r,a,u,c){return r||(r=a),f+=e.slice(s,c).replace(fe,Mt),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),u&&(i=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),s=c+t.length,t})),f+="';\n";var h=Se.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(z,""):f).replace(I,"$1").replace(D,"$1;"),f="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Uu((function(){return pe(u,p+"return "+f).apply(void 0,c)}));if(m.source=f,Na(m))throw m;return m},En.times=function(e,t){if((e=ru(e))<1||e>9007199254740991)return[];var n=4294967295,r=un(e,4294967295);e-=4294967295;for(var o=Bt(r,t=Ko(t));++n<e;)t(n);return o},En.toFinite=nu,En.toInteger=ru,En.toLength=ou,En.toLower=function(e){return uu(e).toLowerCase()},En.toNumber=iu,En.toSafeInteger=function(e){return e?Vn(ru(e),-9007199254740991,9007199254740991):0===e?e:0},En.toString=uu,En.toUpper=function(e){return uu(e).toUpperCase()},En.trim=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(Q,"");if(!e||!(t=Kr(t)))return e;var r=Ht(e),o=Ht(t);return so(r,zt(r,o),It(r,o)+1).join("")},En.trimEnd=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(Y,"");if(!e||!(t=Kr(t)))return e;var r=Ht(e);return so(r,0,It(r,Ht(t))+1).join("")},En.trimStart=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(V,"");if(!e||!(t=Kr(t)))return e;var r=Ht(e);return so(r,zt(r,Ht(t))).join("")},En.truncate=function(e,t){var n=30,r="...";if(Ga(t)){var o="separator"in t?t.separator:o;n="length"in t?ru(t.length):n,r="omission"in t?Kr(t.omission):r}var i=(e=uu(e)).length;if(Nt(e)){var a=Ht(e);i=a.length}if(n>=i)return e;var u=n-Jt(r);if(u<1)return r;var c=a?so(a,0,u).join(""):e.slice(0,u);if(void 0===o)return c+r;if(a&&(u+=c.length-u),Qa(o)){if(e.slice(u).search(o)){var s,l=c;for(o.global||(o=ye(o.source,uu(re.exec(o))+"g")),o.lastIndex=0;s=o.exec(l);)var f=s.index;c=c.slice(0,void 0===f?u:f)}}else if(e.indexOf(Kr(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},En.unescape=function(e){return(e=uu(e))&&M.test(e)?e.replace(R,Wt):e},En.uniqueId=function(e){var t=++_e;return uu(e)+t},En.upperCase=Mu,En.upperFirst=Nu,En.each=ua,En.eachRight=ca,En.first=Di,Yu(En,(lc={},cr(En,(function(e,t){Se.call(En.prototype,t)||(lc[t]=e)})),lc),{chain:!1}),En.VERSION="4.17.19",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){En[e].placeholder=En})),ut(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!t?new Tn(this):this.clone();return r.__filtered__?r.__takeCount__=un(n,r.__takeCount__):r.__views__.push({size:un(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),ut(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ko(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),ut(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Hu)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=Mr((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return gr(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Sa(Ko(e)))},Tn.prototype.slice=function(e,t){e=ru(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ru(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},cr(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=En[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(En.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Tn,c=a[0],s=u||za(t),l=function(e){var t=o.apply(En,ht([e],a));return r&&f?t[0]:t};s&&n&&"function"==typeof c&&1!=c.length&&(u=s=!1);var f=this.__chain__,d=!!this.__actions__.length,p=i&&!f,h=u&&!d;if(!i&&s){t=h?t:new Tn(this);var m=e.apply(t,a);return m.__actions__.push({func:na,args:[l],thisArg:void 0}),new Pn(m,f)}return p&&h?e.apply(this,a):(m=this.thru(l),p?r?m.value()[0]:m.value():m)})})),ut(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);En.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(za(o)?o:[],e)}return this[n]((function(n){return t.apply(za(n)?n:[],e)}))}})),cr(Tn.prototype,(function(e,t){var n=En[t];if(n){var r=n.name+"";Se.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Bo(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=go(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=go(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=go(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=za(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=un(t,e+a);break;case"takeRight":e=an(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,c=u-a,s=r?u:a-1,l=this.__iteratees__,f=l.length,d=0,p=un(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return no(e,this.__actions__);var h=[];e:for(;c--&&d<p;){for(var m=-1,y=e[s+=t];++m<f;){var v=l[m],g=v.iteratee,b=v.type,w=g(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[d++]=y}return h},En.prototype.at=ra,En.prototype.chain=function(){return ta(this)},En.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},En.prototype.next=function(){void 0===this.__values__&&(this.__values__=tu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(e){for(var t,n=this;n instanceof jn;){var r=Ei(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},En.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:na,args:[Gi],thisArg:void 0}),new Pn(t,this.__chain__)}return this.thru(Gi)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return no(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,Ze&&(En.prototype[Ze]=function(){return this}),En}();We._=Qt,void 0===(o=function(){return Qt}.call(t,n,t,r))||(r.exports=o)}).call(this)}).call(this,n(33),n(112)(e))},function(e){e.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":"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":"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":"appliance_invoice","purpose":"invoice","sourceCategory":"retail"},{"label":"web_service_invoice","purpose":"invoice","sourceCategory":"web"},{"label":"restaurant_invoice","purpose":"invoice","sourceCategory":"alimentation"},{"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":"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"]}],"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"],"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"]}')},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getReferencedFolder=t.createFolderWithReference=t.ensureMagicFolder=t.MAGIC_FOLDERS=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(608)),u=(r(n(41)),n(22),n(59)),c={ADMINISTRATIVE:"".concat("io.cozy.apps","/").concat("administrative"),PHOTOS:"".concat("io.cozy.apps","/").concat("photos"),PHOTOS_BACKUP:"".concat("io.cozy.apps","/").concat("photos","/mobile"),PHOTOS_UPLOAD:"".concat("io.cozy.apps","/").concat("photos","/upload"),NOTES:"".concat("io.cozy.apps","/notes"),HOME:"".concat("io.cozy.apps","/home"),PAPERS:"".concat("io.cozy.apps","/").concat("administrative","/papers")};t.MAGIC_FOLDERS=c;var s=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={_type:"io.cozy.apps",_id:n},e.next=3,f(t,i);case 3:if(!(a=e.sent)){e.next=6;break}return e.abrupt("return",a);case 6:if((u=Object.values(c)).includes(n)){e.next=9;break}throw new Error("Cannot create Magic folder with id ".concat(n,". Allowed values are ").concat(u.join(", "),"."));case 9:if(r){e.next=11;break}throw new Error("Magic folder default path must be defined");case 11:return e.abrupt("return",l(t,r,i));case 12:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.ensureMagicFolder=s;var l=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,a,c,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.collection(u.DOCTYPE_FILES),e.next=3,i.ensureDirectoryExists(n);case 3:return a=e.sent,e.next=6,i.addReferencesTo(r,[{_id:a}]);case 6:return e.next=8,i.get(a);case 8:return c=e.sent,s=c.data,e.abrupt("return",s);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.createFolderWithReference=l;var f=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,c;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.collection(u.DOCTYPE_FILES).findReferencedBy(n);case 2:return r=e.sent,i=r.included,c=i.filter((function(e){return!/^\/\.cozy_trash/.test(e.attributes.path)})),e.abrupt("return",c.length>0?(0,a.default)(c,"created_at").pop():null);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.getReferencedFolder=f},function(e,t,n){var r=n(122),o=n(286),i=n(57),a=n(290),u=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=u},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchURL=t.generateUrlForNote=t.generatePrivateUrl=void 0;var o=r(n(7)),i=r(n(9)),a=n(192),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.returnUrl,o=new URL(e);return r&&o.searchParams.set("returnUrl",r),o.hash="#/n/".concat(t.id),o.toString()};t.generatePrivateUrl=u;t.generateUrlForNote=function(e,t){return console.warn("generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead"),u(e,t)};var c=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,s,l,f,d,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getStackClient().collection("io.cozy.notes").fetchURL({_id:n.id});case 2:if(r=e.sent,i=r.data,u=i.note_id,c=i.subdomain,s=i.protocol,l=i.instance,f=i.sharecode,d=i.public_name,!f){e.next=17;break}return(p=[["id",u]]).push(["sharecode",f]),d&&p.push(["username",d]),e.abrupt("return",(0,a.generateWebLink)({cozyUrl:"".concat(s,"://").concat(l),searchParams:p,pathname:"/public/",slug:"notes",subDomainType:c}));case 17:return e.abrupt("return",(0,a.generateWebLink)({cozyUrl:"".concat(s,"://").concat(l),pathname:"",slug:"notes",subDomainType:c,hash:"/n/".concat(u)}));case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchURL=c},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.isReadOnly=m,t.fetchOwn=y,t.isForType=g,t.isDocumentReadOnly=function(e){return x.apply(this,arguments)},t.isShortcutCreatedOnTheRecipientCozy=void 0;var o=r(n(2)),i=r(n(7)),a=r(n(9)),u=r(n(31)),c=r(n(283)),s=r(n(18)),l=(r(n(41)),n(21)),f=n(303),d=n(59);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.writability,r=void 0===n?["PATCH","POST","PUT","DELETE"]:n;return e.verbs&&e.verbs.length>0&&0===(0,c.default)(e.verbs,["ALL"].concat((0,u.default)(r))).length}function y(e){return v.apply(this,arguments)}function v(){return(v=(0,a.default)(i.default.mark((function e(t){var n,r,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.collection("io.cozy.permissions"),e.next=3,n.fetchOwnPermissions();case 3:if(r=e.sent,o=(0,s.default)(r,"data.attributes.permissions")){e.next=7;break}throw"Can't get self permissions";case 7:return e.abrupt("return",Object.values(o));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t){return e.type===t||e.type+".*"===t}function b(e){return w.apply(this,arguments)}function w(){return(w=(0,a.default)(i.default.mark((function e(t){var n,r,o,u,c,s,p,m,v,b,w,x;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x=function(){return(x=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,u,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.doc,r=t.client,o=t.perms,!(a=o.find((function(e){if(e.values){var t=e.selector||"id",r=n[t];return e.values.includes(r)}return!0})))){e.next=6;break}return e.abrupt("return",a);case 6:if(c!==d.DOCTYPE_FILES){e.next=16;break}if(u=(0,f.getParentFolderId)(n),e.t0=u,!e.t0){e.next=13;break}return e.next=12,v(u);case 12:e.t0=e.sent;case 13:if(!(s=e.t0)){e.next=16;break}return e.abrupt("return",w({doc:s,perms:o,client:r}));case 16:return e.abrupt("return",void 0);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)},w=function(e){return x.apply(this,arguments)},b=function(){return(b=(0,a.default)(i.default.mark((function e(t){var n,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,l.Q)(d.DOCTYPE_FILES).getById(t),e.next=3,r.query(n);case 3:return o=e.sent,e.abrupt("return",o&&o.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)},v=function(e){return b.apply(this,arguments)},n=t.document,r=t.client,o=t.permissions,u=n._id||n.id,c=n._type||n.type,s=h(h({},n),{},{id:u,type:c}),!o){e.next=12;break}e.t0=o,e.next=15;break;case 12:return e.next=14,y(r);case 14:e.t0=e.sent;case 15:return p=e.t0,m=p.filter((function(e){return g(e,c)})),e.abrupt("return",w({doc:s,client:r,perms:m}));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){return(x=(0,a.default)(i.default.mark((function e(t){var n,r,o,a,u,c;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.document,r=t.client,o=t.writability,void 0!==(a=t.permissions)){e.next=10;break}return e.next=7,y(r);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=a;case 11:if(!((u=e.t0).length<=1)){e.next=16;break}e.t1=u[0],e.next=19;break;case 16:return e.next=18,b({document:n,client:r,permissions:u});case 18:e.t1=e.sent;case 19:if(!(c=e.t1)){e.next=24;break}return e.abrupt("return",m(c,{writability:o}));case 24:return console.warn("can't find the document in current attached permissions"),e.abrupt("return",void 0);case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.isShortcutCreatedOnTheRecipientCozy=function(e){if(!e.included)return!1;var t=e.included.find((function(e){return"io.cozy.sharings.members"===e.type}));return!(!t||!t.attributes.instance)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getCreatedByApp=t.hasBeenUpdatedByApp=void 0;var o=r(n(18));t.hasBeenUpdatedByApp=function(e,t){var n=(0,o.default)(e,"cozyMetadata.updatedByApps");return Boolean(n&&n.find((function(e){return e.slug===t})))};t.getCreatedByApp=function(e){return(0,o.default)(e,"cozyMetadata.createdByApp")}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexByFamilyNameGivenNameEmailCozyUrl=t.getDefaultSortIndexValue=t.makeDefaultSortIndexValue=t.getDisplayName=t.makeDisplayName=t.getFullname=t.makeFullname=t.getPrimaryAddress=t.getPrimaryPhone=t.getPrimaryCozyDomain=t.getPrimaryCozy=t.getPrimaryEmail=t.getInitials=t.getPrimaryOrFirst=void 0;var o=r(n(18)),i=r(n(613)),a=function(e){return function(t){return t[e]&&0!==t[e].length?t[e].find((function(e){return e.primary}))||t[e][0]:""}};t.getPrimaryOrFirst=a;t.getInitials=function(e){if(e.name&&!(0,i.default)(e.name))return["givenName","familyName"].map((function(t){return(0,o.default)(e,["name",t,0],"")})).join("").toUpperCase();var t=u(e);if(t)return t[0].toUpperCase();var n=s(e);return n?n[0].toUpperCase():""};var u=function(e){return Array.isArray(e.email)?a("email")(e).address||"":e.email};t.getPrimaryEmail=u;var c=function(e){return Array.isArray(e.cozy)?a("cozy")(e).url||"":e.url};t.getPrimaryCozy=c;var s=function(e){try{return new URL(c(e)).hostname.replace(/^(www.)/g,"")}catch(t){return c(e)}};t.getPrimaryCozyDomain=s;t.getPrimaryPhone=function(e){return a("phone")(e).number||""};t.getPrimaryAddress=function(e){return a("address")(e).formattedAddress||""};var l=function(e){return e.name?["namePrefix","givenName","additionalName","familyName","nameSuffix"].map((function(t){return e.name[t]})).filter((function(e){return void 0!==e})).join(" ").trim():""};t.makeFullname=l;t.getFullname=function(e){return(0,o.default)(e,"fullname")?e.fullname:l(e)};var f=function(e){var t=l(e),n=u(e),r=s(e);return t&&t.length>0?t:n&&n.length>0?n:r&&r.length>0?r:""};t.makeDisplayName=f;t.getDisplayName=function(e){return(0,o.default)(e,"displayName")?e.displayName:f(e)};var d=function(e){var t=[(0,o.default)(e,"name.familyName",""),(0,o.default)(e,"name.givenName",""),u(e),s(e)].join("").trim().toLowerCase();return 0===t.length?null:t};t.makeDefaultSortIndexValue=d;var p=function(e){var t=(0,o.default)(e,"indexes.byFamilyNameGivenNameEmailCozyUrl",null);return null!==t?(0,i.default)(t)?null:t:d(e)};t.getDefaultSortIndexValue=p;t.getIndexByFamilyNameGivenNameEmailCozyUrl=function(e){return console.warn("Deprecation: `getIndexByFamilyNameGivenNameEmailCozyUrl` is deprecated, please use `getDefaultSortIndexValue` instead"),p(e)}},function(e,t,n){var r=n(159),o=n(66),i=n(86),a=n(26),u=n(47),c=n(87),s=n(115),l=n(114),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){"use strict";var r=n(20);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Qualification",{enumerable:!0,get:function(){return o.Qualification}}),Object.defineProperty(t,"setQualification",{enumerable:!0,get:function(){return o.setQualification}}),Object.defineProperty(t,"getQualification",{enumerable:!0,get:function(){return o.getQualification}}),t.helpers=t.themes=t.locales=void 0;var o=n(197),i=r(n(615));t.locales=i;var a=r(n(315));t.themes=a;var u=r(n(663));t.helpers=u},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundT=void 0;for(var o=r(n(616)),i={},a=0,u=["fr","en"];a<u.length;a++){var c=u[a],s={};try{s=n(660)("./".concat(c,".json"))}catch(e){}var l=new o.default;l.extend(s),i[c]=l}t.getBoundT=function(e){var t=i[e]||i.en;return t.t.bind(t)}},function(e,t,n){"use strict";var r=n(617),o=n(654),i=n(37),a=n(167),u=n(657),c=function(e){i(!1,e)},s=String.prototype.replace,l=String.prototype.split,f=function(e){var t=e%100,n=t%10;return 11!==t&&1===n?0:2<=n&&n<=4&&!(t>=12&&t<=14)?1:2},d={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:f,chinese:function(){return 0},croatian:f,french:function(e){return e>=2?1:0},german:function(e){return 1!==e?1:0},russian:f,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3}},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 p(e,t){var n,i,a=(n=e.pluralTypeToLanguages,i={},r(o(n),(function(e){var t=e[0],n=e[1];r(n,(function(e){i[e]=t}))})),i);return a[t]||a[l.call(t,/-/,1)[0]]||a.en}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var m,y=(m={},function(e,t){var n=m[t];return n&&!e.pluralTypes[n]&&(n=null,m[t]=n),n||(n=p(e,t))&&(m[t]=n),n}),v=/%\{(.*?)\}/g;function g(e,t,n,r,o){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var i=e,c=r||v,f="number"==typeof t?{smart_count:t}:t;if(null!=f.smart_count&&e){var p=o||d,h=l.call(e,"||||"),m=function(e,t,n){return e.pluralTypes[t](n)}(p,y(p,n||"en"),f.smart_count);i=u(h[m]||h[0])}return i=s.call(i,c,(function(e,t){return a(f,t)&&null!=f[t]?f[t]:e}))}function b(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?g:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||c,this.tokenRegex=function(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if("||||"===t||"||||"===n)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(h(t)+"(.*?)"+h(n),"g")}(t.interpolation),this.pluralRules=t.pluralRules||d}b.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},b.prototype.extend=function(e,t){r(o(e||{}),(function(e){var n=e[0],r=e[1],o=t?t+"."+n:n;"object"==typeof r?this.extend(r,o):this.phrases[o]=r}),this)},b.prototype.unset=function(e,t){"string"==typeof e?delete this.phrases[e]:r(o(e||{}),(function(e){var n=e[0],r=e[1],o=t?t+"."+n:n;"object"==typeof r?this.unset(r,o):delete this.phrases[o]}),this)},b.prototype.clear=function(){this.phrases={}},b.prototype.replace=function(e){this.clear(),this.extend(e)},b.prototype.t=function(e,t){var n,r,o=null==t?{}:t;if("string"==typeof this.phrases[e])n=this.phrases[e];else if("string"==typeof o._)n=o._;else if(this.onMissingKey){r=(0,this.onMissingKey)(e,o,this.currentLocale,this.tokenRegex,this.pluralRules)}else this.warn('Missing translation for key: "'+e+'"'),r=e;return"string"==typeof n&&(r=g(n,o,this.currentLocale,this.tokenRegex,this.pluralRules)),r},b.prototype.has=function(e){return a(this.phrases,e)},b.transformPhrase=function(e,t,n){return g(e,t,n)},e.exports=b},function(e,t,n){"use strict";var r=n(49),o=n(99),i=n(62),a=n(304),u=n(305),c=n(309),s=c(),l=n(653),f=i("Array.prototype.slice"),d=o.apply(s),p=function(e,t){return a(e),d(e,f(arguments,1))};r(p,{getPolyfill:c,implementation:u,shim:l}),e.exports=p},function(e,t,n){"use strict";var r=n(27)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(27),o=n(62),i=r("%TypeError%"),a=n(620),u=r("%Reflect.apply%",!0)||o("%Function.prototype.apply%");e.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!a(n))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return u(e,t,n)}},function(e,t,n){"use strict";var r=n(27)("%Array%"),o=!r.isArray&&n(62)("Object.prototype.toString");e.exports=r.isArray||function(e){return"[object Array]"===o(e)}},function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=u&&c&&"function"==typeof c.get?c.get:null,l=u&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,g=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,C=RegExp.prototype.test,k=Array.prototype.concat,S=Array.prototype.join,_=Array.prototype.slice,A=Math.floor,O="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,j="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,z=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||C.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var o=String(r),i=g.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var D=n(622).custom,R=D&&L(D)?D:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function M(e){return b.call(String(e),/"/g,""")}function N(e){return!("[object Array]"!==G(e)||P&&"object"==typeof e&&P in e)}function L(e){if(j)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!B)return!1;try{return B.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var u=n||{};if($(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!$(u,"customInspect")||u.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=u.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(g.call(t,0,n.maxStringLength),n)+o}return F(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",n)}(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?I(t,w):w}if("bigint"==typeof t){var C=String(t)+"n";return m?I(t,C):C}var A=void 0===u.depth?5:u.depth;if(void 0===r&&(r=0),r>=A&&A>0&&"object"==typeof t)return N(t)?"[Array]":"[Object]";var E=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(u,r);if(void 0===o)o=[];else if(q(o,t)>=0)return"[Circular]";function D(t,n,i){if(n&&(o=_.call(o)).push(n),i){var a={depth:u.depth};return $(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,o)}return e(t,u,r+1,o)}if("function"==typeof t){var U=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Y(t,D);return"[Function"+(U?": "+U:" (anonymous)")+"]"+(K.length>0?" { "+S.call(K,", ")+" }":"")}if(L(t)){var Z=j?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(t);return"object"!=typeof t||j?Z:H(Z)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var X="<"+x.call(String(t.nodeName)),ee=t.attributes||[],te=0;te<ee.length;te++)X+=" "+ee[te].name+"="+F(M(ee[te].value),"double",u);return X+=">",t.childNodes&&t.childNodes.length&&(X+="..."),X+="</"+x.call(String(t.nodeName))+">"}if(N(t)){if(0===t.length)return"[]";var ne=Y(t,D);return E&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ne)?"["+V(ne,E)+"]":"[ "+S.call(ne,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||P&&"object"==typeof e&&P in e)}(t)){var re=Y(t,D);return"cause"in t&&!T.call(t,"cause")?"{ ["+String(t)+"] "+S.call(k.call("[cause]: "+D(t.cause),re),", ")+" }":0===re.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(re,", ")+" }"}if("object"==typeof t&&c){if(R&&"function"==typeof t[R])return t[R]();if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var oe=[];return a.call(t,(function(e,n){oe.push(D(n,t,!0)+" => "+D(e,t))})),Q("Map",i.call(t),oe,E)}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ie=[];return l.call(t,(function(e){ie.push(D(e,t))})),Q("Set",s.call(t),ie,E)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return W("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return W("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return W("WeakRef");if(function(e){return!("[object Number]"!==G(e)||P&&"object"==typeof e&&P in e)}(t))return H(D(Number(t)));if(function(e){if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}(t))return H(D(O.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||P&&"object"==typeof e&&P in e)}(t))return H(h.call(t));if(function(e){return!("[object String]"!==G(e)||P&&"object"==typeof e&&P in e)}(t))return H(D(String(t)));if(!function(e){return!("[object Date]"!==G(e)||P&&"object"==typeof e&&P in e)}(t)&&!function(e){return!("[object RegExp]"!==G(e)||P&&"object"==typeof e&&P in e)}(t)){var ae=Y(t,D),ue=z?z(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",se=!ue&&P&&Object(t)===t&&P in t?g.call(G(t),8,-1):ce?"Object":"",le=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(se||ce?"["+S.call(k.call([],se||[],ce||[]),": ")+"] ":"");return 0===ae.length?le+"{}":E?le+"{"+V(ae,E)+"}":le+"{ "+S.call(ae,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function $(e,t){return U.call(e,t)}function G(e){return m.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function J(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function H(e){return"Object("+e+")"}function W(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?V(n,r):S.call(n,", "))+"}"}function V(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function Y(e,t){var n=N(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=$(e,o)?t(e[o],e):""}var i,a="function"==typeof E?E(e):[];if(j){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)$(e,c)&&(n&&String(Number(c))===c&&c<e.length||j&&i["$"+c]instanceof Symbol||(C.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof E)for(var s=0;s<a.length;s++)T.call(e,a[s])&&r.push("["+t(a[s])+"]: "+t(e[a[s]],e));return r}},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},function(e,t,n){"use strict";var r=n(27)("%TypeError%"),o=n(307),i=n(198);e.exports=function(e,t){if("Object"!==i(e))throw new r("Assertion failed: `O` must be an Object");if(!o(t))throw new r("Assertion failed: `P` must be a Property Key");return t in e}},function(e,t,n){"use strict";e.exports=n(626)},function(e,t,n){"use strict";var r,o,i=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw o}}),o={},a((function(){throw 42}),null,r)}catch(e){e!==o&&(a=null)}else a=null;var u=/^\s*class\b/,c=function(e){try{var t=i.call(e);return u.test(t)}catch(e){return!1}},s=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,f="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};e.exports=a?function(e){if(e===f)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{a(e,null,r)}catch(e){if(e!==o)return!1}return!c(e)}:function(e){if(e===f)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(l)return function(e){try{return!c(e)&&(i.call(e),!0)}catch(e){return!1}}(e);if(c(e))return!1;var t=s.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},function(e,t,n){"use strict";var r=n(27)("%TypeError%"),o=n(306),i=n(628),a=n(198);e.exports=function(e){if("Object"!==a(e))throw new r("Assertion failed: `obj` must be an Object");return i(o(e,"length"))}},function(e,t,n){"use strict";var r=n(629),o=n(630);e.exports=function(e){var t=o(e);return t<=0?0:t>r?r:t}},function(e,t,n){"use strict";var r=n(27),o=r("%Math%"),i=r("%Number%");e.exports=i.MAX_SAFE_INTEGER||o.pow(2,53)-1},function(e,t,n){"use strict";var r=n(631),o=n(640);e.exports=function(e){var t=o(e);return 0!==t&&(t=r(t)),0===t?0:t}},function(e,t,n){"use strict";var r=n(632),o=n(633),i=n(634),a=n(637),u=n(638),c=n(639);e.exports=function(e){var t=i(e);return a(t)?0:0!==t&&u(t)?c(t)*o(r(t)):t}},function(e,t,n){"use strict";var r=n(27)("%Math.abs%");e.exports=function(e){return r(e)}},function(e,t,n){"use strict";var r=Math.floor;e.exports=function(e){return r(e)}},function(e,t,n){"use strict";var r=n(635);e.exports=function(e){var t=r(e,Number);if("string"!=typeof t)return+t;var n=t.replace(/^[ \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\u0085]+|[ \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\u0085]+$/g,"");return/^0[ob]|^[+-]0x/.test(n)?NaN:+n}},function(e,t,n){"use strict";e.exports=n(636)},function(e,t,n){"use strict";var r=Object.prototype.toString,o=n(308),i=n(166),a=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===r.call(e)?String:Number)===String||t===Number){var n,a,u=t===String?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<u.length;++a)if(i(e[u[a]])&&(n=e[u[a]](),o(n)))return n;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};e.exports=function(e){return o(e)?e:arguments.length>1?a(e,arguments[1]):a(e)}},function(e,t,n){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},function(e,t,n){"use strict";var r=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},function(e,t,n){"use strict";e.exports=function(e){return e>=0?1:-1}},function(e,t,n){"use strict";var r=n(27),o=r("%TypeError%"),i=r("%Number%"),a=r("%RegExp%"),u=r("%parseInt%"),c=n(62),s=n(641),l=n(642),f=c("String.prototype.slice"),d=s(/^0b[01]+$/i),p=s(/^0o[0-7]+$/i),h=s(/^[-+]0x[0-9a-f]+$/i),m=s(new a("["+["
","",""].join("")+"]","g")),y=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),v=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),g=c("String.prototype.replace"),b=n(643);e.exports=function e(t){var n=l(t)?t:b(t,i);if("symbol"==typeof n)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof n)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");if("string"==typeof n){if(d(n))return e(u(f(n,2),2));if(p(n))return e(u(f(n,2),8));if(m(n)||h(n))return NaN;var r=function(e){return g(e,v,"")}(n);if(r!==n)return e(r)}return i(n)}},function(e,t,n){"use strict";var r=n(27)("RegExp.prototype.test"),o=n(99);e.exports=function(e){return o(r,e)}},function(e,t,n){"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},function(e,t,n){"use strict";var r=n(644);e.exports=function(e){return arguments.length>1?r(e,arguments[1]):r(e)}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=n(308),i=n(166),a=n(645),u=n(646),c=function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,r,a,u="string"===t?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<u.length;++a)if(n=e[u[a]],i(n)&&(r=n.call(e),o(r)))return r;throw new TypeError("No default value")},s=function(e,t){var n=e[t];if(null!=n){if(!i(n))throw new TypeError(n+" returned for property "+t+" of object "+e+" is not a function");return n}};e.exports=function(e){if(o(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),r&&(Symbol.toPrimitive?t=s(e,Symbol.toPrimitive):u(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var i=t.call(e,n);if(o(i))return i;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(a(e)||u(e))&&(n="string"),c(e,"default"===n?"number":n)}},function(e,t,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object Date]"===o.call(e))}},function(e,t,n){"use strict";var r=Object.prototype.toString;if(n(168)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==r.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&i.test(o.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},function(e,t,n){"use strict";var r=n(27)("%Object%"),o=n(304);e.exports=function(e){return o(e),r(e)}},function(e,t,n){"use strict";var r=n(27),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){"use strict";var r=String.prototype.valueOf,o=Object.prototype.toString,i=n(650)();e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(i?function(e){try{return r.call(e),!0}catch(e){return!1}}(e):"[object String]"===o.call(e))}},function(e,t,n){"use strict";var r=n(651);e.exports=function(){return r()&&!!Symbol.toStringTag}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t){e.exports=function(e){var t=!0,n=!0,r=!1;if("function"==typeof e){try{e.call("f",(function(e,n,r){"object"!=typeof r&&(t=!1)})),e.call([null],(function(){"use strict";n="string"==typeof this}),"x")}catch(e){r=!0}return!r&&t&&n}return!1}},function(e,t,n){"use strict";var r=n(49),o=n(309);e.exports=function(){var e=o();return r(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e}},function(e,t,n){"use strict";var r=n(49),o=n(99),i=n(310),a=n(312),u=n(656),c=o(a(),Object);r(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(27)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(312),o=n(49);e.exports=function(){var e=r();return o(Object,{entries:e},{entries:function(){return Object.entries!==e}}),e}},function(e,t,n){"use strict";var r=n(99),o=n(49),i=n(313),a=n(314),u=n(659),c=r(a());o(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(27),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){"use strict";var r=n(49),o=n(314);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){var r={"./en.json":661,"./fr.json":662};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=660},function(e){e.exports=JSON.parse('{"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":{"identity":"Identity","family":"Family","work_study":"Work & Study","health":"Health","home":"Home","transport":"Transport","invoice":"Invoice","others":"Others","identity_photo":"Identity photo","national_id_card":"ID card","passport":"Passeport","residence_permit":"Residence permit","family_record_book":"Family record book","birth_certificate":"Birth certificate","citizen_registration_certificate":"Certificate of citizen registration","driver_license":"Driving license","other_identity_document":"Other document of identity","wedding":"Wedding contract","pacs":"Civil union","divorce":"Divorce","large_family_card":" Large Family Card","caf":"Social benefit rate","payment_proof_family_allowance":"family allowance payment proof","other_family_document":"Other family document","diploma":"Diploma","work_contract":"Work contract","pay_sheet":"Pay sheet","unemployment_benefit":"Unemployment benefit","pension":"Pension","other_revenue":"Other revenues","gradebook":"Gradebook","student_card":"Student card","school_attendance_certificate":"Certificate of school attendance","resume":"Resume","motivation_letter":"Motivation letter","other_work_document":"Other work document","health_book":"Health book","health_certificate":"Health/Vaccination certificate","disability_recognition":"Recognition of disability","pregnancy_medical_certificate":"Certificate of pregnancy","national_health_insurance_card":"National health insurance card","national_health_insurance_right_certificate":"National health insurance right certificate","health_insurance_card":"Insurance card","prescription":"Prescription","health_invoice":"Health invoice","other_health_document":"Other health document","vehicle_registration":"Vehicle registration","car_insurance":"Car insurance certificate","mechanic_invoice":"Repair bill","transport_invoice":"Transport invoice","other_transport_document":"Other transport document","phone_invoice":"Phone invoice","isp_invoice":"ISP invoice","telecom_invoice":"Telecom invoice","energy_invoice":"Energy invoice","water_invoice":"Water invoice","web_service_invoice":"Web service invoice","appliance_invoice":"Appliance invoice","restaurant_invoice":"Restaurant invoice","house_sale_agreeement":"House sale agreement","building_permit":"Building permit","technical_diagnostic_record":"Technical diagnostic record","lease":"Lease","house_insurance":"Home insurance","unfit_for_habitation_declaration":"Declaration of unfit for habitation","rent_receipt":"Rent receipt","accommodation_proof":"Proof of accommodation","work_quote":"Work quote","work_invoice":"Work invoice","other_house_document":"Other house document","tax_return":"Tax return","tax_notice":"Tax notice","tax_timetable":"Payment Plans Installment Agreements","receipt":"Receipt","other_tax_document":"Other tax document","bank_details":"IBAN","bank_statement":"Bank statement","loan_agreement":"Loan agreement","other_bank_document":"Other banking document","invoices":"Invoices","personal_sporting_licence":"Sporting licence","other_invoice":"Other invoice","other_activity_document":"Other sports document"},"themes":{"identity":"Identity","family":"Family","work_study":"Work & Study","health":"Health","home":"Home","transport":"Transport","invoice":"Invoice","others":"Others","undefined":"Undefined","finance":"Finance","activity":"Activities"}}}')},function(e){e.exports=JSON.parse('{"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":{"identity":"Identité","family":"Famille","work_study":"Travail & Études","health":"Santé","home":"Logement","transport":"Transport","invoice":"Factures","others":"Autres","identity_photo":"Photo d\'identité","national_id_card":"Carte d\'identité","passport":"Passeport","residence_permit":"Titre de séjour","family_record_book":"Livret de famille","birth_certificate":"Certificat de naissance","citizen_registration_certificate":"Attestation de recensement citoyen","driver_license":"Permis","other_identity_document":"Autre document d\'identité","wedding":"Contrat de mariage","pacs":"Attestation de PACS","divorce":"Attestation de divorce","large_family_card":"Carte famille nombreuse","caf":"Attestation de quotient familial (CAF)","payment_proof_family_allowance":"Attestation de paiement CAF","other_family_document":"Autre document de famille","diploma":"Diplôme","work_contract":"Contrat de travail","pay_sheet":"Fiche de paie","unemployment_benefit":"Allocations chômage","pension":"Retraite","other_revenue":"Autres revenues","gradebook":"Bulletin de notes","student_card":"Carte d\'étudiant","school_attendance_certificate":"Certificat de scolarité","resume":"CV","motivation_letter":"Lettre de motivation","other_work_document":"Autre document de travail","health_book":"Carnet de santé","health_certificate":"Certificat de santé/vaccination","work_disability_recognition":"Reconnaissance de handicap - RQTH","pregnancy_medical_certificate":"Certificat de grossesse","national_health_insurance_card":"Carte vitale","national_health_insurance_right_certificate":"Attestation de droits de l\'Assurance Maladie (vitale)","health_insurance_card":"Carte de mutuelle","prescription":"Ordonnance","health_invoice":"Facture médicale","other_health_document":"Autre document de santé","vehicle_registration":"Carte grise","car_insurance":"Attestation d\'assurance auto","mechanic_invoice":"Facture de réparation","transport_invoice":"Facture de transport","other_transport_document":"Autre document de transport","phone_invoice":"Facture de téléphone","isp_invoice":"Facture d\'internet","telecom_invoice":"Facture de télécom","energy_invoice":"Facture d\'électricité","water_invoice":"Facture d\'eau","web_service_invoice":"Facture de service web","appliance_invoice":"Facture d\'électroménager","restaurant_invoice":"Facture de restaurant","house_sale_agreeement":"Compromis de vente","building_permit":"Permis de construire","technical_diagnostic_record":"Dossier de diagnostic technique","lease":"Bail","unfit_for_habitation_declaration":"Arrêté d\'insalubrité","house_insurance":"Assurance logement","rent_receipt":"Quittance de loyer","accommodation_proof":"Attestation d\'hébergement","work_quote":"Devis de travaux","work_invoice":"Facture de travaux","other_house_document":"Autre document de logement","tax_return":"Impôts - Déclaration de revenus","tax_notice":"Impôts - Avis d\'imposition","tax_timetable":"Impôts - Echéancier","receipt":"Accusé de réception","other_tax_document":"Impôts - Autre document","bank_details":"IBAN","bank_statement":"Relevé de compte","loan_agreement":"Contrat de prêt","other_bank_document":"Autre document bancaire","invoices":"Factures","personal_sporting_licence":"Licences sportives","other_invoice":"Autre facture","other_activity_document":"Autre document sportif"},"themes":{"identity":"Identité","family":"Famille","work_study":"Travail & Études","health":"Santé","home":"Logement","transport":"Transport","invoice":"Factures","others":"Autres","undefined":"Indéfini","finance":"Finances","activity":"Activités & loisirs"}}}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getThemeByItem=void 0;n(22);var r=n(315);t.getThemeByItem=function(e){var t=function(e){return r.themesList.find((function(t){return t.defaultItems&&t.defaultItems.includes(e.label)}))}(e);return t||r.themesList.find((function(t){return t.items.some((function(t){return t.label===e.label}))}))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchTimeSeriesByIntervalAndSource=t.saveTimeSeries=void 0;var o=r(n(7)),i=r(n(9)),a=n(21),u=(n(22),function(e){if(!e.startDate||!e.endDate)throw new Error("You must specify a startDate and endDate for the time serie");if(!Date.parse(e.startDate)||!Date.parse(e.endDate))throw new Error("Invalid date format for the time serie");if(!e.dataType)throw new Error("You must specify a dataType for the time serie");if(!e.series||!Array.isArray(e.series))throw new Error("You must specify a series array for the time serie")}),c=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,a,c,s,l,f,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.dataType,i=n.series,a=n.startDate,c=n.endDate,s=n.source,l=n.theme,u({dataType:r,series:i,startDate:a,endDate:c,source:s}),f="io.cozy.timeseries.".concat(r),d={_type:f,startDate:a,endDate:c,source:s,theme:l,series:i},e.abrupt("return",t.save(d));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.saveTimeSeries=c;var s=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,s,l,f;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.startDate,i=n.endDate,u=n.dataType,c=n.source,s=n.limit,l="io.cozy.timeseries.".concat(u),f=(0,a.Q)(l).where({source:c,startDate:{$gte:r},endDate:{$lte:i}}).indexFields(["source","startDate","endDate"]).sortBy([{source:"desc"},{startDate:"desc"},{endDate:"desc"}]).limitBy(s||5),e.abrupt("return",t.query(f));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.fetchTimeSeriesByIntervalAndSource=s},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.createMockClient=void 0;var o=r(n(19)),i=r(n(2)),a=r(n(17)),u=r(n(41)),c=n(60),s=n(256),l=n(21);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var d=function(e,t,n){var r=n.definition,o=n.doctype,u=n.data,d=(0,a.default)(n,["definition","doctype","data"]);e.store.dispatch((0,c.initQuery)(t,r||(0,l.Q)(o))),e.store.dispatch((0,c.receiveQueryResult)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({data:u?u.map((function(e){return(0,s.normalizeDoc)(e,o)})):u},d)))};t.createMockClient=function(e){var t,n=e.queries,r=e.remote,i=e.clientOptions,a=new u.default(i||{});a.ensureStore();for(var c=0,s=Object.entries(n||{});c<s.length;c++){var l=(0,o.default)(s[c],2),f=l[0],p=l[1];d(a,f,p)}return a.query=jest.fn().mockImplementation((t=r,function(e){return t?t[e.doctype]?{data:t[e.doctype]}:{data:[]}:{data:null}})),a.save=jest.fn(),a.saveAll=jest.fn(),a.stackClient.fetchJSON=jest.fn(),a}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useAppLinkWithStoreFallback",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"useCapabilities",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"useFetchShortcut",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"useClient",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"useQuery",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"useAppsInMaintenance",{enumerable:!0,get:function(){return s.default}});var o=r(n(667)),i=r(n(668)),a=r(n(669)),u=r(n(128)),c=r(n(300)),s=r(n(670))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(19)),u=n(0),c=n(21),s=n(302),l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=(0,u.useState)("loading"),l=(0,a.default)(r,2),f=l[0],d=l[1],p=(0,u.useState)(!0),h=(0,a.default)(p,2),m=h[0],y=h[1],v=(0,u.useState)(null),g=(0,a.default)(v,2),b=g[0],w=g[1];return(0,u.useEffect)((function(){(function(){var r=(0,i.default)(o.default.mark((function r(){var i,a,u;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t.query((0,c.Q)("io.cozy.apps"));case 3:i=r.sent,a={slug:e},u=(0,s.isInstalled)(i.data,a),y(!!u),w(u?(0,s.getUrl)(u)+n:(0,s.getStoreURL)(i.data,a)),d("loaded"),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),d("errored");case 14:case"end":return r.stop()}}),r,null,[[0,11]])})));return function(){return r.apply(this,arguments)}})()()}),[t,e,n]),{fetchStatus:f,isInstalled:m,url:b}};t.default=l},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(19)),u=n(0),c=n(21),s=function(e){var t=(0,u.useState)(),n=(0,a.default)(t,2),r=n[0],s=n[1],l=(0,u.useState)("idle"),f=(0,a.default)(l,2),d=f[0],p=f[1];return(0,u.useEffect)((function(){(function(){var t=(0,i.default)(o.default.mark((function t(){var n;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p("loading"),t.prev=1,t.next=4,e.query((0,c.Q)("io.cozy.settings").getById("capabilities"));case 4:n=t.sent,s(n),p("loaded"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),p("failed");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(){return t.apply(this,arguments)}})()()}),[e]),{capabilities:r,fetchStatus:d}};t.default=s},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(19)),u=n(0),c=function(e,t){var n=(0,u.useState)(null),r=(0,a.default)(n,2),c=r[0],s=r[1],l=(0,u.useState)(null),f=(0,a.default)(l,2),d=f[0],p=f[1],h=(0,u.useState)("idle"),m=(0,a.default)(h,2),y=m[0],v=m[1];return(0,u.useEffect)((function(){(function(){var n=(0,i.default)(o.default.mark((function n(){var r,i,a;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("loading"),n.prev=1,n.next=4,e.getStackClient().fetchJSON("GET","/shortcuts/".concat(t));case 4:r=n.sent,i=new URL(r.data.attributes.url),a="".concat(e.getStackClient().uri,"/bitwarden/icons/").concat(i.host,"/icon.png"),p(a),s(r),v("loaded"),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),v("failed");case 15:case"end":return n.stop()}}),n,null,[[1,12]])})));return function(){return n.apply(this,arguments)}})()()}),[e,t]),{shortcutInfos:c,shortcutImg:d,fetchStatus:y}};t.default=c},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7)),i=r(n(9)),a=r(n(19)),u=n(0),c=r(n(178)),s=(r(n(41)),n(22),function(e){var t=(0,u.useState)([]),n=(0,a.default)(t,2),r=n[0],s=n[1];return(0,u.useEffect)((function(){(function(){var t=(0,i.default)(o.default.mark((function t(){var n,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new c.default({client:e}),t.next=3,n.fetchAppsInMaintenance();case 3:r=t.sent,s(r||[]);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}})()()}),[e]),r});t.default=s},function(e,t,n){var r=n(34),o=n(672),i=n(265),a=Math.max,u=Math.min;e.exports=function(e,t,n){var c,s,l,f,d,p,h=0,m=!1,y=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=c,r=s;return c=s=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(x,t),m?g(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||y&&e-h>=l}function x(){var e=o();if(w(e))return C(e);d=setTimeout(x,function(e){var n=t-(e-p);return y?u(n,l-(e-h)):n}(e))}function C(e){return d=void 0,v&&c?g(e):(c=s=void 0,f)}function k(){var e=o(),n=w(e);if(c=arguments,s=this,p=e,n){if(void 0===d)return b(p);if(y)return clearTimeout(d),d=setTimeout(x,t),g(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,l=(y="maxWait"in n)?a(i(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=s=d=void 0},k.flush=function(){return void 0===d?f:C(o())},k}},function(e,t,n){var r=n(39);e.exports=function(){return r.Date.now()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=f(i),u=f(n(1)),c=f(n(674)),s=f(n(675)),l=n(683);function f(e){return e&&e.__esModule?e:{default:e}}var d=function(){return!0},p=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return h.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,c.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,i=n.highlightFirstSuggestion;if(!(0,c.default)(r,e.suggestions)&&r.length>0&&i)this.highlightFirstSuggestion();else if(o){var a=this.getHighlightedSuggestion();a!=t.highlightedSuggestion&&o({suggestion:a})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value;return t.length>0&&r(o)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,u=t.renderSuggestion,c=t.inputProps,f=t.multiSection,p=t.renderSectionTitle,h=t.id,m=t.getSectionSuggestions,y=t.theme,v=t.getSuggestionValue,g=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,w=this.state,x=w.isFocused,C=w.isCollapsed,k=w.highlightedSectionIndex,S=w.highlightedSuggestionIndex,_=w.valueBeforeUpDown,A=g?d:this.props.shouldRenderSuggestions,O=c.value,E=c.onFocus,B=c.onKeyDown,j=this.willRenderSuggestions(this.props),P=g||x&&!C&&j,T=P?n:[],z=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=A(O);e.setState({isFocused:!0,isCollapsed:!n}),E&&E(t),n&&i({value:O,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,o=A(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!o})),o?i({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(C)A(O)&&(i({value:O,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var a=r.newHighlightedSectionIndex,u=r.newHighlightedItemIndex,c=void 0;c=null===u?null===_?O:_:e.getSuggestionValueByIndex(a,u),e.updateHighlightedSuggestion(a,u,O),e.maybeCallOnChange(t,c,40===o?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var s=e.getHighlightedSuggestion();if(P&&!g&&e.closeSuggestions(),null!=s){var l=v(s);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:l,suggestionIndex:S,sectionIndex:k,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:P&&t.preventDefault();var f=P&&!g;if(null===_){if(!f){e.maybeCallOnChange(t,"","escape"),A("")?i({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,_,"escape");f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}B&&B(t)}}),I={query:this.getQuery()};return a.default.createElement(s.default,{multiSection:f,items:T,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:u,renderItemData:I,renderSectionTitle:p,getSectionItems:m,highlightedSectionIndex:k,highlightedItemIndex:S,inputProps:z,itemProps:this.itemProps,theme:(0,l.mapToAutowhateverTheme)(y),id:h,ref:this.storeAutowhateverRef})}}]),t}(i.Component);p.propTypes={suggestions:u.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:u.default.func,onSuggestionHighlighted:u.default.func,renderInputComponent:u.default.func,renderSuggestionsContainer:u.default.func,getSuggestionValue:u.default.func.isRequired,renderSuggestion:u.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:u.default.func,alwaysRenderSuggestions:u.default.bool,multiSection:u.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:u.default.bool,highlightFirstSuggestion:u.default.bool,theme:u.default.object,id:u.default.string},p.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return a.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:l.defaultTheme,id:"1"};var h=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,o=n.itemIndex;e.updateHighlightedSuggestion(r,o),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,a=r.onSuggestionsFetchRequested;i&&i(t,n),o?a({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=e.getSuggestionIndices(e.findSuggestionElement(t.target)),a=i.sectionIndex,u=i.suggestionIndex,c=e.getSuggestion(a,u),s=e.props.getSuggestionValue(c);e.maybeCallOnChange(t,s,"click"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:s,suggestionIndex:u,sectionIndex:a,method:"click"}),r||e.closeSuggestions(),!0===o?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,o=n.value,i=n.onBlur,a=e.getHighlightedSuggestion(),u=r(o);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!u}),i&&i(e.blurEvent,{highlightedSuggestion:a})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=p},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(676).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),u=p(a),c=p(n(1)),s=p(n(677)),l=p(n(678)),f=p(n(680)),d=p(n(681));function p(e){return e&&e.__esModule?e:{default:e}}var h={},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,i=t.highlightedSectionIndex,a=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var u="ArrowDown"===e.key?"next":"prev",c=n.sectionIterator[u]([i,a]),s=o(c,2),l=s[0],f=s[1];r.onKeyDown(e,{newHighlightedSectionIndex:l,newHighlightedItemIndex:f});break;default:r.onKeyDown(e,{highlightedSectionIndex:i,highlightedItemIndex:a})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,s.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,l.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,o=n.items,i=n.renderItem,a=n.renderItemData,c=n.renderSectionTitle,s=n.highlightedSectionIndex,l=n.highlightedItemIndex,p=n.itemProps;return o.map((function(n,o){var h="react-autowhatever-"+r+"-",m=h+"section-"+o+"-",y=0===o;return u.default.createElement("div",t(m+"container","sectionContainer",y&&"sectionContainerFirst"),u.default.createElement(f.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:m}),u.default.createElement(d.default,{items:e.sectionsItems[o],itemProps:p,renderItem:i,renderItemData:a,sectionIndex:o,highlightedItemIndex:s===o?l:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:h,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,o=n.renderItem,i=n.renderItemData,a=n.highlightedSectionIndex,c=n.highlightedItemIndex,s=n.itemProps;return u.default.createElement(d.default,{items:e,itemProps:s,renderItem:o,renderItemData:i,highlightedItemIndex:null===a?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,a=t.renderItemsContainer,c=t.highlightedSectionIndex,s=t.highlightedItemIndex,l=this.state.isInputFocused,f=o?this.renderSections():this.renderItems(),d=null!==f,p=this.getItemId(c,s),h="react-autowhatever-"+n,m=r({role:"combobox","aria-haspopup":"listbox","aria-owns":h,"aria-expanded":d},e("react-autowhatever-"+n+"-container","container",d&&"containerOpen"),this.props.containerProps),y=i(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":h,"aria-activedescendant":p},e("react-autowhatever-"+n+"-input","input",d&&"inputOpen",l&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),v=a({containerProps:r({id:h,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",d&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:f});return u.default.createElement("div",m,y,v)}}]),t}(a.Component);m.propTypes={id:c.default.string,multiSection:c.default.bool,renderInputComponent:c.default.func,renderItemsContainer:c.default.func,items:c.default.array.isRequired,renderItem:c.default.func,renderItemData:c.default.object,renderSectionTitle:c.default.func,getSectionItems:c.default.func,containerProps:c.default.object,inputProps:c.default.object,itemProps:c.default.oneOfType([c.default.object,c.default.func]),highlightedSectionIndex:c.default.number,highlightedItemIndex:c.default.number,theme:c.default.oneOfType([c.default.object,c.default.array])},m.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return u.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return u.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:h,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:h,inputProps:h,itemProps:h,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=m},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function o(e){var o=r(e,2),i=o[0],a=o[1];return n?null===a||a===t[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(i))?[null,null]:[i,0]:[i,a+1]:0===t||a===t-1?[null,null]:null===a?[null,0]:[null,a+1]}return{next:o,prev:function(e){var o=r(e,2),i=o[0],a=o[1];return n?null===a||0===a?null===(i=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,t[i]-1]:[i,a-1]:0===t||0===a?[null,null]:null===a?[null,t-1]:[null,a-1]},isLast:function(e){return null===o(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i,a=n(679),u=(i=a)&&i.__esModule?i:{default:i},c=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),i=n[0],a=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var s=n.map((function(e){return i[e]})).filter(c);return"string"==typeof s[0]||"function"==typeof a?{key:e,className:a?a.apply(void 0,o(s)):s.join(" ")}:{key:e,style:u.default.apply(void 0,[{}].concat(o(s)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function i(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,a=o(e),u=1;u<arguments.length;u++){n=arguments[u],r=i(Object(n));for(var c=0;c<r.length;c++)a[r[c]]=n[r[c]]}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=c(o),a=c(n(1)),u=c(n(199));function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){return s(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,o=e.sectionKeyPrefix,a=n(t);return a?i.default.createElement("div",r(o+"title","sectionTitle"),a):null}}]),t}(o.Component);f.propTypes={section:a.default.any.isRequired,renderSectionTitle:a.default.func.isRequired,theme:a.default.func.isRequired,sectionKeyPrefix:a.default.string.isRequired},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=l(i),u=l(n(1)),c=l(n(682)),s=l(n(199));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,i=t.renderItem,u=t.renderItemData,s=t.sectionIndex,l=t.highlightedItemIndex,f=t.getItemId,d=t.theme,p=t.keyPrefix,h=null===s?p:p+"section-"+s+"-",m="function"==typeof o;return a.default.createElement("ul",r({role:"listbox"},d(h+"items-list","itemsList")),n.map((function(t,n){var p=0===n,y=n===l,v=h+"item-"+n,g=m?o({sectionIndex:s,itemIndex:n}):o,b=r({id:f(s,n),"aria-selected":y},d(v,"item",p&&"itemFirst",y&&"itemHighlighted"),g);return y&&(b.ref=e.storeHighlightedItemReference),a.default.createElement(c.default,r({},b,{sectionIndex:s,isHighlighted:y,itemIndex:n,item:t,renderItem:i,renderItemData:u}))})))}}]),t}(i.Component);p.propTypes={items:u.default.array.isRequired,itemProps:u.default.oneOfType([u.default.object,u.default.func]),renderItem:u.default.func.isRequired,renderItemData:u.default.object.isRequired,sectionIndex:u.default.number,highlightedItemIndex:u.default.number,onHighlightedItemChange:u.default.func.isRequired,getItemId:u.default.func.isRequired,theme:u.default.func.isRequired,keyPrefix:u.default.string.isRequired},p.defaultProps={sectionIndex:null},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=s(i),u=s(n(1)),c=s(n(199));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;l(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:o})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:o})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:o})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:o})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),a.default.createElement("li",r({role:"option"},u,{ref:this.storeItemReference}),o(n,r({isHighlighted:t},i)))}}]),t}(i.Component);d.propTypes={sectionIndex:u.default.number,isHighlighted:u.default.bool.isRequired,itemIndex:u.default.number.isRequired,item:u.default.any.isRequired,renderItem:u.default.func.isRequired,renderItemData:u.default.object.isRequired,onMouseEnter:u.default.func,onMouseLeave:u.default.func,onMouseDown:u.default.func,onClick:u.default.func},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var o=r(n(12)),i=r(n(2)),a=r(n(17)),u=r(n(0)),c=(r(n(1)),r(n(15))),s=(n(129),r(n(685))),l=n(742),f=function(e){return{root:{display:"block",margin:0},display4:e.typography.display4,display3:e.typography.display3,display2:e.typography.display2,display1:e.typography.display1,headline:e.typography.headline,title:e.typography.title,subheading:e.typography.subheading,body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},inline:{display:"inline"}}};t.styles=f;var d={display4:"h1",display3:"h2",display2:"h3",display1:"h4",headline:"h5",title:"h6",subheading:"subtitle1"};var p={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",display4:"h1",display3:"h1",display2:"h1",display1:"h1",headline:"h1",title:"h2",subheading:"h3"};function h(e){var t,n=e.align,r=e.classes,s=e.className,f=e.color,h=e.component,m=e.gutterBottom,y=e.headlineMapping,v=e.inline,g=(e.internalDeprecatedVariant,e.noWrap),b=e.paragraph,w=e.theme,x=e.variant,C=(0,a.default)(e,["align","classes","className","color","component","gutterBottom","headlineMapping","inline","internalDeprecatedVariant","noWrap","paragraph","theme","variant"]),k=function(e,t){var n=e.typography,r=t;return r||(r=n.useNextVariants?"body2":"body1"),n.useNextVariants&&(r=d[r]||r),r}(w,x),S=(0,c.default)(r.root,(t={},(0,i.default)(t,r[k],"inherit"!==k),(0,i.default)(t,r["color".concat((0,l.capitalize)(f))],"default"!==f),(0,i.default)(t,r.noWrap,g),(0,i.default)(t,r.gutterBottom,m),(0,i.default)(t,r.paragraph,b),(0,i.default)(t,r["align".concat((0,l.capitalize)(n))],"inherit"!==n),(0,i.default)(t,r.inline,v),t),s),_=h||(b?"p":y[k]||p[k])||"span";return u.default.createElement(_,(0,o.default)({className:S},C))}h.defaultProps={align:"inherit",color:"default",gutterBottom:!1,headlineMapping:p,inline:!1,noWrap:!1,paragraph:!1};var m=(0,s.default)(f,{name:"MuiTypography",withTheme:!0})(h);t.default=m},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.sheetsManager=void 0;var o=r(n(2)),i=r(n(12)),a=r(n(4)),u=r(n(6)),c=r(n(10)),s=r(n(5)),l=r(n(8)),f=r(n(17)),d=r(n(0)),p=r(n(1)),h=(r(n(37)),r(n(79))),m=n(129),y=n(321),v=r(n(703)),g=r(n(704)),b=r(n(718)),w=r(n(719)),x=r(n(720)),C=r(n(738)),k=r(n(739)),S=r(n(740)),_=r(n(741)),A=(0,y.create)((0,g.default)()),O=(0,k.default)(),E=-1e11,B=new Map;t.sheetsManager=B;var j={},P=(0,x.default)({typography:{suppressWarning:!0}});m.ponyfillGlobal.__MUI_STYLES__||(m.ponyfillGlobal.__MUI_STYLES__={}),m.ponyfillGlobal.__MUI_STYLES__.withStyles||(m.ponyfillGlobal.__MUI_STYLES__.withStyles=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,m=t.withTheme,y=void 0!==m&&m,g=t.flip,x=void 0===g?null:g,k=t.name,T=(0,f.default)(t,["withTheme","flip","name"]),z=(0,S.default)(e),I=z.themingEnabled||"string"==typeof k||y;E+=1,z.options.index=E;var D=function(e){function t(e,n){var r;(0,a.default)(this,t),(r=(0,c.default)(this,(0,s.default)(t).call(this,e,n))).jss=n[v.default.jss]||A,r.sheetsManager=B,r.unsubscribeId=null;var o=n.muiThemeProviderOptions;return o&&(o.sheetsManager&&(r.sheetsManager=o.sheetsManager),r.sheetsCache=o.sheetsCache,r.disableStylesGeneration=o.disableStylesGeneration),r.stylesCreatorSaved=z,r.sheetOptions=(0,i.default)({generateClassName:O},n[v.default.sheetOptions]),r.theme=I?C.default.initial(n)||P:j,r.attach(r.theme),r.cacheClasses={value:null,lastProp:null,lastJSS:{}},r}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){var e=this;I&&(this.unsubscribeId=C.default.subscribe(this.context,(function(t){var n=e.theme;e.theme=t,e.attach(e.theme),e.setState({},(function(){e.detach(n)}))})))}},{key:"componentDidUpdate",value:function(){this.stylesCreatorSaved}},{key:"componentWillUnmount",value:function(){this.detach(this.theme),null!==this.unsubscribeId&&C.default.unsubscribe(this.context,this.unsubscribeId)}},{key:"getClasses",value:function(){if(this.disableStylesGeneration)return this.props.classes||{};var e=!1,t=w.default.get(this.sheetsManager,this.stylesCreatorSaved,this.theme);return t.sheet.classes!==this.cacheClasses.lastJSS&&(this.cacheClasses.lastJSS=t.sheet.classes,e=!0),this.props.classes!==this.cacheClasses.lastProp&&(this.cacheClasses.lastProp=this.props.classes,e=!0),e&&(this.cacheClasses.value=(0,b.default)({baseClasses:this.cacheClasses.lastJSS,newClasses:this.props.classes,Component:n})),this.cacheClasses.value}},{key:"attach",value:function(e){if(!this.disableStylesGeneration){var t=this.stylesCreatorSaved,n=w.default.get(this.sheetsManager,t,e);if(n||(n={refs:0,sheet:null},w.default.set(this.sheetsManager,t,e,n)),0===n.refs){var r;this.sheetsCache&&(r=w.default.get(this.sheetsCache,t,e)),r||((r=this.createSheet(e)).attach(),this.sheetsCache&&w.default.set(this.sheetsCache,t,e,r)),n.sheet=r;var o=this.context[v.default.sheetsRegistry];o&&o.add(r)}n.refs+=1}}},{key:"createSheet",value:function(e){var t=this.stylesCreatorSaved.create(e,k),r=k;return this.jss.createStyleSheet(t,(0,i.default)({meta:r,classNamePrefix:r,flip:"boolean"==typeof x?x:"rtl"===e.direction,link:!1},this.sheetOptions,this.stylesCreatorSaved.options,{name:k||n.displayName},T))}},{key:"detach",value:function(e){if(!this.disableStylesGeneration){var t=w.default.get(this.sheetsManager,this.stylesCreatorSaved,e);if(t.refs-=1,0===t.refs){w.default.delete(this.sheetsManager,this.stylesCreatorSaved,e),this.jss.removeStyleSheet(t.sheet);var n=this.context[v.default.sheetsRegistry];n&&n.remove(t.sheet)}}}},{key:"render",value:function(){var e=this.props,t=(e.classes,e.innerRef),r=(0,f.default)(e,["classes","innerRef"]),o=(0,_.default)({theme:this.theme,name:k,props:r});return y&&!o.theme&&(o.theme=this.theme),d.default.createElement(n,(0,i.default)({},o,{classes:this.getClasses(),ref:t}))}}]),t}(d.default.Component);return D.contextTypes=(0,i.default)((r={muiThemeProviderOptions:p.default.object},(0,o.default)(r,v.default.jss,p.default.object),(0,o.default)(r,v.default.sheetOptions,p.default.object),(0,o.default)(r,v.default.sheetsRegistry,p.default.object),r),I?C.default.contextTypes:{}),(0,h.default)(D,n),D}});t.default=function(e,t){return m.ponyfillGlobal.__MUI_STYLES__.withStyles(e,(0,i.default)({defaultTheme:P},t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function e(t){var n=null;for(var o in t){var i=t[o],a=void 0===i?"undefined":r(i);if("function"===a)n||(n={}),n[o]=i;else if("object"===a&&null!==i&&!Array.isArray(i)){var u=e(i);u&&(n||(n={}),n[o]=u)}}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(73),a=(r=i)&&r.__esModule?r:{default:r};var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheets=[],this.refs=[],this.keys=[]}return o(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,o=this.keys,i=n.indexOf(t);return-1!==i?i:(n.push(t),r.push(0),o.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):(0,a.default)(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function e(t){if(null==t)return t;var n=void 0===t?"undefined":r(t);if("string"===n||"number"===n||"function"===n)return t;if(u(t))return t.map(e);if((0,a.default)(t))return t;var o={};for(var i in t){var c=t[i];"object"!==(void 0===c?"undefined":r(c))?o[i]=c:o[i]=e(c)}return o};var o,i=n(323),a=(o=i)&&o.__esModule?o:{default:o};var u=Array.isArray},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});e.CSS;t.default=function(e){return e}}).call(this,n(33))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n="2f1acc6c3a606b082e5eef5e54414ffb";null==e[n]&&(e[n]=0),t.default=e[n]++}).call(this,n(33))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=g(n(132)),u=g(n(326)),c=g(n(692)),s=g(n(693)),l=g(n(699)),f=g(n(700)),d=g(n(201)),p=g(n(74)),h=g(n(325)),m=g(n(131)),y=g(n(701)),v=g(n(702));function g(e){return e&&e.__esModule?e:{default:e}}var b=s.default.concat([l.default,f.default]),w=0,x=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=w++,this.version="9.8.7",this.plugins=new c.default,this.options={createGenerateClassName:h.default,Renderer:a.default?y.default:v.default,plugins:[]},this.generateClassName=(0,h.default)(),this.use.apply(this,b),this.setup(t)}return i(e,[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?v.default:y.default)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===d.default.index?0:d.default.index+1);var r=new u.default(e,o({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),d.default.remove(e),this}},{key:"createRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":r(e))&&(n=t,t=e,e=void 0);var o=n;o.jss=this,o.Renderer=this.options.Renderer,o.generateClassName||(o.generateClassName=this.generateClassName),o.classes||(o.classes={});var i=(0,m.default)(e,t,o);return!o.selector&&i instanceof p.default&&(i.selector="."+o.generateClassName(i)),this.plugins.onProcessRule(i),i}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))})),this}}]),e}();t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(73),a=(r=i)&&r.__esModule?r:{default:r};var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return o(e,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var o=this.hooks.onCreateRule[r](e,t,n);if(o)return o}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,o=0;o<this.hooks.onProcessStyle.length;o++)r=this.hooks.onProcessStyle[o](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,o=0;o<this.hooks.onChangeValue.length;o++)r=this.hooks.onChangeValue[o](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):(0,a.default)(!1,'[JSS] Unknown hook "%s".',t)}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(694)),o=c(n(695)),i=c(n(696)),a=c(n(697)),u=c(n(698));function c(e){return e&&e.__esModule?e:{default:e}}var s={"@charset":r.default,"@import":r.default,"@namespace":r.default,"@keyframes":o.default,"@media":i.default,"@supports":i.default,"@font-face":a.default,"@viewport":u.default,"@-ms-viewport":u.default},l=Object.keys(s).map((function(e){var t=new RegExp("^"+e),n=s[e];return{onCreateRule:function(e,r,o){return t.test(e)?new n(e,r,o):null}}}));t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=r}return r(e,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(100),u=(r=a)&&r.__esModule?r:{default:r};var c=function(){function e(t,n,r){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="keyframes",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new u.default(o({},r,{parent:this})),n)this.rules.add(i,n[i],o({},this.options,{parent:this,selector:i}));this.rules.process()}return i(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(100),u=(r=a)&&r.__esModule?r:{default:r};var c=function(){function e(t,n,r){for(var i in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="conditional",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new u.default(o({},r,{parent:this})),n)this.rules.add(i,n[i]);this.rules.process()}return i(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(200),a=(r=i)&&r.__esModule?r:{default:r};var u=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return o(e,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=(0,a.default)(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return(0,a.default)(this.key,this.style,e)}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(200),a=(r=i)&&r.__esModule?r:{default:r};var u=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type="viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return o(e,[{key:"toString",value:function(e){return(0,a.default)(this.key,this.style,e)}}]),e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(74)),o=a(n(131)),i=a(n(323));function a(e){return e&&e.__esModule?e:{default:e}}t.default={onCreateRule:function(e,t,n){if(!(0,i.default)(t))return null;var r=t,a=(0,o.default)(e,{},n);return r.subscribe((function(e){for(var t in e)a.prop(t,e[t])})),a},onProcessRule:function(e){if(e instanceof r.default){var t=e,n=t.style,o=function(e){var r=n[e];if(!(0,i.default)(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var a in n)o(a)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(100)),o=a(n(74)),i=a(n(131));function a(e){return e&&e.__esModule?e:{default:e}}var u=Date.now(),c="fnValues"+u,s="fnStyle"+ ++u;t.default={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=(0,i.default)(e,{},n);return r[s]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return(t=t)[c]=n,e},onUpdate:function(e,t){if(t.rules instanceof r.default)t.rules.update(e);else if(t instanceof o.default){if((t=t)[c])for(var n in t[c])t.prop(n,t[c][n](e));var i=(t=t)[s];if(i){var a=i(e);for(var u in a)t.prop(u,a[u])}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(73)),i=c(n(201)),a=c(n(74)),u=c(n(130));function c(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=void 0;return function(){return t||(t=e()),t}};function l(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function f(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=(0,u.default)(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function d(e,t){try{e.style.removeProperty(t)}catch(e){(0,o.default)(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}var p,h=1,m=7,y=(p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)},function(e){if(e.type===h)return e.selectorText;if(e.type===m){var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+p(n,n.indexOf("keyframes"))}return p(e.cssText)});function v(e,t){return e.selectorText=t,e.selectorText===t}var g,b,w=s((function(){return document.head||document.getElementsByTagName("head")[0]})),x=(g=void 0,b=!1,function(e){var t={};g||(g=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof a.default){var o=r.selector;if(o&&-1!==o.indexOf("\\")){b||(w().appendChild(g),b=!0),g.textContent=o+" {}";var i=g.sheet;if(i){var u=i.cssRules;u&&(t[u[0].selectorText]=r.key)}}}}return b&&(w().removeChild(g),b=!1),t});function C(e){var t=i.default.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&"string"==typeof r){var a=function(e){for(var t=w(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(a)return a.nextSibling;(0,o.default)("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return null}var k=s((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),S=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getPropertyValue=l,this.setProperty=f,this.removeProperty=d,this.setSelector=v,this.getKey=y,this.getUnescapedKeysMap=x,this.hasInsertedRules=!1,t&&i.default.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,o=n.meta,a=n.element;this.element=a||document.createElement("style"),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),o&&this.element.setAttribute("data-meta",o);var u=k();u&&this.element.setAttribute("nonce",u)}return r(e,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,r=C(t);if(r){var i=r.parentNode;i&&i.insertBefore(e,r)}else if(n&&"number"==typeof n.nodeType){var a=n,u=a.parentNode;u?u.insertBefore(e,a.nextSibling):(0,o.default)(!1,"[JSS] Insertion point is not in the DOM.")}else w().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,r=n.cssRules,i=e.toString();if(t||(t=r.length),!i)return!1;try{n.insertRule(i,t)}catch(t){return(0,o.default)(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),e}();t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={jss:"64a55d578f856d258dc345b094a2a2b3",sheetsRegistry:"d4bd0baacbc52bbd48bbb9eb24344ecd",sheetOptions:"6fc570d6bd61383819d0f9e7407c452d"};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(705)),i=r(n(706)),a=r(n(708)),u=r(n(710)),c=r(n(712)),s=r(n(717));var l=function(){return{plugins:[(0,o.default)(),(0,i.default)(),(0,a.default)(),(0,u.default)(),"undefined"==typeof window?null:(0,c.default)(),(0,s.default)()]}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(){return{onCreateRule:function(e,t,n){if("@global"===e)return new u(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new c(e,t,n);var r=n.parent;return r&&("global"!==r.type&&"global"!==r.options.parent.type||(n.global=!0)),n.global&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,o=n["@global"];if(!o)return;for(var i in o)t.sheet.addRule(i,o[i],r({},t,{selector:l(i,e.selector)}));delete n["@global"]}(e),function(e){var t=e.options,n=e.style;for(var o in n)if("@global"===o.substr(0,"@global".length)){var i=l(o.substr("@global".length),e.selector);t.sheet.addRule(i,n[o],r({},t,{selector:i})),delete n[o]}}(e))}}};var i=n(321);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=function(){function e(t,n,o){for(var u in a(this,e),this.type="global",this.key=t,this.options=o,this.rules=new i.RuleList(r({},o,{parent:this})),n)this.rules.add(u,n[u],{selector:u});this.rules.process()}return o(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"toString",value:function(){return this.rules.toString()}}]),e}(),c=function(){function e(t,n,o){a(this,e),this.name=t,this.options=o;var i=t.substr("@global ".length);this.rule=o.jss.createRule(i,n,r({},o,{parent:this,selector:i}))}return o(e,[{key:"toString",value:function(e){return this.rule.toString(e)}}]),e}(),s=/\s*,\s*/g;function l(e,t){for(var n=e.split(s),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(){function e(e){return function(t,n){var r=e.getRule(n);return r?r.selector:((0,a.default)(!1,"[JSS] Could not find the referenced rule %s in %s.",n,e.options.meta||e),n)}}var t=function(e){return-1!==e.indexOf("&")};function n(e,n){for(var r=n.split(u),o=e.split(u),i="",a=0;a<r.length;a++)for(var s=r[a],l=0;l<o.length;l++){var f=o[l];i&&(i+=", "),i+=t(f)?f.replace(c,s):s+" "+f}return i}function o(e,t,n){if(n)return r({},n,{index:n.index+1});var o=e.options.nestingLevel;return o=void 0===o?1:o+1,r({},e.options,{nestingLevel:o,index:t.indexOf(e)+1})}return{onProcessStyle:function(i,a){if("style"!==a.type)return i;var u=a.options.parent,c=void 0,l=void 0;for(var f in i){var d=t(f),p="@"===f[0];if(d||p){if(c=o(a,u,c),d){var h=n(f,a.selector);l||(l=e(u)),h=h.replace(s,l),u.addRule(h,i[f],r({},c,{selector:h}))}else p&&u.addRule(f,null,c).addRule(a.key,i[f],{selector:a.selector});delete i[f]}}return i}}};var o,i=n(707),a=(o=i)&&o.__esModule?o:{default:o};var u=/\s*,\s*/g,c=/&/g,s=/\$([\w-]+)/g},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=a(e[t]);return e}return a(e)},onChangeValue:function(e,t,n){var r=(0,i.default)(t);return t===r?e:(n.prop(r,e),null)}}};var r,o=n(709),i=(r=o)&&r.__esModule?r:{default:r};function a(e){var t={};for(var n in e)t[(0,i.default)(n)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(a):t.fallbacks=a(e.fallbacks)),t}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,o=/^ms-/,i={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(i.hasOwnProperty(e))return i[e];var t=e.replace(r,a);return i[e]=o.test(t)?"-"+t:t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=a(e);function n(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=c(r,e[r],t);return e}function r(e,n){return c(n,e,t)}return{onProcessStyle:n,onChangeValue:r}};var o,i=n(711);function a(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var u=a(((o=i)&&o.__esModule?o:{default:o}).default);function c(e,t,n){if(!t)return t;var o=t,i=void 0===t?"undefined":r(t);switch("object"===i&&Array.isArray(t)&&(i="array"),i){case"object":if("fallbacks"===e){for(var a in t)t[a]=c(a,t[a],n);break}for(var s in t)t[s]=c(e+"-"+s,t[s],n);break;case"array":for(var l=0;l<t.length;l++)t[l]=c(e,t[l],n);break;case"number":0!==t&&(o=t+(n[e]||u[e]||""))}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={"animation-delay":"ms","animation-duration":"ms","background-position":"px","background-position-x":"px","background-position-y":"px","background-size":"px",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-spacing":"px","border-top":"px","border-top-left-radius":"px","border-top-right-radius":"px","border-top-width":"px","border-width":"px","border-after-width":"px","border-before-width":"px","border-end-width":"px","border-horizontal-spacing":"px","border-start-width":"px","border-vertical-spacing":"px",bottom:"px","box-shadow":"px","column-gap":"px","column-rule":"px","column-rule-width":"px","column-width":"px","flex-basis":"px","font-size":"px","font-size-delta":"px",height:"px",left:"px","letter-spacing":"px","logical-height":"px","logical-width":"px",margin:"px","margin-after":"px","margin-before":"px","margin-bottom":"px","margin-left":"px","margin-right":"px","margin-top":"px","max-height":"px","max-width":"px","margin-end":"px","margin-start":"px","mask-position-x":"px","mask-position-y":"px","mask-size":"px","max-logical-height":"px","max-logical-width":"px","min-height":"px","min-width":"px","min-logical-height":"px","min-logical-width":"px",motion:"px","motion-offset":"px",outline:"px","outline-offset":"px","outline-width":"px",padding:"px","padding-bottom":"px","padding-left":"px","padding-right":"px","padding-top":"px","padding-after":"px","padding-before":"px","padding-end":"px","padding-start":"px","perspective-origin-x":"%","perspective-origin-y":"%",perspective:"px",right:"px","shape-margin":"px",size:"px","text-indent":"px","text-stroke":"px","text-stroke-width":"px",top:"px","transform-origin":"%","transform-origin-x":"%","transform-origin-y":"%","transform-origin-z":"%","transition-delay":"ms","transition-duration":"ms","vertical-align":"px",width:"px","word-spacing":"px","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"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{onProcessRule:function(e){"keyframes"===e.type&&(e.key="@"+r.prefix.css+e.key.substr(1))},onProcessStyle:function(e,t){if("style"!==t.type)return e;for(var n in e){var o=e[n],i=!1,a=r.supportedProperty(n);a&&a!==n&&(i=!0);var u=!1,c=r.supportedValue(a,o);c&&c!==o&&(u=!0),(i||u)&&(i&&delete e[n],e[a||n]=c||o)}return e},onChangeValue:function(e,t){return r.supportedValue(t,e)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(713))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportedValue=t.supportedProperty=t.prefix=void 0;var r=a(n(202)),o=a(n(714)),i=a(n(716));function a(e){return e&&e.__esModule?e:{default:e}}t.default={prefix:r.default,supportedProperty:o.default,supportedValue:i.default},
|
|
57
|
+
/**
|
|
58
|
+
* CSS Vendor prefix detection and property feature testing.
|
|
59
|
+
*
|
|
60
|
+
* @copyright Oleg Slobodskoi 2015
|
|
61
|
+
* @website https://github.com/jsstyles/css-vendor
|
|
62
|
+
* @license MIT
|
|
63
|
+
*/
|
|
64
|
+
t.prefix=r.default,t.supportedProperty=o.default,t.supportedValue=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!u)return e;if(null!=c[e])return c[e];(0,i.default)(e)in u.style?c[e]=e:o.default.js+(0,i.default)("-"+e)in u.style?c[e]=o.default.css+e:c[e]=!1;return c[e]};var r=a(n(132)),o=a(n(202)),i=a(n(715));function a(e){return e&&e.__esModule?e:{default:e}}var u=void 0,c={};if(r.default){u=document.createElement("p");var s=window.getComputedStyle(document.documentElement,"");for(var l in s)isNaN(l)||(c[s[l]]=s[l])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(r,o)};var r=/[-\s]+(.)?/g;function o(e,t){return t?t.toUpperCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!u)return t;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=e+t;if(null!=a[n])return a[n];try{u.style[e]=t}catch(e){return a[n]=!1,!1}""!==u.style[e]?a[n]=t:("-ms-flex"===(t=o.default.css+t)&&(t="-ms-flexbox"),u.style[e]=t,""!==u.style[e]&&(a[n]=t));a[n]||(a[n]=!1);return u.style[e]="",a[n]};var r=i(n(132)),o=i(n(202));function i(e){return e&&e.__esModule?e:{default:e}}var a={},u=void 0;r.default&&(u=document.createElement("p"))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){function e(e,t){return e.length-t.length}return{onProcessStyle:function(t,n){if("style"!==n.type)return t;var r={},o=Object.keys(t).sort(e);for(var i in o)r[o[i]]=t[o[i]];return r}}}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(12));r(n(37)),n(129);var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=(0,o.default)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;r(n(2));var o=r(n(12)),i=r(n(17)),a=r(n(133)),u=r(n(721)),c=(r(n(37)),r(n(723))),s=r(n(724)),l=r(n(725)),f=r(n(732)),d=r(n(733)),p=r(n(734)),h=r(n(735)),m=r(n(736)),y=r(n(737));var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,v=void 0===r?{}:r,g=e.palette,b=void 0===g?{}:g,w=e.shadows,x=e.spacing,C=void 0===x?{}:x,k=e.typography,S=void 0===k?{}:k,_=(0,i.default)(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),A=(0,l.default)(b),O=(0,c.default)(n),E=(0,o.default)({},h.default,C),B=(0,o.default)({breakpoints:O,direction:"ltr",mixins:(0,s.default)(O,E,v),overrides:{},palette:A,props:{},shadows:w||d.default,typography:(0,f.default)(A,S)},(0,a.default)({shape:p.default,spacing:E,transitions:m.default,zIndex:y.default},_,{isMergeableObject:u.default}));return B};t.default=v},function(e,t,n){"use strict";
|
|
65
|
+
/*!
|
|
66
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
69
|
+
* Released under the MIT License.
|
|
70
|
+
*/var r=n(722);function o(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==o(e)&&("function"==typeof(t=e.constructor)&&(!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){"use strict";
|
|
71
|
+
/*!
|
|
72
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
73
|
+
*
|
|
74
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
75
|
+
* Released under the MIT License.
|
|
76
|
+
*/e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,u=void 0===r?"px":r,c=e.step,s=void 0===c?5:c,l=(0,i.default)(e,["values","unit","step"]);function f(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(u,")")}function d(e,t){var r=a.indexOf(t)+1;return r===a.length?f(e):"@media (min-width:".concat(n[e]).concat(u,") and ")+"(max-width:".concat(n[a[r]]-s/100).concat(u,")")}return(0,o.default)({keys:a,values:n,up:f,down:function(e){var t=a.indexOf(e)+1,r=n[a[t]];return t===a.length?f("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-s/100).concat(u,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},l)},t.keys=void 0;var o=r(n(12)),i=r(n(17)),a=["xs","sm","md","lg","xl"];t.keys=a},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;return(0,i.default)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.default)({paddingLeft:2*t.unit,paddingRight:2*t.unit},n,(0,o.default)({},e.up("sm"),(0,i.default)({paddingLeft:3*t.unit,paddingRight:3*t.unit},n[e.up("sm")])))},toolbar:(r={minHeight:56},(0,o.default)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,o.default)(r,e.up("sm"),{minHeight:64}),r)},n)};var o=r(n(2)),i=r(n(12))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.primary,n=void 0===t?{light:u.default[300],main:u.default[500],dark:u.default[700]}:t,r=e.secondary,y=void 0===r?{light:c.default.A200,main:c.default.A400,dark:c.default.A700}:r,v=e.error,g=void 0===v?{light:l.default[300],main:l.default[500],dark:l.default[700]}:v,b=e.type,w=void 0===b?"light":b,x=e.contrastThreshold,C=void 0===x?3:x,k=e.tonalOffset,S=void 0===k?.2:k,_=(0,i.default)(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function A(e){return(0,d.getContrastRatio)(e,h.text.primary)>=C?h.text.primary:p.text.primary}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!e.main&&e[t]&&(e.main=e[t]),m(e,"light",n,S),m(e,"dark",r,S),e.contrastText||(e.contrastText=A(e.main)),e}O(n),O(y,"A400","A200","A700"),O(g);var E={dark:h,light:p};return(0,a.default)((0,o.default)({common:f.default,type:w,primary:n,secondary:y,error:g,grey:s.default,contrastThreshold:C,getContrastText:A,augmentColor:O,tonalOffset:S},E[w]),_,{clone:!1})},t.dark=t.light=void 0;var o=r(n(12)),i=r(n(17)),a=(r(n(37)),r(n(133))),u=r(n(726)),c=r(n(727)),s=r(n(728)),l=r(n(729)),f=r(n(730)),d=n(731),p={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:f.default.white,default:s.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}};t.light=p;var h={text:{primary:f.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:s.default[800],default:"#303030"},action:{active:f.default.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function m(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,d.lighten)(e.main,r):"dark"===t&&(e.dark=(0,d.darken)(e.main,1.5*r)))}t.dark=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={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"};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={black:"#000",white:"#fff"};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.convertHexToRGB=i,t.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=a(e).values;return t=t.map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})),"#".concat(t.join(""))},t.decomposeColor=a,t.recomposeColor=u,t.getContrastRatio=function(e,t){var n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.getLuminance=c,t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return c(e)>.5?s(e,t):l(e,t)},t.fade=function(e,t){if(!e)return e;e=a(e),t=o(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a");return e.values[3]=t,u(e)},t.darken=s,t.lighten=l;r(n(37));function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}function a(e){if("#"===e.charAt(0))return a(i(e));var t=e.indexOf("("),n=e.substring(0,t),r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function u(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")&&(n=n.map((function(e,t){return t<3?parseInt(e,10):e}))),-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e.type,"(").concat(n.join(", "),")")}function c(e){var t=a(e);if(-1!==t.type.indexOf("rgb")){var n=t.values.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}return t.values[2]/100}function s(e,t){if(!e)return e;if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function l(e,t){if(!e)return e;if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return u(e)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,l=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,f=n.fontSize,d=void 0===f?14:f,p=n.fontWeightLight,h=void 0===p?300:p,m=n.fontWeightRegular,y=void 0===m?400:m,v=n.fontWeightMedium,g=void 0===v?500:v,b=n.htmlFontSize,w=void 0===b?16:b,x=n.useNextVariants,C=void 0===x?Boolean(u.ponyfillGlobal.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__):x,k=(n.suppressWarning,n.allVariants),S=(0,i.default)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","htmlFontSize","useNextVariants","suppressWarning","allVariants"]);var _=d/14,A=function(e){return"".concat(e/w*_,"rem")},O=function(t,n,r,i,a){return(0,o.default)({color:e.text.primary,fontFamily:l,fontWeight:t,fontSize:A(n),lineHeight:r},'"Roboto", "Helvetica", "Arial", sans-serif'===l?{letterSpacing:"".concat(c(i/n),"em")}:{},a,k)},E={h1:O(h,96,1,-1.5),h2:O(h,60,1,-.5),h3:O(y,48,1.04,0),h4:O(y,34,1.17,.25),h5:O(y,24,1.33,0),h6:O(g,20,1.6,.15),subtitle1:O(y,16,1.75,.15),subtitle2:O(g,14,1.57,.1),body1Next:O(y,16,1.5,.15),body2Next:O(y,14,1.5,.15),buttonNext:O(g,14,1.75,.4,s),captionNext:O(y,12,1.66,.4),overline:O(y,12,2.66,1,s)},B={display4:(0,o.default)({fontSize:A(112),fontWeight:h,fontFamily:l,letterSpacing:"-.04em",lineHeight:"".concat(c(128/112),"em"),marginLeft:"-.04em",color:e.text.secondary},k),display3:(0,o.default)({fontSize:A(56),fontWeight:y,fontFamily:l,letterSpacing:"-.02em",lineHeight:"".concat(c(73/56),"em"),marginLeft:"-.02em",color:e.text.secondary},k),display2:(0,o.default)({fontSize:A(45),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(51/45),"em"),marginLeft:"-.02em",color:e.text.secondary},k),display1:(0,o.default)({fontSize:A(34),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(41/34),"em"),color:e.text.secondary},k),headline:(0,o.default)({fontSize:A(24),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(32.5/24),"em"),color:e.text.primary},k),title:(0,o.default)({fontSize:A(21),fontWeight:g,fontFamily:l,lineHeight:"".concat(c(24.5/21),"em"),color:e.text.primary},k),subheading:(0,o.default)({fontSize:A(16),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(1.5),"em"),color:e.text.primary},k),body2:(0,o.default)({fontSize:A(14),fontWeight:g,fontFamily:l,lineHeight:"".concat(c(24/14),"em"),color:e.text.primary},k),body1:(0,o.default)({fontSize:A(14),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(20.5/14),"em"),color:e.text.primary},k),caption:(0,o.default)({fontSize:A(12),fontWeight:y,fontFamily:l,lineHeight:"".concat(c(1.375),"em"),color:e.text.secondary},k),button:(0,o.default)({fontSize:A(14),textTransform:"uppercase",fontWeight:g,fontFamily:l,color:e.text.primary},k)};return(0,a.default)((0,o.default)({pxToRem:A,round:c,fontFamily:l,fontSize:d,fontWeightLight:h,fontWeightRegular:y,fontWeightMedium:g},B,E,C?{body1:E.body1Next,body2:E.body2Next,button:E.buttonNext,caption:E.captionNext}:{},{useNextVariants:C}),S,{clone:!1})};var o=r(n(12)),i=r(n(17)),a=r(n(133)),u=(r(n(37)),n(129));function c(e){return Math.round(1e5*e)/1e5}var s={textTransform:"uppercase"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function r(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var o=["none",r(0,1,3,0,0,1,1,0,0,2,1,-1),r(0,1,5,0,0,2,2,0,0,3,1,-2),r(0,1,8,0,0,3,4,0,0,3,3,-2),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)];t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={borderRadius:4};t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={unit:8};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.isNumber=t.isString=t.formatMs=t.duration=t.easing=void 0;var o=r(n(17)),i=(r(n(37)),{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"});t.easing=i;var a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};t.duration=a;var u=function(e){return"".concat(Math.round(e),"ms")};t.formatMs=u;t.isString=function(e){return"string"==typeof e};t.isNumber=function(e){return!isNaN(parseFloat(e))};var c={easing:i,duration:a,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?a.standard:n,c=t.easing,s=void 0===c?i.easeInOut:c,l=t.delay,f=void 0===l?0:l;(0,o.default)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:u(r)," ").concat(s," ").concat("string"==typeof f?f:u(f))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={mobileStepper:1e3,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CHANNEL=void 0;var o=r(n(2)),i="__THEMING__";t.CHANNEL=i;var a={contextTypes:(0,o.default)({},i,(function(){})),initial:function(e){return e[i]?e[i].getState():null},subscribe:function(e,t){return e[i]?e[i].subscribe(t):null},unsubscribe:function(e,t){e[i]&&e[i].unsubscribe(t)}};t.default=a},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dangerouslyUseGlobalCSS,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,a=e.seed,u=void 0===a?"":a,c=0;return function(e,t){return c+=1,n&&t&&t.options.name?"".concat(i(t.options.name),"-").concat(e.key):"".concat(o).concat(u).concat(c)}};r(n(37));var o=/([[\].#*$><+~=|^:(),"'`\s])/g;function i(e){return String(e).replace(o,"-")}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(12)),i=(r(n(83)),r(n(37)),r(n(133)));function a(e,t){return t}var u=function(e){var t="function"==typeof e;return{create:function(n,r){var u=t?e(n):e;if(!r||!n.overrides||!n.overrides[r])return u;var c=n.overrides[r],s=(0,o.default)({},u);return Object.keys(c).forEach((function(e){s[e]=(0,i.default)(s[e],c[e],{arrayMerge:a})})),s},options:{},themingEnabled:t}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){var t=e.theme,n=e.name,r=e.props;if(!t.props||!n||!t.props[n])return r;var o,i=t.props[n];for(o in i)void 0===r[o]&&(r[o]=i[o]);return r};t.default=r},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=function(e){0;return e.charAt(0).toUpperCase()+e.slice(1)},t.contains=i,t.findIndex=a,t.find=function(e,t){var n=a(e,t);return n>-1?e[n]:void 0},t.createChainedFunction=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))};var o=r(n(83));r(n(37));function i(e,t){return Object.keys(t).every((function(n){return e.hasOwnProperty(n)&&e[n]===t[n]}))}function a(e,t){for(var n=(0,o.default)(t),r=0;r<e.length;r+=1){if("function"===n&&!0==!!t(e[r],r,e))return r;if("object"===n&&i(e[r],t))return r;if(-1!==["string","number","boolean"].indexOf(n))return e.indexOf(t)}return-1}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=(0,i.default)(e);return{getItem:function(e){return new Promise((function(n,r){n(t.getItem(e))}))},setItem:function(e,n){return new Promise((function(r,o){r(t.setItem(e,n))}))},removeItem:function(e){return new Promise((function(n,r){n(t.removeItem(e))}))}}};var r,o=n(744),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";t.__esModule=!0;var r="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};function o(){}t.default=function(e){var t=e+"Storage";return function(e){if("object"!==("undefined"==typeof self?"undefined":r(self))||!(e in self))return!1;try{var t=self[e],n="redux-persist "+e+" test";t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch(e){return!1}return!0}(t)?self[t]:i};var i={getItem:o,setItem:o,removeItem:o}},function(e,t,n){"use strict";n.r(t);var r=n(14),o=n.n(r),i=n(4),a=n.n(i),u=n(6),c=n.n(u),s=n(11),l=n.n(s),f=n(8),d=n.n(f),p=n(10),h=n.n(p),m=n(5),y=n.n(m),v=n(2),g=n.n(v),b=n(12),w=n.n(b),x=n(0),C=n.n(x),k=n(38),S=n(23),_=n(17),A=n.n(_),O=n(1),E=n.n(O),B=n(206),j=n.n(B),P=n(15),T=n.n(P);function z(e){return e instanceof Function}function I(e){var t=e.icon,n=e.width,r=e.height,o=e.color,i=e.className,a=e.preserveColor,u=e.rotate,c=e.size,s=e.spin,l=A()(e,["icon","width","height","color","className","preserveColor","rotate","size","spin"]),f=Object(x.useMemo)((function(){return z(t)?t:function(e){var t;return(t=e.id?"#".concat(e.id):"#"===e[0]?e:"#"+e)?function(e){return C.a.createElement("svg",e,C.a.createElement("use",{xlinkHref:t}))}:(console.warn("Icon not found ".concat(e,".")),null)}(t)}),[t]),d=e.style;d=Object.assign({},d),o&&(d.fill=o),u&&(d.transform="rotate(".concat(u,"deg)"));var p=a?"icon--preserveColor":"icon",h=T()(i,j.a[p],g()({},j.a["icon--spin"],s));return f?C.a.createElement(f,w()({className:h,style:d,width:n||c||"16",height:r||c||"16"},l)):null}I.isProperIcon=function(e){var t=e&&!!e.id,n="string"==typeof e,r=z(e);return t||n||r};var D=E.a.oneOfType([E.a.string,E.a.object,E.a.func]);I.propTypes={icon:D.isRequired,width:E.a.oneOfType([E.a.string,E.a.number]),height:E.a.oneOfType([E.a.string,E.a.number]),color:E.a.oneOfType([E.a.string,E.a.object]),className:E.a.string,preserveColor:E.a.bool,size:E.a.oneOfType([E.a.string,E.a.number]),spin:E.a.bool},I.defaultProps={spin:!1};var R=I,F=n(42),M=n.n(F),N=M()((function(){var e=document.querySelector("[role=application]");return e&&e.dataset})),L=M()((function(){var e=N();return e&&e.cozy?JSON.parse(e.cozy):null})),U=M()((function(e){var t=L();if(t&&void 0!==t[e])return"true"===t[e]||"false"===t[e]?JSON.parse(t[e]):t[e];var n=N();if(n){var r=n["cozy".concat(e[0].toUpperCase()).concat(e.substring(1))];return void 0===r?void 0:""===r||JSON.parse(r)}})),$=null,G=M()((function(){return U("tracking")})),q=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!G())return null;if(null!==$)return $;try{!1===o&&Piwik.getTracker();var i=n(!function(){var e=new Error("Cannot find module 'piwik-react-router'");throw e.code="MODULE_NOT_FOUND",e}());return $=i({url:e||"https://matomo.cozycloud.cc",siteId:t||8,injectScript:o}),r&&J(),$}catch(e){return console.warn(e),$=null,null}},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!==$){var t,n,r,o=document.querySelector("[role=application]");if(o&&o.dataset&&(t=U("appName"),n=U("cozyDomain")),n){r=n;var i=n.indexOf(":");i>=0&&(r=r.substring(0,i))}e=Object.assign({userId:r,appDimensionId:1,app:t,heartbeat:15},e),parseInt(e.heartbeat)>0&&$.push(["enableHeartBeatTimer",parseInt(e.heartbeat,10)]),$.push(["setUserId",e.userId]),$.push(["setCustomDimension",e.appDimensionId,e.app])}},H=n(24),W=n(7),Q=n.n(W),V=n(9),Y=n.n(V),K=n(29),Z=n(81),X=n.n(Z);var ee=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.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"}))},te=n(136),ne=n.n(te),re=E.a.shape({name:E.a.string,slug:E.a.string,developer:E.a.object,links:E.a.shape({icon:E.a.string}),latest_version:E.a.shape({version:E.a.string})});E.a.shape({_id:E.a.string,class:E.a.string,mime:E.a.string,name:E.a.string});function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var ie=function(e){d()(r,e);var t,n=oe(r);function r(e,t){var o;return a()(this,r),o=n.call(this,e,t),g()(l()(o),"state",{error:null,icon:null,status:o.props.client?"fetching":"errored"}),o.isUnmounting=!1,o.handleError=o.handleError.bind(l()(o)),o.fetchIcon=o.fetchIcon.bind(l()(o)),o}return c()(r,[{key:"componentWillUnmount",value:function(){this.isUnmounting=!0}},{key:"componentDidMount",value:function(){this.isUnmounting=!1,this.load()}},{key:"componentDidUpdate",value:function(e){this.props.fetchIcon!==e.fetchIcon&&this.load()}},{key:"fetchIcon",value:function(){var e=this.props,t=e.app,n=e.type,r=e.priority;return e.client.getStackClient().getIconURL({type:n,slug:t.slug||t,priority:r})}},{key:"handleError",value:function(){this.setState({status:"errored"})}},{key:"load",value:(t=Y()(Q.a.mark((function e(){var t,n,r,o,i,a,u,c,s,l,f;return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.app,r=t.fetchIcon,o=t.onReady,i=t.client,a=r||this.fetchIcon,e.prev=2,i&&(f=new URL(i.getStackClient().uri),s=f.host,l="https:"===f.protocol),e.next=6,a(n,s,l);case 6:u=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),c=e.t0;case 12:this.isUnmounting||(this.setState({error:c,icon:u,status:c?"errored":"done"}),"function"==typeof o&&o());case 13:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.alt,n=e.className,r=e.fallbackIcon,o=this.state,i=o.icon;switch(o.status){case"fetching":return C.a.createElement("div",{role:"progressbar",className:T()(X.a["c-loading-placeholder"],X.a["c-app-icon"],n)});case"done":return C.a.createElement("img",{alt:t,className:T()(X.a["c-app-icon"],n),src:i,onError:this.handleError});case"errored":default:return C.a.createElement(R,{className:T()(X.a["c-app-icon"],X.a["c-app-icon-default"],n),height:"100%",icon:r||ee,width:"100%",color:ne.a.coolGrey})}}}]),r}(x.Component);ie.propTypes={alt:E.a.string,app:E.a.oneOfType([re,E.a.string]),fallbackIcon:D,fetchIcon:E.a.func,client:E.a.object.isRequired,className:E.a.string,onReady:E.a.func,type:E.a.oneOf(["app","konnector"]),priority:E.a.oneOf(["stack","registry"])},ie.defaultProps={type:"app",priority:"stack"};var ae=Object(K.withClient)(ie),ue=n(25);function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function se(e){return C.a.createElement("svg",w()({width:32,height:32},e),C.a.createElement("g",{fill:"none",fillRule:"evenodd"},C.a.createElement("circle",{fill:"#297EF2",fillRule:"nonzero",cx:16,cy:16,r:16}),C.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 le=function(e){d()(n,e);var t=ce(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props.className;return C.a.createElement(ae,{fetchIcon:function(){return"".concat(ue.b.get.cozyURL(),"/assets/images/icon-cozy-home.svg")},fallbackIcon:se,className:e})}}]),n}(x.PureComponent),fe=function(e){var t=e.webviewContext,n=e.homeHref;return t?C.a.createElement("button",{onClick:function(){t.call("backToHome")},className:"coz-nav-apps-btns-home --flagship"},C.a.createElement(le,{className:"coz-nav-apps-btns-home-svg"})):n?C.a.createElement("a",{href:n,className:"coz-nav-apps-btns-home"},C.a.createElement(le,{className:"coz-nav-apps-btns-home-svg"})):C.a.createElement("span",{className:"coz-nav-apps-btns-home"},C.a.createElement(le,{className:"coz-nav-apps-btns-home-svg"}))},de=n(51),pe=n.n(de);var he=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 32 32"},e,{role:"progressbar","aria-busy":"true"}),C.a.createElement("path",{opacity:.25,d:"M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"}),C.a.createElement("path",{d:"M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"}))},me=function(e){var t,n=e.className,r=e.extension,o=e.size,i=e.theme,a=e.variant,u=e.round,c=e.align;return T()(pe.a["c-btn"],(t={},g()(t,pe.a["c-btn--".concat(i)],i),g()(t,pe.a["c-btn--".concat(o)],"normal"!==o),g()(t,pe.a["c-btn--".concat(a)],a),g()(t,pe.a["c-btn--".concat(r)],r),g()(t,pe.a["c-btn--".concat(c)],c),g()(t,pe.a["c-btn--round"],u),t),n)},ye=function(e){return function(t){var n=t.busy,r=t.disabled,o=A()(t,["busy","disabled"]);return n&&(o["aria-busy"]=!0),r&&(o["aria-disabled"]=!0),"button"===e&&r&&(o.disabled=!0),o}},ve={button:ye("button"),a:ye("a")},ge=function(e){return e},be={tiny:8,small:12,large:18},we=function(e){var t=e.children,n=e.icon,r=e.iconOnly,o=e.label,i=e.subtle,a=e.className,u=e.extension,c=e.round,s=e.size,l=e.theme,f=e.align,d=e.extraRight,p=e.tag,h=A()(e,["children","icon","iconOnly","label","subtle","className","extension","round","size","theme","align","extraRight","tag"]),m=ve[p]||ge,y=r?o:null,v=r?"u-visuallyhidden":null;return C.a.createElement(p,w()({},m(h),{className:me({extension:u,align:f,round:c,size:s,theme:l,className:a,variant:i&&"subtle"}),title:y}),C.a.createElement("span",null,R.isProperIcon(n)?C.a.createElement(R,{size:be[s],icon:n,"aria-hidden":!0,focusable:"false"}):n,o&&C.a.createElement("span",{className:v},o),t,d&&C.a.createElement("span",{className:"u-ml-auto"},d),h.busy&&C.a.createElement(R,{size:be[s],icon:he,spin:!0,className:"u-ml-half","aria-hidden":!0,focusable:"false"})))},xe=function(e){return C.a.createElement(we,e)},Ce=function(e){return C.a.createElement(we,e)};function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}xe.propTypes={children:E.a.node,label:E.a.node.isRequired,icon:E.a.oneOfType([E.a.node,D]),iconOnly:E.a.bool,theme:E.a.string,size:E.a.oneOf(["tiny","small","large","normal"]),extension:E.a.oneOf(["narrow","full"]),align:E.a.oneOf(["left","right","center"]),round:E.a.bool,className:E.a.string,onClick:E.a.func,extraRight:E.a.PropTypes.node,busy:E.a.bool,disabled:E.a.bool,type:E.a.oneOf(["button","reset","submit"]),subtle:E.a.bool},xe.defaultProps={type:"submit",tag:"button",size:"normal",align:"center"},Ce.defaultProps={tag:"a"};var Se=function(e){d()(n,e);var t=ke(n);function n(e){var r;return a()(this,n),(r=t.call(this,e)).state={unmounted:!0},r.animate=r.animate.bind(l()(r)),r}return c()(n,[{key:"animate",value:function(){var e=this;return setTimeout((function(){e.setState((function(){return{unmounted:!1}}))}),100)}},{key:"componentDidMount",value:function(){this.animate()}},{key:"render",value:function(){var e=this.props,t=e.t,n=e.code,r=e.links,o=this.state.unmounted;return C.a.createElement("div",{className:"coz-bar-banner".concat(o?" unmounted":"")},C.a.createElement("p",null,t("banner.".concat(n,".description"))),C.a.createElement(Ce,{className:"coz-bar-banner-button",size:"tiny",href:r,label:t("banner.".concat(n,".CTA"))}))}}]),n}(x.Component),_e=Object(S.translate)()(Se),Ae=n(142),Oe=n.n(Ae),Ee={"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"};function Be(e){return e instanceof Function}function je(e){var t=e.icon,n=e.width,r=e.height,o=e.color,i=e.className,a=e.preserveColor,u=e.rotate,c=e.size,s=e.spin,l=A()(e,["icon","width","height","color","className","preserveColor","rotate","size","spin"]),f=Object(x.useMemo)((function(){return Be(t)?t:function(e){var t;return(t=e.id?"#".concat(e.id):"#"===e[0]?e:"#"+e)?function(e){return C.a.createElement("svg",e,C.a.createElement("use",{xlinkHref:t}))}:(console.warn("Icon not found ".concat(e,".")),null)}(t)}),[t]),d=e.style;d=Object.assign({},d),o&&(d.fill=o),u&&(d.transform="rotate(".concat(u,"deg)"));var p=a?"icon--preserveColor":"icon",h=T()(i,Ee[p],g()({},Ee["icon--spin"],s));return f?C.a.createElement(f,w()({className:h,style:d,width:n||c||"16",height:r||c||"16"},l)):null}je.isProperIcon=function(e){var t=e&&!!e.id,n="string"==typeof e,r=Be(e);return t||n||r};var Pe=E.a.oneOfType([E.a.string,E.a.object,E.a.func]);je.propTypes={icon:Pe.isRequired,width:E.a.oneOfType([E.a.string,E.a.number]),height:E.a.oneOfType([E.a.string,E.a.number]),color:E.a.oneOfType([E.a.string,E.a.object]),className:E.a.string,preserveColor:E.a.bool,size:E.a.oneOfType([E.a.string,E.a.number]),spin:E.a.bool},je.defaultProps={spin:!1};var Te=je;var ze=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.createElement("defs",null,C.a.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"})),C.a.createElement("g",{fillRule:"evenodd",transform:"translate(-160 -255)"},C.a.createElement("use",{xlinkHref:"#cloud_svg__a"})))},Ie=n(137),De=n.n(Ie),Re=n(19),Fe=n.n(Re),Me=n(75),Ne=n.n(Me),Le=function(e){var t=window.innerWidth;return Ne()(e,(function(e){var n=Fe()(e,2),r=n[0],o=n[1];return t>=r&&(void 0===o||t<=o)}))},Ue={isExtraLarge:[1201],isLarge:[1024,1200],isMedium:[769,1023],isSmall:[544,768],isTiny:[0,543],isDesktop:[1024],isTablet:[769,1023],isMobile:[0,768]};function $e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}E.a.shape(Object.keys(Ue).reduce((function(e,t){return e[t]=E.a.bool.isRequired,e}),{}));var Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue;return function(t){var n=function(n){d()(o,n);var r=$e(o);function o(t){var n;return a()(this,o),(n=r.call(this,t)).state={breakpoints:Le(e)},n.checkBreakpoints=De()((function(){n.setState({breakpoints:Le(e)})}),100,{trailing:!0}),n}return c()(o,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.checkBreakpoints)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.checkBreakpoints)}},{key:"render",value:function(){var e=this.props,n=this.state.breakpoints;return C.a.createElement(t,w()({},e,{breakpoints:n}))}}]),o}(x.Component);return n.displayName="withBreakpoints(".concat(t.displayName||t.name,")"),n}},qe=n(13),Je=n(18),He=n.n(Je),We=E.a.shape({slug:E.a.string.isRequired,name:E.a.string.isRequired,namePrefix:E.a.string,comingSoon:E.a.bool,href:E.a.string,links:E.a.shape({icon:E.a.string.isRequired})}),Qe=(Object(H.isAndroidApp)(),function(e){return e?e.startsWith("/")?e:"/"+e:"/"}),Ve=function(e){var t=e.slug,n=e.cozyUrl,r=e.subDomainType,o=e.fallbackUrl,i=e.nativePath;if(i=Qe(i),!n&&!o)throw new Error("Must have either cozyUrl or fallbackUrl to generate universal link.");n&&!o&&(o=function(e){var t=e.cozyUrl,n=e.nativePath,r=e.slug,o=e.subDomainType;n=Qe(n);var i=new URL(t);return i.host="nested"===o?"".concat(r,".").concat(i.host):i.host.split(".").map((function(e,t){return 0===t?e+"-"+r:e})).join("."),i.hash=n,i.toString()}({cozyUrl:n,nativePath:i,slug:t,subDomainType:r}));var a=new URL("https://links.mycozy.cloud/"+t+i);return a.searchParams.append("fallback",o),a.toString()},Ye={drive:{appId:"io.cozy.drive.mobile",uri:"cozydrive://",name:"Cozy Drive"},banks:{appId:Object(H.isAndroidApp)()?"io.cozy.banks.mobile":"io.cozy.banks",uri:"cozybanks://",name:"Cozy Banks"}};function Ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ze,Xe,et,tt,nt=(Ze=function(e){return Object(H.checkApp)(e).catch((function(){return!1}))},Xe=1e4,et=function(e){return e.appId},tt={},function(e){var t=et(e),n=tt[t];return n&&n.result&&n.date-Date.now()<Xe||(tt[t]={result:Ze(e),date:Date.now()}),tt[t].result}),rt=function(e){d()(r,e);var t,n=Ke(r);function r(e){var t;return a()(this,r),t=n.call(this,e),g()(l()(t),"state",{nativeAppIsAvailable:null,isFetchingAppInfo:!1}),t}return c()(r,[{key:"componentDidMount",value:function(){Object(H.isMobileApp)()&&this.checkAppAvailability()}},{key:"checkAppAvailability",value:(t=Y()(Q.a.mark((function e(){var t,n,r;return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props.slug,!(n=Ye[t])){e.next=9;break}return e.t0=Boolean,e.next=6,nt(n);case 6:e.t1=e.sent,r=(0,e.t0)(e.t1),this.setState({nativeAppIsAvailable:r});case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.children,n=e.slug,i=this.state.nativeAppIsAvailable,a=Ye[n],u=r.getOnClickHref(this.props,i),c=u.href,s=u.onClick;return t(o()({},a,{onClick:s,href:c}))}}],[{key:"getOnClickHref",value:function(e,t){var n=e.slug,o=e.nativePath,i=e.href,a=null,u=Object(H.isMobileApp)(),c=Ye[n];if(u)t?(a=r.openNativeFromNative.bind(this,e),i="#"):a=r.openWeb.bind(this,e);else if(Object(H.isMobile)()&&c)if(Object(H.isAndroid)())a=r.openNativeFromWeb.bind(this,e);else try{i=Ve({slug:n,nativePath:o,fallbackUrl:i})}catch(e){console.error(e),i="#"}return{href:i,onClick:a}}},{key:"openNativeFromWeb",value:function(e,t){var n=e.href,o=e.slug,i=e.nativePath,a=e.onAppSwitch,u=Ye[o];t&&t.preventDefault(),r.onAppSwitch(a),Object(H.openDeeplinkOrRedirect)(u.uri+("/"===i?"":i),(function(){window.location.href=n}))}},{key:"onAppSwitch",value:function(e){"function"==typeof e&&e()}},{key:"openNativeFromNative",value:function(e,t){var n=e.slug,o=e.onAppSwitch;t&&t.preventDefault();var i=Ye[n];r.onAppSwitch(o),Object(H.startApp)(i).catch((function(e){console.error("AppLinker: Could not open native app",e)}))}},{key:"openWeb",value:function(e){r.onAppSwitch(e.onAppSwitch)}}]),r}(C.a.Component);rt.defaultProps={nativePath:"/"},rt.propTypes={slug:E.a.string.isRequired,href:E.a.string.isRequired,nativePath:E.a.string,onAppSwitch:E.a.func};var ot=rt;function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var at=He()(K.models,"applications.getAppDisplayName",(function(e){return e.namePrefix&&"cozy"!==e.namePrefix.toLowerCase()?"".concat(e.namePrefix," ").concat(e.name):e.name})),ut=function(e){d()(n,e);var t=it(n);function n(e){var r;return a()(this,n),(r=t.call(this,e)).onAppSwitch=r.onAppSwitch.bind(l()(r)),r}return c()(n,[{key:"componentWillUnmount",value:function(){this.switchTimeout&&clearTimeout(this.switchTimeout)}},{key:"buildAppUrl",value:function(e){var t;try{t=new URL(e)}catch(e){return console.error(e.message),null}var r=n.buildQueryParams(this.props,this.context);if(r)for(var o in r)t.searchParams.append(o,r[o]);return t.toString()}},{key:"onAppSwitch",value:function(){var e=this.props.onAppSwitch;"function"==typeof e&&(this.switchTimeout=setTimeout((function(){e()}),1e3))}},{key:"render",value:function(){var e=this.props,t=e.useHomeIcon,n=e.app,r=n.slug?"icon-".concat(n.slug):"",o=at(n);return C.a.createElement(ot,{onAppSwitch:this.onAppSwitch,slug:n.slug,href:this.buildAppUrl(n.href)||""},(function(e){var i=e.onClick,a=e.href;return C.a.createElement("li",{className:"coz-nav-apps-item".concat(n.isCurrentApp?" --current":"")},C.a.createElement("a",{role:"menuitem",href:a,"data-icon":r,title:o,onClick:i},t?C.a.createElement(le,{className:"coz-nav-apps-item-icon"}):C.a.createElement(ae,w()({app:n,className:"coz-nav-apps-item-icon",key:n.slug},ue.b.get.iconProps())),C.a.createElement("p",{className:"coz-label"},o)))}))}}]),n}(C.a.Component);g()(ut,"buildQueryParams",(function(){return null})),ut.propTypes={app:We.isRequired,useHomeIcon:E.a.bool};var ct=ut,st=function(){return C.a.createElement("li",{className:"coz-nav-apps-item"},C.a.createElement("span",{role:"menuitem",disabled:!0},C.a.createElement("div",{className:"coz-nav-apps-item-icon coz-loading-placeholder"}),C.a.createElement("p",{className:"coz-label coz-loading-placeholder"})))};function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var ft=function(e){d()(n,e);var t=lt(n);function n(e,r){var o;return a()(this,n),(o=t.call(this,e,r)).translateApp=dt(o.props.t),o}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.t,n=e.apps,r=e.breakpoints,o=e.homeApp,i=e.isFetchingApps,a=e.onAppSwitch,u=r.isMobile,c=o&&o.isCurrentApp,s=o&&o.slug;return i||n&&n.length?C.a.createElement("div",{className:"coz-nav-pop-content"},C.a.createElement("ul",{className:"coz-nav-group"},u&&o&&C.a.createElement(ct,{app:o,useHomeIcon:!0,onAppSwitch:a}),i?new Array(3).fill({}).map((function(e,t){return C.a.createElement(st,{key:t})})):n.filter((function(e){return e.slug!==s})).sort(function(e){return function(t,n){return e(t)>e(n)}}(this.translateApp)).map((function(e,t){return C.a.createElement(ct,{app:e,key:t,onAppSwitch:a})}))),o&&!u&&!c&&C.a.createElement("a",{role:"menuitem",href:o.href,className:"coz-apps-home-btn"},C.a.createElement(Te,{icon:ze}),t("menu.home"))):C.a.createElement("p",{className:"coz-nav--error coz-nav-group"},t("no_apps"))}}]),n}(x.Component);ft.propTypes={homeApp:E.a.shape({isCurrentApp:E.a.bool,slug:E.a.string}),apps:E.a.array,isFetchingApps:E.a.bool.isRequired};var dt=function(e){return function(t){var n=t.namePrefix?e("".concat(t.slug,".namePrefix"),{_:t.namePrefix}):null,r=e("".concat(t.slug,".name"),{_:t.name});return n?"".concat(n," ").concat(r):"".concat(r)}},pt=Object(k.connect)((function(e){return{apps:Object(qe.d)(e),homeApp:Object(qe.f)(e),isFetchingApps:Object(qe.n)(e)}}))(Object(S.translate)()(Ge()(ft)));var ht=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.createElement("path",{fillRule:"evenodd",d:"M2 1c0-.552.456-1 1.002-1h9.996A1 1 0 0114 1v14c0 .552-.456 1-1.002 1H3.002A1 1 0 012 15V1zm2 1v10h8V2H4zm4 13a1 1 0 100-2 1 1 0 000 2z"}))};var mt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.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 yt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.createElement("path",{fillRule:"evenodd",d:"M4 6a4 4 0 118 0 4 4 0 110 8H4a4 4 0 110-8zm1 3s0 2 3 2 3-2 3-2H5z"}))};var vt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.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 gt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.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"}))},bt=Object(S.translate)()((function(e){var t=e.t,n=e.data,r=Number.isInteger(n.quota)?(n.quota/1e9).toFixed(2):n.quota,o=Number.isInteger(n.usage)?(n.usage/1e9).toFixed(2):n.usage;return C.a.createElement("div",{className:"coz-nav-storage"},C.a.createElement("p",{className:"coz-nav-storage-text"},t("storage_phrase",{diskUsage:o,diskQuota:r})),C.a.createElement("progress",{className:"cozy-nav-storage-bar",value:o,max:r,min:"0"}))}));var wt=function(e){return C.a.createElement("svg",w()({width:16,height:16},e),C.a.createElement("path",{fillRule:"evenodd",d:"M1 4h14v10.004a1 1 0 01-1.007.996H2.007A1 1 0 011 14.004V4zM0 2c0-.552.445-1 1-1h14c.552 0 1 .444 1 1v1H0V2zm5 4h6v2H5V6z"}))},xt=function(e){var t=e.icon;return C.a.createElement(Te,{className:"u-mr-half",color:"var(--slateGrey)",icon:t})},Ct=function(e){var t=e.children;return C.a.createElement("ul",{className:"coz-nav-group"},t)},kt=function(e){var t=e.children;return C.a.createElement("li",{className:"coz-nav-settings-item"},t)},St=function(e){var t=e.t,n=e.onLogOut,r=e.settingsAppURL,o=e.storageData,i=e.onClaudy,a=e.isDrawer,u=void 0!==a&&a,c=e.isClaudyLoading,s=e.toggleSupport,l=e.shoulDisplayViewOfferButton,f=e.managerUrlPremiumLink,d=e.viewOfferButtonText;return C.a.createElement("div",{className:"coz-nav-pop-content"},u&&C.a.createElement("hr",null),r&&C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/profile"),target:"_self",title:t("profile")},C.a.createElement(xt,{className:"u-mr-half",icon:mt}),t("profile"))),C.a.createElement(kt,null,C.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/connectedDevices"),target:"_self",title:t("connectedDevices")},C.a.createElement(xt,{icon:ht}),t("connectedDevices")))),u&&i&&!Object(H.isMobileApp)()&&C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement("button",{type:"button",role:"menuitem",className:"coz-nav-settings-item-btn",busy:c,onClick:i},C.a.createElement(xt,{icon:ze})," ",t("claudy.title")))),!u&&o&&C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement("a",{role:"menuitem",target:"_self",title:t("storage"),href:"".concat(r,"#/storage")},C.a.createElement(xt,{icon:wt})," ",t("storage"),C.a.createElement(bt,{data:o})))),(!u||!Object(H.isMobileApp)())&&l&&C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement(Ce,{subtle:!0,role:"menuitem",className:"coz-nav-settings-item-btn",icon:C.a.createElement(xt,{icon:yt}),title:d,label:d,href:f}))),!Object(H.isMobileApp)()&&C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement("button",{type:"button",role:"menuitem",className:"coz-nav-settings-item-btn",onClick:s},C.a.createElement(xt,{icon:gt})," ",t("help")))),C.a.createElement(Ct,null,C.a.createElement(kt,null,C.a.createElement("button",{type:"button",role:"menuitem",onClick:n,title:t("logout")},C.a.createElement(xt,{icon:vt})," ",t("logout")))))};St.defaultProps={shoulDisplayViewOfferButton:!1},St.propTypes={shoulDisplayViewOfferButton:E.a.bool,t:E.a.func.isRequired,onLogOut:E.a.func.isRequired,settingsAppURL:E.a.string,storageData:E.a.object,onClaudy:E.a.oneOfType([E.a.bool,E.a.func]),isDrawer:E.a.bool,isClaudyLoading:E.a.bool,toggleSupport:E.a.func.isRequired,viewOfferButtonText:E.a.string};var _t=Object(S.translate)()(St);function At(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ot=function(e){d()(o,e);var t,n,r=At(o);function o(e){var t;return a()(this,o),t=r.call(this,e),g()(l()(t),"onDrawerClick",(function(e){e.target===t.wrapperRef&&t.close()})),g()(l()(t),"onTransitionEnd",(function(){t.props.visible?(t.gesturesHandler||t.attachGestures(),t.preventBackgroundScrolling()):(t.restoreBackgroundScrolling(),t.setState({isClosing:!1})),t.props.drawerListener()})),g()(l()(t),"componentWillReceiveProps",function(){var e=Y()(Q.a.mark((function e(n){return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.UNSAFE_componentWillReceiveProps(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),g()(l()(t),"UNSAFE_componentWillReceiveProps",function(){var e=Y()(Q.a.mark((function e(n){return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.props.visible||!n.visible){e.next=3;break}return e.next=3,t.props.fetchSettingsData();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),g()(l()(t),"close",(function(){t.state.isClosing||(t.detachGestures(),t.setState((function(){return{isClosing:!0}})),t.turnTransitionsOn(),t.props.onClose(),t.asideRef.style.transform="")})),t.state={isScrolling:!1,isClosing:!1},t.handleLogout=t.handleLogout.bind(l()(t)),t}return c()(o,[{key:"componentDidMount",value:(n=Y()(Q.a.mark((function e(){return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.turnTransitionsOn();case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"turnTransitionsOn",value:function(){this.asideRef.classList.add("with-transition"),this.asideRef.addEventListener("transitionend",this.onTransitionEnd)}},{key:"turnTransitionsOff",value:function(){this.asideRef.classList.remove("with-transition"),this.asideRef.removeEventListener("transitionend",this.onTransitionEnd)}},{key:"preventBackgroundScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"restoreBackgroundScrolling",value:function(){document.body.style.overflow="auto"}},{key:"detachGestures",value:function(){this.gesturesHandler.destroy(),this.gesturesHandler=null}},{key:"attachGestures",value:function(){var e=this;this.gesturesHandler=new Oe.a.Manager(document.documentElement,{recognizers:[[Oe.a.Pan,{direction:Oe.a.DIRECTION_ALL}]]});var t=this.asideRef.getBoundingClientRect().width,n=null;this.gesturesHandler.on("panstart",(function(t){e.state.isClosing||("panup"===t.additionalEvent||"pandown"===t.additionalEvent?e.setState({isScrolling:!0}):(e.turnTransitionsOff(),n=0))})),this.gesturesHandler.on("pan",(function(r){e.state.isClosing||e.state.isScrolling||(n=-r.deltaX/t,e.applyTransformation(n))})),this.gesturesHandler.on("panend",(function(n){if(!e.state.isClosing)if(e.state.isScrolling)e.setState({isScrolling:!1});else{var r=-n.deltaX/t>=.4,o=n.velocity<0&&Math.abs(n.velocity)>=.2;r||o?e.close():(e.turnTransitionsOn(),e.applyTransformation(0))}}))}},{key:"applyTransformation",value:function(e){e=Math.min(1.1,Math.max(0,e)),this.asideRef.style.transform="translateX(-"+100*e+"%)"}},{key:"handleLogout",value:(t=Y()(Q.a.mark((function e(){var t,n,r,o;return Q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.onLogOut,r=t.logOut,!n||"function"!=typeof n){e.next=6;break}if(!((o=n())instanceof Promise)){e.next=6;break}return e.next=6,o;case 6:r();case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.props,n=t.onClaudy,r=t.visible,o=t.isClaudyLoading,i=t.toggleSupport,a=t.settingsAppURL,u=t.storageData;return C.a.createElement("div",{className:"coz-drawer-wrapper",onClick:this.onDrawerClick,"aria-hidden":r?"false":"true",ref:function(t){e.wrapperRef=t}},C.a.createElement("aside",{ref:function(t){e.asideRef=t}},C.a.createElement("nav",{className:"coz-drawer--apps"},C.a.createElement(pt,{onAppSwitch:this.close})),C.a.createElement("hr",{className:"coz-sep-flex"}),C.a.createElement("nav",{className:"coz-drawer--settings"},C.a.createElement(_t,{onLogOut:this.handleLogout,storageData:u,settingsAppURL:a,isClaudyLoading:o,onClaudy:n,toggleSupport:i,isDrawer:!0}))))}}]),o}(x.Component),Et=Object(k.connect)((function(e){return{storageData:Object(qe.i)(e),settingsAppURL:Object(qe.h)(e)}}),(function(e){return{fetchSettingsData:function(){return e(Object(qe.c)())},logOut:function(){return e(Object(qe.q)())}}}))(Ot),Bt=n(32);var jt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.createElement("g",{fillRule:"evenodd"},C.a.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"}),C.a.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"})))},Pt={query:function(){return Object(K.Q)("io.cozy.settings").getById("instance")},as:"instanceQuery"},Tt={query:function(){return Object(K.Q)("io.cozy.settings").getById("context")},as:"contextQuery"},zt={query:function(){return Object(K.Q)("io.cozy.settings").getById("disk-usage")},as:"diskUsageQuery"},It=n(139),Dt=function(){return Object(It.a)("8.3.0")};function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Ft=void 0,Mt=void 0,Nt=void 0;K.models&&(Ft=K.models.instance,Nt=function(e){var t=He()(e,"diskUsage.data.attributes.quota",!1);return parseInt(t)<5e10},Mt=function(e){return!Ft.isSelfHosted(e)&&Ft.arePremiumLinksEnabled(e)&&Ft.getUuid(e)&&!Nt(e)});var Lt=function(e){d()(n,e);var t=Rt(n);function n(e){var r;return a()(this,n),r=t.call(this,e),g()(l()(r),"onClickOutside",(function(e){(r.props.isFetching||r.state.opened)&&(r.rootRef.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),g()(l()(r),"toggleMenu",(function(){if(r.state.opened)return r.setState({opened:!1});r.props.fetchSettingsData(),r.setState({opened:!0})})),r.state={opened:!1},r}return c()(n,[{key:"componentDidMount",value:function(){document.body.addEventListener("click",this.onClickOutside)}},{key:"componentWillUnmount",value:function(){document.body.removeEventListener("click",this.onClickOutside)}},{key:"render",value:function(){var e,t,n=this,r=this.props,o=r.isBusy,i=r.logOut,a=r.onLogOut,u=r.t,c=r.toggleSupport,s=r.diskUsageQuery,l=r.instanceQuery,f=r.contextQuery,d=r.storageData,p=r.settingsAppURL,h=r.isFetching,m=!1,y="",v=Dt();if(v&&!(t=[s,l,f].some((function(e){return"loading"===e.fetchStatus})))){var g={context:f,diskUsage:s,instance:l};(m=Ft.shouldDisplayOffers(g)||Mt(g))&&!Mt(g)?y=u("view_offers"):Mt(g)&&(y=u("view_my_offer")),e=Ft.buildPremiumLink(g)}var b=!1;b=v?!t&&!h:!h;var w=this.state.opened&&b;return C.a.createElement("div",{className:"coz-nav coz-nav-settings",ref:function(e){n.rootRef=e}},C.a.createElement(xe,{type:"button",theme:"text",onClick:this.toggleMenu,className:"coz-nav-settings-btn","aria-controls":"coz-nav-pop--settings",busy:o,icon:jt,label:u("menu.settings")}),C.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--settings",id:"coz-nav-pop--settings","aria-hidden":!w},b&&C.a.createElement(C.a.Fragment,null,C.a.createElement(_t,{onLogOut:function(){a&&"function"==typeof a?a():i()},toggleSupport:c,storageData:d,settingsAppURL:p,shoulDisplayViewOfferButton:m,managerUrlPremiumLink:e,viewOfferButtonText:y}))))}}]),n}(x.Component),Ut=function(e){return{storageData:Object(qe.i)(e),settingsAppURL:Object(qe.h)(e),isBusy:Object(qe.p)(e),isFetching:Object(qe.o)(e)}},$t=function(e){return{fetchSettingsData:function(){return e(Object(qe.c)())},logOut:function(){return e(Object(qe.q)())}}},Gt=Dt()?Object(Bt.d)(Object(S.translate)(),Object(K.queryConnect)({instanceQuery:Pt,contextQuery:Tt,diskUsageQuery:zt}),Object(k.connect)(Ut,$t))(Lt):Object(Bt.d)(Object(S.translate)(),Object(k.connect)(Ut,$t))(Lt);var qt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 24 24"},e),C.a.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 Jt=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 24 24"},e),C.a.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"}))};function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Wt=function(e){d()(n,e);var t=Ht(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.homeApp,n=e.handleClick,r=e.appName,o=e.appNamePrefix,i=e.appSlug,a=e.iconPath,u=e.isFetchingApps,c=e.isPublic,s=e.opened,l=e.t,f=t&&t.isCurrentApp;if(!c&&u)return C.a.createElement("div",{className:"coz-nav-apps-btns --loading"},C.a.createElement("div",{className:"coz-nav-apps-btns-home coz-loading-placeholder"}),C.a.createElement("div",{className:"coz-nav-apps-btns-main coz-loading-placeholder"}));var d=!f&&o?[l("".concat(i,".name_prefix"),{_:o}),l("".concat(i,".name"),{_:r})].join(" "):l("".concat(i,".name"),{_:r}),p=!c&&t&&t.href;return C.a.createElement("div",{className:"coz-nav-apps-btns".concat(f?" --currentHome":"")},C.a.createElement(fe,{homeHref:p}),!f&&C.a.createElement("span",{className:"coz-nav-apps-btns-sep"}),C.a.createElement("button",{type:"button",onClick:c?null:n,className:"coz-nav-apps-btns-main","aria-controls":"coz-nav-pop--apps","data-tutorial":"apps",disabled:c},!f&&C.a.createElement("img",{className:"coz-bar-hide-sm",src:a,width:"28",alt:""}),C.a.createElement("span",{className:"coz-nav-app-name"},d),!c&&C.a.createElement(R,{icon:s?Jt:qt,color:"#95999d",size:"12"})))}}]),n}(x.Component),Qt=Object(k.connect)((function(e){return{homeApp:Object(qe.f)(e),isFetchingApps:Object(qe.n)(e)}}),(function(){return{}}))(Object(S.translate)()(Wt));function Vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Yt=function(e){d()(n,e);var t=Vt(n);function n(e){var r;return a()(this,n),r=t.call(this,e),g()(l()(r),"onClickOutside",(function(e){r.state.opened&&(r.rootRef.contains(e.target)||r.modalContainer.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),g()(l()(r),"toggleMenu",(function(){r.setState({opened:!r.state.opened})})),r.state={opened:!1},r}return c()(n,[{key:"componentDidMount",value:function(){document.body.addEventListener("click",this.onClickOutside),this.modalContainer=document.getElementById("cozy-bar-modal-dom-place")}},{key:"componentWillUnmount",value:function(){document.body.removeEventListener("click",this.onClickOutside)}},{key:"render",value:function(){var e=this,t=this.props,n=t.appName,r=t.appNamePrefix,o=t.appSlug,i=t.iconPath,a=t.isPublic,u=this.state.opened;return C.a.createElement("nav",{className:"coz-nav coz-nav-apps",ref:function(t){e.rootRef=t}},C.a.createElement(Qt,{appName:n,appNamePrefix:r,appSlug:o,iconPath:i,handleClick:this.toggleMenu,opened:u,isPublic:a}),C.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--apps",id:"coz-nav-pop--apps","aria-hidden":!u},C.a.createElement(pt,null)))}}]),n}(x.Component),Kt=n(31),Zt=n.n(Kt),Xt=n(337),en=n.n(Xt),tn=n(338),nn=n.n(tn);var rn=n(138);function on(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var an=function(e){return e.toString().toLowerCase().replace(/\//g," ").normalize("NFD").replace(/[\u0300-\u036f]/g,"").split(" ")},un=function(e,t){var n=an(t),r=an(e),o=[],i=0;r.forEach((function(e){n.forEach((function(t){var n=e.indexOf(t);n>=0&&o.push({from:i+n,to:i+n+t.length})})),i+=e.length+1}));for(var a=o.sort((function(e,t){return e.from>t.from})).reduce((function(e,t){return 0===e.length||e[e.length-1].to<t.from?e.push(t):e[e.length-1].to<t.to&&(e[e.length-1].to=t.to),e}),[]),u=a.length>0?[e.slice(0,a[0].from)]:e,c=0,s=a.length;c<s;++c)u.push(C.a.createElement("b",null,e.slice(a[c].from,a[c].to))),c+1<s&&u.push(e.slice(a[c].to,a[c+1].from));return a.length>0&&u.push(e.slice(a[a.length-1].to,e.length)),u},cn=function(e){d()(n,e);var t=on(n);function n(){var e;a()(this,n);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return e=t.call.apply(t,[this].concat(i)),g()(l()(e),"state",{input:"",query:null,searching:!1,focused:!1,suggestionsBySource:[],sourceURLs:[]}),g()(l()(e),"sources",[]),g()(l()(e),"onMessageFromSource",(function(e){return function(t){var n=e.find((function(e){return e.origin===t.origin}));if(!n)return null;t.data.type==="intent-".concat(n.id,":ready")?(n.ready=!0,n.window=t.source,n.window.postMessage({},t.origin)):t.data.type==="intent-".concat(n.id,":data")&&n.resolvers[t.data.id]?(n.resolvers[t.data.id]({id:n.id,suggestions:t.data.suggestions}),delete n.resolvers[t.data.id]):rn.a.log("unhandled message:",t)}})),g()(l()(e),"onChange",(function(t,n){var r=n.newValue;e.setState({input:r})})),g()(l()(e),"changeFocusState",(function(t){e.setState({focused:t})})),g()(l()(e),"clearSuggestions",(function(){e.setState({suggestionsBySource:[]})})),g()(l()(e),"onSuggestionsFetchRequested",(function(t){var n=t.value,r=e.sources.filter((function(e){return e.ready}));r.length>0&&(e.setState((function(e){return o()({},e,{searching:!0})})),r.forEach(function(){var t=Y()(Q.a.mark((function t(r){var i,a,u,c;return Q.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(e){var t=(new Date).getTime().toString();r.resolvers[t]=e,r.window.postMessage({query:n,id:t},r.origin)}));case 2:i=t.sent,a=i.id,u=i.suggestions,c=e.sources.find((function(e){return e.id===a})).slug,e.state.query!==n?e.setState((function(e){return o()({},e,{searching:!1,query:n,suggestionsBySource:[{title:c,suggestions:u}]})})):e.setState((function(e){return o()({},e,{suggestionsBySource:[].concat(Zt()(e.suggestionsBySource),[{title:c,suggestions:u}])})}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))})),g()(l()(e),"onSuggestionsClearRequested",(function(){e.clearSuggestions(),e.debouncedOnSuggestionsFetchRequested.cancel(),e.setState({query:null,searching:!1})})),g()(l()(e),"onSuggestionSelected",(function(t,n){var r=n.suggestion.onSelect;if(/^open:/.test(r)){var o=r.substr(5);window.location.href=o}else console.log("suggestion onSelect ("+r+") could not be executed");e.setState({input:"",query:null})})),g()(l()(e),"getSectionSuggestions",(function(e){return e.suggestions.slice(0,10)})),g()(l()(e),"getSuggestionValue",(function(e){return e.subtitle})),g()(l()(e),"renderSectionTitle",(function(){return null})),g()(l()(e),"renderSuggestion",(function(t){return C.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-item"},t.icon&&C.a.createElement("img",{className:"coz-searchbar-autosuggest-suggestion-icon",src:t.icon,alt:"icon"}),C.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-content"},C.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-title"},un(t.title,e.state.query)),t.subtitle&&C.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-subtitle"},un(t.subtitle,e.state.query))))})),e}return c()(n,[{key:"componentWillMount",value:function(){this.debouncedOnSuggestionsFetchRequested=nn()(this.onSuggestionsFetchRequested,250)}},{key:"componentDidMount",value:function(){var e=this;(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object(ue.a)(null,"POST","/intents",{data:{type:"io.cozy.intents",attributes:{action:e,type:t,data:n,permissions:r}}})})("OPEN","io.cozy.suggestions").then((function(t){var n=t.attributes.services;if(!n)return null;e.sources=n.map((function(n){var r=n.href;e.setState((function(e){return o()({},e,{sourceURLs:[].concat(Zt()(e.sourceURLs),[r])})}));var i=r.split("/",3).join("/");return{slug:n.slug,origin:i,id:t._id,ready:!1,window:null,resolvers:{}}})),window.addEventListener("message",e.onMessageFromSource(e.sources))}))}},{key:"render",value:function(){var e=this,t=this.state,n=t.input,r=t.query,o=t.searching,i=t.focused,a=t.suggestionsBySource,u=t.sourceURLs;if(0===u.length)return null;var c=this.props.t,s=""!==n&&null===r,l=a.reduce((function(e,t){return e+t.suggestions.length}),0)>0,f={placeholder:c("searchbar.placeholder"),value:n,onChange:this.onChange,onFocus:function(){return e.changeFocusState(!0)},onBlur:function(){return e.changeFocusState(!1)}},d={container:"coz-searchbar-autosuggest-container"+(o?" --searching":"")+(i?" --focused":""),input:"coz-searchbar-autosuggest-input",inputFocused:"coz-searchbar-autosuggest-input-focused",suggestionsContainer:"coz-searchbar-autosuggest-suggestions-container",suggestionsContainerOpen:"coz-searchbar-autosuggest-suggestions-container--open",suggestionsList:"coz-searchbar-autosuggest-suggestions-list",suggestion:"coz-searchbar-autosuggest-suggestion",suggestionHighlighted:"coz-searchbar-autosuggest-suggestion-highlighted",sectionTitle:"coz-searchbar-autosuggest-section-title"};return C.a.createElement("div",{className:"coz-searchbar",role:"search"},u.map((function(e,t){return C.a.createElement("iframe",{src:e,style:{visibility:"hidden",height:"0px",width:"0px"},key:e+t})})),C.a.createElement(en.a,{theme:d,suggestions:a,multiSection:!0,onSuggestionsFetchRequested:this.debouncedOnSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected,getSuggestionValue:this.getSuggestionValue,getSectionSuggestions:this.getSectionSuggestions,renderSectionTitle:this.renderSectionTitle,renderSuggestion:this.renderSuggestion,inputProps:f,focusInputOnSuggestionClick:!1}),""!==n&&!s&&i&&!l&&C.a.createElement("div",{className:"coz-searchbar-autosuggest-status-container"},c("searchbar.empty",{query:n})))}}]),n}(x.Component),sn=Object(S.translate)()(cn);function ln(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var fn=function(e){d()(n,e);var t=ln(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),g()(l()(o),"toggle",(function(){o.props.opened||o.intentWrapperRef.childNodes.length?(o.setState({isActive:!o.state.isActive}),o.props.onToggle()):(o.setState({isLoading:!0}),o.intents.create("CLAUDY","io.cozy.settings",{exposeIntentFrameRemoval:!0}).start(o.intentWrapperRef,(function(){o.setState({isLoading:!1,isActive:!0}),o.props.onToggle()})).then((function(e){var t=e.removeIntentIframe;o.intentWrapperRef.addEventListener("transitionend",(function e(n){"transform"===n.propertyName&&(t(),o.setState({isActive:!1}),n.target.removeEventListener("transitionend",e))}),!1),o.props.onToggle()})))})),o.store=r.barStore,o.state={isLoading:!1,isActive:!1},o.intents=Object(ue.c)(),o}return c()(n,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.claudyFired&&this.toggle()}},{key:"componentWillReceiveProps",value:function(e){return this.UNSAFE_componentWillReceiveProps(e)}},{key:"render",value:function(){var e=this,t=this.props.opened,n=this.state,r=n.isLoading,o=n.isActive;return C.a.createElement("div",{className:"coz-claudy ".concat(t?"coz-claudy--opened":"")},C.a.createElement("button",{type:"button",className:"coz-claudy-icon coz-bar-hide-sm","data-claudy-opened":o,"data-claudy-loading":r,onClick:this.toggle}),C.a.createElement("div",{className:"coz-claudy-intent-wrapper",ref:function(t){e.intentWrapperRef=t}}))}}]),n}(x.Component),dn=n(340),pn=n.n(dn),hn=n(76),mn=n.n(hn);var yn=function(){return(yn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function vn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function gn(e){return e}function bn(e,t){void 0===t&&(t=gn);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}var wn=function(e){void 0===e&&(e={});var t=bn(null);return t.options=yn({async:!0,ssr:!1},e),t}();function xn(e,t){return n=t,r=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=Object(x.useState)((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade;var n,r,o}var Cn=function(){},kn=x.forwardRef((function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),o=r[0],i=r[1],a=e.forwardProps,u=e.children,c=e.className,s=e.removeScrollBar,l=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,g=vn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=d,w=xn([n,t]),C=yn({},g,o);return x.createElement(x.Fragment,null,l&&x.createElement(b,{sideCar:wn,removeScrollBar:s,shards:f,noIsolation:p,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),a?x.cloneElement(x.Children.only(u),yn({},C,{ref:w})):x.createElement(v,yn({},C,{className:c,ref:w}),u))}));kn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},kn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var Sn,_n=function(e){var t=e.sideCar,n=vn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,yn({},n))};_n.isSideCarExport=!0;function An(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Sn||n.nc;return t&&e.setAttribute("nonce",t),e}var On=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=An())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){!--e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},En=function(){var e,t=(e=On(),function(t){x.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},Bn={left:0,top:0,right:0,gap:0},jn=function(e){return parseInt(e||"",10)||0},Pn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Bn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[jn(n),jn(r),jn(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tn=En(),zn=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[t&&"position: relative "+r+";","margin"===n&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===n&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},In=function(e){var t=x.useState(Pn(e.gapMode)),n=t[0],r=t[1];x.useEffect((function(){r(Pn(e.gapMode))}),[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=void 0===a?"margin":a;return x.createElement(Tn,{styles:zn(n,!o,u,i?"":"!important")})},Dn=function(e,t){var n=t;do{if(Rn(e,n)){var r=Fn(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Rn=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Fn=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Mn=!1;if("undefined"!=typeof window)try{var Nn=Object.defineProperty({},"passive",{get:function(){return Mn=!0,!0}});window.addEventListener("test",Nn,Nn),window.removeEventListener("test",Nn,Nn)}catch(e){Mn=!1}var Ln=!!Mn&&{passive:!1},Un=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$n=function(e){return[e.deltaX,e.deltaY]},Gn=function(e){return e&&"current"in e?e.current:e},qn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Jn=0,Hn=[];var Wn=function(e,t){return e.useMedium(t),_n}(wn,(function(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(Jn++)[0],i=x.useState((function(){return En()}))[0],a=x.useRef(e);x.useEffect((function(){a.current=e}),[e]),x.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(Gn)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+o)})),function(){document.body.classList.remove("block-interactivity-"+o),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+o)}))}}}),[e.inert,e.lockRef.current,e.shards]);var u=x.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=Un(e),u=n.current,c="deltaX"in e?e.deltaX:u[0]-i[0],s="deltaY"in e?e.deltaY:u[1]-i[1],l=e.target,f=Math.abs(c)>Math.abs(s)?"h":"v",d=Dn(f,l);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=Dn(f,l)),!d)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r,o){var i=r,a=n.target,u=t.contains(a),c=!1,s=i>0,l=0,f=0;do{var d=Fn(e,a),p=d[0],h=d[1]-d[2]-p;(p||h)&&Rn(e,a)&&(l+=h,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(s&&(o&&0===l||!o&&i>l)||!s&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,t,e,"h"===p?c:s,!0)}),[]),c=x.useCallback((function(e){var n=e;if(Hn.length&&Hn[Hn.length-1]===i){var r="deltaY"in n?$n(n):Un(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.preventDefault();else if(!o){var c=(a.current.shards||[]).map(Gn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?u(n,c[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),s=x.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),l=x.useCallback((function(e){n.current=Un(e),r.current=void 0}),[]),f=x.useCallback((function(t){s(t.type,$n(t),t.target,u(t,e.lockRef.current))}),[]),d=x.useCallback((function(t){s(t.type,Un(t),t.target,u(t,e.lockRef.current))}),[]);x.useEffect((function(){return Hn.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Ln),document.addEventListener("touchmove",c,Ln),document.addEventListener("touchstart",l,Ln),function(){Hn=Hn.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,Ln),document.removeEventListener("touchmove",c,Ln),document.removeEventListener("touchstart",l,Ln)}}),[]);var p=e.removeScrollBar,h=e.inert;return x.createElement(x.Fragment,null,h?x.createElement(i,{styles:qn(o)}):null,p?x.createElement(In,{gapMode:"margin"}):null)})),Qn=x.forwardRef((function(e,t){return x.createElement(kn,yn({},e,{ref:t,sideCar:Wn}))}));Qn.classNames=kn.classNames;var Vn=Qn;function Yn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Kn=["onEscape","children","className"],Zn=function(e){d()(n,e);var t=Yn(n);function n(){var e;a()(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),g()(l()(e),"handleKeydown",(function(t){27===t.keyCode&&e.props.onEscape()})),g()(l()(e),"handleClick",(function(t){e.props.onClick&&t.target===t.currentTarget&&e.props.onClick()})),e}return c()(n,[{key:"componentDidMount",value:function(){this.props.onEscape&&document.addEventListener("keydown",this.handleKeydown)}},{key:"componentWillUnmount",value:function(){this.props.onEscape&&document.removeEventListener("keydown",this.handleKeydown)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=mn()(this.props,Kn),o=document.body.getBoundingClientRect().height>window.innerHeight?C.a.Fragment:Vn;return C.a.createElement("div",w()({onClick:this.handleClick,className:T()(pn.a["c-overlay"],n)},r),C.a.createElement(o,null,t))}}]),n}(x.Component);Zn.propTypes={className:E.a.string,children:E.a.node,onEscape:E.a.func};var Xn=Zn;function er(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tr(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var nr=n(101),rr=n.n(nr),or=function(e){var t=e.into,n=e.children,r=document.querySelector(t);return rr.a.createPortal(n,r)},ir=n(339),ar=n.n(ir),ur=n(16),cr=n.n(ur);function sr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var lr=function(e){d()(n,e);var t=sr(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){return this.props.children}}]),n}(x.Component);function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var dr=function(e){d()(n,e);var t=fr(n);function n(e){var r;a()(this,n),r=t.call(this,e),g()(l()(r),"UNSAFE_componentWillUpdate",(function(e){var t=e.children;r.refreshComputedParts(t)})),g()(l()(r),"handleScroll",(function(){if(r.contentHeader){var e=l()(r).headerHeight;e||!r.contentHeader.clientHeight?!r.state.displayGhostHeader&&r.scrollingContent.scrollTop>e-20?r.setState((function(){return{displayGhostHeader:!0}})):r.state.displayGhostHeader&&r.scrollingContent.scrollTop<e-20&&r.setState((function(){return{displayGhostHeader:!1}})):r.headerHeight=r.contentHeader.clientHeight}}));var o=r.props.children;return r.refreshComputedParts(o),r.state={displayGhostHeader:!1},r}return c()(n,[{key:"componentWillUpdate",value:function(e,t){this.UNSAFE_componentWillUpdate(e,t)}},{key:"refreshComputedParts",value:function(e){var t=function(e){return C.a.Children.toArray(e).find((function(e){return e&&e.nodeName===lr}))}(e);this.animatedHeader=t,this.childrenToRender=t?function(e){return C.a.Children.map(e,(function(e){return e&&e.nodeName!==lr?e:null}))}(e):e}},{key:"componentDidMount",value:function(){this.scrollingContent.addEventListener("scroll",this.handleScroll,{passive:!0})}},{key:"componentWillUnmount",value:function(){this.scrollingContent.removeEventListener("scroll",this.handleScroll)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.fixed,o=this.state.displayGhostHeader,i=this.animatedHeader,a=this.childrenToRender;return C.a.createElement("div",{className:T()(cr.a["c-modal-content".concat(r?"-fixed":"")],n),ref:function(t){e.scrollingContent=t}},i&&C.a.createElement("div",{className:i.attributes.className,ref:function(t){e.contentHeader=t}},C.a.createElement("h2",{className:cr.a["c-modal-illu-header"]},i.children),C.a.createElement("div",{className:T()(cr.a["c-modal-illu-header--ghost"],i.attributes.activeClassName,g()({},cr.a["is-active"],o))},i.children)),a)}}]),n}(x.Component),pr=function(e){var t=e.children,n=e.className;return C.a.createElement("div",{className:T()(cr.a["c-modal-content"],cr.a["c-modal-section"],n)},t)},hr=function(e){var t=e.title,n=e.children,r=e.className,o=e.appIcon,i=e.appName,a=e.appEditor,u=e.style,c=e.id,s="string"==typeof n;return C.a.createElement("div",{className:T()(cr.a["c-modal-header"],r),style:u,id:c},t&&C.a.createElement("h2",null,t),s?C.a.createElement("h2",null,n):n,i&&C.a.createElement("h2",{className:cr.a["c-modal-app"]},o&&C.a.createElement("img",{className:cr.a["c-modal-app-icon"],src:o}),a&&C.a.createElement("span",{className:cr.a["c-app-editor"]},a," "),i))},mr=function(e){var t=e.logo,n=e.bg,r=e.className,i=e.style,a=void 0===i?{}:i;return C.a.createElement("h2",{className:T()(cr.a["c-modal-header--branded"],r),style:o()({background:n},a)},C.a.createElement("img",{src:t,alt:""}))};var yr=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 24 24"},e),C.a.createElement("path",{fillRule:"evenodd",d:"M10.586 12L.293 1.707A1 1 0 011.707.293L12 10.586 22.293.293a1 1 0 011.414 1.414L13.414 12l10.293 10.293a1 1 0 01-1.414 1.414L12 13.414 1.707 23.707a1 1 0 01-1.414-1.414L10.586 12z"}))},vr=Object(x.createContext)(null),gr=function(){var e=Object(x.useContext)(vr);if(null===e)throw new Error("Cannot use useBreakpoints without BreakpointsProvider. The component must have a BreakpointsProvider above it.");return e},br=function(e){var t=gr().isMobile,n=e.color;return C.a.createElement(R,{icon:yr,size:t?"16":"24",color:n||ne.a.coolGrey})},wr=function(e){var t=e.onClick,n=e.color,r=e.className;return C.a.createElement("button",{className:T()(cr.a["c-modal-close"],r),onClick:t,type:"button","aria-label":"close"},C.a.createElement(br,{color:n}))},xr=function(e){var t=e.children,n=e.className;return C.a.createElement("div",{className:T()(cr.a["c-modal-footer"],n)},t)},Cr=function(e){var t=e.secondaryText,n=e.secondaryAction,r=e.secondaryType,o=e.primaryText,i=e.primaryAction,a=e.primaryType,u=e.children,c=e.className;return C.a.createElement("div",{className:T()("u-flex","u-flex-wrap-reverse","u-flex-justify-end",cr.a["c-modal-footer--button"],c)},u,t&&n&&C.a.createElement(xe,{theme:r,onClick:n,label:t,className:"u-flex-auto-s"}),o&&i&&C.a.createElement(xe,{theme:a,onClick:i,label:o,className:"u-flex-auto-s"}))};Cr.defaultProps={primaryType:"regular",secondaryType:"secondary"};var kr=Cr;var Sr=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 16 16"},e),C.a.createElement("path",{d:"M3.414 7h11.58C15.548 7 16 7.444 16 8c0 .552-.45 1-1.007 1H3.414l5.293 5.293a1 1 0 01-1.414 1.414l-7-7a1 1 0 010-1.414l7-7a1 1 0 111.414 1.414L3.414 7z",fillRule:"evenodd"}))},_r=function(e){var t=gr().isMobile,n=e.className,r=A()(e,["className"]);return C.a.createElement(xe,w()({icon:Sr,iconOnly:!0,extension:"narrow",theme:"text",label:"back",className:T()(cr.a["c-modal-back-button"],"u-m-0 u-pos-absolute",{"u-p-1":t,"u-p-half":!t,"u-h-3":t},n)},r))};function Ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Or=dr,Er=function(e){d()(n,e);var t=Ar(n);function n(e){var r;return a()(this,n),r=t.call(this,e),g()(l()(r),"handleOutsideClick",(function(e){e.target===e.currentTarget&&r.props.dismissAction&&r.props.dismissAction()})),r.titleID=ar()("modal_"),r}return c()(n,[{key:"componentDidMount",value:function(){this.props.title||this.props["aria-label"]||console.warn("If your modal does not provide a `title` prop, please provide the `aria-label` prop for a11y purposes."),document.body.classList.contains("has-modal")||(document.body.classList.add("has-modal"),this.shouldRemoveBodyClass=!0)}},{key:"componentWillUnmount",value:function(){this.shouldRemoveBodyClass&&document.body.classList.remove("has-modal")}},{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.description,o=t.title,i=t.closable,a=t.dismissAction,u=t.overflowHidden,c=t.className,s=t.closeBtnClassName,l=t.closeBtnColor,f=t.into,d=t.size,p=t.height,h=t.width,m=t.spacing,y=t.mobileFullscreen,v=t.overlayClassName,b=t.wrapperClassName,x=t.primaryText,k=t.primaryAction,S=t.primaryType,_=t.secondaryText,O=t.secondaryAction,E=t.secondaryType,B=t.containerClassName,j=A()(t,["children","description","title","closable","dismissAction","overflowHidden","className","closeBtnClassName","closeBtnColor","into","size","height","width","spacing","mobileFullscreen","overlayClassName","wrapperClassName","primaryText","primaryAction","primaryType","secondaryText","secondaryAction","secondaryType","containerClassName"]),P=this.titleID,z=Object.assign({},p&&{height:p},h&&{width:h});return C.a.createElement(or,{into:f},C.a.createElement("div",{className:T()(cr.a["c-modal-container"],B)},C.a.createElement(Xn,{onEscape:i?a:void 0,className:v},C.a.createElement("div",{className:T()(cr.a["c-modal-wrapper"],g()({},cr.a["c-modal-wrapper--fullscreen"],y),b),onClick:i?this.handleOutsideClick:void 0},C.a.createElement("div",w()({className:T()(cr.a["c-modal"],cr.a["c-modal--".concat(d)],(e={},g()(e,cr.a["c-modal--overflowHidden"],u),g()(e,cr.a["c-modal--".concat(m,"-spacing")],m),g()(e,cr.a["c-modal--fullscreen"],y),g()(e,cr.a["c-modal--closable"],i),e),c),style:z,role:"dialog","aria-modal":"true","aria-labelledby":o?P:null},j),i&&C.a.createElement(wr,{className:T()(s,g()({},cr.a["c-modal-close--notitle"],!o)),onClick:a,color:l}),o&&C.a.createElement(hr,{title:o,id:P}),r&&C.a.createElement(Or,null,r),n,x&&k||_&&O?C.a.createElement(xr,null,C.a.createElement(kr,{primaryText:x,primaryAction:k,primaryType:S,secondaryText:_,secondaryAction:O,secondaryType:E})):null)))))}}]),n}(x.Component);Er.propTypes={title:E.a.node,description:E.a.node,secondaryType:E.a.string,secondaryText:E.a.string,secondaryAction:E.a.func,primaryType:E.a.string,primaryText:E.a.string,primaryAction:E.a.func,closable:E.a.bool,overflowHidden:E.a.bool,className:E.a.string,closeBtnClassName:E.a.string,closeBtnColor:E.a.string,into:E.a.string,size:E.a.oneOf(["xsmall","small","medium","large","xlarge","xxlarge"]),height:E.a.string,width:E.a.string,spacing:E.a.oneOf(["small","large"]),mobileFullscreen:E.a.bool,overlayClassName:E.a.string,wrapperClassName:E.a.string,containerClassName:E.a.string,dismissAction:E.a.func},Er.defaultProps={primaryType:"regular",secondaryType:"secondary",closable:!0,overflowHidden:!1,size:"small",into:"body",mobileFullscreen:!1},mr.propTypes={bg:E.a.string.isRequired,logo:E.a.string.isRequired},hr.propTypes={appIcon:E.a.string,appEditor:E.a.string,appName:E.a.string},dr.propTypes={iconSrc:E.a.node,iconDest:E.a.node,fixed:E.a.bool};var Br,jr=(Br=[{src:"withCross",dest:"closable"},{src:"crossClassName",dest:"closeBtnClassName"},{src:"crossColor",dest:"closeBtnColor"},{fn:function(e){var t;return e.secondaryAction&&!e.dismissAction?((t=o()({},e)).dismissAction=e.secondaryAction,[t,"In the future, `secondaryAction` will not be bound to closing actions (clicking on cross, clicking outside), please use `dismissAction` for that"]):[e,null]}}],function(e){var t=function(t){var n=function(e,t){var n,r,i,a=er(t);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(u.src&&u.dest){var c=u.src,s=u.dest;if(void 0===e[c])continue;(n=n||o()({},e))[s]=e[c],delete n[c],r="`".concat(c,"` is deprecated and has been migrated automatically, you should use `").concat(s,"` now")}else if(u.fn){var l=u.fn(n||e);if(2!==l.length)throw new Error("migrateOption `fn` should return [newProps, msg].");var f=Fe()(l,2);n=f[0],r=f[1]}else console.warn("migrateProps option is not valid, valid properties are `src`, `dest`, `fn`. You passed",u);window.SHOW_DEPRECATION_WARNINGS&&r&&(console.warn("Deprecation: ".concat(r)),r=null)}}catch(e){a.e(e)}finally{a.f()}return n||e}(t,Br);return C.a.createElement(e,n)};return t.displayName=e.displayName||e.name,t})(Er);jr.propTypes=Er.propTypes,jr.defaultProps=Er.defaultProps,Object.assign(jr,{ModalContent:dr,ModalSection:pr,ModalFooter:xr,ModalHeader:hr,AnimatedContentHeader:lr,ModalBrandedHeader:mr,ModalDescription:Or,ModalBackButton:_r});var Pr=jr,Tr=n(341),zr=n.n(Tr).a;var Ir=function(e){return C.a.createElement("svg",w()({viewBox:"0 0 32 32"},e,{role:"progressbar","aria-busy":"true"}),C.a.createElement("path",{opacity:.25,d:"M16 0a16 16 0 000 32 16 16 0 000-32m0 4a12 12 0 010 24 12 12 0 010-24"}),C.a.createElement("path",{d:"M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"}))},Dr=n(143),Rr=n.n(Dr),Fr=function(e){var t,n=e.t,r=e.loadingType,o=e.middle,i=e.noMargin,a=e.color,u=e.size,c=e.className,s={tiny:8,small:12,medium:16,large:24,xlarge:36,xxlarge:80}[u];return C.a.createElement("div",{className:T()(Rr.a["c-spinner"],(t={},g()(t,Rr.a["c-spinner--middle"],o),g()(t,Rr.a["c-spinner--nomargin"],i),t),c)},C.a.createElement(R,{icon:Ir,color:a,spin:!0,size:s}),r&&C.a.createElement(zr,{variant:"body1",color:"textSecondary",component:"p"},n("loading.".concat(r))))};Fr.propTypes={loadingType:E.a.string,middle:E.a.bool,noMargin:E.a.bool,color:E.a.string,size:E.a.oneOf(["tiny","small","medium","large","xlarge","xxlarge"]),className:E.a.string},Fr.defaultProps={loadingType:"",middle:!1,noMargin:!1,color:"var(--spinnerColor)",size:"medium",className:""};var Mr=Object(S.translate)()(Fr);function Nr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}var Lr=function(e){d()(n,e);var t=Nr(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),g()(l()(o),"toggle",(function(){o.setState({isLoading:!0}),o.intents.create("SUPPORT","io.cozy.settings").start(o.intentWrapperRef,(function(){o.setState({isLoading:!1})}))})),o.store=r.barStore,o.state={isLoading:!1},o.intents=Object(ue.c)(),o}return c()(n,[{key:"componentDidMount",value:function(){this.toggle()}},{key:"render",value:function(){var e=this,t=this.state.isLoading;return C.a.createElement("div",null,C.a.createElement(Pr,{secondaryAction:this.props.onClose,className:"coz-support-modal",into:"#cozy-bar-modal-dom-place",closeBtnClassName:"coz-support-modal-close"},C.a.createElement(dr,{className:"coz-support-modal-wrapper u-mt-1"},C.a.createElement("div",{className:"coz-support-modal-content"},t&&C.a.createElement(Mr,{size:"xxlarge",middle:!0}),C.a.createElement("div",{className:"coz-support-intent-wrapper".concat(t?" coz-hidden":""),ref:function(t){e.intentWrapperRef=t}})))))}}]),n}(x.Component);function Ur(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h()(this,n)}}function $r(e){return C.a.createElement("svg",w()({width:16,height:16},e),C.a.createElement("path",{d:"M0 0h4v4H0V0zm0 6h4v4H0V6zm0 6h4v4H0v-4zM6 0h4v4H6V0zm0 6h4v4H6V6zm0 6h4v4H6v-4zm6-12h4v4h-4V0zm0 6h4v4h-4V6zm0 6h4v4h-4v-4z",fillRule:"evenodd"}))}n.d(t,"Bar",(function(){return Gr})),n.d(t,"mapStateToProps",(function(){return qr})),n.d(t,"mapDispatchToProps",(function(){return Jr}));var Gr=function(e){d()(n,e);var t=Ur(n);function n(e){var r;return a()(this,n),r=t.call(this,e),g()(l()(r),"toggleDrawer",(function(){if(!r.state.claudyOpened&&!r.state.claudyFired){var e=!r.state.drawerVisible;e&&r.props.onDrawer(e),r.setState({drawerVisible:e})}})),g()(l()(r),"toggleClaudy",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.claudyEnabled){var t=r.state,n=t.usageTracker,o=t.claudyOpened;if(e&&!o)return r.setState({claudyFired:!0});r.state.claudyFired&&r.setState({claudyFired:!1}),n&&n.push(["trackEvent","Claudy",o?"close":"open","claudy"]),r.setState({claudyOpened:!o})}})),g()(l()(r),"toggleSupport",(function(){var e=r.state.supportDisplayed;r.setState({supportDisplayed:!e})})),g()(l()(r),"renderLeft",(function(){var e=r.props,t=e.t,n=e.isPublic,o=e.webviewContext;return o?C.a.createElement(fe,{webviewContext:o}):n?null:C.a.createElement("button",{type:"button",className:"coz-bar-btn coz-bar-burger",onClick:r.toggleDrawer,"data-tutorial":"apps-mobile"},C.a.createElement(R,{icon:$r,width:16,height:16,color:"currentColor"}),C.a.createElement("span",{className:"coz-bar-hidden"},t("drawer")))})),g()(l()(r),"renderRight",(function(){return r.props.isPublic?null:C.a.createElement(Gt,{toggleSupport:r.toggleSupport,onLogOut:r.props.onLogOut})})),r.state={claudyFired:!1,claudyOpened:!1,drawerVisible:!1,usageTracker:null,supportDisplayed:!1,searchBarEnabled:e.isDrive&&!e.isPublic&&!Object(H.isMobileApp)()},r.fetchApps=r.fetchApps.bind(l()(r)),r.fetchInitialData=r.fetchInitialData.bind(l()(r)),r.handleTokenRefreshed=r.handleTokenRefreshed.bind(l()(r)),r}return c()(n,[{key:"componentDidMount",value:function(){G()&&this.initPiwikTracker(),this.fetchInitialData(),this.props.cozyClient.on("tokenRefreshed",this.handleTokenRefreshed)}},{key:"componentWillUnmount",value:function(){this.props.cozyClient.removeListener("tokenRefreshed",this.handleTokenRefreshed)}},{key:"componentDidUpdate",value:function(e,t){!this.props.hasFetchedApps&&this.state.drawerVisible&&t.drawerVisible!==this.state.drawerVisible&&this.fetchApps()}},{key:"handleTokenRefreshed",value:function(){this.fetchInitialData()}},{key:"initPiwikTracker",value:function(){var e=q("https://matomo.cozycloud.cc",8,!1,!1);J({appDimensionId:1,app:"Cozy Bar",heartbeat:0}),this.setState({usageTracker:e})}},{key:"fetchApps",value:function(){this.props.fetchApps()}},{key:"fetchInitialData",value:function(){this.props.isPublic||(this.props.fetchContext(),this.props.fetchSettingsData(!1),this.fetchApps())}},{key:"renderCenter",value:function(){var e=this.props,t=e.appName,n=e.appNamePrefix,r=e.appSlug,o=e.iconPath,i=e.isPublic;return C.a.createElement(Yt,{appName:t,appNamePrefix:n,appSlug:r,iconPath:o,isPublic:i})}},{key:"render",value:function(){var e=this,t=this.state,n=t.claudyFired,r=t.claudyOpened,i=t.drawerVisible,a=t.searchBarEnabled,u=t.supportDisplayed,c=t.usageTracker,s=this.props,l=s.theme,f=s.themeOverrides,d=s.barLeft,p=s.barRight,h=s.barCenter,m=s.barSearch,y=s.claudyEnabled,v=s.onDrawer,g=s.isPublic,b=s.onLogOut,w=s.userActionRequired,x=f.primaryColor,k=f.primaryContrastTextColor,S=x?{"--cozBarThemePrimaryColor":x}:{},_=k?{"--cozBarThemePrimaryContrastTextColor":k}:{},A=o()({},S,_);return C.a.createElement("div",{className:"coz-bar-wrapper coz-theme-".concat(l),style:A},C.a.createElement("div",{id:"cozy-bar-modal-dom-place"}),C.a.createElement("div",{className:"coz-bar-container"},d||this.renderLeft(),h||this.renderCenter(),C.a.createElement("div",{className:"u-flex-grow"},m||(a?C.a.createElement(sn,null):null)),p||this.renderRight(),g?null:C.a.createElement(Et,{visible:i,onClose:this.toggleDrawer,onClaudy:y&&function(){return e.toggleClaudy(!0)}||!1,isClaudyLoading:n,drawerListener:function(){return v(i)},toggleSupport:this.toggleSupport,onLogOut:b}),y&&C.a.createElement(fn,{usageTracker:c,claudyFired:n,onToggle:function(){return e.toggleClaudy(!1)},opened:r}),u&&C.a.createElement(Lr,{onClose:this.toggleSupport})),w&&C.a.createElement(_e,w))}}]),n}(x.Component),qr=function(e){return{theme:Object(qe.j)(e).name,themeOverrides:Object(qe.j)(e).overrides,barLeft:Object(qe.e)(e,"left"),barRight:Object(qe.e)(e,"right"),barCenter:Object(qe.e)(e,"center"),barSearch:Object(qe.e)(e,"search"),isDrive:Object(qe.m)(e,{slug:"drive"}),claudyEnabled:Object(qe.z)(e),hasFetchedApps:Object(qe.l)(e),webviewContext:Object(qe.k)(e)}},Jr=function(e){return{fetchApps:function(){return e(Object(qe.a)())},fetchContext:function(){return e(Object(qe.b)())},fetchSettingsData:function(t){return e(Object(qe.c)(t))}}};t.default=Object(S.translate)()(Object(k.connect)(qr,Jr)(Gr))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=(n(1),o.a.createContext(null));var a=function(e){e()},u={notify:function(){}};function c(){var e=a,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var s=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=u,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=c())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=u)},e}();var l=function(e){var t=e.store,n=e.context,a=e.children,u=Object(r.useMemo)((function(){var e=new s(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),c=Object(r.useMemo)((function(){return t.getState()}),[t]);Object(r.useEffect)((function(){var e=u.subscription;return e.trySubscribe(),c!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[u,c]);var l=n||i;return o.a.createElement(l.Provider,{value:u},a)},f=n(28),d=n(36),p=n(79),h=n.n(p),m=n(77),y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,v=[],g=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function w(e,t,n){y((function(){return e.apply(void 0,t)}),n)}function x(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function C(e,t,n,r,o,i,a,u,c,s){if(e){var l=!1,f=null,d=function(){if(!l){var e,n,d=t.getState();try{e=r(d,o.current)}catch(e){n=e,f=e}n||(f=null),e===i.current?a.current||c():(i.current=e,u.current=e,a.current=!0,s({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=d,n.trySubscribe(),d();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var k=function(){return[null,0]};function S(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,u=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,c=n.methodName,l=void 0===c?"connectAdvanced":c,p=n.renderCountProp,y=void 0===p?void 0:p,S=n.shouldHandleStateChanges,_=void 0===S||S,A=n.storeKey,O=void 0===A?"store":A,E=(n.withRef,n.forwardRef),B=void 0!==E&&E,j=n.context,P=void 0===j?i:j,T=Object(d.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),z=P;return function(t){var n=t.displayName||t.name||"Component",i=u(n),a=Object(f.a)({},T,{getDisplayName:u,methodName:l,renderCountProp:y,shouldHandleStateChanges:_,storeKey:O,displayName:i,wrappedComponentName:n,WrappedComponent:t}),c=T.pure;var p=c?r.useMemo:function(e){return e()};function S(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=Object(d.a)(n,["forwardedRef"]);return[n.context,e,t]}),[n]),u=i[0],c=i[1],l=i[2],h=Object(r.useMemo)((function(){return u&&u.Consumer&&Object(m.isContextConsumer)(o.a.createElement(u.Consumer,null))?u:z}),[u,z]),y=Object(r.useContext)(h),S=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(y)&&Boolean(y.store);var A=S?n.store:y.store,O=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(A)}),[A]),E=Object(r.useMemo)((function(){if(!_)return g;var e=new s(A,S?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[A,S,y]),B=E[0],j=E[1],P=Object(r.useMemo)((function(){return S?y:Object(f.a)({},y,{subscription:B})}),[S,y,B]),T=Object(r.useReducer)(b,v,k),I=T[0][0],D=T[1];if(I&&I.error)throw I.error;var R=Object(r.useRef)(),F=Object(r.useRef)(l),M=Object(r.useRef)(),N=Object(r.useRef)(!1),L=p((function(){return M.current&&l===F.current?M.current:O(A.getState(),l)}),[A,I,l]);w(x,[F,R,N,l,L,M,j]),w(C,[_,A,B,O,F,R,N,M,j,D],[A,B,O]);var U=Object(r.useMemo)((function(){return o.a.createElement(t,Object(f.a)({},L,{ref:c}))}),[c,t,L]);return Object(r.useMemo)((function(){return _?o.a.createElement(h.Provider,{value:P},U):U}),[h,U,P])}var A=c?o.a.memo(S):S;if(A.WrappedComponent=t,A.displayName=i,B){var E=o.a.forwardRef((function(e,t){return o.a.createElement(A,Object(f.a)({},e,{forwardedRef:t}))}));return E.displayName=i,E.WrappedComponent=t,h()(E,t)}return h()(A,t)}}function _(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function A(e,t){if(_(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!_(e[n[o]],t[n[o]]))return!1;return!0}var O=n(205);function E(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function B(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function j(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=B(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=B(o),o=r(t,n)),o},r}}var P=[function(e){return"function"==typeof e?j(e):void 0},function(e){return e?void 0:E((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?E((function(t){return Object(O.bindActionCreators)(e,t)})):void 0}];var T=[function(e){return"function"==typeof e?j(e):void 0},function(e){return e?void 0:E((function(){return{}}))}];function z(e,t,n){return Object(f.a)({},n,{},e,{},t)}var I=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,u){var c=e(t,n,u);return a?o&&i(c,r)||(r=c):(a=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return z}}];function D(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function R(e,t,n,r,o){var i,a,u,c,s,l=o.areStatesEqual,f=o.areOwnPropsEqual,d=o.areStatePropsEqual,p=!1;function h(o,p){var h,m,y=!f(p,a),v=!l(o,i);return i=o,a=p,y&&v?(u=e(i,a),t.dependsOnOwnProps&&(c=t(r,a)),s=n(u,c,a)):y?(e.dependsOnOwnProps&&(u=e(i,a)),t.dependsOnOwnProps&&(c=t(r,a)),s=n(u,c,a)):v?(h=e(i,a),m=!d(h,u),u=h,m&&(s=n(u,c,a)),s):s}return function(o,l){return p?h(o,l):(u=e(i=o,a=l),c=t(r,a),s=n(u,c,a),p=!0,s)}}function F(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Object(d.a)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),u=r(e,i),c=o(e,i);return(i.pure?R:D)(a,u,c,e,i)}function M(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function N(e,t){return e===t}function L(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?S:n,o=t.mapStateToPropsFactories,i=void 0===o?T:o,a=t.mapDispatchToPropsFactories,u=void 0===a?P:a,c=t.mergePropsFactories,s=void 0===c?I:c,l=t.selectorFactory,p=void 0===l?F:l;return function(e,t,n,o){void 0===o&&(o={});var a=o,c=a.pure,l=void 0===c||c,h=a.areStatesEqual,m=void 0===h?N:h,y=a.areOwnPropsEqual,v=void 0===y?A:y,g=a.areStatePropsEqual,b=void 0===g?A:g,w=a.areMergedPropsEqual,x=void 0===w?A:w,C=Object(d.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=M(e,i,"mapStateToProps"),S=M(t,u,"mapDispatchToProps"),_=M(n,s,"mergeProps");return r(p,Object(f.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:S,initMergeProps:_,pure:l,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:x},C))}}var U=L();function $(){return Object(r.useContext)(i)}function G(e){void 0===e&&(e=i);var t=e===i?$:function(){return Object(r.useContext)(e)};return function(){return t().store}}var q=G();function J(e){void 0===e&&(e=i);var t=e===i?q:G(e);return function(){return t().dispatch}}var H=J(),W=function(e,t){return e===t};function Q(e){void 0===e&&(e=i);var t=e===i?$:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=W);var o=t();return function(e,t,n,o){var i,a=Object(r.useReducer)((function(e){return e+1}),0)[1],u=Object(r.useMemo)((function(){return new s(n,o)}),[n,o]),c=Object(r.useRef)(),l=Object(r.useRef)(),f=Object(r.useRef)();try{i=e!==l.current||c.current?e(n.getState()):f.current}catch(e){throw c.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+c.current.stack+"\n\n"),e}return y((function(){l.current=e,f.current=i,c.current=void 0})),y((function(){function e(){try{var e=l.current(n.getState());if(t(e,f.current))return;f.current=e}catch(e){c.current=e}a({})}return u.onStateChange=e,u.trySubscribe(),e(),function(){return u.tryUnsubscribe()}}),[n,u]),i}(e,n,o.store,o.subscription)}}var V,Y=Q(),K=n(101);n.d(t,"Provider",(function(){return l})),n.d(t,"connectAdvanced",(function(){return S})),n.d(t,"ReactReduxContext",(function(){return i})),n.d(t,"connect",(function(){return U})),n.d(t,"batch",(function(){return K.unstable_batchedUpdates})),n.d(t,"useDispatch",(function(){return H})),n.d(t,"createDispatchHook",(function(){return J})),n.d(t,"useSelector",(function(){return Y})),n.d(t,"createSelectorHook",(function(){return Q})),n.d(t,"useStore",(function(){return q})),n.d(t,"createStoreHook",(function(){return G})),n.d(t,"shallowEqual",(function(){return A})),V=K.unstable_batchedUpdates,a=V},function(e,t,n){"use strict";n.r(t);var r=n(14),o=n.n(r),i=n(32),a=n(2),u=n.n(a),c=n(102),s=n(80),l=function(e){return function(t){var n=t.langs,r=t.locales,o=n&&n.length;if(!o)return t;var i=o&&n.includes(e)?e:n[0],a=r&&Object.keys(r);return a&&a.length&&a.includes(i)?(Object(c.a)(u()({},t.slug,r[i])),t):t}},f=function(e){var t=e.getState;return function(e){return function(n){var r=t();switch(n.type){case s.a:!function(e,t){e&&e.forEach(l(t))}(r.apps&&r.apps.apps,n.lang);break;case"RECEIVE_APP_LIST":n.apps&&n.apps.length&&n.apps.forEach(l(r.locale));break;case"RECEIVE_APP":n.app&&l(r.locale&&r.locale.lang)(n.app)}return e(n)}}},d=n(203),p="persist/REHYDRATE",h="persist/REGISTER",m="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},y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function v(e,t,n,r){r.debug;var o=y({},n);return e&&"object"===(void 0===e?"undefined":m(e))&&Object.keys(e).forEach((function(r){"_persist"!==r&&t[r]===n[r]&&(o[r]=e[r])})),o}function g(e){var t=e.blacklist||null,n=e.whitelist||null,r=e.transforms||[],o=e.throttle||0,i=""+(void 0!==e.keyPrefix?e.keyPrefix:"persist:")+e.key,a=e.storage,u=!1===e.serialize?function(e){return e}:b,c={},s={},l=[],f=null,d=null;function p(){if(0===l.length)return f&&clearInterval(f),void(f=null);var e=l.shift(),t=r.reduce((function(t,n){return n.in(t,e,c)}),c[e]);if(void 0!==t)try{s[e]=u(t)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}else delete s[e];0===l.length&&(Object.keys(s).forEach((function(e){void 0===c[e]&&delete s[e]})),d=a.setItem(i,u(s)).catch(h))}function h(e){0}return{update:function(e){Object.keys(e).forEach((function(r){(function(e){return(!n||-1!==n.indexOf(e)||"_persist"===e)&&(!t||-1===t.indexOf(e))})(r)&&c[r]!==e[r]&&-1===l.indexOf(r)&&l.push(r)})),Object.keys(c).forEach((function(t){void 0===e[t]&&l.push(t)})),null===f&&(f=setInterval(p,o)),c=e},flush:function(){for(;0!==l.length;)p();return d||Promise.resolve()}}}function b(e){return JSON.stringify(e)}function w(e){var t=e.transforms||[],n=""+(void 0!==e.keyPrefix?e.keyPrefix:"persist:")+e.key,r=e.storage,o=(e.debug,!1===e.serialize?function(e){return e}:x);return r.getItem(n).then((function(e){if(e)try{var n={},r=o(e);return Object.keys(r).forEach((function(e){n[e]=t.reduceRight((function(t,n){return n.out(t,e,r)}),o(r[e]))})),n}catch(e){throw e}}))}function x(e){return JSON.parse(e)}function C(e){0}var k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function S(e,t){var n=void 0!==e.version?e.version:-1,r=(e.debug,void 0===e.stateReconciler?v:e.stateReconciler),o=e.getStoredState||w,i=void 0!==e.timeout?e.timeout:5e3,a=null,u=!1,c=!0,s=function(e){return e._persist.rehydrated&&a&&!c&&a.update(e),e};return function(l,f){var d=l||{},h=d._persist,m=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(d,["_persist"]);if("persist/PERSIST"===f.type){var y=!1,v=function(t,n){y||(f.rehydrate(e.key,t,n),y=!0)};if(i&&setTimeout((function(){!y&&v(void 0,new Error('redux-persist: persist timed out for persist key "'+e.key+'"'))}),i),c=!1,a||(a=g(e)),h)return l;if("function"!=typeof f.rehydrate||"function"!=typeof f.register)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.");return f.register(e.key),o(e).then((function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,n).then((function(e){v(e)}),(function(e){v(void 0,e)}))}),(function(e){v(void 0,e)})),k({},t(m,f),{_persist:{version:n,rehydrated:!1}})}if("persist/PURGE"===f.type)return u=!0,f.result(function(e){var t=e.storage,n=""+(void 0!==e.keyPrefix?e.keyPrefix:"persist:")+e.key;return t.removeItem(n,C)}(e)),k({},t(m,f),{_persist:h});if("persist/FLUSH"===f.type)return f.result(a&&a.flush()),k({},t(m,f),{_persist:h});if("persist/PAUSE"===f.type)c=!0;else if(f.type===p){if(u)return k({},m,{_persist:k({},h,{rehydrated:!0})});if(f.key===e.key){var b=t(m,f),w=f.payload,x=!1!==r&&void 0!==w?r(w,l,b,e):b,S=k({},x,{_persist:k({},h,{rehydrated:!0})});return s(S)}}if(!h)return t(l,f);var _=t(m,f);return _===m?l:(_._persist=h,s(_))}}var _="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},A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function O(e,t,n,r){r.debug;var o=A({},n);return e&&"object"===(void 0===e?"undefined":_(e))&&Object.keys(e).forEach((function(r){var i;"_persist"!==r&&(t[r]===n[r]&&(null===(i=n[r])||Array.isArray(i)||"object"!==(void 0===i?"undefined":_(i))?o[r]=e[r]:o[r]=A({},o[r],e[r])))})),o}var E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function B(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var j={registry:[],bootstrapped:!1},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments[1];switch(t.type){case h:return E({},e,{registry:[].concat(B(e.registry),[t.key])});case p:var n=e.registry.indexOf(t.key),r=[].concat(B(e.registry));return r.splice(n,1),E({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var T=n(13),z=n(342),I=n(343),D=n.n(I),R=n(344),F=n(138),M=n(78),N=n.n(M);n.d(t,"createStore",(function(){return W}));var L,U,$={storage:D.a,key:"cozy-bar",whitelist:R},G=Object(z.createLogger)({logger:F.a}),q=(L=$,U=o()({},T.t),L.stateReconciler=void 0===L.stateReconciler?O:L.stateReconciler,S(L,Object(i.c)(U))),J=[f,d.default];N()("bar.debug")&&J.push(G);var H,W=function(){var e,t,n,r,o,a,u,c;return H=Object(i.e)(q,i.a.apply(null,J)),e=H,r=n||!1,o=Object(i.e)(P,j,t?t.enhancer:void 0),a=function(e){o.dispatch({type:h,key:e})},u=function(t,n,i){var a={type:p,payload:n,err:i,key:t};e.dispatch(a),o.dispatch(a),r&&c.getState().bootstrapped&&(r(),r=!1)},(c=E({},o,{purge:function(){var t=[];return e.dispatch({type:"persist/PURGE",result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:"persist/FLUSH",result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:"persist/PAUSE"})},persist:function(){e.dispatch({type:"persist/PERSIST",register:a,rehydrate:u})}})).persist(),H};t.default=function(){return H||(H=W()),H}},function(e,t,n){"use strict";n.r(t);var r=n(7),o=n.n(r),i=n(9),a=n.n(i),u=n(24),c=n(25),s=n(13),l=n(4),f=n.n(l),d=n(6),p=n.n(d),h=n(8),m=n.n(h),y=n(10),v=n.n(y),g=n(5),b=n.n(g),w=n(0),x=n.n(w),C=["left","center","right","search"],k=function(e){return e[0].toUpperCase()+e.slice(1)},S=function(e){return"setBar".concat(k(e))},_=function(e){return"Bar".concat(k(e))};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}var O=0,E=function(e){var t={};return C.forEach((function(n){t[S(n)]=function(t){return e.dispatch(Object(s.u)(n,"string"==typeof(r=t)?x.a.createElement("span",{dangerouslySetInnerHTML:{__html:r}}):r,"js"));var r},t[_(n)]=function(e,t){return function(n){m()(o,n);var r=A(o);function o(){return f()(this,o),r.apply(this,arguments)}return p()(o,[{key:"componentDidMount",value:function(){this.componentId=O++,this.setContent(this.props.children)}},{key:"setContent",value:function(n){try{n=x.a.Children.only(n)}catch(e){}e.dispatch(Object(s.u)(t,n,this.componentId))}},{key:"unsetContent",value:function(){e.dispatch(Object(s.A)(t,this.componentId))}},{key:"componentWillUnmount",value:function(){this.unsetContent()}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&this.setContent(this.props.children)}},{key:"render",value:function(){return null}}]),o}(w.Component)}(e,n)})),t.setLocale=function(){e.dispatch(s.w.apply(void 0,arguments))},t.setTheme=function(){e.dispatch(s.x.apply(void 0,arguments))},t.setWebviewContext=function(){e.dispatch(s.y.apply(void 0,arguments))},t},B=function(e){console.error("You tried to use the CozyBar API (".concat(e,") but the CozyBar is not initialised yet via cozy.bar.init(...)."))},j=function(e,t){return function(){if(e[t])return e[t].apply(e,arguments);B(t)}},P=function(){var e=document.querySelector("[role=application]");return e&&e.dataset?e.dataset:{}},T=function(){var e=document.querySelector('link[rel="icon"][sizes^="32"]');return null!==e?e.getAttribute("href"):"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},z=function(){return P().cozyAppNamePrefix||null},I=function(){return P().cozyAppSlug||null},D=function(){var e=document.querySelector("meta[name=user-action-required]"),t=e&&e.dataset;if(t){var n=t.title,r=t.code,o=t.detail,i=t.links;if(r)return{title:n,code:r,detail:o,links:i}}},R=n(333),F=n(334),M=n(335);n.d(t,"init",(function(){return q})),n.d(t,"version",(function(){return re})),n.d(t,"setBarCenter",(function(){return W})),n.d(t,"setBarLeft",(function(){return Q})),n.d(t,"setBarRight",(function(){return V})),n.d(t,"setBarSearch",(function(){return Y})),n.d(t,"BarLeft",(function(){return X})),n.d(t,"BarRight",(function(){return Z})),n.d(t,"BarCenter",(function(){return K})),n.d(t,"BarSearch",(function(){return ee})),n.d(t,"setTheme",(function(){return te})),n.d(t,"setWebviewContext",(function(){return ne})),n.d(t,"updateAccessToken",(function(){return J})),n.d(t,"setLocale",(function(){return s.w}));var N={en:R,fr:F,es:M},L=function(e){if(null===document.getElementById("coz-bar")){var t=function(){var e=Object(u.isMobileApp)()?"mobile":"browser",t=document.createElement("div");return t.setAttribute("id","coz-bar"),t.setAttribute("role","banner"),t.classList.add("coz-target--".concat(e)),t}(),n=document.querySelector("[role=application]");return n?(document.body.insertBefore(t,n),e.onDrawer=function(e){t.dataset.drawerVisible=e},e.userActionRequired&&document.body.classList.add("has-banner"),t):(console.warn('Cozy-bar is looking for a "'.concat("[role=application]","\" tag that contains your application and can't find it :'(… The BAR is now disabled")),null)}},U=function(e,t){var r=n(0),o=n(101).render,i=n(38),a=i.connect,u=i.Provider,c=n(23).default,l=n(745).default,f=n(29).CozyProvider,d=t.cozyClient,p=a((function(e){return{lang:Object(s.g)(e)}}))(c),h=r.createElement(u,{store:t.reduxStore},r.createElement(p,{dictRequire:function(e){return N[e]}},d?r.createElement(f,{client:d},r.createElement(l,t)):r.createElement(l,t)));return o(h,e),h},$=function(e){var t=e.cozyURL,r=e.token,o=e.isPublic,i={uri:t||function(e){var t=P();if(!t.cozyDomain)return e||console.warn("Cozy-bar can't discover the cozy's URL, and will probably fail to initialize the connection with the stack."),"";var n=window.location.protocol;return"".concat(n,"//").concat(t.cozyDomain)}(o),token:r||function(e){var t=P();return t.cozyToken?t.cozyToken:(e||console.warn("Cozy-bar can't discover the app's token, and will probably fail to initialize the connection with the stack."),"")}(o)},a=n(29).default;return console.warn("Automatically made cozyClient. Options: ",i),new a(i)},G={},q=function(){var e=a()(o.a.mark((function e(){var t,r,i,a,u,l,f,d,p,h,m,y,v,g,b,w,x,C,k,S,_,A,O=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=O.length>0&&void 0!==O[0]?O[0]:{},r=t.appName,i=t.appNamePrefix,a=void 0===i?z():i,u=t.appSlug,l=void 0===u?I():u,f=t.lang,d=t.iconPath,p=void 0===d?T():d,h=t.cozyClient,m=t.cozyURL,y=t.token,v=t.replaceTitleOnMobile,g=void 0!==v&&v,b=t.isPublic,w=void 0!==b&&b,x=t.onLogOut,!w&&/^\/public/.test(window.location.pathname)&&(w=!0),h||(h=$({cozyURL:m,token:y,isPublic:w})),C=n(747).default,(k=C()).dispatch(Object(s.v)(r,a,l)),c.b.init({cozyClient:h,onCreate:function(e){return k.dispatch(Object(s.r)(e))},onDelete:function(e){return k.dispatch(Object(s.s)(e))}}),f&&k.dispatch(Object(s.w)(f)),S=E(k),Object.assign(G,S),_={appName:r,appNamePrefix:a,appSlug:l,cozyClient:h,iconPath:p,replaceTitleOnMobile:g,isPublic:w,onLogOut:x,userActionRequired:D(),reduxStore:k},A=L(_),U(A,_);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(e){c.b.updateAccessToken(e)},H=function(e){var t={};C.forEach((function(n){var r=S(n),o=_(n);t[r]=j(e,r),t[o]=function(t){if(e[o])return x.a.createElement(e[o],t);B(o)}}));for(var n=0,r=["setLocale","setTheme","setWebviewContext"];n<r.length;n++){var o=r[n];t[o]=j(e,o)}return t}(G),W=H.setBarCenter,Q=H.setBarLeft,V=H.setBarRight,Y=H.setBarSearch,K=H.BarCenter,Z=H.BarRight,X=H.BarLeft,ee=H.BarSearch,te=H.setTheme,ne=H.setWebviewContext,re="0.0.0-development"}])}));
|
|
77
|
+
//# sourceMappingURL=cozy-bar.min.js.map
|