cozy-bar 8.11.0 → 8.11.1
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/dist/cozy-bar.min.js +2 -2
- package/dist/cozy-bar.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Settings/SettingsContent.jsx +2 -2
- package/src/styles/nav.css +1 -1
- package/src/styles/settings.css +2 -1
- package/transpiled/components/Settings/SettingsContent.js +1 -2
- package/transpiled/cozy-bar.css +3 -2
- package/transpiled/styles/nav.css +1 -1
- package/transpiled/styles/settings.css +2 -1
package/dist/cozy-bar.min.js
CHANGED
|
@@ -53,7 +53,7 @@ object-assign
|
|
|
53
53
|
* Released under MIT license <https://lodash.com/license>
|
|
54
54
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
55
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]",p="[object Error]",d="[object Function]",h="[object GeneratorFunction]",v="[object Map]",y="[object Number]",g="[object Object]",m="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",E="[object Float64Array]",j="[object Int8Array]",P="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",A="[object Uint16Array]",R="[object Uint32Array]",D=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,z=RegExp(N.source),L=RegExp(F.source),U=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,$=RegExp(V.source),J=/^\s+|\s+$/g,G=/^\s+/,Y=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,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,pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\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]",ve="["+de+"]",ye="["+pe+"]",ge="\\d+",me="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+de+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",xe="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+be+"|"+we+")",je="(?:"+Se+"|"+we+")",Pe="(?:"+ye+"|"+_e+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Pe+("(?:\\u200d(?:"+[xe,ke,Oe].join("|")+")[\\ufe0e\\ufe0f]?"+Pe+")*"),Te="(?:"+[me,ke,Oe].join("|")+")"+Ce,Ae="(?:"+[xe+ye+"?",ye,ke,Oe,he].join("|")+")",Re=RegExp("['’]","g"),De=RegExp(ye,"g"),Ie=RegExp(_e+"(?="+_e+")|"+Ae+Ce,"g"),Me=RegExp([Se+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,Se,"$"].join("|")+")",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,Se+Ee,"$"].join("|")+")",Se+"?"+Ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Se+"+(?:['’](?: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_])",ge,Te].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff"+pe+"\\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 ]/,ze=["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"],Le=-1,Ue={};Ue[S]=Ue[E]=Ue[j]=Ue[P]=Ue[C]=Ue[T]=Ue["[object Uint8ClampedArray]"]=Ue[A]=Ue[R]=!0,Ue[c]=Ue[s]=Ue[k]=Ue[l]=Ue[O]=Ue[f]=Ue[p]=Ue[d]=Ue[v]=Ue[y]=Ue[g]=Ue[m]=Ue[b]=Ue[w]=Ue[x]=!1;var Be={};Be[c]=Be[s]=Be[k]=Be[O]=Be[l]=Be[f]=Be[S]=Be[E]=Be[j]=Be[P]=Be[C]=Be[v]=Be[y]=Be[g]=Be[m]=Be[b]=Be[w]=Be[_]=Be[T]=Be["[object Uint8ClampedArray]"]=Be[A]=Be[R]=!0,Be[p]=Be[d]=Be[x]=!1;var We={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=parseFloat,He=parseInt,Qe="object"==typeof e&&e&&e.Object===Object&&e,Ve="object"==typeof self&&self&&self.Object===Object&&self,$e=Qe||Ve||Function("return this")(),Je=t&&!t.nodeType&&t,Ge=Je&&"object"==typeof r&&r&&!r.nodeType&&r,Ye=Ge&&Ge.exports===Je,Ke=Ye&&Qe.process,Xe=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||Ke&&Ke.binding&&Ke.binding("util")}catch(e){}}(),Ze=Xe&&Xe.isArrayBuffer,et=Xe&&Xe.isDate,tt=Xe&&Xe.isMap,nt=Xe&&Xe.isRegExp,rt=Xe&&Xe.isSet,ot=Xe&&Xe.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)&&_t(e,t,0)>-1}function pt(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 dt(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 vt(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 gt(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 mt=St("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 _t(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 xt(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 Ot(e,t){var n=null==e?0:e.length;return n?Pt(e,t)/n:NaN}function St(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function jt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Pt(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 Ct(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Tt(e){return function(t){return e(t)}}function At(e,t){return dt(t,(function(t){return e[t]}))}function Rt(e,t){return e.has(t)}function Dt(e,t){for(var n=-1,r=e.length;++n<r&&_t(t,e[n],0)>-1;);return n}function It(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Mt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Nt=Et({"À":"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=Et({"&":"&","<":"<",">":">",'"':""","'":"'"});function zt(e){return"\\"+We[e]}function Lt(e){return Ne.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Bt(e,t){return function(n){return e(t(n))}}function Wt(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 qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Qt(e){return Lt(e)?function(e){var t=Ie.lastIndex=0;for(;Ie.test(e);)++t;return t}(e):mt(e)}function Vt(e){return Lt(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.split("")}(e)}var $t=Et({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Jt=function e(t){var n,r=(t=null==t?$e:Jt.defaults($e.Object(),t,Jt.pick($e,ze))).Array,o=t.Date,pe=t.Error,de=t.Function,he=t.Math,ve=t.Object,ye=t.RegExp,ge=t.String,me=t.TypeError,be=r.prototype,we=de.prototype,_e=ve.prototype,xe=t["__core-js_shared__"],ke=we.toString,Oe=_e.hasOwnProperty,Se=0,Ee=(n=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=_e.toString,Pe=ke.call(ve),Ce=$e._,Te=ye("^"+ke.call(Oe).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=Ye?t.Buffer:void 0,Ie=t.Symbol,Ne=t.Uint8Array,We=Ae?Ae.allocUnsafe:void 0,Qe=Bt(ve.getPrototypeOf,ve),Ve=ve.create,Je=_e.propertyIsEnumerable,Ge=be.splice,Ke=Ie?Ie.isConcatSpreadable:void 0,Xe=Ie?Ie.iterator:void 0,mt=Ie?Ie.toStringTag:void 0,Et=function(){try{var e=ei(ve,"defineProperty");return e({},"",{}),e}catch(e){}}(),Gt=t.clearTimeout!==$e.clearTimeout&&t.clearTimeout,Yt=o&&o.now!==$e.Date.now&&o.now,Kt=t.setTimeout!==$e.setTimeout&&t.setTimeout,Xt=he.ceil,Zt=he.floor,en=ve.getOwnPropertySymbols,tn=Ae?Ae.isBuffer:void 0,nn=t.isFinite,rn=be.join,on=Bt(ve.keys,ve),an=he.max,un=he.min,cn=o.now,sn=t.parseInt,ln=he.random,fn=be.reverse,pn=ei(t,"DataView"),dn=ei(t,"Map"),hn=ei(t,"Promise"),vn=ei(t,"Set"),yn=ei(t,"WeakMap"),gn=ei(ve,"create"),mn=yn&&new yn,bn={},wn=ji(pn),_n=ji(dn),xn=ji(hn),kn=ji(vn),On=ji(yn),Sn=Ie?Ie.prototype:void 0,En=Sn?Sn.valueOf:void 0,jn=Sn?Sn.toString:void 0;function Pn(e){if(Ha(e)&&!Da(e)&&!(e instanceof Rn)){if(e instanceof An)return e;if(Oe.call(e,"__wrapped__"))return Pi(e)}return new An(e)}var Cn=function(){function e(){}return function(t){if(!qa(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Tn(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}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 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 Mn(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 Nn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Fn(e){var t=this.__data__=new In(e);this.size=t.size}function zn(e,t){var n=Da(e),r=!n&&Ra(e),o=!n&&!r&&Fa(e),i=!n&&!r&&!o&&Xa(e),a=n||r||o||i,u=a?Ct(e.length,ge):[],c=u.length;for(var s in e)!t&&!Oe.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 Ln(e){var t=e.length;return t?e[Nr(0,t-1)]:void 0}function Un(e,t){return Oi(mo(e),Gn(t,0,e.length))}function Bn(e){return Oi(mo(e))}function Wn(e,t,n){(void 0!==n&&!Ca(e[t],n)||void 0===n&&!(t in e))&&$n(e,t,n)}function qn(e,t,n){var r=e[t];Oe.call(e,t)&&Ca(r,n)&&(void 0!==n||t in e)||$n(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Ca(e[n][0],t))return n;return-1}function Qn(e,t,n,r){return er(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Vn(e,t){return e&&bo(t,wu(t),e)}function $n(e,t,n){"__proto__"==t&&Et?Et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:vu(e,t[n]);return i}function Gn(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,p=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!qa(e))return e;var x=Da(e);if(x){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return mo(e,a)}else{var D=ri(e),I=D==d||D==h;if(Fa(e))return fo(e,u);if(D==g||D==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,_u(t),e)}(a,e)):function(e,t){return bo(e,ti(e),t)}(e,Vn(a,e))}else{if(!Be[D])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 O:return function(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case S:case E:case j:case P:case C:case T:case"[object Uint8ClampedArray]":case A:case R:return ho(e,n);case v:return new r;case y:case w:return new r(e);case m: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 _:return o=e,En?ve(En.call(o)):{}}var o}(e,D,u)}}i||(i=new Fn);var M=i.get(e);if(M)return M;i.set(e,a),Ga(e)?e.forEach((function(r){a.add(Yn(r,t,n,r,e,i))})):Qa(e)&&e.forEach((function(r,o){a.set(o,Yn(r,t,n,o,e,i))}));var N=x?void 0:(p?s?$o:Vo:s?_u:wu)(e);return ut(N||e,(function(r,o){N&&(r=e[o=r]),qn(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=ve(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 Xn(e,t,n){if("function"!=typeof e)throw new me(i);return wi((function(){e.apply(void 0,n)}),t)}function Zn(e,t,n,r){var o=-1,i=ft,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=dt(t,Tt(n))),r?(i=pt,a=!1):t.length>=200&&(i=Rt,a=!1,t=new Nn(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 p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Pn.templateSettings={escape:U,evaluate:B,interpolate:W,variable:"",imports:{_:Pn}},Pn.prototype=Tn.prototype,Pn.prototype.constructor=Pn,An.prototype=Cn(Tn.prototype),An.prototype.constructor=An,Rn.prototype=Cn(Tn.prototype),Rn.prototype.constructor=Rn,Dn.prototype.clear=function(){this.__data__=gn?gn(null):{},this.size=0},Dn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Dn.prototype.get=function(e){var t=this.__data__;if(gn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Oe.call(t,e)?t[e]:void 0},Dn.prototype.has=function(e){var t=this.__data__;return gn?void 0!==t[e]:Oe.call(t,e)},Dn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gn&&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=Hn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,!0)},In.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},In.prototype.has=function(e){return Hn(this.__data__,e)>-1},In.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(dn||In),string:new Dn}},Mn.prototype.delete=function(e){var t=Xo(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Xo(this,e).get(e)},Mn.prototype.has=function(e){return Xo(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Xo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.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(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=xo(cr),tr=xo(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 Ua(e[t])}))}function fr(e,t){for(var n=0,r=(t=uo(t,e)).length;null!=e&&n<r;)e=e[Ei(t[n++])];return n&&n==r?e:void 0}function pr(e,t,n){var r=t(e);return Da(e)?r:ht(r,n(e))}function dr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":mt&&mt in ve(e)?function(e){var t=Oe.call(e,mt),n=e[mt];try{e[mt]=void 0;var r=!0}catch(e){}var o=je.call(e);r&&(t?e[mt]=n:delete e[mt]);return o}(e):function(e){return je.call(e)}(e)}function hr(e,t){return e>t}function vr(e,t){return null!=e&&Oe.call(e,t)}function yr(e,t){return null!=e&&t in ve(e)}function gr(e,t,n){for(var o=n?pt: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=dt(f,Tt(t))),s=un(f.length,s),c[u]=!n&&(t||i>=120&&f.length>=120)?new Nn(u&&f):void 0}f=e[0];var p=-1,d=c[0];e:for(;++p<i&&l.length<s;){var h=f[p],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Rt(d,v):o(l,v,n))){for(u=a;--u;){var y=c[u];if(!(y?Rt(y,v):o(e[u],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function mr(e,t,n){var r=null==(e=yi(e,t=uo(t,e)))?e:e[Ei(Li(t))];return null==r?void 0:it(r,e,n)}function br(e){return Ha(e)&&dr(e)==c}function wr(e,t,n,r,o){return e===t||(null==e||null==t||!Ha(e)&&!Ha(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Da(e),u=Da(t),d=a?s:ri(e),h=u?s:ri(t),x=(d=d==c?g:d)==g,S=(h=h==c?g:h)==g,E=d==h;if(E&&Fa(e)){if(!Fa(t))return!1;a=!0,x=!1}if(E&&!x)return i||(i=new Fn),a||Xa(e)?Ho(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case O: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 Ne(e),new Ne(t)));case l:case f:case y:return Ca(+e,+t);case p:return e.name==t.name&&e.message==t.message;case m:case w:return e==t+"";case v:var u=Ut;case b:var c=1&r;if(u||(u=qt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var d=Ho(u(e),u(t),r,o,i,a);return a.delete(e),d;case _:if(En)return En.call(e)==En.call(t)}return!1}(e,t,d,n,r,o,i);if(!(1&n)){var j=x&&Oe.call(e,"__wrapped__"),P=S&&Oe.call(t,"__wrapped__");if(j||P){var C=j?e.value():e,T=P?t.value():t;return i||(i=new Fn),o(C,T,n,r,i)}}if(!E)return!1;return i||(i=new Fn),function(e,t,n,r,o,i){var a=1&n,u=Vo(e),c=u.length,s=Vo(t).length;if(c!=s&&!a)return!1;var l=c;for(;l--;){var f=u[l];if(!(a?f in t:Oe.call(t,f)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);var v=a;for(;++l<c;){f=u[l];var y=e[f],g=t[f];if(r)var m=a?r(g,y,f,t,e,i):r(y,g,f,e,t,i);if(!(void 0===m?y===g||o(y,g,n,r,i):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){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 _r(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=ve(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 p=r(s,l,c,e,t,f);if(!(void 0===p?wr(l,s,3,r,f):p))return!1}}return!0}function xr(e){return!(!qa(e)||(t=e,Ee&&Ee in t))&&(Ua(e)?Te:ae).test(ji(e));var t}function kr(e){return"function"==typeof e?e:null==e?Vu:"object"==typeof e?Da(e)?Cr(e[0],e[1]):Pr(e):tc(e)}function Or(e){if(!pi(e))return on(e);var t=[];for(var n in ve(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Sr(e){if(!qa(e))return function(e){var t=[];if(null!=e)for(var n in ve(e))t.push(n);return t}(e);var t=pi(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}function Er(e,t){return e<t}function jr(e,t){var n=-1,o=Ma(e)?r(e.length):[];return er(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Pr(e){var t=Zo(e);return 1==t.length&&t[0][2]?hi(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}}function Cr(e,t){return si(e)&&di(t)?hi(Ei(e),t):function(n){var r=vu(n,e);return void 0===r&&r===t?yu(n,e):wr(t,r,3)}}function Tr(e,t,n,r,o){e!==t&&ar(t,(function(i,a){if(o||(o=new Fn),qa(i))!function(e,t,n,r,o,i,a){var u=mi(e,n),c=mi(t,n),s=a.get(c);if(s)return void Wn(e,n,s);var l=i?i(u,c,n+"",e,t,a):void 0,f=void 0===l;if(f){var p=Da(c),d=!p&&Fa(c),h=!p&&!d&&Xa(c);l=c,p||d||h?Da(u)?l=u:Na(u)?l=mo(u):d?(f=!1,l=fo(c,!0)):h?(f=!1,l=ho(c,!0)):l=[]:$a(c)||Ra(c)?(l=u,Ra(u)?l=au(u):qa(u)&&!Ua(u)||(l=ii(c))):f=!1}f&&(a.set(c,l),o(l,c,r,i,a),a.delete(c));Wn(e,n,l)}(e,t,a,n,Tr,r,o);else{var u=r?r(mi(e,a),i,a+"",e,t,o):void 0;void 0===u&&(u=i),Wn(e,a,u)}}),_u)}function Ar(e,t){var n=e.length;if(n)return ui(t+=t<0?n:0,n)?e[t]:void 0}function Rr(e,t,n){t=t.length?dt(t,(function(e){return Da(e)?function(t){return fr(t,1===e.length?e[0]:e)}:e})):[Vu];var r=-1;return t=dt(t,Tt(Ko())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(jr(e,(function(e,n,o){return{criteria:dt(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=vo(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 Dr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=fr(e,a);n(u,a)&&Br(i,uo(a,e),u)}return i}function Ir(e,t,n,r){var o=r?xt:_t,i=-1,a=t.length,u=e;for(e===t&&(t=mo(t)),n&&(u=dt(e,Tt(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ge.call(u,c,1),Ge.call(e,c,1);return e}function Mr(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)?Ge.call(e,o,1):Zr(e,o)}}return e}function Nr(e,t){return e+Zt(ln()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Zt(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return _i(vi(e,t,Vu),e+"")}function Lr(e){return Ln(Cu(e))}function Ur(e,t){var n=Cu(e);return Oi(n,Gn(t,0,n.length))}function Br(e,t,n,r){if(!qa(e))return e;for(var o=-1,i=(t=uo(t,e)).length,a=i-1,u=e;null!=u&&++o<i;){var c=Ei(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=qa(l)?l:ui(t[o+1])?[]:{})}qn(u,c,s),u=u[c]}return e}var Wr=mn?function(e,t){return mn.set(e,t),e}:Vu,qr=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:qu(t),writable:!0})}:Vu;function Hr(e){return Oi(Cu(e))}function Qr(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 Vr(e,t){var n;return er(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function $r(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 Jr(e,t,Vu,n)}function Jr(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=Zt((o+i)/2),f=n(e[l]),p=void 0!==f,d=null===f,h=f==f,v=Ka(f);if(a)var y=r||h;else y=s?h&&(r||p):u?h&&p&&(r||!d):c?h&&p&&!d&&(r||!v):!d&&!v&&(r?f<=t:f<t);y?o=l+1:i=l}return un(i,4294967294)}function Gr(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||!Ca(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(Da(e))return dt(e,Kr)+"";if(Ka(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Xr(e,t,n){var r=-1,o=ft,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pt;else if(i>=200){var s=t?null:zo(e);if(s)return qt(s);a=!1,o=Rt,c=new Nn}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 p=c.length;p--;)if(c[p]===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 Zr(e,t){return null==(e=yi(e,t=uo(t,e)))||delete e[Ei(Li(t))]}function eo(e,t,n,r){return Br(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?Qr(e,r?0:i,r?i+1:o):Qr(e,r?i+1:0,r?o:i)}function no(e,t){var n=e;return n instanceof Rn&&(n=n.value()),vt(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?Xr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],c=-1;++c<o;)c!=i&&(a[i]=Zn(a[i]||u,e[c],t,n));return Xr(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 Na(e)?e:[]}function ao(e){return"function"==typeof e?e:Vu}function uo(e,t){return Da(e)?e:si(e,t)?[e]:Si(uu(e))}var co=zr;function so(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Qr(e,t,n)}var lo=Gt||function(e){return $e.clearTimeout(e)};function fo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function po(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function ho(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vo(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),p=!o;++c<s;)f[c]=t[c];for(;++i<u;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}function go(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),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++s<l;)p[h+s]=t[s];for(;++u<c;)(d||i<a)&&(p[h+n[u]]=e[i++]);return p}function mo(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?$n(n,u,c):qn(n,u,c)}return n}function wo(e,t){return function(n,r){var o=Da(n)?at:Qn,i=t?t():{};return o(n,e,Ko(r,2),i)}}function _o(e){return zr((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=ve(t);++r<o;){var u=n[r];u&&e(t,u,r,i)}return t}))}function xo(e,t){return function(n,r){if(null==n)return n;if(!Ma(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ve(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=ve(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 Oo(e){return function(t){var n=Lt(t=uu(t))?Vt(t):void 0,r=n?n[0]:t.charAt(0),o=n?so(n,1).join(""):t.slice(1);return r[e]()+o}}function So(e){return function(t){return vt(Uu(Ru(t).replace(Re,"")),e,"")}}function Eo(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=Cn(e.prototype),r=e.apply(n,t);return qa(r)?r:n}}function jo(e){return function(t,n,r){var o=ve(t);if(!Ma(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 Po(e){return Qo((function(t){var n=t.length,r=n,o=An.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new me(i);if(o&&!u&&"wrapper"==Go(a))var u=new An([],!0)}for(r=u?r:n;++r<n;){var c=Go(a=t[r]),s="wrapper"==c?Jo(a):void 0;u=s&&li(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Go(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&&Da(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 Co(e,t,n,o,i,a,u,c,s,l){var f=128&t,p=1&t,d=2&t,h=24&t,v=512&t,y=d?void 0:Eo(e);return function g(){for(var m=arguments.length,b=r(m),w=m;w--;)b[w]=arguments[w];if(h)var _=Yo(g),x=Mt(b,_);if(o&&(b=yo(b,o,i,h)),a&&(b=go(b,a,u,h)),m-=x,h&&m<l){var k=Wt(b,_);return No(e,t,Co,g.placeholder,n,b,k,c,s,l-m)}var O=p?n:this,S=d?O[e]:e;return m=b.length,c?b=gi(b,c):v&&m>1&&b.reverse(),f&&s<m&&(b.length=s),this&&this!==$e&&this instanceof g&&(S=y||Eo(S)),S.apply(O,b)}}function To(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 Ao(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 Ro(e){return Qo((function(t){return t=dt(t,Tt(Ko())),zr((function(n){var r=this;return e(t,(function(e){return it(e,r,n)}))}))}))}function Do(e,t){var n=(t=void 0===t?" ":Kr(t)).length;if(n<2)return n?Fr(t,e):t;var r=Fr(t,Xt(e/Qt(t)));return Lt(t)?so(Vt(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(Xt((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 Mo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=iu(t),n=iu(n)),e(t,n)}}function No(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],p=n.apply(void 0,f);return li(e)&&bi(p,f),p.placeholder=r,xi(p,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 zo=vn&&1/qt(new vn([,-0]))[1]==1/0?function(e){return new vn(e)}:Ku;function Lo(e){return function(t){var n=ri(t);return n==v?Ut(t):n==b?Ht(t):function(e,t){return dt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Uo(e,t,n,o,u,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new me(i);var p=o?o.length:0;if(p||(t&=-97,o=u=void 0),s=void 0===s?s:an(ru(s),0),l=void 0===l?l:ru(l),p-=u?u.length:0,64&t){var d=o,h=u;o=u=void 0}var v=f?void 0:Jo(e),y=[e,t,n,o,u,d,h,c,s,l];if(v&&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?Wt(e[3],a):t[4]}(c=t[5])&&(s=e[5],e[5]=s?go(s,c,t[6]):c,e[6]=s?Wt(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,v),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]-p,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var o=Eo(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?[]:Wt(u,s);if((a-=l.length)<n)return No(e,t,Co,i.placeholder,void 0,u,l,void 0,void 0,n-a);var f=this&&this!==$e&&this instanceof i?o:e;return it(f,this,u)}}(e,t,l):32!=t&&33!=t||u.length?Co.apply(void 0,y):function(e,t,n,o){var i=1&t,a=Eo(e);return function t(){for(var u=-1,c=arguments.length,s=-1,l=o.length,f=r(l+c),p=this&&this!==$e&&this instanceof t?a:e;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++u];return it(p,i?n:this,f)}}(e,t,n,o);else var g=function(e,t,n){var r=1&t,o=Eo(e);return function t(){var i=this&&this!==$e&&this instanceof t?o:e;return i.apply(r?n:this,arguments)}}(e,t,n);return xi((v?Wr:bi)(g,y),e,t)}function Bo(e,t,n,r){return void 0===e||Ca(e,_e[n])&&!Oe.call(r,n)?t:e}function Wo(e,t,n,r,o,i){return qa(e)&&qa(t)&&(i.set(t,e),Tr(e,t,void 0,Wo,i),i.delete(t)),e}function qo(e){return $a(e)?void 0:e}function Ho(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,p=!0,d=2&n?new Nn:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!gt(t,(function(e,t){if(!Rt(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Qo(e){return _i(vi(e,void 0,Ii),e+"")}function Vo(e){return pr(e,wu,ti)}function $o(e){return pr(e,_u,ni)}var Jo=mn?function(e){return mn.get(e)}:Ku;function Go(e){for(var t=e.name+"",n=bn[t],r=Oe.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(Oe.call(Pn,"placeholder")?Pn:e).placeholder}function Ko(){var e=Pn.iteratee||$u;return e=e===$u?kr:e,arguments.length?e(arguments[0],arguments[1]):e}function Xo(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 Zo(e){for(var t=wu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,di(o)]}return t}function ei(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xr(n)?n:void 0}var ti=en?function(e){return null==e?[]:(e=ve(e),lt(en(e),(function(t){return Je.call(e,t)})))}:oc,ni=en?function(e){for(var t=[];e;)ht(t,ti(e)),e=Qe(e);return t}:oc,ri=dr;function oi(e,t,n){for(var r=-1,o=(t=uo(t,e)).length,i=!1;++r<o;){var a=Ei(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Wa(o)&&ui(a,o)&&(Da(e)||Ra(e))}function ii(e){return"function"!=typeof e.constructor||pi(e)?{}:Cn(Qe(e))}function ai(e){return Da(e)||Ra(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(!qa(n))return!1;var r=typeof t;return!!("number"==r?Ma(n)&&ui(t,n.length):"string"==r&&t in n)&&Ca(n[t],e)}function si(e,t){if(Da(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ka(e))||(H.test(e)||!q.test(e)||null!=t&&e in ve(t))}function li(e){var t=Go(e),n=Pn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=Jo(n);return!!r&&e===r[0]}(pn&&ri(new pn(new ArrayBuffer(1)))!=O||dn&&ri(new dn)!=v||hn&&"[object Promise]"!=ri(hn.resolve())||vn&&ri(new vn)!=b||yn&&ri(new yn)!=x)&&(ri=function(e){var t=dr(e),n=t==g?e.constructor:void 0,r=n?ji(n):"";if(r)switch(r){case wn:return O;case _n:return v;case xn:return"[object Promise]";case kn:return b;case On:return x}return t});var fi=xe?Ua:ic;function pi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function di(e){return e==e&&!qa(e)}function hi(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in ve(n)))}}function vi(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,Qr(t,0,-1))}function gi(e,t){for(var n=e.length,r=un(t.length,n),o=mo(e);r--;){var i=t[r];e[r]=ui(i,n)?o[i]:void 0}return e}function mi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bi=ki(Wr),wi=Kt||function(e,t){return $e.setTimeout(e,t)},_i=ki(qr);function xi(e,t,n){var r=t+"";return _i(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(X);return t?t[1].split(Z):[]}(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 Oi(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Nr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var Si=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(Q,(function(e,n,r,o){t.push(r?o.replace(te,"$1"):n||e)})),t}));function Ei(e){if("string"==typeof e||Ka(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pi(e){if(e instanceof Rn)return e.clone();var t=new An(e.__wrapped__,e.__chain__);return t.__actions__=mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ci=zr((function(e,t){return Na(e)?Zn(e,ir(t,1,Na,!0)):[]})),Ti=zr((function(e,t){var n=Li(t);return Na(n)&&(n=void 0),Na(e)?Zn(e,ir(t,1,Na,!0),Ko(n,2)):[]})),Ai=zr((function(e,t){var n=Li(t);return Na(n)&&(n=void 0),Na(e)?Zn(e,ir(t,1,Na,!0),void 0,n):[]}));function Ri(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 Di(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 Mi(e){return e&&e.length?e[0]:void 0}var Ni=zr((function(e){var t=dt(e,io);return t.length&&t[0]===e[0]?gr(t):[]})),Fi=zr((function(e){var t=Li(e),n=dt(e,io);return t===Li(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?gr(n,Ko(t,2)):[]})),zi=zr((function(e){var t=Li(e),n=dt(e,io);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?gr(n,void 0,t):[]}));function Li(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ui=zr(Bi);function Bi(e,t){return e&&e.length&&t&&t.length?Ir(e,t):e}var Wi=Qo((function(e,t){var n=null==e?0:e.length,r=Jn(e,t);return Mr(e,dt(t,(function(e){return ui(e,n)?+e:e})).sort(vo)),r}));function qi(e){return null==e?e:fn.call(e)}var Hi=zr((function(e){return Xr(ir(e,1,Na,!0))})),Qi=zr((function(e){var t=Li(e);return Na(t)&&(t=void 0),Xr(ir(e,1,Na,!0),Ko(t,2))})),Vi=zr((function(e){var t=Li(e);return t="function"==typeof t?t:void 0,Xr(ir(e,1,Na,!0),void 0,t)}));function $i(e){if(!e||!e.length)return[];var t=0;return e=lt(e,(function(e){if(Na(e))return t=an(e.length,t),!0})),Ct(t,(function(t){return dt(e,St(t))}))}function Ji(e,t){if(!e||!e.length)return[];var n=$i(e);return null==t?n:dt(n,(function(e){return it(t,void 0,e)}))}var Gi=zr((function(e,t){return Na(e)?Zn(e,t):[]})),Yi=zr((function(e){return ro(lt(e,Na))})),Ki=zr((function(e){var t=Li(e);return Na(t)&&(t=void 0),ro(lt(e,Na),Ko(t,2))})),Xi=zr((function(e){var t=Li(e);return t="function"==typeof t?t:void 0,ro(lt(e,Na),void 0,t)})),Zi=zr($i);var ea=zr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ji(e,n)}));function ta(e){var t=Pn(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Qo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&ui(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[o],thisArg:void 0}),new An(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){Oe.call(e,n)?++e[n]:$n(e,n,1)}));var ia=jo(Ri),aa=jo(Di);function ua(e,t){return(Da(e)?ut:er)(e,Ko(t,3))}function ca(e,t){return(Da(e)?ct:tr)(e,Ko(t,3))}var sa=wo((function(e,t,n){Oe.call(e,n)?e[n].push(t):$n(e,n,[t])}));var la=zr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ma(e)?r(e.length):[];return er(e,(function(e){a[++o]=i?it(t,e,n):mr(e,t,n)})),a})),fa=wo((function(e,t,n){$n(e,n,t)}));function pa(e,t){return(Da(e)?dt:jr)(e,Ko(t,3))}var da=wo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=zr((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]]),Rr(e,ir(t,1),[])})),va=Yt||function(){return $e.Date.now()};function ya(e,t,n){return t=n?void 0:t,Uo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ga(e,t){var n;if("function"!=typeof t)throw new me(i);return e=ru(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ma=zr((function(e,t,n){var r=1;if(n.length){var o=Wt(n,Yo(ma));r|=32}return Uo(e,r,t,n,o)})),ba=zr((function(e,t,n){var r=3;if(n.length){var o=Wt(n,Yo(ba));r|=32}return Uo(t,r,e,n,o)}));function wa(e,t,n){var r,o,a,u,c,s,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new me(i);function h(t){var n=r,i=o;return r=o=void 0,l=t,u=e.apply(i,n)}function v(e){return l=e,c=wi(g,t),f?h(e):u}function y(e){var n=e-s;return void 0===s||n>=t||n<0||p&&e-l>=a}function g(){var e=va();if(y(e))return m(e);c=wi(g,function(e){var n=t-(e-s);return p?un(n,a-(e-l)):n}(e))}function m(e){return c=void 0,d&&r?h(e):(r=o=void 0,u)}function b(){var e=va(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return v(s);if(p)return lo(c),c=wi(g,t),h(s)}return void 0===c&&(c=wi(g,t)),u}return t=iu(t)||0,qa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?an(iu(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==c&&lo(c),l=0,r=s=o=c=void 0},b.flush=function(){return void 0===c?u:m(va())},b}var _a=zr((function(e,t){return Xn(e,1,t)})),xa=zr((function(e,t,n){return Xn(e,iu(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(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||Mn),n}function Oa(e){if("function"!=typeof e)throw new me(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=Mn;var Sa=co((function(e,t){var n=(t=1==t.length&&Da(t[0])?dt(t[0],Tt(Ko())):dt(ir(t,1),Tt(Ko()))).length;return zr((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)}))})),Ea=zr((function(e,t){return Uo(e,32,void 0,t,Wt(t,Yo(Ea)))})),ja=zr((function(e,t){return Uo(e,64,void 0,t,Wt(t,Yo(ja)))})),Pa=Qo((function(e,t){return Uo(e,256,void 0,void 0,void 0,t)}));function Ca(e,t){return e===t||e!=e&&t!=t}var Ta=Mo(hr),Aa=Mo((function(e,t){return e>=t})),Ra=br(function(){return arguments}())?br:function(e){return Ha(e)&&Oe.call(e,"callee")&&!Je.call(e,"callee")},Da=r.isArray,Ia=Ze?Tt(Ze):function(e){return Ha(e)&&dr(e)==k};function Ma(e){return null!=e&&Wa(e.length)&&!Ua(e)}function Na(e){return Ha(e)&&Ma(e)}var Fa=tn||ic,za=et?Tt(et):function(e){return Ha(e)&&dr(e)==f};function La(e){if(!Ha(e))return!1;var t=dr(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!$a(e)}function Ua(e){if(!qa(e))return!1;var t=dr(e);return t==d||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ba(e){return"number"==typeof e&&e==ru(e)}function Wa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ha(e){return null!=e&&"object"==typeof e}var Qa=tt?Tt(tt):function(e){return Ha(e)&&ri(e)==v};function Va(e){return"number"==typeof e||Ha(e)&&dr(e)==y}function $a(e){if(!Ha(e)||dr(e)!=g)return!1;var t=Qe(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==Pe}var Ja=nt?Tt(nt):function(e){return Ha(e)&&dr(e)==m};var Ga=rt?Tt(rt):function(e){return Ha(e)&&ri(e)==b};function Ya(e){return"string"==typeof e||!Da(e)&&Ha(e)&&dr(e)==w}function Ka(e){return"symbol"==typeof e||Ha(e)&&dr(e)==_}var Xa=ot?Tt(ot):function(e){return Ha(e)&&Wa(e.length)&&!!Ue[dr(e)]};var Za=Mo(Er),eu=Mo((function(e,t){return e<=t}));function tu(e){if(!e)return[];if(Ma(e))return Ya(e)?Vt(e):mo(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ri(e);return(t==v?Ut:t==b?qt:Cu)(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?Gn(ru(e),0,4294967295):0}function iu(e){if("number"==typeof e)return e;if(Ka(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(J,"");var n=ie.test(e);return n||ue.test(e)?He(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function au(e){return bo(e,_u(e))}function uu(e){return null==e?"":Kr(e)}var cu=_o((function(e,t){if(pi(t)||Ma(t))bo(t,wu(t),e);else for(var n in t)Oe.call(t,n)&&qn(e,n,t[n])})),su=_o((function(e,t){bo(t,_u(t),e)})),lu=_o((function(e,t,n,r){bo(t,_u(t),e,r)})),fu=_o((function(e,t,n,r){bo(t,wu(t),e,r)})),pu=Qo(Jn);var du=zr((function(e,t){e=ve(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=_u(i),u=-1,c=a.length;++u<c;){var s=a[u],l=e[s];(void 0===l||Ca(l,_e[s])&&!Oe.call(e,s))&&(e[s]=i[s])}return e})),hu=zr((function(e){return e.push(void 0,Wo),it(ku,void 0,e)}));function vu(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 gu=To((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),qu(Vu)),mu=To((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]}),Ko),bu=zr(mr);function wu(e){return Ma(e)?zn(e):Or(e)}function _u(e){return Ma(e)?zn(e,!0):Sr(e)}var xu=_o((function(e,t,n){Tr(e,t,n)})),ku=_o((function(e,t,n,r){Tr(e,t,n,r)})),Ou=Qo((function(e,t){var n={};if(null==e)return n;var r=!1;t=dt(t,(function(t){return t=uo(t,e),r||(r=t.length>1),t})),bo(e,$o(e),n),r&&(n=Yn(n,7,qo));for(var o=t.length;o--;)Zr(n,t[o]);return n}));var Su=Qo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return yu(e,n)}))}(e,t)}));function Eu(e,t){if(null==e)return{};var n=dt($o(e),(function(e){return[e]}));return t=Ko(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var ju=Lo(wu),Pu=Lo(_u);function Cu(e){return null==e?[]:At(e,wu(e))}var Tu=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Au(t):t)}));function Au(e){return Lu(uu(e).toLowerCase())}function Ru(e){return(e=uu(e))&&e.replace(se,Nt).replace(De,"")}var Du=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Iu=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Mu=Oo("toLowerCase");var Nu=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fu=So((function(e,t,n){return e+(n?" ":"")+Lu(t)}));var zu=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Lu=Oo("toUpperCase");function Uu(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(Me)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Bu=zr((function(e,t){try{return it(e,void 0,t)}catch(e){return La(e)?e:new pe(e)}})),Wu=Qo((function(e,t){return ut(t,(function(t){t=Ei(t),$n(e,t,ma(e[t],e))})),e}));function qu(e){return function(){return e}}var Hu=Po(),Qu=Po(!0);function Vu(e){return e}function $u(e){return kr("function"==typeof e?e:Yn(e,1))}var Ju=zr((function(e,t){return function(n){return mr(n,e,t)}})),Gu=zr((function(e,t){return function(n){return mr(e,n,t)}}));function Yu(e,t,n){var r=wu(t),o=lr(t,r);null!=n||qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=lr(t,wu(t)));var i=!(qa(n)&&"chain"in n&&!n.chain),a=Ua(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__=mo(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 Xu=Ro(dt),Zu=Ro(st),ec=Ro(gt);function tc(e){return si(e)?St(Ei(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=Ao((function(e,t){return e+t}),0),uc=Fo("ceil"),cc=Ao((function(e,t){return e/t}),1),sc=Fo("floor");var lc,fc=Ao((function(e,t){return e*t}),1),pc=Fo("round"),dc=Ao((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new me(i);return e=ru(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=ya,Pn.assign=cu,Pn.assignIn=su,Pn.assignInWith=lu,Pn.assignWith=fu,Pn.at=pu,Pn.before=ga,Pn.bind=ma,Pn.bindAll=Wu,Pn.bindKey=ba,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},Pn.chain=ta,Pn.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(Xt(o/t));i<o;)u[a++]=Qr(e,i,i+=t);return u},Pn.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},Pn.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(Da(n)?mo(n):[n],ir(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=Ko();return e=t?dt(e,(function(e){if("function"!=typeof e[1])throw new me(i);return[n(e[0]),e[1]]})):[],zr((function(n){for(var r=-1;++r<t;){var o=e[r];if(it(o[0],this,n))return it(o[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=wu(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Pn.constant=qu,Pn.countBy=oa,Pn.create=function(e,t){var n=Cn(e);return null==t?n:Vn(n,t)},Pn.curry=function e(t,n,r){var o=Uo(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},Pn.curryRight=function e(t,n,r){var o=Uo(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},Pn.debounce=wa,Pn.defaults=du,Pn.defaultsDeep=hu,Pn.defer=_a,Pn.delay=xa,Pn.difference=Ci,Pn.differenceBy=Ti,Pn.differenceWith=Ai,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,(t=n||void 0===t?1:ru(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,0,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0):[]},Pn.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)):[]},Pn.filter=function(e,t){return(Da(e)?lt:or)(e,Ko(t,3))},Pn.flatMap=function(e,t){return ir(pa(e,t),1)},Pn.flatMapDeep=function(e,t){return ir(pa(e,t),1/0)},Pn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ru(n),ir(pa(e,t),n)},Pn.flatten=Ii,Pn.flattenDeep=function(e){return(null==e?0:e.length)?ir(e,1/0):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?ir(e,t=void 0===t?1:ru(t)):[]},Pn.flip=function(e){return Uo(e,512)},Pn.flow=Hu,Pn.flowRight=Qu,Pn.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},Pn.functions=function(e){return null==e?[]:lr(e,wu(e))},Pn.functionsIn=function(e){return null==e?[]:lr(e,_u(e))},Pn.groupBy=sa,Pn.initial=function(e){return(null==e?0:e.length)?Qr(e,0,-1):[]},Pn.intersection=Ni,Pn.intersectionBy=Fi,Pn.intersectionWith=zi,Pn.invert=gu,Pn.invertBy=mu,Pn.invokeMap=la,Pn.iteratee=$u,Pn.keyBy=fa,Pn.keys=wu,Pn.keysIn=_u,Pn.map=pa,Pn.mapKeys=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){$n(n,t(e,r,o),e)})),n},Pn.mapValues=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){$n(n,r,t(e,r,o))})),n},Pn.matches=function(e){return Pr(Yn(e,1))},Pn.matchesProperty=function(e,t){return Cr(e,Yn(t,1))},Pn.memoize=ka,Pn.merge=xu,Pn.mergeWith=ku,Pn.method=Ju,Pn.methodOf=Gu,Pn.mixin=Yu,Pn.negate=Oa,Pn.nthArg=function(e){return e=ru(e),zr((function(t){return Ar(t,e)}))},Pn.omit=Ou,Pn.omitBy=function(e,t){return Eu(e,Oa(Ko(t)))},Pn.once=function(e){return ga(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(Da(t)||(t=null==t?[]:[t]),Da(n=r?void 0:n)||(n=null==n?[]:[n]),Rr(e,t,n))},Pn.over=Xu,Pn.overArgs=Sa,Pn.overEvery=Zu,Pn.overSome=ec,Pn.partial=Ea,Pn.partialRight=ja,Pn.partition=da,Pn.pick=Su,Pn.pickBy=Eu,Pn.property=tc,Pn.propertyOf=function(e){return function(t){return null==e?void 0:fr(e,t)}},Pn.pull=Ui,Pn.pullAll=Bi,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,Ko(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,void 0,n):e},Pn.pullAt=Wi,Pn.range=nc,Pn.rangeRight=rc,Pn.rearg=Pa,Pn.reject=function(e,t){return(Da(e)?lt:or)(e,Oa(Ko(t,3)))},Pn.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 Mr(e,o),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new me(i);return zr(e,t=void 0===t?t:ru(t))},Pn.reverse=qi,Pn.sampleSize=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),(Da(e)?Un:Ur)(e,t)},Pn.set=function(e,t,n){return null==e?e:Br(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Br(e,t,n,r)},Pn.shuffle=function(e){return(Da(e)?Bn:Hr)(e)},Pn.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)),Qr(e,t,n)):[]},Pn.sortBy=ha,Pn.sortedUniq=function(e){return e&&e.length?Gr(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?Gr(e,Ko(t,2)):[]},Pn.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&&!Ja(t))&&!(t=Kr(t))&&Lt(e)?so(Vt(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new me(i);return t=null==t?0:an(ru(t),0),zr((function(n){var r=n[t],o=so(n,0,t);return r&&ht(o,r),it(e,this,o)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?Qr(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?Qr(e,0,(t=n||void 0===t?1:ru(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?to(e,Ko(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new me(i);return qa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wa(e,t,{leading:r,maxWait:t,trailing:o})},Pn.thru=na,Pn.toArray=tu,Pn.toPairs=ju,Pn.toPairsIn=Pu,Pn.toPath=function(e){return Da(e)?dt(e,Ei):Ka(e)?[e]:mo(Si(uu(e)))},Pn.toPlainObject=au,Pn.transform=function(e,t,n){var r=Da(e),o=r||Fa(e)||Xa(e);if(t=Ko(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:qa(e)&&Ua(i)?Cn(Qe(e)):{}}return(o?ut:cr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Pn.unary=function(e){return ya(e,1)},Pn.union=Hi,Pn.unionBy=Qi,Pn.unionWith=Vi,Pn.uniq=function(e){return e&&e.length?Xr(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?Xr(e,Ko(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Xr(e,void 0,t):[]},Pn.unset=function(e,t){return null==e||Zr(e,t)},Pn.unzip=$i,Pn.unzipWith=Ji,Pn.update=function(e,t,n){return null==e?e:eo(e,t,ao(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:eo(e,t,ao(n),r)},Pn.values=Cu,Pn.valuesIn=function(e){return null==e?[]:At(e,_u(e))},Pn.without=Gi,Pn.words=Uu,Pn.wrap=function(e,t){return Ea(ao(t),e)},Pn.xor=Yi,Pn.xorBy=Ki,Pn.xorWith=Xi,Pn.zip=Zi,Pn.zipObject=function(e,t){return oo(e||[],t||[],qn)},Pn.zipObjectDeep=function(e,t){return oo(e||[],t||[],Br)},Pn.zipWith=ea,Pn.entries=ju,Pn.entriesIn=Pu,Pn.extend=su,Pn.extendWith=lu,Yu(Pn,Pn),Pn.add=ac,Pn.attempt=Bu,Pn.camelCase=Tu,Pn.capitalize=Au,Pn.ceil=uc,Pn.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),Gn(iu(e),t,n)},Pn.clone=function(e){return Yn(e,4)},Pn.cloneDeep=function(e){return Yn(e,5)},Pn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Pn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Pn.conformsTo=function(e,t){return null==t||Kn(e,t,wu(t))},Pn.deburr=Ru,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=cc,Pn.endsWith=function(e,t,n){e=uu(e),t=Kr(t);var r=e.length,o=n=void 0===n?r:Gn(ru(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Ca,Pn.escape=function(e){return(e=uu(e))&&L.test(e)?e.replace(F,Ft):e},Pn.escapeRegExp=function(e){return(e=uu(e))&&$.test(e)?e.replace(V,"\\$&"):e},Pn.every=function(e,t,n){var r=Da(e)?st:nr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},Pn.find=ia,Pn.findIndex=Ri,Pn.findKey=function(e,t){return bt(e,Ko(t,3),cr)},Pn.findLast=aa,Pn.findLastIndex=Di,Pn.findLastKey=function(e,t){return bt(e,Ko(t,3),sr)},Pn.floor=sc,Pn.forEach=ua,Pn.forEachRight=ca,Pn.forIn=function(e,t){return null==e?e:ar(e,Ko(t,3),_u)},Pn.forInRight=function(e,t){return null==e?e:ur(e,Ko(t,3),_u)},Pn.forOwn=function(e,t){return e&&cr(e,Ko(t,3))},Pn.forOwnRight=function(e,t){return e&&sr(e,Ko(t,3))},Pn.get=vu,Pn.gt=Ta,Pn.gte=Aa,Pn.has=function(e,t){return null!=e&&oi(e,t,vr)},Pn.hasIn=yu,Pn.head=Mi,Pn.identity=Vu,Pn.includes=function(e,t,n,r){e=Ma(e)?e:Cu(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&&_t(e,t,n)>-1},Pn.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)),_t(e,t,o)},Pn.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)},Pn.invoke=bu,Pn.isArguments=Ra,Pn.isArray=Da,Pn.isArrayBuffer=Ia,Pn.isArrayLike=Ma,Pn.isArrayLikeObject=Na,Pn.isBoolean=function(e){return!0===e||!1===e||Ha(e)&&dr(e)==l},Pn.isBuffer=Fa,Pn.isDate=za,Pn.isElement=function(e){return Ha(e)&&1===e.nodeType&&!$a(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(Ma(e)&&(Da(e)||"string"==typeof e||"function"==typeof e.splice||Fa(e)||Xa(e)||Ra(e)))return!e.length;var t=ri(e);if(t==v||t==b)return!e.size;if(pi(e))return!Or(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return wr(e,t)},Pn.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},Pn.isError=La,Pn.isFinite=function(e){return"number"==typeof e&&nn(e)},Pn.isFunction=Ua,Pn.isInteger=Ba,Pn.isLength=Wa,Pn.isMap=Qa,Pn.isMatch=function(e,t){return e===t||_r(e,t,Zo(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,_r(e,t,Zo(t),n)},Pn.isNaN=function(e){return Va(e)&&e!=+e},Pn.isNative=function(e){if(fi(e))throw new pe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=Va,Pn.isObject=qa,Pn.isObjectLike=Ha,Pn.isPlainObject=$a,Pn.isRegExp=Ja,Pn.isSafeInteger=function(e){return Ba(e)&&e>=-9007199254740991&&e<=9007199254740991},Pn.isSet=Ga,Pn.isString=Ya,Pn.isSymbol=Ka,Pn.isTypedArray=Xa,Pn.isUndefined=function(e){return void 0===e},Pn.isWeakMap=function(e){return Ha(e)&&ri(e)==x},Pn.isWeakSet=function(e){return Ha(e)&&"[object WeakSet]"==dr(e)},Pn.join=function(e,t){return null==e?"":rn.call(e,t)},Pn.kebabCase=Du,Pn.last=Li,Pn.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)},Pn.lowerCase=Iu,Pn.lowerFirst=Mu,Pn.lt=Za,Pn.lte=eu,Pn.max=function(e){return e&&e.length?rr(e,Vu,hr):void 0},Pn.maxBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),hr):void 0},Pn.mean=function(e){return Ot(e,Vu)},Pn.meanBy=function(e,t){return Ot(e,Ko(t,2))},Pn.min=function(e){return e&&e.length?rr(e,Vu,Er):void 0},Pn.minBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),Er):void 0},Pn.stubArray=oc,Pn.stubFalse=ic,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=fc,Pn.nth=function(e,t){return e&&e.length?Ar(e,ru(t)):void 0},Pn.noConflict=function(){return $e._===this&&($e._=Ce),this},Pn.noop=Ku,Pn.now=va,Pn.pad=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(Zt(o),n)+e+Do(Xt(o),n)},Pn.padEnd=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;return t&&r<t?e+Do(t-r,n):e},Pn.padStart=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;return t&&r<t?Do(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),sn(uu(e).replace(G,""),t||0)},Pn.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+qe("1e-"+((o+"").length-1))),t)}return Nr(e,t)},Pn.reduce=function(e,t,n){var r=Da(e)?vt:jt,o=arguments.length<3;return r(e,Ko(t,4),n,o,er)},Pn.reduceRight=function(e,t,n){var r=Da(e)?yt:jt,o=arguments.length<3;return r(e,Ko(t,4),n,o,tr)},Pn.repeat=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),Fr(uu(e),t)},Pn.replace=function(){var e=arguments,t=uu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.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[Ei(t[r])];void 0===i&&(r=o,i=n),e=Ua(i)?i.call(e):i}return e},Pn.round=pc,Pn.runInContext=e,Pn.sample=function(e){return(Da(e)?Ln:Lr)(e)},Pn.size=function(e){if(null==e)return 0;if(Ma(e))return Ya(e)?Qt(e):e.length;var t=ri(e);return t==v||t==b?e.size:Or(e).length},Pn.snakeCase=Nu,Pn.some=function(e,t,n){var r=Da(e)?gt:Vr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},Pn.sortedIndex=function(e,t){return $r(e,t)},Pn.sortedIndexBy=function(e,t,n){return Jr(e,t,Ko(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=$r(e,t);if(r<n&&Ca(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return $r(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return Jr(e,t,Ko(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=$r(e,t,!0)-1;if(Ca(e[n],t))return n}return-1},Pn.startCase=Fu,Pn.startsWith=function(e,t,n){return e=uu(e),n=null==n?0:Gn(ru(n),0,e.length),t=Kr(t),e.slice(n,n+t.length)==t},Pn.subtract=dc,Pn.sum=function(e){return e&&e.length?Pt(e,Vu):0},Pn.sumBy=function(e,t){return e&&e.length?Pt(e,Ko(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&ci(e,t,n)&&(t=void 0),e=uu(e),t=lu({},t,r,Bo);var o,i,a=lu({},t.imports,r.imports,Bo),u=wu(a),c=At(a,u),s=0,l=t.interpolate||le,f="__p += '",p=ye((t.escape||le).source+"|"+l.source+"|"+(l===W?ne:le).source+"|"+(t.evaluate||le).source+"|$","g"),d="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Le+"]")+"\n";e.replace(p,(function(t,n,r,a,u,c){return r||(r=a),f+=e.slice(s,c).replace(fe,zt),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=Oe.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(D,""):f).replace(I,"$1").replace(M,"$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 v=Bu((function(){return de(u,d+"return "+f).apply(void 0,c)}));if(v.source=f,La(v))throw v;return v},Pn.times=function(e,t){if((e=ru(e))<1||e>9007199254740991)return[];var n=4294967295,r=un(e,4294967295);e-=4294967295;for(var o=Ct(r,t=Ko(t));++n<e;)t(n);return o},Pn.toFinite=nu,Pn.toInteger=ru,Pn.toLength=ou,Pn.toLower=function(e){return uu(e).toLowerCase()},Pn.toNumber=iu,Pn.toSafeInteger=function(e){return e?Gn(ru(e),-9007199254740991,9007199254740991):0===e?e:0},Pn.toString=uu,Pn.toUpper=function(e){return uu(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(J,"");if(!e||!(t=Kr(t)))return e;var r=Vt(e),o=Vt(t);return so(r,Dt(r,o),It(r,o)+1).join("")},Pn.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=Vt(e);return so(r,0,It(r,Vt(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Kr(t)))return e;var r=Vt(e);return so(r,Dt(r,Vt(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(qa(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(Lt(e)){var a=Vt(e);i=a.length}if(n>=i)return e;var u=n-Qt(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),Ja(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 p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Pn.unescape=function(e){return(e=uu(e))&&z.test(e)?e.replace(N,$t):e},Pn.uniqueId=function(e){var t=++Se;return uu(e)+t},Pn.upperCase=zu,Pn.upperFirst=Lu,Pn.each=ua,Pn.eachRight=ca,Pn.first=Mi,Yu(Pn,(lc={},cr(Pn,(function(e,t){Oe.call(Pn.prototype,t)||(lc[t]=e)})),lc),{chain:!1}),Pn.VERSION="4.17.19",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),ut(["drop","take"],(function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!t?new Rn(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},Rn.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;Rn.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":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(Vu)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new Rn(this):this.map((function(n){return mr(n,e,t)}))})),Rn.prototype.reject=function(e){return this.filter(Oa(Ko(e)))},Rn.prototype.slice=function(e,t){e=ru(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(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)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},cr(Rn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Rn,c=a[0],s=u||Da(t),l=function(e){var t=o.apply(Pn,ht([e],a));return r&&f?t[0]:t};s&&n&&"function"==typeof c&&1!=c.length&&(u=s=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=u&&!p;if(!i&&s){t=h?t:new Rn(this);var v=e.apply(t,a);return v.__actions__.push({func:na,args:[l],thisArg:void 0}),new An(v,f)}return d&&h?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})})),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);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Da(o)?o:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),cr(Rn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";Oe.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Co(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mo(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(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,p=0,d=un(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return no(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},Pn.prototype.at=ra,Pn.prototype.chain=function(){return ta(this)},Pn.prototype.commit=function(){return new An(this.value(),this.__chain__)},Pn.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__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof Tn;){var r=Pi(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},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:na,args:[qi],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(qi)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return no(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();$e._=Jt,void 0===(o=function(){return Jt}.call(t,n,t,r))||(r.exports=o)}).call(this)}).call(this,n(53),n(136)(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":"energy_contract","purpose":"contract","sourceCategory":"energy"},{"label":"appliance_invoice","purpose":"invoice","sourceCategory":"retail"},{"label":"web_service_invoice","purpose":"invoice","sourceCategory":"web"},{"label":"restaurant_invoice","purpose":"invoice","sourceCategory":"alimentation"},{"label":"grocery_invoice","purpose":"invoice","sourceCategory":"shopping"},{"label":"other_invoice","purpose":"invoice"},{"label":"tax_return","purpose":"report","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"tax_notice","purpose":"invoice","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"tax_timetable","purpose":"report","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"other_tax_document","subjects":["tax"]},{"label":"bank_details","purpose":"attestation","sourceCategory":"bank","subjects":["bank_account"]},{"label":"bank_statement","purpose":"report","sourceCategory":"bank","subjects":["history"]},{"label":"loan_agreement","purpose":"contract","sourceCategory":"bank"},{"label":"other_bank_document","sourceCategory":"bank"},{"label":"receipt","purpose":"report"},{"label":"payment_proof_family_allowance","purpose":"attestation","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["subvention"]},{"label":"school_attendance_certificate","purpose":"attestation","sourceCategory":"education","subjects":["identity","right","education"]},{"label":"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","shopping"],"sourceSubCategoryKnownValues":["civil_registration","immigration","transport","family","tax","health","real_estate","mobile","internet","citizen","sport"],"subjectsKnownValues":["identity","permit","family","address","driving","right","subvention","achievement","degree","work","employment","revenues","history","insurance","medical_act","vehicule","car","moto","truck","boat","subscription","buy/sale","house","compliance","building","food","real_estate","tax","address","education","statement","course","internet","phone","vaccine","capacity","health","drugs","child","pregnancy","bank_account"]}')},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getReferencedFolder=t.createFolderWithReference=t.ensureMagicFolder=t.MAGIC_FOLDERS=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(663)),u=(r(n(48)),n(21),n(67)),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"),COACH_CO2:"".concat("io.cozy.apps","/").concat("administrative","/coachco2")};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(142),o=n(330),i=n(72),a=n(308),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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchURL=t.generateUrlForNote=t.generatePrivateUrl=void 0;var o=r(n(24)),i=r(n(25)),a=n(153),u=r(n(33)),c=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=c;t.generateUrlForNote=function(e,t){return u.default.warn("generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead"),c(e,t)};var s=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,s,l,f,p,d;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,p=i.public_name,!f){e.next=17;break}return(d=[["id",u]]).push(["sharecode",f]),p&&d.push(["username",p]),e.abrupt("return",(0,a.generateWebLink)({cozyUrl:"".concat(s,"://").concat(l),searchParams:d,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=s},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.isReadOnly=y,t.fetchOwn=g,t.isForType=b,t.isDocumentReadOnly=function(e){return x.apply(this,arguments)},t.isShortcutCreatedOnTheRecipientCozy=void 0;var o=r(n(18)),i=r(n(24)),a=r(n(25)),u=r(n(66)),c=r(n(327)),s=r(n(20)),l=(r(n(48)),n(23)),f=n(344),p=n(67),d=r(n(33));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 v(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}function y(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 g(e){return m.apply(this,arguments)}function m(){return(m=(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 b(e,t){return e.type===t||e.type+".*"===t}function w(e){return _.apply(this,arguments)}function _(){return(_=(0,a.default)(i.default.mark((function e(t){var n,r,o,u,c,s,d,h,y,m,w,_;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_=function(){return(_=(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!==p.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,y(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 _.apply(this,arguments)},m=function(){return(m=(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)(p.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)},y=function(e){return m.apply(this,arguments)},n=t.document,r=t.client,o=t.permissions,u=n._id||n.id,c=n._type||n.type,s=v(v({},n),{},{id:u,type:c}),!o){e.next=12;break}e.t0=o,e.next=15;break;case 12:return e.next=14,g(r);case 14:e.t0=e.sent;case 15:return d=e.t0,h=d.filter((function(e){return b(e,c)})),e.abrupt("return",w({doc:s,client:r,perms:h}));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,g(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,w({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",y(c,{writability:o}));case 24:return d.default.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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getCreatedByApp=t.hasBeenUpdatedByApp=void 0;var o=r(n(20));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(4);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(20)),i=r(n(228)),a=r(n(33)),u=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=u;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=c(e);if(t)return t[0].toUpperCase();var n=l(e);return n?n[0].toUpperCase():""};var c=function(e){return Array.isArray(e.email)?u("email")(e).address||"":e.email};t.getPrimaryEmail=c;var s=function(e){return Array.isArray(e.cozy)?u("cozy")(e).url||"":e.url};t.getPrimaryCozy=s;var l=function(e){try{return new URL(s(e)).hostname.replace(/^(www.)/g,"")}catch(t){return s(e)}};t.getPrimaryCozyDomain=l;t.getPrimaryPhone=function(e){return u("phone")(e).number||""};t.getPrimaryAddress=function(e){return u("address")(e).formattedAddress||""};var f=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=f;t.getFullname=function(e){return(0,o.default)(e,"fullname")?e.fullname:f(e)};var p=function(e){var t=f(e),n=c(e),r=l(e);return t&&t.length>0?t:n&&n.length>0?n:r&&r.length>0?r:""};t.makeDisplayName=p;t.getDisplayName=function(e){return(0,o.default)(e,"displayName")?e.displayName:p(e)};var d=function(e){var t=[(0,o.default)(e,"name.familyName",""),(0,o.default)(e,"name.givenName",""),c(e),l(e)].join("").trim().toLowerCase();return 0===t.length?null:t};t.makeDefaultSortIndexValue=d;var h=function(e){var t=(0,o.default)(e,"indexes.byFamilyNameGivenNameEmailCozyUrl",null);return null!==t?(0,i.default)(t)?null:t:d(e)};t.getDefaultSortIndexValue=h;t.getIndexByFamilyNameGivenNameEmailCozyUrl=function(e){return a.default.warn("Deprecation: `getIndexByFamilyNameGivenNameEmailCozyUrl` is deprecated, please use `getDefaultSortIndexValue` instead"),h(e)}},function(e,t,n){"use strict";var r=n(56);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(224),i=r(n(669));t.locales=i;var a=r(n(356));t.themes=a;var u=r(n(718));t.helpers=u},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundT=void 0;for(var o=r(n(670)),i=n(714),a={},u=0,c=["fr","en"];u<c.length;u++){var s=c[u],l={};try{l=n(715)("./".concat(s,".json"))}catch(e){}var f=new o.default;f.extend(l),a[s]=f}t.getBoundT=function(e){var t=a[e]||a.en,n=t.t.bind(t);return function(e,t){var r=(0,i.getEmojiByCountry)(t,n);return r?"".concat(n(e)," (").concat(r,")"):n(e)}}},function(e,t,n){"use strict";var r=n(671),o=n(708),i=n(276),a=n(197),u=n(711),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},p={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 d(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 v,y=(v={},function(e,t){var n=v[t];return n&&!e.pluralTypes[n]&&(n=null,v[t]=n),n||(n=d(e,t))&&(v[t]=n),n}),g=/%\{(.*?)\}/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 i=e,c=r||g,f="number"==typeof t?{smart_count:t}:t;if(null!=f.smart_count&&e){var d=o||p,h=l.call(e,"||||"),v=function(e,t,n){return e.pluralTypes[t](n)}(d,y(d,n||"en"),f.smart_count);i=u(h[v]||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?m: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||p}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=m(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 m(e,t,n)},e.exports=b},function(e,t,n){"use strict";var r=n(65),o=n(119),i=n(77),a=n(345),u=n(346),c=n(350),s=c(),l=n(707),f=i("Array.prototype.slice"),p=o.apply(s),d=function(e,t){return a(e),p(e,f(arguments,1))};r(d,{getPolyfill:c,implementation:u,shim:l}),e.exports=d},function(e,t,n){"use strict";var r=n(34)("%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(34),o=n(77),i=r("%TypeError%"),a=n(674),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(34)("%Array%"),o=!r.isArray&&n(77)("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,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,S=Array.prototype.slice,E=Math.floor,j="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,A="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("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||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var o=String(r),i=m.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 M=n(676).custom,N=M&&U(M)?M:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function z(e){return b.call(String(e),/"/g,""")}function L(e){return!("[object Array]"!==q(e)||A&&"object"==typeof e&&A in e)}function U(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var u=n||{};if(W(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(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=!W(u,"customInspect")||u.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(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(W(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=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(m.call(t,0,n.maxStringLength),n)+o}return F(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",n)}(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return v?I(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return v?I(t,x):x}var E=void 0===u.depth?5:u.depth;if(void 0===r&&(r=0),r>=E&&E>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var P=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}(u,r);if(void 0===o)o=[];else if(H(o,t)>=0)return"[Circular]";function M(t,n,i){if(n&&(o=S.call(o)).push(n),i){var a={depth:u.depth};return W(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,o)}return e(t,u,r+1,o)}if("function"==typeof t){var B=function(e){if(e.name)return e.name;var t=g.call(y.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Y(t,M);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(K.length>0?" { "+O.call(K,", ")+" }":"")}if(U(t)){var X=T?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(t);return"object"!=typeof t||T?X:V(X)}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 Z="<"+_.call(String(t.nodeName)),ee=t.attributes||[],te=0;te<ee.length;te++)Z+=" "+ee[te].name+"="+F(z(ee[te].value),"double",u);return Z+=">",t.childNodes&&t.childNodes.length&&(Z+="..."),Z+="</"+_.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var ne=Y(t,M);return P&&!function(e){for(var t=0;t<e.length;t++)if(H(e[t],"\n")>=0)return!1;return!0}(ne)?"["+G(ne,P)+"]":"[ "+O.call(ne,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)){var re=Y(t,M);return"cause"in t&&!R.call(t,"cause")?"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+M(t.cause),re),", ")+" }":0===re.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(re,", ")+" }"}if("object"==typeof t&&c){if(N&&"function"==typeof t[N])return t[N]();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(M(n,t,!0)+" => "+M(e,t))})),J("Map",i.call(t),oe,P)}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(M(e,t))})),J("Set",s.call(t),ie,P)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if(function(e){return!("[object Number]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(M(Number(t)));if(function(e){if(!e||"object"!=typeof e||!j)return!1;try{return j.call(e),!0}catch(e){}return!1}(t))return V(M(j.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(h.call(t));if(function(e){return!("[object String]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(M(String(t)));if(!function(e){return!("[object Date]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)&&!function(e){return!("[object RegExp]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)){var ae=Y(t,M),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",se=!ue&&A&&Object(t)===t&&A in t?m.call(q(t),8,-1):ce?"Object":"",le=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(se||ce?"["+O.call(k.call([],se||[],ce||[]),": ")+"] ":"");return 0===ae.length?le+"{}":P?le+"{"+G(ae,P)+"}":le+"{ "+O.call(ae,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return B.call(e,t)}function q(e){return v.call(e)}function H(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 Q(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 V(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?G(n,r):O.call(n,", "))+"}"}function G(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function Y(e,t){var n=L(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=W(e,o)?t(e[o],e):""}var i,a="function"==typeof P?P(e):[];if(T){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)W(e,c)&&(n&&String(Number(c))===c&&c<e.length||T&&i["$"+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var s=0;s<a.length;s++)R.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(34)("%TypeError%"),o=n(348),i=n(225);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(680)},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(34)("%TypeError%"),o=n(347),i=n(682),a=n(225);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(683),o=n(684);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(34),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(685),o=n(694);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(686),o=n(687),i=n(688),a=n(691),u=n(692),c=n(693);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(34)("%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(689);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(690)},function(e,t,n){"use strict";var r=Object.prototype.toString,o=n(349),i=n(196),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(34),o=r("%TypeError%"),i=r("%Number%"),a=r("%RegExp%"),u=r("%parseInt%"),c=n(77),s=n(695),l=n(696),f=c("String.prototype.slice"),p=s(/^0b[01]+$/i),d=s(/^0o[0-7]+$/i),h=s(/^[-+]0x[0-9a-f]+$/i),v=s(new a("["+["
","",""].join("")+"]","g")),y=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),g=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),m=c("String.prototype.replace"),b=n(697);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(p(n))return e(u(f(n,2),2));if(d(n))return e(u(f(n,2),8));if(v(n)||h(n))return NaN;var r=function(e){return m(e,g,"")}(n);if(r!==n)return e(r)}return i(n)}},function(e,t,n){"use strict";var r=n(34)("RegExp.prototype.test"),o=n(119);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(698);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(349),i=n(196),a=n(699),u=n(700),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(198)()){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(34)("%Object%"),o=n(345);e.exports=function(e){return o(e),r(e)}},function(e,t,n){"use strict";var r=n(34),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(704)();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(705);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(65),o=n(350);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(65),o=n(119),i=n(351),a=n(353),u=n(710),c=o(a(),Object);r(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(34)("%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(353),o=n(65);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(119),o=n(65),i=n(354),a=n(355),u=n(713),c=r(a());o(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(34),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(65),o=n(355);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEmojiByCountry=void 0;var r={fr:"🇫🇷"};t.getEmojiByCountry=function(e,t){return"stranger"===e?t("country.stranger"):r[e]}},function(e,t,n){var r={"./en.json":716,"./fr.json":717};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=715},function(e){e.exports=JSON.parse('{"country":{"stranger":"Stranger"},"Scan":{"scan_a_doc":"Scan a doc","save_doc":"Save the doc","filename":"Filename","save":"Save","cancel":"Cancel","qualify":"Describe","apply":"Apply","error":{"offline":"You are currently offline and you can\'t use this functionality. Please, try again later.","uploading":"You are already uploading a file. Please wait until the end of this upload and try again.","generic":"Something went wrong. Please try again."},"successful":{"qualified_ok":"You just have successfully described your file! "},"items":{"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","energy_contract":"Energy provider 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","grocery_invoice":"Grocery 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('{"country":{"stranger":"Étranger"},"Scan":{"scan_a_doc":"Numériser un doc","save_doc":"Enregistrer le document","filename":"Nom du fichier","save":"Sauvegarder","cancel":"Annuler","qualify":"Qualifier","apply":"Appliquer","error":{"offline":"Vous êtes actuellement déconnecté, vous ne pouvez donc pas utiliser cette fonctionnalité. Connectez-vous à internet et recommencez. ","uploading":"Vous avez déjà un fichier en cours de téléchargement. Attendez la fin et recommencez.","generic":"Un problème est survenu. Veuillez réessayer. "},"successful":{"qualified_ok":"Vous venez de qualifier votre fichier avec succès !"},"items":{"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","energy_contract":"Contrat de fournisseur d\'énergies","pay_sheet":"Fiche de paie","unemployment_benefit":"Allocations chômage","pension":"Retraite","other_revenue":"Autres revenus","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\'énergie","water_invoice":"Facture d\'eau","web_service_invoice":"Facture de service web","appliance_invoice":"Facture d\'électroménager","restaurant_invoice":"Facture de restaurant","grocery_invoice":"Facture de courses","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(21);var r=n(356);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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchTimeSeriesByIntervalAndSource=t.saveTimeSeries=void 0;var o=r(n(24)),i=r(n(25)),a=n(23),u=(n(21),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,p;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),p={_type:f,startDate:a,endDate:c,source:s,theme:l,series:i},e.abrupt("return",t.save(p));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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getSharingLink=void 0;var o=r(n(24)),i=r(n(25)),a=n(67),u=(r(n(48)),n(153)),c=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,c,s,l,f,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={_type:a.DOCTYPE_PERMISSIONS,permissions:{files:{type:a.DOCTYPE_FILES,values:n,verbs:["GET"]}}},e.next=3,t.save(s);case 3:return l=e.sent,f=l.data,p=(0,u.generateWebLink)({cozyUrl:t.getStackClient().uri,searchParams:[["sharecode",null==f||null===(i=f.attributes)||void 0===i||null===(c=i.shortcodes)||void 0===c?void 0:c.code]],pathname:"/public",slug:"drive",subDomainType:r?"flat":"nested"}),e.abrupt("return",p);case 7:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.getSharingLink=c},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchAggregatesFromDACC=t.buildAggregateParams=t.sendMeasureToDACC=t.checkMeasureParams=t.isCorrectDateFormat=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(155)),u=(n(21),r(n(48)),function(e){try{return!!new Date(Date.parse(e)).toISOString().startsWith(e)}catch(e){return!1}});t.isCorrectDateFormat=u;var c=function(e){var t=e.createdBy,n=e.measureName,r=e.startDate,o=e.value,i=e.group1,a=e.group2,c=e.group3;if(!t||"string"!=typeof t)throw new Error("Missing or wrong type parameter: createdBy");if(!n||"string"!=typeof n)throw new Error("Missing or wrong type parameter: measureName");if(!r)throw new Error("Missing parameter: startDate");if(!u(r))throw new Error("Date should be in YYYY-MM-DD format");if("number"!=typeof o)throw new Error("Missing or wrong type parameter: value");if(i&&("object"!=typeof i||0===Object.keys(i).length)||a&&("object"!=typeof a||0===Object.keys(a).length)||c&&("object"!=typeof c||0===Object.keys(c).length))throw new Error("Groups should be key-value objects");if(c&&(!a||!i)||a&&!i)throw new Error("Group order must be respected")};t.checkMeasureParams=c;var s=function(){var e=(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:return e.prev=0,c(r),e.next=4,t.getStackClient().fetchJSON("POST","/remote/".concat(n),{data:JSON.stringify(r),path:"measure"});case 4:e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(0),(0,a.default)("error","Error while sending measure to remote doctype: ".concat(e.t0.message)),e.t0;case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.sendMeasureToDACC=s;var l=function(e){var t=e.measureName;if(!t||"string"!=typeof t)throw new Error("Missing or wrong type parameter: measureName");var n=e.startDate||new Date(0).toISOString(),r=e.endDate||new Date(Date.now()).toISOString();if(!u(n)||!u(r))throw(0,a.default)("error","Date should be in YYYY-MM-DD format but received: startDate: ".concat(n," | endDate: ").concat(r)),new Error("Date should be in YYYY-MM-DD format");return{measureName:t,startDate:n,endDate:r}};t.buildAggregateParams=l;var f=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.prev=0,i=l(r),e.next=4,t.getStackClient().fetchJSON("POST","/remote/".concat(n),{data:JSON.stringify(i),path:"aggregate"});case 4:return e.abrupt("return",e.sent);case 7:throw e.prev=7,e.t0=e.catch(0),(0,a.default)("error","Error while fetching aggregates to remote doctype: ".concat(e.t0.message)),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.fetchAggregatesFromDACC=f},function(e,t,n){"use strict";var r=n(56);Object.defineProperty(t,"__esModule",{value:!0}),t.locales=void 0;var o=r(n(723));t.locales=o},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fr",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"en",{enumerable:!0,get:function(){return i.default}});var o=r(n(724)),i=r(n(725))},function(e){e.exports=JSON.parse('{"com":{"tricount.expenses":"Dépenses Tricount","splitwise.expenses":"Dépenses Splitwise","bitwarden.profiles":"Profils du gestionnaire de mot de passe","bitwarden.ciphers":"Entrées du gestionnaire de mot de passe","bitwarden.folders":"Dossiers du gestionnaire de mot de passe","bitwarden.organizations":"Dossiers partagés du gestionnaire de mot de passe","bitwarden.contacts":"Contacts du gestionnaire de mot de passe","grandlyon":{"enedis.*":"Données de consommation d\'électricité","grdf.*":"Données de consommation de gaz","egl.*":"Données de consommation d\'eau","ecolyo.*":"Données Ecolyo"}},"cc":{"cozycloud":{"autocategorization":"Fichier d\'enrichissement du modèle de catégorisation","errors":"Journaux de l\'application","sentry":"Journaux de l\'application","dacc":"Statistiques agrégées anonymes","dacc_v2":"Statistiques agrégées anonymes","dacc.dev":"Statistiques agrégées anonymes pour le développement","dacc.dev_v2":"Statistiques agrégées anonymes pour le développement"}},"eu":{"mycozy":{"dacc":"Statistiques agrégées anonymes"}},"io":{"cozy":{"accounts":"Identifiants","apps":"Liste des applications installées","apps.suggestions":"Suggestions d\'applications","bank.accounts":"Comptes bancaires","bank.accounts.stats":"Statistiques sur les comptes bancaires","bank.balancehistories":"Soldes bancaires","bank.groups":"Groupes de comptes bancaires","bank.operations":"Opérations bancaires","bank.settings":"Paramètres de l\'application Banks","bank.recipients":"Bénéficiaires de virements bancaires","bank.recurrence":"Groupes de récurrence bancaire","bills":"Factures","certified.carbon_copy":"Copie carbone","certified.electronic_safe":"Coffre-fort numérique","coachco2.settings":"Paramètres de l\'application CoachCO2","contacts":"Contacts","contacts.groups":"Groupe de contacts","contacts.accounts":"Comptes associés aux contacts","files":"Fichiers","files.versions":"Versions des fichiers","files.*":"Données liées aux fichiers (fichiers, dossiers, versions, ...)","identities":"Identities","jobs":"Tâches à exécuter","konnectors":"Connecteurs pour importer des données","konnectors.result":"Résultats de connecteurs","netflix.views":"Historique Netflix","netflix.opinions":"Opinions Netflix","notifications":"Notifications","oauth.clients":"Appareils connectés","permissions":"Délégation de permissions","photos.albums":"Albums photos","photos.settings":"Paramètres des photos","settings":"Paramètres","sharings":"Partage","tags":"Tags","timeseries.geojson":"Déplacements","triggers":"Planification de tâches à exécuter dans le futur"}},"fr":{"maif":{"events":"Évènements (Maif)","maifuser":{"contrat":"Contrat (Maif)","home":"Maison (Maif)","family":"Foyer (Maif)","paymentterms":"Paiement (Maif)","sinistre":"Sinistre (Maif)","societaire":"Sociétaire (Maif)"}}},"org":{"fing":{"mesinfos":{"insuranceclaim":"Déclarations d\'assurance (Maif)"}}}}')},function(e){e.exports=JSON.parse('{"com":{"tricount.expenses":"Expenses Tricount","splitwise.expenses":"Expenses Splitwise","bitwarden.profiles":"Password manager profiles","bitwarden.ciphers":"Password manager entries","bitwarden.folders":"Password manager folders","bitwarden.organizations":"Password manager shared folders","bitwarden.contacts":"Password manager contacts","grandlyon":{"enedis.*":"Electricity consumption data","grdf.*":"Gas consumption data","egl.*":"Water consumption data","ecolyo.*":"Ecolyo data"}},"cc":{"cozycloud":{"autocategorization":"Categorization model enrichment file","errors":"The application logs","sentry":"The application logs","dacc":"Anonymous aggregated statistics","dacc_v2":"Anonymous aggregated statistics","dacc.dev":"Anonymous aggregated statistics for development","dacc.dev_v2":"Anonymous aggregated statistics for development"}},"eu":{"mycozy":{"dacc":"Anonymous aggregated statistics","dacc_v2":"Anonymous aggregated statistics"}},"io":{"cozy":{"accounts":"Login details","apps":"List of installed applications","apps.suggestions":"Application suggestions","bank.accounts":"Banking accounts","bank.accounts.stats":"Stats on banking accounts","bank.balancehistories":"Bank balances","bank.groups":"Banking groups","bank.operations":"Bank operations","bank.settings":"Banks app settings","bank.recipients":"Banking transfer recipients","bank.recurrence":"Banks recurrence groups","bills":"Bills","certified.carbon_copy":"Carbon copy","certified.electronic_safe":"Electronic safe","coachco2.settings":"CoachCO2 app settings","contacts":"Contacts","contacts.groups":"Contacts groups","contacts.accounts":"Accounts linked to the contacts","files":"Files","files.versions":"Files versions","files.*":"File-related data (files, folders, versions, ...)","identities":"Identities","jobs":"Jobs","konnectors":"Connectors for importing data","konnectors.result":"Connectors results","netflix.views":"Netflix history","netflix.opinions":"Netflix opinions","notifications":"Notifications","oauth.clients":"Connected devices","permissions":"Delegating permissions","photos.albums":"Photo albums","photos.settings":"Photo settings","settings":"Settings","sharings":"Sharing","tags":"Tags","timeseries.geojson":"Trips","triggers":"Scheduling jobs"}},"fr":{"maif":{"events":"Events (Maif)","maifuser":{"contrat":"Contract (Maif)","home":"Home (Maif)","family":"Family (Maif)","paymentterms":"Payment terms (Maif)","sinistre":"Damage (Maif)","societaire":"Societary (Maif)"}}},"org":{"fing":{"mesinfos":{"insuranceclaim":"Insurance claims (Maif)"}}}}')},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.createMockClient=void 0;var o=r(n(50)),i=r(n(18)),a=r(n(116)),u=r(n(48)),c=n(75),s=n(296),l=n(23);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 p=function(e,t,n){var r=n.definition,o=n.doctype,u=n.data,p=(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},p)))};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],d=l[1];p(a,f,d)}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(4);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}}),Object.defineProperty(t,"useQueryAll",{enumerable:!0,get:function(){return l.default}});var o=r(n(728)),i=r(n(729)),a=r(n(730)),u=r(n(154)),c=r(n(223)),s=r(n(731)),l=r(n(732))},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=n(23),s=n(343),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],p=l[1],d=(0,u.useState)(!0),h=(0,a.default)(d,2),v=h[0],y=h[1],g=(0,u.useState)(null),m=(0,a.default)(g,2),b=m[0],w=m[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)),p("loaded"),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),p("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:v,url:b}};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=r(n(20)),s=n(23),l=function(e){var t=(0,u.useState)(),n=(0,a.default)(t,2),r=n[0],l=n[1],f=(0,u.useState)("idle"),p=(0,a.default)(f,2),d=p[0],h=p[1];return(0,u.useEffect)((function(){var t=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 h("loading"),t.prev=1,t.next=4,e.query((0,s.Q)("io.cozy.settings").getById("capabilities"));case 4:n=t.sent,l((0,c.default)(n,"data.attributes",{})),h("loaded"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),h("failed");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(){return t.apply(this,arguments)}}();e.capabilities?(l(e.capabilities),h("loaded")):t()}),[e]),{capabilities:r,fetchStatus:d}};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),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),p=f[0],d=f[1],h=(0,u.useState)("idle"),v=(0,a.default)(h,2),y=v[0],g=v[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 g("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"),d(a),s(r),g("loaded"),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),g("failed");case 15:case"end":return n.stop()}}),n,null,[[1,12]])})));return function(){return n.apply(this,arguments)}})()()}),[e,t]),{shortcutInfos:c,shortcutImg:p,fetchStatus:y}};t.default=c},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=r(n(206)),s=(r(n(48)),n(21),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){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=(n(21),n(23),r(n(223))),s=r(n(733)),l=function(e,t){var n=(0,s.default)(!1),r=(0,a.default)(n,2),l=r[0],f=r[1],p=(0,c.default)(e,t);return(0,u.useEffect)((function(){(function(){var e=(0,i.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("loaded"!==p.fetchStatus||!p.hasMore||l){e.next=5;break}return f(!0),e.next=4,p.fetchMore();case 4:f(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[p.hasMore,p.fetchStatus,l]),p};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(50)),i=n(0),a=r(n(734)),u=function(e){var t=(0,a.default)(),n=(0,i.useState)(e),r=(0,o.default)(n,2),u=r[0],c=r[1];return[u,(0,i.useCallback)((function(e){t.current&&c(e)}),[])]};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(0),o=function(){var e=(0,r.useRef)();return(0,r.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e};t.default=o},function(e,t,n){var r=n(43),o=n(736),i=n(309),a=Math.max,u=Math.min;e.exports=function(e,t,n){var c,s,l,f,p,d,h=0,v=!1,y=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=c,r=s;return c=s=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,p=setTimeout(_,t),v?m(e):f}function w(e){var n=e-d;return void 0===d||n>=t||n<0||y&&e-h>=l}function _(){var e=o();if(w(e))return x(e);p=setTimeout(_,function(e){var n=t-(e-d);return y?u(n,l-(e-h)):n}(e))}function x(e){return p=void 0,g&&c?m(e):(c=s=void 0,f)}function k(){var e=o(),n=w(e);if(c=arguments,s=this,d=e,n){if(void 0===p)return b(d);if(y)return clearTimeout(p),p=setTimeout(_,t),m(d)}return void 0===p&&(p=setTimeout(_,t)),f}return t=i(t)||0,r(n)&&(v=!!n.leading,l=(y="maxWait"in n)?a(i(n.maxWait)||0,t):l,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==p&&clearTimeout(p),h=0,c=d=s=p=void 0},k.flush=function(){return void 0===p?f:x(o())},k}},function(e,t,n){var r=n(52);e.exports=function(){return r.Date.now()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},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){var r=n(740);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){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,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(743)),s=f(n(744)),l=n(752);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){return!0},d=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,d=t.renderSectionTitle,h=t.id,v=t.getSectionSuggestions,y=t.theme,g=t.getSuggestionValue,m=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,w=this.state,_=w.isFocused,x=w.isCollapsed,k=w.highlightedSectionIndex,O=w.highlightedSuggestionIndex,S=w.valueBeforeUpDown,E=m?p:this.props.shouldRenderSuggestions,j=c.value,P=c.onFocus,C=c.onKeyDown,T=this.willRenderSuggestions(this.props),A=m||_&&!x&&T,R=A?n:[],D=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=E(j);e.setState({isFocused:!0,isCollapsed:!n}),P&&P(t),n&&i({value:j,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=E(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(x)E(j)&&(i({value:j,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var a=r.newHighlightedSectionIndex,u=r.newHighlightedItemIndex,c=void 0;c=null===u?null===S?j:S:e.getSuggestionValueByIndex(a,u),e.updateHighlightedSuggestion(a,u,j),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(A&&!m&&e.closeSuggestions(),null!=s){var l=g(s);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:l,suggestionIndex:O,sectionIndex:k,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:A&&t.preventDefault();var f=A&&!m;if(null===S){if(!f){e.maybeCallOnChange(t,"","escape"),E("")?i({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,S,"escape");f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}C&&C(t)}}),I={query:this.getQuery()};return a.default.createElement(s.default,{multiSection:f,items:R,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:u,renderItemData:I,renderSectionTitle:d,getSectionItems:v,highlightedSectionIndex:k,highlightedItemIndex:O,inputProps:D,itemProps:this.itemProps,theme:(0,l.mapToAutowhateverTheme)(y),id:h,ref:this.storeAutowhateverRef})}}]),t}(i.Component);d.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},d.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=d},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(745).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=d(a),c=d(n(1)),s=d(n(746)),l=d(n(747)),f=d(n(749)),p=d(n(750));function d(e){return e&&e.__esModule?e:{default:e}}var h={},v=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,d=n.itemProps;return o.map((function(n,o){var h="react-autowhatever-"+r+"-",v=h+"section-"+o+"-",y=0===o;return u.default.createElement("div",t(v+"container","sectionContainer",y&&"sectionContainerFirst"),u.default.createElement(f.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:v}),u.default.createElement(p.default,{items:e.sectionsItems[o],itemProps:d,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(p.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(),p=null!==f,d=this.getItemId(c,s),h="react-autowhatever-"+n,v=r({role:"combobox","aria-haspopup":"listbox","aria-owns":h,"aria-expanded":p},e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),this.props.containerProps),y=i(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":h,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",l&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),g=a({containerProps:r({id:h,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:f});return u.default.createElement("div",v,y,g)}}]),t}(a.Component);v.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])},v.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=v},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(748),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(226));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(751)),s=l(n(226));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 p(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;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=p(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)},p(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,p=t.theme,d=t.keyPrefix,h=null===s?d:d+"section-"+s+"-",v="function"==typeof o;return a.default.createElement("ul",r({role:"listbox"},p(h+"items-list","itemsList")),n.map((function(t,n){var d=0===n,y=n===l,g=h+"item-"+n,m=v?o({sectionIndex:s,itemIndex:n}):o,b=r({id:f(s,n),"aria-selected":y},p(g,"item",d&&"itemFirst",y&&"itemHighlighted"),m);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);d.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},d.defaultProps={sectionIndex:null},t.default=d},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(226));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 p=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);p.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=p},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";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(754),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(16),o=n.n(r),i=n(3),a=n.n(i),u=n(9),c=n.n(u),s=n(13),l=n.n(s),f=n(11),p=n.n(f),d=n(14),h=n.n(d),v=n(7),y=n.n(v),g=n(6),m=n.n(g),b=n(98),w=n.n(b),_=n(0),x=n.n(_),k=n(51),O=n(28),S=n(10),E=n.n(S),j=n(15),P=n.n(j),C=n(49),T=n.n(C),A=n(1),R=n.n(A),D=n(17),I=n.n(D),M=["icon","width","height","color","className","preserveColor","rotate","size","spin"],N={"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 F(e){return e instanceof Function}function z(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=T()(e,M),f=Object(_.useMemo)((function(){return F(t)?t:function(e){var t;return(t=e.id?"#".concat(e.id):"#"===e[0]?e:"#"+e)?function(e){return x.a.createElement("svg",e,x.a.createElement("use",{xlinkHref:t}))}:(console.warn("Icon not found ".concat(e,".")),null)}(t)}),[t]),p=e.style;p=Object.assign({},p),o&&(p.fill=o),u&&(p.transform="rotate(".concat(u,"deg)"));var d=a?"icon--preserveColor":"icon",h=I()(i,N[d],P()({},N["icon--spin"],s));return f?x.a.createElement(f,E()({className:h,style:p,width:n||c||"16",height:r||c||"16"},l)):null}z.isProperIcon=function(e){var t=e&&!!e.id,n="string"==typeof e,r=F(e);return t||n||r};var L=R.a.oneOfType([R.a.string,R.a.object,R.a.func]);z.propTypes={icon:L.isRequired,width:R.a.oneOfType([R.a.string,R.a.number]),height:R.a.oneOfType([R.a.string,R.a.number]),color:R.a.oneOfType([R.a.string,R.a.object]),className:R.a.string,preserveColor:R.a.bool,size:R.a.oneOfType([R.a.string,R.a.number]),spin:R.a.bool},z.defaultProps={spin:!1};var U=z,B=n(19),W=n(38),q=n.n(W),H=n(158),Q=n.n(H),V=n(39),$=n.n(V),J=n(40),G=n.n(J),Y=n(32),K=n.n(Y),X=n(41),Z=n.n(X),ee=n(42),te=n.n(ee),ne=n(26),re=n.n(ne),oe=n(101),ie=n.n(oe),ae=n(31),ue=["iconRef"];var ce=function(e){var t=e.iconRef,n=T()(e,ue);return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},n,{ref:t}),x.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"}))},se=n(159),le=n.n(se),fe=R.a.shape({name:R.a.string,slug:R.a.string,developer:R.a.object,links:R.a.shape({icon:R.a.string}),latest_version:R.a.shape({version:R.a.string})});R.a.shape({_id:R.a.string,class:R.a.string,mime:R.a.string,name:R.a.string});function pe(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var de="styles__c-loading-placeholder___3L6Gz",he="styles__c-app-icon___2_O40",ve="styles__c-app-icon-default___3CEmt",ye=function(e){Z()(r,e);var t,n=pe(r);function r(e,t){var o;return $()(this,r),o=n.call(this,e,t),P()(K()(o),"state",{error:null,icon:null,status:o.props.client?"fetching":"errored"}),o.isUnmounting=!1,o.handleError=o.handleError.bind(K()(o)),o.fetchIcon=o.fetchIcon.bind(K()(o)),o}return G()(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,appData:t,priority:r})}},{key:"handleError",value:function(){this.setState({status:"errored"})}},{key:"load",value:(t=Q()(ie.a.mark((function e(){var t,n,r,o,i,a,u,c,s,l,f;return ie.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 x.a.createElement("div",{role:"progressbar",className:I()(de,he,n)});case"done":return x.a.createElement("img",{alt:t,className:I()(he,n),onError:this.handleError,ref:this.props.iconRef,src:i});case"errored":default:return x.a.createElement(U,{className:I()(he,ve,n),height:"100%",icon:r||ce,width:"100%",color:le.a.coolGrey,iconRef:this.props.iconRef})}}}]),r}(_.Component);ye.propTypes={alt:R.a.string,app:R.a.oneOfType([fe,R.a.string]),fallbackIcon:L,fetchIcon:R.a.func,client:R.a.object.isRequired,className:R.a.string,onReady:R.a.func,type:R.a.oneOf(["app","konnector"]),priority:R.a.oneOf(["stack","registry"])},ye.defaultProps={type:"app",priority:"stack"};var ge=Object(ae.withClient)(ye),me=n(29);function be(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 we(e){return x.a.createElement("svg",w()({width:32,height:32},e),x.a.createElement("g",{fill:"none",fillRule:"evenodd"},x.a.createElement("circle",{fill:"#297EF2",fillRule:"nonzero",cx:16,cy:16,r:16}),x.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 _e=function(e){p()(n,e);var t=be(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props.className;return x.a.createElement(ge,{fetchIcon:function(){return"".concat(me.b.get.cozyURL(),"/assets/images/icon-cozy-home.svg")},fallbackIcon:we,className:e})}}]),n}(_.PureComponent),xe=function(e){var t=e.webviewContext,n=e.homeHref;return Object(B.isFlagshipApp)()||q()("flagship.debug")?x.a.createElement("a",{onClick:function(){t.call("backToHome")},className:"coz-nav-apps-btns-home --is-flagship"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"})):n?x.a.createElement("a",{href:n,className:"coz-nav-apps-btns-home"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"})):x.a.createElement("span",{className:"coz-nav-apps-btns-home"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"}))};var ke=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 32 32"},e,{role:"progressbar","aria-busy":"true"}),x.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"}),x.a.createElement("path",{d:"M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"}))},Oe=["busy","disabled"],Se=["children","icon","iconOnly","label","subtle","className","extension","round","size","theme","align","extraRight","tag"],Ee={"c-btn":"styles__c-btn___-2Vnj","c-btn--regular":"styles__c-btn--regular___2HUly","c-btn--ghost":"styles__c-btn--ghost___1HC3L","c-btn--highlight":"styles__c-btn--highlight___2jRfu","c-btn--alpha":"styles__c-btn--alpha___2ECZi","c-btn--action":"styles__c-btn--action___36KFm","c-btn--close":"styles__c-btn--close___3f0AP","c-btn--danger":"styles__c-btn--danger___17T_C","c-btn--secondary":"styles__c-btn--secondary___3Br_N","c-btn--danger-outline":"styles__c-btn--danger-outline___1mO1B","c-btn--text":"styles__c-btn--text___2Vp-2","c-btn--left":"styles__c-btn--left___23VNa","c-btn--center":"styles__c-btn--center___16_Xh","c-btn--right":"styles__c-btn--right___wklLq","c-btn--tiny":"styles__c-btn--tiny___1pFv6","c-btn--small":"styles__c-btn--small___3ArkI","c-btn--large":"styles__c-btn--large___2gatN","c-btn--full":"styles__c-btn--full___2VmR1","c-btn--narrow":"styles__c-btn--narrow___27FHD","c-btn--round":"styles__c-btn--round___1Lkyl","c-btn--subtle":"styles__c-btn--subtle___OknKf",spin:"styles__spin___alZ_V",shake:"styles__shake___2NWWT"},je=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 I()(Ee["c-btn"],(t={},P()(t,Ee["c-btn--".concat(i)],i),P()(t,Ee["c-btn--".concat(o)],"normal"!==o),P()(t,Ee["c-btn--".concat(a)],a),P()(t,Ee["c-btn--".concat(r)],r),P()(t,Ee["c-btn--".concat(c)],c),P()(t,Ee["c-btn--round"],u),t),n)},Pe=function(e){return function(t){var n=t.busy,r=t.disabled,o=T()(t,Oe);return n&&(o["aria-busy"]=!0),r&&(o["aria-disabled"]=!0),"button"===e&&r&&(o.disabled=!0),o}},Ce={button:Pe("button"),a:Pe("a")},Te=function(e){return e},Ae={tiny:8,small:12,large:18},Re=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,p=e.extraRight,d=e.tag,h=T()(e,Se),v=Ce[d]||Te,y=r?o:null,g=r?"u-visuallyhidden":null;return x.a.createElement(d,E()({},v(h),{className:je({extension:u,align:f,round:c,size:s,theme:l,className:a,variant:i&&"subtle"}),title:y}),x.a.createElement("span",null,U.isProperIcon(n)?x.a.createElement(U,{size:Ae[s],icon:n,"aria-hidden":!0,focusable:"false"}):n,o&&x.a.createElement("span",{className:g},o),t,p&&x.a.createElement("span",{className:"u-ml-auto"},p),h.busy&&x.a.createElement(U,{size:Ae[s],icon:ke,spin:!0,className:"u-ml-half","aria-hidden":!0,focusable:"false"})))},De=function(e){return x.a.createElement(Re,e)},Ie=function(e){return x.a.createElement(Re,e)};function Me(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)}}De.propTypes={children:R.a.node,label:R.a.node.isRequired,icon:R.a.oneOfType([R.a.node,L]),iconOnly:R.a.bool,theme:R.a.string,size:R.a.oneOf(["tiny","small","large","normal"]),extension:R.a.oneOf(["narrow","full"]),align:R.a.oneOf(["left","right","center"]),round:R.a.bool,className:R.a.string,onClick:R.a.func,extraRight:R.a.PropTypes.node,busy:R.a.bool,disabled:R.a.bool,type:R.a.oneOf(["button","reset","submit"]),subtle:R.a.bool},De.defaultProps={type:"submit",tag:"button",size:"normal",align:"center"},Ie.defaultProps={tag:"a"};var Ne=function(e){p()(n,e);var t=Me(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 x.a.createElement("div",{className:"coz-bar-banner".concat(o?" unmounted":"")},x.a.createElement("p",null,t("banner.".concat(n,".description"))),x.a.createElement(Ie,{className:"coz-bar-banner-button",size:"tiny",href:r,label:t("banner.".concat(n,".CTA"))}))}}]),n}(_.Component),Fe=Object(O.translate)()(Ne),ze=n(2),Le=n.n(ze),Ue=n(8),Be=n.n(Ue),We=n(165),qe=n.n(We);var He=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("defs",null,x.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"})),x.a.createElement("g",{fillRule:"evenodd",transform:"translate(-160 -255)"},x.a.createElement("use",{xlinkHref:"#cloud_svg__a"})))},Qe=n(160),Ve=n.n(Qe),$e=n(99),Je=n.n($e),Ge=n(94),Ye=n.n(Ge),Ke=function(e){var t=window.innerWidth;return Ye()(e,(function(e){var n=Je()(e,2),r=n[0],o=n[1];return t>=r&&(void 0===o||t<=o)}))},Xe={isExtraLarge:[1201],isLarge:[1024,1200],isMedium:[769,1023],isSmall:[544,768],isTiny:[0,543],isDesktop:[1024],isTablet:[769,1023],isMobile:[0,768]};function Ze(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}R.a.shape(Object.keys(Xe).reduce((function(e,t){return e[t]=R.a.bool.isRequired,e}),{}));var et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe;return function(t){var n=function(n){Z()(o,n);var r=Ze(o);function o(t){var n;return $()(this,o),(n=r.call(this,t)).state={breakpoints:Ke(e)},n.checkBreakpoints=Ve()((function(){n.setState({breakpoints:Ke(e)})}),100,{trailing:!0}),n}return G()(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 x.a.createElement(t,E()({},e,{breakpoints:n}))}}]),o}(_.Component);return n.displayName="withBreakpoints(".concat(t.displayName||t.name,")"),n}},tt=n(12),nt=n(20),rt=n.n(nt),ot=R.a.shape({slug:R.a.string.isRequired,name:R.a.string.isRequired,namePrefix:R.a.string,comingSoon:R.a.bool,href:R.a.string,links:R.a.shape({icon:R.a.string.isRequired})}),it=n(97),at=n(155),ut=n.n(at),ct={drive:{appId:"io.cozy.drive.mobile",uri:"cozydrive://",name:"Cozy Drive"},banks:{appId:Object(B.isAndroidApp)()?"io.cozy.banks.mobile":"io.cozy.banks",uri:"cozybanks://",name:"Cozy Banks"}},st=function(e){return e?e.startsWith("/")?e:"/"+e:"/"},lt=function(e){var t=e.slug,n=e.cozyUrl,r=e.subDomainType,o=e.fallbackUrl,i=e.nativePath;if(i=st(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,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=st(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()};function ft(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 pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var ht=function(e,t,n){var r={};return function(o){var i=n(o),a=r[i];return a&&a.result&&a.date-Date.now()<t||(r[i]={result:e(o),date:Date.now()}),r[i].result}}((function(e){return Object(B.checkApp)(e).catch((function(){return!1}))}),1e4,(function(e){return e.appId})),vt=function(e){Z()(r,e);var t,n=dt(r);function r(e){var t;return $()(this,r),t=n.call(this,e),P()(K()(t),"state",{nativeAppIsAvailable:null,isFetchingAppInfo:!1}),P()(K()(t),"setImgRef",(function(e){t.imgRef=e,t.setState({imgRef:t.imgRef})})),t.imgRef=null,t}return G()(r,[{key:"componentDidMount",value:function(){Object(B.isMobileApp)()&&this.checkAppAvailability()}},{key:"checkAppAvailability",value:(t=Q()(ie.a.mark((function e(){var t,n,o;return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.getSlug(this.props),!(n=ct[t])){e.next=9;break}return e.t0=Boolean,e.next=6,ht(n);case 6:e.t1=e.sent,o=(0,e.t0)(e.t1),this.setState({nativeAppIsAvailable:o});case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this.props.children;r.deprecateSlug(this.props);var t=r.getSlug(this.props),n=this.state.nativeAppIsAvailable,o=ct[t],i=r.getOnClickHref(this.props,n,this.context,this.state.imgRef),a=i.href,u=i.onClick;return e(pt(pt({},o),{},{iconRef:this.setImgRef,onClick:u,href:a}))}}],[{key:"getSlug",value:function(e){return e.app&&e.app.slug?e.app.slug:e.slug}},{key:"deprecateSlug",value:function(e){e.slug&&console.warn("AppLinker's 'slug' prop is deprecated, please use 'app.slug' instead")}},{key:"getOnClickHref",value:function(e,t,n,o){var i=e.app,a=e.client,u=e.nativePath,c=r.getSlug(e),s=e.href,l=null,f=Object(B.isMobileApp)(),p=ct[c];if(Object(B.isFlagshipApp)()){var d=(a?a.getInstanceOptions():void 0).app;if(void 0===d||i.slug!==d.slug){var h=o&&JSON.stringify(pt({},o.getBoundingClientRect().toJSON()));return{onClick:function(e){e.preventDefault(),n?n.call("openApp",s,i,h):ut.a.error('Failed to "openApp('.concat(i,')". WebviewService has the following falsy value "').concat(n,"\" in AppLinker's context."))},href:"#"}}}if(f)t?(l=r.openNativeFromNative.bind(this,e),s="#"):l=r.openWeb.bind(this,e);else if(Object(B.isMobile)()&&p)if(Object(B.isAndroid)())l=r.openNativeFromWeb.bind(this,e);else try{s=lt({slug:c,nativePath:u,fallbackUrl:s})}catch(e){console.error(e),s="#"}return{href:s,onClick:l}}},{key:"openNativeFromWeb",value:function(e,t){var n=e.href,o=e.nativePath,i=e.onAppSwitch,a=r.getSlug(e),u=ct[a];t&&t.preventDefault(),r.onAppSwitch(i),Object(B.openDeeplinkOrRedirect)(u.uri+("/"===o?"":o),(function(){window.location.href=n}))}},{key:"onAppSwitch",value:function(e){"function"==typeof e&&e()}},{key:"openNativeFromNative",value:function(e,t){var n=e.onAppSwitch,o=r.getSlug(e);t&&t.preventDefault();var i=ct[o];r.onAppSwitch(n),Object(B.startApp)(i).catch((function(e){console.error("AppLinker: Could not open native app",e)}))}},{key:"openWeb",value:function(e){r.onAppSwitch(e.onAppSwitch)}}]),r}(x.a.Component);P()(vt,"contextType",it.WebviewContext),vt.defaultProps={nativePath:"/"},vt.propTypes={slug:R.a.string,href:R.a.string,nativePath:R.a.string,onAppSwitch:R.a.func,app:R.a.shape({slug:R.a.string.isRequired,mobile:R.a.shape({schema:R.a.string,id_playstore:R.a.string,id_appstore:R.a.string})}).isRequired};var yt=Object(ae.withClient)(vt);function gt(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 mt=rt()(ae.models,"applications.getAppDisplayName",(function(e){return e.namePrefix&&"cozy"!==e.namePrefix.toLowerCase()?"".concat(e.namePrefix," ").concat(e.name):e.name})),bt=function(e){p()(n,e);var t=gt(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=mt(n);return x.a.createElement(yt,{onAppSwitch:this.onAppSwitch,slug:n.slug,href:this.buildAppUrl(n.href)||"",app:n},(function(e){var i=e.onClick,a=e.href;return x.a.createElement("li",{className:"coz-nav-apps-item".concat(n.isCurrentApp?" --current":"")},x.a.createElement("a",{role:"menuitem",href:a,"data-icon":r,title:o,onClick:i},t?x.a.createElement(_e,{className:"coz-nav-apps-item-icon"}):x.a.createElement(ge,w()({app:n,className:"coz-nav-apps-item-icon",key:n.slug},me.b.get.iconProps())),x.a.createElement("p",{className:"coz-label"},o)))}))}}]),n}(x.a.Component);m()(bt,"buildQueryParams",(function(){return null})),bt.propTypes={app:ot.isRequired,useHomeIcon:R.a.bool};var wt=bt,_t=function(){return x.a.createElement("li",{className:"coz-nav-apps-item"},x.a.createElement("span",{role:"menuitem",disabled:!0},x.a.createElement("div",{className:"coz-nav-apps-item-icon coz-loading-placeholder"}),x.a.createElement("p",{className:"coz-label coz-loading-placeholder"})))};function xt(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 kt=function(e){p()(n,e);var t=xt(n);function n(e,r){var o;return a()(this,n),(o=t.call(this,e,r)).translateApp=Ot(o.props.t),o}return c()(n,[{key:"render",value:function(){var e,t=this.props,n=t.t,r=t.apps,o=t.breakpoints,i=t.homeApp,a=t.isFetchingApps,u=t.onAppSwitch,c=o.isMobile,s=i&&i.isCurrentApp,l=i&&i.slug;return a||r&&r.length?x.a.createElement("div",{className:"coz-nav-pop-content"},x.a.createElement("ul",{className:"coz-nav-group"},c&&i&&x.a.createElement(wt,{app:i,useHomeIcon:!0,onAppSwitch:u}),a?new Array(3).fill({}).map((function(e,t){return x.a.createElement(_t,{key:t})})):r.filter((function(e){return e.slug!==l})).sort((e=this.translateApp,function(t,n){return e(t)>e(n)})).map((function(e,t){return x.a.createElement(wt,{app:e,key:t,onAppSwitch:u})}))),i&&!c&&!s&&x.a.createElement("a",{role:"menuitem",href:i.href,className:"coz-apps-home-btn"},x.a.createElement(U,{icon:He}),n("menu.home"))):x.a.createElement("p",{className:"coz-nav--error coz-nav-group"},n("no_apps"))}}]),n}(_.Component);kt.propTypes={homeApp:R.a.shape({isCurrentApp:R.a.bool,slug:R.a.string}),apps:R.a.array,isFetchingApps:R.a.bool.isRequired};var Ot=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)}},St=Object(k.connect)((function(e){return{apps:Object(tt.d)(e),homeApp:Object(tt.f)(e),isFetchingApps:Object(tt.n)(e)}}))(Object(O.translate)()(et()(kt)));var Et=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{d:"M9 0v2h3.5L6 8.5 7.5 10 14 3.5V7h2V1.003A.996.996 0 0014.997 0H9zM7 2V0H1.003A1 1 0 000 1v14c0 .552.445 1 1 1h14c.552 0 1-.438 1-1.003V9h-2v5H2V2h5z",fillRule:"evenodd"}))};var jt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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 Pt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M7 16A7 7 0 017 2v7h7a7 7 0 01-7 7zm2-9V0a7 7 0 017 7H9z"}))};var Ct=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 20 20"},e),x.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm2 0c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0s10 4.477 10 10zm-8.59 1.206c.134.086.33.046.417-.085a.28.28 0 00-.087-.396c-.116-.073-.125-.223-.125-.223a.296.296 0 00-.3-.282h-.006a.306.306 0 00-.21.087.283.283 0 00-.085.21.895.895 0 00.029.183 1.682 1.682 0 01-2.087.004c.03-.11.03-.189.03-.191a.294.294 0 00-.291-.292.285.285 0 00-.213.076.289.289 0 00-.098.204s-.008.15-.126.225a.282.282 0 00-.085.396.315.315 0 00.442.068l.007-.005c.392.295.874.455 1.375.455a2.29 2.29 0 001.379-.456l.033.022zm.766-5.313c.521.502.845 1.153.932 1.856C14.726 7.892 16 9.236 16 10.869 16 12.594 14.574 14 12.822 14H7.177C5.425 14 4 12.595 4 10.868c0-.823.322-1.601.906-2.19a3.179 3.179 0 011.893-.92c.085-.707.41-1.36.933-1.865A3.18 3.18 0 019.954 5a3.18 3.18 0 012.222.893z"}))};var Tt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 15 16"},e),x.a.createElement("path",{d:"M14.992 8V5a1.001 1.001 0 00-2 0v3h-1V2a1.001 1.001 0 00-2 0v5h-1V1a1.001 1.001 0 00-2 0v6h-1V2c0-.551-.45-1-1-1-.551 0-1 .449-1 1v6.5a.5.5 0 01-.88.325L1.1 6.125c-.222-.182-.64-.166-.897.091a.7.7 0 00-.075.898c.064.117 1.542 4.144 3.227 6.798A4.486 4.486 0 007.156 16h3.336c2.48 0 4.5-2.019 4.5-4.5V8z"}))};var At=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M9.734 5.995c0-.55.45-.995.99-.995h4.02a1 1 0 01.99.995v8.01c0 .55-.451.995-.99.995h-4.02a1 1 0 01-.99-.995v-8.01zm2 1.005v6h2V7h-2zm-11-5.002c0-.551.447-.998.998-.998h11.003c.552 0 .999.444.999 1v1h-11v6h5v4H.73c-.55 0-.858-.417-.68-.95L.733 10V1.998z"}))};var Rt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M7.889 13.999L7 10 6 9 4 6l-.355-2.128A6 6 0 007.888 14zm.238-11.998L10 3.5V5L8 6.5l-1.5 1 .5 1 3 .5 1 1v1.5l-1.549 2.323A6 6 0 008.127 2.001zM8 16A8 8 0 118 0a8 8 0 010 16z"}))};var Dt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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 It=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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"}))},Mt=Object(O.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 x.a.createElement("div",{className:"coz-nav-storage"},x.a.createElement("p",{className:"coz-nav-storage-text"},t("storage_phrase",{diskUsage:o,diskQuota:r})),x.a.createElement("progress",{className:"cozy-nav-storage-bar",value:o,max:r,min:"0"}))})),Nt=function(e){var t=e.icon;return x.a.createElement(U,{className:"u-mr-half",color:"var(--slateGrey)",icon:t})},Ft=function(){return x.a.createElement(U,{className:"coz-nav-settings-item-btn-external-icon",color:"var(--coolGrey)",icon:Et})},zt=function(e){var t=e.children;return x.a.createElement("ul",{className:"coz-nav-group"},t)},Lt=function(e){var t=e.children;return x.a.createElement("li",{className:"coz-nav-settings-item"},t)},Ut=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.shoulDisplayViewOfferButton,l=e.managerUrlPremiumLink;return x.a.createElement("div",{className:"coz-nav-pop-content"},u&&x.a.createElement("hr",null),r&&x.a.createElement(zt,null,x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/profile"),target:"_self",title:t("profile")},x.a.createElement(Nt,{className:"u-mr-half",icon:jt}),t("profile"))),(!u||!Object(B.isMobileApp)())&&s&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:l,target:"_self",title:t("plans")},x.a.createElement(Nt,{icon:Ct}),t("plans"),x.a.createElement(Ft,null))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",target:"_self",title:t("storage"),href:"".concat(r,"#/storage")},x.a.createElement(Nt,{icon:Pt}),x.a.createElement("span",null,t("storage"),x.a.createElement(Mt,{data:o}))))),x.a.createElement(zt,null,q()("settings.permissions-dashboard")&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/permissions/slug"),target:"_self",title:t("permissions")},x.a.createElement(Nt,{icon:Tt}),t("permissions"))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/connectedDevices"),target:"_self",title:t("connectedDevices")},x.a.createElement(Nt,{icon:At}),t("connectedDevices"))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/sessions"),target:"_self",title:t("connections")},x.a.createElement(Nt,{icon:Rt}),t("connections")))),u&&i&&!Object(B.isMobileApp)()&&x.a.createElement(zt,null,x.a.createElement(Lt,null,x.a.createElement("button",{type:"button",role:"menuitem",className:"coz-nav-settings-item-btn",busy:c,onClick:i},x.a.createElement(Nt,{icon:He})," ",t("claudy.title")))),x.a.createElement(zt,null,!Object(B.isMobileApp)()&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",target:"_blank",rel:"noopener noreferrer",href:"https://support.cozy.io/",title:t("help")},x.a.createElement(Nt,{icon:It}),t("help"),x.a.createElement(Ft,null))),x.a.createElement(Lt,null,x.a.createElement("button",{type:"button",role:"menuitem",onClick:n,title:t("logout")},x.a.createElement(Nt,{icon:Dt})," ",t("logout")))))};Ut.defaultProps={shoulDisplayViewOfferButton:!1},Ut.propTypes={shoulDisplayViewOfferButton:R.a.bool,t:R.a.func.isRequired,onLogOut:R.a.func.isRequired,settingsAppURL:R.a.string,storageData:R.a.object,onClaudy:R.a.oneOfType([R.a.bool,R.a.func]),isDrawer:R.a.bool,isClaudyLoading:R.a.bool};var Bt=Object(O.translate)()(Ut);function Wt(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 qt=function(e){p()(o,e);var t,n,r=Wt(o);function o(e){var t;return a()(this,o),t=r.call(this,e),m()(l()(t),"onDrawerClick",(function(e){e.target===t.wrapperRef&&t.close()})),m()(l()(t),"onTransitionEnd",(function(){t.props.visible?(t.gesturesHandler||t.attachGestures(),t.preventBackgroundScrolling()):(t.restoreBackgroundScrolling(),t.setState({isClosing:!1})),t.props.drawerListener()})),m()(l()(t),"componentWillReceiveProps",function(){var e=Be()(Le.a.mark((function e(n){return Le.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)}}()),m()(l()(t),"UNSAFE_componentWillReceiveProps",function(){var e=Be()(Le.a.mark((function e(n){return Le.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)}}()),m()(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=Be()(Le.a.mark((function e(){return Le.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 qe.a.Manager(document.documentElement,{recognizers:[[qe.a.Pan,{direction:qe.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=Be()(Le.a.mark((function e(){var t,n,r,o;return Le.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 x.a.createElement("div",{className:"coz-drawer-wrapper",onClick:this.onDrawerClick,"aria-hidden":r?"false":"true",ref:function(t){e.wrapperRef=t}},x.a.createElement("aside",{ref:function(t){e.asideRef=t}},x.a.createElement("nav",{className:"coz-drawer--apps"},x.a.createElement(St,{onAppSwitch:this.close})),x.a.createElement("hr",{className:"coz-sep-flex"}),x.a.createElement("nav",{className:"coz-drawer--settings"},x.a.createElement(Bt,{onLogOut:this.handleLogout,storageData:u,settingsAppURL:a,isClaudyLoading:o,onClaudy:n,toggleSupport:i,isDrawer:!0}))))}}]),o}(_.Component),Ht=Object(k.connect)((function(e){return{storageData:Object(tt.i)(e),settingsAppURL:Object(tt.h)(e)}}),(function(e){return{fetchSettingsData:function(){return e(Object(tt.c)())},logOut:function(){return e(Object(tt.q)())}}}))(qt),Qt=n(35);var Vt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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",fillRule:"evenodd"}))},$t={query:function(){return Object(ae.Q)("io.cozy.settings").getById("instance")},as:"instanceQuery"},Jt={query:function(){return Object(ae.Q)("io.cozy.settings").getById("context")},as:"contextQuery"},Gt={query:function(){return Object(ae.Q)("io.cozy.settings").getById("disk-usage")},as:"diskUsageQuery"},Yt=n(162),Kt=function(){return Object(Yt.a)("8.3.0")};function Xt(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 Zt=void 0,en=void 0,tn=void 0;ae.models&&(Zt=ae.models.instance,tn=function(e){var t=rt()(e,"diskUsage.data.attributes.quota",!1);return parseInt(t)<5e10},en=function(e){return!Zt.isSelfHosted(e)&&Zt.arePremiumLinksEnabled(e)&&Zt.getUuid(e)&&!tn(e)});var nn=function(e){p()(n,e);var t=Xt(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(l()(r),"onClickOutside",(function(e){(r.props.isFetching||r.state.opened)&&(r.rootRef.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),m()(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,p=r.storageData,d=r.settingsAppURL,h=r.isFetching,v=!1,y=Kt();if(y&&!(t=[s,l,f].some((function(e){return"loading"===e.fetchStatus})))){var g={context:f,diskUsage:s,instance:l};v=Zt.shouldDisplayOffers(g)||en(g),e=Zt.buildPremiumLink(g)}var m=!1;m=y?!t&&!h:!h;var b=this.state.opened&&m;return x.a.createElement("div",{className:"coz-nav coz-nav-settings",ref:function(e){n.rootRef=e}},x.a.createElement(De,{type:"button",theme:"text",onClick:this.toggleMenu,className:"coz-nav-settings-btn","aria-controls":"coz-nav-pop--settings",busy:o,icon:Vt,label:u("menu.settings")}),x.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--settings",id:"coz-nav-pop--settings","aria-hidden":!b},m&&x.a.createElement(x.a.Fragment,null,x.a.createElement(Bt,{onLogOut:function(){a&&"function"==typeof a?a():i()},toggleSupport:c,storageData:p,settingsAppURL:d,shoulDisplayViewOfferButton:v,managerUrlPremiumLink:e}))))}}]),n}(_.Component),rn=function(e){return{storageData:Object(tt.i)(e),settingsAppURL:Object(tt.h)(e),isBusy:Object(tt.p)(e),isFetching:Object(tt.o)(e)}},on=function(e){return{fetchSettingsData:function(){return e(Object(tt.c)())},logOut:function(){return e(Object(tt.q)())}}},an=Kt()?Object(Qt.compose)(Object(O.translate)(),Object(ae.queryConnect)({instanceQuery:$t,contextQuery:Jt,diskUsageQuery:Gt}),Object(k.connect)(rn,on))(nn):Object(Qt.compose)(Object(O.translate)(),Object(k.connect)(rn,on))(nn);var un=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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 cn=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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 sn(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 ln=function(e){p()(n,e);var t=sn(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 x.a.createElement("div",{className:"coz-nav-apps-btns --loading"},x.a.createElement("div",{className:"coz-nav-apps-btns-home coz-loading-placeholder"}),x.a.createElement("div",{className:"coz-nav-apps-btns-main coz-loading-placeholder"}));var p=!f&&o?[l("".concat(i,".name_prefix"),{_:o}),l("".concat(i,".name"),{_:r})].join(" "):l("".concat(i,".name"),{_:r}),d=!c&&t&&t.href;return x.a.createElement("div",{className:"coz-nav-apps-btns".concat(f?" --currentHome":"")},x.a.createElement(xe,{homeHref:d}),!f&&x.a.createElement("span",{className:"coz-nav-apps-btns-sep"}),x.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&&x.a.createElement("img",{className:"coz-bar-hide-sm",src:a,width:"28",alt:""}),x.a.createElement("span",{className:"coz-nav-app-name"},p),!c&&x.a.createElement(U,{icon:s?cn:un,color:"#95999d",size:"12"})))}}]),n}(_.Component),fn=Object(k.connect)((function(e){return{homeApp:Object(tt.f)(e),isFetchingApps:Object(tt.n)(e)}}),(function(){return{}}))(Object(O.translate)()(ln));function pn(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 dn=function(e){p()(n,e);var t=pn(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(l()(r),"onClickOutside",(function(e){r.state.opened&&(r.rootRef.contains(e.target)||r.modalContainer.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),m()(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 x.a.createElement("nav",{className:"coz-nav coz-nav-apps",ref:function(t){e.rootRef=t}},x.a.createElement(fn,{appName:n,appNamePrefix:r,appSlug:o,iconPath:i,handleClick:this.toggleMenu,opened:u,isPublic:a}),x.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--apps",id:"coz-nav-pop--apps","aria-hidden":!u},x.a.createElement(St,null)))}}]),n}(_.Component),hn=n(96),vn=n.n(hn),yn=n(366),gn=n.n(yn),mn=n(367),bn=n.n(mn);var wn=n(161);function _n(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 xn=function(e){return e.toString().toLowerCase().replace(/\//g," ").normalize("NFD").replace(/[\u0300-\u036f]/g,"").split(" ")},kn=function(e,t){var n=xn(t),r=xn(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(x.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},On=function(e){p()(n,e);var t=_n(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)),m()(l()(e),"state",{input:"",query:null,searching:!1,focused:!1,suggestionsBySource:[],sourceURLs:[]}),m()(l()(e),"sources",[]),m()(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]):wn.a.log("unhandled message:",t)}})),m()(l()(e),"onChange",(function(t,n){var r=n.newValue;e.setState({input:r})})),m()(l()(e),"changeFocusState",(function(t){e.setState({focused:t})})),m()(l()(e),"clearSuggestions",(function(){e.setState({suggestionsBySource:[]})})),m()(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=Be()(Le.a.mark((function t(r){var i,a,u,c;return Le.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(vn()(e.suggestionsBySource),[{title:c,suggestions:u}])})}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))})),m()(l()(e),"onSuggestionsClearRequested",(function(){e.clearSuggestions(),e.debouncedOnSuggestionsFetchRequested.cancel(),e.setState({query:null,searching:!1})})),m()(l()(e),"onSuggestionSelected",(function(t){return function(){var n=Be()(Le.a.mark((function n(r,o){var i,a,u;return Le.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=o.suggestion,a=i.onSelect,!/^id_note:/.test(a)){n.next=9;break}return n.next=5,ae.models.note.fetchURL(t,{id:a.substr(8)});case 5:u=n.sent,window.location.href=u,n.next=10;break;case 9:/^open:/.test(a)?window.location.href=a.substr(5):console.log("suggestion onSelect ("+a+") could not be executed");case 10:e.setState({input:"",query:null});case 11:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()})),m()(l()(e),"getSectionSuggestions",(function(e){return e.suggestions.slice(0,10)})),m()(l()(e),"getSuggestionValue",(function(e){return e.subtitle})),m()(l()(e),"renderSectionTitle",(function(){return null})),m()(l()(e),"renderSuggestion",(function(t){return x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-item"},t.icon&&x.a.createElement("img",{className:"coz-searchbar-autosuggest-suggestion-icon",src:t.icon,alt:"icon"}),x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-content"},x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-title"},kn(t.title,e.state.query)),t.subtitle&&x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-subtitle"},kn(t.subtitle,e.state.query))))})),e}return c()(n,[{key:"UNSAFE_componentWillMount",value:function(){this.debouncedOnSuggestionsFetchRequested=bn()(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(me.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(vn()(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,s=c.t,l=c.client,f=""!==n&&null===r,p=a.reduce((function(e,t){return e+t.suggestions.length}),0)>0,d={placeholder:s("searchbar.placeholder"),value:n,onChange:this.onChange,onFocus:function(){return e.changeFocusState(!0)},onBlur:function(){return e.changeFocusState(!1)}},h={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 x.a.createElement("div",{className:"coz-searchbar",role:"search"},u.map((function(e,t){return x.a.createElement("iframe",{src:e,style:{visibility:"hidden",height:"0px",width:"0px"},key:e+t})})),x.a.createElement(gn.a,{theme:h,suggestions:a,multiSection:!0,onSuggestionsFetchRequested:this.debouncedOnSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected(l),getSuggestionValue:this.getSuggestionValue,getSectionSuggestions:this.getSectionSuggestions,renderSectionTitle:this.renderSectionTitle,renderSuggestion:this.renderSuggestion,inputProps:d,focusInputOnSuggestionClick:!1}),""!==n&&!f&&i&&!p&&x.a.createElement("div",{className:"coz-searchbar-autosuggest-status-container"},s("searchbar.empty",{query:n})))}}]),n}(_.Component),Sn=Object(O.translate)()(Object(ae.withClient)(On));function En(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 jn=function(e){p()(n,e);var t=En(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),m()(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(me.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 x.a.createElement("div",{className:"coz-claudy ".concat(t?"coz-claudy--opened":"")},x.a.createElement("button",{type:"button",className:"coz-claudy-icon coz-bar-hide-sm","data-claudy-opened":o,"data-claudy-loading":r,onClick:this.toggle}),x.a.createElement("div",{className:"coz-claudy-intent-wrapper",ref:function(t){e.intentWrapperRef=t}}))}}]),n}(_.Component),Pn=n(95),Cn=n.n(Pn);var Tn=function(){return(Tn=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 An(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 Rn(e){return e}function Dn(e,t){void 0===t&&(t=Rn);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 In=function(e){void 0===e&&(e={});var t=Dn(null);return t.options=Tn({async:!0,ssr:!1},e),t}();function Mn(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(_.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 Nn=function(){},Fn=_.forwardRef((function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Nn,onWheelCapture:Nn,onTouchMoveCapture:Nn}),o=r[0],i=r[1],a=e.forwardProps,u=e.children,c=e.className,s=e.removeScrollBar,l=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,v=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,m=An(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,w=Mn([n,t]),x=Tn({},m,o);return _.createElement(_.Fragment,null,l&&_.createElement(b,{sideCar:In,removeScrollBar:s,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?_.cloneElement(_.Children.only(u),Tn({},x,{ref:w})):_.createElement(g,Tn({},x,{className:c,ref:w}),u))}));Fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var zn,Ln=function(e){var t=e.sideCar,n=An(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 _.createElement(r,Tn({},n))};Ln.isSideCarExport=!0;function Un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zn||n.nc;return t&&e.setAttribute("nonce",t),e}var Bn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Un())&&(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)}}},Wn=function(){var e,t=(e=Bn(),function(t){_.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},qn={left:0,top:0,right:0,gap:0},Hn=function(e){return parseInt(e||"",10)||0},Qn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return qn;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[Hn(n),Hn(r),Hn(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])}},Vn=Wn(),$n=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"},Jn=function(e){var t=_.useState(Qn(e.gapMode)),n=t[0],r=t[1];_.useEffect((function(){r(Qn(e.gapMode))}),[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=void 0===a?"margin":a;return _.createElement(Vn,{styles:$n(n,!o,u,i?"":"!important")})},Gn=function(e,t){var n=t;do{if(Yn(e,n)){var r=Kn(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Yn=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)},Kn=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},Xn=!1;if("undefined"!=typeof window)try{var Zn=Object.defineProperty({},"passive",{get:function(){return Xn=!0,!0}});window.addEventListener("test",Zn,Zn),window.removeEventListener("test",Zn,Zn)}catch(e){Xn=!1}var er=!!Xn&&{passive:!1},tr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nr=function(e){return[e.deltaX,e.deltaY]},rr=function(e){return e&&"current"in e?e.current:e},or=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},ir=0,ar=[];var ur=function(e,t){return e.useMedium(t),Ln}(In,(function(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(ir++)[0],i=_.useState((function(){return Wn()}))[0],a=_.useRef(e);_.useEffect((function(){a.current=e}),[e]),_.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(rr)).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=_.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=tr(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",p=Gn(f,l);if(!p)return!0;if(p?o=f:(o="v"===f?"h":"v",p=Gn(f,l)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var d=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 p=Kn(e,a),d=p[0],h=p[1]-p[2]-d;(d||h)&&Yn(e,a)&&(l+=h,f+=d),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}(d,t,e,"h"===d?c:s,!0)}),[]),c=_.useCallback((function(e){var n=e;if(ar.length&&ar[ar.length-1]===i){var r="deltaY"in n?nr(n):tr(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(rr).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?u(n,c[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),s=_.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=_.useCallback((function(e){n.current=tr(e),r.current=void 0}),[]),f=_.useCallback((function(t){s(t.type,nr(t),t.target,u(t,e.lockRef.current))}),[]),p=_.useCallback((function(t){s(t.type,tr(t),t.target,u(t,e.lockRef.current))}),[]);_.useEffect((function(){return ar.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,er),document.addEventListener("touchmove",c,er),document.addEventListener("touchstart",l,er),function(){ar=ar.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,er),document.removeEventListener("touchmove",c,er),document.removeEventListener("touchstart",l,er)}}),[]);var d=e.removeScrollBar,h=e.inert;return _.createElement(_.Fragment,null,h?_.createElement(i,{styles:or(o)}):null,d?_.createElement(Jn,{gapMode:"margin"}):null)})),cr=_.forwardRef((function(e,t){return _.createElement(Fn,Tn({},e,{ref:t,sideCar:ur}))}));cr.classNames=Fn.classNames;var sr=cr;function lr(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var fr="styles__c-overlay___31iWd",pr=["onEscape","children","className","innerRef"],dr=function(e){Z()(n,e);var t=lr(n);function n(){var e;$()(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)),P()(K()(e),"handleKeydown",(function(t){27===t.keyCode&&e.props.onEscape()})),P()(K()(e),"handleClick",(function(t){e.props.onClick&&t.target===t.currentTarget&&e.props.onClick()})),e}return G()(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=e.innerRef,o=Cn()(this.props,pr),i=document.body.getBoundingClientRect().height>window.innerHeight?x.a.Fragment:sr;return x.a.createElement("div",E()({ref:r,className:I()(fr,n),onClick:this.handleClick},o),x.a.createElement(i,null,t))}}]),n}(_.Component);dr.propTypes={className:R.a.string,children:R.a.node,onEscape:R.a.func};var hr=x.a.forwardRef((function(e,t){return x.a.createElement(dr,E()({innerRef:t},e))}));function vr(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 yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return mr(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 mr(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=n.call(e)},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 mr(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 br=n(121),wr=n.n(br),_r=function(e){var t=e.into,n=e.children,r=document.querySelector(t);return wr.a.createPortal(n,r)},xr=n(369),kr=n.n(xr);function Or(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var Sr=function(e){Z()(n,e);var t=Or(n);function n(){return $()(this,n),t.apply(this,arguments)}return G()(n,[{key:"render",value:function(){return this.props.children}}]),n}(_.Component);function Er(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var jr={"CozyTheme--inverted":"styles__CozyTheme--inverted___e9x-M","CozyTheme--normal":"styles__CozyTheme--normal___3KdKA","c-modal":"styles__c-modal___33aV9","c-modal-content":"styles__c-modal-content___2av1P","c-modal-header":"styles__c-modal-header___hTCm5","c-modal-header--branded":"styles__c-modal-header--branded___1wwof","c-modal-footer":"styles__c-modal-footer___2Z4Tc","c-modal-container":"styles__c-modal-container___31zmi","c-modal-wrapper":"styles__c-modal-wrapper___8PyE9","c-modal--xsmall":"styles__c-modal--xsmall___1lu1t","c-modal--small":"styles__c-modal--small___XUfOM","c-modal--medium":"styles__c-modal--medium___1dS6h","c-modal--large":"styles__c-modal--large___3arEs","c-modal--xlarge":"styles__c-modal--xlarge___1XePQ","c-modal--xxlarge":"styles__c-modal--xxlarge___3Xp1K","c-modal-wrapper--fullscreen":"styles__c-modal-wrapper--fullscreen___3ygpX","c-modal--fullscreen":"styles__c-modal--fullscreen___8xZVw","c-modal-illu-header":"styles__c-modal-illu-header___3oi9k","c-modal-illu-header--ghost":"styles__c-modal-illu-header--ghost___3E9lu","is-active":"styles__is-active___1fLce","c-modal--small-spacing":"styles__c-modal--small-spacing___1foWa","c-modal--large-spacing":"styles__c-modal--large-spacing___n2gNs","c-modal-app":"styles__c-modal-app___1e4sV","c-app-editor":"styles__c-app-editor___JFuCk","c-modal-app-icon":"styles__c-modal-app-icon___3MjON","c-modal-content-fixed":"styles__c-modal-content-fixed___3wKzQ","c-modal-footer--button":"styles__c-modal-footer--button___1sIa4","c-modal-section":"styles__c-modal-section___2QNq3","c-modal-close":"styles__c-modal-close___1v2bp","c-modal--closable":"styles__c-modal--closable___29CLQ","c-modal-close--notitle":"styles__c-modal-close--notitle___1rqne","c-modal--overflowHidden":"styles__c-modal--overflowHidden___3H87t","c-modal-back-button":"styles__c-modal-back-button___aIF_M",spin:"styles__spin___lXiub",shake:"styles__shake___13P1Q"};var Pr=function(e){Z()(n,e);var t=Er(n);function n(e){var r;$()(this,n),r=t.call(this,e),P()(K()(r),"UNSAFE_componentWillUpdate",(function(e){var t=e.children;r.refreshComputedParts(t)})),P()(K()(r),"handleScroll",(function(){if(r.contentHeader){var e=K()(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 G()(n,[{key:"componentWillUpdate",value:function(e,t){this.UNSAFE_componentWillUpdate(e,t)}},{key:"refreshComputedParts",value:function(e){var t=function(e){return x.a.Children.toArray(e).find((function(e){return e&&e.nodeName===Sr}))}(e);this.animatedHeader=t,this.childrenToRender=t?function(e){return x.a.Children.map(e,(function(e){return e&&e.nodeName!==Sr?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 x.a.createElement("div",{className:I()(jr["c-modal-content".concat(r?"-fixed":"")],n),ref:function(t){e.scrollingContent=t}},i&&x.a.createElement("div",{className:i.attributes.className,ref:function(t){e.contentHeader=t}},x.a.createElement("h2",{className:jr["c-modal-illu-header"]},i.children),x.a.createElement("div",{className:I()(jr["c-modal-illu-header--ghost"],i.attributes.activeClassName,P()({},jr["is-active"],o))},i.children)),a)}}]),n}(_.Component),Cr="styles__c-modal-content___2av1P",Tr="styles__c-modal-section___2QNq3",Ar=function(e){var t=e.children,n=e.className;return x.a.createElement("div",{className:I()(Cr,Tr,n)},t)};function Rr(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 Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ir="styles__c-modal-header___hTCm5",Mr="styles__c-modal-header--branded___1wwof",Nr="styles__c-modal-app___1e4sV",Fr="styles__c-app-editor___JFuCk",zr="styles__c-modal-app-icon___3MjON",Lr=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 x.a.createElement("div",{className:I()(Ir,r),style:u,id:c},t&&x.a.createElement("h2",null,t),s?x.a.createElement("h2",null,n):n,i&&x.a.createElement("h2",{className:Nr},o&&x.a.createElement("img",{className:zr,src:o}),a&&x.a.createElement("span",{className:Fr},a," "),i))},Ur=function(e){var t=e.logo,n=e.bg,r=e.className,o=e.style,i=void 0===o?{}:o;return x.a.createElement("h2",{className:I()(Mr,r),style:Dr({background:n},i)},x.a.createElement("img",{src:t,alt:""}))};var Br=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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"}))},Wr=Object(_.createContext)(null),qr=function(){var e=Object(_.useContext)(Wr);if(null===e)throw new Error("Cannot use useBreakpoints without BreakpointsProvider. The component must have a BreakpointsProvider above it.");return e},Hr="styles__c-modal-close___1v2bp",Qr=function(e){var t=qr().isMobile,n=e.color;return x.a.createElement(U,{icon:Br,size:t?"16":"24",color:n||le.a.coolGrey})},Vr=function(e){var t=e.onClick,n=e.color,r=e.className;return x.a.createElement("button",{className:I()(Hr,r),onClick:t,type:"button","aria-label":"close"},x.a.createElement(Qr,{color:n}))},$r="styles__c-modal-footer___2Z4Tc",Jr=function(e){var t=e.children,n=e.className;return x.a.createElement("div",{className:I()($r,n)},t)},Gr="styles__c-modal-footer--button___1sIa4",Yr=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 x.a.createElement("div",{className:I()("u-flex","u-flex-wrap-reverse","u-flex-justify-end",Gr,c)},u,t&&n&&x.a.createElement(De,{theme:r,onClick:n,label:t,className:"u-flex-auto-s"}),o&&i&&x.a.createElement(De,{theme:a,onClick:i,label:o,className:"u-flex-auto-s"}))};Yr.defaultProps={primaryType:"regular",secondaryType:"secondary"};var Kr=Yr;var Xr=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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"}))},Zr=["className"],eo="styles__c-modal-back-button___aIF_M",to=function(e){var t=qr().isMobile,n=e.className,r=T()(e,Zr);return x.a.createElement(De,E()({icon:Xr,iconOnly:!0,extension:"narrow",theme:"text",label:"back",className:I()(eo,"u-m-0 u-pos-absolute",{"u-p-1":t,"u-p-half":!t,"u-h-3":t},n)},r))};var no=x.a.createContext(null);function ro(){return x.a.useContext(no)}var oo=n(373);function io(e,t,n){return(t=Object(oo.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ao(e,t){if(null==e)return{};var n,r,o=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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function uo(){return(uo=Object.assign?Object.assign.bind():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)}var co=n(59);function so(e){return e&&"object"===Object(co.a)(e)&&e.constructor===Object}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?uo({},e):e;return so(e)&&so(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(so(t[o])&&o in e?r[o]=lo(e[o],t[o],n):r[o]=t[o])})),r}function fo(){return(fo=Object.assign?Object.assign.bind():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)}var po=["xs","sm","md","lg","xl"];function ho(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,u=ao(e,["values","unit","step"]);function c(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function s(e,t){var r=po.indexOf(t);return r===po.length-1?c(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[po[r+1]]?n[po[r+1]]:t)-a/100).concat(o,")")}return fo({keys:po,values:n,up:c,down:function(e){var t=po.indexOf(e)+1,r=n[po[t]];return t===po.length?c("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:s,only:function(e){return s(e,e)},width:function(e){return n[e]}},u)}function vo(e,t,n){var r;return fo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),fo({paddingLeft:t(2),paddingRight:t(2)},n,io({},e.up("sm"),fo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},io(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),io(r,e.up("sm"),{minHeight:64}),r)},n)}function yo(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}var go={black:"#000",white:"#fff"},mo={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"},bo={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"},wo={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"},_o={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"},xo={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ko={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Oo={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function So(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 Math.min(Math.max(t,e),n)}function Eo(e){if(e.type)return e;if("#"===e.charAt(0))return Eo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(yo(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function jo(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(t,"(").concat(n.join(", "),")")}function Po(e){var t="hsl"===(e=Eo(e)).type?Eo(function(e){var t=(e=Eo(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),jo({type:u,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Co(e,t){if(e=Eo(e),t=So(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 jo(e)}function To(e,t){if(e=Eo(e),t=So(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 jo(e)}var Ao={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:go.white,default:mo[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ro={text:{primary:go.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:mo[800],default:"#303030"},action:{active:go.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Do(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=To(e.main,o):"dark"===t&&(e.dark=Co(e.main,i)))}function Io(e){var t=e.primary,n=void 0===t?{light:bo[300],main:bo[500],dark:bo[700]}:t,r=e.secondary,o=void 0===r?{light:wo.A200,main:wo.A400,dark:wo.A700}:r,i=e.error,a=void 0===i?{light:_o[300],main:_o[500],dark:_o[700]}:i,u=e.warning,c=void 0===u?{light:xo[300],main:xo[500],dark:xo[700]}:u,s=e.info,l=void 0===s?{light:ko[300],main:ko[500],dark:ko[700]}:s,f=e.success,p=void 0===f?{light:Oo[300],main:Oo[500],dark:Oo[700]}:f,d=e.type,h=void 0===d?"light":d,v=e.contrastThreshold,y=void 0===v?3:v,g=e.tonalOffset,m=void 0===g?.2:g,b=ao(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function w(e){return function(e,t){var n=Po(e),r=Po(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ro.text.primary)>=y?Ro.text.primary:Ao.text.primary}var _=function(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;if(!(e=fo({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(yo(4,t));if("string"!=typeof e.main)throw new Error(yo(5,JSON.stringify(e.main)));return Do(e,"light",n,m),Do(e,"dark",r,m),e.contrastText||(e.contrastText=w(e.main)),e},x={dark:Ro,light:Ao};return lo(fo({common:go,type:h,primary:_(n),secondary:_(o,"A400","A200","A700"),error:_(a),warning:_(c),info:_(l),success:_(p),grey:mo,contrastThreshold:y,getContrastText:w,augmentColor:_,tonalOffset:m},x[h]),b)}function Mo(e){return Math.round(1e5*e)/1e5}function No(e){return Mo(e)}var Fo={textTransform:"uppercase"};function zo(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,u=n.fontWeightLight,c=void 0===u?300:u,s=n.fontWeightRegular,l=void 0===s?400:s,f=n.fontWeightMedium,p=void 0===f?500:f,d=n.fontWeightBold,h=void 0===d?700:d,v=n.htmlFontSize,y=void 0===v?16:v,g=n.allVariants,m=n.pxToRem,b=ao(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var w=a/14,_=m||function(e){return"".concat(e/y*w,"rem")},x=function(e,t,n,r,i){return fo({fontFamily:o,fontWeight:e,fontSize:_(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(Mo(r/t),"em")}:{},i,g)},k={h1:x(c,96,1.167,-1.5),h2:x(c,60,1.2,-.5),h3:x(l,48,1.167,0),h4:x(l,34,1.235,.25),h5:x(l,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(l,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(l,16,1.5,.15),body2:x(l,14,1.43,.15),button:x(p,14,1.75,.4,Fo),caption:x(l,12,1.66,.4),overline:x(l,12,2.66,1,Fo)};return lo(fo({htmlFontSize:y,pxToRem:_,round:No,fontFamily:o,fontSize:a,fontWeightLight:c,fontWeightRegular:l,fontWeightMedium:p,fontWeightBold:h},k),b,{clone:!1})}function Lo(){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 Uo=["none",Lo(0,2,1,-1,0,1,1,0,0,1,3,0),Lo(0,3,1,-2,0,2,2,0,0,1,5,0),Lo(0,3,3,-2,0,3,4,0,0,1,8,0),Lo(0,2,4,-1,0,4,5,0,0,1,10,0),Lo(0,3,5,-1,0,5,8,0,0,1,14,0),Lo(0,3,5,-1,0,6,10,0,0,1,18,0),Lo(0,4,5,-2,0,7,10,1,0,2,16,1),Lo(0,5,5,-3,0,8,10,1,0,3,14,2),Lo(0,5,6,-3,0,9,12,1,0,3,16,2),Lo(0,6,6,-3,0,10,14,1,0,4,18,3),Lo(0,6,7,-4,0,11,15,1,0,4,20,3),Lo(0,7,8,-4,0,12,17,2,0,5,22,4),Lo(0,7,8,-4,0,13,19,2,0,5,24,4),Lo(0,7,9,-4,0,14,21,2,0,5,26,4),Lo(0,8,9,-5,0,15,22,2,0,6,28,5),Lo(0,8,10,-5,0,16,24,2,0,6,30,5),Lo(0,8,11,-5,0,17,26,2,0,6,32,5),Lo(0,9,11,-5,0,18,28,2,0,7,34,6),Lo(0,9,12,-6,0,19,29,2,0,7,36,6),Lo(0,10,13,-6,0,20,31,3,0,8,38,7),Lo(0,10,13,-6,0,21,33,3,0,8,40,7),Lo(0,10,14,-6,0,22,35,3,0,8,42,7),Lo(0,11,14,-7,0,23,36,3,0,9,44,8),Lo(0,11,15,-7,0,24,38,3,0,9,46,8)],Bo={borderRadius:4};function Wo(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 qo(e,t){if(e){if("string"==typeof e)return Wo(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)?Wo(e,t):void 0}}function Ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||qo(e,t)||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 Qo(e){return function(e){if(Array.isArray(e))return Wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qo(e)||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.")}()}var Vo=function(e,t){return t?lo(e,t,{clone:!1}):e},$o={xs:0,sm:600,md:960,lg:1280,xl:1920},Jo={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat($o[e],"px)")}};var Go={m:"margin",p:"padding"},Yo={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ko={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Xo=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!Ko[e])return[e];e=Ko[e]}var t=Ho(e.split(""),2),n=t[0],r=t[1],o=Go[n],i=Yo[r]||"";return Array.isArray(i)?i.map((function(e){return o+e})):[o+i]})),Zo=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function ei(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function ti(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function ni(e){var t=ei(e.theme);return Object.keys(e).map((function(n){if(-1===Zo.indexOf(n))return null;var r=ti(Xo(n),t),o=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||Jo;return t.reduce((function(e,o,i){return e[r.up(r.keys[i])]=n(t[i]),e}),{})}if("object"===Object(co.a)(t)){var o=e.theme.breakpoints||Jo;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}(e,o,r)})).reduce(Vo,{})}ni.propTypes={},ni.filterProps=Zo;function ri(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=ei({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var oi={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)"},ii={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ai(e){return"".concat(Math.round(e),"ms")}var ui={easing:oi,duration:ii,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?ii.standard:n,o=t.easing,i=void 0===o?oi.easeInOut:o,a=t.delay,u=void 0===a?0:a;ao(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ai(r)," ").concat(i," ").concat("string"==typeof u?u:ai(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ci={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function si(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,u=e.spacing,c=e.typography,s=void 0===c?{}:c,l=ao(e,["breakpoints","mixins","palette","spacing","typography"]),f=Io(a),p=ho(n),d=ri(u),h=lo({breakpoints:p,direction:"ltr",mixins:vo(p,d,o),overrides:{},palette:f,props:{},shadows:Uo,typography:zo(f,s),spacing:d,shape:Bo,transitions:ui,zIndex:ci},l),v=arguments.length,y=new Array(v>1?v-1:0),g=1;g<v;g++)y[g-1]=arguments[g];return h=y.reduce((function(e,t){return lo(e,t)}),h)}var li=si();var fi,pi=n(156),di=n.n(pi),hi=n(78),vi=n.n(hi),yi=n(228),gi=n.n(yi),mi=n(43),bi=n.n(mi);!function(e){e.Dark="dark",e.Light="light"}(fi||(fi={}));var wi=function(e,t,n){if(e){var r=bi()(t)&&di()(t,vi.a),o=!gi()(r)&&r;o&&e.call("setFlagshipUI",o,n)}},_i=function(e,t){return t&&getComputedStyle(t).getPropertyValue("background-color")||e.palette.background.paper},xi=function(e){return Object(B.getFlagshipMetadata)().immersive||e&&e.classList.contains("coz-theme-primary")?"light":"dark"},ki=function(){var e,t,n,r,o=ro()||li,i=document.querySelector(".coz-bar-wrapper"),a=document.getElementById("sidebar");e={bottomBackground:o.palette.background.paper,bottomTheme:"dark",topBackground:o.palette.background.paper,topTheme:"dark"},t={bottomBackground:o.palette.background[a?"default":"paper"],bottomTheme:Object(B.getFlagshipMetadata)().immersive?"light":"dark",bottomOverlay:"transparent",topOverlay:"transparent",topBackground:_i(o,i),topTheme:xi(i)},n="cozy-ui/Modal",r=Object(it.useWebviewIntent)(),Object(_.useEffect)((function(){return wi(r,e,"".concat(n||"unknown"," (onMount)")),function(){return wi(r,t,"".concat(n||"unknown"," (onUnmount)"))}}),[r])},Oi=Object(B.isFlagshipApp)()?function(){return ki(),null}:function(){return null},Si=["children","description","title","closable","dismissAction","overflowHidden","className","closeBtnClassName","closeBtnColor","into","size","height","width","spacing","mobileFullscreen","overlayClassName","wrapperClassName","primaryText","primaryAction","primaryType","secondaryText","secondaryAction","secondaryType","containerClassName"];function Ei(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 ji(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var Pi={"CozyTheme--inverted":"styles__CozyTheme--inverted___e9x-M","CozyTheme--normal":"styles__CozyTheme--normal___3KdKA","c-modal":"styles__c-modal___33aV9","c-modal-content":"styles__c-modal-content___2av1P","c-modal-header":"styles__c-modal-header___hTCm5","c-modal-header--branded":"styles__c-modal-header--branded___1wwof","c-modal-footer":"styles__c-modal-footer___2Z4Tc","c-modal-container":"styles__c-modal-container___31zmi","c-modal-wrapper":"styles__c-modal-wrapper___8PyE9","c-modal--xsmall":"styles__c-modal--xsmall___1lu1t","c-modal--small":"styles__c-modal--small___XUfOM","c-modal--medium":"styles__c-modal--medium___1dS6h","c-modal--large":"styles__c-modal--large___3arEs","c-modal--xlarge":"styles__c-modal--xlarge___1XePQ","c-modal--xxlarge":"styles__c-modal--xxlarge___3Xp1K","c-modal-wrapper--fullscreen":"styles__c-modal-wrapper--fullscreen___3ygpX","c-modal--fullscreen":"styles__c-modal--fullscreen___8xZVw","c-modal-illu-header":"styles__c-modal-illu-header___3oi9k","c-modal-illu-header--ghost":"styles__c-modal-illu-header--ghost___3E9lu","is-active":"styles__is-active___1fLce","c-modal--small-spacing":"styles__c-modal--small-spacing___1foWa","c-modal--large-spacing":"styles__c-modal--large-spacing___n2gNs","c-modal-app":"styles__c-modal-app___1e4sV","c-app-editor":"styles__c-app-editor___JFuCk","c-modal-app-icon":"styles__c-modal-app-icon___3MjON","c-modal-content-fixed":"styles__c-modal-content-fixed___3wKzQ","c-modal-footer--button":"styles__c-modal-footer--button___1sIa4","c-modal-section":"styles__c-modal-section___2QNq3","c-modal-close":"styles__c-modal-close___1v2bp","c-modal--closable":"styles__c-modal--closable___29CLQ","c-modal-close--notitle":"styles__c-modal-close--notitle___1rqne","c-modal--overflowHidden":"styles__c-modal--overflowHidden___3H87t","c-modal-back-button":"styles__c-modal-back-button___aIF_M",spin:"styles__spin___lXiub",shake:"styles__shake___13P1Q"},Ci=Pr,Ti=function(e){Z()(n,e);var t=ji(n);function n(e){var r;return $()(this,n),r=t.call(this,e),P()(K()(r),"handleOutsideClick",(function(e){e.target===e.currentTarget&&r.props.dismissAction&&r.props.dismissAction()})),r.titleID=kr()("modal_"),r}return G()(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,p=t.size,d=t.height,h=t.width,v=t.spacing,y=t.mobileFullscreen,g=t.overlayClassName,m=t.wrapperClassName,b=t.primaryText,w=t.primaryAction,_=t.primaryType,k=t.secondaryText,O=t.secondaryAction,S=t.secondaryType,j=t.containerClassName,C=T()(t,Si),A=this.titleID,R=Object.assign({},d&&{height:d},h&&{width:h});return x.a.createElement(_r,{into:f},x.a.createElement(Oi,null),x.a.createElement("div",{className:I()(Pi["c-modal-container"],j)},x.a.createElement(hr,{onEscape:i?a:void 0,className:g},x.a.createElement("div",{className:I()(Pi["c-modal-wrapper"],P()({},Pi["c-modal-wrapper--fullscreen"],y),m),onClick:i?this.handleOutsideClick:void 0},x.a.createElement("div",E()({className:I()(Pi["c-modal"],Pi["c-modal--".concat(p)],(e={},P()(e,Pi["c-modal--overflowHidden"],u),P()(e,Pi["c-modal--".concat(v,"-spacing")],v),P()(e,Pi["c-modal--fullscreen"],y),P()(e,Pi["c-modal--closable"],i),e),c),style:R,role:"dialog","aria-modal":"true","aria-labelledby":o?A:null},C),i&&x.a.createElement(Vr,{className:I()(s,P()({},Pi["c-modal-close--notitle"],!o)),onClick:a,color:l}),o&&x.a.createElement(Lr,{title:o,id:A}),r&&x.a.createElement(Ci,null,r),n,b&&w||k&&O?x.a.createElement(Jr,null,x.a.createElement(Kr,{primaryText:b,primaryAction:w,primaryType:_,secondaryText:k,secondaryAction:O,secondaryType:S})):null)))))}}]),n}(_.Component);Ti.propTypes={title:R.a.node,description:R.a.node,secondaryType:R.a.string,secondaryText:R.a.string,secondaryAction:R.a.func,primaryType:R.a.string,primaryText:R.a.string,primaryAction:R.a.func,closable:R.a.bool,overflowHidden:R.a.bool,className:R.a.string,closeBtnClassName:R.a.string,closeBtnColor:R.a.string,into:R.a.string,size:R.a.oneOf(["xsmall","small","medium","large","xlarge","xxlarge"]),height:R.a.string,width:R.a.string,spacing:R.a.oneOf(["small","large"]),mobileFullscreen:R.a.bool,overlayClassName:R.a.string,wrapperClassName:R.a.string,containerClassName:R.a.string,dismissAction:R.a.func},Ti.defaultProps={primaryType:"regular",secondaryType:"secondary",closable:!0,overflowHidden:!1,size:"small",into:"body",mobileFullscreen:!1},Ur.propTypes={bg:R.a.string.isRequired,logo:R.a.string.isRequired},Lr.propTypes={appIcon:R.a.string,appEditor:R.a.string,appName:R.a.string},Pr.propTypes={iconSrc:R.a.node,iconDest:R.a.node,fixed:R.a.bool};var Ai,Ri=(Ai=[{src:"withCross",dest:"closable"},{src:"crossClassName",dest:"closeBtnClassName"},{src:"crossColor",dest:"closeBtnColor"},{fn:function(e){var t;return e.secondaryAction&&!e.dismissAction?((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ei(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},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,o,i=gr(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.src&&a.dest){var u=a.src,c=a.dest;if(void 0===e[u])continue;(n=n||yr({},e))[c]=e[u],delete n[u],r="`".concat(u,"` is deprecated and has been migrated automatically, you should use `").concat(c,"` now")}else if(a.fn){var s=a.fn(n||e);if(2!==s.length)throw new Error("migrateOption `fn` should return [newProps, msg].");var l=Je()(s,2);n=l[0],r=l[1]}else console.warn("migrateProps option is not valid, valid properties are `src`, `dest`, `fn`. You passed",a);window.SHOW_DEPRECATION_WARNINGS&&r&&(console.warn("Deprecation: ".concat(r)),r=null)}}catch(e){i.e(e)}finally{i.f()}return n||e}(t,Ai);return x.a.createElement(e,n)};return t.displayName=e.displayName||e.name,t})(Ti);Ri.propTypes=Ti.propTypes,Ri.defaultProps=Ti.defaultProps,Object.assign(Ri,{ModalContent:Pr,ModalSection:Ar,ModalFooter:Jr,ModalHeader:Lr,AnimatedContentHeader:Sr,ModalBrandedHeader:Ur,ModalDescription:Ci,ModalBackButton:to});var Di=Ri;function Ii(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ii(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var Mi=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ii(e))&&(r&&(r+=" "),r+=t);return r};function Ni(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 Fi(e,t){if(null==e)return{};var n,r,o=Ni(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zi=n(79),Li=n.n(zi),Ui="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},Bi="object"===("undefined"==typeof window?"undefined":Ui(window))&&"object"===("undefined"==typeof document?"undefined":Ui(document))&&9===document.nodeType;var Wi=n(374);function qi(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,Object(Wi.a)(r.key),r)}}function Hi(e,t,n){return t&&qi(e.prototype,t),n&&qi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qi(e,t){return(Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qi(e,t)}function $i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ji={}.constructor;function Gi(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Gi);if(e.constructor!==Ji)return e;var t={};for(var n in e)t[n]=Gi(e[n]);return t}function Yi(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=Gi(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var Ki=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Xi=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Ki(e[n]," ");else t=Ki(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Zi(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function ea(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function ta(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;!1===n.format&&(i=-1/0);var u=Zi(n),c=u.linebreak,s=u.space;if(e&&i++,a)if(Array.isArray(a))for(var l=0;l<a.length;l++){var f=a[l];for(var p in f){var d=f[p];null!=d&&(r&&(r+=c),r+=ea(p+":"+s+Xi(d)+";",i))}}else for(var h in a){var v=a[h];null!=v&&(r&&(r+=c),r+=ea(h+":"+s+Xi(v)+";",i))}for(var y in t){var g=t[y];null!=g&&"fallbacks"!==y&&(r&&(r+=c),r+=ea(y+":"+s+Xi(g)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r=""+c+r+c),ea(""+e+s+"{"+r,--i)+ea("}",i)):r}var na=/([[\].#*$><+~=|^:(),"'`\s])/g,ra="undefined"!=typeof CSS&&CSS.escape,oa=function(e){return ra?ra(e):e.replace(na,"\\$1")},ia=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var u=i&&a;if(u?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var c=this.options.sheet;return c&&c.attached,this},e}(),aa=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var i=r.selector,a=r.scoped,u=r.sheet,c=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=c($i($i(o)),u),o.selectorText="."+oa(o.id)),o}Vi(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Xi(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?uo({},e,{allowEmpty:!0}):e;return ta(this.selectorText,this.style,n)},Hi(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(ia),ua={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new aa(e,t,n)}},ca={indent:1,children:!0},sa=/@([\w-]+)/,la=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(sa);for(var o in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=ca);var t=Zi(e).linebreak;if(null==e.indent&&(e.indent=ca.indent),null==e.children&&(e.children=ca.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),fa=/@media|@supports\s+/,pa={onCreateRule:function(e,t,n){return fa.test(e)?new la(e,t,n):null}},da={indent:1,children:!0},ha=/@keyframes\s+([\w-]+)/,va=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(ha);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,i=n.sheet,a=n.generateId;for(var u in this.id=!1===o?this.name:oa(a(this,i)),this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(u,t[u],uo({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=da);var t=Zi(e).linebreak;if(null==e.indent&&(e.indent=da.indent),null==e.children&&(e.children=da.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),ya=/@keyframes\s+/,ga=/\$([\w-]+)/g,ma=function(e,t){return"string"==typeof e?e.replace(ga,(function(e,n){return n in t?t[n]:e})):e},ba=function(e,t,n){var r=e[t],o=ma(r,n);o!==r&&(e[t]=o)},wa={onCreateRule:function(e,t,n){return"string"==typeof e&&ya.test(e)?new va(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&ba(e,"animation-name",n.keyframes),"animation"in e&&ba(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return ma(e,r.keyframes);default:return e}}},_a=function(e){function t(){return e.apply(this,arguments)||this}return Vi(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?uo({},e,{allowEmpty:!0}):e;return ta(this.key,this.style,n)},t}(ia),xa={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new _a(e,t,n):null}},ka=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Zi(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=ta(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return ta(this.at,this.style,e)},e}(),Oa=/@font-face/,Sa={onCreateRule:function(e,t,n){return Oa.test(e)?new ka(e,t,n):null}},Ea=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return ta(this.key,this.style,e)},e}(),ja={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Ea(e,t,n):null}},Pa=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=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}(),Ca={"@charset":!0,"@import":!0,"@namespace":!0},Ta=[ua,pa,wa,xa,Sa,ja,{onCreateRule:function(e,t,n){return e in Ca?new Pa(e,t,n):null}}],Aa={process:!0},Ra={force:!0,process:!0},Da=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,i=r.sheet,a=r.jss,u=r.Renderer,c=r.generateId,s=r.scoped,l=uo({classes:this.classes,parent:o,sheet:i,jss:a,Renderer:u,generateId:c,scoped:s,name:e,keyframes:this.keyframes,selector:void 0},n),f=e;e in this.raw&&(f=e+"-d"+this.counter++),this.raw[f]=t,f in this.classes&&(l.selector="."+oa(this.classes[f]));var p=Yi(f,t,l);if(!p)return null;this.register(p);var d=void 0===l.index?this.index.length:l.index;return this.index.splice(d,0,p),p},t.replace=function(e,t,n){var r=this.get(e),o=this.index.indexOf(r);r&&this.remove(r);var i=n;return-1!==o&&(i=uo({},n,{index:o})),this.add(e,t,i)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof aa?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof va&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof aa?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof va&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Aa);var o=this.options,i=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var u=t.style;if(i.onUpdate(n,t,a,r),r.process&&u&&u!==t.style){for(var c in i.onProcessStyle(t.style,t,a),t.style){var s=t.style[c];s!==u[c]&&t.prop(c,s,Ra)}for(var l in u){var f=t.style[l],p=u[l];null==f&&f!==p&&t.prop(l,null,Ra)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=Zi(e).linebreak,i=0;i<this.index.length;i++){var a=this.index[i].toString(e);(a||r)&&(t&&(t+=o),t+=a)}return t},e}(),Ia=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=uo({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Da(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(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)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var o=this.rules.replace(e,t,n);return o&&this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(this.renderer&&(o?r.renderable&&this.renderer.replaceRule(r.renderable,o):this.renderer.deleteRule(r)),o):o:(this.deployed=!1,o)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Ma=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Na=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=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)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Ni(t,["attached"]),o=Zi(r).linebreak,i="",a=0;a<this.registry.length;a++){var u=this.registry[a];null!=n&&u.attached!==n||(i&&(i+=o),i+=u.toString(r))}return i},Hi(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),Fa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),za="2f1acc6c3a606b082e5eef5e54414ffb";null==Fa[za]&&(Fa[za]=0);var La=Fa[za]++,Ua=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+La+o+t:i+n.key+"-"+La+(o?"-"+o:"")+"-"+t}},Ba=function(e){var t;return function(){return t||(t=e()),t}},Wa=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},qa=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Xi(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var o=r?r.indexOf("!important"):-1,i=o>-1?r.substr(0,o-1):r;e.style.setProperty(t,i,o>-1?"important":"")}}catch(e){return!1}return!0},Ha=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Qa=function(e,t){return e.selectorText=t,e.selectorText===t},Va=Ba((function(){return document.querySelector("head")}));function $a(e){var t=Na.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&&n.renderer)return{parent:n.renderer.element.parentNode,node: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))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=Va(),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(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var Ja=Ba((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Ga=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Ya=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Ka=function(){function e(e){this.getPropertyValue=Wa,this.setProperty=qa,this.removeProperty=Ha,this.setSelector=Qa,this.hasInsertedRules=!1,this.cssRules=[],e&&Na.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=Ja();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=$a(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else Va().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var i=Ya(n,t);if(!1===(o=Ga(n,r.toString({children:!1}),i)))return!1;this.refCssRule(e,i,o)}return this.insertRules(r.rules,o),o}var a=e.toString();if(!a)return!1;var u=Ya(n,t),c=Ga(n,a,u);return!1!==c&&(this.hasInsertedRules=!0,this.refCssRule(e,u,c),c)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ia&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Xa=0,Za=function(){function e(e){this.id=Xa++,this.version="10.9.2",this.plugins=new Ma,this.options={id:{minify:!1},createGenerateId:Ua,Renderer:Bi?Ka:null,plugins:[]},this.generateId=Ua({minify:!1});for(var t=0;t<Ta.length;t++)this.plugins.use(Ta[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=uo({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Na.index?0:Na.index+1);var r=new Ia(e,uo({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Na.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=uo({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=Yi(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),eu=function(e){return new Za(e)},tu="object"==typeof CSS&&null!=CSS&&"number"in CSS;
|
|
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]",p="[object Error]",d="[object Function]",h="[object GeneratorFunction]",v="[object Map]",y="[object Number]",g="[object Object]",m="[object RegExp]",b="[object Set]",w="[object String]",_="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",E="[object Float64Array]",j="[object Int8Array]",P="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",A="[object Uint16Array]",R="[object Uint32Array]",D=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,z=RegExp(N.source),L=RegExp(F.source),U=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,$=RegExp(V.source),J=/^\s+|\s+$/g,G=/^\s+/,Y=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,X=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,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,pe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\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]",ve="["+de+"]",ye="["+pe+"]",ge="\\d+",me="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+de+ge+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",xe="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+be+"|"+we+")",je="(?:"+Se+"|"+we+")",Pe="(?:"+ye+"|"+_e+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Pe+("(?:\\u200d(?:"+[xe,ke,Oe].join("|")+")[\\ufe0e\\ufe0f]?"+Pe+")*"),Te="(?:"+[me,ke,Oe].join("|")+")"+Ce,Ae="(?:"+[xe+ye+"?",ye,ke,Oe,he].join("|")+")",Re=RegExp("['’]","g"),De=RegExp(ye,"g"),Ie=RegExp(_e+"(?="+_e+")|"+Ae+Ce,"g"),Me=RegExp([Se+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ve,Se,"$"].join("|")+")",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ve,Se+Ee,"$"].join("|")+")",Se+"?"+Ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Se+"+(?:['’](?: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_])",ge,Te].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff"+pe+"\\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 ]/,ze=["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"],Le=-1,Ue={};Ue[S]=Ue[E]=Ue[j]=Ue[P]=Ue[C]=Ue[T]=Ue["[object Uint8ClampedArray]"]=Ue[A]=Ue[R]=!0,Ue[c]=Ue[s]=Ue[k]=Ue[l]=Ue[O]=Ue[f]=Ue[p]=Ue[d]=Ue[v]=Ue[y]=Ue[g]=Ue[m]=Ue[b]=Ue[w]=Ue[x]=!1;var Be={};Be[c]=Be[s]=Be[k]=Be[O]=Be[l]=Be[f]=Be[S]=Be[E]=Be[j]=Be[P]=Be[C]=Be[v]=Be[y]=Be[g]=Be[m]=Be[b]=Be[w]=Be[_]=Be[T]=Be["[object Uint8ClampedArray]"]=Be[A]=Be[R]=!0,Be[p]=Be[d]=Be[x]=!1;var We={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=parseFloat,He=parseInt,Qe="object"==typeof e&&e&&e.Object===Object&&e,Ve="object"==typeof self&&self&&self.Object===Object&&self,$e=Qe||Ve||Function("return this")(),Je=t&&!t.nodeType&&t,Ge=Je&&"object"==typeof r&&r&&!r.nodeType&&r,Ye=Ge&&Ge.exports===Je,Ke=Ye&&Qe.process,Xe=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||Ke&&Ke.binding&&Ke.binding("util")}catch(e){}}(),Ze=Xe&&Xe.isArrayBuffer,et=Xe&&Xe.isDate,tt=Xe&&Xe.isMap,nt=Xe&&Xe.isRegExp,rt=Xe&&Xe.isSet,ot=Xe&&Xe.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)&&_t(e,t,0)>-1}function pt(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 dt(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 vt(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 gt(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 mt=St("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 _t(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 xt(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 Ot(e,t){var n=null==e?0:e.length;return n?Pt(e,t)/n:NaN}function St(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function jt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Pt(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 Ct(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Tt(e){return function(t){return e(t)}}function At(e,t){return dt(t,(function(t){return e[t]}))}function Rt(e,t){return e.has(t)}function Dt(e,t){for(var n=-1,r=e.length;++n<r&&_t(t,e[n],0)>-1;);return n}function It(e,t){for(var n=e.length;n--&&_t(t,e[n],0)>-1;);return n}function Mt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Nt=Et({"À":"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=Et({"&":"&","<":"<",">":">",'"':""","'":"'"});function zt(e){return"\\"+We[e]}function Lt(e){return Ne.test(e)}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Bt(e,t){return function(n){return e(t(n))}}function Wt(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 qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Qt(e){return Lt(e)?function(e){var t=Ie.lastIndex=0;for(;Ie.test(e);)++t;return t}(e):mt(e)}function Vt(e){return Lt(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.split("")}(e)}var $t=Et({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Jt=function e(t){var n,r=(t=null==t?$e:Jt.defaults($e.Object(),t,Jt.pick($e,ze))).Array,o=t.Date,pe=t.Error,de=t.Function,he=t.Math,ve=t.Object,ye=t.RegExp,ge=t.String,me=t.TypeError,be=r.prototype,we=de.prototype,_e=ve.prototype,xe=t["__core-js_shared__"],ke=we.toString,Oe=_e.hasOwnProperty,Se=0,Ee=(n=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=_e.toString,Pe=ke.call(ve),Ce=$e._,Te=ye("^"+ke.call(Oe).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=Ye?t.Buffer:void 0,Ie=t.Symbol,Ne=t.Uint8Array,We=Ae?Ae.allocUnsafe:void 0,Qe=Bt(ve.getPrototypeOf,ve),Ve=ve.create,Je=_e.propertyIsEnumerable,Ge=be.splice,Ke=Ie?Ie.isConcatSpreadable:void 0,Xe=Ie?Ie.iterator:void 0,mt=Ie?Ie.toStringTag:void 0,Et=function(){try{var e=ei(ve,"defineProperty");return e({},"",{}),e}catch(e){}}(),Gt=t.clearTimeout!==$e.clearTimeout&&t.clearTimeout,Yt=o&&o.now!==$e.Date.now&&o.now,Kt=t.setTimeout!==$e.setTimeout&&t.setTimeout,Xt=he.ceil,Zt=he.floor,en=ve.getOwnPropertySymbols,tn=Ae?Ae.isBuffer:void 0,nn=t.isFinite,rn=be.join,on=Bt(ve.keys,ve),an=he.max,un=he.min,cn=o.now,sn=t.parseInt,ln=he.random,fn=be.reverse,pn=ei(t,"DataView"),dn=ei(t,"Map"),hn=ei(t,"Promise"),vn=ei(t,"Set"),yn=ei(t,"WeakMap"),gn=ei(ve,"create"),mn=yn&&new yn,bn={},wn=ji(pn),_n=ji(dn),xn=ji(hn),kn=ji(vn),On=ji(yn),Sn=Ie?Ie.prototype:void 0,En=Sn?Sn.valueOf:void 0,jn=Sn?Sn.toString:void 0;function Pn(e){if(Ha(e)&&!Da(e)&&!(e instanceof Rn)){if(e instanceof An)return e;if(Oe.call(e,"__wrapped__"))return Pi(e)}return new An(e)}var Cn=function(){function e(){}return function(t){if(!qa(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Tn(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Rn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}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 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 Mn(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 Nn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Mn;++t<n;)this.add(e[t])}function Fn(e){var t=this.__data__=new In(e);this.size=t.size}function zn(e,t){var n=Da(e),r=!n&&Ra(e),o=!n&&!r&&Fa(e),i=!n&&!r&&!o&&Xa(e),a=n||r||o||i,u=a?Ct(e.length,ge):[],c=u.length;for(var s in e)!t&&!Oe.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 Ln(e){var t=e.length;return t?e[Nr(0,t-1)]:void 0}function Un(e,t){return Oi(mo(e),Gn(t,0,e.length))}function Bn(e){return Oi(mo(e))}function Wn(e,t,n){(void 0!==n&&!Ca(e[t],n)||void 0===n&&!(t in e))&&$n(e,t,n)}function qn(e,t,n){var r=e[t];Oe.call(e,t)&&Ca(r,n)&&(void 0!==n||t in e)||$n(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Ca(e[n][0],t))return n;return-1}function Qn(e,t,n,r){return er(e,(function(e,o,i){t(r,e,n(e),i)})),r}function Vn(e,t){return e&&bo(t,wu(t),e)}function $n(e,t,n){"__proto__"==t&&Et?Et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){for(var n=-1,o=t.length,i=r(o),a=null==e;++n<o;)i[n]=a?void 0:vu(e,t[n]);return i}function Gn(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,p=4&t;if(n&&(a=o?n(e,r,o,i):n(e)),void 0!==a)return a;if(!qa(e))return e;var x=Da(e);if(x){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return mo(e,a)}else{var D=ri(e),I=D==d||D==h;if(Fa(e))return fo(e,u);if(D==g||D==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,_u(t),e)}(a,e)):function(e,t){return bo(e,ti(e),t)}(e,Vn(a,e))}else{if(!Be[D])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 O:return function(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case S:case E:case j:case P:case C:case T:case"[object Uint8ClampedArray]":case A:case R:return ho(e,n);case v:return new r;case y:case w:return new r(e);case m: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 _:return o=e,En?ve(En.call(o)):{}}var o}(e,D,u)}}i||(i=new Fn);var M=i.get(e);if(M)return M;i.set(e,a),Ga(e)?e.forEach((function(r){a.add(Yn(r,t,n,r,e,i))})):Qa(e)&&e.forEach((function(r,o){a.set(o,Yn(r,t,n,o,e,i))}));var N=x?void 0:(p?s?$o:Vo:s?_u:wu)(e);return ut(N||e,(function(r,o){N&&(r=e[o=r]),qn(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=ve(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 Xn(e,t,n){if("function"!=typeof e)throw new me(i);return wi((function(){e.apply(void 0,n)}),t)}function Zn(e,t,n,r){var o=-1,i=ft,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=dt(t,Tt(n))),r?(i=pt,a=!1):t.length>=200&&(i=Rt,a=!1,t=new Nn(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 p=s;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Pn.templateSettings={escape:U,evaluate:B,interpolate:W,variable:"",imports:{_:Pn}},Pn.prototype=Tn.prototype,Pn.prototype.constructor=Pn,An.prototype=Cn(Tn.prototype),An.prototype.constructor=An,Rn.prototype=Cn(Tn.prototype),Rn.prototype.constructor=Rn,Dn.prototype.clear=function(){this.__data__=gn?gn(null):{},this.size=0},Dn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Dn.prototype.get=function(e){var t=this.__data__;if(gn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Oe.call(t,e)?t[e]:void 0},Dn.prototype.has=function(e){var t=this.__data__;return gn?void 0!==t[e]:Oe.call(t,e)},Dn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gn&&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=Hn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ge.call(t,n,1),--this.size,!0)},In.prototype.get=function(e){var t=this.__data__,n=Hn(t,e);return n<0?void 0:t[n][1]},In.prototype.has=function(e){return Hn(this.__data__,e)>-1},In.prototype.set=function(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(dn||In),string:new Dn}},Mn.prototype.delete=function(e){var t=Xo(this,e).delete(e);return this.size-=t?1:0,t},Mn.prototype.get=function(e){return Xo(this,e).get(e)},Mn.prototype.has=function(e){return Xo(this,e).has(e)},Mn.prototype.set=function(e,t){var n=Xo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.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(!dn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(e,t),this.size=n.size,this};var er=xo(cr),tr=xo(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 Ua(e[t])}))}function fr(e,t){for(var n=0,r=(t=uo(t,e)).length;null!=e&&n<r;)e=e[Ei(t[n++])];return n&&n==r?e:void 0}function pr(e,t,n){var r=t(e);return Da(e)?r:ht(r,n(e))}function dr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":mt&&mt in ve(e)?function(e){var t=Oe.call(e,mt),n=e[mt];try{e[mt]=void 0;var r=!0}catch(e){}var o=je.call(e);r&&(t?e[mt]=n:delete e[mt]);return o}(e):function(e){return je.call(e)}(e)}function hr(e,t){return e>t}function vr(e,t){return null!=e&&Oe.call(e,t)}function yr(e,t){return null!=e&&t in ve(e)}function gr(e,t,n){for(var o=n?pt: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=dt(f,Tt(t))),s=un(f.length,s),c[u]=!n&&(t||i>=120&&f.length>=120)?new Nn(u&&f):void 0}f=e[0];var p=-1,d=c[0];e:for(;++p<i&&l.length<s;){var h=f[p],v=t?t(h):h;if(h=n||0!==h?h:0,!(d?Rt(d,v):o(l,v,n))){for(u=a;--u;){var y=c[u];if(!(y?Rt(y,v):o(e[u],v,n)))continue e}d&&d.push(v),l.push(h)}}return l}function mr(e,t,n){var r=null==(e=yi(e,t=uo(t,e)))?e:e[Ei(Li(t))];return null==r?void 0:it(r,e,n)}function br(e){return Ha(e)&&dr(e)==c}function wr(e,t,n,r,o){return e===t||(null==e||null==t||!Ha(e)&&!Ha(t)?e!=e&&t!=t:function(e,t,n,r,o,i){var a=Da(e),u=Da(t),d=a?s:ri(e),h=u?s:ri(t),x=(d=d==c?g:d)==g,S=(h=h==c?g:h)==g,E=d==h;if(E&&Fa(e)){if(!Fa(t))return!1;a=!0,x=!1}if(E&&!x)return i||(i=new Fn),a||Xa(e)?Ho(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case O: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 Ne(e),new Ne(t)));case l:case f:case y:return Ca(+e,+t);case p:return e.name==t.name&&e.message==t.message;case m:case w:return e==t+"";case v:var u=Ut;case b:var c=1&r;if(u||(u=qt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var d=Ho(u(e),u(t),r,o,i,a);return a.delete(e),d;case _:if(En)return En.call(e)==En.call(t)}return!1}(e,t,d,n,r,o,i);if(!(1&n)){var j=x&&Oe.call(e,"__wrapped__"),P=S&&Oe.call(t,"__wrapped__");if(j||P){var C=j?e.value():e,T=P?t.value():t;return i||(i=new Fn),o(C,T,n,r,i)}}if(!E)return!1;return i||(i=new Fn),function(e,t,n,r,o,i){var a=1&n,u=Vo(e),c=u.length,s=Vo(t).length;if(c!=s&&!a)return!1;var l=c;for(;l--;){var f=u[l];if(!(a?f in t:Oe.call(t,f)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);var v=a;for(;++l<c;){f=u[l];var y=e[f],g=t[f];if(r)var m=a?r(g,y,f,t,e,i):r(y,g,f,e,t,i);if(!(void 0===m?y===g||o(y,g,n,r,i):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){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 _r(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=ve(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 p=r(s,l,c,e,t,f);if(!(void 0===p?wr(l,s,3,r,f):p))return!1}}return!0}function xr(e){return!(!qa(e)||(t=e,Ee&&Ee in t))&&(Ua(e)?Te:ae).test(ji(e));var t}function kr(e){return"function"==typeof e?e:null==e?Vu:"object"==typeof e?Da(e)?Cr(e[0],e[1]):Pr(e):tc(e)}function Or(e){if(!pi(e))return on(e);var t=[];for(var n in ve(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Sr(e){if(!qa(e))return function(e){var t=[];if(null!=e)for(var n in ve(e))t.push(n);return t}(e);var t=pi(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}function Er(e,t){return e<t}function jr(e,t){var n=-1,o=Ma(e)?r(e.length):[];return er(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Pr(e){var t=Zo(e);return 1==t.length&&t[0][2]?hi(t[0][0],t[0][1]):function(n){return n===e||_r(n,e,t)}}function Cr(e,t){return si(e)&&di(t)?hi(Ei(e),t):function(n){var r=vu(n,e);return void 0===r&&r===t?yu(n,e):wr(t,r,3)}}function Tr(e,t,n,r,o){e!==t&&ar(t,(function(i,a){if(o||(o=new Fn),qa(i))!function(e,t,n,r,o,i,a){var u=mi(e,n),c=mi(t,n),s=a.get(c);if(s)return void Wn(e,n,s);var l=i?i(u,c,n+"",e,t,a):void 0,f=void 0===l;if(f){var p=Da(c),d=!p&&Fa(c),h=!p&&!d&&Xa(c);l=c,p||d||h?Da(u)?l=u:Na(u)?l=mo(u):d?(f=!1,l=fo(c,!0)):h?(f=!1,l=ho(c,!0)):l=[]:$a(c)||Ra(c)?(l=u,Ra(u)?l=au(u):qa(u)&&!Ua(u)||(l=ii(c))):f=!1}f&&(a.set(c,l),o(l,c,r,i,a),a.delete(c));Wn(e,n,l)}(e,t,a,n,Tr,r,o);else{var u=r?r(mi(e,a),i,a+"",e,t,o):void 0;void 0===u&&(u=i),Wn(e,a,u)}}),_u)}function Ar(e,t){var n=e.length;if(n)return ui(t+=t<0?n:0,n)?e[t]:void 0}function Rr(e,t,n){t=t.length?dt(t,(function(e){return Da(e)?function(t){return fr(t,1===e.length?e[0]:e)}:e})):[Vu];var r=-1;return t=dt(t,Tt(Ko())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(jr(e,(function(e,n,o){return{criteria:dt(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=vo(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 Dr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=fr(e,a);n(u,a)&&Br(i,uo(a,e),u)}return i}function Ir(e,t,n,r){var o=r?xt:_t,i=-1,a=t.length,u=e;for(e===t&&(t=mo(t)),n&&(u=dt(e,Tt(n)));++i<a;)for(var c=0,s=t[i],l=n?n(s):s;(c=o(u,l,c,r))>-1;)u!==e&&Ge.call(u,c,1),Ge.call(e,c,1);return e}function Mr(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)?Ge.call(e,o,1):Zr(e,o)}}return e}function Nr(e,t){return e+Zt(ln()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Zt(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return _i(vi(e,t,Vu),e+"")}function Lr(e){return Ln(Cu(e))}function Ur(e,t){var n=Cu(e);return Oi(n,Gn(t,0,n.length))}function Br(e,t,n,r){if(!qa(e))return e;for(var o=-1,i=(t=uo(t,e)).length,a=i-1,u=e;null!=u&&++o<i;){var c=Ei(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=qa(l)?l:ui(t[o+1])?[]:{})}qn(u,c,s),u=u[c]}return e}var Wr=mn?function(e,t){return mn.set(e,t),e}:Vu,qr=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:qu(t),writable:!0})}:Vu;function Hr(e){return Oi(Cu(e))}function Qr(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 Vr(e,t){var n;return er(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function $r(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 Jr(e,t,Vu,n)}function Jr(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=Zt((o+i)/2),f=n(e[l]),p=void 0!==f,d=null===f,h=f==f,v=Ka(f);if(a)var y=r||h;else y=s?h&&(r||p):u?h&&p&&(r||!d):c?h&&p&&!d&&(r||!v):!d&&!v&&(r?f<=t:f<t);y?o=l+1:i=l}return un(i,4294967294)}function Gr(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||!Ca(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(Da(e))return dt(e,Kr)+"";if(Ka(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Xr(e,t,n){var r=-1,o=ft,i=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pt;else if(i>=200){var s=t?null:zo(e);if(s)return qt(s);a=!1,o=Rt,c=new Nn}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 p=c.length;p--;)if(c[p]===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 Zr(e,t){return null==(e=yi(e,t=uo(t,e)))||delete e[Ei(Li(t))]}function eo(e,t,n,r){return Br(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?Qr(e,r?0:i,r?i+1:o):Qr(e,r?i+1:0,r?o:i)}function no(e,t){var n=e;return n instanceof Rn&&(n=n.value()),vt(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?Xr(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],c=-1;++c<o;)c!=i&&(a[i]=Zn(a[i]||u,e[c],t,n));return Xr(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 Na(e)?e:[]}function ao(e){return"function"==typeof e?e:Vu}function uo(e,t){return Da(e)?e:si(e,t)?[e]:Si(uu(e))}var co=zr;function so(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Qr(e,t,n)}var lo=Gt||function(e){return $e.clearTimeout(e)};function fo(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function po(e){var t=new e.constructor(e.byteLength);return new Ne(t).set(new Ne(e)),t}function ho(e,t){var n=t?po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function vo(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),p=!o;++c<s;)f[c]=t[c];for(;++i<u;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[c++]=e[i++];return f}function go(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),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++s<l;)p[h+s]=t[s];for(;++u<c;)(d||i<a)&&(p[h+n[u]]=e[i++]);return p}function mo(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?$n(n,u,c):qn(n,u,c)}return n}function wo(e,t){return function(n,r){var o=Da(n)?at:Qn,i=t?t():{};return o(n,e,Ko(r,2),i)}}function _o(e){return zr((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=ve(t);++r<o;){var u=n[r];u&&e(t,u,r,i)}return t}))}function xo(e,t){return function(n,r){if(null==n)return n;if(!Ma(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=ve(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=ve(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 Oo(e){return function(t){var n=Lt(t=uu(t))?Vt(t):void 0,r=n?n[0]:t.charAt(0),o=n?so(n,1).join(""):t.slice(1);return r[e]()+o}}function So(e){return function(t){return vt(Uu(Ru(t).replace(Re,"")),e,"")}}function Eo(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=Cn(e.prototype),r=e.apply(n,t);return qa(r)?r:n}}function jo(e){return function(t,n,r){var o=ve(t);if(!Ma(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 Po(e){return Qo((function(t){var n=t.length,r=n,o=An.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new me(i);if(o&&!u&&"wrapper"==Go(a))var u=new An([],!0)}for(r=u?r:n;++r<n;){var c=Go(a=t[r]),s="wrapper"==c?Jo(a):void 0;u=s&&li(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?u[Go(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&&Da(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 Co(e,t,n,o,i,a,u,c,s,l){var f=128&t,p=1&t,d=2&t,h=24&t,v=512&t,y=d?void 0:Eo(e);return function g(){for(var m=arguments.length,b=r(m),w=m;w--;)b[w]=arguments[w];if(h)var _=Yo(g),x=Mt(b,_);if(o&&(b=yo(b,o,i,h)),a&&(b=go(b,a,u,h)),m-=x,h&&m<l){var k=Wt(b,_);return No(e,t,Co,g.placeholder,n,b,k,c,s,l-m)}var O=p?n:this,S=d?O[e]:e;return m=b.length,c?b=gi(b,c):v&&m>1&&b.reverse(),f&&s<m&&(b.length=s),this&&this!==$e&&this instanceof g&&(S=y||Eo(S)),S.apply(O,b)}}function To(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 Ao(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 Ro(e){return Qo((function(t){return t=dt(t,Tt(Ko())),zr((function(n){var r=this;return e(t,(function(e){return it(e,r,n)}))}))}))}function Do(e,t){var n=(t=void 0===t?" ":Kr(t)).length;if(n<2)return n?Fr(t,e):t;var r=Fr(t,Xt(e/Qt(t)));return Lt(t)?so(Vt(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(Xt((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 Mo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=iu(t),n=iu(n)),e(t,n)}}function No(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],p=n.apply(void 0,f);return li(e)&&bi(p,f),p.placeholder=r,xi(p,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 zo=vn&&1/qt(new vn([,-0]))[1]==1/0?function(e){return new vn(e)}:Ku;function Lo(e){return function(t){var n=ri(t);return n==v?Ut(t):n==b?Ht(t):function(e,t){return dt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Uo(e,t,n,o,u,c,s,l){var f=2&t;if(!f&&"function"!=typeof e)throw new me(i);var p=o?o.length:0;if(p||(t&=-97,o=u=void 0),s=void 0===s?s:an(ru(s),0),l=void 0===l?l:ru(l),p-=u?u.length:0,64&t){var d=o,h=u;o=u=void 0}var v=f?void 0:Jo(e),y=[e,t,n,o,u,d,h,c,s,l];if(v&&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?Wt(e[3],a):t[4]}(c=t[5])&&(s=e[5],e[5]=s?go(s,c,t[6]):c,e[6]=s?Wt(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,v),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]-p,0))&&24&t&&(t&=-25),t&&1!=t)g=8==t||16==t?function(e,t,n){var o=Eo(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?[]:Wt(u,s);if((a-=l.length)<n)return No(e,t,Co,i.placeholder,void 0,u,l,void 0,void 0,n-a);var f=this&&this!==$e&&this instanceof i?o:e;return it(f,this,u)}}(e,t,l):32!=t&&33!=t||u.length?Co.apply(void 0,y):function(e,t,n,o){var i=1&t,a=Eo(e);return function t(){for(var u=-1,c=arguments.length,s=-1,l=o.length,f=r(l+c),p=this&&this!==$e&&this instanceof t?a:e;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++u];return it(p,i?n:this,f)}}(e,t,n,o);else var g=function(e,t,n){var r=1&t,o=Eo(e);return function t(){var i=this&&this!==$e&&this instanceof t?o:e;return i.apply(r?n:this,arguments)}}(e,t,n);return xi((v?Wr:bi)(g,y),e,t)}function Bo(e,t,n,r){return void 0===e||Ca(e,_e[n])&&!Oe.call(r,n)?t:e}function Wo(e,t,n,r,o,i){return qa(e)&&qa(t)&&(i.set(t,e),Tr(e,t,void 0,Wo,i),i.delete(t)),e}function qo(e){return $a(e)?void 0:e}function Ho(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,p=!0,d=2&n?new Nn:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;p=!1;break}if(d){if(!gt(t,(function(e,t){if(!Rt(d,t)&&(h===e||o(h,e,n,r,i)))return d.push(t)}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function Qo(e){return _i(vi(e,void 0,Ii),e+"")}function Vo(e){return pr(e,wu,ti)}function $o(e){return pr(e,_u,ni)}var Jo=mn?function(e){return mn.get(e)}:Ku;function Go(e){for(var t=e.name+"",n=bn[t],r=Oe.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(Oe.call(Pn,"placeholder")?Pn:e).placeholder}function Ko(){var e=Pn.iteratee||$u;return e=e===$u?kr:e,arguments.length?e(arguments[0],arguments[1]):e}function Xo(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 Zo(e){for(var t=wu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,di(o)]}return t}function ei(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return xr(n)?n:void 0}var ti=en?function(e){return null==e?[]:(e=ve(e),lt(en(e),(function(t){return Je.call(e,t)})))}:oc,ni=en?function(e){for(var t=[];e;)ht(t,ti(e)),e=Qe(e);return t}:oc,ri=dr;function oi(e,t,n){for(var r=-1,o=(t=uo(t,e)).length,i=!1;++r<o;){var a=Ei(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Wa(o)&&ui(a,o)&&(Da(e)||Ra(e))}function ii(e){return"function"!=typeof e.constructor||pi(e)?{}:Cn(Qe(e))}function ai(e){return Da(e)||Ra(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(!qa(n))return!1;var r=typeof t;return!!("number"==r?Ma(n)&&ui(t,n.length):"string"==r&&t in n)&&Ca(n[t],e)}function si(e,t){if(Da(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ka(e))||(H.test(e)||!q.test(e)||null!=t&&e in ve(t))}function li(e){var t=Go(e),n=Pn[t];if("function"!=typeof n||!(t in Rn.prototype))return!1;if(e===n)return!0;var r=Jo(n);return!!r&&e===r[0]}(pn&&ri(new pn(new ArrayBuffer(1)))!=O||dn&&ri(new dn)!=v||hn&&"[object Promise]"!=ri(hn.resolve())||vn&&ri(new vn)!=b||yn&&ri(new yn)!=x)&&(ri=function(e){var t=dr(e),n=t==g?e.constructor:void 0,r=n?ji(n):"";if(r)switch(r){case wn:return O;case _n:return v;case xn:return"[object Promise]";case kn:return b;case On:return x}return t});var fi=xe?Ua:ic;function pi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function di(e){return e==e&&!qa(e)}function hi(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in ve(n)))}}function vi(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,Qr(t,0,-1))}function gi(e,t){for(var n=e.length,r=un(t.length,n),o=mo(e);r--;){var i=t[r];e[r]=ui(i,n)?o[i]:void 0}return e}function mi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bi=ki(Wr),wi=Kt||function(e,t){return $e.setTimeout(e,t)},_i=ki(qr);function xi(e,t,n){var r=t+"";return _i(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(X);return t?t[1].split(Z):[]}(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 Oi(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n<t;){var i=Nr(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}var Si=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(Q,(function(e,n,r,o){t.push(r?o.replace(te,"$1"):n||e)})),t}));function Ei(e){if("string"==typeof e||Ka(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ji(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pi(e){if(e instanceof Rn)return e.clone();var t=new An(e.__wrapped__,e.__chain__);return t.__actions__=mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ci=zr((function(e,t){return Na(e)?Zn(e,ir(t,1,Na,!0)):[]})),Ti=zr((function(e,t){var n=Li(t);return Na(n)&&(n=void 0),Na(e)?Zn(e,ir(t,1,Na,!0),Ko(n,2)):[]})),Ai=zr((function(e,t){var n=Li(t);return Na(n)&&(n=void 0),Na(e)?Zn(e,ir(t,1,Na,!0),void 0,n):[]}));function Ri(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 Di(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 Mi(e){return e&&e.length?e[0]:void 0}var Ni=zr((function(e){var t=dt(e,io);return t.length&&t[0]===e[0]?gr(t):[]})),Fi=zr((function(e){var t=Li(e),n=dt(e,io);return t===Li(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?gr(n,Ko(t,2)):[]})),zi=zr((function(e){var t=Li(e),n=dt(e,io);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?gr(n,void 0,t):[]}));function Li(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ui=zr(Bi);function Bi(e,t){return e&&e.length&&t&&t.length?Ir(e,t):e}var Wi=Qo((function(e,t){var n=null==e?0:e.length,r=Jn(e,t);return Mr(e,dt(t,(function(e){return ui(e,n)?+e:e})).sort(vo)),r}));function qi(e){return null==e?e:fn.call(e)}var Hi=zr((function(e){return Xr(ir(e,1,Na,!0))})),Qi=zr((function(e){var t=Li(e);return Na(t)&&(t=void 0),Xr(ir(e,1,Na,!0),Ko(t,2))})),Vi=zr((function(e){var t=Li(e);return t="function"==typeof t?t:void 0,Xr(ir(e,1,Na,!0),void 0,t)}));function $i(e){if(!e||!e.length)return[];var t=0;return e=lt(e,(function(e){if(Na(e))return t=an(e.length,t),!0})),Ct(t,(function(t){return dt(e,St(t))}))}function Ji(e,t){if(!e||!e.length)return[];var n=$i(e);return null==t?n:dt(n,(function(e){return it(t,void 0,e)}))}var Gi=zr((function(e,t){return Na(e)?Zn(e,t):[]})),Yi=zr((function(e){return ro(lt(e,Na))})),Ki=zr((function(e){var t=Li(e);return Na(t)&&(t=void 0),ro(lt(e,Na),Ko(t,2))})),Xi=zr((function(e){var t=Li(e);return t="function"==typeof t?t:void 0,ro(lt(e,Na),void 0,t)})),Zi=zr($i);var ea=zr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ji(e,n)}));function ta(e){var t=Pn(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Qo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Rn&&ui(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[o],thisArg:void 0}),new An(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){Oe.call(e,n)?++e[n]:$n(e,n,1)}));var ia=jo(Ri),aa=jo(Di);function ua(e,t){return(Da(e)?ut:er)(e,Ko(t,3))}function ca(e,t){return(Da(e)?ct:tr)(e,Ko(t,3))}var sa=wo((function(e,t,n){Oe.call(e,n)?e[n].push(t):$n(e,n,[t])}));var la=zr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ma(e)?r(e.length):[];return er(e,(function(e){a[++o]=i?it(t,e,n):mr(e,t,n)})),a})),fa=wo((function(e,t,n){$n(e,n,t)}));function pa(e,t){return(Da(e)?dt:jr)(e,Ko(t,3))}var da=wo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=zr((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]]),Rr(e,ir(t,1),[])})),va=Yt||function(){return $e.Date.now()};function ya(e,t,n){return t=n?void 0:t,Uo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ga(e,t){var n;if("function"!=typeof t)throw new me(i);return e=ru(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ma=zr((function(e,t,n){var r=1;if(n.length){var o=Wt(n,Yo(ma));r|=32}return Uo(e,r,t,n,o)})),ba=zr((function(e,t,n){var r=3;if(n.length){var o=Wt(n,Yo(ba));r|=32}return Uo(t,r,e,n,o)}));function wa(e,t,n){var r,o,a,u,c,s,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new me(i);function h(t){var n=r,i=o;return r=o=void 0,l=t,u=e.apply(i,n)}function v(e){return l=e,c=wi(g,t),f?h(e):u}function y(e){var n=e-s;return void 0===s||n>=t||n<0||p&&e-l>=a}function g(){var e=va();if(y(e))return m(e);c=wi(g,function(e){var n=t-(e-s);return p?un(n,a-(e-l)):n}(e))}function m(e){return c=void 0,d&&r?h(e):(r=o=void 0,u)}function b(){var e=va(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===c)return v(s);if(p)return lo(c),c=wi(g,t),h(s)}return void 0===c&&(c=wi(g,t)),u}return t=iu(t)||0,qa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?an(iu(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==c&&lo(c),l=0,r=s=o=c=void 0},b.flush=function(){return void 0===c?u:m(va())},b}var _a=zr((function(e,t){return Xn(e,1,t)})),xa=zr((function(e,t,n){return Xn(e,iu(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new me(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||Mn),n}function Oa(e){if("function"!=typeof e)throw new me(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=Mn;var Sa=co((function(e,t){var n=(t=1==t.length&&Da(t[0])?dt(t[0],Tt(Ko())):dt(ir(t,1),Tt(Ko()))).length;return zr((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)}))})),Ea=zr((function(e,t){return Uo(e,32,void 0,t,Wt(t,Yo(Ea)))})),ja=zr((function(e,t){return Uo(e,64,void 0,t,Wt(t,Yo(ja)))})),Pa=Qo((function(e,t){return Uo(e,256,void 0,void 0,void 0,t)}));function Ca(e,t){return e===t||e!=e&&t!=t}var Ta=Mo(hr),Aa=Mo((function(e,t){return e>=t})),Ra=br(function(){return arguments}())?br:function(e){return Ha(e)&&Oe.call(e,"callee")&&!Je.call(e,"callee")},Da=r.isArray,Ia=Ze?Tt(Ze):function(e){return Ha(e)&&dr(e)==k};function Ma(e){return null!=e&&Wa(e.length)&&!Ua(e)}function Na(e){return Ha(e)&&Ma(e)}var Fa=tn||ic,za=et?Tt(et):function(e){return Ha(e)&&dr(e)==f};function La(e){if(!Ha(e))return!1;var t=dr(e);return t==p||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!$a(e)}function Ua(e){if(!qa(e))return!1;var t=dr(e);return t==d||t==h||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ba(e){return"number"==typeof e&&e==ru(e)}function Wa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ha(e){return null!=e&&"object"==typeof e}var Qa=tt?Tt(tt):function(e){return Ha(e)&&ri(e)==v};function Va(e){return"number"==typeof e||Ha(e)&&dr(e)==y}function $a(e){if(!Ha(e)||dr(e)!=g)return!1;var t=Qe(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ke.call(n)==Pe}var Ja=nt?Tt(nt):function(e){return Ha(e)&&dr(e)==m};var Ga=rt?Tt(rt):function(e){return Ha(e)&&ri(e)==b};function Ya(e){return"string"==typeof e||!Da(e)&&Ha(e)&&dr(e)==w}function Ka(e){return"symbol"==typeof e||Ha(e)&&dr(e)==_}var Xa=ot?Tt(ot):function(e){return Ha(e)&&Wa(e.length)&&!!Ue[dr(e)]};var Za=Mo(Er),eu=Mo((function(e,t){return e<=t}));function tu(e){if(!e)return[];if(Ma(e))return Ya(e)?Vt(e):mo(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ri(e);return(t==v?Ut:t==b?qt:Cu)(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?Gn(ru(e),0,4294967295):0}function iu(e){if("number"==typeof e)return e;if(Ka(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(J,"");var n=ie.test(e);return n||ue.test(e)?He(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function au(e){return bo(e,_u(e))}function uu(e){return null==e?"":Kr(e)}var cu=_o((function(e,t){if(pi(t)||Ma(t))bo(t,wu(t),e);else for(var n in t)Oe.call(t,n)&&qn(e,n,t[n])})),su=_o((function(e,t){bo(t,_u(t),e)})),lu=_o((function(e,t,n,r){bo(t,_u(t),e,r)})),fu=_o((function(e,t,n,r){bo(t,wu(t),e,r)})),pu=Qo(Jn);var du=zr((function(e,t){e=ve(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=_u(i),u=-1,c=a.length;++u<c;){var s=a[u],l=e[s];(void 0===l||Ca(l,_e[s])&&!Oe.call(e,s))&&(e[s]=i[s])}return e})),hu=zr((function(e){return e.push(void 0,Wo),it(ku,void 0,e)}));function vu(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 gu=To((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),qu(Vu)),mu=To((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]}),Ko),bu=zr(mr);function wu(e){return Ma(e)?zn(e):Or(e)}function _u(e){return Ma(e)?zn(e,!0):Sr(e)}var xu=_o((function(e,t,n){Tr(e,t,n)})),ku=_o((function(e,t,n,r){Tr(e,t,n,r)})),Ou=Qo((function(e,t){var n={};if(null==e)return n;var r=!1;t=dt(t,(function(t){return t=uo(t,e),r||(r=t.length>1),t})),bo(e,$o(e),n),r&&(n=Yn(n,7,qo));for(var o=t.length;o--;)Zr(n,t[o]);return n}));var Su=Qo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return yu(e,n)}))}(e,t)}));function Eu(e,t){if(null==e)return{};var n=dt($o(e),(function(e){return[e]}));return t=Ko(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var ju=Lo(wu),Pu=Lo(_u);function Cu(e){return null==e?[]:At(e,wu(e))}var Tu=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Au(t):t)}));function Au(e){return Lu(uu(e).toLowerCase())}function Ru(e){return(e=uu(e))&&e.replace(se,Nt).replace(De,"")}var Du=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Iu=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Mu=Oo("toLowerCase");var Nu=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fu=So((function(e,t,n){return e+(n?" ":"")+Lu(t)}));var zu=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Lu=Oo("toUpperCase");function Uu(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(Me)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Bu=zr((function(e,t){try{return it(e,void 0,t)}catch(e){return La(e)?e:new pe(e)}})),Wu=Qo((function(e,t){return ut(t,(function(t){t=Ei(t),$n(e,t,ma(e[t],e))})),e}));function qu(e){return function(){return e}}var Hu=Po(),Qu=Po(!0);function Vu(e){return e}function $u(e){return kr("function"==typeof e?e:Yn(e,1))}var Ju=zr((function(e,t){return function(n){return mr(n,e,t)}})),Gu=zr((function(e,t){return function(n){return mr(e,n,t)}}));function Yu(e,t,n){var r=wu(t),o=lr(t,r);null!=n||qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=lr(t,wu(t)));var i=!(qa(n)&&"chain"in n&&!n.chain),a=Ua(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__=mo(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 Xu=Ro(dt),Zu=Ro(st),ec=Ro(gt);function tc(e){return si(e)?St(Ei(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=Ao((function(e,t){return e+t}),0),uc=Fo("ceil"),cc=Ao((function(e,t){return e/t}),1),sc=Fo("floor");var lc,fc=Ao((function(e,t){return e*t}),1),pc=Fo("round"),dc=Ao((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new me(i);return e=ru(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=ya,Pn.assign=cu,Pn.assignIn=su,Pn.assignInWith=lu,Pn.assignWith=fu,Pn.at=pu,Pn.before=ga,Pn.bind=ma,Pn.bindAll=Wu,Pn.bindKey=ba,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},Pn.chain=ta,Pn.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(Xt(o/t));i<o;)u[a++]=Qr(e,i,i+=t);return u},Pn.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},Pn.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(Da(n)?mo(n):[n],ir(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=Ko();return e=t?dt(e,(function(e){if("function"!=typeof e[1])throw new me(i);return[n(e[0]),e[1]]})):[],zr((function(n){for(var r=-1;++r<t;){var o=e[r];if(it(o[0],this,n))return it(o[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=wu(e);return function(n){return Kn(n,e,t)}}(Yn(e,1))},Pn.constant=qu,Pn.countBy=oa,Pn.create=function(e,t){var n=Cn(e);return null==t?n:Vn(n,t)},Pn.curry=function e(t,n,r){var o=Uo(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},Pn.curryRight=function e(t,n,r){var o=Uo(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return o.placeholder=e.placeholder,o},Pn.debounce=wa,Pn.defaults=du,Pn.defaultsDeep=hu,Pn.defer=_a,Pn.delay=xa,Pn.difference=Ci,Pn.differenceBy=Ti,Pn.differenceWith=Ai,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,(t=n||void 0===t?1:ru(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,0,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!0):[]},Pn.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)):[]},Pn.filter=function(e,t){return(Da(e)?lt:or)(e,Ko(t,3))},Pn.flatMap=function(e,t){return ir(pa(e,t),1)},Pn.flatMapDeep=function(e,t){return ir(pa(e,t),1/0)},Pn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ru(n),ir(pa(e,t),n)},Pn.flatten=Ii,Pn.flattenDeep=function(e){return(null==e?0:e.length)?ir(e,1/0):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?ir(e,t=void 0===t?1:ru(t)):[]},Pn.flip=function(e){return Uo(e,512)},Pn.flow=Hu,Pn.flowRight=Qu,Pn.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},Pn.functions=function(e){return null==e?[]:lr(e,wu(e))},Pn.functionsIn=function(e){return null==e?[]:lr(e,_u(e))},Pn.groupBy=sa,Pn.initial=function(e){return(null==e?0:e.length)?Qr(e,0,-1):[]},Pn.intersection=Ni,Pn.intersectionBy=Fi,Pn.intersectionWith=zi,Pn.invert=gu,Pn.invertBy=mu,Pn.invokeMap=la,Pn.iteratee=$u,Pn.keyBy=fa,Pn.keys=wu,Pn.keysIn=_u,Pn.map=pa,Pn.mapKeys=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){$n(n,t(e,r,o),e)})),n},Pn.mapValues=function(e,t){var n={};return t=Ko(t,3),cr(e,(function(e,r,o){$n(n,r,t(e,r,o))})),n},Pn.matches=function(e){return Pr(Yn(e,1))},Pn.matchesProperty=function(e,t){return Cr(e,Yn(t,1))},Pn.memoize=ka,Pn.merge=xu,Pn.mergeWith=ku,Pn.method=Ju,Pn.methodOf=Gu,Pn.mixin=Yu,Pn.negate=Oa,Pn.nthArg=function(e){return e=ru(e),zr((function(t){return Ar(t,e)}))},Pn.omit=Ou,Pn.omitBy=function(e,t){return Eu(e,Oa(Ko(t)))},Pn.once=function(e){return ga(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(Da(t)||(t=null==t?[]:[t]),Da(n=r?void 0:n)||(n=null==n?[]:[n]),Rr(e,t,n))},Pn.over=Xu,Pn.overArgs=Sa,Pn.overEvery=Zu,Pn.overSome=ec,Pn.partial=Ea,Pn.partialRight=ja,Pn.partition=da,Pn.pick=Su,Pn.pickBy=Eu,Pn.property=tc,Pn.propertyOf=function(e){return function(t){return null==e?void 0:fr(e,t)}},Pn.pull=Ui,Pn.pullAll=Bi,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,Ko(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ir(e,t,void 0,n):e},Pn.pullAt=Wi,Pn.range=nc,Pn.rangeRight=rc,Pn.rearg=Pa,Pn.reject=function(e,t){return(Da(e)?lt:or)(e,Oa(Ko(t,3)))},Pn.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 Mr(e,o),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new me(i);return zr(e,t=void 0===t?t:ru(t))},Pn.reverse=qi,Pn.sampleSize=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),(Da(e)?Un:Ur)(e,t)},Pn.set=function(e,t,n){return null==e?e:Br(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Br(e,t,n,r)},Pn.shuffle=function(e){return(Da(e)?Bn:Hr)(e)},Pn.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)),Qr(e,t,n)):[]},Pn.sortBy=ha,Pn.sortedUniq=function(e){return e&&e.length?Gr(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?Gr(e,Ko(t,2)):[]},Pn.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&&!Ja(t))&&!(t=Kr(t))&&Lt(e)?so(Vt(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new me(i);return t=null==t?0:an(ru(t),0),zr((function(n){var r=n[t],o=so(n,0,t);return r&&ht(o,r),it(e,this,o)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?Qr(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?Qr(e,0,(t=n||void 0===t?1:ru(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Qr(e,(t=r-(t=n||void 0===t?1:ru(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?to(e,Ko(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?to(e,Ko(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new me(i);return qa(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wa(e,t,{leading:r,maxWait:t,trailing:o})},Pn.thru=na,Pn.toArray=tu,Pn.toPairs=ju,Pn.toPairsIn=Pu,Pn.toPath=function(e){return Da(e)?dt(e,Ei):Ka(e)?[e]:mo(Si(uu(e)))},Pn.toPlainObject=au,Pn.transform=function(e,t,n){var r=Da(e),o=r||Fa(e)||Xa(e);if(t=Ko(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:qa(e)&&Ua(i)?Cn(Qe(e)):{}}return(o?ut:cr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Pn.unary=function(e){return ya(e,1)},Pn.union=Hi,Pn.unionBy=Qi,Pn.unionWith=Vi,Pn.uniq=function(e){return e&&e.length?Xr(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?Xr(e,Ko(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Xr(e,void 0,t):[]},Pn.unset=function(e,t){return null==e||Zr(e,t)},Pn.unzip=$i,Pn.unzipWith=Ji,Pn.update=function(e,t,n){return null==e?e:eo(e,t,ao(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:eo(e,t,ao(n),r)},Pn.values=Cu,Pn.valuesIn=function(e){return null==e?[]:At(e,_u(e))},Pn.without=Gi,Pn.words=Uu,Pn.wrap=function(e,t){return Ea(ao(t),e)},Pn.xor=Yi,Pn.xorBy=Ki,Pn.xorWith=Xi,Pn.zip=Zi,Pn.zipObject=function(e,t){return oo(e||[],t||[],qn)},Pn.zipObjectDeep=function(e,t){return oo(e||[],t||[],Br)},Pn.zipWith=ea,Pn.entries=ju,Pn.entriesIn=Pu,Pn.extend=su,Pn.extendWith=lu,Yu(Pn,Pn),Pn.add=ac,Pn.attempt=Bu,Pn.camelCase=Tu,Pn.capitalize=Au,Pn.ceil=uc,Pn.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),Gn(iu(e),t,n)},Pn.clone=function(e){return Yn(e,4)},Pn.cloneDeep=function(e){return Yn(e,5)},Pn.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},Pn.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},Pn.conformsTo=function(e,t){return null==t||Kn(e,t,wu(t))},Pn.deburr=Ru,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=cc,Pn.endsWith=function(e,t,n){e=uu(e),t=Kr(t);var r=e.length,o=n=void 0===n?r:Gn(ru(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Pn.eq=Ca,Pn.escape=function(e){return(e=uu(e))&&L.test(e)?e.replace(F,Ft):e},Pn.escapeRegExp=function(e){return(e=uu(e))&&$.test(e)?e.replace(V,"\\$&"):e},Pn.every=function(e,t,n){var r=Da(e)?st:nr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},Pn.find=ia,Pn.findIndex=Ri,Pn.findKey=function(e,t){return bt(e,Ko(t,3),cr)},Pn.findLast=aa,Pn.findLastIndex=Di,Pn.findLastKey=function(e,t){return bt(e,Ko(t,3),sr)},Pn.floor=sc,Pn.forEach=ua,Pn.forEachRight=ca,Pn.forIn=function(e,t){return null==e?e:ar(e,Ko(t,3),_u)},Pn.forInRight=function(e,t){return null==e?e:ur(e,Ko(t,3),_u)},Pn.forOwn=function(e,t){return e&&cr(e,Ko(t,3))},Pn.forOwnRight=function(e,t){return e&&sr(e,Ko(t,3))},Pn.get=vu,Pn.gt=Ta,Pn.gte=Aa,Pn.has=function(e,t){return null!=e&&oi(e,t,vr)},Pn.hasIn=yu,Pn.head=Mi,Pn.identity=Vu,Pn.includes=function(e,t,n,r){e=Ma(e)?e:Cu(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&&_t(e,t,n)>-1},Pn.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)),_t(e,t,o)},Pn.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)},Pn.invoke=bu,Pn.isArguments=Ra,Pn.isArray=Da,Pn.isArrayBuffer=Ia,Pn.isArrayLike=Ma,Pn.isArrayLikeObject=Na,Pn.isBoolean=function(e){return!0===e||!1===e||Ha(e)&&dr(e)==l},Pn.isBuffer=Fa,Pn.isDate=za,Pn.isElement=function(e){return Ha(e)&&1===e.nodeType&&!$a(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(Ma(e)&&(Da(e)||"string"==typeof e||"function"==typeof e.splice||Fa(e)||Xa(e)||Ra(e)))return!e.length;var t=ri(e);if(t==v||t==b)return!e.size;if(pi(e))return!Or(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return wr(e,t)},Pn.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},Pn.isError=La,Pn.isFinite=function(e){return"number"==typeof e&&nn(e)},Pn.isFunction=Ua,Pn.isInteger=Ba,Pn.isLength=Wa,Pn.isMap=Qa,Pn.isMatch=function(e,t){return e===t||_r(e,t,Zo(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,_r(e,t,Zo(t),n)},Pn.isNaN=function(e){return Va(e)&&e!=+e},Pn.isNative=function(e){if(fi(e))throw new pe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=Va,Pn.isObject=qa,Pn.isObjectLike=Ha,Pn.isPlainObject=$a,Pn.isRegExp=Ja,Pn.isSafeInteger=function(e){return Ba(e)&&e>=-9007199254740991&&e<=9007199254740991},Pn.isSet=Ga,Pn.isString=Ya,Pn.isSymbol=Ka,Pn.isTypedArray=Xa,Pn.isUndefined=function(e){return void 0===e},Pn.isWeakMap=function(e){return Ha(e)&&ri(e)==x},Pn.isWeakSet=function(e){return Ha(e)&&"[object WeakSet]"==dr(e)},Pn.join=function(e,t){return null==e?"":rn.call(e,t)},Pn.kebabCase=Du,Pn.last=Li,Pn.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)},Pn.lowerCase=Iu,Pn.lowerFirst=Mu,Pn.lt=Za,Pn.lte=eu,Pn.max=function(e){return e&&e.length?rr(e,Vu,hr):void 0},Pn.maxBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),hr):void 0},Pn.mean=function(e){return Ot(e,Vu)},Pn.meanBy=function(e,t){return Ot(e,Ko(t,2))},Pn.min=function(e){return e&&e.length?rr(e,Vu,Er):void 0},Pn.minBy=function(e,t){return e&&e.length?rr(e,Ko(t,2),Er):void 0},Pn.stubArray=oc,Pn.stubFalse=ic,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=fc,Pn.nth=function(e,t){return e&&e.length?Ar(e,ru(t)):void 0},Pn.noConflict=function(){return $e._===this&&($e._=Ce),this},Pn.noop=Ku,Pn.now=va,Pn.pad=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(Zt(o),n)+e+Do(Xt(o),n)},Pn.padEnd=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;return t&&r<t?e+Do(t-r,n):e},Pn.padStart=function(e,t,n){e=uu(e);var r=(t=ru(t))?Qt(e):0;return t&&r<t?Do(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),sn(uu(e).replace(G,""),t||0)},Pn.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+qe("1e-"+((o+"").length-1))),t)}return Nr(e,t)},Pn.reduce=function(e,t,n){var r=Da(e)?vt:jt,o=arguments.length<3;return r(e,Ko(t,4),n,o,er)},Pn.reduceRight=function(e,t,n){var r=Da(e)?yt:jt,o=arguments.length<3;return r(e,Ko(t,4),n,o,tr)},Pn.repeat=function(e,t,n){return t=(n?ci(e,t,n):void 0===t)?1:ru(t),Fr(uu(e),t)},Pn.replace=function(){var e=arguments,t=uu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.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[Ei(t[r])];void 0===i&&(r=o,i=n),e=Ua(i)?i.call(e):i}return e},Pn.round=pc,Pn.runInContext=e,Pn.sample=function(e){return(Da(e)?Ln:Lr)(e)},Pn.size=function(e){if(null==e)return 0;if(Ma(e))return Ya(e)?Qt(e):e.length;var t=ri(e);return t==v||t==b?e.size:Or(e).length},Pn.snakeCase=Nu,Pn.some=function(e,t,n){var r=Da(e)?gt:Vr;return n&&ci(e,t,n)&&(t=void 0),r(e,Ko(t,3))},Pn.sortedIndex=function(e,t){return $r(e,t)},Pn.sortedIndexBy=function(e,t,n){return Jr(e,t,Ko(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=$r(e,t);if(r<n&&Ca(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return $r(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return Jr(e,t,Ko(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=$r(e,t,!0)-1;if(Ca(e[n],t))return n}return-1},Pn.startCase=Fu,Pn.startsWith=function(e,t,n){return e=uu(e),n=null==n?0:Gn(ru(n),0,e.length),t=Kr(t),e.slice(n,n+t.length)==t},Pn.subtract=dc,Pn.sum=function(e){return e&&e.length?Pt(e,Vu):0},Pn.sumBy=function(e,t){return e&&e.length?Pt(e,Ko(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&ci(e,t,n)&&(t=void 0),e=uu(e),t=lu({},t,r,Bo);var o,i,a=lu({},t.imports,r.imports,Bo),u=wu(a),c=At(a,u),s=0,l=t.interpolate||le,f="__p += '",p=ye((t.escape||le).source+"|"+l.source+"|"+(l===W?ne:le).source+"|"+(t.evaluate||le).source+"|$","g"),d="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Le+"]")+"\n";e.replace(p,(function(t,n,r,a,u,c){return r||(r=a),f+=e.slice(s,c).replace(fe,zt),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=Oe.call(t,"variable")&&t.variable;h||(f="with (obj) {\n"+f+"\n}\n"),f=(i?f.replace(D,""):f).replace(I,"$1").replace(M,"$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 v=Bu((function(){return de(u,d+"return "+f).apply(void 0,c)}));if(v.source=f,La(v))throw v;return v},Pn.times=function(e,t){if((e=ru(e))<1||e>9007199254740991)return[];var n=4294967295,r=un(e,4294967295);e-=4294967295;for(var o=Ct(r,t=Ko(t));++n<e;)t(n);return o},Pn.toFinite=nu,Pn.toInteger=ru,Pn.toLength=ou,Pn.toLower=function(e){return uu(e).toLowerCase()},Pn.toNumber=iu,Pn.toSafeInteger=function(e){return e?Gn(ru(e),-9007199254740991,9007199254740991):0===e?e:0},Pn.toString=uu,Pn.toUpper=function(e){return uu(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(J,"");if(!e||!(t=Kr(t)))return e;var r=Vt(e),o=Vt(t);return so(r,Dt(r,o),It(r,o)+1).join("")},Pn.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=Vt(e);return so(r,0,It(r,Vt(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=uu(e))&&(n||void 0===t))return e.replace(G,"");if(!e||!(t=Kr(t)))return e;var r=Vt(e);return so(r,Dt(r,Vt(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(qa(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(Lt(e)){var a=Vt(e);i=a.length}if(n>=i)return e;var u=n-Qt(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),Ja(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 p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},Pn.unescape=function(e){return(e=uu(e))&&z.test(e)?e.replace(N,$t):e},Pn.uniqueId=function(e){var t=++Se;return uu(e)+t},Pn.upperCase=zu,Pn.upperFirst=Lu,Pn.each=ua,Pn.eachRight=ca,Pn.first=Mi,Yu(Pn,(lc={},cr(Pn,(function(e,t){Oe.call(Pn.prototype,t)||(lc[t]=e)})),lc),{chain:!1}),Pn.VERSION="4.17.19",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),ut(["drop","take"],(function(e,t){Rn.prototype[e]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!t?new Rn(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},Rn.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;Rn.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":"");Rn.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rn.prototype[e]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(Vu)},Rn.prototype.find=function(e){return this.filter(e).head()},Rn.prototype.findLast=function(e){return this.reverse().find(e)},Rn.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new Rn(this):this.map((function(n){return mr(n,e,t)}))})),Rn.prototype.reject=function(e){return this.filter(Oa(Ko(e)))},Rn.prototype.slice=function(e,t){e=ru(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Rn(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)},Rn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},cr(Rn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Pn[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof Rn,c=a[0],s=u||Da(t),l=function(e){var t=o.apply(Pn,ht([e],a));return r&&f?t[0]:t};s&&n&&"function"==typeof c&&1!=c.length&&(u=s=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=u&&!p;if(!i&&s){t=h?t:new Rn(this);var v=e.apply(t,a);return v.__actions__.push({func:na,args:[l],thisArg:void 0}),new An(v,f)}return d&&h?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})})),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);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Da(o)?o:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),cr(Rn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";Oe.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Co(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var e=new Rn(this.__wrapped__);return e.__actions__=mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mo(this.__views__),e},Rn.prototype.reverse=function(){if(this.__filtered__){var e=new Rn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Rn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(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,p=0,d=un(c,this.__takeCount__);if(!n||!r&&o==c&&d==c)return no(e,this.__actions__);var h=[];e:for(;c--&&p<d;){for(var v=-1,y=e[s+=t];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}h[p++]=y}return h},Pn.prototype.at=ra,Pn.prototype.chain=function(){return ta(this)},Pn.prototype.commit=function(){return new An(this.value(),this.__chain__)},Pn.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__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof Tn;){var r=Pi(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},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Rn){var t=e;return this.__actions__.length&&(t=new Rn(this)),(t=t.reverse()).__actions__.push({func:na,args:[qi],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(qi)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return no(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,Xe&&(Pn.prototype[Xe]=function(){return this}),Pn}();$e._=Jt,void 0===(o=function(){return Jt}.call(t,n,t,r))||(r.exports=o)}).call(this)}).call(this,n(53),n(136)(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":"energy_contract","purpose":"contract","sourceCategory":"energy"},{"label":"appliance_invoice","purpose":"invoice","sourceCategory":"retail"},{"label":"web_service_invoice","purpose":"invoice","sourceCategory":"web"},{"label":"restaurant_invoice","purpose":"invoice","sourceCategory":"alimentation"},{"label":"grocery_invoice","purpose":"invoice","sourceCategory":"shopping"},{"label":"other_invoice","purpose":"invoice"},{"label":"tax_return","purpose":"report","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"tax_notice","purpose":"invoice","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"tax_timetable","purpose":"report","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["tax"]},{"label":"other_tax_document","subjects":["tax"]},{"label":"bank_details","purpose":"attestation","sourceCategory":"bank","subjects":["bank_account"]},{"label":"bank_statement","purpose":"report","sourceCategory":"bank","subjects":["history"]},{"label":"loan_agreement","purpose":"contract","sourceCategory":"bank"},{"label":"other_bank_document","sourceCategory":"bank"},{"label":"receipt","purpose":"report"},{"label":"payment_proof_family_allowance","purpose":"attestation","sourceCategory":"gov","sourceSubCategory":"tax","subjects":["subvention"]},{"label":"school_attendance_certificate","purpose":"attestation","sourceCategory":"education","subjects":["identity","right","education"]},{"label":"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","shopping"],"sourceSubCategoryKnownValues":["civil_registration","immigration","transport","family","tax","health","real_estate","mobile","internet","citizen","sport"],"subjectsKnownValues":["identity","permit","family","address","driving","right","subvention","achievement","degree","work","employment","revenues","history","insurance","medical_act","vehicule","car","moto","truck","boat","subscription","buy/sale","house","compliance","building","food","real_estate","tax","address","education","statement","course","internet","phone","vaccine","capacity","health","drugs","child","pregnancy","bank_account"]}')},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getReferencedFolder=t.createFolderWithReference=t.ensureMagicFolder=t.MAGIC_FOLDERS=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(663)),u=(r(n(48)),n(21),n(67)),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"),COACH_CO2:"".concat("io.cozy.apps","/").concat("administrative","/coachco2")};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(142),o=n(330),i=n(72),a=n(308),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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchURL=t.generateUrlForNote=t.generatePrivateUrl=void 0;var o=r(n(24)),i=r(n(25)),a=n(153),u=r(n(33)),c=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=c;t.generateUrlForNote=function(e,t){return u.default.warn("generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead"),c(e,t)};var s=function(){var e=(0,i.default)(o.default.mark((function e(t,n){var r,i,u,c,s,l,f,p,d;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,p=i.public_name,!f){e.next=17;break}return(d=[["id",u]]).push(["sharecode",f]),p&&d.push(["username",p]),e.abrupt("return",(0,a.generateWebLink)({cozyUrl:"".concat(s,"://").concat(l),searchParams:d,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=s},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.isReadOnly=y,t.fetchOwn=g,t.isForType=b,t.isDocumentReadOnly=function(e){return x.apply(this,arguments)},t.isShortcutCreatedOnTheRecipientCozy=void 0;var o=r(n(18)),i=r(n(24)),a=r(n(25)),u=r(n(66)),c=r(n(327)),s=r(n(20)),l=(r(n(48)),n(23)),f=n(344),p=n(67),d=r(n(33));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 v(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}function y(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 g(e){return m.apply(this,arguments)}function m(){return(m=(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 b(e,t){return e.type===t||e.type+".*"===t}function w(e){return _.apply(this,arguments)}function _(){return(_=(0,a.default)(i.default.mark((function e(t){var n,r,o,u,c,s,d,h,y,m,w,_;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_=function(){return(_=(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!==p.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,y(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 _.apply(this,arguments)},m=function(){return(m=(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)(p.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)},y=function(e){return m.apply(this,arguments)},n=t.document,r=t.client,o=t.permissions,u=n._id||n.id,c=n._type||n.type,s=v(v({},n),{},{id:u,type:c}),!o){e.next=12;break}e.t0=o,e.next=15;break;case 12:return e.next=14,g(r);case 14:e.t0=e.sent;case 15:return d=e.t0,h=d.filter((function(e){return b(e,c)})),e.abrupt("return",w({doc:s,client:r,perms:h}));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,g(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,w({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",y(c,{writability:o}));case 24:return d.default.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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getCreatedByApp=t.hasBeenUpdatedByApp=void 0;var o=r(n(20));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(4);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(20)),i=r(n(228)),a=r(n(33)),u=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=u;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=c(e);if(t)return t[0].toUpperCase();var n=l(e);return n?n[0].toUpperCase():""};var c=function(e){return Array.isArray(e.email)?u("email")(e).address||"":e.email};t.getPrimaryEmail=c;var s=function(e){return Array.isArray(e.cozy)?u("cozy")(e).url||"":e.url};t.getPrimaryCozy=s;var l=function(e){try{return new URL(s(e)).hostname.replace(/^(www.)/g,"")}catch(t){return s(e)}};t.getPrimaryCozyDomain=l;t.getPrimaryPhone=function(e){return u("phone")(e).number||""};t.getPrimaryAddress=function(e){return u("address")(e).formattedAddress||""};var f=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=f;t.getFullname=function(e){return(0,o.default)(e,"fullname")?e.fullname:f(e)};var p=function(e){var t=f(e),n=c(e),r=l(e);return t&&t.length>0?t:n&&n.length>0?n:r&&r.length>0?r:""};t.makeDisplayName=p;t.getDisplayName=function(e){return(0,o.default)(e,"displayName")?e.displayName:p(e)};var d=function(e){var t=[(0,o.default)(e,"name.familyName",""),(0,o.default)(e,"name.givenName",""),c(e),l(e)].join("").trim().toLowerCase();return 0===t.length?null:t};t.makeDefaultSortIndexValue=d;var h=function(e){var t=(0,o.default)(e,"indexes.byFamilyNameGivenNameEmailCozyUrl",null);return null!==t?(0,i.default)(t)?null:t:d(e)};t.getDefaultSortIndexValue=h;t.getIndexByFamilyNameGivenNameEmailCozyUrl=function(e){return a.default.warn("Deprecation: `getIndexByFamilyNameGivenNameEmailCozyUrl` is deprecated, please use `getDefaultSortIndexValue` instead"),h(e)}},function(e,t,n){"use strict";var r=n(56);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(224),i=r(n(669));t.locales=i;var a=r(n(356));t.themes=a;var u=r(n(718));t.helpers=u},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundT=void 0;for(var o=r(n(670)),i=n(714),a={},u=0,c=["fr","en"];u<c.length;u++){var s=c[u],l={};try{l=n(715)("./".concat(s,".json"))}catch(e){}var f=new o.default;f.extend(l),a[s]=f}t.getBoundT=function(e){var t=a[e]||a.en,n=t.t.bind(t);return function(e,t){var r=(0,i.getEmojiByCountry)(t,n);return r?"".concat(n(e)," (").concat(r,")"):n(e)}}},function(e,t,n){"use strict";var r=n(671),o=n(708),i=n(276),a=n(197),u=n(711),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},p={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 d(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 v,y=(v={},function(e,t){var n=v[t];return n&&!e.pluralTypes[n]&&(n=null,v[t]=n),n||(n=d(e,t))&&(v[t]=n),n}),g=/%\{(.*?)\}/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 i=e,c=r||g,f="number"==typeof t?{smart_count:t}:t;if(null!=f.smart_count&&e){var d=o||p,h=l.call(e,"||||"),v=function(e,t,n){return e.pluralTypes[t](n)}(d,y(d,n||"en"),f.smart_count);i=u(h[v]||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?m: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||p}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=m(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 m(e,t,n)},e.exports=b},function(e,t,n){"use strict";var r=n(65),o=n(119),i=n(77),a=n(345),u=n(346),c=n(350),s=c(),l=n(707),f=i("Array.prototype.slice"),p=o.apply(s),d=function(e,t){return a(e),p(e,f(arguments,1))};r(d,{getPolyfill:c,implementation:u,shim:l}),e.exports=d},function(e,t,n){"use strict";var r=n(34)("%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(34),o=n(77),i=r("%TypeError%"),a=n(674),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(34)("%Array%"),o=!r.isArray&&n(77)("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,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,x=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,S=Array.prototype.slice,E=Math.floor,j="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,A="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("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||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var o=String(r),i=m.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 M=n(676).custom,N=M&&U(M)?M:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function z(e){return b.call(String(e),/"/g,""")}function L(e){return!("[object Array]"!==q(e)||A&&"object"==typeof e&&A in e)}function U(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var u=n||{};if(W(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(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=!W(u,"customInspect")||u.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(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(W(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=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(m.call(t,0,n.maxStringLength),n)+o}return F(b.call(b.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",n)}(t,u);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return v?I(t,w):w}if("bigint"==typeof t){var x=String(t)+"n";return v?I(t,x):x}var E=void 0===u.depth?5:u.depth;if(void 0===r&&(r=0),r>=E&&E>0&&"object"==typeof t)return L(t)?"[Array]":"[Object]";var P=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}(u,r);if(void 0===o)o=[];else if(H(o,t)>=0)return"[Circular]";function M(t,n,i){if(n&&(o=S.call(o)).push(n),i){var a={depth:u.depth};return W(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,o)}return e(t,u,r+1,o)}if("function"==typeof t){var B=function(e){if(e.name)return e.name;var t=g.call(y.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),K=Y(t,M);return"[Function"+(B?": "+B:" (anonymous)")+"]"+(K.length>0?" { "+O.call(K,", ")+" }":"")}if(U(t)){var X=T?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(t);return"object"!=typeof t||T?X:V(X)}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 Z="<"+_.call(String(t.nodeName)),ee=t.attributes||[],te=0;te<ee.length;te++)Z+=" "+ee[te].name+"="+F(z(ee[te].value),"double",u);return Z+=">",t.childNodes&&t.childNodes.length&&(Z+="..."),Z+="</"+_.call(String(t.nodeName))+">"}if(L(t)){if(0===t.length)return"[]";var ne=Y(t,M);return P&&!function(e){for(var t=0;t<e.length;t++)if(H(e[t],"\n")>=0)return!1;return!0}(ne)?"["+G(ne,P)+"]":"[ "+O.call(ne,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)){var re=Y(t,M);return"cause"in t&&!R.call(t,"cause")?"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+M(t.cause),re),", ")+" }":0===re.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(re,", ")+" }"}if("object"==typeof t&&c){if(N&&"function"==typeof t[N])return t[N]();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(M(n,t,!0)+" => "+M(e,t))})),J("Map",i.call(t),oe,P)}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(M(e,t))})),J("Set",s.call(t),ie,P)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if(function(e){return!("[object Number]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(M(Number(t)));if(function(e){if(!e||"object"!=typeof e||!j)return!1;try{return j.call(e),!0}catch(e){}return!1}(t))return V(M(j.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(h.call(t));if(function(e){return!("[object String]"!==q(e)||A&&"object"==typeof e&&A in e)}(t))return V(M(String(t)));if(!function(e){return!("[object Date]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)&&!function(e){return!("[object RegExp]"!==q(e)||A&&"object"==typeof e&&A in e)}(t)){var ae=Y(t,M),ue=D?D(t)===Object.prototype:t instanceof Object||t.constructor===Object,ce=t instanceof Object?"":"null prototype",se=!ue&&A&&Object(t)===t&&A in t?m.call(q(t),8,-1):ce?"Object":"",le=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(se||ce?"["+O.call(k.call([],se||[],ce||[]),": ")+"] ":"");return 0===ae.length?le+"{}":P?le+"{"+G(ae,P)+"}":le+"{ "+O.call(ae,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return B.call(e,t)}function q(e){return v.call(e)}function H(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 Q(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 V(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?G(n,r):O.call(n,", "))+"}"}function G(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function Y(e,t){var n=L(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=W(e,o)?t(e[o],e):""}var i,a="function"==typeof P?P(e):[];if(T){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)W(e,c)&&(n&&String(Number(c))===c&&c<e.length||T&&i["$"+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var s=0;s<a.length;s++)R.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(34)("%TypeError%"),o=n(348),i=n(225);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(680)},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(34)("%TypeError%"),o=n(347),i=n(682),a=n(225);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(683),o=n(684);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(34),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(685),o=n(694);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(686),o=n(687),i=n(688),a=n(691),u=n(692),c=n(693);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(34)("%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(689);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(690)},function(e,t,n){"use strict";var r=Object.prototype.toString,o=n(349),i=n(196),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(34),o=r("%TypeError%"),i=r("%Number%"),a=r("%RegExp%"),u=r("%parseInt%"),c=n(77),s=n(695),l=n(696),f=c("String.prototype.slice"),p=s(/^0b[01]+$/i),d=s(/^0o[0-7]+$/i),h=s(/^[-+]0x[0-9a-f]+$/i),v=s(new a("["+["
","",""].join("")+"]","g")),y=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),g=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),m=c("String.prototype.replace"),b=n(697);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(p(n))return e(u(f(n,2),2));if(d(n))return e(u(f(n,2),8));if(v(n)||h(n))return NaN;var r=function(e){return m(e,g,"")}(n);if(r!==n)return e(r)}return i(n)}},function(e,t,n){"use strict";var r=n(34)("RegExp.prototype.test"),o=n(119);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(698);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(349),i=n(196),a=n(699),u=n(700),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(198)()){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(34)("%Object%"),o=n(345);e.exports=function(e){return o(e),r(e)}},function(e,t,n){"use strict";var r=n(34),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(704)();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(705);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(65),o=n(350);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(65),o=n(119),i=n(351),a=n(353),u=n(710),c=o(a(),Object);r(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(34)("%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(353),o=n(65);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(119),o=n(65),i=n(354),a=n(355),u=n(713),c=r(a());o(c,{getPolyfill:a,implementation:i,shim:u}),e.exports=c},function(e,t,n){"use strict";var r=n(34),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(65),o=n(355);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEmojiByCountry=void 0;var r={fr:"🇫🇷"};t.getEmojiByCountry=function(e,t){return"stranger"===e?t("country.stranger"):r[e]}},function(e,t,n){var r={"./en.json":716,"./fr.json":717};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=715},function(e){e.exports=JSON.parse('{"country":{"stranger":"Stranger"},"Scan":{"scan_a_doc":"Scan a doc","save_doc":"Save the doc","filename":"Filename","save":"Save","cancel":"Cancel","qualify":"Describe","apply":"Apply","error":{"offline":"You are currently offline and you can\'t use this functionality. Please, try again later.","uploading":"You are already uploading a file. Please wait until the end of this upload and try again.","generic":"Something went wrong. Please try again."},"successful":{"qualified_ok":"You just have successfully described your file! "},"items":{"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","energy_contract":"Energy provider 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","grocery_invoice":"Grocery 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('{"country":{"stranger":"Étranger"},"Scan":{"scan_a_doc":"Numériser un doc","save_doc":"Enregistrer le document","filename":"Nom du fichier","save":"Sauvegarder","cancel":"Annuler","qualify":"Qualifier","apply":"Appliquer","error":{"offline":"Vous êtes actuellement déconnecté, vous ne pouvez donc pas utiliser cette fonctionnalité. Connectez-vous à internet et recommencez. ","uploading":"Vous avez déjà un fichier en cours de téléchargement. Attendez la fin et recommencez.","generic":"Un problème est survenu. Veuillez réessayer. "},"successful":{"qualified_ok":"Vous venez de qualifier votre fichier avec succès !"},"items":{"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","energy_contract":"Contrat de fournisseur d\'énergies","pay_sheet":"Fiche de paie","unemployment_benefit":"Allocations chômage","pension":"Retraite","other_revenue":"Autres revenus","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\'énergie","water_invoice":"Facture d\'eau","web_service_invoice":"Facture de service web","appliance_invoice":"Facture d\'électroménager","restaurant_invoice":"Facture de restaurant","grocery_invoice":"Facture de courses","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(21);var r=n(356);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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchTimeSeriesByIntervalAndSource=t.saveTimeSeries=void 0;var o=r(n(24)),i=r(n(25)),a=n(23),u=(n(21),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,p;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),p={_type:f,startDate:a,endDate:c,source:s,theme:l,series:i},e.abrupt("return",t.save(p));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(4);Object.defineProperty(t,"__esModule",{value:!0}),t.getSharingLink=void 0;var o=r(n(24)),i=r(n(25)),a=n(67),u=(r(n(48)),n(153)),c=function(){var e=(0,i.default)(o.default.mark((function e(t,n,r){var i,c,s,l,f,p;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={_type:a.DOCTYPE_PERMISSIONS,permissions:{files:{type:a.DOCTYPE_FILES,values:n,verbs:["GET"]}}},e.next=3,t.save(s);case 3:return l=e.sent,f=l.data,p=(0,u.generateWebLink)({cozyUrl:t.getStackClient().uri,searchParams:[["sharecode",null==f||null===(i=f.attributes)||void 0===i||null===(c=i.shortcodes)||void 0===c?void 0:c.code]],pathname:"/public",slug:"drive",subDomainType:r?"flat":"nested"}),e.abrupt("return",p);case 7:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.getSharingLink=c},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.fetchAggregatesFromDACC=t.buildAggregateParams=t.sendMeasureToDACC=t.checkMeasureParams=t.isCorrectDateFormat=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(155)),u=(n(21),r(n(48)),function(e){try{return!!new Date(Date.parse(e)).toISOString().startsWith(e)}catch(e){return!1}});t.isCorrectDateFormat=u;var c=function(e){var t=e.createdBy,n=e.measureName,r=e.startDate,o=e.value,i=e.group1,a=e.group2,c=e.group3;if(!t||"string"!=typeof t)throw new Error("Missing or wrong type parameter: createdBy");if(!n||"string"!=typeof n)throw new Error("Missing or wrong type parameter: measureName");if(!r)throw new Error("Missing parameter: startDate");if(!u(r))throw new Error("Date should be in YYYY-MM-DD format");if("number"!=typeof o)throw new Error("Missing or wrong type parameter: value");if(i&&("object"!=typeof i||0===Object.keys(i).length)||a&&("object"!=typeof a||0===Object.keys(a).length)||c&&("object"!=typeof c||0===Object.keys(c).length))throw new Error("Groups should be key-value objects");if(c&&(!a||!i)||a&&!i)throw new Error("Group order must be respected")};t.checkMeasureParams=c;var s=function(){var e=(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:return e.prev=0,c(r),e.next=4,t.getStackClient().fetchJSON("POST","/remote/".concat(n),{data:JSON.stringify(r),path:"measure"});case 4:e.next=10;break;case 6:throw e.prev=6,e.t0=e.catch(0),(0,a.default)("error","Error while sending measure to remote doctype: ".concat(e.t0.message)),e.t0;case 10:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.sendMeasureToDACC=s;var l=function(e){var t=e.measureName;if(!t||"string"!=typeof t)throw new Error("Missing or wrong type parameter: measureName");var n=e.startDate||new Date(0).toISOString(),r=e.endDate||new Date(Date.now()).toISOString();if(!u(n)||!u(r))throw(0,a.default)("error","Date should be in YYYY-MM-DD format but received: startDate: ".concat(n," | endDate: ").concat(r)),new Error("Date should be in YYYY-MM-DD format");return{measureName:t,startDate:n,endDate:r}};t.buildAggregateParams=l;var f=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.prev=0,i=l(r),e.next=4,t.getStackClient().fetchJSON("POST","/remote/".concat(n),{data:JSON.stringify(i),path:"aggregate"});case 4:return e.abrupt("return",e.sent);case 7:throw e.prev=7,e.t0=e.catch(0),(0,a.default)("error","Error while fetching aggregates to remote doctype: ".concat(e.t0.message)),e.t0;case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.fetchAggregatesFromDACC=f},function(e,t,n){"use strict";var r=n(56);Object.defineProperty(t,"__esModule",{value:!0}),t.locales=void 0;var o=r(n(723));t.locales=o},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fr",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"en",{enumerable:!0,get:function(){return i.default}});var o=r(n(724)),i=r(n(725))},function(e){e.exports=JSON.parse('{"com":{"tricount.expenses":"Dépenses Tricount","splitwise.expenses":"Dépenses Splitwise","bitwarden.profiles":"Profils du gestionnaire de mot de passe","bitwarden.ciphers":"Entrées du gestionnaire de mot de passe","bitwarden.folders":"Dossiers du gestionnaire de mot de passe","bitwarden.organizations":"Dossiers partagés du gestionnaire de mot de passe","bitwarden.contacts":"Contacts du gestionnaire de mot de passe","grandlyon":{"enedis.*":"Données de consommation d\'électricité","grdf.*":"Données de consommation de gaz","egl.*":"Données de consommation d\'eau","ecolyo.*":"Données Ecolyo"}},"cc":{"cozycloud":{"autocategorization":"Fichier d\'enrichissement du modèle de catégorisation","errors":"Journaux de l\'application","sentry":"Journaux de l\'application","dacc":"Statistiques agrégées anonymes","dacc_v2":"Statistiques agrégées anonymes","dacc.dev":"Statistiques agrégées anonymes pour le développement","dacc.dev_v2":"Statistiques agrégées anonymes pour le développement"}},"eu":{"mycozy":{"dacc":"Statistiques agrégées anonymes"}},"io":{"cozy":{"accounts":"Identifiants","apps":"Liste des applications installées","apps.suggestions":"Suggestions d\'applications","bank.accounts":"Comptes bancaires","bank.accounts.stats":"Statistiques sur les comptes bancaires","bank.balancehistories":"Soldes bancaires","bank.groups":"Groupes de comptes bancaires","bank.operations":"Opérations bancaires","bank.settings":"Paramètres de l\'application Banks","bank.recipients":"Bénéficiaires de virements bancaires","bank.recurrence":"Groupes de récurrence bancaire","bills":"Factures","certified.carbon_copy":"Copie carbone","certified.electronic_safe":"Coffre-fort numérique","coachco2.settings":"Paramètres de l\'application CoachCO2","contacts":"Contacts","contacts.groups":"Groupe de contacts","contacts.accounts":"Comptes associés aux contacts","files":"Fichiers","files.versions":"Versions des fichiers","files.*":"Données liées aux fichiers (fichiers, dossiers, versions, ...)","identities":"Identities","jobs":"Tâches à exécuter","konnectors":"Connecteurs pour importer des données","konnectors.result":"Résultats de connecteurs","netflix.views":"Historique Netflix","netflix.opinions":"Opinions Netflix","notifications":"Notifications","oauth.clients":"Appareils connectés","permissions":"Délégation de permissions","photos.albums":"Albums photos","photos.settings":"Paramètres des photos","settings":"Paramètres","sharings":"Partage","tags":"Tags","timeseries.geojson":"Déplacements","triggers":"Planification de tâches à exécuter dans le futur"}},"fr":{"maif":{"events":"Évènements (Maif)","maifuser":{"contrat":"Contrat (Maif)","home":"Maison (Maif)","family":"Foyer (Maif)","paymentterms":"Paiement (Maif)","sinistre":"Sinistre (Maif)","societaire":"Sociétaire (Maif)"}}},"org":{"fing":{"mesinfos":{"insuranceclaim":"Déclarations d\'assurance (Maif)"}}}}')},function(e){e.exports=JSON.parse('{"com":{"tricount.expenses":"Expenses Tricount","splitwise.expenses":"Expenses Splitwise","bitwarden.profiles":"Password manager profiles","bitwarden.ciphers":"Password manager entries","bitwarden.folders":"Password manager folders","bitwarden.organizations":"Password manager shared folders","bitwarden.contacts":"Password manager contacts","grandlyon":{"enedis.*":"Electricity consumption data","grdf.*":"Gas consumption data","egl.*":"Water consumption data","ecolyo.*":"Ecolyo data"}},"cc":{"cozycloud":{"autocategorization":"Categorization model enrichment file","errors":"The application logs","sentry":"The application logs","dacc":"Anonymous aggregated statistics","dacc_v2":"Anonymous aggregated statistics","dacc.dev":"Anonymous aggregated statistics for development","dacc.dev_v2":"Anonymous aggregated statistics for development"}},"eu":{"mycozy":{"dacc":"Anonymous aggregated statistics","dacc_v2":"Anonymous aggregated statistics"}},"io":{"cozy":{"accounts":"Login details","apps":"List of installed applications","apps.suggestions":"Application suggestions","bank.accounts":"Banking accounts","bank.accounts.stats":"Stats on banking accounts","bank.balancehistories":"Bank balances","bank.groups":"Banking groups","bank.operations":"Bank operations","bank.settings":"Banks app settings","bank.recipients":"Banking transfer recipients","bank.recurrence":"Banks recurrence groups","bills":"Bills","certified.carbon_copy":"Carbon copy","certified.electronic_safe":"Electronic safe","coachco2.settings":"CoachCO2 app settings","contacts":"Contacts","contacts.groups":"Contacts groups","contacts.accounts":"Accounts linked to the contacts","files":"Files","files.versions":"Files versions","files.*":"File-related data (files, folders, versions, ...)","identities":"Identities","jobs":"Jobs","konnectors":"Connectors for importing data","konnectors.result":"Connectors results","netflix.views":"Netflix history","netflix.opinions":"Netflix opinions","notifications":"Notifications","oauth.clients":"Connected devices","permissions":"Delegating permissions","photos.albums":"Photo albums","photos.settings":"Photo settings","settings":"Settings","sharings":"Sharing","tags":"Tags","timeseries.geojson":"Trips","triggers":"Scheduling jobs"}},"fr":{"maif":{"events":"Events (Maif)","maifuser":{"contrat":"Contract (Maif)","home":"Home (Maif)","family":"Family (Maif)","paymentterms":"Payment terms (Maif)","sinistre":"Damage (Maif)","societaire":"Societary (Maif)"}}},"org":{"fing":{"mesinfos":{"insuranceclaim":"Insurance claims (Maif)"}}}}')},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.createMockClient=void 0;var o=r(n(50)),i=r(n(18)),a=r(n(116)),u=r(n(48)),c=n(75),s=n(296),l=n(23);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 p=function(e,t,n){var r=n.definition,o=n.doctype,u=n.data,p=(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},p)))};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],d=l[1];p(a,f,d)}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(4);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}}),Object.defineProperty(t,"useQueryAll",{enumerable:!0,get:function(){return l.default}});var o=r(n(728)),i=r(n(729)),a=r(n(730)),u=r(n(154)),c=r(n(223)),s=r(n(731)),l=r(n(732))},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=n(23),s=n(343),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],p=l[1],d=(0,u.useState)(!0),h=(0,a.default)(d,2),v=h[0],y=h[1],g=(0,u.useState)(null),m=(0,a.default)(g,2),b=m[0],w=m[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)),p("loaded"),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),p("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:v,url:b}};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=r(n(20)),s=n(23),l=function(e){var t=(0,u.useState)(),n=(0,a.default)(t,2),r=n[0],l=n[1],f=(0,u.useState)("idle"),p=(0,a.default)(f,2),d=p[0],h=p[1];return(0,u.useEffect)((function(){var t=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 h("loading"),t.prev=1,t.next=4,e.query((0,s.Q)("io.cozy.settings").getById("capabilities"));case 4:n=t.sent,l((0,c.default)(n,"data.attributes",{})),h("loaded"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),h("failed");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(){return t.apply(this,arguments)}}();e.capabilities?(l(e.capabilities),h("loaded")):t()}),[e]),{capabilities:r,fetchStatus:d}};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),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),p=f[0],d=f[1],h=(0,u.useState)("idle"),v=(0,a.default)(h,2),y=v[0],g=v[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 g("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"),d(a),s(r),g("loaded"),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),g("failed");case 15:case"end":return n.stop()}}),n,null,[[1,12]])})));return function(){return n.apply(this,arguments)}})()()}),[e,t]),{shortcutInfos:c,shortcutImg:p,fetchStatus:y}};t.default=c},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=r(n(206)),s=(r(n(48)),n(21),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){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(24)),i=r(n(25)),a=r(n(50)),u=n(0),c=(n(21),n(23),r(n(223))),s=r(n(733)),l=function(e,t){var n=(0,s.default)(!1),r=(0,a.default)(n,2),l=r[0],f=r[1],p=(0,c.default)(e,t);return(0,u.useEffect)((function(){(function(){var e=(0,i.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("loaded"!==p.fetchStatus||!p.hasMore||l){e.next=5;break}return f(!0),e.next=4,p.fetchMore();case 4:f(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[p.hasMore,p.fetchStatus,l]),p};t.default=l},function(e,t,n){"use strict";var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(50)),i=n(0),a=r(n(734)),u=function(e){var t=(0,a.default)(),n=(0,i.useState)(e),r=(0,o.default)(n,2),u=r[0],c=r[1];return[u,(0,i.useCallback)((function(e){t.current&&c(e)}),[])]};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(0),o=function(){var e=(0,r.useRef)();return(0,r.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e};t.default=o},function(e,t,n){var r=n(43),o=n(736),i=n(309),a=Math.max,u=Math.min;e.exports=function(e,t,n){var c,s,l,f,p,d,h=0,v=!1,y=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=c,r=s;return c=s=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,p=setTimeout(_,t),v?m(e):f}function w(e){var n=e-d;return void 0===d||n>=t||n<0||y&&e-h>=l}function _(){var e=o();if(w(e))return x(e);p=setTimeout(_,function(e){var n=t-(e-d);return y?u(n,l-(e-h)):n}(e))}function x(e){return p=void 0,g&&c?m(e):(c=s=void 0,f)}function k(){var e=o(),n=w(e);if(c=arguments,s=this,d=e,n){if(void 0===p)return b(d);if(y)return clearTimeout(p),p=setTimeout(_,t),m(d)}return void 0===p&&(p=setTimeout(_,t)),f}return t=i(t)||0,r(n)&&(v=!!n.leading,l=(y="maxWait"in n)?a(i(n.maxWait)||0,t):l,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==p&&clearTimeout(p),h=0,c=d=s=p=void 0},k.flush=function(){return void 0===p?f:x(o())},k}},function(e,t,n){var r=n(52);e.exports=function(){return r.Date.now()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},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){var r=n(740);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){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,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(743)),s=f(n(744)),l=n(752);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){return!0},d=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,d=t.renderSectionTitle,h=t.id,v=t.getSectionSuggestions,y=t.theme,g=t.getSuggestionValue,m=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,w=this.state,_=w.isFocused,x=w.isCollapsed,k=w.highlightedSectionIndex,O=w.highlightedSuggestionIndex,S=w.valueBeforeUpDown,E=m?p:this.props.shouldRenderSuggestions,j=c.value,P=c.onFocus,C=c.onKeyDown,T=this.willRenderSuggestions(this.props),A=m||_&&!x&&T,R=A?n:[],D=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=E(j);e.setState({isFocused:!0,isCollapsed:!n}),P&&P(t),n&&i({value:j,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=E(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(x)E(j)&&(i({value:j,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var a=r.newHighlightedSectionIndex,u=r.newHighlightedItemIndex,c=void 0;c=null===u?null===S?j:S:e.getSuggestionValueByIndex(a,u),e.updateHighlightedSuggestion(a,u,j),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(A&&!m&&e.closeSuggestions(),null!=s){var l=g(s);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:l,suggestionIndex:O,sectionIndex:k,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:A&&t.preventDefault();var f=A&&!m;if(null===S){if(!f){e.maybeCallOnChange(t,"","escape"),E("")?i({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,S,"escape");f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}C&&C(t)}}),I={query:this.getQuery()};return a.default.createElement(s.default,{multiSection:f,items:R,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:u,renderItemData:I,renderSectionTitle:d,getSectionItems:v,highlightedSectionIndex:k,highlightedItemIndex:O,inputProps:D,itemProps:this.itemProps,theme:(0,l.mapToAutowhateverTheme)(y),id:h,ref:this.storeAutowhateverRef})}}]),t}(i.Component);d.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},d.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=d},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(745).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=d(a),c=d(n(1)),s=d(n(746)),l=d(n(747)),f=d(n(749)),p=d(n(750));function d(e){return e&&e.__esModule?e:{default:e}}var h={},v=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,d=n.itemProps;return o.map((function(n,o){var h="react-autowhatever-"+r+"-",v=h+"section-"+o+"-",y=0===o;return u.default.createElement("div",t(v+"container","sectionContainer",y&&"sectionContainerFirst"),u.default.createElement(f.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:v}),u.default.createElement(p.default,{items:e.sectionsItems[o],itemProps:d,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(p.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(),p=null!==f,d=this.getItemId(c,s),h="react-autowhatever-"+n,v=r({role:"combobox","aria-haspopup":"listbox","aria-owns":h,"aria-expanded":p},e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),this.props.containerProps),y=i(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":h,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",l&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),g=a({containerProps:r({id:h,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:f});return u.default.createElement("div",v,y,g)}}]),t}(a.Component);v.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])},v.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=v},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(748),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(226));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(751)),s=l(n(226));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 p(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;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=p(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)},p(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,p=t.theme,d=t.keyPrefix,h=null===s?d:d+"section-"+s+"-",v="function"==typeof o;return a.default.createElement("ul",r({role:"listbox"},p(h+"items-list","itemsList")),n.map((function(t,n){var d=0===n,y=n===l,g=h+"item-"+n,m=v?o({sectionIndex:s,itemIndex:n}):o,b=r({id:f(s,n),"aria-selected":y},p(g,"item",d&&"itemFirst",y&&"itemHighlighted"),m);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);d.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},d.defaultProps={sectionIndex:null},t.default=d},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(226));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 p=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);p.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=p},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";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(754),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(16),o=n.n(r),i=n(3),a=n.n(i),u=n(9),c=n.n(u),s=n(13),l=n.n(s),f=n(11),p=n.n(f),d=n(14),h=n.n(d),v=n(7),y=n.n(v),g=n(6),m=n.n(g),b=n(98),w=n.n(b),_=n(0),x=n.n(_),k=n(51),O=n(28),S=n(10),E=n.n(S),j=n(15),P=n.n(j),C=n(49),T=n.n(C),A=n(1),R=n.n(A),D=n(17),I=n.n(D),M=["icon","width","height","color","className","preserveColor","rotate","size","spin"],N={"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 F(e){return e instanceof Function}function z(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=T()(e,M),f=Object(_.useMemo)((function(){return F(t)?t:function(e){var t;return(t=e.id?"#".concat(e.id):"#"===e[0]?e:"#"+e)?function(e){return x.a.createElement("svg",e,x.a.createElement("use",{xlinkHref:t}))}:(console.warn("Icon not found ".concat(e,".")),null)}(t)}),[t]),p=e.style;p=Object.assign({},p),o&&(p.fill=o),u&&(p.transform="rotate(".concat(u,"deg)"));var d=a?"icon--preserveColor":"icon",h=I()(i,N[d],P()({},N["icon--spin"],s));return f?x.a.createElement(f,E()({className:h,style:p,width:n||c||"16",height:r||c||"16"},l)):null}z.isProperIcon=function(e){var t=e&&!!e.id,n="string"==typeof e,r=F(e);return t||n||r};var L=R.a.oneOfType([R.a.string,R.a.object,R.a.func]);z.propTypes={icon:L.isRequired,width:R.a.oneOfType([R.a.string,R.a.number]),height:R.a.oneOfType([R.a.string,R.a.number]),color:R.a.oneOfType([R.a.string,R.a.object]),className:R.a.string,preserveColor:R.a.bool,size:R.a.oneOfType([R.a.string,R.a.number]),spin:R.a.bool},z.defaultProps={spin:!1};var U=z,B=n(19),W=n(38),q=n.n(W),H=n(158),Q=n.n(H),V=n(39),$=n.n(V),J=n(40),G=n.n(J),Y=n(32),K=n.n(Y),X=n(41),Z=n.n(X),ee=n(42),te=n.n(ee),ne=n(26),re=n.n(ne),oe=n(101),ie=n.n(oe),ae=n(31),ue=["iconRef"];var ce=function(e){var t=e.iconRef,n=T()(e,ue);return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},n,{ref:t}),x.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"}))},se=n(159),le=n.n(se),fe=R.a.shape({name:R.a.string,slug:R.a.string,developer:R.a.object,links:R.a.shape({icon:R.a.string}),latest_version:R.a.shape({version:R.a.string})});R.a.shape({_id:R.a.string,class:R.a.string,mime:R.a.string,name:R.a.string});function pe(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var de="styles__c-loading-placeholder___3L6Gz",he="styles__c-app-icon___2_O40",ve="styles__c-app-icon-default___3CEmt",ye=function(e){Z()(r,e);var t,n=pe(r);function r(e,t){var o;return $()(this,r),o=n.call(this,e,t),P()(K()(o),"state",{error:null,icon:null,status:o.props.client?"fetching":"errored"}),o.isUnmounting=!1,o.handleError=o.handleError.bind(K()(o)),o.fetchIcon=o.fetchIcon.bind(K()(o)),o}return G()(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,appData:t,priority:r})}},{key:"handleError",value:function(){this.setState({status:"errored"})}},{key:"load",value:(t=Q()(ie.a.mark((function e(){var t,n,r,o,i,a,u,c,s,l,f;return ie.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 x.a.createElement("div",{role:"progressbar",className:I()(de,he,n)});case"done":return x.a.createElement("img",{alt:t,className:I()(he,n),onError:this.handleError,ref:this.props.iconRef,src:i});case"errored":default:return x.a.createElement(U,{className:I()(he,ve,n),height:"100%",icon:r||ce,width:"100%",color:le.a.coolGrey,iconRef:this.props.iconRef})}}}]),r}(_.Component);ye.propTypes={alt:R.a.string,app:R.a.oneOfType([fe,R.a.string]),fallbackIcon:L,fetchIcon:R.a.func,client:R.a.object.isRequired,className:R.a.string,onReady:R.a.func,type:R.a.oneOf(["app","konnector"]),priority:R.a.oneOf(["stack","registry"])},ye.defaultProps={type:"app",priority:"stack"};var ge=Object(ae.withClient)(ye),me=n(29);function be(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 we(e){return x.a.createElement("svg",w()({width:32,height:32},e),x.a.createElement("g",{fill:"none",fillRule:"evenodd"},x.a.createElement("circle",{fill:"#297EF2",fillRule:"nonzero",cx:16,cy:16,r:16}),x.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 _e=function(e){p()(n,e);var t=be(n);function n(){return a()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props.className;return x.a.createElement(ge,{fetchIcon:function(){return"".concat(me.b.get.cozyURL(),"/assets/images/icon-cozy-home.svg")},fallbackIcon:we,className:e})}}]),n}(_.PureComponent),xe=function(e){var t=e.webviewContext,n=e.homeHref;return Object(B.isFlagshipApp)()||q()("flagship.debug")?x.a.createElement("a",{onClick:function(){t.call("backToHome")},className:"coz-nav-apps-btns-home --is-flagship"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"})):n?x.a.createElement("a",{href:n,className:"coz-nav-apps-btns-home"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"})):x.a.createElement("span",{className:"coz-nav-apps-btns-home"},x.a.createElement(_e,{className:"coz-nav-apps-btns-home-svg"}))};var ke=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 32 32"},e,{role:"progressbar","aria-busy":"true"}),x.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"}),x.a.createElement("path",{d:"M16 0a16 16 0 0116 16h-4A12 12 0 0016 4z"}))},Oe=["busy","disabled"],Se=["children","icon","iconOnly","label","subtle","className","extension","round","size","theme","align","extraRight","tag"],Ee={"c-btn":"styles__c-btn___-2Vnj","c-btn--regular":"styles__c-btn--regular___2HUly","c-btn--ghost":"styles__c-btn--ghost___1HC3L","c-btn--highlight":"styles__c-btn--highlight___2jRfu","c-btn--alpha":"styles__c-btn--alpha___2ECZi","c-btn--action":"styles__c-btn--action___36KFm","c-btn--close":"styles__c-btn--close___3f0AP","c-btn--danger":"styles__c-btn--danger___17T_C","c-btn--secondary":"styles__c-btn--secondary___3Br_N","c-btn--danger-outline":"styles__c-btn--danger-outline___1mO1B","c-btn--text":"styles__c-btn--text___2Vp-2","c-btn--left":"styles__c-btn--left___23VNa","c-btn--center":"styles__c-btn--center___16_Xh","c-btn--right":"styles__c-btn--right___wklLq","c-btn--tiny":"styles__c-btn--tiny___1pFv6","c-btn--small":"styles__c-btn--small___3ArkI","c-btn--large":"styles__c-btn--large___2gatN","c-btn--full":"styles__c-btn--full___2VmR1","c-btn--narrow":"styles__c-btn--narrow___27FHD","c-btn--round":"styles__c-btn--round___1Lkyl","c-btn--subtle":"styles__c-btn--subtle___OknKf",spin:"styles__spin___alZ_V",shake:"styles__shake___2NWWT"},je=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 I()(Ee["c-btn"],(t={},P()(t,Ee["c-btn--".concat(i)],i),P()(t,Ee["c-btn--".concat(o)],"normal"!==o),P()(t,Ee["c-btn--".concat(a)],a),P()(t,Ee["c-btn--".concat(r)],r),P()(t,Ee["c-btn--".concat(c)],c),P()(t,Ee["c-btn--round"],u),t),n)},Pe=function(e){return function(t){var n=t.busy,r=t.disabled,o=T()(t,Oe);return n&&(o["aria-busy"]=!0),r&&(o["aria-disabled"]=!0),"button"===e&&r&&(o.disabled=!0),o}},Ce={button:Pe("button"),a:Pe("a")},Te=function(e){return e},Ae={tiny:8,small:12,large:18},Re=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,p=e.extraRight,d=e.tag,h=T()(e,Se),v=Ce[d]||Te,y=r?o:null,g=r?"u-visuallyhidden":null;return x.a.createElement(d,E()({},v(h),{className:je({extension:u,align:f,round:c,size:s,theme:l,className:a,variant:i&&"subtle"}),title:y}),x.a.createElement("span",null,U.isProperIcon(n)?x.a.createElement(U,{size:Ae[s],icon:n,"aria-hidden":!0,focusable:"false"}):n,o&&x.a.createElement("span",{className:g},o),t,p&&x.a.createElement("span",{className:"u-ml-auto"},p),h.busy&&x.a.createElement(U,{size:Ae[s],icon:ke,spin:!0,className:"u-ml-half","aria-hidden":!0,focusable:"false"})))},De=function(e){return x.a.createElement(Re,e)},Ie=function(e){return x.a.createElement(Re,e)};function Me(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)}}De.propTypes={children:R.a.node,label:R.a.node.isRequired,icon:R.a.oneOfType([R.a.node,L]),iconOnly:R.a.bool,theme:R.a.string,size:R.a.oneOf(["tiny","small","large","normal"]),extension:R.a.oneOf(["narrow","full"]),align:R.a.oneOf(["left","right","center"]),round:R.a.bool,className:R.a.string,onClick:R.a.func,extraRight:R.a.PropTypes.node,busy:R.a.bool,disabled:R.a.bool,type:R.a.oneOf(["button","reset","submit"]),subtle:R.a.bool},De.defaultProps={type:"submit",tag:"button",size:"normal",align:"center"},Ie.defaultProps={tag:"a"};var Ne=function(e){p()(n,e);var t=Me(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 x.a.createElement("div",{className:"coz-bar-banner".concat(o?" unmounted":"")},x.a.createElement("p",null,t("banner.".concat(n,".description"))),x.a.createElement(Ie,{className:"coz-bar-banner-button",size:"tiny",href:r,label:t("banner.".concat(n,".CTA"))}))}}]),n}(_.Component),Fe=Object(O.translate)()(Ne),ze=n(2),Le=n.n(ze),Ue=n(8),Be=n.n(Ue),We=n(165),qe=n.n(We);var He=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("defs",null,x.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"})),x.a.createElement("g",{fillRule:"evenodd",transform:"translate(-160 -255)"},x.a.createElement("use",{xlinkHref:"#cloud_svg__a"})))},Qe=n(160),Ve=n.n(Qe),$e=n(99),Je=n.n($e),Ge=n(94),Ye=n.n(Ge),Ke=function(e){var t=window.innerWidth;return Ye()(e,(function(e){var n=Je()(e,2),r=n[0],o=n[1];return t>=r&&(void 0===o||t<=o)}))},Xe={isExtraLarge:[1201],isLarge:[1024,1200],isMedium:[769,1023],isSmall:[544,768],isTiny:[0,543],isDesktop:[1024],isTablet:[769,1023],isMobile:[0,768]};function Ze(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}R.a.shape(Object.keys(Xe).reduce((function(e,t){return e[t]=R.a.bool.isRequired,e}),{}));var et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe;return function(t){var n=function(n){Z()(o,n);var r=Ze(o);function o(t){var n;return $()(this,o),(n=r.call(this,t)).state={breakpoints:Ke(e)},n.checkBreakpoints=Ve()((function(){n.setState({breakpoints:Ke(e)})}),100,{trailing:!0}),n}return G()(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 x.a.createElement(t,E()({},e,{breakpoints:n}))}}]),o}(_.Component);return n.displayName="withBreakpoints(".concat(t.displayName||t.name,")"),n}},tt=n(12),nt=n(20),rt=n.n(nt),ot=R.a.shape({slug:R.a.string.isRequired,name:R.a.string.isRequired,namePrefix:R.a.string,comingSoon:R.a.bool,href:R.a.string,links:R.a.shape({icon:R.a.string.isRequired})}),it=n(97),at=n(155),ut=n.n(at),ct={drive:{appId:"io.cozy.drive.mobile",uri:"cozydrive://",name:"Cozy Drive"},banks:{appId:Object(B.isAndroidApp)()?"io.cozy.banks.mobile":"io.cozy.banks",uri:"cozybanks://",name:"Cozy Banks"}},st=function(e){return e?e.startsWith("/")?e:"/"+e:"/"},lt=function(e){var t=e.slug,n=e.cozyUrl,r=e.subDomainType,o=e.fallbackUrl,i=e.nativePath;if(i=st(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,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=st(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()};function ft(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 pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dt(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var ht=function(e,t,n){var r={};return function(o){var i=n(o),a=r[i];return a&&a.result&&a.date-Date.now()<t||(r[i]={result:e(o),date:Date.now()}),r[i].result}}((function(e){return Object(B.checkApp)(e).catch((function(){return!1}))}),1e4,(function(e){return e.appId})),vt=function(e){Z()(r,e);var t,n=dt(r);function r(e){var t;return $()(this,r),t=n.call(this,e),P()(K()(t),"state",{nativeAppIsAvailable:null,isFetchingAppInfo:!1}),P()(K()(t),"setImgRef",(function(e){t.imgRef=e,t.setState({imgRef:t.imgRef})})),t.imgRef=null,t}return G()(r,[{key:"componentDidMount",value:function(){Object(B.isMobileApp)()&&this.checkAppAvailability()}},{key:"checkAppAvailability",value:(t=Q()(ie.a.mark((function e(){var t,n,o;return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.getSlug(this.props),!(n=ct[t])){e.next=9;break}return e.t0=Boolean,e.next=6,ht(n);case 6:e.t1=e.sent,o=(0,e.t0)(e.t1),this.setState({nativeAppIsAvailable:o});case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this.props.children;r.deprecateSlug(this.props);var t=r.getSlug(this.props),n=this.state.nativeAppIsAvailable,o=ct[t],i=r.getOnClickHref(this.props,n,this.context,this.state.imgRef),a=i.href,u=i.onClick;return e(pt(pt({},o),{},{iconRef:this.setImgRef,onClick:u,href:a}))}}],[{key:"getSlug",value:function(e){return e.app&&e.app.slug?e.app.slug:e.slug}},{key:"deprecateSlug",value:function(e){e.slug&&console.warn("AppLinker's 'slug' prop is deprecated, please use 'app.slug' instead")}},{key:"getOnClickHref",value:function(e,t,n,o){var i=e.app,a=e.client,u=e.nativePath,c=r.getSlug(e),s=e.href,l=null,f=Object(B.isMobileApp)(),p=ct[c];if(Object(B.isFlagshipApp)()){var d=(a?a.getInstanceOptions():void 0).app;if(void 0===d||i.slug!==d.slug){var h=o&&JSON.stringify(pt({},o.getBoundingClientRect().toJSON()));return{onClick:function(e){e.preventDefault(),n?n.call("openApp",s,i,h):ut.a.error('Failed to "openApp('.concat(i,')". WebviewService has the following falsy value "').concat(n,"\" in AppLinker's context."))},href:"#"}}}if(f)t?(l=r.openNativeFromNative.bind(this,e),s="#"):l=r.openWeb.bind(this,e);else if(Object(B.isMobile)()&&p)if(Object(B.isAndroid)())l=r.openNativeFromWeb.bind(this,e);else try{s=lt({slug:c,nativePath:u,fallbackUrl:s})}catch(e){console.error(e),s="#"}return{href:s,onClick:l}}},{key:"openNativeFromWeb",value:function(e,t){var n=e.href,o=e.nativePath,i=e.onAppSwitch,a=r.getSlug(e),u=ct[a];t&&t.preventDefault(),r.onAppSwitch(i),Object(B.openDeeplinkOrRedirect)(u.uri+("/"===o?"":o),(function(){window.location.href=n}))}},{key:"onAppSwitch",value:function(e){"function"==typeof e&&e()}},{key:"openNativeFromNative",value:function(e,t){var n=e.onAppSwitch,o=r.getSlug(e);t&&t.preventDefault();var i=ct[o];r.onAppSwitch(n),Object(B.startApp)(i).catch((function(e){console.error("AppLinker: Could not open native app",e)}))}},{key:"openWeb",value:function(e){r.onAppSwitch(e.onAppSwitch)}}]),r}(x.a.Component);P()(vt,"contextType",it.WebviewContext),vt.defaultProps={nativePath:"/"},vt.propTypes={slug:R.a.string,href:R.a.string,nativePath:R.a.string,onAppSwitch:R.a.func,app:R.a.shape({slug:R.a.string.isRequired,mobile:R.a.shape({schema:R.a.string,id_playstore:R.a.string,id_appstore:R.a.string})}).isRequired};var yt=Object(ae.withClient)(vt);function gt(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 mt=rt()(ae.models,"applications.getAppDisplayName",(function(e){return e.namePrefix&&"cozy"!==e.namePrefix.toLowerCase()?"".concat(e.namePrefix," ").concat(e.name):e.name})),bt=function(e){p()(n,e);var t=gt(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=mt(n);return x.a.createElement(yt,{onAppSwitch:this.onAppSwitch,slug:n.slug,href:this.buildAppUrl(n.href)||"",app:n},(function(e){var i=e.onClick,a=e.href;return x.a.createElement("li",{className:"coz-nav-apps-item".concat(n.isCurrentApp?" --current":"")},x.a.createElement("a",{role:"menuitem",href:a,"data-icon":r,title:o,onClick:i},t?x.a.createElement(_e,{className:"coz-nav-apps-item-icon"}):x.a.createElement(ge,w()({app:n,className:"coz-nav-apps-item-icon",key:n.slug},me.b.get.iconProps())),x.a.createElement("p",{className:"coz-label"},o)))}))}}]),n}(x.a.Component);m()(bt,"buildQueryParams",(function(){return null})),bt.propTypes={app:ot.isRequired,useHomeIcon:R.a.bool};var wt=bt,_t=function(){return x.a.createElement("li",{className:"coz-nav-apps-item"},x.a.createElement("span",{role:"menuitem",disabled:!0},x.a.createElement("div",{className:"coz-nav-apps-item-icon coz-loading-placeholder"}),x.a.createElement("p",{className:"coz-label coz-loading-placeholder"})))};function xt(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 kt=function(e){p()(n,e);var t=xt(n);function n(e,r){var o;return a()(this,n),(o=t.call(this,e,r)).translateApp=Ot(o.props.t),o}return c()(n,[{key:"render",value:function(){var e,t=this.props,n=t.t,r=t.apps,o=t.breakpoints,i=t.homeApp,a=t.isFetchingApps,u=t.onAppSwitch,c=o.isMobile,s=i&&i.isCurrentApp,l=i&&i.slug;return a||r&&r.length?x.a.createElement("div",{className:"coz-nav-pop-content"},x.a.createElement("ul",{className:"coz-nav-group"},c&&i&&x.a.createElement(wt,{app:i,useHomeIcon:!0,onAppSwitch:u}),a?new Array(3).fill({}).map((function(e,t){return x.a.createElement(_t,{key:t})})):r.filter((function(e){return e.slug!==l})).sort((e=this.translateApp,function(t,n){return e(t)>e(n)})).map((function(e,t){return x.a.createElement(wt,{app:e,key:t,onAppSwitch:u})}))),i&&!c&&!s&&x.a.createElement("a",{role:"menuitem",href:i.href,className:"coz-apps-home-btn"},x.a.createElement(U,{icon:He}),n("menu.home"))):x.a.createElement("p",{className:"coz-nav--error coz-nav-group"},n("no_apps"))}}]),n}(_.Component);kt.propTypes={homeApp:R.a.shape({isCurrentApp:R.a.bool,slug:R.a.string}),apps:R.a.array,isFetchingApps:R.a.bool.isRequired};var Ot=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)}},St=Object(k.connect)((function(e){return{apps:Object(tt.d)(e),homeApp:Object(tt.f)(e),isFetchingApps:Object(tt.n)(e)}}))(Object(O.translate)()(et()(kt)));var Et=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{d:"M9 0v2h3.5L6 8.5 7.5 10 14 3.5V7h2V1.003A.996.996 0 0014.997 0H9zM7 2V0H1.003A1 1 0 000 1v14c0 .552.445 1 1 1h14c.552 0 1-.438 1-1.003V9h-2v5H2V2h5z",fillRule:"evenodd"}))};var jt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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 Pt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M7 16A7 7 0 017 2v7h7a7 7 0 01-7 7zm2-9V0a7 7 0 017 7H9z"}))};var Ct=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 20 20"},e),x.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm2 0c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0s10 4.477 10 10zm-8.59 1.206c.134.086.33.046.417-.085a.28.28 0 00-.087-.396c-.116-.073-.125-.223-.125-.223a.296.296 0 00-.3-.282h-.006a.306.306 0 00-.21.087.283.283 0 00-.085.21.895.895 0 00.029.183 1.682 1.682 0 01-2.087.004c.03-.11.03-.189.03-.191a.294.294 0 00-.291-.292.285.285 0 00-.213.076.289.289 0 00-.098.204s-.008.15-.126.225a.282.282 0 00-.085.396.315.315 0 00.442.068l.007-.005c.392.295.874.455 1.375.455a2.29 2.29 0 001.379-.456l.033.022zm.766-5.313c.521.502.845 1.153.932 1.856C14.726 7.892 16 9.236 16 10.869 16 12.594 14.574 14 12.822 14H7.177C5.425 14 4 12.595 4 10.868c0-.823.322-1.601.906-2.19a3.179 3.179 0 011.893-.92c.085-.707.41-1.36.933-1.865A3.18 3.18 0 019.954 5a3.18 3.18 0 012.222.893z"}))};var Tt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 15 16"},e),x.a.createElement("path",{d:"M14.992 8V5a1.001 1.001 0 00-2 0v3h-1V2a1.001 1.001 0 00-2 0v5h-1V1a1.001 1.001 0 00-2 0v6h-1V2c0-.551-.45-1-1-1-.551 0-1 .449-1 1v6.5a.5.5 0 01-.88.325L1.1 6.125c-.222-.182-.64-.166-.897.091a.7.7 0 00-.075.898c.064.117 1.542 4.144 3.227 6.798A4.486 4.486 0 007.156 16h3.336c2.48 0 4.5-2.019 4.5-4.5V8z"}))};var At=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M9.734 5.995c0-.55.45-.995.99-.995h4.02a1 1 0 01.99.995v8.01c0 .55-.451.995-.99.995h-4.02a1 1 0 01-.99-.995v-8.01zm2 1.005v6h2V7h-2zm-11-5.002c0-.551.447-.998.998-.998h11.003c.552 0 .999.444.999 1v1h-11v6h5v4H.73c-.55 0-.858-.417-.68-.95L.733 10V1.998z"}))};var Rt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.a.createElement("path",{fillRule:"evenodd",d:"M7.889 13.999L7 10 6 9 4 6l-.355-2.128A6 6 0 007.888 14zm.238-11.998L10 3.5V5L8 6.5l-1.5 1 .5 1 3 .5 1 1v1.5l-1.549 2.323A6 6 0 008.127 2.001zM8 16A8 8 0 118 0a8 8 0 010 16z"}))};var Dt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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 It=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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"}))},Mt=Object(O.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 x.a.createElement("div",{className:"coz-nav-storage"},x.a.createElement("p",{className:"coz-nav-storage-text"},t("storage_phrase",{diskUsage:o,diskQuota:r})),x.a.createElement("progress",{className:"cozy-nav-storage-bar",value:o,max:r,min:"0"}))})),Nt=function(e){var t=e.icon;return x.a.createElement(U,{className:"u-mr-1",color:"var(--slateGrey)",icon:t})},Ft=function(){return x.a.createElement(U,{className:"coz-nav-settings-item-btn-external-icon",color:"var(--coolGrey)",icon:Et})},zt=function(e){var t=e.children;return x.a.createElement("ul",{className:"coz-nav-group"},t)},Lt=function(e){var t=e.children;return x.a.createElement("li",{className:"coz-nav-settings-item"},t)},Ut=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.shoulDisplayViewOfferButton,l=e.managerUrlPremiumLink;return x.a.createElement("div",{className:"coz-nav-pop-content"},u&&x.a.createElement("hr",null),r&&x.a.createElement(zt,null,x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/profile"),target:"_self",title:t("profile")},x.a.createElement(Nt,{icon:jt}),t("profile"))),(!u||!Object(B.isMobileApp)())&&s&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:l,target:"_self",title:t("plans")},x.a.createElement(Nt,{icon:Ct}),t("plans"),x.a.createElement(Ft,null))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",target:"_self",title:t("storage"),href:"".concat(r,"#/storage")},x.a.createElement(Nt,{icon:Pt}),x.a.createElement("span",null,t("storage"),x.a.createElement(Mt,{data:o}))))),x.a.createElement(zt,null,q()("settings.permissions-dashboard")&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/permissions/slug"),target:"_self",title:t("permissions")},x.a.createElement(Nt,{icon:Tt}),t("permissions"))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/connectedDevices"),target:"_self",title:t("connectedDevices")},x.a.createElement(Nt,{icon:At}),t("connectedDevices"))),x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",href:"".concat(r,"#/sessions"),target:"_self",title:t("connections")},x.a.createElement(Nt,{icon:Rt}),t("connections")))),u&&i&&!Object(B.isMobileApp)()&&x.a.createElement(zt,null,x.a.createElement(Lt,null,x.a.createElement("button",{type:"button",role:"menuitem",className:"coz-nav-settings-item-btn",busy:c,onClick:i},x.a.createElement(Nt,{icon:He})," ",t("claudy.title")))),x.a.createElement(zt,null,!Object(B.isMobileApp)()&&x.a.createElement(Lt,null,x.a.createElement("a",{role:"menuitem",target:"_blank",rel:"noopener noreferrer",href:"https://support.cozy.io/",title:t("help")},x.a.createElement(Nt,{icon:It}),t("help"),x.a.createElement(Ft,null))),x.a.createElement(Lt,null,x.a.createElement("button",{type:"button",role:"menuitem",onClick:n,title:t("logout")},x.a.createElement(Nt,{icon:Dt})," ",t("logout")))))};Ut.defaultProps={shoulDisplayViewOfferButton:!1},Ut.propTypes={shoulDisplayViewOfferButton:R.a.bool,t:R.a.func.isRequired,onLogOut:R.a.func.isRequired,settingsAppURL:R.a.string,storageData:R.a.object,onClaudy:R.a.oneOfType([R.a.bool,R.a.func]),isDrawer:R.a.bool,isClaudyLoading:R.a.bool};var Bt=Object(O.translate)()(Ut);function Wt(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 qt=function(e){p()(o,e);var t,n,r=Wt(o);function o(e){var t;return a()(this,o),t=r.call(this,e),m()(l()(t),"onDrawerClick",(function(e){e.target===t.wrapperRef&&t.close()})),m()(l()(t),"onTransitionEnd",(function(){t.props.visible?(t.gesturesHandler||t.attachGestures(),t.preventBackgroundScrolling()):(t.restoreBackgroundScrolling(),t.setState({isClosing:!1})),t.props.drawerListener()})),m()(l()(t),"componentWillReceiveProps",function(){var e=Be()(Le.a.mark((function e(n){return Le.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)}}()),m()(l()(t),"UNSAFE_componentWillReceiveProps",function(){var e=Be()(Le.a.mark((function e(n){return Le.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)}}()),m()(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=Be()(Le.a.mark((function e(){return Le.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 qe.a.Manager(document.documentElement,{recognizers:[[qe.a.Pan,{direction:qe.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=Be()(Le.a.mark((function e(){var t,n,r,o;return Le.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 x.a.createElement("div",{className:"coz-drawer-wrapper",onClick:this.onDrawerClick,"aria-hidden":r?"false":"true",ref:function(t){e.wrapperRef=t}},x.a.createElement("aside",{ref:function(t){e.asideRef=t}},x.a.createElement("nav",{className:"coz-drawer--apps"},x.a.createElement(St,{onAppSwitch:this.close})),x.a.createElement("hr",{className:"coz-sep-flex"}),x.a.createElement("nav",{className:"coz-drawer--settings"},x.a.createElement(Bt,{onLogOut:this.handleLogout,storageData:u,settingsAppURL:a,isClaudyLoading:o,onClaudy:n,toggleSupport:i,isDrawer:!0}))))}}]),o}(_.Component),Ht=Object(k.connect)((function(e){return{storageData:Object(tt.i)(e),settingsAppURL:Object(tt.h)(e)}}),(function(e){return{fetchSettingsData:function(){return e(Object(tt.c)())},logOut:function(){return e(Object(tt.q)())}}}))(qt),Qt=n(35);var Vt=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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",fillRule:"evenodd"}))},$t={query:function(){return Object(ae.Q)("io.cozy.settings").getById("instance")},as:"instanceQuery"},Jt={query:function(){return Object(ae.Q)("io.cozy.settings").getById("context")},as:"contextQuery"},Gt={query:function(){return Object(ae.Q)("io.cozy.settings").getById("disk-usage")},as:"diskUsageQuery"},Yt=n(162),Kt=function(){return Object(Yt.a)("8.3.0")};function Xt(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 Zt=void 0,en=void 0,tn=void 0;ae.models&&(Zt=ae.models.instance,tn=function(e){var t=rt()(e,"diskUsage.data.attributes.quota",!1);return parseInt(t)<5e10},en=function(e){return!Zt.isSelfHosted(e)&&Zt.arePremiumLinksEnabled(e)&&Zt.getUuid(e)&&!tn(e)});var nn=function(e){p()(n,e);var t=Xt(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(l()(r),"onClickOutside",(function(e){(r.props.isFetching||r.state.opened)&&(r.rootRef.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),m()(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,p=r.storageData,d=r.settingsAppURL,h=r.isFetching,v=!1,y=Kt();if(y&&!(t=[s,l,f].some((function(e){return"loading"===e.fetchStatus})))){var g={context:f,diskUsage:s,instance:l};v=Zt.shouldDisplayOffers(g)||en(g),e=Zt.buildPremiumLink(g)}var m=!1;m=y?!t&&!h:!h;var b=this.state.opened&&m;return x.a.createElement("div",{className:"coz-nav coz-nav-settings",ref:function(e){n.rootRef=e}},x.a.createElement(De,{type:"button",theme:"text",onClick:this.toggleMenu,className:"coz-nav-settings-btn","aria-controls":"coz-nav-pop--settings",busy:o,icon:Vt,label:u("menu.settings")}),x.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--settings",id:"coz-nav-pop--settings","aria-hidden":!b},m&&x.a.createElement(x.a.Fragment,null,x.a.createElement(Bt,{onLogOut:function(){a&&"function"==typeof a?a():i()},toggleSupport:c,storageData:p,settingsAppURL:d,shoulDisplayViewOfferButton:v,managerUrlPremiumLink:e}))))}}]),n}(_.Component),rn=function(e){return{storageData:Object(tt.i)(e),settingsAppURL:Object(tt.h)(e),isBusy:Object(tt.p)(e),isFetching:Object(tt.o)(e)}},on=function(e){return{fetchSettingsData:function(){return e(Object(tt.c)())},logOut:function(){return e(Object(tt.q)())}}},an=Kt()?Object(Qt.compose)(Object(O.translate)(),Object(ae.queryConnect)({instanceQuery:$t,contextQuery:Jt,diskUsageQuery:Gt}),Object(k.connect)(rn,on))(nn):Object(Qt.compose)(Object(O.translate)(),Object(k.connect)(rn,on))(nn);var un=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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 cn=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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 sn(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 ln=function(e){p()(n,e);var t=sn(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 x.a.createElement("div",{className:"coz-nav-apps-btns --loading"},x.a.createElement("div",{className:"coz-nav-apps-btns-home coz-loading-placeholder"}),x.a.createElement("div",{className:"coz-nav-apps-btns-main coz-loading-placeholder"}));var p=!f&&o?[l("".concat(i,".name_prefix"),{_:o}),l("".concat(i,".name"),{_:r})].join(" "):l("".concat(i,".name"),{_:r}),d=!c&&t&&t.href;return x.a.createElement("div",{className:"coz-nav-apps-btns".concat(f?" --currentHome":"")},x.a.createElement(xe,{homeHref:d}),!f&&x.a.createElement("span",{className:"coz-nav-apps-btns-sep"}),x.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&&x.a.createElement("img",{className:"coz-bar-hide-sm",src:a,width:"28",alt:""}),x.a.createElement("span",{className:"coz-nav-app-name"},p),!c&&x.a.createElement(U,{icon:s?cn:un,color:"#95999d",size:"12"})))}}]),n}(_.Component),fn=Object(k.connect)((function(e){return{homeApp:Object(tt.f)(e),isFetchingApps:Object(tt.n)(e)}}),(function(){return{}}))(Object(O.translate)()(ln));function pn(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 dn=function(e){p()(n,e);var t=pn(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(l()(r),"onClickOutside",(function(e){r.state.opened&&(r.rootRef.contains(e.target)||r.modalContainer.contains(e.target)||(r.setState({opened:!1}),e.stopPropagation()))})),m()(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 x.a.createElement("nav",{className:"coz-nav coz-nav-apps",ref:function(t){e.rootRef=t}},x.a.createElement(fn,{appName:n,appNamePrefix:r,appSlug:o,iconPath:i,handleClick:this.toggleMenu,opened:u,isPublic:a}),x.a.createElement("div",{className:"coz-nav-pop coz-nav-pop--apps",id:"coz-nav-pop--apps","aria-hidden":!u},x.a.createElement(St,null)))}}]),n}(_.Component),hn=n(96),vn=n.n(hn),yn=n(366),gn=n.n(yn),mn=n(367),bn=n.n(mn);var wn=n(161);function _n(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 xn=function(e){return e.toString().toLowerCase().replace(/\//g," ").normalize("NFD").replace(/[\u0300-\u036f]/g,"").split(" ")},kn=function(e,t){var n=xn(t),r=xn(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(x.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},On=function(e){p()(n,e);var t=_n(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)),m()(l()(e),"state",{input:"",query:null,searching:!1,focused:!1,suggestionsBySource:[],sourceURLs:[]}),m()(l()(e),"sources",[]),m()(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]):wn.a.log("unhandled message:",t)}})),m()(l()(e),"onChange",(function(t,n){var r=n.newValue;e.setState({input:r})})),m()(l()(e),"changeFocusState",(function(t){e.setState({focused:t})})),m()(l()(e),"clearSuggestions",(function(){e.setState({suggestionsBySource:[]})})),m()(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=Be()(Le.a.mark((function t(r){var i,a,u,c;return Le.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(vn()(e.suggestionsBySource),[{title:c,suggestions:u}])})}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))})),m()(l()(e),"onSuggestionsClearRequested",(function(){e.clearSuggestions(),e.debouncedOnSuggestionsFetchRequested.cancel(),e.setState({query:null,searching:!1})})),m()(l()(e),"onSuggestionSelected",(function(t){return function(){var n=Be()(Le.a.mark((function n(r,o){var i,a,u;return Le.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=o.suggestion,a=i.onSelect,!/^id_note:/.test(a)){n.next=9;break}return n.next=5,ae.models.note.fetchURL(t,{id:a.substr(8)});case 5:u=n.sent,window.location.href=u,n.next=10;break;case 9:/^open:/.test(a)?window.location.href=a.substr(5):console.log("suggestion onSelect ("+a+") could not be executed");case 10:e.setState({input:"",query:null});case 11:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}()})),m()(l()(e),"getSectionSuggestions",(function(e){return e.suggestions.slice(0,10)})),m()(l()(e),"getSuggestionValue",(function(e){return e.subtitle})),m()(l()(e),"renderSectionTitle",(function(){return null})),m()(l()(e),"renderSuggestion",(function(t){return x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-item"},t.icon&&x.a.createElement("img",{className:"coz-searchbar-autosuggest-suggestion-icon",src:t.icon,alt:"icon"}),x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-content"},x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-title"},kn(t.title,e.state.query)),t.subtitle&&x.a.createElement("div",{className:"coz-searchbar-autosuggest-suggestion-subtitle"},kn(t.subtitle,e.state.query))))})),e}return c()(n,[{key:"UNSAFE_componentWillMount",value:function(){this.debouncedOnSuggestionsFetchRequested=bn()(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(me.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(vn()(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,s=c.t,l=c.client,f=""!==n&&null===r,p=a.reduce((function(e,t){return e+t.suggestions.length}),0)>0,d={placeholder:s("searchbar.placeholder"),value:n,onChange:this.onChange,onFocus:function(){return e.changeFocusState(!0)},onBlur:function(){return e.changeFocusState(!1)}},h={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 x.a.createElement("div",{className:"coz-searchbar",role:"search"},u.map((function(e,t){return x.a.createElement("iframe",{src:e,style:{visibility:"hidden",height:"0px",width:"0px"},key:e+t})})),x.a.createElement(gn.a,{theme:h,suggestions:a,multiSection:!0,onSuggestionsFetchRequested:this.debouncedOnSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,onSuggestionSelected:this.onSuggestionSelected(l),getSuggestionValue:this.getSuggestionValue,getSectionSuggestions:this.getSectionSuggestions,renderSectionTitle:this.renderSectionTitle,renderSuggestion:this.renderSuggestion,inputProps:d,focusInputOnSuggestionClick:!1}),""!==n&&!f&&i&&!p&&x.a.createElement("div",{className:"coz-searchbar-autosuggest-status-container"},s("searchbar.empty",{query:n})))}}]),n}(_.Component),Sn=Object(O.translate)()(Object(ae.withClient)(On));function En(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 jn=function(e){p()(n,e);var t=En(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),m()(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(me.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 x.a.createElement("div",{className:"coz-claudy ".concat(t?"coz-claudy--opened":"")},x.a.createElement("button",{type:"button",className:"coz-claudy-icon coz-bar-hide-sm","data-claudy-opened":o,"data-claudy-loading":r,onClick:this.toggle}),x.a.createElement("div",{className:"coz-claudy-intent-wrapper",ref:function(t){e.intentWrapperRef=t}}))}}]),n}(_.Component),Pn=n(95),Cn=n.n(Pn);var Tn=function(){return(Tn=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 An(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 Rn(e){return e}function Dn(e,t){void 0===t&&(t=Rn);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 In=function(e){void 0===e&&(e={});var t=Dn(null);return t.options=Tn({async:!0,ssr:!1},e),t}();function Mn(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(_.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 Nn=function(){},Fn=_.forwardRef((function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:Nn,onWheelCapture:Nn,onTouchMoveCapture:Nn}),o=r[0],i=r[1],a=e.forwardProps,u=e.children,c=e.className,s=e.removeScrollBar,l=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,h=e.inert,v=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,m=An(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,w=Mn([n,t]),x=Tn({},m,o);return _.createElement(_.Fragment,null,l&&_.createElement(b,{sideCar:In,removeScrollBar:s,shards:f,noIsolation:d,inert:h,setCallbacks:i,allowPinchZoom:!!v,lockRef:n}),a?_.cloneElement(_.Children.only(u),Tn({},x,{ref:w})):_.createElement(g,Tn({},x,{className:c,ref:w}),u))}));Fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var zn,Ln=function(e){var t=e.sideCar,n=An(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 _.createElement(r,Tn({},n))};Ln.isSideCarExport=!0;function Un(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zn||n.nc;return t&&e.setAttribute("nonce",t),e}var Bn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Un())&&(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)}}},Wn=function(){var e,t=(e=Bn(),function(t){_.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},qn={left:0,top:0,right:0,gap:0},Hn=function(e){return parseInt(e||"",10)||0},Qn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return qn;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[Hn(n),Hn(r),Hn(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])}},Vn=Wn(),$n=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"},Jn=function(e){var t=_.useState(Qn(e.gapMode)),n=t[0],r=t[1];_.useEffect((function(){r(Qn(e.gapMode))}),[e.gapMode]);var o=e.noRelative,i=e.noImportant,a=e.gapMode,u=void 0===a?"margin":a;return _.createElement(Vn,{styles:$n(n,!o,u,i?"":"!important")})},Gn=function(e,t){var n=t;do{if(Yn(e,n)){var r=Kn(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Yn=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)},Kn=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},Xn=!1;if("undefined"!=typeof window)try{var Zn=Object.defineProperty({},"passive",{get:function(){return Xn=!0,!0}});window.addEventListener("test",Zn,Zn),window.removeEventListener("test",Zn,Zn)}catch(e){Xn=!1}var er=!!Xn&&{passive:!1},tr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nr=function(e){return[e.deltaX,e.deltaY]},rr=function(e){return e&&"current"in e?e.current:e},or=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},ir=0,ar=[];var ur=function(e,t){return e.useMedium(t),Ln}(In,(function(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),o=_.useState(ir++)[0],i=_.useState((function(){return Wn()}))[0],a=_.useRef(e);_.useEffect((function(){a.current=e}),[e]),_.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(rr)).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=_.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=tr(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",p=Gn(f,l);if(!p)return!0;if(p?o=f:(o="v"===f?"h":"v",p=Gn(f,l)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var d=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 p=Kn(e,a),d=p[0],h=p[1]-p[2]-d;(d||h)&&Yn(e,a)&&(l+=h,f+=d),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}(d,t,e,"h"===d?c:s,!0)}),[]),c=_.useCallback((function(e){var n=e;if(ar.length&&ar[ar.length-1]===i){var r="deltaY"in n?nr(n):tr(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(rr).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?u(n,c[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),s=_.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=_.useCallback((function(e){n.current=tr(e),r.current=void 0}),[]),f=_.useCallback((function(t){s(t.type,nr(t),t.target,u(t,e.lockRef.current))}),[]),p=_.useCallback((function(t){s(t.type,tr(t),t.target,u(t,e.lockRef.current))}),[]);_.useEffect((function(){return ar.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,er),document.addEventListener("touchmove",c,er),document.addEventListener("touchstart",l,er),function(){ar=ar.filter((function(e){return e!==i})),document.removeEventListener("wheel",c,er),document.removeEventListener("touchmove",c,er),document.removeEventListener("touchstart",l,er)}}),[]);var d=e.removeScrollBar,h=e.inert;return _.createElement(_.Fragment,null,h?_.createElement(i,{styles:or(o)}):null,d?_.createElement(Jn,{gapMode:"margin"}):null)})),cr=_.forwardRef((function(e,t){return _.createElement(Fn,Tn({},e,{ref:t,sideCar:ur}))}));cr.classNames=Fn.classNames;var sr=cr;function lr(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var fr="styles__c-overlay___31iWd",pr=["onEscape","children","className","innerRef"],dr=function(e){Z()(n,e);var t=lr(n);function n(){var e;$()(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)),P()(K()(e),"handleKeydown",(function(t){27===t.keyCode&&e.props.onEscape()})),P()(K()(e),"handleClick",(function(t){e.props.onClick&&t.target===t.currentTarget&&e.props.onClick()})),e}return G()(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=e.innerRef,o=Cn()(this.props,pr),i=document.body.getBoundingClientRect().height>window.innerHeight?x.a.Fragment:sr;return x.a.createElement("div",E()({ref:r,className:I()(fr,n),onClick:this.handleClick},o),x.a.createElement(i,null,t))}}]),n}(_.Component);dr.propTypes={className:R.a.string,children:R.a.node,onEscape:R.a.func};var hr=x.a.forwardRef((function(e,t){return x.a.createElement(dr,E()({innerRef:t},e))}));function vr(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 yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return mr(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 mr(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=n.call(e)},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 mr(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 br=n(121),wr=n.n(br),_r=function(e){var t=e.into,n=e.children,r=document.querySelector(t);return wr.a.createPortal(n,r)},xr=n(369),kr=n.n(xr);function Or(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var Sr=function(e){Z()(n,e);var t=Or(n);function n(){return $()(this,n),t.apply(this,arguments)}return G()(n,[{key:"render",value:function(){return this.props.children}}]),n}(_.Component);function Er(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var jr={"CozyTheme--inverted":"styles__CozyTheme--inverted___e9x-M","CozyTheme--normal":"styles__CozyTheme--normal___3KdKA","c-modal":"styles__c-modal___33aV9","c-modal-content":"styles__c-modal-content___2av1P","c-modal-header":"styles__c-modal-header___hTCm5","c-modal-header--branded":"styles__c-modal-header--branded___1wwof","c-modal-footer":"styles__c-modal-footer___2Z4Tc","c-modal-container":"styles__c-modal-container___31zmi","c-modal-wrapper":"styles__c-modal-wrapper___8PyE9","c-modal--xsmall":"styles__c-modal--xsmall___1lu1t","c-modal--small":"styles__c-modal--small___XUfOM","c-modal--medium":"styles__c-modal--medium___1dS6h","c-modal--large":"styles__c-modal--large___3arEs","c-modal--xlarge":"styles__c-modal--xlarge___1XePQ","c-modal--xxlarge":"styles__c-modal--xxlarge___3Xp1K","c-modal-wrapper--fullscreen":"styles__c-modal-wrapper--fullscreen___3ygpX","c-modal--fullscreen":"styles__c-modal--fullscreen___8xZVw","c-modal-illu-header":"styles__c-modal-illu-header___3oi9k","c-modal-illu-header--ghost":"styles__c-modal-illu-header--ghost___3E9lu","is-active":"styles__is-active___1fLce","c-modal--small-spacing":"styles__c-modal--small-spacing___1foWa","c-modal--large-spacing":"styles__c-modal--large-spacing___n2gNs","c-modal-app":"styles__c-modal-app___1e4sV","c-app-editor":"styles__c-app-editor___JFuCk","c-modal-app-icon":"styles__c-modal-app-icon___3MjON","c-modal-content-fixed":"styles__c-modal-content-fixed___3wKzQ","c-modal-footer--button":"styles__c-modal-footer--button___1sIa4","c-modal-section":"styles__c-modal-section___2QNq3","c-modal-close":"styles__c-modal-close___1v2bp","c-modal--closable":"styles__c-modal--closable___29CLQ","c-modal-close--notitle":"styles__c-modal-close--notitle___1rqne","c-modal--overflowHidden":"styles__c-modal--overflowHidden___3H87t","c-modal-back-button":"styles__c-modal-back-button___aIF_M",spin:"styles__spin___lXiub",shake:"styles__shake___13P1Q"};var Pr=function(e){Z()(n,e);var t=Er(n);function n(e){var r;$()(this,n),r=t.call(this,e),P()(K()(r),"UNSAFE_componentWillUpdate",(function(e){var t=e.children;r.refreshComputedParts(t)})),P()(K()(r),"handleScroll",(function(){if(r.contentHeader){var e=K()(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 G()(n,[{key:"componentWillUpdate",value:function(e,t){this.UNSAFE_componentWillUpdate(e,t)}},{key:"refreshComputedParts",value:function(e){var t=function(e){return x.a.Children.toArray(e).find((function(e){return e&&e.nodeName===Sr}))}(e);this.animatedHeader=t,this.childrenToRender=t?function(e){return x.a.Children.map(e,(function(e){return e&&e.nodeName!==Sr?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 x.a.createElement("div",{className:I()(jr["c-modal-content".concat(r?"-fixed":"")],n),ref:function(t){e.scrollingContent=t}},i&&x.a.createElement("div",{className:i.attributes.className,ref:function(t){e.contentHeader=t}},x.a.createElement("h2",{className:jr["c-modal-illu-header"]},i.children),x.a.createElement("div",{className:I()(jr["c-modal-illu-header--ghost"],i.attributes.activeClassName,P()({},jr["is-active"],o))},i.children)),a)}}]),n}(_.Component),Cr="styles__c-modal-content___2av1P",Tr="styles__c-modal-section___2QNq3",Ar=function(e){var t=e.children,n=e.className;return x.a.createElement("div",{className:I()(Cr,Tr,n)},t)};function Rr(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 Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ir="styles__c-modal-header___hTCm5",Mr="styles__c-modal-header--branded___1wwof",Nr="styles__c-modal-app___1e4sV",Fr="styles__c-app-editor___JFuCk",zr="styles__c-modal-app-icon___3MjON",Lr=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 x.a.createElement("div",{className:I()(Ir,r),style:u,id:c},t&&x.a.createElement("h2",null,t),s?x.a.createElement("h2",null,n):n,i&&x.a.createElement("h2",{className:Nr},o&&x.a.createElement("img",{className:zr,src:o}),a&&x.a.createElement("span",{className:Fr},a," "),i))},Ur=function(e){var t=e.logo,n=e.bg,r=e.className,o=e.style,i=void 0===o?{}:o;return x.a.createElement("h2",{className:I()(Mr,r),style:Dr({background:n},i)},x.a.createElement("img",{src:t,alt:""}))};var Br=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 24 24"},e),x.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"}))},Wr=Object(_.createContext)(null),qr=function(){var e=Object(_.useContext)(Wr);if(null===e)throw new Error("Cannot use useBreakpoints without BreakpointsProvider. The component must have a BreakpointsProvider above it.");return e},Hr="styles__c-modal-close___1v2bp",Qr=function(e){var t=qr().isMobile,n=e.color;return x.a.createElement(U,{icon:Br,size:t?"16":"24",color:n||le.a.coolGrey})},Vr=function(e){var t=e.onClick,n=e.color,r=e.className;return x.a.createElement("button",{className:I()(Hr,r),onClick:t,type:"button","aria-label":"close"},x.a.createElement(Qr,{color:n}))},$r="styles__c-modal-footer___2Z4Tc",Jr=function(e){var t=e.children,n=e.className;return x.a.createElement("div",{className:I()($r,n)},t)},Gr="styles__c-modal-footer--button___1sIa4",Yr=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 x.a.createElement("div",{className:I()("u-flex","u-flex-wrap-reverse","u-flex-justify-end",Gr,c)},u,t&&n&&x.a.createElement(De,{theme:r,onClick:n,label:t,className:"u-flex-auto-s"}),o&&i&&x.a.createElement(De,{theme:a,onClick:i,label:o,className:"u-flex-auto-s"}))};Yr.defaultProps={primaryType:"regular",secondaryType:"secondary"};var Kr=Yr;var Xr=function(e){return x.a.createElement("svg",E()({viewBox:"0 0 16 16"},e),x.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"}))},Zr=["className"],eo="styles__c-modal-back-button___aIF_M",to=function(e){var t=qr().isMobile,n=e.className,r=T()(e,Zr);return x.a.createElement(De,E()({icon:Xr,iconOnly:!0,extension:"narrow",theme:"text",label:"back",className:I()(eo,"u-m-0 u-pos-absolute",{"u-p-1":t,"u-p-half":!t,"u-h-3":t},n)},r))};var no=x.a.createContext(null);function ro(){return x.a.useContext(no)}var oo=n(373);function io(e,t,n){return(t=Object(oo.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ao(e,t){if(null==e)return{};var n,r,o=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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function uo(){return(uo=Object.assign?Object.assign.bind():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)}var co=n(59);function so(e){return e&&"object"===Object(co.a)(e)&&e.constructor===Object}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?uo({},e):e;return so(e)&&so(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(so(t[o])&&o in e?r[o]=lo(e[o],t[o],n):r[o]=t[o])})),r}function fo(){return(fo=Object.assign?Object.assign.bind():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)}var po=["xs","sm","md","lg","xl"];function ho(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,u=ao(e,["values","unit","step"]);function c(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function s(e,t){var r=po.indexOf(t);return r===po.length-1?c(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[po[r+1]]?n[po[r+1]]:t)-a/100).concat(o,")")}return fo({keys:po,values:n,up:c,down:function(e){var t=po.indexOf(e)+1,r=n[po[t]];return t===po.length?c("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:s,only:function(e){return s(e,e)},width:function(e){return n[e]}},u)}function vo(e,t,n){var r;return fo({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),fo({paddingLeft:t(2),paddingRight:t(2)},n,io({},e.up("sm"),fo({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},io(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),io(r,e.up("sm"),{minHeight:64}),r)},n)}function yo(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}var go={black:"#000",white:"#fff"},mo={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"},bo={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"},wo={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"},_o={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"},xo={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ko={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Oo={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function So(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 Math.min(Math.max(t,e),n)}function Eo(e){if(e.type)return e;if("#"===e.charAt(0))return Eo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(yo(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function jo(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(t,"(").concat(n.join(", "),")")}function Po(e){var t="hsl"===(e=Eo(e)).type?Eo(function(e){var t=(e=Eo(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),jo({type:u,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Co(e,t){if(e=Eo(e),t=So(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 jo(e)}function To(e,t){if(e=Eo(e),t=So(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 jo(e)}var Ao={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:go.white,default:mo[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ro={text:{primary:go.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:mo[800],default:"#303030"},action:{active:go.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Do(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=To(e.main,o):"dark"===t&&(e.dark=Co(e.main,i)))}function Io(e){var t=e.primary,n=void 0===t?{light:bo[300],main:bo[500],dark:bo[700]}:t,r=e.secondary,o=void 0===r?{light:wo.A200,main:wo.A400,dark:wo.A700}:r,i=e.error,a=void 0===i?{light:_o[300],main:_o[500],dark:_o[700]}:i,u=e.warning,c=void 0===u?{light:xo[300],main:xo[500],dark:xo[700]}:u,s=e.info,l=void 0===s?{light:ko[300],main:ko[500],dark:ko[700]}:s,f=e.success,p=void 0===f?{light:Oo[300],main:Oo[500],dark:Oo[700]}:f,d=e.type,h=void 0===d?"light":d,v=e.contrastThreshold,y=void 0===v?3:v,g=e.tonalOffset,m=void 0===g?.2:g,b=ao(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function w(e){return function(e,t){var n=Po(e),r=Po(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ro.text.primary)>=y?Ro.text.primary:Ao.text.primary}var _=function(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;if(!(e=fo({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(yo(4,t));if("string"!=typeof e.main)throw new Error(yo(5,JSON.stringify(e.main)));return Do(e,"light",n,m),Do(e,"dark",r,m),e.contrastText||(e.contrastText=w(e.main)),e},x={dark:Ro,light:Ao};return lo(fo({common:go,type:h,primary:_(n),secondary:_(o,"A400","A200","A700"),error:_(a),warning:_(c),info:_(l),success:_(p),grey:mo,contrastThreshold:y,getContrastText:w,augmentColor:_,tonalOffset:m},x[h]),b)}function Mo(e){return Math.round(1e5*e)/1e5}function No(e){return Mo(e)}var Fo={textTransform:"uppercase"};function zo(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,u=n.fontWeightLight,c=void 0===u?300:u,s=n.fontWeightRegular,l=void 0===s?400:s,f=n.fontWeightMedium,p=void 0===f?500:f,d=n.fontWeightBold,h=void 0===d?700:d,v=n.htmlFontSize,y=void 0===v?16:v,g=n.allVariants,m=n.pxToRem,b=ao(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var w=a/14,_=m||function(e){return"".concat(e/y*w,"rem")},x=function(e,t,n,r,i){return fo({fontFamily:o,fontWeight:e,fontSize:_(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(Mo(r/t),"em")}:{},i,g)},k={h1:x(c,96,1.167,-1.5),h2:x(c,60,1.2,-.5),h3:x(l,48,1.167,0),h4:x(l,34,1.235,.25),h5:x(l,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(l,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(l,16,1.5,.15),body2:x(l,14,1.43,.15),button:x(p,14,1.75,.4,Fo),caption:x(l,12,1.66,.4),overline:x(l,12,2.66,1,Fo)};return lo(fo({htmlFontSize:y,pxToRem:_,round:No,fontFamily:o,fontSize:a,fontWeightLight:c,fontWeightRegular:l,fontWeightMedium:p,fontWeightBold:h},k),b,{clone:!1})}function Lo(){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 Uo=["none",Lo(0,2,1,-1,0,1,1,0,0,1,3,0),Lo(0,3,1,-2,0,2,2,0,0,1,5,0),Lo(0,3,3,-2,0,3,4,0,0,1,8,0),Lo(0,2,4,-1,0,4,5,0,0,1,10,0),Lo(0,3,5,-1,0,5,8,0,0,1,14,0),Lo(0,3,5,-1,0,6,10,0,0,1,18,0),Lo(0,4,5,-2,0,7,10,1,0,2,16,1),Lo(0,5,5,-3,0,8,10,1,0,3,14,2),Lo(0,5,6,-3,0,9,12,1,0,3,16,2),Lo(0,6,6,-3,0,10,14,1,0,4,18,3),Lo(0,6,7,-4,0,11,15,1,0,4,20,3),Lo(0,7,8,-4,0,12,17,2,0,5,22,4),Lo(0,7,8,-4,0,13,19,2,0,5,24,4),Lo(0,7,9,-4,0,14,21,2,0,5,26,4),Lo(0,8,9,-5,0,15,22,2,0,6,28,5),Lo(0,8,10,-5,0,16,24,2,0,6,30,5),Lo(0,8,11,-5,0,17,26,2,0,6,32,5),Lo(0,9,11,-5,0,18,28,2,0,7,34,6),Lo(0,9,12,-6,0,19,29,2,0,7,36,6),Lo(0,10,13,-6,0,20,31,3,0,8,38,7),Lo(0,10,13,-6,0,21,33,3,0,8,40,7),Lo(0,10,14,-6,0,22,35,3,0,8,42,7),Lo(0,11,14,-7,0,23,36,3,0,9,44,8),Lo(0,11,15,-7,0,24,38,3,0,9,46,8)],Bo={borderRadius:4};function Wo(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 qo(e,t){if(e){if("string"==typeof e)return Wo(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)?Wo(e,t):void 0}}function Ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||qo(e,t)||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 Qo(e){return function(e){if(Array.isArray(e))return Wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qo(e)||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.")}()}var Vo=function(e,t){return t?lo(e,t,{clone:!1}):e},$o={xs:0,sm:600,md:960,lg:1280,xl:1920},Jo={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat($o[e],"px)")}};var Go={m:"margin",p:"padding"},Yo={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ko={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Xo=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!Ko[e])return[e];e=Ko[e]}var t=Ho(e.split(""),2),n=t[0],r=t[1],o=Go[n],i=Yo[r]||"";return Array.isArray(i)?i.map((function(e){return o+e})):[o+i]})),Zo=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function ei(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function ti(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function ni(e){var t=ei(e.theme);return Object.keys(e).map((function(n){if(-1===Zo.indexOf(n))return null;var r=ti(Xo(n),t),o=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||Jo;return t.reduce((function(e,o,i){return e[r.up(r.keys[i])]=n(t[i]),e}),{})}if("object"===Object(co.a)(t)){var o=e.theme.breakpoints||Jo;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}(e,o,r)})).reduce(Vo,{})}ni.propTypes={},ni.filterProps=Zo;function ri(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=ei({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var oi={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)"},ii={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ai(e){return"".concat(Math.round(e),"ms")}var ui={easing:oi,duration:ii,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?ii.standard:n,o=t.easing,i=void 0===o?oi.easeInOut:o,a=t.delay,u=void 0===a?0:a;ao(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:ai(r)," ").concat(i," ").concat("string"==typeof u?u:ai(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},ci={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function si(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,u=e.spacing,c=e.typography,s=void 0===c?{}:c,l=ao(e,["breakpoints","mixins","palette","spacing","typography"]),f=Io(a),p=ho(n),d=ri(u),h=lo({breakpoints:p,direction:"ltr",mixins:vo(p,d,o),overrides:{},palette:f,props:{},shadows:Uo,typography:zo(f,s),spacing:d,shape:Bo,transitions:ui,zIndex:ci},l),v=arguments.length,y=new Array(v>1?v-1:0),g=1;g<v;g++)y[g-1]=arguments[g];return h=y.reduce((function(e,t){return lo(e,t)}),h)}var li=si();var fi,pi=n(156),di=n.n(pi),hi=n(78),vi=n.n(hi),yi=n(228),gi=n.n(yi),mi=n(43),bi=n.n(mi);!function(e){e.Dark="dark",e.Light="light"}(fi||(fi={}));var wi=function(e,t,n){if(e){var r=bi()(t)&&di()(t,vi.a),o=!gi()(r)&&r;o&&e.call("setFlagshipUI",o,n)}},_i=function(e,t){return t&&getComputedStyle(t).getPropertyValue("background-color")||e.palette.background.paper},xi=function(e){return Object(B.getFlagshipMetadata)().immersive||e&&e.classList.contains("coz-theme-primary")?"light":"dark"},ki=function(){var e,t,n,r,o=ro()||li,i=document.querySelector(".coz-bar-wrapper"),a=document.getElementById("sidebar");e={bottomBackground:o.palette.background.paper,bottomTheme:"dark",topBackground:o.palette.background.paper,topTheme:"dark"},t={bottomBackground:o.palette.background[a?"default":"paper"],bottomTheme:Object(B.getFlagshipMetadata)().immersive?"light":"dark",bottomOverlay:"transparent",topOverlay:"transparent",topBackground:_i(o,i),topTheme:xi(i)},n="cozy-ui/Modal",r=Object(it.useWebviewIntent)(),Object(_.useEffect)((function(){return wi(r,e,"".concat(n||"unknown"," (onMount)")),function(){return wi(r,t,"".concat(n||"unknown"," (onUnmount)"))}}),[r])},Oi=Object(B.isFlagshipApp)()?function(){return ki(),null}:function(){return null},Si=["children","description","title","closable","dismissAction","overflowHidden","className","closeBtnClassName","closeBtnColor","into","size","height","width","spacing","mobileFullscreen","overlayClassName","wrapperClassName","primaryText","primaryAction","primaryType","secondaryText","secondaryAction","secondaryType","containerClassName"];function Ei(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 ji(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=re()(e);if(t){var o=re()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return te()(this,n)}}var Pi={"CozyTheme--inverted":"styles__CozyTheme--inverted___e9x-M","CozyTheme--normal":"styles__CozyTheme--normal___3KdKA","c-modal":"styles__c-modal___33aV9","c-modal-content":"styles__c-modal-content___2av1P","c-modal-header":"styles__c-modal-header___hTCm5","c-modal-header--branded":"styles__c-modal-header--branded___1wwof","c-modal-footer":"styles__c-modal-footer___2Z4Tc","c-modal-container":"styles__c-modal-container___31zmi","c-modal-wrapper":"styles__c-modal-wrapper___8PyE9","c-modal--xsmall":"styles__c-modal--xsmall___1lu1t","c-modal--small":"styles__c-modal--small___XUfOM","c-modal--medium":"styles__c-modal--medium___1dS6h","c-modal--large":"styles__c-modal--large___3arEs","c-modal--xlarge":"styles__c-modal--xlarge___1XePQ","c-modal--xxlarge":"styles__c-modal--xxlarge___3Xp1K","c-modal-wrapper--fullscreen":"styles__c-modal-wrapper--fullscreen___3ygpX","c-modal--fullscreen":"styles__c-modal--fullscreen___8xZVw","c-modal-illu-header":"styles__c-modal-illu-header___3oi9k","c-modal-illu-header--ghost":"styles__c-modal-illu-header--ghost___3E9lu","is-active":"styles__is-active___1fLce","c-modal--small-spacing":"styles__c-modal--small-spacing___1foWa","c-modal--large-spacing":"styles__c-modal--large-spacing___n2gNs","c-modal-app":"styles__c-modal-app___1e4sV","c-app-editor":"styles__c-app-editor___JFuCk","c-modal-app-icon":"styles__c-modal-app-icon___3MjON","c-modal-content-fixed":"styles__c-modal-content-fixed___3wKzQ","c-modal-footer--button":"styles__c-modal-footer--button___1sIa4","c-modal-section":"styles__c-modal-section___2QNq3","c-modal-close":"styles__c-modal-close___1v2bp","c-modal--closable":"styles__c-modal--closable___29CLQ","c-modal-close--notitle":"styles__c-modal-close--notitle___1rqne","c-modal--overflowHidden":"styles__c-modal--overflowHidden___3H87t","c-modal-back-button":"styles__c-modal-back-button___aIF_M",spin:"styles__spin___lXiub",shake:"styles__shake___13P1Q"},Ci=Pr,Ti=function(e){Z()(n,e);var t=ji(n);function n(e){var r;return $()(this,n),r=t.call(this,e),P()(K()(r),"handleOutsideClick",(function(e){e.target===e.currentTarget&&r.props.dismissAction&&r.props.dismissAction()})),r.titleID=kr()("modal_"),r}return G()(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,p=t.size,d=t.height,h=t.width,v=t.spacing,y=t.mobileFullscreen,g=t.overlayClassName,m=t.wrapperClassName,b=t.primaryText,w=t.primaryAction,_=t.primaryType,k=t.secondaryText,O=t.secondaryAction,S=t.secondaryType,j=t.containerClassName,C=T()(t,Si),A=this.titleID,R=Object.assign({},d&&{height:d},h&&{width:h});return x.a.createElement(_r,{into:f},x.a.createElement(Oi,null),x.a.createElement("div",{className:I()(Pi["c-modal-container"],j)},x.a.createElement(hr,{onEscape:i?a:void 0,className:g},x.a.createElement("div",{className:I()(Pi["c-modal-wrapper"],P()({},Pi["c-modal-wrapper--fullscreen"],y),m),onClick:i?this.handleOutsideClick:void 0},x.a.createElement("div",E()({className:I()(Pi["c-modal"],Pi["c-modal--".concat(p)],(e={},P()(e,Pi["c-modal--overflowHidden"],u),P()(e,Pi["c-modal--".concat(v,"-spacing")],v),P()(e,Pi["c-modal--fullscreen"],y),P()(e,Pi["c-modal--closable"],i),e),c),style:R,role:"dialog","aria-modal":"true","aria-labelledby":o?A:null},C),i&&x.a.createElement(Vr,{className:I()(s,P()({},Pi["c-modal-close--notitle"],!o)),onClick:a,color:l}),o&&x.a.createElement(Lr,{title:o,id:A}),r&&x.a.createElement(Ci,null,r),n,b&&w||k&&O?x.a.createElement(Jr,null,x.a.createElement(Kr,{primaryText:b,primaryAction:w,primaryType:_,secondaryText:k,secondaryAction:O,secondaryType:S})):null)))))}}]),n}(_.Component);Ti.propTypes={title:R.a.node,description:R.a.node,secondaryType:R.a.string,secondaryText:R.a.string,secondaryAction:R.a.func,primaryType:R.a.string,primaryText:R.a.string,primaryAction:R.a.func,closable:R.a.bool,overflowHidden:R.a.bool,className:R.a.string,closeBtnClassName:R.a.string,closeBtnColor:R.a.string,into:R.a.string,size:R.a.oneOf(["xsmall","small","medium","large","xlarge","xxlarge"]),height:R.a.string,width:R.a.string,spacing:R.a.oneOf(["small","large"]),mobileFullscreen:R.a.bool,overlayClassName:R.a.string,wrapperClassName:R.a.string,containerClassName:R.a.string,dismissAction:R.a.func},Ti.defaultProps={primaryType:"regular",secondaryType:"secondary",closable:!0,overflowHidden:!1,size:"small",into:"body",mobileFullscreen:!1},Ur.propTypes={bg:R.a.string.isRequired,logo:R.a.string.isRequired},Lr.propTypes={appIcon:R.a.string,appEditor:R.a.string,appName:R.a.string},Pr.propTypes={iconSrc:R.a.node,iconDest:R.a.node,fixed:R.a.bool};var Ai,Ri=(Ai=[{src:"withCross",dest:"closable"},{src:"crossClassName",dest:"closeBtnClassName"},{src:"crossColor",dest:"closeBtnColor"},{fn:function(e){var t;return e.secondaryAction&&!e.dismissAction?((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ei(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},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,o,i=gr(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.src&&a.dest){var u=a.src,c=a.dest;if(void 0===e[u])continue;(n=n||yr({},e))[c]=e[u],delete n[u],r="`".concat(u,"` is deprecated and has been migrated automatically, you should use `").concat(c,"` now")}else if(a.fn){var s=a.fn(n||e);if(2!==s.length)throw new Error("migrateOption `fn` should return [newProps, msg].");var l=Je()(s,2);n=l[0],r=l[1]}else console.warn("migrateProps option is not valid, valid properties are `src`, `dest`, `fn`. You passed",a);window.SHOW_DEPRECATION_WARNINGS&&r&&(console.warn("Deprecation: ".concat(r)),r=null)}}catch(e){i.e(e)}finally{i.f()}return n||e}(t,Ai);return x.a.createElement(e,n)};return t.displayName=e.displayName||e.name,t})(Ti);Ri.propTypes=Ti.propTypes,Ri.defaultProps=Ti.defaultProps,Object.assign(Ri,{ModalContent:Pr,ModalSection:Ar,ModalFooter:Jr,ModalHeader:Lr,AnimatedContentHeader:Sr,ModalBrandedHeader:Ur,ModalDescription:Ci,ModalBackButton:to});var Di=Ri;function Ii(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ii(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var Mi=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ii(e))&&(r&&(r+=" "),r+=t);return r};function Ni(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 Fi(e,t){if(null==e)return{};var n,r,o=Ni(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zi=n(79),Li=n.n(zi),Ui="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},Bi="object"===("undefined"==typeof window?"undefined":Ui(window))&&"object"===("undefined"==typeof document?"undefined":Ui(document))&&9===document.nodeType;var Wi=n(374);function qi(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,Object(Wi.a)(r.key),r)}}function Hi(e,t,n){return t&&qi(e.prototype,t),n&&qi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qi(e,t){return(Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qi(e,t)}function $i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ji={}.constructor;function Gi(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Gi);if(e.constructor!==Ji)return e;var t={};for(var n in e)t[n]=Gi(e[n]);return t}function Yi(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=Gi(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var Ki=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Xi=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Ki(e[n]," ");else t=Ki(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Zi(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function ea(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function ta(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;!1===n.format&&(i=-1/0);var u=Zi(n),c=u.linebreak,s=u.space;if(e&&i++,a)if(Array.isArray(a))for(var l=0;l<a.length;l++){var f=a[l];for(var p in f){var d=f[p];null!=d&&(r&&(r+=c),r+=ea(p+":"+s+Xi(d)+";",i))}}else for(var h in a){var v=a[h];null!=v&&(r&&(r+=c),r+=ea(h+":"+s+Xi(v)+";",i))}for(var y in t){var g=t[y];null!=g&&"fallbacks"!==y&&(r&&(r+=c),r+=ea(y+":"+s+Xi(g)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r=""+c+r+c),ea(""+e+s+"{"+r,--i)+ea("}",i)):r}var na=/([[\].#*$><+~=|^:(),"'`\s])/g,ra="undefined"!=typeof CSS&&CSS.escape,oa=function(e){return ra?ra(e):e.replace(na,"\\$1")},ia=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var u=i&&a;if(u?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var c=this.options.sheet;return c&&c.attached,this},e}(),aa=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var i=r.selector,a=r.scoped,u=r.sheet,c=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=c($i($i(o)),u),o.selectorText="."+oa(o.id)),o}Vi(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Xi(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?uo({},e,{allowEmpty:!0}):e;return ta(this.selectorText,this.style,n)},Hi(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(ia),ua={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new aa(e,t,n)}},ca={indent:1,children:!0},sa=/@([\w-]+)/,la=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(sa);for(var o in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=ca);var t=Zi(e).linebreak;if(null==e.indent&&(e.indent=ca.indent),null==e.children&&(e.children=ca.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),fa=/@media|@supports\s+/,pa={onCreateRule:function(e,t,n){return fa.test(e)?new la(e,t,n):null}},da={indent:1,children:!0},ha=/@keyframes\s+([\w-]+)/,va=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(ha);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,i=n.sheet,a=n.generateId;for(var u in this.id=!1===o?this.name:oa(a(this,i)),this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(u,t[u],uo({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=da);var t=Zi(e).linebreak;if(null==e.indent&&(e.indent=da.indent),null==e.children&&(e.children=da.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),ya=/@keyframes\s+/,ga=/\$([\w-]+)/g,ma=function(e,t){return"string"==typeof e?e.replace(ga,(function(e,n){return n in t?t[n]:e})):e},ba=function(e,t,n){var r=e[t],o=ma(r,n);o!==r&&(e[t]=o)},wa={onCreateRule:function(e,t,n){return"string"==typeof e&&ya.test(e)?new va(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&ba(e,"animation-name",n.keyframes),"animation"in e&&ba(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return ma(e,r.keyframes);default:return e}}},_a=function(e){function t(){return e.apply(this,arguments)||this}return Vi(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?uo({},e,{allowEmpty:!0}):e;return ta(this.key,this.style,n)},t}(ia),xa={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new _a(e,t,n):null}},ka=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Zi(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=ta(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return ta(this.at,this.style,e)},e}(),Oa=/@font-face/,Sa={onCreateRule:function(e,t,n){return Oa.test(e)?new ka(e,t,n):null}},Ea=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return ta(this.key,this.style,e)},e}(),ja={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Ea(e,t,n):null}},Pa=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=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}(),Ca={"@charset":!0,"@import":!0,"@namespace":!0},Ta=[ua,pa,wa,xa,Sa,ja,{onCreateRule:function(e,t,n){return e in Ca?new Pa(e,t,n):null}}],Aa={process:!0},Ra={force:!0,process:!0},Da=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,i=r.sheet,a=r.jss,u=r.Renderer,c=r.generateId,s=r.scoped,l=uo({classes:this.classes,parent:o,sheet:i,jss:a,Renderer:u,generateId:c,scoped:s,name:e,keyframes:this.keyframes,selector:void 0},n),f=e;e in this.raw&&(f=e+"-d"+this.counter++),this.raw[f]=t,f in this.classes&&(l.selector="."+oa(this.classes[f]));var p=Yi(f,t,l);if(!p)return null;this.register(p);var d=void 0===l.index?this.index.length:l.index;return this.index.splice(d,0,p),p},t.replace=function(e,t,n){var r=this.get(e),o=this.index.indexOf(r);r&&this.remove(r);var i=n;return-1!==o&&(i=uo({},n,{index:o})),this.add(e,t,i)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof aa?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof va&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof aa?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof va&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Aa);var o=this.options,i=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var u=t.style;if(i.onUpdate(n,t,a,r),r.process&&u&&u!==t.style){for(var c in i.onProcessStyle(t.style,t,a),t.style){var s=t.style[c];s!==u[c]&&t.prop(c,s,Ra)}for(var l in u){var f=t.style[l],p=u[l];null==f&&f!==p&&t.prop(l,null,Ra)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=Zi(e).linebreak,i=0;i<this.index.length;i++){var a=this.index[i].toString(e);(a||r)&&(t&&(t+=o),t+=a)}return t},e}(),Ia=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=uo({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Da(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(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)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var o=this.rules.replace(e,t,n);return o&&this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(this.renderer&&(o?r.renderable&&this.renderer.replaceRule(r.renderable,o):this.renderer.deleteRule(r)),o):o:(this.deployed=!1,o)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Ma=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Na=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=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)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Ni(t,["attached"]),o=Zi(r).linebreak,i="",a=0;a<this.registry.length;a++){var u=this.registry[a];null!=n&&u.attached!==n||(i&&(i+=o),i+=u.toString(r))}return i},Hi(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),Fa="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),za="2f1acc6c3a606b082e5eef5e54414ffb";null==Fa[za]&&(Fa[za]=0);var La=Fa[za]++,Ua=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+La+o+t:i+n.key+"-"+La+(o?"-"+o:"")+"-"+t}},Ba=function(e){var t;return function(){return t||(t=e()),t}},Wa=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},qa=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Xi(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var o=r?r.indexOf("!important"):-1,i=o>-1?r.substr(0,o-1):r;e.style.setProperty(t,i,o>-1?"important":"")}}catch(e){return!1}return!0},Ha=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Qa=function(e,t){return e.selectorText=t,e.selectorText===t},Va=Ba((function(){return document.querySelector("head")}));function $a(e){var t=Na.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&&n.renderer)return{parent:n.renderer.element.parentNode,node: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))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=Va(),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(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var Ja=Ba((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Ga=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Ya=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Ka=function(){function e(e){this.getPropertyValue=Wa,this.setProperty=qa,this.removeProperty=Ha,this.setSelector=Qa,this.hasInsertedRules=!1,this.cssRules=[],e&&Na.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=Ja();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=$a(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else Va().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var i=Ya(n,t);if(!1===(o=Ga(n,r.toString({children:!1}),i)))return!1;this.refCssRule(e,i,o)}return this.insertRules(r.rules,o),o}var a=e.toString();if(!a)return!1;var u=Ya(n,t),c=Ga(n,a,u);return!1!==c&&(this.hasInsertedRules=!0,this.refCssRule(e,u,c),c)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Ia&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Xa=0,Za=function(){function e(e){this.id=Xa++,this.version="10.9.2",this.plugins=new Ma,this.options={id:{minify:!1},createGenerateId:Ua,Renderer:Bi?Ka:null,plugins:[]},this.generateId=Ua({minify:!1});for(var t=0;t<Ta.length;t++)this.plugins.use(Ta[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=uo({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Na.index?0:Na.index+1);var r=new Ia(e,uo({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Na.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=uo({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=Yi(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),eu=function(e){return new Za(e)},tu="object"==typeof CSS&&null!=CSS&&"number"in CSS;
|
|
57
57
|
/**
|
|
58
58
|
* A better abstraction over CSS.
|
|
59
59
|
*
|
|
@@ -61,5 +61,5 @@ object-assign
|
|
|
61
61
|
* @website https://github.com/cssinjs/jss
|
|
62
62
|
* @license MIT
|
|
63
63
|
*/
|
|
64
|
-
eu();function nu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=uo({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var ru={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)}},ou="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",iu=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var au=Date.now(),uu="fnValues"+au,cu="fnStyle"+ ++au,su=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Yi(e,{},n);return r[cu]=t,r},onProcessStyle:function(e,t){if(uu in t||cu in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[uu]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[cu];i&&(o.style=i(e)||{});var a=o[uu];if(a)for(var u in a)o.prop(u,a[u](e),r)}}},lu="@global",fu=function(){function e(e,t,n){for(var r in this.type="global",this.at=lu,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),pu=function(){function e(e,t,n){this.type="global",this.at=lu,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,uo({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),du=/\s*,\s*/g;function hu(e,t){for(var n=e.split(du),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}var vu=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===lu)return new fu(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new pu(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,o=r?r[lu]:null;if(o){for(var i in o)t.addRule(i,o[i],uo({},n,{selector:hu(i,e.selector)}));delete r[lu]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var o in r)if("@"===o[0]&&o.substr(0,lu.length)===lu){var i=hu(o.substr(lu.length),e.selector);t.addRule(i,r[o],uo({},n,{selector:i})),delete r[o]}}(e,t))}}},yu=/\s*,\s*/g,gu=/&/g,mu=/\$([\w-]+)/g;var bu=function(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?o.selector:r}}function t(e,t){for(var n=t.split(yu),r=e.split(yu),o="",i=0;i<n.length;i++)for(var a=n[i],u=0;u<r.length;u++){var c=r[u];o&&(o+=", "),o+=-1!==c.indexOf("&")?c.replace(gu,a):a+" "+c}return o}function n(e,t,n){if(n)return uo({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=uo({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,i){if("style"!==o.type)return r;var a,u,c=o,s=c.options.parent;for(var l in r){var f=-1!==l.indexOf("&"),p="@"===l[0];if(f||p){if(a=n(c,s,a),f){var d=t(l,c.selector);u||(u=e(s,i)),d=d.replace(mu,u);var h=c.key+"-"+l;"replaceRule"in s?s.replaceRule(h,r[l],uo({},a,{selector:d})):s.addRule(h,r[l],uo({},a,{selector:d}))}else p&&s.addRule(l,{},a).addRule(c.key,r[l],{selector:c.selector});delete r[l]}}return r}}},wu=/[A-Z]/g,_u=/^ms-/,xu={};function ku(e){return"-"+e.toLowerCase()}var Ou=function(e){if(xu.hasOwnProperty(e))return xu[e];var t=e.replace(wu,ku);return xu[e]=_u.test(t)?"-"+t:t};function Su(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Ou(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Su):t.fallbacks=Su(e.fallbacks)),t}var Eu=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Su(e[t]);return e}return Su(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Ou(t);return t===r?e:(n.prop(r,e),null)}}},ju=tu&&CSS?CSS.px:"px",Pu=tu&&CSS?CSS.ms:"ms",Cu=tu&&CSS?CSS.percent:"%";function Tu(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 Au=Tu({"animation-delay":Pu,"animation-duration":Pu,"background-position":ju,"background-position-x":ju,"background-position-y":ju,"background-size":ju,border:ju,"border-bottom":ju,"border-bottom-left-radius":ju,"border-bottom-right-radius":ju,"border-bottom-width":ju,"border-left":ju,"border-left-width":ju,"border-radius":ju,"border-right":ju,"border-right-width":ju,"border-top":ju,"border-top-left-radius":ju,"border-top-right-radius":ju,"border-top-width":ju,"border-width":ju,"border-block":ju,"border-block-end":ju,"border-block-end-width":ju,"border-block-start":ju,"border-block-start-width":ju,"border-block-width":ju,"border-inline":ju,"border-inline-end":ju,"border-inline-end-width":ju,"border-inline-start":ju,"border-inline-start-width":ju,"border-inline-width":ju,"border-start-start-radius":ju,"border-start-end-radius":ju,"border-end-start-radius":ju,"border-end-end-radius":ju,margin:ju,"margin-bottom":ju,"margin-left":ju,"margin-right":ju,"margin-top":ju,"margin-block":ju,"margin-block-end":ju,"margin-block-start":ju,"margin-inline":ju,"margin-inline-end":ju,"margin-inline-start":ju,padding:ju,"padding-bottom":ju,"padding-left":ju,"padding-right":ju,"padding-top":ju,"padding-block":ju,"padding-block-end":ju,"padding-block-start":ju,"padding-inline":ju,"padding-inline-end":ju,"padding-inline-start":ju,"mask-position-x":ju,"mask-position-y":ju,"mask-size":ju,height:ju,width:ju,"min-height":ju,"max-height":ju,"min-width":ju,"max-width":ju,bottom:ju,left:ju,top:ju,right:ju,inset:ju,"inset-block":ju,"inset-block-end":ju,"inset-block-start":ju,"inset-inline":ju,"inset-inline-end":ju,"inset-inline-start":ju,"box-shadow":ju,"text-shadow":ju,"column-gap":ju,"column-rule":ju,"column-rule-width":ju,"column-width":ju,"font-size":ju,"font-size-delta":ju,"letter-spacing":ju,"text-decoration-thickness":ju,"text-indent":ju,"text-stroke":ju,"text-stroke-width":ju,"word-spacing":ju,motion:ju,"motion-offset":ju,outline:ju,"outline-offset":ju,"outline-width":ju,perspective:ju,"perspective-origin-x":Cu,"perspective-origin-y":Cu,"transform-origin":Cu,"transform-origin-x":Cu,"transform-origin-y":Cu,"transform-origin-z":Cu,"transition-delay":Pu,"transition-duration":Pu,"vertical-align":ju,"flex-basis":ju,"shape-margin":ju,size:ju,gap:ju,grid:ju,"grid-gap":ju,"row-gap":ju,"grid-row-gap":ju,"grid-column-gap":ju,"grid-template-rows":ju,"grid-template-columns":ju,"grid-auto-rows":ju,"grid-auto-columns":ju,"box-shadow-x":ju,"box-shadow-y":ju,"box-shadow-blur":ju,"box-shadow-spread":ju,"font-line-height":ju,"text-shadow-x":ju,"text-shadow-y":ju,"text-shadow-blur":ju});function Ru(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ru(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Ru(o,t[o],n);else for(var i in t)t[i]=Ru(e+"-"+i,t[i],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Au[e];return!a||0===t&&a===ju?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}var Du=function(e){void 0===e&&(e={});var t=Tu(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ru(r,e[r],t);return e},onChangeValue:function(e,n){return Ru(n,e,t)}}},Iu="",Mu="",Nu="",Fu="",zu=Bi&&"ontouchstart"in document.documentElement;if(Bi){var Lu={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Uu=document.createElement("p").style;for(var Bu in Lu)if(Bu+"Transform"in Uu){Iu=Bu,Mu=Lu[Bu];break}"Webkit"===Iu&&"msHyphens"in Uu&&(Iu="ms",Mu=Lu.ms,Fu="edge"),"Webkit"===Iu&&"-apple-trailing-word"in Uu&&(Nu="apple")}var Wu=Iu,qu=Mu,Hu=Nu,Qu=Fu,Vu=zu;var $u={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Wu?"-webkit-"+e:qu+e)}},Ju={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Wu?qu+"print-"+e:e)}},Gu=/[-\s]+(.)?/g;function Yu(e,t){return t?t.toUpperCase():""}function Ku(e){return e.replace(Gu,Yu)}function Xu(e){return Ku("-"+e)}var Zu,ec={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Wu){if(Ku("mask-image")in t)return e;if(Wu+Xu("mask-image")in t)return qu+e}return e}},tc={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Hu||Vu?e:qu+e)}},nc={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:qu+e)}},rc={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:qu+e)}},oc={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Wu||"ms"===Wu&&"edge"!==Qu?qu+e:e)}},ic={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Wu||"ms"===Wu||"apple"===Hu?qu+e:e)}},ac={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Wu?"WebkitColumn"+Xu(e)in t&&qu+"column-"+e:"Moz"===Wu&&("page"+Xu(e)in t&&"page-"+e))}},uc={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Wu)return e;var n=e.replace("-inline","");return Wu+Xu(n)in t&&qu+n}},cc={supportedProperty:function(e,t){return Ku(e)in t&&e}},sc={supportedProperty:function(e,t){var n=Xu(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Wu+n in t?qu+e:"Webkit"!==Wu&&"Webkit"+n in t&&"-webkit-"+e}},lc={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Wu?""+qu+e:e)}},fc={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Wu?qu+"scroll-chaining":e)}},pc={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},dc={supportedProperty:function(e,t){var n=pc[e];return!!n&&(Wu+Xu(n)in t&&qu+n)}},hc={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},vc=Object.keys(hc),yc=function(e){return qu+e},gc=[$u,Ju,ec,tc,nc,rc,oc,ic,ac,uc,cc,sc,lc,fc,dc,{supportedProperty:function(e,t,n){var r=n.multiple;if(vc.indexOf(e)>-1){var o=hc[e];if(!Array.isArray(o))return Wu+Xu(o)in t&&qu+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(Wu+Xu(o[0])in t))return!1;return o.map(yc)}return!1}}],mc=gc.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),bc=gc.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Qo(t.noPrefill)),e}),[]),wc={};if(Bi){Zu=document.createElement("p");var _c=window.getComputedStyle(document.documentElement,"");for(var xc in _c)isNaN(xc)||(wc[_c[xc]]=_c[xc]);bc.forEach((function(e){return delete wc[e]}))}function kc(e,t){if(void 0===t&&(t={}),!Zu)return e;if(null!=wc[e])return wc[e];"transition"!==e&&"transform"!==e||(t[e]=e in Zu.style);for(var n=0;n<mc.length&&(wc[e]=mc[n](e,Zu.style,t),!wc[e]);n++);try{Zu.style[e]=""}catch(e){return!1}return wc[e]}var Oc,Sc={},Ec={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},jc=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Pc(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?kc(t):", "+kc(n);return r||(t||n)}function Cc(e,t){var n=t;if(!Oc||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Sc[r])return Sc[r];try{Oc.style[e]=n}catch(e){return Sc[r]=!1,!1}if(Ec[e])n=n.replace(jc,Pc);else if(""===Oc.style[e]&&("-ms-flex"===(n=qu+n)&&(Oc.style[e]="-ms-flexbox"),Oc.style[e]=n,""===Oc.style[e]))return Sc[r]=!1,!1;return Oc.style[e]="",Sc[r]=n,Sc[r]}Bi&&(Oc=document.createElement("p"));var Tc=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,i=kc(n);i&&i!==n&&(o=!0);var a=!1,u=Cc(i,Xi(r));u&&u!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=u||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===Wu?n:"@"+qu+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Cc(t,Xi(e))||e}}};var Ac=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i<o.length;i++)r[o[i]]=t[o[i]];return r}}};function Rc(){return{plugins:[su(),vu(),bu(),Eu(),Du(),"undefined"==typeof window?null:Tc(),Ac()]}}var Dc=eu(Rc()),Ic={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,u=""===a?"":"".concat(a,"-"),c=0,s=function(){return c+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==iu.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(u).concat(r,"-").concat(e.key);return t.options.theme[ou]&&""===a?"".concat(i,"-").concat(s()):i}return"".concat(u).concat(o).concat(s())}}(),jss:Dc,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Mc=x.a.createContext(Ic);var Nc=-1e9;function Fc(){return Nc+=1}function zc(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var i=n.overrides[r],a=uo({},o);return Object.keys(i).forEach((function(e){a[e]=lo(a[e],i[e])})),a},options:{}}}var Lc={};function Uc(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=nu({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Bc(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,i=e.stylesCreator,a=e.name;if(!o.disableGeneration){var u=ru.get(o.sheetsManager,i,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},ru.set(o.sheetsManager,i,r,u));var c=uo({},i.options,o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var s=o.sheetsRegistry;if(0===u.refs){var l;o.sheetsCache&&(l=ru.get(o.sheetsCache,i,r));var f=i.create(r,a);l||((l=o.jss.createStyleSheet(f,uo({link:!1},c))).attach(),o.sheetsCache&&ru.set(o.sheetsCache,i,r,l)),s&&s.add(l),u.staticSheet=l,u.dynamicStyles=function e(t){var n=null;for(var r in t){var o=t[r],i=typeof o;if("function"===i)n||(n={}),n[r]=o;else if("object"===i&&null!==o&&!Array.isArray(o)){var a=e(o);a&&(n||(n={}),n[r]=a)}}return n}(f)}if(u.dynamicStyles){var p=o.jss.createStyleSheet(u.dynamicStyles,uo({link:!0},c));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=nu({baseClasses:u.staticSheet.classes,newClasses:p.classes}),s&&s.add(p)}else n.classes=u.staticSheet.classes;u.refs+=1}}function Wc(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function qc(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=ru.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(ru.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function Hc(e,t){var n,r=x.a.useRef([]),o=x.a.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),x.a.useEffect((function(){return function(){n&&n()}}),[o])}function Qc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,o=t.Component,i=t.defaultTheme,a=void 0===i?Lc:i,u=Fi(t,["name","classNamePrefix","Component","defaultTheme"]),c=zc(e),s=n||r||"makeStyles";c.options={index:Fc(),name:n,meta:s,classNamePrefix:s};var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ro()||a,r=uo({},x.a.useContext(Mc),u),i=x.a.useRef(),s=x.a.useRef();Hc((function(){var o={name:n,state:{},stylesCreator:c,stylesOptions:r,theme:t};return Bc(o,e),s.current=!1,i.current=o,function(){qc(o)}}),[t,c]),x.a.useEffect((function(){s.current&&Wc(i.current,e),s.current=!0}));var l=Uc(i.current,e.classes,o);return l};return l}function Vc(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!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}var $c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,o=t.withTheme,i=void 0!==o&&o,a=t.name,u=Fi(t,["defaultTheme","withTheme","name"]);var c=a,s=Qc(e,uo({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:c},u)),l=x.a.forwardRef((function(e,t){e.classes;var o,u=e.innerRef,c=Fi(e,["classes","innerRef"]),l=s(uo({},n.defaultProps,e)),f=c;return("string"==typeof a||i)&&(o=ro()||r,a&&(f=Vc({theme:o,name:a,props:c})),i&&!f.theme&&(f.theme=o)),x.a.createElement(n,uo({ref:u||t,classes:l},f))}));return Li()(l,n),l}};var Jc=function(e,t){return $c(e,fo({defaultTheme:li},t))};function Gc(e){if("string"!=typeof e)throw new Error(yo(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Yc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Kc=_.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,u=void 0===a?"initial":a,c=e.component,s=e.display,l=void 0===s?"initial":s,f=e.gutterBottom,p=void 0!==f&&f,d=e.noWrap,h=void 0!==d&&d,v=e.paragraph,y=void 0!==v&&v,g=e.variant,m=void 0===g?"body1":g,b=e.variantMapping,w=void 0===b?Yc:b,x=ao(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),k=c||(y?"p":w[m]||Yc[m])||"span";return _.createElement(k,fo({className:Mi(o.root,i,"inherit"!==m&&o[m],"initial"!==u&&o["color".concat(Gc(u))],h&&o.noWrap,p&&o.gutterBottom,y&&o.paragraph,"inherit"!==r&&o["align".concat(Gc(r))],"initial"!==l&&o["display".concat(Gc(l))]),ref:t},x))})),Xc=Jc((function(e){return{root:{margin:0},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},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(Kc),Zc=["color","variant","children"],es=Object(_.forwardRef)((function(e,t){var n=e.color,r=e.variant,o=e.children,i=T()(e,Zc),a=n||("caption"===r?"textSecondary":"textPrimary");return x.a.createElement(Xc,E()({ref:t,variant:r,color:a},i),o)})),ts="styles__c-spinner___1snK7",ns="styles__c-spinner--middle___RwyII",rs="styles__c-spinner--nomargin___13JyW",os=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 x.a.createElement("div",{className:I()(ts,(t={},P()(t,ns,o),P()(t,rs,i),t),c)},x.a.createElement(U,{icon:ke,color:a,spin:!0,size:s}),r&&x.a.createElement(es,{variant:"body1",color:"textSecondary",component:"p"},n("loading.".concat(r))))};os.propTypes={loadingType:R.a.string,middle:R.a.bool,noMargin:R.a.bool,color:R.a.string,size:R.a.oneOf(["tiny","small","medium","large","xlarge","xxlarge"]),className:R.a.string},os.defaultProps={loadingType:"",middle:!1,noMargin:!1,color:"var(--spinnerColor)",size:"medium",className:""};var is=Object(O.translate)()(os);function as(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 us=function(e){p()(n,e);var t=as(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),m()(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(me.c)(),o}return c()(n,[{key:"componentDidMount",value:function(){this.toggle()}},{key:"render",value:function(){var e=this,t=this.state.isLoading;return x.a.createElement("div",null,x.a.createElement(Di,{secondaryAction:this.props.onClose,className:"coz-support-modal",into:"#cozy-bar-modal-dom-place",closeBtnClassName:"coz-support-modal-close"},x.a.createElement(Pr,{className:"coz-support-modal-wrapper u-mt-1"},x.a.createElement("div",{className:"coz-support-modal-content"},t&&x.a.createElement(is,{size:"xxlarge",middle:!0}),x.a.createElement("div",{className:"coz-support-intent-wrapper".concat(t?" coz-hidden":""),ref:function(t){e.intentWrapperRef=t}})))))}}]),n}(_.Component);function cs(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 ss(e){return x.a.createElement("svg",w()({width:16,height:16},e),x.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 ls})),n.d(t,"mapStateToProps",(function(){return fs})),n.d(t,"mapDispatchToProps",(function(){return ps}));var ls=function(e){p()(n,e);var t=cs(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(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})}})),m()(l()(r),"toggleClaudy",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.claudyEnabled){var t=r.state.claudyOpened;if(e&&!t)return r.setState({claudyFired:!0});r.state.claudyFired&&r.setState({claudyFired:!1}),r.setState({claudyOpened:!t})}})),m()(l()(r),"toggleSupport",(function(){var e=r.state.supportDisplayed;r.setState({supportDisplayed:!e})})),m()(l()(r),"renderLeft",(function(){var e=r.props,t=e.t,n=e.isPublic,o=e.webviewContext;return Object(B.isFlagshipApp)()||q()("flagship.debug")?x.a.createElement(xe,{webviewContext:o}):n?null:x.a.createElement("button",{type:"button",className:"coz-bar-btn coz-bar-burger",onClick:r.toggleDrawer,"data-tutorial":"apps-mobile"},x.a.createElement(U,{icon:ss,width:16,height:16,color:"currentColor"}),x.a.createElement("span",{className:"coz-bar-hidden"},t("drawer")))})),m()(l()(r),"renderRight",(function(){return r.props.isPublic?null:x.a.createElement(an,{toggleSupport:r.toggleSupport,onLogOut:r.props.onLogOut})})),r.state={claudyFired:!1,claudyOpened:!1,drawerVisible:!1,supportDisplayed:!1,searchBarEnabled:e.isDrive&&!e.isPublic&&!Object(B.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(){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:"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 x.a.createElement(dn,{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=this.props,s=c.theme,l=c.themeOverrides,f=c.barLeft,p=c.barRight,d=c.barCenter,h=c.barSearch,v=c.claudyEnabled,y=c.onDrawer,g=c.isPublic,m=c.onLogOut,b=c.userActionRequired,w=l.primaryColor,_=l.primaryContrastTextColor,k=w?{"--cozBarThemePrimaryColor":w}:{},O=_?{"--cozBarThemePrimaryContrastTextColor":_}:{},S=o()({},k,O);return x.a.createElement("div",{className:"coz-bar-wrapper coz-theme-".concat(s),style:S},x.a.createElement("div",{id:"cozy-bar-modal-dom-place"}),x.a.createElement("div",{className:"coz-bar-container"},f||this.renderLeft(),d||this.renderCenter(),x.a.createElement("div",{className:"u-flex-grow"},h||(a?x.a.createElement(Sn,null):null)),p||this.renderRight(),g?null:x.a.createElement(Ht,{visible:i,onClose:this.toggleDrawer,onClaudy:v&&function(){return e.toggleClaudy(!0)}||!1,isClaudyLoading:n,drawerListener:function(){return y(i)},toggleSupport:this.toggleSupport,onLogOut:m}),v&&x.a.createElement(jn,{claudyFired:n,onToggle:function(){return e.toggleClaudy(!1)},opened:r}),u&&x.a.createElement(us,{onClose:this.toggleSupport})),b&&x.a.createElement(Fe,b))}}]),n}(_.Component),fs=function(e){return{theme:Object(tt.j)(e).name,themeOverrides:Object(tt.j)(e).overrides,barLeft:Object(tt.e)(e,"left"),barRight:Object(tt.e)(e,"right"),barCenter:Object(tt.e)(e,"center"),barSearch:Object(tt.e)(e,"search"),isDrive:Object(tt.m)(e,{slug:"drive"}),claudyEnabled:Object(tt.z)(e),hasFetchedApps:Object(tt.l)(e),webviewContext:Object(tt.k)(e)}},ps=function(e){return{fetchApps:function(){return e(Object(tt.a)())},fetchContext:function(){return e(Object(tt.b)())},fetchSettingsData:function(t){return e(Object(tt.c)(t))}}};t.default=Object(O.translate)()(Object(k.connect)(fs,ps)(ls))},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)};function f(){return(f=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)}function p(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}var d=n(79),h=n.n(d),v=n(123),y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,g=[],m=[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 _(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function x(e,t,n,r,o,i,a,u,c,s){if(e){var l=!1,f=null,p=function(){if(!l){var e,n,p=t.getState();try{e=r(p,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=p,n.trySubscribe(),p();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var k=function(){return[null,0]};function O(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,d=n.renderCountProp,y=void 0===d?void 0:d,O=n.shouldHandleStateChanges,S=void 0===O||O,E=n.storeKey,j=void 0===E?"store":E,P=(n.withRef,n.forwardRef),C=void 0!==P&&P,T=n.context,A=void 0===T?i:T,R=p(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),D=A;return function(t){var n=t.displayName||t.name||"Component",i=u(n),a=f({},R,{getDisplayName:u,methodName:l,renderCountProp:y,shouldHandleStateChanges:S,storeKey:j,displayName:i,wrappedComponentName:n,WrappedComponent:t}),c=R.pure;var d=c?r.useMemo:function(e){return e()};function O(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=p(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(v.isContextConsumer)(o.a.createElement(u.Consumer,null))?u:D}),[u,D]),y=Object(r.useContext)(h),O=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(y)&&Boolean(y.store);var E=O?n.store:y.store,j=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(E)}),[E]),P=Object(r.useMemo)((function(){if(!S)return m;var e=new s(E,O?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[E,O,y]),C=P[0],T=P[1],A=Object(r.useMemo)((function(){return O?y:f({},y,{subscription:C})}),[O,y,C]),R=Object(r.useReducer)(b,g,k),I=R[0][0],M=R[1];if(I&&I.error)throw I.error;var N=Object(r.useRef)(),F=Object(r.useRef)(l),z=Object(r.useRef)(),L=Object(r.useRef)(!1),U=d((function(){return z.current&&l===F.current?z.current:j(E.getState(),l)}),[E,I,l]);w(_,[F,N,L,l,U,z,T]),w(x,[S,E,C,j,F,N,L,z,T,M],[E,C,j]);var B=Object(r.useMemo)((function(){return o.a.createElement(t,f({},U,{ref:c}))}),[c,t,U]);return Object(r.useMemo)((function(){return S?o.a.createElement(h.Provider,{value:A},B):B}),[h,B,A])}var E=c?o.a.memo(O):O;if(E.WrappedComponent=t,E.displayName=i,C){var P=o.a.forwardRef((function(e,t){return o.a.createElement(E,f({},e,{forwardedRef:t}))}));return P.displayName=i,P.WrappedComponent=t,h()(P,t)}return h()(E,t)}}function S(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function E(e,t){if(S(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])||!S(e[n[o]],t[n[o]]))return!1;return!0}var j=n(35);function P(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function C(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function T(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=C(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=C(o),o=r(t,n)),o},r}}var A=[function(e){return"function"==typeof e?T(e):void 0},function(e){return e?void 0:P((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?P((function(t){return Object(j.bindActionCreators)(e,t)})):void 0}];var R=[function(e){return"function"==typeof e?T(e):void 0},function(e){return e?void 0:P((function(){return{}}))}];function D(e,t,n){return f({},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 D}}];function M(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function N(e,t,n,r,o){var i,a,u,c,s,l=o.areStatesEqual,f=o.areOwnPropsEqual,p=o.areStatePropsEqual,d=!1;function h(o,d){var h,v,y=!f(d,a),g=!l(o,i);return i=o,a=d,y&&g?(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)):g?(h=e(i,a),v=!p(h,u),u=h,v&&(s=n(u,c,a)),s):s}return function(o,l){return d?h(o,l):(u=e(i=o,a=l),c=t(r,a),s=n(u,c,a),d=!0,s)}}function F(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=p(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),u=r(e,i),c=o(e,i);return(i.pure?N:M)(a,u,c,e,i)}function z(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}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?O:n,o=t.mapStateToPropsFactories,i=void 0===o?R:o,a=t.mapDispatchToPropsFactories,u=void 0===a?A:a,c=t.mergePropsFactories,s=void 0===c?I:c,l=t.selectorFactory,d=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,v=void 0===h?L:h,y=a.areOwnPropsEqual,g=void 0===y?E:y,m=a.areStatePropsEqual,b=void 0===m?E:m,w=a.areMergedPropsEqual,_=void 0===w?E:w,x=p(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=z(e,i,"mapStateToProps"),O=z(t,u,"mapDispatchToProps"),S=z(n,s,"mergeProps");return r(d,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:O,initMergeProps:S,pure:l,areStatesEqual:v,areOwnPropsEqual:g,areStatePropsEqual:b,areMergedPropsEqual:_},x))}}var B=U();function W(){return Object(r.useContext)(i)}function q(e){void 0===e&&(e=i);var t=e===i?W:function(){return Object(r.useContext)(e)};return function(){return t().store}}var H=q();function Q(e){void 0===e&&(e=i);var t=e===i?H:q(e);return function(){return t().dispatch}}var V=Q(),$=function(e,t){return e===t};function J(e){void 0===e&&(e=i);var t=e===i?W:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=$);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 G,Y=J(),K=n(121);n.d(t,"Provider",(function(){return l})),n.d(t,"connectAdvanced",(function(){return O})),n.d(t,"ReactReduxContext",(function(){return i})),n.d(t,"connect",(function(){return B})),n.d(t,"batch",(function(){return K.unstable_batchedUpdates})),n.d(t,"useDispatch",(function(){return V})),n.d(t,"createDispatchHook",(function(){return Q})),n.d(t,"useSelector",(function(){return Y})),n.d(t,"createSelectorHook",(function(){return J})),n.d(t,"useStore",(function(){return H})),n.d(t,"createStoreHook",(function(){return q})),n.d(t,"shallowEqual",(function(){return E})),G=K.unstable_batchedUpdates,a=G},function(e,t,n){"use strict";n.r(t);var r=n(16),o=n.n(r),i=n(35),a=n(6),u=n.n(a),c=n(122),s=n(100),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)}}},p=n(227),d="persist/REHYDRATE",h="persist/REGISTER",v="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 g(e,t,n,r){r.debug;var o=y({},n);return e&&"object"===(void 0===e?"undefined":v(e))&&Object.keys(e).forEach((function(r){"_persist"!==r&&t[r]===n[r]&&(o[r]=e[r])})),o}function m(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,p=null;function d(){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]})),p=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(d,o)),c=e},flush:function(){for(;0!==l.length;)d();return p||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}:_);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 _(e){return JSON.parse(e)}function x(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 O(e,t){var n=void 0!==e.version?e.version:-1,r=(e.debug,void 0===e.stateReconciler?g: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 p=l||{},h=p._persist,v=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}(p,["_persist"]);if("persist/PERSIST"===f.type){var y=!1,g=function(t,n){y||(f.rehydrate(e.key,t,n),y=!0)};if(i&&setTimeout((function(){!y&&g(void 0,new Error('redux-persist: persist timed out for persist key "'+e.key+'"'))}),i),c=!1,a||(a=m(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){g(e)}),(function(e){g(void 0,e)}))}),(function(e){g(void 0,e)})),k({},t(v,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,x)}(e)),k({},t(v,f),{_persist:h});if("persist/FLUSH"===f.type)return f.result(a&&a.flush()),k({},t(v,f),{_persist:h});if("persist/PAUSE"===f.type)c=!0;else if(f.type===d){if(u)return k({},v,{_persist:k({},h,{rehydrated:!0})});if(f.key===e.key){var b=t(v,f),w=f.payload,_=!1!==r&&void 0!==w?r(w,l,b,e):b,O=k({},_,{_persist:k({},h,{rehydrated:!0})});return s(O)}}if(!h)return t(l,f);var S=t(v,f);return S===v?l:(S._persist=h,s(S))}}var S="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},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 j(e,t,n,r){r.debug;var o=E({},n);return e&&"object"===(void 0===e?"undefined":S(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":S(i))?o[r]=e[r]:o[r]=E({},o[r],e[r])))})),o}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 C(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 T={registry:[],bootstrapped:!1},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=arguments[1];switch(t.type){case h:return P({},e,{registry:[].concat(C(e.registry),[t.key])});case d:var n=e.registry.indexOf(t.key),r=[].concat(C(e.registry));return r.splice(n,1),P({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var R=n(12),D=n(370),I=n(371),M=n.n(I),N=n(372),F=n(161),z=n(38),L=n.n(z);n.d(t,"createStore",(function(){return $}));var U,B,W={storage:M.a,key:"cozy-bar",whitelist:N},q=Object(D.createLogger)({logger:F.a}),H=(U=W,B=o()({},R.t),U.stateReconciler=void 0===U.stateReconciler?j:U.stateReconciler,O(U,Object(i.combineReducers)(B))),Q=[f,p.default];L()("bar.debug")&&Q.push(q);var V,$=function(){var e,t,n,r,o,a,u,c;return V=Object(i.createStore)(H,i.applyMiddleware.apply(null,Q)),e=V,r=n||!1,o=Object(i.createStore)(A,T,t?t.enhancer:void 0),a=function(e){o.dispatch({type:h,key:e})},u=function(t,n,i){var a={type:d,payload:n,err:i,key:t};e.dispatch(a),o.dispatch(a),r&&c.getState().bootstrapped&&(r(),r=!1)},(c=P({},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(),V};t.default=function(){return V||(V=$()),V}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),i=n(8),a=n.n(i),u=n(19),c=n(29),s=n(12),l=n(3),f=n.n(l),p=n(9),d=n.n(p),h=n(11),v=n.n(h),y=n(14),g=n.n(y),m=n(7),b=n.n(m),w=n(0),_=n.n(w),x=["left","center","right","search"],k=function(e){return e[0].toUpperCase()+e.slice(1)},O=function(e){return"setBar".concat(k(e))},S=function(e){return"Bar".concat(k(e))};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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g()(this,n)}}var j=0,P=function(e){var t={};return x.forEach((function(n){t[O(n)]=function(t){return e.dispatch(Object(s.u)(n,"string"==typeof(r=t)?_.a.createElement("span",{dangerouslySetInnerHTML:{__html:r}}):r,"js"));var r},t[S(n)]=function(e,t){return function(n){v()(o,n);var r=E(o);function o(){return f()(this,o),r.apply(this,arguments)}return d()(o,[{key:"componentDidMount",value:function(){this.componentId=j++,this.setContent(this.props.children)}},{key:"setContent",value:function(n){try{n=_.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},C=function(e){console.error("You tried to use the CozyBar API (".concat(e,") but the CozyBar is not initialised yet via cozy.bar.init(...)."))},T=function(e,t){return function(){if(e[t])return e[t].apply(e,arguments);C(t)}},A=function(){var e=document.querySelector("[role=application]");return e&&e.dataset?e.dataset:{}},R=function(){var e=document.querySelector('link[rel="icon"][sizes^="32"]');return null!==e?e.getAttribute("href"):"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},D=function(){return A().cozyAppNamePrefix||null},I=function(){return A().cozyAppSlug||null},M=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}}},N=n(361),F=n(362),z=n(363),L=n(97);n.d(t,"init",(function(){return Q})),n.d(t,"version",(function(){return oe})),n.d(t,"setBarCenter",(function(){return J})),n.d(t,"setBarLeft",(function(){return G})),n.d(t,"setBarRight",(function(){return Y})),n.d(t,"setBarSearch",(function(){return K})),n.d(t,"BarLeft",(function(){return ee})),n.d(t,"BarRight",(function(){return Z})),n.d(t,"BarCenter",(function(){return X})),n.d(t,"BarSearch",(function(){return te})),n.d(t,"setTheme",(function(){return ne})),n.d(t,"setWebviewContext",(function(){return re})),n.d(t,"updateAccessToken",(function(){return V})),n.d(t,"setLocale",(function(){return s.w}));var U={en:N,fr:F,es:z},B=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)}},W=function(e,t){var r=n(0),o=n(121).render,i=n(51),a=i.connect,u=i.Provider,c=n(28).default,l=n(755).default,f=n(31).CozyProvider,p=t.cozyClient,d=a((function(e){return{lang:Object(s.g)(e)}}))(c),h=r.createElement(u,{store:t.reduxStore},r.createElement(L.WebviewIntentProvider,null,r.createElement(d,{dictRequire:function(e){return U[e]}},p?r.createElement(f,{client:p},r.createElement(l,t)):r.createElement(l,t))));return o(h,e),h},q=function(e){var t=e.cozyURL,r=e.token,o=e.isPublic,i={uri:t||function(e){var t=A();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=A();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(31).default;return console.warn("Automatically made cozyClient. Options: ",i),new a(i)},H={},Q=function(){var e=a()(o.a.mark((function e(){var t,r,i,a,u,l,f,p,d,h,v,y,g,m,b,w,_,x,k,O,S,E,j=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=j.length>0&&void 0!==j[0]?j[0]:{},r=t.appName,i=t.appNamePrefix,a=void 0===i?D():i,u=t.appSlug,l=void 0===u?I():u,f=t.lang,p=t.iconPath,d=void 0===p?R():p,h=t.cozyClient,v=t.cozyURL,y=t.token,g=t.replaceTitleOnMobile,m=void 0!==g&&g,b=t.isPublic,w=void 0!==b&&b,_=t.onLogOut,!w&&/^\/public/.test(window.location.pathname)&&(w=!0),h||(h=q({cozyURL:v,token:y,isPublic:w})),x=n(757).default,(k=x()).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)),O=P(k),Object.assign(H,O),S={appName:r,appNamePrefix:a,appSlug:l,cozyClient:h,iconPath:d,replaceTitleOnMobile:m,isPublic:w,onLogOut:_,userActionRequired:M(),reduxStore:k},E=B(S),W(E,S);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=function(e){c.b.updateAccessToken(e)},$=function(e){var t={};x.forEach((function(n){var r=O(n),o=S(n);t[r]=T(e,r),t[o]=function(t){if(e[o])return _.a.createElement(e[o],t);C(o)}}));for(var n=0,r=["setLocale","setTheme","setWebviewContext"];n<r.length;n++){var o=r[n];t[o]=T(e,o)}return t}(H),J=$.setBarCenter,G=$.setBarLeft,Y=$.setBarRight,K=$.setBarSearch,X=$.BarCenter,Z=$.BarRight,ee=$.BarLeft,te=$.BarSearch,ne=$.setTheme,re=$.setWebviewContext,oe="8.11.0"}])}));
|
|
64
|
+
eu();function nu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=uo({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var ru={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)}},ou="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",iu=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var au=Date.now(),uu="fnValues"+au,cu="fnStyle"+ ++au,su=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Yi(e,{},n);return r[cu]=t,r},onProcessStyle:function(e,t){if(uu in t||cu in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[uu]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[cu];i&&(o.style=i(e)||{});var a=o[uu];if(a)for(var u in a)o.prop(u,a[u](e),r)}}},lu="@global",fu=function(){function e(e,t,n){for(var r in this.type="global",this.at=lu,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Da(uo({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),pu=function(){function e(e,t,n){this.type="global",this.at=lu,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,uo({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),du=/\s*,\s*/g;function hu(e,t){for(var n=e.split(du),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}var vu=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===lu)return new fu(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new pu(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,o=r?r[lu]:null;if(o){for(var i in o)t.addRule(i,o[i],uo({},n,{selector:hu(i,e.selector)}));delete r[lu]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var o in r)if("@"===o[0]&&o.substr(0,lu.length)===lu){var i=hu(o.substr(lu.length),e.selector);t.addRule(i,r[o],uo({},n,{selector:i})),delete r[o]}}(e,t))}}},yu=/\s*,\s*/g,gu=/&/g,mu=/\$([\w-]+)/g;var bu=function(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?o.selector:r}}function t(e,t){for(var n=t.split(yu),r=e.split(yu),o="",i=0;i<n.length;i++)for(var a=n[i],u=0;u<r.length;u++){var c=r[u];o&&(o+=", "),o+=-1!==c.indexOf("&")?c.replace(gu,a):a+" "+c}return o}function n(e,t,n){if(n)return uo({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=uo({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,i){if("style"!==o.type)return r;var a,u,c=o,s=c.options.parent;for(var l in r){var f=-1!==l.indexOf("&"),p="@"===l[0];if(f||p){if(a=n(c,s,a),f){var d=t(l,c.selector);u||(u=e(s,i)),d=d.replace(mu,u);var h=c.key+"-"+l;"replaceRule"in s?s.replaceRule(h,r[l],uo({},a,{selector:d})):s.addRule(h,r[l],uo({},a,{selector:d}))}else p&&s.addRule(l,{},a).addRule(c.key,r[l],{selector:c.selector});delete r[l]}}return r}}},wu=/[A-Z]/g,_u=/^ms-/,xu={};function ku(e){return"-"+e.toLowerCase()}var Ou=function(e){if(xu.hasOwnProperty(e))return xu[e];var t=e.replace(wu,ku);return xu[e]=_u.test(t)?"-"+t:t};function Su(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Ou(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Su):t.fallbacks=Su(e.fallbacks)),t}var Eu=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Su(e[t]);return e}return Su(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Ou(t);return t===r?e:(n.prop(r,e),null)}}},ju=tu&&CSS?CSS.px:"px",Pu=tu&&CSS?CSS.ms:"ms",Cu=tu&&CSS?CSS.percent:"%";function Tu(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 Au=Tu({"animation-delay":Pu,"animation-duration":Pu,"background-position":ju,"background-position-x":ju,"background-position-y":ju,"background-size":ju,border:ju,"border-bottom":ju,"border-bottom-left-radius":ju,"border-bottom-right-radius":ju,"border-bottom-width":ju,"border-left":ju,"border-left-width":ju,"border-radius":ju,"border-right":ju,"border-right-width":ju,"border-top":ju,"border-top-left-radius":ju,"border-top-right-radius":ju,"border-top-width":ju,"border-width":ju,"border-block":ju,"border-block-end":ju,"border-block-end-width":ju,"border-block-start":ju,"border-block-start-width":ju,"border-block-width":ju,"border-inline":ju,"border-inline-end":ju,"border-inline-end-width":ju,"border-inline-start":ju,"border-inline-start-width":ju,"border-inline-width":ju,"border-start-start-radius":ju,"border-start-end-radius":ju,"border-end-start-radius":ju,"border-end-end-radius":ju,margin:ju,"margin-bottom":ju,"margin-left":ju,"margin-right":ju,"margin-top":ju,"margin-block":ju,"margin-block-end":ju,"margin-block-start":ju,"margin-inline":ju,"margin-inline-end":ju,"margin-inline-start":ju,padding:ju,"padding-bottom":ju,"padding-left":ju,"padding-right":ju,"padding-top":ju,"padding-block":ju,"padding-block-end":ju,"padding-block-start":ju,"padding-inline":ju,"padding-inline-end":ju,"padding-inline-start":ju,"mask-position-x":ju,"mask-position-y":ju,"mask-size":ju,height:ju,width:ju,"min-height":ju,"max-height":ju,"min-width":ju,"max-width":ju,bottom:ju,left:ju,top:ju,right:ju,inset:ju,"inset-block":ju,"inset-block-end":ju,"inset-block-start":ju,"inset-inline":ju,"inset-inline-end":ju,"inset-inline-start":ju,"box-shadow":ju,"text-shadow":ju,"column-gap":ju,"column-rule":ju,"column-rule-width":ju,"column-width":ju,"font-size":ju,"font-size-delta":ju,"letter-spacing":ju,"text-decoration-thickness":ju,"text-indent":ju,"text-stroke":ju,"text-stroke-width":ju,"word-spacing":ju,motion:ju,"motion-offset":ju,outline:ju,"outline-offset":ju,"outline-width":ju,perspective:ju,"perspective-origin-x":Cu,"perspective-origin-y":Cu,"transform-origin":Cu,"transform-origin-x":Cu,"transform-origin-y":Cu,"transform-origin-z":Cu,"transition-delay":Pu,"transition-duration":Pu,"vertical-align":ju,"flex-basis":ju,"shape-margin":ju,size:ju,gap:ju,grid:ju,"grid-gap":ju,"row-gap":ju,"grid-row-gap":ju,"grid-column-gap":ju,"grid-template-rows":ju,"grid-template-columns":ju,"grid-auto-rows":ju,"grid-auto-columns":ju,"box-shadow-x":ju,"box-shadow-y":ju,"box-shadow-blur":ju,"box-shadow-spread":ju,"font-line-height":ju,"text-shadow-x":ju,"text-shadow-y":ju,"text-shadow-blur":ju});function Ru(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ru(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Ru(o,t[o],n);else for(var i in t)t[i]=Ru(e+"-"+i,t[i],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Au[e];return!a||0===t&&a===ju?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}var Du=function(e){void 0===e&&(e={});var t=Tu(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ru(r,e[r],t);return e},onChangeValue:function(e,n){return Ru(n,e,t)}}},Iu="",Mu="",Nu="",Fu="",zu=Bi&&"ontouchstart"in document.documentElement;if(Bi){var Lu={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Uu=document.createElement("p").style;for(var Bu in Lu)if(Bu+"Transform"in Uu){Iu=Bu,Mu=Lu[Bu];break}"Webkit"===Iu&&"msHyphens"in Uu&&(Iu="ms",Mu=Lu.ms,Fu="edge"),"Webkit"===Iu&&"-apple-trailing-word"in Uu&&(Nu="apple")}var Wu=Iu,qu=Mu,Hu=Nu,Qu=Fu,Vu=zu;var $u={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Wu?"-webkit-"+e:qu+e)}},Ju={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Wu?qu+"print-"+e:e)}},Gu=/[-\s]+(.)?/g;function Yu(e,t){return t?t.toUpperCase():""}function Ku(e){return e.replace(Gu,Yu)}function Xu(e){return Ku("-"+e)}var Zu,ec={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Wu){if(Ku("mask-image")in t)return e;if(Wu+Xu("mask-image")in t)return qu+e}return e}},tc={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Hu||Vu?e:qu+e)}},nc={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:qu+e)}},rc={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:qu+e)}},oc={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Wu||"ms"===Wu&&"edge"!==Qu?qu+e:e)}},ic={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Wu||"ms"===Wu||"apple"===Hu?qu+e:e)}},ac={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Wu?"WebkitColumn"+Xu(e)in t&&qu+"column-"+e:"Moz"===Wu&&("page"+Xu(e)in t&&"page-"+e))}},uc={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Wu)return e;var n=e.replace("-inline","");return Wu+Xu(n)in t&&qu+n}},cc={supportedProperty:function(e,t){return Ku(e)in t&&e}},sc={supportedProperty:function(e,t){var n=Xu(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Wu+n in t?qu+e:"Webkit"!==Wu&&"Webkit"+n in t&&"-webkit-"+e}},lc={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Wu?""+qu+e:e)}},fc={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Wu?qu+"scroll-chaining":e)}},pc={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},dc={supportedProperty:function(e,t){var n=pc[e];return!!n&&(Wu+Xu(n)in t&&qu+n)}},hc={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},vc=Object.keys(hc),yc=function(e){return qu+e},gc=[$u,Ju,ec,tc,nc,rc,oc,ic,ac,uc,cc,sc,lc,fc,dc,{supportedProperty:function(e,t,n){var r=n.multiple;if(vc.indexOf(e)>-1){var o=hc[e];if(!Array.isArray(o))return Wu+Xu(o)in t&&qu+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(Wu+Xu(o[0])in t))return!1;return o.map(yc)}return!1}}],mc=gc.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),bc=gc.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Qo(t.noPrefill)),e}),[]),wc={};if(Bi){Zu=document.createElement("p");var _c=window.getComputedStyle(document.documentElement,"");for(var xc in _c)isNaN(xc)||(wc[_c[xc]]=_c[xc]);bc.forEach((function(e){return delete wc[e]}))}function kc(e,t){if(void 0===t&&(t={}),!Zu)return e;if(null!=wc[e])return wc[e];"transition"!==e&&"transform"!==e||(t[e]=e in Zu.style);for(var n=0;n<mc.length&&(wc[e]=mc[n](e,Zu.style,t),!wc[e]);n++);try{Zu.style[e]=""}catch(e){return!1}return wc[e]}var Oc,Sc={},Ec={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},jc=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Pc(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?kc(t):", "+kc(n);return r||(t||n)}function Cc(e,t){var n=t;if(!Oc||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Sc[r])return Sc[r];try{Oc.style[e]=n}catch(e){return Sc[r]=!1,!1}if(Ec[e])n=n.replace(jc,Pc);else if(""===Oc.style[e]&&("-ms-flex"===(n=qu+n)&&(Oc.style[e]="-ms-flexbox"),Oc.style[e]=n,""===Oc.style[e]))return Sc[r]=!1,!1;return Oc.style[e]="",Sc[r]=n,Sc[r]}Bi&&(Oc=document.createElement("p"));var Tc=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,i=kc(n);i&&i!==n&&(o=!0);var a=!1,u=Cc(i,Xi(r));u&&u!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=u||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===Wu?n:"@"+qu+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Cc(t,Xi(e))||e}}};var Ac=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i<o.length;i++)r[o[i]]=t[o[i]];return r}}};function Rc(){return{plugins:[su(),vu(),bu(),Eu(),Du(),"undefined"==typeof window?null:Tc(),Ac()]}}var Dc=eu(Rc()),Ic={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,u=""===a?"":"".concat(a,"-"),c=0,s=function(){return c+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==iu.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(u).concat(r,"-").concat(e.key);return t.options.theme[ou]&&""===a?"".concat(i,"-").concat(s()):i}return"".concat(u).concat(o).concat(s())}}(),jss:Dc,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Mc=x.a.createContext(Ic);var Nc=-1e9;function Fc(){return Nc+=1}function zc(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var i=n.overrides[r],a=uo({},o);return Object.keys(i).forEach((function(e){a[e]=lo(a[e],i[e])})),a},options:{}}}var Lc={};function Uc(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=nu({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Bc(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,i=e.stylesCreator,a=e.name;if(!o.disableGeneration){var u=ru.get(o.sheetsManager,i,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},ru.set(o.sheetsManager,i,r,u));var c=uo({},i.options,o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var s=o.sheetsRegistry;if(0===u.refs){var l;o.sheetsCache&&(l=ru.get(o.sheetsCache,i,r));var f=i.create(r,a);l||((l=o.jss.createStyleSheet(f,uo({link:!1},c))).attach(),o.sheetsCache&&ru.set(o.sheetsCache,i,r,l)),s&&s.add(l),u.staticSheet=l,u.dynamicStyles=function e(t){var n=null;for(var r in t){var o=t[r],i=typeof o;if("function"===i)n||(n={}),n[r]=o;else if("object"===i&&null!==o&&!Array.isArray(o)){var a=e(o);a&&(n||(n={}),n[r]=a)}}return n}(f)}if(u.dynamicStyles){var p=o.jss.createStyleSheet(u.dynamicStyles,uo({link:!0},c));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=nu({baseClasses:u.staticSheet.classes,newClasses:p.classes}),s&&s.add(p)}else n.classes=u.staticSheet.classes;u.refs+=1}}function Wc(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function qc(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=ru.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(ru.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function Hc(e,t){var n,r=x.a.useRef([]),o=x.a.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),x.a.useEffect((function(){return function(){n&&n()}}),[o])}function Qc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,o=t.Component,i=t.defaultTheme,a=void 0===i?Lc:i,u=Fi(t,["name","classNamePrefix","Component","defaultTheme"]),c=zc(e),s=n||r||"makeStyles";c.options={index:Fc(),name:n,meta:s,classNamePrefix:s};var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ro()||a,r=uo({},x.a.useContext(Mc),u),i=x.a.useRef(),s=x.a.useRef();Hc((function(){var o={name:n,state:{},stylesCreator:c,stylesOptions:r,theme:t};return Bc(o,e),s.current=!1,i.current=o,function(){qc(o)}}),[t,c]),x.a.useEffect((function(){s.current&&Wc(i.current,e),s.current=!0}));var l=Uc(i.current,e.classes,o);return l};return l}function Vc(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!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}var $c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,o=t.withTheme,i=void 0!==o&&o,a=t.name,u=Fi(t,["defaultTheme","withTheme","name"]);var c=a,s=Qc(e,uo({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:c},u)),l=x.a.forwardRef((function(e,t){e.classes;var o,u=e.innerRef,c=Fi(e,["classes","innerRef"]),l=s(uo({},n.defaultProps,e)),f=c;return("string"==typeof a||i)&&(o=ro()||r,a&&(f=Vc({theme:o,name:a,props:c})),i&&!f.theme&&(f.theme=o)),x.a.createElement(n,uo({ref:u||t,classes:l},f))}));return Li()(l,n),l}};var Jc=function(e,t){return $c(e,fo({defaultTheme:li},t))};function Gc(e){if("string"!=typeof e)throw new Error(yo(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Yc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Kc=_.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,u=void 0===a?"initial":a,c=e.component,s=e.display,l=void 0===s?"initial":s,f=e.gutterBottom,p=void 0!==f&&f,d=e.noWrap,h=void 0!==d&&d,v=e.paragraph,y=void 0!==v&&v,g=e.variant,m=void 0===g?"body1":g,b=e.variantMapping,w=void 0===b?Yc:b,x=ao(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),k=c||(y?"p":w[m]||Yc[m])||"span";return _.createElement(k,fo({className:Mi(o.root,i,"inherit"!==m&&o[m],"initial"!==u&&o["color".concat(Gc(u))],h&&o.noWrap,p&&o.gutterBottom,y&&o.paragraph,"inherit"!==r&&o["align".concat(Gc(r))],"initial"!==l&&o["display".concat(Gc(l))]),ref:t},x))})),Xc=Jc((function(e){return{root:{margin:0},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},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(Kc),Zc=["color","variant","children"],es=Object(_.forwardRef)((function(e,t){var n=e.color,r=e.variant,o=e.children,i=T()(e,Zc),a=n||("caption"===r?"textSecondary":"textPrimary");return x.a.createElement(Xc,E()({ref:t,variant:r,color:a},i),o)})),ts="styles__c-spinner___1snK7",ns="styles__c-spinner--middle___RwyII",rs="styles__c-spinner--nomargin___13JyW",os=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 x.a.createElement("div",{className:I()(ts,(t={},P()(t,ns,o),P()(t,rs,i),t),c)},x.a.createElement(U,{icon:ke,color:a,spin:!0,size:s}),r&&x.a.createElement(es,{variant:"body1",color:"textSecondary",component:"p"},n("loading.".concat(r))))};os.propTypes={loadingType:R.a.string,middle:R.a.bool,noMargin:R.a.bool,color:R.a.string,size:R.a.oneOf(["tiny","small","medium","large","xlarge","xxlarge"]),className:R.a.string},os.defaultProps={loadingType:"",middle:!1,noMargin:!1,color:"var(--spinnerColor)",size:"medium",className:""};var is=Object(O.translate)()(os);function as(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 us=function(e){p()(n,e);var t=as(n);function n(e,r){var o;return a()(this,n),o=t.call(this,e),m()(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(me.c)(),o}return c()(n,[{key:"componentDidMount",value:function(){this.toggle()}},{key:"render",value:function(){var e=this,t=this.state.isLoading;return x.a.createElement("div",null,x.a.createElement(Di,{secondaryAction:this.props.onClose,className:"coz-support-modal",into:"#cozy-bar-modal-dom-place",closeBtnClassName:"coz-support-modal-close"},x.a.createElement(Pr,{className:"coz-support-modal-wrapper u-mt-1"},x.a.createElement("div",{className:"coz-support-modal-content"},t&&x.a.createElement(is,{size:"xxlarge",middle:!0}),x.a.createElement("div",{className:"coz-support-intent-wrapper".concat(t?" coz-hidden":""),ref:function(t){e.intentWrapperRef=t}})))))}}]),n}(_.Component);function cs(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 ss(e){return x.a.createElement("svg",w()({width:16,height:16},e),x.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 ls})),n.d(t,"mapStateToProps",(function(){return fs})),n.d(t,"mapDispatchToProps",(function(){return ps}));var ls=function(e){p()(n,e);var t=cs(n);function n(e){var r;return a()(this,n),r=t.call(this,e),m()(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})}})),m()(l()(r),"toggleClaudy",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(r.props.claudyEnabled){var t=r.state.claudyOpened;if(e&&!t)return r.setState({claudyFired:!0});r.state.claudyFired&&r.setState({claudyFired:!1}),r.setState({claudyOpened:!t})}})),m()(l()(r),"toggleSupport",(function(){var e=r.state.supportDisplayed;r.setState({supportDisplayed:!e})})),m()(l()(r),"renderLeft",(function(){var e=r.props,t=e.t,n=e.isPublic,o=e.webviewContext;return Object(B.isFlagshipApp)()||q()("flagship.debug")?x.a.createElement(xe,{webviewContext:o}):n?null:x.a.createElement("button",{type:"button",className:"coz-bar-btn coz-bar-burger",onClick:r.toggleDrawer,"data-tutorial":"apps-mobile"},x.a.createElement(U,{icon:ss,width:16,height:16,color:"currentColor"}),x.a.createElement("span",{className:"coz-bar-hidden"},t("drawer")))})),m()(l()(r),"renderRight",(function(){return r.props.isPublic?null:x.a.createElement(an,{toggleSupport:r.toggleSupport,onLogOut:r.props.onLogOut})})),r.state={claudyFired:!1,claudyOpened:!1,drawerVisible:!1,supportDisplayed:!1,searchBarEnabled:e.isDrive&&!e.isPublic&&!Object(B.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(){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:"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 x.a.createElement(dn,{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=this.props,s=c.theme,l=c.themeOverrides,f=c.barLeft,p=c.barRight,d=c.barCenter,h=c.barSearch,v=c.claudyEnabled,y=c.onDrawer,g=c.isPublic,m=c.onLogOut,b=c.userActionRequired,w=l.primaryColor,_=l.primaryContrastTextColor,k=w?{"--cozBarThemePrimaryColor":w}:{},O=_?{"--cozBarThemePrimaryContrastTextColor":_}:{},S=o()({},k,O);return x.a.createElement("div",{className:"coz-bar-wrapper coz-theme-".concat(s),style:S},x.a.createElement("div",{id:"cozy-bar-modal-dom-place"}),x.a.createElement("div",{className:"coz-bar-container"},f||this.renderLeft(),d||this.renderCenter(),x.a.createElement("div",{className:"u-flex-grow"},h||(a?x.a.createElement(Sn,null):null)),p||this.renderRight(),g?null:x.a.createElement(Ht,{visible:i,onClose:this.toggleDrawer,onClaudy:v&&function(){return e.toggleClaudy(!0)}||!1,isClaudyLoading:n,drawerListener:function(){return y(i)},toggleSupport:this.toggleSupport,onLogOut:m}),v&&x.a.createElement(jn,{claudyFired:n,onToggle:function(){return e.toggleClaudy(!1)},opened:r}),u&&x.a.createElement(us,{onClose:this.toggleSupport})),b&&x.a.createElement(Fe,b))}}]),n}(_.Component),fs=function(e){return{theme:Object(tt.j)(e).name,themeOverrides:Object(tt.j)(e).overrides,barLeft:Object(tt.e)(e,"left"),barRight:Object(tt.e)(e,"right"),barCenter:Object(tt.e)(e,"center"),barSearch:Object(tt.e)(e,"search"),isDrive:Object(tt.m)(e,{slug:"drive"}),claudyEnabled:Object(tt.z)(e),hasFetchedApps:Object(tt.l)(e),webviewContext:Object(tt.k)(e)}},ps=function(e){return{fetchApps:function(){return e(Object(tt.a)())},fetchContext:function(){return e(Object(tt.b)())},fetchSettingsData:function(t){return e(Object(tt.c)(t))}}};t.default=Object(O.translate)()(Object(k.connect)(fs,ps)(ls))},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)};function f(){return(f=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)}function p(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}var d=n(79),h=n.n(d),v=n(123),y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,g=[],m=[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 _(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function x(e,t,n,r,o,i,a,u,c,s){if(e){var l=!1,f=null,p=function(){if(!l){var e,n,p=t.getState();try{e=r(p,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=p,n.trySubscribe(),p();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var k=function(){return[null,0]};function O(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,d=n.renderCountProp,y=void 0===d?void 0:d,O=n.shouldHandleStateChanges,S=void 0===O||O,E=n.storeKey,j=void 0===E?"store":E,P=(n.withRef,n.forwardRef),C=void 0!==P&&P,T=n.context,A=void 0===T?i:T,R=p(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),D=A;return function(t){var n=t.displayName||t.name||"Component",i=u(n),a=f({},R,{getDisplayName:u,methodName:l,renderCountProp:y,shouldHandleStateChanges:S,storeKey:j,displayName:i,wrappedComponentName:n,WrappedComponent:t}),c=R.pure;var d=c?r.useMemo:function(e){return e()};function O(n){var i=Object(r.useMemo)((function(){var e=n.forwardedRef,t=p(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(v.isContextConsumer)(o.a.createElement(u.Consumer,null))?u:D}),[u,D]),y=Object(r.useContext)(h),O=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(y)&&Boolean(y.store);var E=O?n.store:y.store,j=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(E)}),[E]),P=Object(r.useMemo)((function(){if(!S)return m;var e=new s(E,O?null:y.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[E,O,y]),C=P[0],T=P[1],A=Object(r.useMemo)((function(){return O?y:f({},y,{subscription:C})}),[O,y,C]),R=Object(r.useReducer)(b,g,k),I=R[0][0],M=R[1];if(I&&I.error)throw I.error;var N=Object(r.useRef)(),F=Object(r.useRef)(l),z=Object(r.useRef)(),L=Object(r.useRef)(!1),U=d((function(){return z.current&&l===F.current?z.current:j(E.getState(),l)}),[E,I,l]);w(_,[F,N,L,l,U,z,T]),w(x,[S,E,C,j,F,N,L,z,T,M],[E,C,j]);var B=Object(r.useMemo)((function(){return o.a.createElement(t,f({},U,{ref:c}))}),[c,t,U]);return Object(r.useMemo)((function(){return S?o.a.createElement(h.Provider,{value:A},B):B}),[h,B,A])}var E=c?o.a.memo(O):O;if(E.WrappedComponent=t,E.displayName=i,C){var P=o.a.forwardRef((function(e,t){return o.a.createElement(E,f({},e,{forwardedRef:t}))}));return P.displayName=i,P.WrappedComponent=t,h()(P,t)}return h()(E,t)}}function S(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function E(e,t){if(S(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])||!S(e[n[o]],t[n[o]]))return!1;return!0}var j=n(35);function P(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function C(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function T(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=C(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=C(o),o=r(t,n)),o},r}}var A=[function(e){return"function"==typeof e?T(e):void 0},function(e){return e?void 0:P((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?P((function(t){return Object(j.bindActionCreators)(e,t)})):void 0}];var R=[function(e){return"function"==typeof e?T(e):void 0},function(e){return e?void 0:P((function(){return{}}))}];function D(e,t,n){return f({},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 D}}];function M(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function N(e,t,n,r,o){var i,a,u,c,s,l=o.areStatesEqual,f=o.areOwnPropsEqual,p=o.areStatePropsEqual,d=!1;function h(o,d){var h,v,y=!f(d,a),g=!l(o,i);return i=o,a=d,y&&g?(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)):g?(h=e(i,a),v=!p(h,u),u=h,v&&(s=n(u,c,a)),s):s}return function(o,l){return d?h(o,l):(u=e(i=o,a=l),c=t(r,a),s=n(u,c,a),d=!0,s)}}function F(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=p(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,i),u=r(e,i),c=o(e,i);return(i.pure?N:M)(a,u,c,e,i)}function z(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}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?O:n,o=t.mapStateToPropsFactories,i=void 0===o?R:o,a=t.mapDispatchToPropsFactories,u=void 0===a?A:a,c=t.mergePropsFactories,s=void 0===c?I:c,l=t.selectorFactory,d=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,v=void 0===h?L:h,y=a.areOwnPropsEqual,g=void 0===y?E:y,m=a.areStatePropsEqual,b=void 0===m?E:m,w=a.areMergedPropsEqual,_=void 0===w?E:w,x=p(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),k=z(e,i,"mapStateToProps"),O=z(t,u,"mapDispatchToProps"),S=z(n,s,"mergeProps");return r(d,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:O,initMergeProps:S,pure:l,areStatesEqual:v,areOwnPropsEqual:g,areStatePropsEqual:b,areMergedPropsEqual:_},x))}}var B=U();function W(){return Object(r.useContext)(i)}function q(e){void 0===e&&(e=i);var t=e===i?W:function(){return Object(r.useContext)(e)};return function(){return t().store}}var H=q();function Q(e){void 0===e&&(e=i);var t=e===i?H:q(e);return function(){return t().dispatch}}var V=Q(),$=function(e,t){return e===t};function J(e){void 0===e&&(e=i);var t=e===i?W:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=$);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 G,Y=J(),K=n(121);n.d(t,"Provider",(function(){return l})),n.d(t,"connectAdvanced",(function(){return O})),n.d(t,"ReactReduxContext",(function(){return i})),n.d(t,"connect",(function(){return B})),n.d(t,"batch",(function(){return K.unstable_batchedUpdates})),n.d(t,"useDispatch",(function(){return V})),n.d(t,"createDispatchHook",(function(){return Q})),n.d(t,"useSelector",(function(){return Y})),n.d(t,"createSelectorHook",(function(){return J})),n.d(t,"useStore",(function(){return H})),n.d(t,"createStoreHook",(function(){return q})),n.d(t,"shallowEqual",(function(){return E})),G=K.unstable_batchedUpdates,a=G},function(e,t,n){"use strict";n.r(t);var r=n(16),o=n.n(r),i=n(35),a=n(6),u=n.n(a),c=n(122),s=n(100),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)}}},p=n(227),d="persist/REHYDRATE",h="persist/REGISTER",v="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 g(e,t,n,r){r.debug;var o=y({},n);return e&&"object"===(void 0===e?"undefined":v(e))&&Object.keys(e).forEach((function(r){"_persist"!==r&&t[r]===n[r]&&(o[r]=e[r])})),o}function m(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,p=null;function d(){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]})),p=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(d,o)),c=e},flush:function(){for(;0!==l.length;)d();return p||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}:_);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 _(e){return JSON.parse(e)}function x(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 O(e,t){var n=void 0!==e.version?e.version:-1,r=(e.debug,void 0===e.stateReconciler?g: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 p=l||{},h=p._persist,v=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}(p,["_persist"]);if("persist/PERSIST"===f.type){var y=!1,g=function(t,n){y||(f.rehydrate(e.key,t,n),y=!0)};if(i&&setTimeout((function(){!y&&g(void 0,new Error('redux-persist: persist timed out for persist key "'+e.key+'"'))}),i),c=!1,a||(a=m(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){g(e)}),(function(e){g(void 0,e)}))}),(function(e){g(void 0,e)})),k({},t(v,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,x)}(e)),k({},t(v,f),{_persist:h});if("persist/FLUSH"===f.type)return f.result(a&&a.flush()),k({},t(v,f),{_persist:h});if("persist/PAUSE"===f.type)c=!0;else if(f.type===d){if(u)return k({},v,{_persist:k({},h,{rehydrated:!0})});if(f.key===e.key){var b=t(v,f),w=f.payload,_=!1!==r&&void 0!==w?r(w,l,b,e):b,O=k({},_,{_persist:k({},h,{rehydrated:!0})});return s(O)}}if(!h)return t(l,f);var S=t(v,f);return S===v?l:(S._persist=h,s(S))}}var S="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},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 j(e,t,n,r){r.debug;var o=E({},n);return e&&"object"===(void 0===e?"undefined":S(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":S(i))?o[r]=e[r]:o[r]=E({},o[r],e[r])))})),o}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 C(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 T={registry:[],bootstrapped:!1},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=arguments[1];switch(t.type){case h:return P({},e,{registry:[].concat(C(e.registry),[t.key])});case d:var n=e.registry.indexOf(t.key),r=[].concat(C(e.registry));return r.splice(n,1),P({},e,{registry:r,bootstrapped:0===r.length});default:return e}};var R=n(12),D=n(370),I=n(371),M=n.n(I),N=n(372),F=n(161),z=n(38),L=n.n(z);n.d(t,"createStore",(function(){return $}));var U,B,W={storage:M.a,key:"cozy-bar",whitelist:N},q=Object(D.createLogger)({logger:F.a}),H=(U=W,B=o()({},R.t),U.stateReconciler=void 0===U.stateReconciler?j:U.stateReconciler,O(U,Object(i.combineReducers)(B))),Q=[f,p.default];L()("bar.debug")&&Q.push(q);var V,$=function(){var e,t,n,r,o,a,u,c;return V=Object(i.createStore)(H,i.applyMiddleware.apply(null,Q)),e=V,r=n||!1,o=Object(i.createStore)(A,T,t?t.enhancer:void 0),a=function(e){o.dispatch({type:h,key:e})},u=function(t,n,i){var a={type:d,payload:n,err:i,key:t};e.dispatch(a),o.dispatch(a),r&&c.getState().bootstrapped&&(r(),r=!1)},(c=P({},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(),V};t.default=function(){return V||(V=$()),V}},function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),i=n(8),a=n.n(i),u=n(19),c=n(29),s=n(12),l=n(3),f=n.n(l),p=n(9),d=n.n(p),h=n(11),v=n.n(h),y=n(14),g=n.n(y),m=n(7),b=n.n(m),w=n(0),_=n.n(w),x=["left","center","right","search"],k=function(e){return e[0].toUpperCase()+e.slice(1)},O=function(e){return"setBar".concat(k(e))},S=function(e){return"Bar".concat(k(e))};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=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g()(this,n)}}var j=0,P=function(e){var t={};return x.forEach((function(n){t[O(n)]=function(t){return e.dispatch(Object(s.u)(n,"string"==typeof(r=t)?_.a.createElement("span",{dangerouslySetInnerHTML:{__html:r}}):r,"js"));var r},t[S(n)]=function(e,t){return function(n){v()(o,n);var r=E(o);function o(){return f()(this,o),r.apply(this,arguments)}return d()(o,[{key:"componentDidMount",value:function(){this.componentId=j++,this.setContent(this.props.children)}},{key:"setContent",value:function(n){try{n=_.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},C=function(e){console.error("You tried to use the CozyBar API (".concat(e,") but the CozyBar is not initialised yet via cozy.bar.init(...)."))},T=function(e,t){return function(){if(e[t])return e[t].apply(e,arguments);C(t)}},A=function(){var e=document.querySelector("[role=application]");return e&&e.dataset?e.dataset:{}},R=function(){var e=document.querySelector('link[rel="icon"][sizes^="32"]');return null!==e?e.getAttribute("href"):"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},D=function(){return A().cozyAppNamePrefix||null},I=function(){return A().cozyAppSlug||null},M=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}}},N=n(361),F=n(362),z=n(363),L=n(97);n.d(t,"init",(function(){return Q})),n.d(t,"version",(function(){return oe})),n.d(t,"setBarCenter",(function(){return J})),n.d(t,"setBarLeft",(function(){return G})),n.d(t,"setBarRight",(function(){return Y})),n.d(t,"setBarSearch",(function(){return K})),n.d(t,"BarLeft",(function(){return ee})),n.d(t,"BarRight",(function(){return Z})),n.d(t,"BarCenter",(function(){return X})),n.d(t,"BarSearch",(function(){return te})),n.d(t,"setTheme",(function(){return ne})),n.d(t,"setWebviewContext",(function(){return re})),n.d(t,"updateAccessToken",(function(){return V})),n.d(t,"setLocale",(function(){return s.w}));var U={en:N,fr:F,es:z},B=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)}},W=function(e,t){var r=n(0),o=n(121).render,i=n(51),a=i.connect,u=i.Provider,c=n(28).default,l=n(755).default,f=n(31).CozyProvider,p=t.cozyClient,d=a((function(e){return{lang:Object(s.g)(e)}}))(c),h=r.createElement(u,{store:t.reduxStore},r.createElement(L.WebviewIntentProvider,null,r.createElement(d,{dictRequire:function(e){return U[e]}},p?r.createElement(f,{client:p},r.createElement(l,t)):r.createElement(l,t))));return o(h,e),h},q=function(e){var t=e.cozyURL,r=e.token,o=e.isPublic,i={uri:t||function(e){var t=A();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=A();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(31).default;return console.warn("Automatically made cozyClient. Options: ",i),new a(i)},H={},Q=function(){var e=a()(o.a.mark((function e(){var t,r,i,a,u,l,f,p,d,h,v,y,g,m,b,w,_,x,k,O,S,E,j=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=j.length>0&&void 0!==j[0]?j[0]:{},r=t.appName,i=t.appNamePrefix,a=void 0===i?D():i,u=t.appSlug,l=void 0===u?I():u,f=t.lang,p=t.iconPath,d=void 0===p?R():p,h=t.cozyClient,v=t.cozyURL,y=t.token,g=t.replaceTitleOnMobile,m=void 0!==g&&g,b=t.isPublic,w=void 0!==b&&b,_=t.onLogOut,!w&&/^\/public/.test(window.location.pathname)&&(w=!0),h||(h=q({cozyURL:v,token:y,isPublic:w})),x=n(757).default,(k=x()).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)),O=P(k),Object.assign(H,O),S={appName:r,appNamePrefix:a,appSlug:l,cozyClient:h,iconPath:d,replaceTitleOnMobile:m,isPublic:w,onLogOut:_,userActionRequired:M(),reduxStore:k},E=B(S),W(E,S);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=function(e){c.b.updateAccessToken(e)},$=function(e){var t={};x.forEach((function(n){var r=O(n),o=S(n);t[r]=T(e,r),t[o]=function(t){if(e[o])return _.a.createElement(e[o],t);C(o)}}));for(var n=0,r=["setLocale","setTheme","setWebviewContext"];n<r.length;n++){var o=r[n];t[o]=T(e,o)}return t}(H),J=$.setBarCenter,G=$.setBarLeft,Y=$.setBarRight,K=$.setBarSearch,X=$.BarCenter,Z=$.BarRight,ee=$.BarLeft,te=$.BarSearch,ne=$.setTheme,re=$.setWebviewContext,oe="8.11.1"}])}));
|
|
65
65
|
//# sourceMappingURL=cozy-bar.min.js.map
|