@dodoex/wallet-web3-react 0.3.0 → 0.4.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.
Files changed (69) hide show
  1. package/babel.config.js +9 -9
  2. package/dist/cjs/index.cjs +23 -0
  3. package/dist/cjs/locales/en.js +1 -1
  4. package/dist/cjs/locales/zh.js +1 -1
  5. package/dist/index.js +4 -13
  6. package/dist/locales/en.js +1 -1
  7. package/dist/locales/zh.js +1 -1
  8. package/dist/types/ClientProvider.d.ts +1 -1
  9. package/dist/types/LangProvider.d.ts +1 -1
  10. package/dist/types/WalletConnect/AccountPage.d.ts +1 -1
  11. package/dist/types/WalletConnect/ActivityList.d.ts +5 -4
  12. package/dist/types/WalletConnect/ConnectAlchemy/index.d.ts +2 -1
  13. package/dist/types/WalletConnect/ConnectDialog.d.ts +2 -1
  14. package/dist/types/WalletConnect/ConnectLedger/ErrorDialog.d.ts +1 -1
  15. package/dist/types/WalletConnect/ConnectLedger/LoadingDialog.d.ts +1 -1
  16. package/dist/types/WalletConnect/ConnectLedger/LockedDialog.d.ts +1 -1
  17. package/dist/types/WalletConnect/ConnectLedger/ProtocolDialog.d.ts +1 -1
  18. package/dist/types/WalletConnect/ConnectLedger/SelectAddressDialog.d.ts +1 -1
  19. package/dist/types/WalletConnect/ConnectLedger/SelectPathDialog.d.ts +1 -1
  20. package/dist/types/WalletConnect/ConnectLedger/index.d.ts +1 -1
  21. package/dist/types/WalletConnect/ConnectPage.d.ts +1 -1
  22. package/dist/types/WalletConnect/HasBalanceTokenList.d.ts +1 -1
  23. package/dist/types/WalletConnect/ReceiveTokenPage.d.ts +2 -1
  24. package/dist/types/WalletConnect/SendTokenPage.d.ts +2 -1
  25. package/dist/types/WalletConnect/WalletDialog.d.ts +2 -1
  26. package/dist/types/WalletConnectProvider.d.ts +2 -2
  27. package/dist/types/components/AddressWithLinkAndCopy.d.ts +2 -2
  28. package/dist/types/components/Dialog.d.ts +3 -3
  29. package/dist/types/components/WalletTag.d.ts +1 -1
  30. package/lingui.config.ts +13 -13
  31. package/package.json +90 -90
  32. package/rollup.config.mjs +106 -100
  33. package/src/ClientProvider.tsx +17 -17
  34. package/src/LangProvider.tsx +36 -36
  35. package/src/WalletConnect/AccountPage.tsx +498 -496
  36. package/src/WalletConnect/ActivityList.tsx +606 -606
  37. package/src/WalletConnect/ConnectAlchemy/index.tsx +248 -248
  38. package/src/WalletConnect/ConnectAlchemy/useConnectAlchemy.ts +105 -105
  39. package/src/WalletConnect/ConnectDialog.tsx +35 -35
  40. package/src/WalletConnect/ConnectLedger/ErrorDialog.tsx +61 -61
  41. package/src/WalletConnect/ConnectLedger/LockedDialog.tsx +54 -54
  42. package/src/WalletConnect/ConnectLedger/helper.ts +14 -14
  43. package/src/WalletConnect/ConnectPage.tsx +508 -508
  44. package/src/WalletConnect/HasBalanceTokenList.tsx +202 -202
  45. package/src/WalletConnect/ReceiveTokenPage.tsx +145 -145
  46. package/src/WalletConnect/SendTokenPage.tsx +251 -251
  47. package/src/WalletConnect/WalletDialog.tsx +80 -80
  48. package/src/WalletConnectProvider.tsx +57 -57
  49. package/src/components/AddressWithLinkAndCopy.tsx +202 -202
  50. package/src/components/Dialog.tsx +158 -158
  51. package/src/components/TokenLogo.tsx +167 -167
  52. package/src/components/WalletTag.tsx +117 -117
  53. package/src/constants/localstorage.ts +24 -24
  54. package/src/hooks/useConnectWallet.ts +150 -150
  55. package/src/hooks/useFetchFiatPrice.ts +53 -53
  56. package/src/hooks/useFetchTokensBalance.ts +53 -53
  57. package/src/hooks/useHasBalanceTokenList.ts +95 -95
  58. package/src/hooks/useTransactionList.ts +89 -89
  59. package/src/index.tsx +7 -7
  60. package/src/locales/en.js +1 -1
  61. package/src/locales/en.po +8 -8
  62. package/src/locales/zh.js +1 -1
  63. package/src/locales/zh.po +4 -4
  64. package/src/react19-types.d.ts +12 -0
  65. package/src/utils/formatter.ts +102 -102
  66. package/src/utils/time.ts +21 -21
  67. package/src/utils/utils.ts +8 -8
  68. package/tsconfig.json +22 -23
  69. package/dist/index.cjs +0 -32
package/babel.config.js CHANGED
@@ -1,9 +1,9 @@
1
- module.exports = {
2
- presets: [
3
- ['@babel/preset-env', { targets: { node: 'current' } }],
4
- '@babel/preset-typescript',
5
- ['@babel/preset-react', { runtime: 'automatic' }],
6
- // '@lingui/babel-preset-react',
7
- ],
8
- plugins: ['macros'],
9
- };
1
+ module.exports = {
2
+ presets: [
3
+ ['@babel/preset-env', { targets: { node: 'current' } }],
4
+ '@babel/preset-typescript',
5
+ ['@babel/preset-react', { runtime: 'automatic' }],
6
+ // '@lingui/babel-preset-react',
7
+ ],
8
+ plugins: ['macros'],
9
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";var e=require("@dodoex/wallet-web3"),t=require("@dodoex/components"),n=require("@dodoex/icons"),r=require("copy-to-clipboard"),o=require("@lingui/react"),i=require("react"),a=require("react/jsx-runtime"),s=require("react-dom"),c=require("bignumber.js"),u=require("@dodoex/dodo-contract-request"),l=require("@tanstack/react-query"),f=require("@dodoex/api"),d=require("react-infinite-scroller"),p=require("dayjs"),h=require("identicon.js"),g=require("qrcode.react");function y(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var v=y(i),m=y(s);const x=i.createContext({connectTimeout:15e3,tokenList:[],getChain:()=>{throw new Error("getChain is undefined")}}),b=x.Provider,w=()=>i.useContext(x);function _(e){return e.length<=10?e:`${e.slice(0,6)}...${e.slice(e.length-4,e.length)}`}function j({truncate:e,address:r,disabledAddress:o,sx:i,handleOpen:s,addressHoverColor:c,addressHoverShowIcon:u}){return o?a.jsx(t.Box,{children:e?_(r):r}):a.jsx(t.HoverAddUnderLine,{lineSx:{bottom:-1},lineColor:null!=c?c:(null==i?void 0:i.color)||"",hoverSx:{color:"addressHoverColor","& svg":{display:"inline-block"}},className:"truncate-address-link",children:a.jsxs(t.Box,{onClick:e=>{null==s||s(e,"address")},sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[e?_(r):r,u?a.jsx(t.Box,{component:n.ArrowRight,sx:{display:"none",width:14,height:14}}):""]})})}function k({address:r,truncate:o,size:i="medium",iconSize:s,iconSpace:c,sx:u,iconDarkHover:l,disabledAddress:f,addressHoverColor:d,addressHoverShowIcon:p,customChainId:h,handleOpen:g,onAddressClick:y}){const v=t.useTheme(),m="big"===i,x="medium"===i,b=l?t.HoverAddBackground:t.HoverOpacity,_=m?"h5":x?"body1":"body2",{chainId:k}=e.useWalletStore(),C=null!=h?h:k,{getChain:S}=w(),T=(e,t)=>{var n;if(g)g(e,t);else if(C){e.stopPropagation();const t=null===(n=S(C))||void 0===n?void 0:n.scanUrl;if(!t)return;window.open(`https://${t}${r?`/address/${r}`:""}`)}};return a.jsxs(t.Box,{sx:Object.assign({display:"flex",alignItems:"center",typography:_,color:v.palette.text.primary,lineHeight:"normal"},u||{}),children:[a.jsx(j,{truncate:o,address:r,disabledAddress:f,sx:u,typography:_,handleOpen:null!=y?y:T,addressHoverColor:d,addressHoverShowIcon:p}),a.jsx(b,{sx:{display:"inline-flex",ml:(e=>{let t=e?12:8;return c&&(t=c),l&&(t-=3),t})(x),cursor:"pointer"},onClick:e=>{T(e,"icon")},children:a.jsx(t.Box,{component:n.ArrowTopRightBorder,sx:{width:s||(x?16:14),height:s||(x?16:14)}})})]})}function C(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 S(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}var T,E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},O={exports:{}},B={exports:{}},I={};var R,A,P,L,$,N,W,M,D,F,q,z,U,V,H={};
2
+ /** @license React v16.13.1
3
+ * react-is.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */function K(){return A||(A=1,e=B,"production"===process.env.NODE_ENV?e.exports=function(){if(T)return I;T=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case c:case u:case r:case i:case o:case f:return e;default:switch(e=e&&e.$$typeof){case s:case l:case h:case p:case a:return e;default:return d}}case n:return d}}}function b(e){return x(e)===u}return I.AsyncMode=c,I.ConcurrentMode=u,I.ContextConsumer=s,I.ContextProvider=a,I.Element=t,I.ForwardRef=l,I.Fragment=r,I.Lazy=h,I.Memo=p,I.Portal=n,I.Profiler=i,I.StrictMode=o,I.Suspense=f,I.isAsyncMode=function(e){return b(e)||x(e)===c},I.isConcurrentMode=b,I.isContextConsumer=function(e){return x(e)===s},I.isContextProvider=function(e){return x(e)===a},I.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},I.isForwardRef=function(e){return x(e)===l},I.isFragment=function(e){return x(e)===r},I.isLazy=function(e){return x(e)===h},I.isMemo=function(e){return x(e)===p},I.isPortal=function(e){return x(e)===n},I.isProfiler=function(e){return x(e)===i},I.isStrictMode=function(e){return x(e)===o},I.isSuspense=function(e){return x(e)===f},I.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===l||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m||e.$$typeof===g)},I.typeOf=x,I}():e.exports=(R||(R=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var g=e.type;switch(g){case c:case u:case r:case i:case o:case f:return g;default:var y=g&&g.$$typeof;switch(y){case s:case l:case h:case p:case a:return y;default:return d}}case n:return d}}}var b=c,w=u,_=s,j=a,k=t,C=l,S=r,T=h,E=p,O=n,B=i,I=o,R=f,A=!1;function P(e){return x(e)===u}H.AsyncMode=b,H.ConcurrentMode=w,H.ContextConsumer=_,H.ContextProvider=j,H.Element=k,H.ForwardRef=C,H.Fragment=S,H.Lazy=T,H.Memo=E,H.Portal=O,H.Profiler=B,H.StrictMode=I,H.Suspense=R,H.isAsyncMode=function(e){return A||(A=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||x(e)===c},H.isConcurrentMode=P,H.isContextConsumer=function(e){return x(e)===s},H.isContextProvider=function(e){return x(e)===a},H.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},H.isForwardRef=function(e){return x(e)===l},H.isFragment=function(e){return x(e)===r},H.isLazy=function(e){return x(e)===h},H.isMemo=function(e){return x(e)===p},H.isPortal=function(e){return x(e)===n},H.isProfiler=function(e){return x(e)===i},H.isStrictMode=function(e){return x(e)===o},H.isSuspense=function(e){return x(e)===f},H.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===o||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===l||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m||e.$$typeof===g)},H.typeOf=x}()),H)),B.exports;var e}
10
+ /*
11
+ object-assign
12
+ (c) Sindre Sorhus
13
+ @license MIT
14
+ */function Z(){if(L)return P;L=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return P=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),c=1;c<arguments.length;c++){for(var u in i=Object(arguments[c]))t.call(i,u)&&(s[u]=i[u]);if(e){a=e(i);for(var l=0;l<a.length;l++)n.call(i,a[l])&&(s[a[l]]=i[a[l]])}}return s},P}function G(){if(N)return $;N=1;return $="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Y(){return M?W:(M=1,W=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var J=K();O.exports=function(){if(z)return q;z=1;var e=K(),t=Z(),n=G(),r=Y(),o=function(){if(F)return D;F=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=G(),n={},r=Y();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,c){if("production"!==process.env.NODE_ENV)for(var u in o)if(r(o,u)){var l;try{if("function"!=typeof o[u]){var f=Error((s||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}l=o[u](i,u,s,a,null,t)}catch(e){l=e}if(!l||l instanceof Error||e((s||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof l+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),l instanceof Error&&!(l.message in n)){n[l.message]=!0;var d=c?c():"";e("Failed "+a+" type: "+l.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},D=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),q=function(s,c){var u="function"==typeof Symbol&&Symbol.iterator,l="<<anonymous>>",f={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new p("Invalid "+i+" `"+a+"` of type `"+m(s)+"` supplied to `"+o+"`, expected an array.");for(var c=0;c<s.length;c++){var u=e(s,c,o,i,a+"["+c+"]",n);if(u instanceof Error)return u}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+m(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||l;return new p("Invalid "+o+" `"+i+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:l)+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return v(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var c=t[o],u=m(c);if("object"!==u)return new p("Invalid "+a+" `"+s+"` of type `"+u+"` supplied to `"+i+"`, expected an object.");for(var l in c)if(r(c,l)){var f=e(c,l,i,a,s+"."+l,n);if(f instanceof Error)return f}return null}))},oneOf:function(e){return Array.isArray(e)?h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(d(a,e[s]))return null;var c=JSON.stringify(e,(function(e,t){return"symbol"===x(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var c=[],u=0;u<e.length;u++){var l=(0,e[u])(t,o,i,a,s,n);if(null==l)return null;l.data&&r(l.data,"expectedType")&&c.push(l.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],c=m(s);if("object"!==c)return new p("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");for(var u in e){var l=e[u];if("function"!=typeof l)return y(o,i,a,u,x(l));var f=l(s,u,o,i,a+"."+u,n);if(f)return f}return null}))},exact:function(e){return h((function(o,i,a,s,c){var u=o[i],l=m(u);if("object"!==l)return new p("Invalid "+s+" `"+c+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");var f=t({},o[i],e);for(var d in f){var h=e[d];if(r(e,d)&&"function"!=typeof h)return y(a,s,c,d,x(h));if(!h)return new p("Invalid "+s+" `"+c+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=h(u,d,a,s,c+"."+d,n);if(g)return g}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,u,f,d,h){if(u=u||l,d=d||s,h!==n){if(c){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var y=u+":"+s;!t[y]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[y]=!0,r++)}}return null==a[s]?o?null===a[s]?new p("The "+f+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new p("The "+f+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(a,s,u,f,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function g(e){return h((function(t,n,r,o,i,a){var s=t[n];return m(s)!==e?new p("Invalid "+o+" `"+i+"` of type `"+x(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function y(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||s(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function x(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=x(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},q}()(J.isElement,!0)}else O.exports=function(){if(V)return U;V=1;var e=G();function t(){}function n(){}return n.resetWarningCache=t,U=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();function Q(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function X(e,t,n,r,o){const i=e[t],a=o||t;if(null==i||"undefined"==typeof window)return null;let s;const c=i.type;return"function"!=typeof c||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(c)||(s="Did you accidentally use a plain function component for an element instead?"),void 0!==s?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const ee=Q(O.exports.element,X);ee.isRequired=Q(O.exports.element.isRequired,X),Q(O.exports.elementType,(function(e,t,n,r,o){const i=e[t],a=o||t;if(null==i||"undefined"==typeof window)return null;let s;return"function"!=typeof i||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(i)||(s="Did you accidentally provide a plain function component instead?"),void 0!==s?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}));const te="exact-prop: ​";function ne(e){return"production"===process.env.NODE_ENV?e:{...e,[te]:t=>{const n=Object.keys(t).filter((t=>!e.hasOwnProperty(t)));return n.length>0?new Error(`The following props are not supported: ${n.map((e=>`\`${e}\``)).join(", ")}. Please remove them.`):null}}}var re,oe={};var ie,ae,se={};
15
+ /**
16
+ * @license React
17
+ * react-is.development.js
18
+ *
19
+ * Copyright (c) Facebook, Inc. and its affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */function ce(e,t,n,r,o){if("production"===process.env.NODE_ENV)return null;const i=e[t],a=o||t;return null==i?null:i&&1!==i.nodeType?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}function ue(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}function le(e){return e&&e.ownerDocument||document}function fe(e){return le(e).defaultView||window}function de(e,t){"function"==typeof e?e(t):e&&(e.current=t)}ae={exports:{}},"production"===process.env.NODE_ENV?ae.exports=function(){if(re)return oe;re=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case l:case f:return e;default:switch(e=e&&e.$$typeof){case c:case s:case u:case p:case d:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),oe.ContextConsumer=s,oe.ContextProvider=a,oe.Element=t,oe.ForwardRef=u,oe.Fragment=r,oe.Lazy=p,oe.Memo=d,oe.Portal=n,oe.Profiler=i,oe.StrictMode=o,oe.Suspense=l,oe.SuspenseList=f,oe.isAsyncMode=function(){return!1},oe.isConcurrentMode=function(){return!1},oe.isContextConsumer=function(e){return g(e)===s},oe.isContextProvider=function(e){return g(e)===a},oe.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},oe.isForwardRef=function(e){return g(e)===u},oe.isFragment=function(e){return g(e)===r},oe.isLazy=function(e){return g(e)===p},oe.isMemo=function(e){return g(e)===d},oe.isPortal=function(e){return g(e)===n},oe.isProfiler=function(e){return g(e)===i},oe.isStrictMode=function(e){return g(e)===o},oe.isSuspense=function(e){return g(e)===l},oe.isSuspenseList=function(e){return g(e)===f},oe.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===l||t===f||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===a||t.$$typeof===s||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},oe.typeOf=g,oe}():ae.exports=(ie||(ie=1,"production"!==process.env.NODE_ENV&&function(){var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var g=e.type;switch(g){case r:case i:case o:case l:case f:return g;default:var y=g&&g.$$typeof;switch(y){case c:case s:case u:case p:case d:case a:return y;default:return h}}case n:return h}}}e=Symbol.for("react.module.reference");var y=s,v=a,m=t,x=u,b=r,w=p,_=d,j=n,k=i,C=o,S=l,T=f,E=!1,O=!1;se.ContextConsumer=y,se.ContextProvider=v,se.Element=m,se.ForwardRef=x,se.Fragment=b,se.Lazy=w,se.Memo=_,se.Portal=j,se.Profiler=k,se.StrictMode=C,se.Suspense=S,se.SuspenseList=T,se.isAsyncMode=function(e){return E||(E=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1},se.isConcurrentMode=function(e){return O||(O=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1},se.isContextConsumer=function(e){return g(e)===s},se.isContextProvider=function(e){return g(e)===a},se.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},se.isForwardRef=function(e){return g(e)===u},se.isFragment=function(e){return g(e)===r},se.isLazy=function(e){return g(e)===p},se.isMemo=function(e){return g(e)===d},se.isPortal=function(e){return g(e)===n},se.isProfiler=function(e){return g(e)===i},se.isStrictMode=function(e){return g(e)===o},se.isSuspense=function(e){return g(e)===l},se.isSuspenseList=function(e){return g(e)===f},se.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===l||t===f||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===a||t.$$typeof===s||t.$$typeof===u||t.$$typeof===e||void 0!==t.getModuleId)},se.typeOf=g}()),se),"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.exports.oneOfType([O.exports.func,O.exports.object]);const pe="undefined"!=typeof window?v.useLayoutEffect:v.useEffect;function he(e){const t=v.useRef(e);return pe((()=>{t.current=e})),v.useRef(((...e)=>(0,t.current)(...e))).current}function ge(...e){return v.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{de(e,t)}))}),e)}function ye(e,t,n,r){const o=e[t];if(null==o||!Number.isInteger(o)){const e=function(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return null===e?"null":e.constructor.name;default:return t}}(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${e}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function ve(e,t,...n){return void 0===e[t]?null:ye(e,t,...n)}function me(){return null}ve.isRequired=ye,me.isRequired=me,process.env.NODE_ENV;const xe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function be(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=be(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function we(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=be(e))&&(r&&(r+=" "),r+=t);return r}function _e(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}function je(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function ke(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(n,r),{props:s,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=we(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=_e({...o,...r}),s=je(r),c=je(o),u=t(a),l=we(u?.className,n?.className,i,o?.className,r?.className),f={...u?.style,...n?.style,...o?.style,...r?.style},d={...u,...n,...c,...s};return l.length>0&&(d.className=l),Object.keys(f).length>0&&(d.style=f),{props:d,internalRef:u.ref}}({...i,externalSlotProps:a}),u=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...s,ref:ge(c,a?.ref,e.additionalProps?.ref)},r);return u}function Ce(e){return e&&v.isValidElement(e)?e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref:null}const Se={disableDefaultClasses:!1},Te=v.createContext(Se);"production"!==process.env.NODE_ENV&&(Te.displayName="ClassNameConfiguratorContext");const Ee=v.forwardRef((function(e,t){const{children:n,container:r,disablePortal:o=!1}=e,[i,s]=v.useState(null),c=ge(Ce(n),t);if(pe((()=>{o||s(function(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,o]),pe((()=>{if(i&&!o)return de(t,i),()=>{de(t,null)}}),[t,i,o]),o){if(v.isValidElement(n)){const e={ref:c};return v.cloneElement(n,e)}return a.jsx(v.Fragment,{children:n})}return a.jsx(v.Fragment,{children:i?m.createPortal(n,i):i})}));function Oe(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Be(e){return parseInt(fe(e).getComputedStyle(e).paddingRight,10)||0}function Ie(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&Oe(e,o)}))}function Re(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Ae(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=le(e);return t.body===e?fe(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(le(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Be(r)+e}px`;const t=le(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Be(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=le(r).body;else{const t=r.parentElement,n=fe(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}"production"!==process.env.NODE_ENV&&(Ee.propTypes={children:O.exports.node,container:O.exports.oneOfType([ce,O.exports.func]),disablePortal:O.exports.bool}),"production"!==process.env.NODE_ENV&&(Ee.propTypes=ne(Ee.propTypes));const Pe=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Oe(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Ie(t,e.mount,e.modalRef,r,!0);const o=Re(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Re(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=Ae(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Re(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Oe(e.modalRef,t),Ie(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Oe(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Le(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Pe,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:c,onClose:u,open:l,rootRef:f}=e,d=v.useRef({}),p=v.useRef(null),h=v.useRef(null),g=ge(h,f),[y,m]=v.useState(!l),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(d.current.modalRef=h.current,d.current.mount=p.current,d.current),_=()=>{o.mount(w(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},j=he((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||le(p.current).body;o.add(w(),e),h.current&&_()})),k=v.useCallback((()=>o.isTopModal(w())),[o]),C=he((e=>{p.current=e,e&&(l&&k()?_():h.current&&Oe(h.current,b))})),S=v.useCallback((()=>{o.remove(w(),b)}),[b,o]);v.useEffect((()=>()=>{S()}),[S]),v.useEffect((()=>{l?j():x&&i||S()}),[l,S,x,i,j]);const T=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&k()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},E=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=_e(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:T(r),ref:g}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:E(t),open:l}},getTransitionProps:()=>({onEnter:ue((()=>{m(!1),a&&a()}),c?.props.onEnter),onExited:ue((()=>{m(!0),s&&s(),i&&S()}),c?.props.onExited)}),rootRef:g,portalRef:C,isTopModal:k,exited:y,hasTransition:x}}const $e=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Ne(e){const t=[],n=[];return Array.from(e.querySelectorAll($e)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function We(){return!0}function Me(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Ne,isEnabled:s=We,open:c}=e,u=v.useRef(!1),l=v.useRef(null),f=v.useRef(null),d=v.useRef(null),p=v.useRef(null),h=v.useRef(!1),g=v.useRef(null),y=ge(Ce(t),g),m=v.useRef(null);v.useEffect((()=>{c&&g.current&&(h.current=!n)}),[n,c]),v.useEffect((()=>{if(!c||!g.current)return;const e=le(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||("production"!==process.env.NODE_ENV&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join("\n")),g.current.setAttribute("tabIndex","-1")),h.current&&g.current.focus()),()=>{o||(d.current&&d.current.focus&&(u.current=!0,d.current.focus()),d.current=null)}}),[c]),v.useEffect((()=>{if(!c||!g.current)return;const e=le(g.current),t=t=>{m.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(u.current=!0,f.current&&f.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!s()||u.current)return void(u.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==l.current&&e.activeElement!==f.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let n=[];if(e.activeElement!==l.current&&e.activeElement!==f.current||(n=i(g.current)),n.length>0){const e=Boolean(m.current?.shiftKey&&"Tab"===m.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,s,c,i]);const x=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return a.jsxs(v.Fragment,{children:[a.jsx("div",{tabIndex:c?0:-1,onFocus:x,ref:l,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:y,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),a.jsx("div",{tabIndex:c?0:-1,onFocus:x,ref:f,"data-testid":"sentinelEnd"})]})}"production"!==process.env.NODE_ENV&&(Me.propTypes={children:ee,disableAutoFocus:O.exports.bool,disableEnforceFocus:O.exports.bool,disableRestoreFocus:O.exports.bool,getTabbable:O.exports.func,isEnabled:O.exports.func,open:O.exports.bool.isRequired}),"production"!==process.env.NODE_ENV&&(Me.propTypes=ne(Me.propTypes));const De="base";function Fe(e,t){const n=xe[t];return n?`${De}--${n}`:function(e,t){return`${De}-${e}-${t}`}(e,t)}const qe="Modal";function ze(e){return Fe(qe,e)}!function(e,t){const n={};t.forEach((t=>{n[t]=Fe(e,t)}))}(qe,["root","hidden","backdrop"]);const Ue=e=>{const{open:t,exited:n}=e;return function(e,t,n){const r={};for(const o in e){const i=e[o];let a="";for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=t(r)+" ",n&&n[r]&&(a+=n[r]+" "))}r[o]=a}return r}({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},function(e){const{disableDefaultClasses:t}=v.useContext(Te);return n=>t?"":e(n)}(ze))},Ve=v.forwardRef((function(e,t){const{children:n,closeAfterTransition:r=!1,container:o,disableAutoFocus:i=!1,disableEnforceFocus:s=!1,disableEscapeKeyDown:c=!1,disablePortal:u=!1,disableRestoreFocus:l=!1,disableScrollLock:f=!1,hideBackdrop:d=!1,keepMounted:p=!1,onBackdropClick:h,onClose:g,onKeyDown:y,open:m,onTransitionEnter:x,onTransitionExited:b,slotProps:w={},slots:_={},...j}=e,k={...e,closeAfterTransition:r,disableAutoFocus:i,disableEnforceFocus:s,disableEscapeKeyDown:c,disablePortal:u,disableRestoreFocus:l,disableScrollLock:f,hideBackdrop:d,keepMounted:p},{getRootProps:C,getBackdropProps:S,getTransitionProps:T,portalRef:E,isTopModal:O,exited:B,hasTransition:I}=Le({...k,rootRef:t}),R={...k,exited:B,hasTransition:I},A=Ue(R),P={};if(void 0===n.props.tabIndex&&(P.tabIndex="-1"),I){const{onEnter:e,onExited:t}=T();P.onEnter=e,P.onExited=t}const L=_.root??"div",$=ke({elementType:L,externalSlotProps:w.root,externalForwardedProps:j,getSlotProps:C,className:A.root,ownerState:R}),N=_.backdrop,W=ke({elementType:N,externalSlotProps:w.backdrop,getSlotProps:e=>S({...e,onClick:t=>{h&&h(t),e?.onClick&&e.onClick(t)}}),className:A.backdrop,ownerState:R});return p||m||I&&!B?a.jsx(Ee,{ref:E,container:o,disablePortal:u,children:a.jsxs(L,{...$,children:[!d&&N?a.jsx(N,{...W}):null,a.jsx(Me,{disableEnforceFocus:s,disableAutoFocus:i,disableRestoreFocus:l,isEnabled:O,open:m,children:v.cloneElement(n,P)})]})}):null}));function He(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=He(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ke(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=He(e))&&(r&&(r+=" "),r+=t);return r}function Ze({children:e,center:r,onClose:o,sx:i}){return a.jsxs(t.Box,{sx:Object.assign({position:"relative",display:"flex",alignItems:"center",p:20,justifyContent:r?"center":"flex-start"},i),children:[a.jsx(t.Box,{component:"h5",sx:{typography:"h5",margin:0,padding:0},children:e}),!!o&&a.jsx(t.Box,{component:t.ButtonBase,onClick:()=>o(),sx:{position:"absolute",top:20,right:20,color:"text.secondary","&:hover":{color:"text.primary"}},children:a.jsx(t.Box,{component:n.Error,sx:{width:24,height:24}})})]})}"production"!==process.env.NODE_ENV&&(Ve.propTypes={children:ee.isRequired,closeAfterTransition:O.exports.bool,container:O.exports.oneOfType([ce,O.exports.func]),disableAutoFocus:O.exports.bool,disableEnforceFocus:O.exports.bool,disableEscapeKeyDown:O.exports.bool,disablePortal:O.exports.bool,disableRestoreFocus:O.exports.bool,disableScrollLock:O.exports.bool,hideBackdrop:O.exports.bool,keepMounted:O.exports.bool,onBackdropClick:O.exports.func,onClose:O.exports.func,onTransitionEnter:O.exports.func,onTransitionExited:O.exports.func,open:O.exports.bool.isRequired,slotProps:O.exports.shape({backdrop:O.exports.oneOfType([O.exports.func,O.exports.object]),root:O.exports.oneOfType([O.exports.func,O.exports.object])}),slots:O.exports.shape({backdrop:O.exports.elementType,root:O.exports.elementType})});const Ge=i.forwardRef(((e,n)=>{const{open:r,className:o}=e,i=C(e,["open","className"]);return a.jsx(t.Box,{className:Ke({"MuiBackdrop-open":r},o),sx:{position:"fixed",inset:0,zIndex:-1,backgroundColor:"background.backdrop","-webkitTapHighlightColor":"transparent"},ref:n,...i})}));function Ye(e){var n,r,{children:o,sx:i,bodySx:s,slots:c,width:u}=e,l=C(e,["children","sx","bodySx","slots","width"]);const f=t.useTheme();return a.jsx(t.Box,{component:Ve,slots:Object.assign({backdrop:Ge},c),sx:Object.assign({position:"fixed",inset:0,display:"flex",alignItems:"flex-end",[f.breakpoints.up("tablet")]:{alignItems:"center",justifyContent:"center"},zIndex:null!==(r=null===(n=f.zIndex)||void 0===n?void 0:n.modal)&&void 0!==r?r:100},i),...l,children:a.jsx(t.Box,{sx:Object.assign({display:"flex",flexDirection:"column",backgroundColor:"background.paper",borderTopWidth:1,maxHeight:"80vh",borderRadius:f.spacing(6,6,0,0),width:"100%",[f.breakpoints.up("tablet")]:{minWidth:null!=u?u:420,width:u,borderRadius:12}},s),children:o})})}Ge.displayName="Backdrop";const Je="DODO_WIDGET_TOKEN_FIAT_PRICE_LIST";function Qe(){const e=localStorage.getItem(Je);try{return e?JSON.parse(e):{}}catch(e){return console.error(e),{}}}function Xe(e){return["fetch","fetchFiatPrice",e]}function et(e){const{encryptFiatPriceToken:t,restApiRequests:n}=w();return l.useQuery({enabled:!!e.length,queryKey:Xe(e),queryFn:()=>S(this,void 0,void 0,(function*(){const r=(null==t?void 0:t())||"",o=null!=n?n:new f.RestApiRequests,{result:i}=yield o.postJson("/frontend-v2-price-api/current/batch",{networks:e.map((e=>f.platformIdMap[e.chainId])),addresses:e.map((e=>e.address)),symbols:e.map((e=>e.symbol)),isCache:!0},void 0,{headers:{"pass-key":r}}),a=new Map;return i.data&&(i.data.forEach((e=>{const t=Number(e.price);!Number.isNaN(t)&&t>0&&a.set(e.address,t)})),function(e){const t=Qe(),n=Object.assign(Object.assign({},t),e);localStorage.setItem(Je,JSON.stringify(n))}(Object.fromEntries(a.entries()))),a}))})}function tt({account:e,visible:t}){const{tokenList:n}=w(),r=function({account:e,tokenList:t,blockNumber:n,skip:r}){return l.useQueries({queries:(null!=t?t:[]).map((t=>{const o=u.getFetchERC20BalanceOfQueryOptions(r?void 0:t.chainId,null==t?void 0:t.address,e);return{queryKey:n?[...o.queryKey,n]:o.queryKey,enabled:o.enabled&&!r,queryFn:o.queryFn}})),combine:e=>{const n=new Map;return e.forEach(((e,r)=>{const o=null==t?void 0:t[r];e.data&&o&&n.set(`${o.chainId}-${o.address}`,e.data)})),{tokenInfoMap:n,data:e.map((e=>e.data)),isPending:e.some((e=>e.isPending)),isLoading:e.some((e=>e.isLoading))}}})}({account:e,tokenList:n,skip:!t}),o=i.useMemo((()=>{let e=[];return r.tokenInfoMap.forEach(((t,r)=>{if(t>0){const o=n.find((e=>`${e.chainId}-${e.address}`===r));void 0!==(null==o?void 0:o.decimals)&&e.push(Object.assign(Object.assign({},o),{balance:new c(t.toString()).div(10**o.decimals)}))}})),e=e.sort(((e,t)=>e.balance.gt(t.balance)?-1:1)),e}),[r.tokenInfoMap]),a=et(o),s=r.isLoading||r.isPending,f=i.useMemo((()=>o.map((e=>{var t,n,r;const o=(null===(t=a.data)||void 0===t?void 0:t.get(e.address))?e.balance.times(null!==(r=null===(n=a.data)||void 0===n?void 0:n.get(e.address))&&void 0!==r?r:0):void 0;return Object.assign(Object.assign({},e),{fiatPriceBalance:o})})).sort(((e,t)=>{if(e.fiatPriceBalance&&t.fiatPriceBalance)return e.fiatPriceBalance.gt(t.fiatPriceBalance)?-1:1;const n=Qe(),r=n[e.address],o=n[t.address];return r&&o?e.balance.times(r).gt(t.balance.times(o))?-1:1:e.balance.gt(t.balance)?-1:1}))),[o,a.data]),d=i.useMemo((()=>{let e=new c(0);return f.forEach((t=>{t.fiatPriceBalance&&(e=e.plus(t.fiatPriceBalance))})),e}),[f]);return{tokenLoading:!!s&&!f.length,hasBalanceList:f,fiatPriceQuery:a,allFiatPriceBalance:d,allFiatPriceBalanceLoading:a.isLoading&&!!o.length||s}}var nt;!function(e){e.Running="pending",e.Success="success",e.Failed="failed",e.Warning="reset"}(nt||(nt={}));const rt=1e3,ot=1e6;function it(e){return new c(e).negated()}function at(e,t=4){return!e||e.isNaN()?"-":e.eq(0)?"0":e.lte(1e-6)&&e.gte(-1e-6)?e.toExponential(2):e.lt(1)&&e.gt(-1)||e.lt(rt)&&e.gt(it(rt))?st({input:e,showDecimals:t}):e.lt(ot)&&e.gt(it(ot))?`${st({input:e.div(rt),showDecimals:2})}K`:`${st({input:e.div(ot),showDecimals:2})}M`}function st({input:e,showDecimals:t=4,showPrecisionDecimals:n=2,exponentialDecimalsAmount:r=8,showIntegerOnly:o=!1,showDecimalsOnly:i=!1,noGroupSeparator:a=!1,roundingMode:s=c.ROUND_DOWN}){const u=new c(e);if(u.isNaN())return"-";let l=u.dp(t,s);if(l.eq(0)&&(u.gt(0)||u.lt(0))){const e=null!=n?n:t;l=u.sd(e,c.ROUND_DOWN);const a=l.dp();if(a&&a>r&&!i&&!o)return l.toExponential();l=u.sd(null!=n?n:t,c.ROUND_DOWN)}return o&&(l=l.integerValue(c.ROUND_DOWN)),i&&(l=l.minus(l.integerValue(c.ROUND_DOWN))),a?l.toFormat({decimalSeparator:".",groupSeparator:"",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0}):l.toFormat()}var ct={},ut={},lt={exports:{}};!function(e){var t,n;t=E,n=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n="boolean"==typeof(new RegExp).sticky;function r(e){return e&&"[object RegExp]"===t.call(e)}function o(e){return e&&"object"==typeof e&&!r(e)&&!Array.isArray(e)}function i(e){return"("+e+")"}function a(e){return e.length?"(?:"+e.map((function(e){return"(?:"+e+")"})).join("|")+")":"(?!)"}function s(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(r(e)){if(e.ignoreCase)throw new Error("RegExp /i flag not allowed");if(e.global)throw new Error("RegExp /g flag is implied");if(e.sticky)throw new Error("RegExp /y flag is implied");if(e.multiline)throw new Error("RegExp /m flag is implied");return e.source}throw new Error("Not a pattern: "+e)}function c(e,t){return e.length>t?e:Array(t-e.length+1).join(" ")+e}function u(t,n){if(o(n)||(n={match:n}),n.include)throw new Error("Matching rules cannot also include states");var i={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var a in n)e.call(n,a)&&(i[a]=n[a]);if("string"==typeof i.type&&t!==i.type)throw new Error("Type transform cannot be a string (type '"+i.type+"' for token '"+t+"')");var s=i.match;return i.match=Array.isArray(s)?s:s?[s]:[],i.match.sort((function(e,t){return r(e)&&r(t)?0:r(t)?-1:r(e)?1:t.length-e.length})),i}function l(e){return Array.isArray(e)?function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.include)for(var o=[].concat(r.include),i=0;i<o.length;i++)t.push({include:o[i]});else{if(!r.type)throw new Error("Rule has no type: "+JSON.stringify(r));t.push(u(r.type,r))}}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),n=[],r=0;r<t.length;r++){var i=t[r],a=e[i],s=[].concat(a);if("include"!==i){var c=[];s.forEach((function(e){o(e)?(c.length&&n.push(u(i,c)),n.push(u(i,e)),c=[]):c.push(e)})),c.length&&n.push(u(i,c))}else for(var l=0;l<s.length;l++)n.push({include:s[l]})}return n}(e)}var f=u("error",{lineBreaks:!0,shouldThrow:!0});function d(e,t){for(var o=null,c=Object.create(null),u=!0,l=null,d=[],p=[],h=0;h<e.length;h++)e[h].fallback&&(u=!1);for(h=0;h<e.length;h++){var g=e[h];if(g.include)throw new Error("Inheritance is not allowed in stateless lexers");if(g.error||g.fallback){if(o)throw!g.fallback==!o.fallback?new Error("Multiple "+(g.fallback?"fallback":"error")+" rules not allowed (for token '"+g.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+g.defaultType+"')");o=g}var y=g.match.slice();if(u)for(;y.length&&"string"==typeof y[0]&&1===y[0].length;)c[y.shift().charCodeAt(0)]=g;if(g.pop||g.push||g.next){if(!t)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+g.defaultType+"')");if(g.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+g.defaultType+"')")}if(0!==y.length){u=!1,d.push(g);for(var v=0;v<y.length;v++){var m=y[v];if(r(m))if(null===l)l=m.unicode;else if(l!==m.unicode&&!1===g.fallback)throw new Error("If one rule is /u then all must be")}var x=a(y.map(s)),b=new RegExp(x);if(b.test(""))throw new Error("RegExp matches empty string: "+b);if(new RegExp("|"+x).exec("").length-1>0)throw new Error("RegExp has capture groups: "+b+"\nUse (?: … ) instead");if(!g.lineBreaks&&b.test("\n"))throw new Error("Rule should declare lineBreaks: "+b);p.push(i(x))}}var w=o&&o.fallback,_=n&&!w?"ym":"gm",j=n||w?"":"|";return!0===l&&(_+="u"),{regexp:new RegExp(a(p)+j,_),groups:d,fast:c,error:o||f}}function p(e,t,n){var r=e&&(e.push||e.next);if(r&&!n[r])throw new Error("Missing state '"+r+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw new Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var h=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};h.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:"",this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},h.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},h.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},h.prototype.popState=function(){this.setState(this.stack.pop())},h.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var g=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return 0===n[0].length?null:n};function y(){return this.value}if(h.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n<t;n++)if(void 0!==e[n+1])return this.groups[n];throw new Error("Cannot find token type for matched text")},h.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var n=this.buffer;if(e!==n.length){if(a=this.fast[n.charCodeAt(e)])return this._token(a,n.charAt(e),e);var r=this.re;r.lastIndex=e;var o=g(r,n),i=this.error;if(null==o)return this._token(i,n.slice(e,n.length),e);var a=this._getGroup(o),s=o[0];return i.fallback&&o.index!==e?(this.queuedGroup=a,this.queuedText=s,this._token(i,n.slice(e,o.index),e)):this._token(a,s,e)}},h.prototype._token=function(e,t,n){var r=0;if(e.lineBreaks){var o=/\n/g,i=1;if("\n"===t)r=1;else for(;o.exec(t);)r++,i=o.lastIndex}var a={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:y,offset:n,lineBreaks:r,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=r,0!==r?this.col=s-i+1:this.col+=s,e.shouldThrow)throw new Error(this.formatError(a,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),a},"undefined"!=typeof Symbol&&Symbol.iterator){var v=function(e){this.lexer=e};v.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},v.prototype[Symbol.iterator]=function(){return this},h.prototype[Symbol.iterator]=function(){return new v(this)}}return h.prototype.formatError=function(e,t){if(null==e){var n=this.buffer.slice(this.index);e={text:n,offset:this.index,lineBreaks:-1===n.indexOf("\n")?0:1,line:this.line,col:this.col}}var r=Math.max(e.line-2,1),o=e.line+2,i=String(o).length,a=function(e,t){for(var n=e.length,r=0;;){var o=e.lastIndexOf("\n",n-1);if(-1===o)break;if(n=o,++r===t)break;if(0===n)break}var i=r<t?0:n+1;return e.substring(i).split("\n")}(this.buffer,this.line-e.line+2+1).slice(0,5),s=[];s.push(t+" at line "+e.line+" col "+e.col+":"),s.push("");for(var u=0;u<a.length;u++){var l=a[u],f=r+u;s.push(c(String(f),i)+" "+l),f===e.line&&s.push(c("",i+e.col+1)+"^")}return s.join("\n")},h.prototype.clone=function(){return new h(this.states,this.state)},h.prototype.has=function(e){return!0},{compile:function(e){var t=d(l(e));return new h({start:t},"start")},states:function(e,t){var n=e.$all?l(e.$all):[];delete e.$all;var r=Object.getOwnPropertyNames(e);t||(t=r[0]);for(var o=Object.create(null),i=0;i<r.length;i++)o[x=r[i]]=l(e[x]).concat(n);for(i=0;i<r.length;i++)for(var a=o[x=r[i]],s=Object.create(null),c=0;c<a.length;c++){var u=a[c];if(u.include){var f=[c,1];if(u.include!==x&&!s[u.include]){s[u.include]=!0;var g=o[u.include];if(!g)throw new Error("Cannot include nonexistent state '"+u.include+"' (in state '"+x+"')");for(var y=0;y<g.length;y++){var v=g[y];-1===a.indexOf(v)&&f.push(v)}}a.splice.apply(a,f),c--}}var m=Object.create(null);for(i=0;i<r.length;i++){var x;m[x=r[i]]=d(o[x],!0)}for(i=0;i<r.length;i++){var b=r[i],w=m[b],_=w.groups;for(c=0;c<_.length;c++)p(_[c],b,m);var j=Object.getOwnPropertyNames(w.fast);for(c=0;c<j.length;c++)p(w.fast[j[c]],b,m)}return new h(m,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t="undefined"!=typeof Map,n=t?new Map:Object.create(null),r=Object.getOwnPropertyNames(e),o=0;o<r.length;o++){var i=r[o],a=e[i];(Array.isArray(a)?a:[a]).forEach((function(e){if("string"!=typeof e)throw new Error("keyword must be string (in keyword '"+i+"')");t?n.set(e,i):n[e]=i}))}return function(e){return t?n.get(e):n[e]}}}},e.exports?e.exports=n():t.moo=n()}(lt),function(e){var t=E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.lexer=e.states=void 0;const n=t(lt.exports);e.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:e=>e.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:e=>e.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:e=>e.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:e=>e.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:e=>e.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:e=>e.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:e=>e.substring(0,e.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},e.lexer=n.default.states(e.states)}(ut),Object.defineProperty(ct,"__esModule",{value:!0});var ft=ct.parse=ct.ParseError=void 0;const dt=ut,pt=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),ht=e=>"plural"===e||"select"===e||"selectordinal"===e;const gt=["number","date","time","spellout","ordinal","duration"],yt=["zero","one","two","few","many","other"];class vt extends Error{constructor(e,t){super(dt.lexer.formatError(e,t))}}ct.ParseError=vt;class mt{constructor(e,t){var n,r,o,i;this.lexer=dt.lexer.reset(e),this.cardinalKeys=null!==(n=null==t?void 0:t.cardinal)&&void 0!==n?n:yt,this.ordinalKeys=null!==(r=null==t?void 0:t.ordinal)&&void 0!==r?r:yt,this.strict=null!==(o=null==t?void 0:t.strict)&&void 0!==o&&o,this.strictPluralKeys=null===(i=null==t?void 0:t.strictPluralKeys)||void 0===i||i}parse(){return this.parseBody(!1,!0)}checkSelectKey(e,t,n){if("="===n[0]){if("select"===t)throw new vt(e,`The case ${n} is not valid with select`)}else if("select"!==t){const r="plural"===t?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&r.length>0&&!r.includes(n)){throw new vt(e,`The ${t} case ${n} is not valid in this locale`)}}}parseSelect({value:e},t,n,r){const o={type:r,arg:e,cases:[],ctx:n};"plural"===r||"selectordinal"===r?t=!0:this.strict&&(t=!1);for(const e of this.lexer)switch(e.type){case"offset":if("select"===r)throw new vt(e,"Unexpected plural offset for select");if(o.cases.length>0)throw new vt(e,"Plural offset must be set before cases");o.pluralOffset=Number(e.value),n.text+=e.text,n.lineBreaks+=e.lineBreaks;break;case"case":this.checkSelectKey(e,r,e.value),o.cases.push({key:e.value,tokens:this.parseBody(t),ctx:pt(e)});break;case"end":return o;default:throw new vt(e,`Unexpected lexer token: ${e.type}`)}throw new vt(null,"Unexpected message end")}parseArgToken(e,t){const n=pt(e),r=this.lexer.next();if(!r)throw new vt(null,"Unexpected message end");if(n.text+=r.text,n.lineBreaks+=r.lineBreaks,this.strict&&("func-simple"===r.type||"func-args"===r.type)&&!gt.includes(r.value)){const t=`Invalid strict mode function arg type: ${r.value}`;throw new vt(e,t)}switch(r.type){case"end":return{type:"argument",arg:e.value,ctx:n};case"func-simple":{const t=this.lexer.next();if(!t)throw new vt(null,"Unexpected message end");if("end"!==t.type)throw new vt(t,`Unexpected lexer token: ${t.type}`);if(n.text+=t.text,ht(r.value.toLowerCase()))throw new vt(r,`Invalid type identifier: ${r.value}`);return{type:"function",arg:e.value,key:r.value,ctx:n}}case"func-args":{if(ht(r.value.toLowerCase())){const e=`Invalid type identifier: ${r.value}`;throw new vt(r,e)}let o=this.parseBody(!this.strict&&t);return this.strict&&o.length>0&&(o=function(e,t){let n="",r="";for(const o of t){const t=o.ctx.text;switch(r+=t,o.type){case"content":n+=o.value;break;case"argument":case"function":case"octothorpe":n+=t;break;default:throw new vt(e,`Unsupported part in strict mode function arg style: ${t}`)}}return[{type:"content",value:n.trim(),ctx:Object.assign({},t[0].ctx,{text:r})}]}(e,o)),{type:"function",arg:e.value,key:r.value,param:o,ctx:n}}case"select":if(ht(r.value))return this.parseSelect(e,t,n,r.value);throw new vt(r,`Unexpected select type ${r.value}`);default:throw new vt(r,`Unexpected lexer token: ${r.type}`)}}parseBody(e,t){const n=[];let r=null;for(const o of this.lexer)if("argument"===o.type)r&&(r=null),n.push(this.parseArgToken(o,e));else if("octothorpe"===o.type&&e)r&&(r=null),n.push({type:"octothorpe",ctx:pt(o)});else{if("end"===o.type&&!t)return n;{let t=o.value;if(!e&&"quoted"===o.type&&"#"===t[0]){if(t.includes("{")){throw new vt(o,`Unsupported escape pattern: ${t}`)}t=o.text}r?(r.value+=t,r.ctx.text+=o.text,r.ctx.lineBreaks+=o.lineBreaks):(r={type:"content",value:t,ctx:pt(o)},n.push(r))}}if(t)return n;throw new vt(null,"Unexpected message end")}}ft=ct.parse=function(e,t={}){return new mt(e,t).parse()};class xt extends Error{constructor(e,t,n){super(e),this.token=t,this.type=n||"error"}}const bt=e=>e<4?"short":4===e?"long":"narrow",wt=e=>e%2==0?"2-digit":"numeric";function _t(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:return void t(`${e.desc} is not supported with width ${e.width}`)}}function jt(e,t){const{char:n,desc:r,width:o}=e;return"d"===n?wt(o):void t(`${r} is not supported`)}function kt(e,t){const{char:n,desc:r,width:o}=e;if(("c"===n||"e"===n)&&o<3){t(`Numeric value is not supported for ${r}; falling back to weekday:short`,xt.WARNING)}return bt(o)}function Ct(e,t){const{char:n,desc:r,width:o}=e;switch(n){case"v":case"z":return 4===o?"long":"short";case"V":return 4===o?"long":void t(`${r} is not supported with width ${o}`);case"X":return void t(`${r} is not supported`)}return"short"}function St(e,t){switch(e.field){case"era":return{era:bt(e.width)};case"year":return function(e,t){switch(e.char){case"y":return{year:wt(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t(`${e.desc} is not supported; falling back to year:numeric`,xt.WARNING),{year:"numeric"}}}(e,t);case"month":return{month:_t(e,t)};case"day":return{day:jt(e,t)};case"weekday":return{weekday:kt(e,t)};case"period":return;case"hour":return function(e){const t=wt(e.width);let n;switch(e.char){case"h":n="h12";break;case"H":n="h23";break;case"k":n="h24";break;case"K":n="h11"}return n?{hour:t,hourCycle:n}:{hour:t}}(e);case"min":return{minute:wt(e.width)};case"sec":return{second:wt(e.width)};case"tz":return{timeZoneName:Ct(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t(`${e.desc} is not supported`)}}const Tt={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},Et=e=>e>="A"&&e<="Z"||e>="a"&&e<="z";function Ot(e,t){const n=e[t];if(!n)return null;if(Et(n))return function(e,t){const n=e[t];let r=1;for(;e[++t]===n;)++r;const o=Tt[n];if(!o)return{char:n,error:new Error(`The letter ${n} is not a valid field identifier`),width:r};return{char:n,field:o.field,desc:o.desc,width:r}}(e,t);if("'"===n)return function(e,t){let n=e[++t],r=2;if("'"===n)return{char:"'",str:n,width:r};for(;;){const o=e[++t];if(++r,void 0===o)return{char:"'",error:new Error(`Unterminated quoted literal in pattern: ${n||e}`),str:n,width:r};if("'"===o){if("'"!==e[++t])return{char:"'",str:n,width:r};++r}n+=o}}(e,t);let r=n,o=1;for(;;){const i=e[++t];if(!i||Et(i)||"'"===i)return{char:n,str:r,width:o};r+=i,o+=1}}function Bt(e,t){return e.filter((e=>"content"!==e.type)).length?e.map((e=>{if("content"===e.type)return t(e.value);if("octothorpe"===e.type)return"#";if("argument"===e.type)return[e.arg];if("function"===e.type){const t=e?.param?.[0];if("date"===e.key&&t){const n=function(e,t){if(/^::/.test(e)){const n=function(e){const t=[];let n=0;for(;;){const r=Ot(e,n);if(!r)return t;t.push(r),n+=r.width}}(e.substring(2));return function(e,t,n=e=>{throw e}){const r={timeZone:t},o=[];for(const t of e){const{error:e,field:i,str:a}=t;if(e){const r=new xt(e.message,t);r.stack=e.stack,n(r)}a&&n(new xt(`Ignoring string part: ${a}`,t,xt.WARNING)),i&&(-1===o.indexOf(i)?o.push(i):n(new xt(`Duplicate ${i} token`,t)));const s=St(t,((e,r)=>n(new xt(e,t,r))));s&&Object.assign(r,s)}return r}(n,void 0,t)}return e}(t.value.trim(),(e=>{throw new Error(`Unable to compile date expression: ${e.message}`)}));return[e.arg,e.key,n]}return t?[e.arg,e.key,t.value.trim()]:[e.arg,e.key]}const n=e.pluralOffset,r={};return e.cases.forEach((({key:e,tokens:n})=>{const o="="===e[0]?e.slice(1):e;r[o]=Bt(n,t)})),[e.arg,e.type,{offset:n,...r}]})):e.map((e=>t(e.value)))}function It(e,t=e=>e){try{return function(e,t=e=>e){return Bt(ft(e),t)}(e,t)}catch(t){return console.error(`${t.message} \n\nMessage: ${e}`),[e]}}const Rt=e=>"string"==typeof e,At=new Map;function Pt(e){return[...Array.isArray(e)?e:[e],"en"]}function Lt(e,t,n){const r=Pt(e);let o;if(n||(n="default"),"string"==typeof n)switch(o={day:"numeric",month:"short",year:"numeric"},n){case"full":o.weekday="long";case"long":o.month="long";break;case"short":o.month="numeric"}else o=n;return Wt((()=>Mt("date",r,n)),(()=>new Intl.DateTimeFormat(r,o))).format(Rt(t)?new Date(t):t)}function $t(e,t,n){const r=Pt(e);return Wt((()=>Mt("number",r,n)),(()=>new Intl.NumberFormat(r,n))).format(t)}function Nt(e,t,n,{offset:r=0,...o}){const i=Pt(e),a=t?Wt((()=>Mt("plural-ordinal",i)),(()=>new Intl.PluralRules(i,{type:"ordinal"}))):Wt((()=>Mt("plural-cardinal",i)),(()=>new Intl.PluralRules(i,{type:"cardinal"})));return o[n]??o[a.select(n-r)]??o.other}function Wt(e,t){const n=e();let r=At.get(n);return r||(r=t(),At.set(n,r)),r}function Mt(e,t,n){return`${e}-${t.join("-")}-${JSON.stringify(n)}`}const Dt=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Ft=e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,((e,t,n)=>{if(t){const e=parseInt(t,16);return String.fromCharCode(e)}{const e=parseInt(n,16);return String.fromCharCode(e)}})),qt="%__lingui_octothorpe__%",zt=(e,t,n={})=>{const r=t||e,o=e=>"object"==typeof e?e:n[e],i=(e,t)=>{const i=Object.keys(n).length?o("number"):void 0,a=$t(r,e,i);return t.replace(new RegExp(qt,"g"),a)};return{plural:(e,t)=>{const{offset:n=0}=t,o=Nt(r,!1,e,t);return i(e-n,o)},selectordinal:(e,t)=>{const{offset:n=0}=t,o=Nt(r,!0,e,t);return i(e-n,o)},select:Ut,number:(e,t)=>$t(r,e,o(t)||{style:t}),date:(e,t)=>Lt(r,e,o(t)||t),time:(e,t)=>function(e,t,n){let r;if(n||(n="default"),"string"==typeof n)switch(r={second:"numeric",minute:"numeric",hour:"numeric"},n){case"full":case"long":r.timeZoneName="short";break;case"short":delete r.second}else r=n;return Lt(e,t,r)}(r,e,o(t)||t)}},Ut=(e,t)=>t[e]??t.other;var Vt=Object.defineProperty,Ht=(e,t,n)=>(((e,t,n)=>{t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,t+"",n),n);class Kt{constructor(){Ht(this,"_events",{})}on(e,t){var n;return(n=this._events)[e]??(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){const n=this._getListeners(e);if(!n)return;const r=n.indexOf(t);~r&&n.splice(r,1)}emit(e,...t){const n=this._getListeners(e);n&&n.map((e=>e.apply(this,t)))}_getListeners(e){const t=this._events[e];return!!Array.isArray(t)&&t}}var Zt=Object.defineProperty,Gt=(e,t,n)=>(((e,t,n)=>{t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Yt extends Kt{constructor(e){super(),Gt(this,"_locale",""),Gt(this,"_locales"),Gt(this,"_localeData",{}),Gt(this,"_messages",{}),Gt(this,"_missing"),Gt(this,"_messageCompiler"),Gt(this,"t",this._.bind(this)),"production"!==process.env.NODE_ENV&&this.setMessagesCompiler(It),null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),("string"==typeof e.locale||e.locales)&&this.activate(e.locale??"en",e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){const n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,t){"string"==typeof e?this._loadLocaleData(e,t):Object.keys(e).forEach((t=>this._loadLocaleData(t,e[t]))),this.emit("change")}_load(e,t){const n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){"string"==typeof e&&"object"==typeof t?this._load(e,t):Object.entries(e).forEach((([e,t])=>this._load(e,t))),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit("change")}activate(e,t){"production"!==process.env.NODE_ENV&&(this._messages[e]||console.warn(`Messages for locale "${e}" not loaded.`)),this._locale=e,this._locales=t,this.emit("change")}_(e,t,n){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let r=n?.message;e||(e=""),Rt(e)||(t=e.values||t,r=e.message,e=e.id);const o=this.messages[e],i=void 0===o,a=this._missing;if(a&&i)return"function"==typeof a?a(this._locale,e):a;i&&this.emit("missing",{id:e,locale:this._locale});let s=o||r||e;return Rt(s)&&(this._messageCompiler?s=this._messageCompiler(s):console.warn(`Uncompiled message detected! Message:\n\n> ${s}\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n`)),Rt(s)&&Dt.test(s)?Ft(s):Rt(s)?s:function(e,t,n){return(r={},o)=>{const i=zt(t,n,o),a=(e,t=!1)=>Array.isArray(e)?e.reduce(((e,n)=>{if("#"===n&&t)return e+qt;if(Rt(n))return e+n;const[o,s,c]=n;let u,l={};return"plural"===s||"selectordinal"===s||"select"===s?Object.entries(c).forEach((([e,t])=>{l[e]=a(t,"plural"===s||"selectordinal"===s)})):l=c,u=s?(0,i[s])(r[o],l):r[o],null==u?e:e+u}),""):e,s=a(e);return Rt(s)&&Dt.test(s)?Ft(s):Rt(s)?s:s?String(s):""}}(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return Lt(this._locales||this._locale,e,t)}number(e,t){return $t(this._locales||this._locale,e,t)}}const Jt=function(e={}){return new Yt(e)}();var Qt={exports:{}};function Xt({time:e}){if(!e)return"";const t=p(e),n=p(),r=n.diff(t,"h");if(r>24)return t.format("YYYY/MM/DD HH:MM");if(r>=1)return`${r}h ago`;const o=n.diff(t,"m");return o>=1?`${o}min ago`:`${n.diff(t,"s")}s`}!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",a=32,s=128,c=256,u=1/0,l=9007199254740991,f=NaN,d=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",c]],h="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",m="[object Error]",x="[object Function]",b="[object GeneratorFunction]",w="[object Map]",_="[object Number]",j="[object Object]",k="[object Promise]",C="[object RegExp]",S="[object Set]",T="[object String]",O="[object Symbol]",B="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",A="[object Float32Array]",P="[object Float64Array]",L="[object Int8Array]",$="[object Int16Array]",N="[object Int32Array]",W="[object Uint8Array]",M="[object Uint8ClampedArray]",D="[object Uint16Array]",F="[object Uint32Array]",q=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,K=RegExp(V.source),Z=RegExp(H.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,be=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",je="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",Te="\\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",Ee="['’]",Oe="["+we+"]",Be="["+Te+"]",Ie="["+_e+"]",Re="\\d+",Ae="["+je+"]",Pe="["+ke+"]",Le="[^"+we+Te+Re+je+ke+Ce+"]",$e="\\ud83c[\\udffb-\\udfff]",Ne="[^"+we+"]",We="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+Ce+"]",Fe="\\u200d",qe="(?:"+Pe+"|"+Le+")",ze="(?:"+De+"|"+Le+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Ve="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Ie+"|"+$e+")"+"?",Ke="["+Se+"]?",Ze=Ke+He+("(?:"+Fe+"(?:"+[Ne,We,Me].join("|")+")"+Ke+He+")*"),Ge="(?:"+[Ae,We,Me].join("|")+")"+Ze,Ye="(?:"+[Ne+Ie+"?",Ie,We,Me,Oe].join("|")+")",Je=RegExp(Ee,"g"),Qe=RegExp(Ie,"g"),Xe=RegExp($e+"(?="+$e+")|"+Ye+Ze,"g"),et=RegExp([De+"?"+Pe+"+"+Ue+"(?="+[Be,De,"$"].join("|")+")",ze+"+"+Ve+"(?="+[Be,De+qe,"$"].join("|")+")",De+"?"+qe+"+"+Ue,De+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ge].join("|"),"g"),tt=RegExp("["+Fe+we+_e+Se+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],ot=-1,it={};it[A]=it[P]=it[L]=it[$]=it[N]=it[W]=it[M]=it[D]=it[F]=!0,it[h]=it[g]=it[I]=it[y]=it[R]=it[v]=it[m]=it[x]=it[w]=it[_]=it[j]=it[C]=it[S]=it[T]=it[B]=!1;var at={};at[h]=at[g]=at[I]=at[R]=at[y]=at[v]=at[A]=at[P]=at[L]=at[$]=at[N]=at[w]=at[_]=at[j]=at[C]=at[S]=at[T]=at[O]=at[W]=at[M]=at[D]=at[F]=!0,at[m]=at[x]=at[B]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ut=parseInt,lt="object"==typeof E&&E&&E.Object===Object&&E,ft="object"==typeof self&&self&&self.Object===Object&&self,dt=lt||ft||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,gt=ht&&ht.exports===pt,yt=gt&&lt.process,vt=function(){try{var e=ht&&ht.require&&ht.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,xt=vt&&vt.isDate,bt=vt&&vt.isMap,wt=vt&&vt.isRegExp,_t=vt&&vt.isSet,jt=vt&&vt.isTypedArray;function kt(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 Ct(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 St(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(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 Ot(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 Bt(e,t){return!!(null==e?0:e.length)&&Dt(e,t,0)>-1}function It(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 Rt(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 At(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Pt(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 Lt(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 $t(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 Nt=Ut("length");function Wt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Mt(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 Dt(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):Mt(e,qt,n)}function Ft(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function qt(e){return e!=e}function zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:f}function Ut(e){return function(t){return null==t?n:t[e]}}function Vt(e){return function(t){return null==e?n:e[t]}}function Ht(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Kt(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Yt(e){return function(t){return e(t)}}function Jt(e,t){return Rt(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}var tn=Vt({"À":"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"}),nn=Vt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rn(e){return"\\"+st[e]}function on(e){return tt.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var s=e[n];s!==t&&s!==i||(e[n]=i,a[o++]=n)}return a}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return on(e)?function(e){var t=Xe.lastIndex=0;for(;Xe.test(e);)++t;return t}(e):Nt(e)}function dn(e){return on(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var hn=Vt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gn=function e(t){var E,oe=(t=null==t?dt:gn.defaults(dt.Object(),t,gn.pick(dt,rt))).Array,we=t.Date,_e=t.Error,je=t.Function,ke=t.Math,Ce=t.Object,Se=t.RegExp,Te=t.String,Ee=t.TypeError,Oe=oe.prototype,Be=je.prototype,Ie=Ce.prototype,Re=t["__core-js_shared__"],Ae=Be.toString,Pe=Ie.hasOwnProperty,Le=0,$e=(E=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",Ne=Ie.toString,We=Ae.call(Ce),Me=dt._,De=Se("^"+Ae.call(Pe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=gt?t.Buffer:n,qe=t.Symbol,ze=t.Uint8Array,Ue=Fe?Fe.allocUnsafe:n,Ve=sn(Ce.getPrototypeOf,Ce),He=Ce.create,Ke=Ie.propertyIsEnumerable,Ze=Oe.splice,Ge=qe?qe.isConcatSpreadable:n,Ye=qe?qe.iterator:n,Xe=qe?qe.toStringTag:n,tt=function(){try{var e=fi(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,lt=we&&we.now!==dt.Date.now&&we.now,ft=t.setTimeout!==dt.setTimeout&&t.setTimeout,pt=ke.ceil,ht=ke.floor,yt=Ce.getOwnPropertySymbols,vt=Fe?Fe.isBuffer:n,Nt=t.isFinite,Vt=Oe.join,yn=sn(Ce.keys,Ce),vn=ke.max,mn=ke.min,xn=we.now,bn=t.parseInt,wn=ke.random,_n=Oe.reverse,jn=fi(t,"DataView"),kn=fi(t,"Map"),Cn=fi(t,"Promise"),Sn=fi(t,"Set"),Tn=fi(t,"WeakMap"),En=fi(Ce,"create"),On=Tn&&new Tn,Bn={},In=Ni(jn),Rn=Ni(kn),An=Ni(Cn),Pn=Ni(Sn),Ln=Ni(Tn),$n=qe?qe.prototype:n,Nn=$n?$n.valueOf:n,Wn=$n?$n.toString:n;function Mn(e){if(es(e)&&!za(e)&&!(e instanceof zn)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Wi(e)}return new qn(e)}var Dn=function(){function e(){}return function(t){if(!Xa(t))return{};if(He)return He(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Fn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(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 Vn(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 Hn(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 Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Gn(e,t){var n=za(e),r=!n&&qa(e),o=!n&&!r&&Ka(e),i=!n&&!r&&!o&&cs(e),a=n||r||o||i,s=a?Zt(e.length,Te):[],c=s.length;for(var u in e)!t&&!Pe.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||mi(u,c))||s.push(u);return s}function Yn(e){var t=e.length;return t?e[Kr(0,t-1)]:n}function Jn(e,t){return Pi(Oo(e),ar(t,0,e.length))}function Qn(e){return Pi(Oo(e))}function Xn(e,t,r){(r!==n&&!Ma(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function er(e,t,r){var o=e[t];Pe.call(e,t)&&Ma(o,r)&&(r!==n||t in e)||or(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(Ma(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Bo(t,Bs(t),e)}function or(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var r=-1,o=t.length,i=oe(o),a=null==e;++r<o;)i[r]=a?n:Cs(e,t[r]);return i}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,o,i,a){var s,c=1&t,u=2&t,l=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!Xa(e))return e;var f=za(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Oo(e,s)}else{var d=hi(e),p=d==x||d==b;if(Ka(e))return jo(e,c);if(d==j||d==h||p&&!i){if(s=u||p?{}:yi(e),!c)return u?function(e,t){return Bo(e,pi(e),t)}(e,function(e,t){return e&&Bo(t,Is(t),e)}(s,e)):function(e,t){return Bo(e,di(e),t)}(e,rr(s,e))}else{if(!at[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case I:return ko(e);case y:case v:return new r(+e);case R:return function(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case P:case L:case $:case N:case W:case M:case D:case F:return Co(e,n);case w:return new r;case _:case T:return new r(e);case C:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case S:return new r;case O:return o=e,Nn?Ce(Nn.call(o)):{}}var o}(e,d,c)}}a||(a=new Zn);var g=a.get(e);if(g)return g;a.set(e,s),is(e)?e.forEach((function(n){s.add(sr(n,t,r,n,e,a))})):ts(e)&&e.forEach((function(n,o){s.set(o,sr(n,t,r,o,e,a))}));var m=f?n:(l?u?oi:ri:u?Is:Bs)(e);return St(m||e,(function(n,o){m&&(n=e[o=n]),er(s,o,sr(n,t,r,o,e,a))})),s}function cr(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ce(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,o){if("function"!=typeof e)throw new Ee(r);return Bi((function(){e.apply(n,o)}),t)}function lr(e,t,n,r){var o=-1,i=Bt,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;n&&(t=Rt(t,Yt(n))),r?(i=It,a=!1):t.length>=200&&(i=Qt,a=!1,t=new Kn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var d=u;d--;)if(t[d]===f)continue e;c.push(l)}else i(t,f,r)||c.push(l)}return c}Mn.templateSettings={escape:G,evaluate:Y,interpolate:J,variable:"",imports:{_:Mn}},Mn.prototype=Fn.prototype,Mn.prototype.constructor=Mn,qn.prototype=Dn(Fn.prototype),qn.prototype.constructor=qn,zn.prototype=Dn(Fn.prototype),zn.prototype.constructor=zn,Un.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(En){var r=t[e];return r===o?n:r}return Pe.call(t,e)?t[e]:n},Un.prototype.has=function(e){var t=this.__data__;return En?t[e]!==n:Pe.call(t,e)},Un.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=En&&t===n?o:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Vn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Vn.prototype.has=function(e){return tr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(kn||Vn),string:new Un}},Hn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ui(this,e).get(e)},Hn.prototype.has=function(e){return ui(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,o),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ao(xr),dr=Ao(br,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(c===n?s==s&&!ss(s):r(s,c)))var c=s,u=a}return u}function gr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function yr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=vi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?yr(s,t-1,n,r,o):At(o,s):r||(o[o.length]=s)}return o}var vr=Po(),mr=Po(!0);function xr(e,t){return e&&vr(e,t,Bs)}function br(e,t){return e&&mr(e,t,Bs)}function wr(e,t){return Ot(t,(function(t){return Ya(e[t])}))}function _r(e,t){for(var r=0,o=(t=xo(t,e)).length;null!=e&&r<o;)e=e[$i(t[r++])];return r&&r==o?e:n}function jr(e,t,n){var r=t(e);return za(e)?r:At(r,n(e))}function kr(e){return null==e?e===n?"[object Undefined]":"[object Null]":Xe&&Xe in Ce(e)?function(e){var t=Pe.call(e,Xe),r=e[Xe];try{e[Xe]=n;var o=!0}catch(e){}var i=Ne.call(e);o&&(t?e[Xe]=r:delete e[Xe]);return i}(e):function(e){return Ne.call(e)}(e)}function Cr(e,t){return e>t}function Sr(e,t){return null!=e&&Pe.call(e,t)}function Tr(e,t){return null!=e&&t in Ce(e)}function Er(e,t,r){for(var o=r?It:Bt,i=e[0].length,a=e.length,s=a,c=oe(a),u=1/0,l=[];s--;){var f=e[s];s&&t&&(f=Rt(f,Yt(t))),u=mn(f.length,u),c[s]=!r&&(t||i>=120&&f.length>=120)?new Kn(s&&f):n}f=e[0];var d=-1,p=c[0];e:for(;++d<i&&l.length<u;){var h=f[d],g=t?t(h):h;if(h=r||0!==h?h:0,!(p?Qt(p,g):o(l,g,r))){for(s=a;--s;){var y=c[s];if(!(y?Qt(y,g):o(e[s],g,r)))continue e}p&&p.push(g),l.push(h)}}return l}function Or(e,t,r){var o=null==(e=Ti(e,t=xo(t,e)))?e:e[$i(Gi(t))];return null==o?n:kt(o,e,r)}function Br(e){return es(e)&&kr(e)==h}function Ir(e,t,r,o,i){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=za(e),c=za(t),u=s?g:hi(e),l=c?g:hi(t),f=(u=u==h?j:u)==j,d=(l=l==h?j:l)==j,p=u==l;if(p&&Ka(e)){if(!Ka(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Zn),s||cs(e)?ti(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case y:case v:case _:return Ma(+e,+t);case m:return e.name==t.name&&e.message==t.message;case C:case T:return e==t+"";case w:var s=an;case S:var c=1&r;if(s||(s=un),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var l=ti(s(e),s(t),r,o,i,a);return a.delete(e),l;case O:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,u,r,o,i,a);if(!(1&r)){var x=f&&Pe.call(e,"__wrapped__"),b=d&&Pe.call(t,"__wrapped__");if(x||b){var k=x?e.value():e,E=b?t.value():t;return a||(a=new Zn),i(k,E,r,o,a)}}if(!p)return!1;return a||(a=new Zn),function(e,t,r,o,i,a){var s=1&r,c=ri(e),u=c.length,l=ri(t),f=l.length;if(u!=f&&!s)return!1;var d=u;for(;d--;){var p=c[d];if(!(s?p in t:Pe.call(t,p)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);var v=s;for(;++d<u;){var m=e[p=c[d]],x=t[p];if(o)var b=s?o(x,m,p,t,e,a):o(m,x,p,e,t,a);if(!(b===n?m===x||i(m,x,r,o,a):b)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(y=!1)}return a.delete(e),a.delete(t),y}(e,t,r,o,i,a)}(e,t,r,o,Ir,i))}function Rr(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=Ce(e);i--;){var c=r[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var u=(c=r[i])[0],l=e[u],f=c[1];if(s&&c[2]){if(l===n&&!(u in e))return!1}else{var d=new Zn;if(o)var p=o(l,f,u,e,t,d);if(!(p===n?Ir(f,l,3,o,d):p))return!1}}return!0}function Ar(e){return!(!Xa(e)||(t=e,$e&&$e in t))&&(Ya(e)?De:ge).test(Ni(e));var t}function Pr(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?za(e)?Dr(e[0],e[1]):Mr(e):fc(e)}function Lr(e){if(!ji(e))return yn(e);var t=[];for(var n in Ce(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function $r(e){if(!Xa(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=ji(e),n=[];for(var r in e)("constructor"!=r||!t&&Pe.call(e,r))&&n.push(r);return n}function Nr(e,t){return e<t}function Wr(e,t){var n=-1,r=Va(e)?oe(e.length):[];return fr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Mr(e){var t=li(e);return 1==t.length&&t[0][2]?Ci(t[0][0],t[0][1]):function(n){return n===e||Rr(n,e,t)}}function Dr(e,t){return bi(e)&&ki(t)?Ci($i(e),t):function(r){var o=Cs(r,e);return o===n&&o===t?Ss(r,e):Ir(t,o,3)}}function Fr(e,t,r,o,i){e!==t&&vr(t,(function(a,s){if(i||(i=new Zn),Xa(a))!function(e,t,r,o,i,a,s){var c=Ei(e,r),u=Ei(t,r),l=s.get(u);if(l)return void Xn(e,r,l);var f=a?a(c,u,r+"",e,t,s):n,d=f===n;if(d){var p=za(u),h=!p&&Ka(u),g=!p&&!h&&cs(u);f=u,p||h||g?za(c)?f=c:Ha(c)?f=Oo(c):h?(d=!1,f=jo(u,!0)):g?(d=!1,f=Co(u,!0)):f=[]:rs(u)||qa(u)?(f=c,qa(c)?f=ys(c):Xa(c)&&!Ya(c)||(f=yi(u))):d=!1}d&&(s.set(u,f),i(f,u,o,a,s),s.delete(u));Xn(e,r,f)}(e,t,s,r,Fr,o,i);else{var c=o?o(Ei(e,s),a,s+"",e,t,i):n;c===n&&(c=a),Xn(e,s,c)}}),Is)}function qr(e,t){var r=e.length;if(r)return mi(t+=t<0?r:0,r)?e[t]:n}function zr(e,t,n){t=t.length?Rt(t,(function(e){return za(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[nc];var r=-1;t=Rt(t,Yt(ci()));var o=Wr(e,(function(e,n,o){var i=Rt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(o,(function(e,t){return function(e,t,n){var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;for(;++r<a;){var c=So(o[r],i[r]);if(c)return r>=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=_r(e,a);n(s,a)&&Qr(i,xo(a,e),s)}return i}function Vr(e,t,n,r){var o=r?Ft:Dt,i=-1,a=t.length,s=e;for(e===t&&(t=Oo(t)),n&&(s=Rt(e,Yt(n)));++i<a;)for(var c=0,u=t[i],l=n?n(u):u;(c=o(s,l,c,r))>-1;)s!==e&&Ze.call(s,c,1),Ze.call(e,c,1);return e}function Hr(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;mi(o)?Ze.call(e,o,1):lo(e,o)}}return e}function Kr(e,t){return e+ht(wn()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>l)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Ii(Si(e,t,nc),e+"")}function Yr(e){return Yn(Ms(e))}function Jr(e,t){var n=Ms(e);return Pi(n,ar(t,0,n.length))}function Qr(e,t,r,o){if(!Xa(e))return e;for(var i=-1,a=(t=xo(t,e)).length,s=a-1,c=e;null!=c&&++i<a;){var u=$i(t[i]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(i!=s){var f=c[u];(l=o?o(f,u,c):n)===n&&(l=Xa(f)?f:mi(t[i+1])?[]:{})}er(c,u,l),c=c[u]}return e}var Xr=On?function(e,t){return On.set(e,t),e}:nc,eo=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:nc;function to(e){return Pi(Ms(e))}function no(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=oe(o);++r<o;)i[r]=e[r+t];return i}function ro(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function oo(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&&!ss(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return io(e,t,nc,n)}function io(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,c=null===t,u=ss(t),l=t===n;i<a;){var f=ht((i+a)/2),d=r(e[f]),p=d!==n,h=null===d,g=d==d,y=ss(d);if(s)var v=o||g;else v=l?g&&(o||p):c?g&&p&&(o||!h):u?g&&p&&!h&&(o||!y):!h&&!y&&(o?d<=t:d<t);v?i=f+1:a=f}return mn(a,4294967294)}function ao(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ma(s,c)){var c=s;i[o++]=0===a?0:a}}return i}function so(e){return"number"==typeof e?e:ss(e)?f:+e}function co(e){if("string"==typeof e)return e;if(za(e))return Rt(e,co)+"";if(ss(e))return Wn?Wn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=Bt,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=It;else if(i>=200){var u=t?null:Go(e);if(u)return un(u);a=!1,o=Qt,c=new Kn}else c=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(l)}else o(c,f,n)||(c!==s&&c.push(f),s.push(l))}return s}function lo(e,t){return null==(e=Ti(e,t=xo(t,e)))||delete e[$i(Gi(t))]}function fo(e,t,n,r){return Qr(e,t,n(_r(e,t)),r)}function po(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?no(e,r?0:i,r?i+1:o):no(e,r?i+1:0,r?o:i)}function ho(e,t){var n=e;return n instanceof zn&&(n=n.value()),Pt(t,(function(e,t){return t.func.apply(t.thisArg,At([e],t.args))}),n)}function go(e,t,n){var r=e.length;if(r<2)return r?uo(e[0]):[];for(var o=-1,i=oe(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=lr(i[o]||a,e[s],t,n));return uo(yr(i,1),t,n)}function yo(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var c=o<a?t[o]:n;r(s,e[o],c)}return s}function vo(e){return Ha(e)?e:[]}function mo(e){return"function"==typeof e?e:nc}function xo(e,t){return za(e)?e:bi(e,t)?[e]:Li(vs(e))}var bo=Gr;function wo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:no(e,t,r)}var _o=st||function(e){return dt.clearTimeout(e)};function jo(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function ko(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Co(e,t){var n=t?ko(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=ss(e),s=t!==n,c=null===t,u=t==t,l=ss(t);if(!c&&!l&&!a&&e>t||a&&s&&u&&!c&&!l||o&&s&&u||!r&&u||!i)return 1;if(!o&&!a&&!l&&e<t||l&&r&&i&&!o&&!a||c&&r&&i||!s&&i||!u)return-1}return 0}function To(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,c=t.length,u=vn(i-a,0),l=oe(c+u),f=!r;++s<c;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;u--;)l[s++]=e[o++];return l}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,c=-1,u=t.length,l=vn(i-s,0),f=oe(l+u),d=!r;++o<l;)f[o]=e[o];for(var p=o;++c<u;)f[p+c]=t[c];for(;++a<s;)(d||o<i)&&(f[p+n[a]]=e[o++]);return f}function Oo(e,t){var n=-1,r=e.length;for(t||(t=oe(r));++n<r;)t[n]=e[n];return t}function Bo(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var c=t[a],u=o?o(r[c],e[c],c,r,e):n;u===n&&(u=e[c]),i?or(r,c,u):er(r,c,u)}return r}function Io(e,t){return function(n,r){var o=za(n)?Ct:nr,i=t?t():{};return o(n,e,ci(r,2),i)}}function Ro(e){return Gr((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&xi(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=Ce(t);++o<i;){var c=r[o];c&&e(t,c,o,a)}return t}))}function Ao(e,t){return function(n,r){if(null==n)return n;if(!Va(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ce(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Po(e){return function(t,n,r){for(var o=-1,i=Ce(t),a=r(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===n(i[c],c,i))break}return t}}function Lo(e){return function(t){var r=on(t=vs(t))?dn(t):n,o=r?r[0]:t.charAt(0),i=r?wo(r,1).join(""):t.slice(1);return o[e]()+i}}function $o(e){return function(t){return Pt(Ys(qs(t).replace(Je,"")),e,"")}}function No(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=Dn(e.prototype),r=e.apply(n,t);return Xa(r)?r:n}}function Wo(e){return function(t,r,o){var i=Ce(t);if(!Va(t)){var a=ci(r,3);t=Bs(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function Mo(e){return ni((function(t){var o=t.length,i=o,a=qn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Ee(r);if(a&&!c&&"wrapper"==ai(s))var c=new qn([],!0)}for(i=c?i:o;++i<o;){var u=ai(s=t[i]),l="wrapper"==u?ii(s):n;c=l&&wi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[ai(l[0])].apply(c,l[3]):1==s.length&&wi(s)?c[u]():c.thru(s)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&za(n))return c.plant(n).value();for(var r=0,i=o?t[r].apply(this,e):n;++r<o;)i=t[r].call(this,i);return i}}))}function Do(e,t,r,o,i,a,c,u,l,f){var d=t&s,p=1&t,h=2&t,g=24&t,y=512&t,v=h?n:No(e);return function s(){for(var m=arguments.length,x=oe(m),b=m;b--;)x[b]=arguments[b];if(g)var w=si(s),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(x,w);if(o&&(x=To(x,o,i,g)),a&&(x=Eo(x,a,c,g)),m-=_,g&&m<f){var j=cn(x,w);return Ko(e,t,Do,s.placeholder,r,x,j,u,l,f-m)}var k=p?r:this,C=h?k[e]:e;return m=x.length,u?x=function(e,t){var r=e.length,o=mn(t.length,r),i=Oo(e);for(;o--;){var a=t[o];e[o]=mi(a,r)?i[a]:n}return e}(x,u):y&&m>1&&x.reverse(),d&&l<m&&(x.length=l),this&&this!==dt&&this instanceof s&&(C=v||No(C)),C.apply(k,x)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return xr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function qo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=co(r),o=co(o)):(r=so(r),o=so(o)),i=e(r,o)}return i}}function zo(e){return ni((function(t){return t=Rt(t,Yt(ci())),Gr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Uo(e,t){var r=(t=t===n?" ":co(t)).length;if(r<2)return r?Zr(t,e):t;var o=Zr(t,pt(e/fn(t)));return on(t)?wo(dn(o),0,e).join(""):o.slice(0,e)}function Vo(e){return function(t,r,o){return o&&"number"!=typeof o&&xi(t,r,o)&&(r=o=n),t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n,r){for(var o=-1,i=vn(pt((t-e)/(n||1)),0),a=oe(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:ds(o),e)}}function Ho(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Ko(e,t,r,o,i,s,c,u,l,f){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var p=[e,t,i,d?s:n,d?c:n,d?n:s,d?n:c,u,l,f],h=r.apply(n,p);return wi(e)&&Oi(h,p),h.placeholder=o,Ri(h,e,t)}function Zo(e){var t=ke[e];return function(e,n){if(e=gs(e),(n=null==n?0:mn(ps(n),292))&&Nt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=Sn&&1/un(new Sn([,-0]))[1]==u?function(e){return new Sn(e)}:sc;function Yo(e){return function(t){var n=hi(t);return n==w?an(t):n==S?ln(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jo(e,t,o,u,l,f,d,p){var h=2&t;if(!h&&"function"!=typeof e)throw new Ee(r);var g=u?u.length:0;if(g||(t&=-97,u=l=n),d=d===n?d:vn(ps(d),0),p=p===n?p:ps(p),g-=l?l.length:0,64&t){var y=u,v=l;u=l=n}var m=h?n:ii(e),x=[e,t,o,u,l,y,v,f,d,p];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,a=o<131,u=r==s&&8==n||r==s&&n==c&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!u)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var f=e[3];e[3]=f?To(f,l,t[4]):l,e[4]=f?cn(e[3],i):t[4]}(l=t[5])&&(f=e[5],e[5]=f?Eo(f,l,t[6]):l,e[6]=f?cn(e[5],i):t[6]);(l=t[7])&&(e[7]=l);r&s&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(x,m),e=x[0],t=x[1],o=x[2],u=x[3],l=x[4],!(p=x[9]=x[9]===n?h?0:e.length:vn(x[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=No(e);return function i(){for(var a=arguments.length,s=oe(a),c=a,u=si(i);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==u&&s[a-1]!==u?[]:cn(s,u);return(a-=l.length)<r?Ko(e,t,Do,i.placeholder,n,s,l,n,n,r-a):kt(this&&this!==dt&&this instanceof i?o:e,this,s)}}(e,t,p):t!=a&&33!=t||l.length?Do.apply(n,x):function(e,t,n,r){var o=1&t,i=No(e);return function t(){for(var a=-1,s=arguments.length,c=-1,u=r.length,l=oe(u+s),f=this&&this!==dt&&this instanceof t?i:e;++c<u;)l[c]=r[c];for(;s--;)l[c++]=arguments[++a];return kt(f,o?n:this,l)}}(e,t,o,u);else var b=function(e,t,n){var r=1&t,o=No(e);return function t(){return(this&&this!==dt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ri((m?Xr:Oi)(b,x),e,t)}function Qo(e,t,r,o){return e===n||Ma(e,Ie[r])&&!Pe.call(o,r)?t:e}function Xo(e,t,r,o,i,a){return Xa(e)&&Xa(t)&&(a.set(t,e),Fr(e,t,n,Xo,a),a.delete(t)),e}function ei(e){return rs(e)?n:e}function ti(e,t,r,o,i,a){var s=1&r,c=e.length,u=t.length;if(c!=u&&!(s&&u>c))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,h=2&r?new Kn:n;for(a.set(e,t),a.set(t,e);++d<c;){var g=e[d],y=t[d];if(o)var v=s?o(y,g,d,t,e,a):o(g,y,d,e,t,a);if(v!==n){if(v)continue;p=!1;break}if(h){if(!$t(t,(function(e,t){if(!Qt(h,t)&&(g===e||i(g,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(g!==y&&!i(g,y,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ni(e){return Ii(Si(e,n,Ui),e+"")}function ri(e){return jr(e,Bs,di)}function oi(e){return jr(e,Is,pi)}var ii=On?function(e){return On.get(e)}:sc;function ai(e){for(var t=e.name+"",n=Bn[t],r=Pe.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 si(e){return(Pe.call(Mn,"placeholder")?Mn:e).placeholder}function ci(){var e=Mn.iteratee||rc;return e=e===rc?Pr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(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 li(e){for(var t=Bs(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ki(o)]}return t}function fi(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Ar(r)?r:n}var di=yt?function(e){return null==e?[]:(e=Ce(e),Ot(yt(e),(function(t){return Ke.call(e,t)})))}:hc,pi=yt?function(e){for(var t=[];e;)At(t,di(e)),e=Ve(e);return t}:hc,hi=kr;function gi(e,t,n){for(var r=-1,o=(t=xo(t,e)).length,i=!1;++r<o;){var a=$i(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Qa(o)&&mi(a,o)&&(za(e)||qa(e))}function yi(e){return"function"!=typeof e.constructor||ji(e)?{}:Dn(Ve(e))}function vi(e){return za(e)||qa(e)||!!(Ge&&e&&e[Ge])}function mi(e,t){var n=typeof e;return!!(t=null==t?l:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function xi(e,t,n){if(!Xa(n))return!1;var r=typeof t;return!!("number"==r?Va(n)&&mi(t,n.length):"string"==r&&t in n)&&Ma(n[t],e)}function bi(e,t){if(za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||(X.test(e)||!Q.test(e)||null!=t&&e in Ce(t))}function wi(e){var t=ai(e),n=Mn[t];if("function"!=typeof n||!(t in zn.prototype))return!1;if(e===n)return!0;var r=ii(n);return!!r&&e===r[0]}(jn&&hi(new jn(new ArrayBuffer(1)))!=R||kn&&hi(new kn)!=w||Cn&&hi(Cn.resolve())!=k||Sn&&hi(new Sn)!=S||Tn&&hi(new Tn)!=B)&&(hi=function(e){var t=kr(e),r=t==j?e.constructor:n,o=r?Ni(r):"";if(o)switch(o){case In:return R;case Rn:return w;case An:return k;case Pn:return S;case Ln:return B}return t});var _i=Re?Ya:gc;function ji(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function ki(e){return e==e&&!Xa(e)}function Ci(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Ce(r)))}}function Si(e,t,r){return t=vn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=vn(n.length-t,0),a=oe(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=oe(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),kt(e,this,s)}}function Ti(e,t){return t.length<2?e:_r(e,no(t,0,-1))}function Ei(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oi=Ai(Xr),Bi=ft||function(e,t){return dt.setTimeout(e,t)},Ii=Ai(eo);function Ri(e,t,n){var r=t+"";return Ii(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(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return St(p,(function(n){var r="_."+n[0];t&n[1]&&!Bt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ai(e){var t=0,r=0;return function(){var o=xn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Pi(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=Kr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Li=function(e){var t=Aa(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(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}));function $i(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ni(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wi(e){if(e instanceof zn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Oo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Mi=Gr((function(e,t){return Ha(e)?lr(e,yr(t,1,Ha,!0)):[]})),Di=Gr((function(e,t){var r=Gi(t);return Ha(r)&&(r=n),Ha(e)?lr(e,yr(t,1,Ha,!0),ci(r,2)):[]})),Fi=Gr((function(e,t){var r=Gi(t);return Ha(r)&&(r=n),Ha(e)?lr(e,yr(t,1,Ha,!0),n,r):[]}));function qi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ps(n);return o<0&&(o=vn(r+o,0)),Mt(e,ci(t,3),o)}function zi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=ps(r),i=r<0?vn(o+i,0):mn(i,o-1)),Mt(e,ci(t,3),i,!0)}function Ui(e){return(null==e?0:e.length)?yr(e,1):[]}function Vi(e){return e&&e.length?e[0]:n}var Hi=Gr((function(e){var t=Rt(e,vo);return t.length&&t[0]===e[0]?Er(t):[]})),Ki=Gr((function(e){var t=Gi(e),r=Rt(e,vo);return t===Gi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Er(r,ci(t,2)):[]})),Zi=Gr((function(e){var t=Gi(e),r=Rt(e,vo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Er(r,n,t):[]}));function Gi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Yi=Gr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Qi=ni((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Hr(e,Rt(t,(function(e){return mi(e,n)?+e:e})).sort(So)),r}));function Xi(e){return null==e?e:_n.call(e)}var ea=Gr((function(e){return uo(yr(e,1,Ha,!0))})),ta=Gr((function(e){var t=Gi(e);return Ha(t)&&(t=n),uo(yr(e,1,Ha,!0),ci(t,2))})),na=Gr((function(e){var t=Gi(e);return t="function"==typeof t?t:n,uo(yr(e,1,Ha,!0),n,t)}));function ra(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,(function(e){if(Ha(e))return t=vn(e.length,t),!0})),Zt(t,(function(t){return Rt(e,Ut(t))}))}function oa(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Rt(r,(function(e){return kt(t,n,e)}))}var ia=Gr((function(e,t){return Ha(e)?lr(e,t):[]})),aa=Gr((function(e){return go(Ot(e,Ha))})),sa=Gr((function(e){var t=Gi(e);return Ha(t)&&(t=n),go(Ot(e,Ha),ci(t,2))})),ca=Gr((function(e){var t=Gi(e);return t="function"==typeof t?t:n,go(Ot(e,Ha),n,t)})),ua=Gr(ra);var la=Gr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,oa(e,r)}));function fa(e){var t=Mn(e);return t.__chain__=!0,t}function da(e,t){return t(e)}var pa=ni((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&o instanceof zn&&mi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:da,args:[i],thisArg:n}),new qn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var ha=Io((function(e,t,n){Pe.call(e,n)?++e[n]:or(e,n,1)}));var ga=Wo(qi),ya=Wo(zi);function va(e,t){return(za(e)?St:fr)(e,ci(t,3))}function ma(e,t){return(za(e)?Tt:dr)(e,ci(t,3))}var xa=Io((function(e,t,n){Pe.call(e,n)?e[n].push(t):or(e,n,[t])}));var ba=Gr((function(e,t,n){var r=-1,o="function"==typeof t,i=Va(e)?oe(e.length):[];return fr(e,(function(e){i[++r]=o?kt(t,e,n):Or(e,t,n)})),i})),wa=Io((function(e,t,n){or(e,n,t)}));function _a(e,t){return(za(e)?Rt:Wr)(e,ci(t,3))}var ja=Io((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ka=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&xi(e,t[0],t[1])?t=[]:n>2&&xi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,yr(t,1),[])})),Ca=lt||function(){return dt.Date.now()};function Sa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,s,n,n,n,n,t)}function Ta(e,t){var o;if("function"!=typeof t)throw new Ee(r);return e=ps(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Ea=Gr((function(e,t,n){var r=1;if(n.length){var o=cn(n,si(Ea));r|=a}return Jo(e,r,t,n,o)})),Oa=Gr((function(e,t,n){var r=3;if(n.length){var o=cn(n,si(Oa));r|=a}return Jo(t,r,e,n,o)}));function Ba(e,t,o){var i,a,s,c,u,l,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ee(r);function g(t){var r=i,o=a;return i=a=n,f=t,c=e.apply(o,r)}function y(e){var r=e-l;return l===n||r>=t||r<0||p&&e-f>=s}function v(){var e=Ca();if(y(e))return m(e);u=Bi(v,function(e){var n=t-(e-l);return p?mn(n,s-(e-f)):n}(e))}function m(e){return u=n,h&&i?g(e):(i=a=n,c)}function x(){var e=Ca(),r=y(e);if(i=arguments,a=this,l=e,r){if(u===n)return function(e){return f=e,u=Bi(v,t),d?g(e):c}(l);if(p)return _o(u),u=Bi(v,t),g(l)}return u===n&&(u=Bi(v,t)),c}return t=gs(t)||0,Xa(o)&&(d=!!o.leading,s=(p="maxWait"in o)?vn(gs(o.maxWait)||0,t):s,h="trailing"in o?!!o.trailing:h),x.cancel=function(){u!==n&&_o(u),f=0,i=l=a=u=n},x.flush=function(){return u===n?c:m(Ca())},x}var Ia=Gr((function(e,t){return ur(e,1,t)})),Ra=Gr((function(e,t,n){return ur(e,gs(t)||0,n)}));function Aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(r);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(Aa.Cache||Hn),n}function Pa(e){if("function"!=typeof e)throw new Ee(r);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)}}Aa.Cache=Hn;var La=bo((function(e,t){var n=(t=1==t.length&&za(t[0])?Rt(t[0],Yt(ci())):Rt(yr(t,1),Yt(ci()))).length;return Gr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),$a=Gr((function(e,t){var r=cn(t,si($a));return Jo(e,a,n,t,r)})),Na=Gr((function(e,t){var r=cn(t,si(Na));return Jo(e,64,n,t,r)})),Wa=ni((function(e,t){return Jo(e,c,n,n,n,t)}));function Ma(e,t){return e===t||e!=e&&t!=t}var Da=Ho(Cr),Fa=Ho((function(e,t){return e>=t})),qa=Br(function(){return arguments}())?Br:function(e){return es(e)&&Pe.call(e,"callee")&&!Ke.call(e,"callee")},za=oe.isArray,Ua=mt?Yt(mt):function(e){return es(e)&&kr(e)==I};function Va(e){return null!=e&&Qa(e.length)&&!Ya(e)}function Ha(e){return es(e)&&Va(e)}var Ka=vt||gc,Za=xt?Yt(xt):function(e){return es(e)&&kr(e)==v};function Ga(e){if(!es(e))return!1;var t=kr(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Ya(e){if(!Xa(e))return!1;var t=kr(e);return t==x||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ps(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function Xa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Yt(bt):function(e){return es(e)&&hi(e)==w};function ns(e){return"number"==typeof e||es(e)&&kr(e)==_}function rs(e){if(!es(e)||kr(e)!=j)return!1;var t=Ve(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ae.call(n)==We}var os=wt?Yt(wt):function(e){return es(e)&&kr(e)==C};var is=_t?Yt(_t):function(e){return es(e)&&hi(e)==S};function as(e){return"string"==typeof e||!za(e)&&es(e)&&kr(e)==T}function ss(e){return"symbol"==typeof e||es(e)&&kr(e)==O}var cs=jt?Yt(jt):function(e){return es(e)&&Qa(e.length)&&!!it[kr(e)]};var us=Ho(Nr),ls=Ho((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(Va(e))return as(e)?dn(e):Oo(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=hi(e);return(t==w?an:t==S?un:Ms)(e)}function ds(e){return e?(e=gs(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ps(e){var t=ds(e),n=t%1;return t==t?n?t-n:t:0}function hs(e){return e?ar(ps(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return f;if(Xa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=he.test(e);return n||ye.test(e)?ut(e.slice(2),n?2:8):pe.test(e)?f:+e}function ys(e){return Bo(e,Is(e))}function vs(e){return null==e?"":co(e)}var ms=Ro((function(e,t){if(ji(t)||Va(t))Bo(t,Bs(t),e);else for(var n in t)Pe.call(t,n)&&er(e,n,t[n])})),xs=Ro((function(e,t){Bo(t,Is(t),e)})),bs=Ro((function(e,t,n,r){Bo(t,Is(t),e,r)})),ws=Ro((function(e,t,n,r){Bo(t,Bs(t),e,r)})),_s=ni(ir);var js=Gr((function(e,t){e=Ce(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&xi(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Is(a),c=-1,u=s.length;++c<u;){var l=s[c],f=e[l];(f===n||Ma(f,Ie[l])&&!Pe.call(e,l))&&(e[l]=a[l])}return e})),ks=Gr((function(e){return e.push(n,Xo),kt(As,n,e)}));function Cs(e,t,r){var o=null==e?n:_r(e,t);return o===n?r:o}function Ss(e,t){return null!=e&&gi(e,t,Tr)}var Ts=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),Xs(nc)),Es=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),ci),Os=Gr(Or);function Bs(e){return Va(e)?Gn(e):Lr(e)}function Is(e){return Va(e)?Gn(e,!0):$r(e)}var Rs=Ro((function(e,t,n){Fr(e,t,n)})),As=Ro((function(e,t,n,r){Fr(e,t,n,r)})),Ps=ni((function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,(function(t){return t=xo(t,e),r||(r=t.length>1),t})),Bo(e,oi(e),n),r&&(n=sr(n,7,ei));for(var o=t.length;o--;)lo(n,t[o]);return n}));var Ls=ni((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ss(e,n)}))}(e,t)}));function $s(e,t){if(null==e)return{};var n=Rt(oi(e),(function(e){return[e]}));return t=ci(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Ns=Yo(Bs),Ws=Yo(Is);function Ms(e){return null==e?[]:Jt(e,Bs(e))}var Ds=$o((function(e,t,n){return t=t.toLowerCase(),e+(n?Fs(t):t)}));function Fs(e){return Gs(vs(e).toLowerCase())}function qs(e){return(e=vs(e))&&e.replace(me,tn).replace(Qe,"")}var zs=$o((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Us=$o((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Vs=Lo("toLowerCase");var Hs=$o((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=$o((function(e,t,n){return e+(n?" ":"")+Gs(t)}));var Zs=$o((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Gs=Lo("toUpperCase");function Ys(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Js=Gr((function(e,t){try{return kt(e,n,t)}catch(e){return Ga(e)?e:new _e(e)}})),Qs=ni((function(e,t){return St(t,(function(t){t=$i(t),or(e,t,Ea(e[t],e))})),e}));function Xs(e){return function(){return e}}var ec=Mo(),tc=Mo(!0);function nc(e){return e}function rc(e){return Pr("function"==typeof e?e:sr(e,1))}var oc=Gr((function(e,t){return function(n){return Or(n,e,t)}})),ic=Gr((function(e,t){return function(n){return Or(e,n,t)}}));function ac(e,t,n){var r=Bs(t),o=wr(t,r);null!=n||Xa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,Bs(t)));var i=!(Xa(n)&&"chain"in n&&!n.chain),a=Ya(e);return St(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__);return(n.__actions__=Oo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,At([this.value()],arguments))})})),e}function sc(){}var cc=zo(Rt),uc=zo(Et),lc=zo($t);function fc(e){return bi(e)?Ut($i(e)):function(e){return function(t){return _r(t,e)}}(e)}var dc=Vo(),pc=Vo(!0);function hc(){return[]}function gc(){return!1}var yc=qo((function(e,t){return e+t}),0),vc=Zo("ceil"),mc=qo((function(e,t){return e/t}),1),xc=Zo("floor");var bc,wc=qo((function(e,t){return e*t}),1),_c=Zo("round"),jc=qo((function(e,t){return e-t}),0);return Mn.after=function(e,t){if("function"!=typeof t)throw new Ee(r);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=Sa,Mn.assign=ms,Mn.assignIn=xs,Mn.assignInWith=bs,Mn.assignWith=ws,Mn.at=_s,Mn.before=Ta,Mn.bind=Ea,Mn.bindAll=Qs,Mn.bindKey=Oa,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return za(e)?e:[e]},Mn.chain=fa,Mn.chunk=function(e,t,r){t=(r?xi(e,t,r):t===n)?1:vn(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=oe(pt(o/t));i<o;)s[a++]=no(e,i,i+=t);return s},Mn.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},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return At(za(n)?Oo(n):[n],yr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ci();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Ee(r);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Mn.conforms=function(e){return function(e){var t=Bs(e);return function(n){return cr(n,e,t)}}(sr(e,1))},Mn.constant=Xs,Mn.countBy=ha,Mn.create=function(e,t){var n=Dn(e);return null==t?n:rr(n,t)},Mn.curry=function e(t,r,o){var i=Jo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Mn.curryRight=function e(t,r,o){var i=Jo(t,16,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Mn.debounce=Ba,Mn.defaults=js,Mn.defaultsDeep=ks,Mn.defer=Ia,Mn.delay=Ra,Mn.difference=Mi,Mn.differenceBy=Di,Mn.differenceWith=Fi,Mn.drop=function(e,t,r){var o=null==e?0:e.length;return o?no(e,(t=r||t===n?1:ps(t))<0?0:t,o):[]},Mn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?no(e,0,(t=o-(t=r||t===n?1:ps(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?po(e,ci(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?po(e,ci(t,3),!0):[]},Mn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&xi(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=ps(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:ps(o))<0&&(o+=i),o=r>o?0:hs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Mn.filter=function(e,t){return(za(e)?Ot:gr)(e,ci(t,3))},Mn.flatMap=function(e,t){return yr(_a(e,t),1)},Mn.flatMapDeep=function(e,t){return yr(_a(e,t),u)},Mn.flatMapDepth=function(e,t,r){return r=r===n?1:ps(r),yr(_a(e,t),r)},Mn.flatten=Ui,Mn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,u):[]},Mn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===n?1:ps(t)):[]},Mn.flip=function(e){return Jo(e,512)},Mn.flow=ec,Mn.flowRight=tc,Mn.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},Mn.functions=function(e){return null==e?[]:wr(e,Bs(e))},Mn.functionsIn=function(e){return null==e?[]:wr(e,Is(e))},Mn.groupBy=xa,Mn.initial=function(e){return(null==e?0:e.length)?no(e,0,-1):[]},Mn.intersection=Hi,Mn.intersectionBy=Ki,Mn.intersectionWith=Zi,Mn.invert=Ts,Mn.invertBy=Es,Mn.invokeMap=ba,Mn.iteratee=rc,Mn.keyBy=wa,Mn.keys=Bs,Mn.keysIn=Is,Mn.map=_a,Mn.mapKeys=function(e,t){var n={};return t=ci(t,3),xr(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},Mn.mapValues=function(e,t){var n={};return t=ci(t,3),xr(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},Mn.matches=function(e){return Mr(sr(e,1))},Mn.matchesProperty=function(e,t){return Dr(e,sr(t,1))},Mn.memoize=Aa,Mn.merge=Rs,Mn.mergeWith=As,Mn.method=oc,Mn.methodOf=ic,Mn.mixin=ac,Mn.negate=Pa,Mn.nthArg=function(e){return e=ps(e),Gr((function(t){return qr(t,e)}))},Mn.omit=Ps,Mn.omitBy=function(e,t){return $s(e,Pa(ci(t)))},Mn.once=function(e){return Ta(2,e)},Mn.orderBy=function(e,t,r,o){return null==e?[]:(za(t)||(t=null==t?[]:[t]),za(r=o?n:r)||(r=null==r?[]:[r]),zr(e,t,r))},Mn.over=cc,Mn.overArgs=La,Mn.overEvery=uc,Mn.overSome=lc,Mn.partial=$a,Mn.partialRight=Na,Mn.partition=ja,Mn.pick=Ls,Mn.pickBy=$s,Mn.property=fc,Mn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},Mn.pull=Yi,Mn.pullAll=Ji,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,ci(n,2)):e},Mn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vr(e,t,n,r):e},Mn.pullAt=Qi,Mn.range=dc,Mn.rangeRight=pc,Mn.rearg=Wa,Mn.reject=function(e,t){return(za(e)?Ot:gr)(e,Pa(ci(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ci(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Hr(e,o),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new Ee(r);return Gr(e,t=t===n?t:ps(t))},Mn.reverse=Xi,Mn.sampleSize=function(e,t,r){return t=(r?xi(e,t,r):t===n)?1:ps(t),(za(e)?Jn:Jr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Mn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:Qr(e,t,r,o)},Mn.shuffle=function(e){return(za(e)?Qn:to)(e)},Mn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&xi(e,t,r)?(t=0,r=o):(t=null==t?0:ps(t),r=r===n?o:ps(r)),no(e,t,r)):[]},Mn.sortBy=ka,Mn.sortedUniq=function(e){return e&&e.length?ao(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?ao(e,ci(t,2)):[]},Mn.split=function(e,t,r){return r&&"number"!=typeof r&&xi(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=co(t))&&on(e)?wo(dn(e),0,r):e.split(t,r):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new Ee(r);return t=null==t?0:vn(ps(t),0),Gr((function(n){var r=n[t],o=wo(n,0,t);return r&&At(o,r),kt(e,this,o)}))},Mn.tail=function(e){var t=null==e?0:e.length;return t?no(e,1,t):[]},Mn.take=function(e,t,r){return e&&e.length?no(e,0,(t=r||t===n?1:ps(t))<0?0:t):[]},Mn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?no(e,(t=o-(t=r||t===n?1:ps(t)))<0?0:t,o):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?po(e,ci(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?po(e,ci(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new Ee(r);return Xa(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Ba(e,t,{leading:o,maxWait:t,trailing:i})},Mn.thru=da,Mn.toArray=fs,Mn.toPairs=Ns,Mn.toPairsIn=Ws,Mn.toPath=function(e){return za(e)?Rt(e,$i):ss(e)?[e]:Oo(Li(vs(e)))},Mn.toPlainObject=ys,Mn.transform=function(e,t,n){var r=za(e),o=r||Ka(e)||cs(e);if(t=ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Xa(e)&&Ya(i)?Dn(Ve(e)):{}}return(o?St:xr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Mn.unary=function(e){return Sa(e,1)},Mn.union=ea,Mn.unionBy=ta,Mn.unionWith=na,Mn.uniq=function(e){return e&&e.length?uo(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?uo(e,ci(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?uo(e,n,t):[]},Mn.unset=function(e,t){return null==e||lo(e,t)},Mn.unzip=ra,Mn.unzipWith=oa,Mn.update=function(e,t,n){return null==e?e:fo(e,t,mo(n))},Mn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:fo(e,t,mo(r),o)},Mn.values=Ms,Mn.valuesIn=function(e){return null==e?[]:Jt(e,Is(e))},Mn.without=ia,Mn.words=Ys,Mn.wrap=function(e,t){return $a(mo(t),e)},Mn.xor=aa,Mn.xorBy=sa,Mn.xorWith=ca,Mn.zip=ua,Mn.zipObject=function(e,t){return yo(e||[],t||[],er)},Mn.zipObjectDeep=function(e,t){return yo(e||[],t||[],Qr)},Mn.zipWith=la,Mn.entries=Ns,Mn.entriesIn=Ws,Mn.extend=xs,Mn.extendWith=bs,ac(Mn,Mn),Mn.add=yc,Mn.attempt=Js,Mn.camelCase=Ds,Mn.capitalize=Fs,Mn.ceil=vc,Mn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gs(r))==r?r:0),t!==n&&(t=(t=gs(t))==t?t:0),ar(gs(e),t,r)},Mn.clone=function(e){return sr(e,4)},Mn.cloneDeep=function(e){return sr(e,5)},Mn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},Mn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},Mn.conformsTo=function(e,t){return null==t||cr(e,t,Bs(t))},Mn.deburr=qs,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=mc,Mn.endsWith=function(e,t,r){e=vs(e),t=co(t);var o=e.length,i=r=r===n?o:ar(ps(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Mn.eq=Ma,Mn.escape=function(e){return(e=vs(e))&&Z.test(e)?e.replace(H,nn):e},Mn.escapeRegExp=function(e){return(e=vs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,r){var o=za(e)?Et:pr;return r&&xi(e,t,r)&&(t=n),o(e,ci(t,3))},Mn.find=ga,Mn.findIndex=qi,Mn.findKey=function(e,t){return Wt(e,ci(t,3),xr)},Mn.findLast=ya,Mn.findLastIndex=zi,Mn.findLastKey=function(e,t){return Wt(e,ci(t,3),br)},Mn.floor=xc,Mn.forEach=va,Mn.forEachRight=ma,Mn.forIn=function(e,t){return null==e?e:vr(e,ci(t,3),Is)},Mn.forInRight=function(e,t){return null==e?e:mr(e,ci(t,3),Is)},Mn.forOwn=function(e,t){return e&&xr(e,ci(t,3))},Mn.forOwnRight=function(e,t){return e&&br(e,ci(t,3))},Mn.get=Cs,Mn.gt=Da,Mn.gte=Fa,Mn.has=function(e,t){return null!=e&&gi(e,t,Sr)},Mn.hasIn=Ss,Mn.head=Vi,Mn.identity=nc,Mn.includes=function(e,t,n,r){e=Va(e)?e:Ms(e),n=n&&!r?ps(n):0;var o=e.length;return n<0&&(n=vn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Dt(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ps(n);return o<0&&(o=vn(r+o,0)),Dt(e,t,o)},Mn.inRange=function(e,t,r){return t=ds(t),r===n?(r=t,t=0):r=ds(r),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=gs(e),t,r)},Mn.invoke=Os,Mn.isArguments=qa,Mn.isArray=za,Mn.isArrayBuffer=Ua,Mn.isArrayLike=Va,Mn.isArrayLikeObject=Ha,Mn.isBoolean=function(e){return!0===e||!1===e||es(e)&&kr(e)==y},Mn.isBuffer=Ka,Mn.isDate=Za,Mn.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},Mn.isEmpty=function(e){if(null==e)return!0;if(Va(e)&&(za(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||cs(e)||qa(e)))return!e.length;var t=hi(e);if(t==w||t==S)return!e.size;if(ji(e))return!Lr(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Ir(e,t)},Mn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Ir(e,t,n,r):!!o},Mn.isError=Ga,Mn.isFinite=function(e){return"number"==typeof e&&Nt(e)},Mn.isFunction=Ya,Mn.isInteger=Ja,Mn.isLength=Qa,Mn.isMap=ts,Mn.isMatch=function(e,t){return e===t||Rr(e,t,li(t))},Mn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Rr(e,t,li(t),r)},Mn.isNaN=function(e){return ns(e)&&e!=+e},Mn.isNative=function(e){if(_i(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ar(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=ns,Mn.isObject=Xa,Mn.isObjectLike=es,Mn.isPlainObject=rs,Mn.isRegExp=os,Mn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=l},Mn.isSet=is,Mn.isString=as,Mn.isSymbol=ss,Mn.isTypedArray=cs,Mn.isUndefined=function(e){return e===n},Mn.isWeakMap=function(e){return es(e)&&hi(e)==B},Mn.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==kr(e)},Mn.join=function(e,t){return null==e?"":Vt.call(e,t)},Mn.kebabCase=zs,Mn.last=Gi,Mn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ps(r))<0?vn(o+i,0):mn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Mt(e,qt,i,!0)},Mn.lowerCase=Us,Mn.lowerFirst=Vs,Mn.lt=us,Mn.lte=ls,Mn.max=function(e){return e&&e.length?hr(e,nc,Cr):n},Mn.maxBy=function(e,t){return e&&e.length?hr(e,ci(t,2),Cr):n},Mn.mean=function(e){return zt(e,nc)},Mn.meanBy=function(e,t){return zt(e,ci(t,2))},Mn.min=function(e){return e&&e.length?hr(e,nc,Nr):n},Mn.minBy=function(e,t){return e&&e.length?hr(e,ci(t,2),Nr):n},Mn.stubArray=hc,Mn.stubFalse=gc,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=wc,Mn.nth=function(e,t){return e&&e.length?qr(e,ps(t)):n},Mn.noConflict=function(){return dt._===this&&(dt._=Me),this},Mn.noop=sc,Mn.now=Ca,Mn.pad=function(e,t,n){e=vs(e);var r=(t=ps(t))?fn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Uo(ht(o),n)+e+Uo(pt(o),n)},Mn.padEnd=function(e,t,n){e=vs(e);var r=(t=ps(t))?fn(e):0;return t&&r<t?e+Uo(t-r,n):e},Mn.padStart=function(e,t,n){e=vs(e);var r=(t=ps(t))?fn(e):0;return t&&r<t?Uo(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(vs(e).replace(re,""),t||0)},Mn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&xi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ds(e),t===n?(t=e,e=0):t=ds(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=wn();return mn(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return Kr(e,t)},Mn.reduce=function(e,t,n){var r=za(e)?Pt:Ht,o=arguments.length<3;return r(e,ci(t,4),n,o,fr)},Mn.reduceRight=function(e,t,n){var r=za(e)?Lt:Ht,o=arguments.length<3;return r(e,ci(t,4),n,o,dr)},Mn.repeat=function(e,t,r){return t=(r?xi(e,t,r):t===n)?1:ps(t),Zr(vs(e),t)},Mn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,r){var o=-1,i=(t=xo(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[$i(t[o])];a===n&&(o=i,a=r),e=Ya(a)?a.call(e):a}return e},Mn.round=_c,Mn.runInContext=e,Mn.sample=function(e){return(za(e)?Yn:Yr)(e)},Mn.size=function(e){if(null==e)return 0;if(Va(e))return as(e)?fn(e):e.length;var t=hi(e);return t==w||t==S?e.size:Lr(e).length},Mn.snakeCase=Hs,Mn.some=function(e,t,r){var o=za(e)?$t:ro;return r&&xi(e,t,r)&&(t=n),o(e,ci(t,3))},Mn.sortedIndex=function(e,t){return oo(e,t)},Mn.sortedIndexBy=function(e,t,n){return io(e,t,ci(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oo(e,t);if(r<n&&Ma(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return oo(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return io(e,t,ci(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oo(e,t,!0)-1;if(Ma(e[n],t))return n}return-1},Mn.startCase=Ks,Mn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(ps(n),0,e.length),t=co(t),e.slice(n,n+t.length)==t},Mn.subtract=jc,Mn.sum=function(e){return e&&e.length?Kt(e,nc):0},Mn.sumBy=function(e,t){return e&&e.length?Kt(e,ci(t,2)):0},Mn.template=function(e,t,r){var o=Mn.templateSettings;r&&xi(e,t,r)&&(t=n),e=vs(e),t=bs({},t,o,Qo);var i,a,s=bs({},t.imports,o.imports,Qo),c=Bs(s),u=Jt(s,c),l=0,f=t.interpolate||xe,d="__p += '",p=Se((t.escape||xe).source+"|"+f.source+"|"+(f===J?fe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),h="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,o,s,c){return r||(r=o),d+=e.slice(l,c).replace(be,rn),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),d+="';\n";var g=Pe.call(t,"variable")&&t.variable;if(g){if(ue.test(g))throw new _e("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(q,""):d).replace(z,"$1").replace(U,"$1;"),d="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Js((function(){return je(c,h+"return "+d).apply(n,u)}));if(y.source=d,Ga(y))throw y;return y},Mn.times=function(e,t){if((e=ps(e))<1||e>l)return[];var n=d,r=mn(e,d);t=ci(t),e-=d;for(var o=Zt(r,t);++n<e;)t(n);return o},Mn.toFinite=ds,Mn.toInteger=ps,Mn.toLength=hs,Mn.toLower=function(e){return vs(e).toLowerCase()},Mn.toNumber=gs,Mn.toSafeInteger=function(e){return e?ar(ps(e),-9007199254740991,l):0===e?e:0},Mn.toString=vs,Mn.toUpper=function(e){return vs(e).toUpperCase()},Mn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Gt(e);if(!e||!(t=co(t)))return e;var o=dn(e),i=dn(t);return wo(o,Xt(o,i),en(o,i)+1).join("")},Mn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,pn(e)+1);if(!e||!(t=co(t)))return e;var o=dn(e);return wo(o,0,en(o,dn(t))+1).join("")},Mn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(re,"");if(!e||!(t=co(t)))return e;var o=dn(e);return wo(o,Xt(o,dn(t))).join("")},Mn.truncate=function(e,t){var r=30,o="...";if(Xa(t)){var i="separator"in t?t.separator:i;r="length"in t?ps(t.length):r,o="omission"in t?co(t.omission):o}var a=(e=vs(e)).length;if(on(e)){var s=dn(e);a=s.length}if(r>=a)return e;var c=r-fn(o);if(c<1)return o;var u=s?wo(s,0,c).join(""):e.slice(0,c);if(i===n)return u+o;if(s&&(c+=u.length-c),os(i)){if(e.slice(c).search(i)){var l,f=u;for(i.global||(i=Se(i.source,vs(de.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;u=u.slice(0,d===n?c:d)}}else if(e.indexOf(co(i),c)!=c){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+o},Mn.unescape=function(e){return(e=vs(e))&&K.test(e)?e.replace(V,hn):e},Mn.uniqueId=function(e){var t=++Le;return vs(e)+t},Mn.upperCase=Zs,Mn.upperFirst=Gs,Mn.each=va,Mn.eachRight=ma,Mn.first=Vi,ac(Mn,(bc={},xr(Mn,(function(e,t){Pe.call(Mn.prototype,t)||(bc[t]=e)})),bc),{chain:!1}),Mn.VERSION="4.17.21",St(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mn[e].placeholder=Mn})),St(["drop","take"],(function(e,t){zn.prototype[e]=function(r){r=r===n?1:vn(ps(r),0);var o=this.__filtered__&&!t?new zn(this):this.clone();return o.__filtered__?o.__takeCount__=mn(r,o.__takeCount__):o.__views__.push({size:mn(r,d),type:e+(o.__dir__<0?"Right":"")}),o},zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),St(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),St(["head","last"],(function(e,t){var n="take"+(t?"Right":"");zn.prototype[e]=function(){return this[n](1).value()[0]}})),St(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");zn.prototype[e]=function(){return this.__filtered__?new zn(this):this[n](1)}})),zn.prototype.compact=function(){return this.filter(nc)},zn.prototype.find=function(e){return this.filter(e).head()},zn.prototype.findLast=function(e){return this.reverse().find(e)},zn.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new zn(this):this.map((function(n){return Or(n,e,t)}))})),zn.prototype.reject=function(e){return this.filter(Pa(ci(e)))},zn.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new zn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zn.prototype.toArray=function(){return this.take(d)},xr(zn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Mn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Mn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,c=t instanceof zn,u=s[0],l=c||za(t),f=function(e){var t=i.apply(Mn,At([e],s));return o&&d?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,g=c&&!p;if(!a&&l){t=g?t:new zn(this);var y=e.apply(t,s);return y.__actions__.push({func:da,args:[f],thisArg:n}),new qn(y,d)}return h&&g?e.apply(this,s):(y=this.thru(f),h?o?y.value()[0]:y.value():y)})})),St(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(za(o)?o:[],e)}return this[n]((function(n){return t.apply(za(n)?n:[],e)}))}})),xr(zn.prototype,(function(e,t){var n=Mn[t];if(n){var r=n.name+"";Pe.call(Bn,r)||(Bn[r]=[]),Bn[r].push({name:t,func:n})}})),Bn[Do(n,2).name]=[{name:"wrapper",func:n}],zn.prototype.clone=function(){var e=new zn(this.__wrapped__);return e.__actions__=Oo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oo(this.__views__),e},zn.prototype.reverse=function(){if(this.__filtered__){var e=new zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=za(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,c=s-a,u=r?s:a-1,l=this.__iteratees__,f=l.length,d=0,p=mn(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return ho(e,this.__actions__);var h=[];e:for(;c--&&d<p;){for(var g=-1,y=e[u+=t];++g<f;){var v=l[g],m=v.iteratee,x=v.type,b=m(y);if(2==x)y=b;else if(!b){if(1==x)continue e;break e}}h[d++]=y}return h},Mn.prototype.at=pa,Mn.prototype.chain=function(){return fa(this)},Mn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===n&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,r=this;r instanceof Fn;){var o=Wi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zn){var t=e;return this.__actions__.length&&(t=new zn(this)),(t=t.reverse()).__actions__.push({func:da,args:[Xi],thisArg:n}),new qn(t,this.__chain__)}return this.thru(Xi)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return ho(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,Ye&&(Mn.prototype[Ye]=function(){return this}),Mn}();ht?((ht.exports=gn)._=gn,pt._=gn):dt._=gn}).call(E)}(Qt,Qt.exports);const en=e=>Object.keys(new Array(e+1).join(","));function tn({getScrollParent:t,fetchTransactionQuery:n}){const{account:r}=e.useWalletStore();return a.jsx(d,{useWindow:!1,hasMore:n.hasNextPage,threshold:300,getScrollParent:t,loadMore:Qt.exports.debounce((()=>{n.hasNextPage&&!n.isFetchingNextPage&&n.fetchNextPage()}),500),children:a.jsx(nn,{account:r,isLoading:n.isLoading,isFetchingNextPage:n.isFetchingNextPage,list:n.list})})}function nn({account:e,isLoading:r,isFetchingNextPage:i,list:s}){const{getChain:c}=w();return a.jsxs(a.Fragment,{children:[r&&a.jsx(a.Fragment,{children:en(3).map((e=>a.jsxs(t.Box,{sx:{position:"relative",display:"flex",width:"100%",pl:24,pr:48,py:20},children:[a.jsx(t.Box,{sx:{position:"absolute",bottom:0,right:24,left:80,height:"1px",backgroundColor:"border.default"}}),a.jsx(t.Skeleton,{width:40,height:40}),a.jsxs(t.Box,{sx:{ml:8,flex:1},children:[a.jsx(t.Skeleton,{width:"100%",height:22}),a.jsx(t.Skeleton,{width:128,height:16,sx:{mt:4}})]})]},e)))}),!r&&!s.length&&a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexDirection:"column",mt:56,gap:12,typography:"body2",color:"text.secondary"},children:[a.jsx(t.EmptyDataIcon,{sx:{width:60,height:60,borderRadius:12}}),a.jsx(o.Trans,{id:"FzJ11V",message:"This is empty"})]}),!r&&(null==s?void 0:s.map((r=>{var o,i,s,u;if(!(null==r?void 0:r.key)||!r.chainId)return null;const l=null===(o=r.extend)||void 0===o?void 0:o.tx,f=null===(i=r.extend)||void 0===i?void 0:i.status;let d="";if(l){const t=null!==(u=null===(s=c(r.chainId))||void 0===s?void 0:s.scanUrl)&&void 0!==u?u:"";d=f===nt.Warning&&e?t+`/address/${e}`:t+`/tx/${l}`}return a.jsxs(t.Box,{onClick:()=>{d&&window.open(d)},sx:Object.assign({position:"relative",display:"flex",pl:20,py:16,borderRadius:8},d?{cursor:"pointer","&:hover":{backgroundColor:"hover.default"},"&:not(:hover) > svg:last-child":{visibility:"hidden"}}:{}),children:[a.jsxs(t.Box,{sx:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:40,height:40,borderRadius:"50%",backgroundColor:"background.paperContrast"},children:[a.jsx(an,{brief:r.key,chainId:r.chainId}),a.jsx(t.Box,{sx:{position:"absolute",bottom:-1,right:-1,display:"flex",width:16,height:16,color:"primary.contrastText",backgroundColor:"background.paperContrast",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:"50%"},children:a.jsx(rn,{status:f})})]}),a.jsxs(t.Box,{sx:{ml:12,flex:1},children:[a.jsx(t.Box,{sx:{display:"flex",alignItems:"center",fontWeight:600},children:on(r.key,f)}),a.jsx(t.Box,{sx:{mt:12,typography:"h6",color:"text.secondary"},children:Xt({time:Number(r.createTime)})})]}),d?a.jsx(t.Box,{component:n.ArrowRight,sx:{mr:24,width:18,height:18,alignSelf:"center"}}):a.jsx(t.Box,{})]},r.id)}))),i?a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,mt:16,color:"text.secondary",typography:"body2"},children:[a.jsx(t.RotatingIcon,{sx:{width:20,color:"primary.main"}}),a.jsx(o.Trans,{id:"EYDfo2",message:"Loading more"})]}):""]})}function rn({status:e}){switch(e){case nt.Success:return a.jsx(t.Box,{component:n.DoneFilled,sx:{width:"100%",height:"100%"}});case nt.Failed:return a.jsx(t.Box,{component:n.ErrorFilled,sx:{width:"100%",height:"100%"}});case nt.Warning:return a.jsx(t.Box,{component:n.InvalidFilled,sx:{width:"100%",height:"100%"}});case nt.Running:return a.jsx(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"primary.main",borderRadius:"50%",width:"100%",height:"100%"},children:a.jsx(t.Box,{component:"svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",sx:{width:"92%",height:"92%",color:"primary.contrastText"},children:a.jsx("path",{d:"M6 13C6 11.35 6.67 9.85 7.76 8.76L6.34 7.34C4.9 8.79 4 10.79 4 13C4 17.08 7.05 20.44 11 20.93V18.91C8.17 18.43 6 15.97 6 13ZM20 13C20 8.58 16.42 5 12 5C11.94 5 11.88 5.01 11.82 5.01L12.91 3.92L11.5 2.5L8 6L11.5 9.5L12.91 8.09L11.83 7.01C11.89 7.01 11.95 7 12 7C15.31 7 18 9.69 18 13C18 15.97 15.83 18.43 13 18.91V20.93C16.95 20.44 20 17.08 20 13Z",fill:"currentColor"})})})}return null}function on(e,t){const n=function(e){const t={"common.approve.resetBrief":Jt._({id:"OfhWJH",message:"Reset"}),"common.approve.brief":Jt._({id:"Z7ZXbT",message:"Approve"})},n=Object.keys(t).find((t=>0===e.indexOf(t)));if(n)return t[n];switch(e){case"tradingCard.submissionBrief":case"limit.main.title":case"exchange.tabs.RFQ":case"bridge.order.execute-bridge":return Jt._({id:"vH2C/2",message:"Swap"});case"bridge.order.execute-bridge":return Jt._({id:"zPGNJm",message:"Transfer"});case"liquidity.operate.title":case"pool.amm-v2.add-liquidity.title":case"pool.amm-v3.add-liquidity.title":return Jt._({id:"OBdohg",message:"Add Liquidity"});case"liquidity.operate.remove.title":case"pool.amm-v2.remove-liquidity.title":case"pool.amm-v3.remove-liquidity.title":return Jt._({id:"3XBvkd",message:"Remove Liquidity"});case"pool.my-pools.create-a-pool":case"pool.amm-v2.create.title":case"pool.amm-v3.create.title":return Jt._({id:"8OiU8L",message:"Pool Creation"});case"mining.stake":return Jt._({id:"JYKRJS",message:"Stake"});case"mining.submit.remove-title":return Jt._({id:"z5vMiF",message:"End mining\n"});case"mining.deposit.receive-reward":case"pool.amm-v3.receive-reward.title":return Jt._({id:"zXCpR0",message:"Claim Rewards"});case"nav.create-mining":return Jt._({id:"14s9LL",message:"Create Liquidity Mining"});case"wallet.account.card.operate.send":return Jt._({id:"JlFcis",message:"Send"});default:return null}}(e),r={[nt.Success]:Jt._({id:"KAbcm2",message:"Succeeded"}),[nt.Failed]:Jt._({id:"7Bj3x9",message:"Failed"}),[nt.Running]:Jt._({id:"UbRKMZ",message:"Pending"}),[nt.Warning]:Jt._({id:"OfhWJH",message:"Reset"})}[t];return r?`${n} ${r}`:n}function an({brief:e,chainId:r}){var o;const{getChain:i}=w(),s={"common.approve.resetBrief":a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M6 13C6 11.35 6.67 9.85 7.76 8.76L6.34 7.34C4.9 8.79 4 10.79 4 13C4 17.08 7.05 20.44 11 20.93V18.91C8.17 18.43 6 15.97 6 13ZM20 13C20 8.58 16.42 5 12 5C11.94 5 11.88 5.01 11.82 5.01L12.91 3.92L11.5 2.5L8 6L11.5 9.5L12.91 8.09L11.83 7.01C11.89 7.01 11.95 7 12 7C15.31 7 18 9.69 18 13C18 15.97 15.83 18.43 13 18.91V20.93C16.95 20.44 20 17.08 20 13Z",fill:"currentColor"})}),"common.approve.brief":a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM9 6C9 4.34 10.34 3 12 3C13.66 3 15 4.34 15 6V8H9V6ZM14 14C14 14.7364 13.5967 15.3831 13 15.7303V18H11V15.7303C10.4033 15.3831 10 14.7364 10 14C10 12.9 10.9 12 12 12C13.1 12 14 12.9 14 14Z",fill:"currentColor"})})},c=Object.keys(s).find((t=>0===e.indexOf(t)));if(c)return a.jsx(t.Box,{sx:{width:24,height:24,color:"text.secondary"},children:s[c]});if("wallet.account.card.operate.send"===e)return a.jsx(n.ArrowBack,{className:"w-6 h-6 rotate-90"});if(["tradingCard.submissionBrief","limit.main.title","exchange.tabs.RFQ","bridge.order.execute-bridge"].includes(e)){const e=null===(o=i(r))||void 0===o?void 0:o.logo;return e?a.jsx(t.Box,{sx:{width:24,height:24,color:"text.secondary"},children:e}):null}const u=a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{className:"active-color",fillRule:"evenodd",clipRule:"evenodd",d:"M7 3.77979C7.47668 3.77979 7.8871 4.11624 7.98058 4.58367C8.22292 5.79538 8.95318 6.97446 9.92213 7.76492C11.2407 8.84061 12 10.2058 12 11.7298C12 14.4891 9.76515 16.7798 7 16.7798C4.23484 16.7798 2 14.4891 2 11.7298C2 10.2237 2.74214 8.83345 4.0853 7.75892C5.05247 6.98519 5.77579 5.80184 6.01942 4.58367C6.1129 4.11624 6.52332 3.77979 7 3.77979Z",fill:"currentColor"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 1.5C14.4794 1.5 14.8913 1.84022 14.982 2.31097C15.4329 4.65329 16.7694 6.47608 18.6541 8.07351C20.8277 9.91584 22 12.1786 22 14.6364C22 19.2681 18.3582 22.5 14 22.5C11.1133 22.5 8.5408 21.082 7.13281 18.7785C10.9673 18.7065 14 15.5225 14 11.7298C14 9.47755 12.8621 7.58357 11.1898 6.21802C12.0968 5.07887 12.732 3.79698 13.018 2.31097C13.1086 1.84022 13.5206 1.5 14 1.5Z",fill:"currentColor"})]}),l=a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{clipPath:"url(#clip0_331_763)",children:[a.jsx("path",{d:"M9.69961 7.1L9.39961 8H14.6996L13.0996 3.3L12.6996 2H11.3996L9.69961 7.1Z",fill:"currentColor"}),a.jsx("path",{d:"M9.39961 10L12.0996 18.2L14.6996 10H9.39961Z",fill:"currentColor"}),a.jsx("path",{d:"M16.7996 8H22.4996C22.4996 7.9 22.3996 7.9 22.3996 7.8L18.0996 2.6C17.9996 2.5 17.8996 2.3 17.6996 2.2C17.5996 2.1 17.3996 2 17.1996 2C16.9996 2 16.8996 2 16.6996 2H14.7996L16.7996 8Z",fill:"currentColor"}),a.jsx("path",{d:"M16.7996 10L13.1996 21.1C13.2996 21 13.3996 20.9 13.3996 20.9L22.3996 10.2C22.3996 10.1 22.4996 10.1 22.4996 10H16.7996Z",fill:"currentColor"}),a.jsx("path",{className:"active-color",d:"M7.29961 8L9.09961 2.7L9.29961 2H7.39961C7.29961 2 7.09961 2 6.89961 2.1C6.69961 2.1 6.59961 2.2 6.39961 2.3C6.29961 2.4 6.19961 2.5 6.09961 2.6L1.69961 7.9L1.59961 8H7.29961Z",fill:"currentColor"}),a.jsx("path",{className:"active-color",d:"M7.29961 10H1.59961C1.59961 10.1 1.69961 10.1 1.69961 10.2L10.6996 21C10.7996 21.1 10.7996 21.2 10.8996 21.3L7.29961 10Z",fill:"currentColor"})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_331_763",children:a.jsx("rect",{width:"20.9",height:"19.2",fill:"white",transform:"translate(1.59961 2)"})})})]}),f={"pool.my-pools.create-a-pool":u,"pool.detail.modify-dpp-parameters":u,"liquidity.operate.remove.title":u,"liquidity.operate.title":u,"pool.amm-v2.create.title":u,"pool.amm-v2.remove-liquidity.title":u,"pool.amm-v2.add-liquidity.title":u,"pool.amm-v3.create.title":u,"pool.amm-v3.add-liquidity.title":u,"pool.amm-v3.remove-liquidity.title":u,"pool.amm-v3.receive-reward.title":u,"nav.create-mining":l,"mining.deposit.receive-reward":l,"mining.stake":l,"mining.submit.remove-title":l}[e];return f?a.jsx(t.Box,{sx:{width:24,height:24,color:"text.secondary"},children:f}):null}function sn({width:e=24,height:n=24,marginRight:r=8,zIndex:o,address:s,logoURI:c,sx:u,chainId:l,noBorder:f,chainSize:d=12,logoOffset:p}){const[g,y]=i.useState(!1),[v,m]=i.useState(""),[x,b]=i.useState(!1),_=i.useCallback((()=>y(!0)),[]),j="".charAt(0).toUpperCase(),{getTokenLogoUrl:k}=w(),C=(null==k?void 0:k({chainId:l,address:s,width:e,height:n}))||c;i.useEffect((()=>{b(!1)}),[s,C]),i.useEffect((()=>{try{let t=s;if(t&&t.length<15&&(t=t.padEnd(15,"0")),t){const n=new h(t,{size:e,format:"svg",margin:.2,background:[255,234,4,255]}).toString();m(`data:image/svg+xml;base64,${n}`)}}catch(e){console.error("generate Identicon error: ",e)}}),[s,e]);return a.jsxs(t.Box,{sx:Object.assign(Object.assign(Object.assign({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:e,height:n,borderRadius:"50%"},f?{}:{border:"solid 1px",borderColor:"border.main"}),{flexShrink:0}),Object.assign({marginRight:r,zIndex:o},u)),children:[!g&&a.jsx(t.Box,{sx:{typography:"ht",height:"100%",width:"100%",borderRadius:"50%",border:"transparent 2px solid",borderColor:"text.primary",color:"text.primary",display:"flex",alignItems:"center",justifyContent:"center"},children:j}),a.jsx(t.Box,{component:"img",src:!C||x?v:C,onLoad:_,onError:e=>{const t=e.target;s&&v&&b(!0),t.onerror=null},sx:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",borderRadius:"50%",overflow:"hidden",width:"100%",height:"100%"}})]})}function cn({balanceListData:e}){const i=t.useTheme(),{onClickToken:s,getChain:c}=w();return a.jsxs("div",{children:[e.tokenLoading&&en(3).map(((e,n)=>a.jsx(t.Skeleton,{height:40,sx:{mx:20,my:16}},n))),!e.tokenLoading&&!e.hasBalanceList.length&&a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:12,mt:56,color:"text.secondary"},children:[a.jsx(t.EmptyDataIcon,{}),a.jsx(o.Trans,{id:"JE8mMQ",message:"No tokens"})]}),e.hasBalanceList.map((u=>{var l;return a.jsxs(t.Box,{sx:Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",gap:12,px:20,py:16,overflow:"hidden"},s?{cursor:"pointer","&:hover":{backgroundColor:"hover.default","& .token-operate":{display:"flex"}}}:{}),onClick:()=>{s&&s(u)},children:[a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",gap:12},children:[a.jsx(sn,{address:u.address,chainId:u.chainId,logoURI:u.logoURI,width:40,height:40}),a.jsxs("div",{children:[a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",gap:4},children:[u.name,a.jsxs(t.Box,{className:"token-operate",sx:{display:"flex",alignItems:"center",gap:4,[i.breakpoints.up("tablet")]:{display:"none"}},children:[a.jsx(t.TooltipToast,{arrow:!1,title:a.jsx(o.Trans,{id:"6V3Ea3",message:"Copied"}),children:a.jsx(t.Box,{component:n.Copy,sx:{width:14,height:14,cursor:"pointer",color:"text.secondary","&:hover":{color:"text.primary"}},onClick:()=>{r(u.address)}})}),a.jsx(t.Box,{component:"a",href:`https://${null===(l=c(u.chainId))||void 0===l?void 0:l.scanUrl}${u.address?`/address/${u.address}`:""}`,rel:"noopener noreferrer",target:"_blank",sx:{display:"flex",width:14,height:14,color:"text.secondary","&:hover":{color:"text.primary"}},onClick:e=>{e.stopPropagation()},children:a.jsx(t.Box,{component:n.ArrowTopRightBorder,sx:{width:14,height:14}})})]})]}),a.jsx("div",{className:"text-sm text-secondary",children:`${st({input:u.balance})} ${u.symbol}`})]})]}),a.jsxs(t.LoadingSkeleton,{loading:e.fiatPriceQuery.isLoading,loadingProps:{width:100},title:u.fiatPriceBalance?`$${st({input:u.fiatPriceBalance})}`:void 0,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",typography:"h5"},children:["$",u.fiatPriceBalance?at(u.fiatPriceBalance):"-"]})]},u.address)}))]})}function un({children:e,chainLogo:n}){return a.jsxs(t.Box,{sx:{position:"relative",padding:20,borderRadius:12,border:"solid 1px",borderColor:"border.main",color:"text.primary",zIndex:0},children:[a.jsxs(t.Box,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:-1,overflow:"hidden",borderRadius:12},children:[a.jsx(t.Box,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:"#F6F6F6"}}),a.jsxs(t.Box,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,"& > img, & > svg":{height:"auto",width:"calc(100% + 2px)",position:"absolute","&:first-child":{top:"50%",transform:"translateY(-50%)",opacity:.5,filter:"blur(99.99999237060547px)"},"&:last-child":{left:60,bottom:40,opacity:.2,filter:"blur(7.499999523162842px)"}}},children:[n,n]}),a.jsx(t.Box,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,background:"linear-gradient(108deg, rgba(255, 255, 255, 0.90) 9.8%, rgba(255, 255, 255, 0.00) 49.94%)"}})]}),e]})}function ln({chainId:e,setShowSendTokenPage:r,setShowReceiveTokenPage:i,allFiatPriceBalance:s,allFiatPriceBalanceLoading:c}){var u;const{getChain:l}=w(),f=l(e),d=t.createTheme({mode:"light"});return a.jsx(t.ThemeProvider,{theme:d,children:a.jsxs(un,{chainLogo:null!==(u=null==f?void 0:f.logoBg)&&void 0!==u?u:null==f?void 0:f.logo,children:[a.jsx(t.Box,{sx:{typography:"body2",color:"text.secondary"},children:a.jsx(o.Trans,{id:"fsBGk0",message:"Balance"})}),a.jsxs(t.LoadingSkeleton,{component:"div",loading:c,loadingSx:{width:120},sx:{mt:4,typography:"h1"},title:st({input:s}),children:["$",at(s)]}),a.jsxs(t.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:20,mt:28},children:[a.jsxs(t.ButtonBase,{sx:{flex:1,display:"flex",flexDirection:"column",gap:12,px:20,py:12,typography:"body2",backgroundColor:"background.paperDarkContrast",borderRadius:12,textAlign:"left","&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},onClick:()=>{r(!0)},children:[a.jsx(t.Box,{component:n.ArrowBack,sx:{transform:"rotate(90deg)"}}),a.jsx(o.Trans,{id:"JlFcis",message:"Send"})]}),a.jsxs(t.ButtonBase,{sx:{flex:1,display:"flex",flexDirection:"column",gap:12,px:20,py:12,typography:"body2",backgroundColor:"background.paperDarkContrast",borderRadius:12,textAlign:"left","&:hover":{backgroundColor:"primary.main",color:"primary.contrastText"}},onClick:()=>{i(!0)},children:[a.jsx(t.Box,{component:n.ArrowBack,sx:{transform:"rotate(-90deg)"}}),a.jsx(o.Trans,{id:"lDgVWA",message:"Receive"})]})]})]})})}var fn;function dn({chainId:s,account:c,walletWeb3:u,onClose:d,setShowSendTokenPage:p,setShowReceiveTokenPage:h}){const{getChain:g}=w(),{connected:y}=e.useWalletStore(),v=null==y?void 0:y.wallet,[m,x]=i.useState(fn.tokens),b=i.useRef(null),j=i.useCallback((()=>b?b.current:null),[b]),k=tt({account:c,visible:m===fn.tokens}),C=function({account:e,chainId:t}){var n;const{graphQLRequests:r}=w(),o=null!==(n=null==r?void 0:r.getInfiniteQuery(f.SystemApi.graphql.fetchNoticeCenterTransactionList,"page",{where:{limit:10,user:e,chainId:t,refreshNow:!0}}))&&void 0!==n?n:{queryKey:[1],queryFn:()=>{}},a=l.useInfiniteQuery(Object.assign(Object.assign({},o),{enabled:!!e&&!!r,initialPageParam:1,getNextPageParam:e=>{var t;const{page:n,limit:r,count:o}=null!==(t=e.notice_center_transactionList)&&void 0!==t?t:{};if(!n||!r||!o)return null;let i=Math.floor(o/r);return o%r&&(i+=1),n>=i?null:n+1}})),[s,c]=i.useMemo((()=>{var e,t,n;const r=[];null===(t=null===(e=a.data)||void 0===e?void 0:e.pages)||void 0===t||t.forEach((e=>{var t,n;null===(n=null===(t=e.notice_center_transactionList)||void 0===t?void 0:t.list)||void 0===n||n.forEach((e=>{var t;(null===(t=null==e?void 0:e.extend)||void 0===t?void 0:t.safeTxHash)||r.push(e)}))}));const o=null!==(n=r.filter((e=>(null==e?void 0:e.extend.status)===nt.Running)))&&void 0!==n?n:[];return[r,o]}),[a.data]);return Object.assign(Object.assign({},a),{list:s,pendingList:c})}({account:c,chainId:s}),S=[{key:fn.tokens,value:a.jsx(o.Trans,{id:"TP9/K5",message:"Token"})},{key:fn.activity,value:a.jsx(t.Tooltip,{title:a.jsx(o.Trans,{id:"U8oDGg",message:"On-chain transaction records"}),children:a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",gap:8},children:[a.jsx(o.Trans,{id:"XJOV1Y",message:"Activity"}),!!C.pendingList.length&&a.jsx(t.RotatingIcon,{})]})})}],[T,E]=i.useState(!1),O=i.useCallback((()=>{const e=setTimeout((()=>{E(!1)}),1500);return()=>{clearTimeout(e)}}),[]),B=g(s);return c&&v?a.jsxs(a.Fragment,{children:[a.jsx(Ze,{onClose:d,children:a.jsxs(t.Box,{sx:{display:"flex",gap:8,alignItems:"center",height:34,borderRadius:8,backgroundColor:"background.paperContrast"},children:[a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",gap:4,pl:8},children:[a.jsxs(t.Box,{sx:{position:"relative",pr:6,width:28,height:22},children:[!!v.logo&&a.jsx("img",{src:v.logo,alt:v.showName,width:22,height:22}),!!(null==B?void 0:B.logo)&&a.jsx(t.Box,{sx:{position:"absolute",bottom:0,right:0,width:12,height:12,"& > img, & > svg":{position:"absolute",inset:0,width:"100%",height:"100%",borderRadius:"50%",border:"solid 1px",borderColor:"border.main"}},children:null==B?void 0:B.logo})]}),_(c)]}),a.jsx(t.Tooltip,{onlyClick:!0,arrow:!1,title:a.jsx(o.Trans,{id:"6V3Ea3",message:"Copied"}),open:T,onOpen:()=>{E(!0),O()},onClose:()=>E(!1),children:a.jsx(t.Box,{component:n.Copy,onClick:()=>{r(c)},sx:{width:18,height:18,cursor:"pointer",color:"text.secondary","&:hover":{color:"text.primary"}}})}),a.jsx(t.Box,{component:"a",rel:"noopener noreferrer",target:"_blank",href:(null==B?void 0:B.scanUrl)+"/address/"+c,sx:{display:"flex",lineHeight:1,color:"text.secondary","&:hover":{color:"text.primary"}},children:a.jsx(t.Box,{component:n.ArrowTopRightBorder,sx:{width:18,height:18}})}),a.jsx(t.ButtonBase,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",px:8,border:"solid 0",borderLeftWidth:1,borderColor:"border.main",color:"error.main","&:hover":{backgroundColor:"background.tag"}},onClick:()=>{null==u||u.disconnectWallet(),d()},children:a.jsx(t.Box,{component:n.Disconnect,sx:{width:18,height:18}})})]})}),a.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden",px:20},ref:b,children:[a.jsx(ln,{chainId:s,setShowSendTokenPage:p,setShowReceiveTokenPage:h,allFiatPriceBalanceLoading:k.allFiatPriceBalanceLoading,allFiatPriceBalance:k.allFiatPriceBalance}),a.jsxs(t.Tabs,{value:m,onChange:(e,t)=>{null!==t&&x(t)},children:[a.jsx(t.TabsGroup,{tabs:S}),a.jsx(t.TabPanel,{value:fn.tokens,children:a.jsx(cn,{balanceListData:k})}),a.jsx(t.TabPanel,{value:fn.activity,className:"pt-2",children:a.jsx(tn,{fetchTransactionQuery:C,getScrollParent:j})})]})]})]}):null}!function(e){e.tokens="tokens",e.activity="activity"}(fn||(fn={}));const pn="0.settings:account:risk-confirm",hn=(e,t,n)=>S(void 0,void 0,void 0,(function*(){if(!e||!e.connectWalletBefore(t))return;const r=Object.assign({},n);return e.connectToWallet(t,r)}));function gn(t,n,r,o){const[a,s]=i.useState([]),c=e.useWalletStore((e=>e.disabledWalletKeyList)),u=e.useWalletStore((e=>e.eip6963WalletList));return i.useEffect((()=>{(()=>{S(this,void 0,void 0,(function*(){var e;if(n&&void 0!==t){yield n.setDisabledState();const r=n.getWalletList(t,{eip6963WalletList:u}),i=[];let a=r.length;for(let t=0;t<a;t++){const a=r[t];let s=!1;a.injected&&(s=a.injected()),!s&&a.isInstalled&&(s=yield null===(e=a.isInstalled)||void 0===e?void 0:e.call(a)),i.push({title:a.showName,icon:a.logo,currentType:a.type,source:a,onClick:e=>{try{return hn(n,a,e)}catch(e){throw o&&o(),e}},disabled:c.includes(`${a.type}-${a.showName}`),isLastConnection:a.type===n.connectController.getLastConnectType(),isInstalled:s})}s(i)}}))})()}),[n,t,r,c,u]),{walletList:a}}function yn({loading:n,wallet:r,isChecked:i,installed:s}){const c=t.useTheme(),u=c.palette.success.main,l="light"===c.palette.mode?"#EB8D27":"#FFE804",f=t.alpha("#FFE804",.1);return n?a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",gap:4,p:c.spacing(4,8),borderRadius:6,typography:"body2",backgroundColor:t.alpha(c.palette.text.primary,.1),color:"text.secondary"},children:[a.jsx(t.RotatingIcon,{sx:{width:18,height:18,color:"text.secondary"}}),a.jsx(o.Trans,{id:"9zb2WA",message:"Connecting"}),"··"]}):i?a.jsx(t.Box,{sx:{p:c.spacing(4,8),borderRadius:6,typography:"body2",backgroundColor:f,color:l},children:a.jsx(o.Trans,{id:"QHcLEN",message:"Connected"})}):r.isLastConnection?a.jsx(t.Box,{sx:{p:c.spacing(4,8),borderRadius:6,typography:"body2",backgroundColor:t.alpha(c.palette.text.primary,.1),color:"text.secondary"},children:a.jsx(o.Trans,{id:"xHr8Pp",message:"Last connection"})}):r.currentType===e.WalletType.SocialLogin?a.jsx(t.Box,{sx:{mt:4,padding:c.spacing(4,8),borderRadius:6,typography:"body2",backgroundColor:t.alpha(u,.1),color:u},children:"New"}):s?a.jsx(t.Box,{sx:{p:c.spacing(4,8),borderRadius:6,typography:"body2",backgroundColor:t.alpha(c.palette.text.primary,.1),color:"text.secondary"},children:a.jsx(o.Trans,{id:"9ow2PX",message:"Installed Wallet"})}):null}function vn({on:e,chainId:n,onClose:r,onNext:i}){const{getChain:s}=w(),{name:c}=s(n)||{name:"Unknown"};return a.jsxs(Ye,{open:e,onClose:r,width:340,bodySx:{px:20},children:[a.jsx(t.Box,{sx:{typography:"caption",mt:28,textAlign:"center"},children:a.jsx(o.Trans,{id:"E/yE9x",message:"Before proceeding make sure"})}),a.jsx(t.Box,{sx:{mt:12,whiteSpace:"pre-wrap",color:"text.secondary",typography:"body2"},children:Jt._({id:"Sz0SkD",message:"1、Ledger Live APP is closed{BR}2、The device plugged in via USB,NOT Bluetooth{BR}3、The device is unlocked and in the {ledgerAppName} app{BR}4、”Blind Signing” is enabled in {ledgerAppName} app",values:{BR:"\n",ledgerAppName:c}})}),a.jsx(t.Button,{onClick:i,fullWidth:!0,variant:t.Button.Variant.outlined,sx:{mt:24,mb:20},children:a.jsx(o.Trans,{id:"xGVfLh",message:"Continue"})})]})}function mn({left:e,disabled:r,onClick:o}){const i=t.useTheme(),s=i.palette.border.main,c="light"===i.palette.mode;return a.jsx(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:8,backgroundColor:s,cursor:r?"disabled":"pointer",color:r?"background.paperDarkContrast":"text.secondary","&:hover":{backgroundColor:r?s:t.alpha(s,c?.3:.5)}},onClick:()=>{r||o()},children:a.jsx(t.Box,{component:n.ArrowRight,sx:e?{transform:"rotate(180deg)"}:void 0})})}function xn({on:n,path:r,chainId:s=1,onClose:c,onNext:u,onError:l}){var f,d,p,h;const{loadAccountListEthBalance:g,getChain:y}=w(),v=t.useTheme(),[m,x]=i.useState(new Map),[b,_]=i.useState(""),[j,C]=i.useState(0),[T,E]=i.useState(!1),[O,B]=i.useState(new Map),[I,R]=i.useState(new Map);i.useEffect((()=>{if(n){if(!r)throw new Error("path is not valid.");x(new Map),R(new Map),C(1)}else C(0)}),[r,n,l]),i.useEffect((()=>{if(n&&j){if(m.get(j))return;if(E(!0),!r)throw new Error("path is not valid.");const t=()=>S(this,void 0,void 0,(function*(){let t=[];try{t=yield function(t,n,r){return S(this,void 0,void 0,(function*(){return(yield e.getLedgerUSBPackage()).getAccountList(t,n,r)}))}(r,j,5),E(!1)}catch(e){return console.error(e),l(e),void E(!1)}const n=new Map,o=t.map((({path:e,account:t})=>(n.set(t,e),t)));if(B((e=>new Map([...e,...n]))),x((e=>e.set(j,o))),g){const e=yield g(o,s);R((t=>new Map([...t,...e])))}}));t()}}),[j]);const A=null!==(p=null===(d=null===(f=y(s))||void 0===f?void 0:f.gasToken)||void 0===d?void 0:d.symbol)&&void 0!==p?p:"ETH",P=v.palette.border.main;return a.jsxs(Ye,{open:n,onClose:c,width:420,children:[a.jsx(Ze,{onClose:c,children:a.jsx(o.Trans,{id:"E/yE9x",message:"Before proceeding make sure"})}),a.jsxs(t.Box,{children:[a.jsxs(t.Box,{component:"table",sx:{mt:38,width:"100%",borderRadius:12,borderCollapse:"separate",borderSpacing:0,border:`solid 1px ${P}`,"& td, & th":{py:12,border:`solid 0px ${P}`,borderBottomWidth:1},"& th":{typography:"body1",color:"text.secondary"},"& tr:last-of-type td":{borderColor:"transparent"},"& td":{"&:first-of-type":{pl:20,pr:8},"&:last-of-type":{pr:20}}},children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{style:{width:60},children:" "}),a.jsx("th",{style:{width:28},children:a.jsx(o.Trans,{id:"S0kLOH",message:"ID"})}),a.jsx(t.Box,{component:"th",sx:{textAlign:"center"},children:a.jsx(o.Trans,{id:"Du6bPw",message:"Address"})}),!!g&&a.jsx("th",{children:a.jsx(o.Trans,{id:"fsBGk0",message:"Balance"})})]})}),a.jsx("tbody",{children:(null!==(h=m.get(j))&&void 0!==h?h:Object.keys(new Array(6).join(","))).map(((e,n)=>a.jsxs(t.Box,{component:"tr",onClick:()=>{e&&_(e)},sx:e?{cursor:"pointer","&:hover":{backgroundColor:"custom.background.listHover"}}:void 0,children:[a.jsx("td",{children:a.jsx(t.Radio,{checked:e===b,onChange:()=>_(e),disabled:!e})}),a.jsx("td",{children:n+1+5*(j-1)}),a.jsx(t.LoadingSkeleton,{loading:T,component:"td",sx:{textAlign:"center"},children:e?a.jsx(k,{address:e,truncate:!0,iconSpace:6,customChainId:s,sx:{display:"inline-flex"}}):""}),a.jsx(t.LoadingSkeleton,{loading:T||!I.get(e),component:"td",sx:{textAlign:"right"},children:I.get(e)?`${st({input:I.get(e)||""})} ${A}`:""})]},e||n)))})]}),a.jsxs(t.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",mt:20},children:[a.jsx(mn,{left:!0,disabled:1===j,onClick:()=>C((e=>e-1))}),a.jsx(t.Box,{sx:{mx:8},children:j}),a.jsx(mn,{onClick:()=>C((e=>e+1))})]})]}),a.jsx(t.Box,{sx:{mt:40,px:20,py:16,backgroundColor:"background.paperContrast"},children:a.jsx(t.Button,{fullWidth:!0,disabled:!b,onClick:()=>{u(O.get(b),b),c()},children:a.jsx(o.Trans,{id:"xGVfLh",message:"Continue"})})})]})}function bn({on:n,onClose:r,onNext:s}){const c=t.useTheme(),[u,l]=i.useState("");return a.jsxs(Ye,{open:n,onClose:r,width:420,children:[a.jsx(Ze,{onClose:r,children:a.jsx(o.Trans,{id:"vN+hAq",message:"Available Ledger Account"})}),e.HD_PATH_LIST.map((({path:e,name:n})=>a.jsx(t.Button,{fullWidth:!0,variant:t.Button.Variant.outlined,sx:Object.assign({mt:20},u!==e?{color:"text.disabled",borderColor:c.palette.background.paperDarkContrast,"&:hover":{backgroundColor:t.alpha(c.palette.text.primary,.1),color:"text.primary"}}:{}),onClick:()=>(e=>{l(e)})(e),children:n},e))),a.jsx(t.Box,{sx:{mt:40,px:20,py:16,backgroundColor:"background.paperContrast"},children:a.jsx(t.Button,{fullWidth:!0,disabled:!u,onClick:()=>s(u),children:a.jsx(o.Trans,{id:"xGVfLh",message:"Continue"})})})]})}function wn(){return a.jsx(t.Box,{sx:{position:"relative",width:64,height:64,mt:20,borderRadius:"50%",borderStyle:"solid",borderWidth:4,borderColor:"background.input",animation:"rotation 2s infinite linear","@keyframes rotation":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},"& > svg":{position:"absolute",top:"-4px",right:"-4px",color:"primary.main"}},children:a.jsx("svg",{width:"33px",height:"33px",viewBox:"0 0 33 33",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("g",{transform:"translate(-186.000000, -375.000000)",stroke:"currentColor",strokeWidth:"4",children:a.jsx("g",{transform:"translate(18.000000, 291.000000)",children:a.jsx("g",{transform:"translate(40.000000, 83.000000)",children:a.jsx("path",{d:"M159,32 C159,15.9837423 146.016258,3 130,3"})})})})})})})}function _n({on:e}){return a.jsx(Ye,{open:e,width:340,children:a.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",p:20},children:[a.jsx(t.Box,{sx:{color:"text.secondary"},children:a.jsx(o.Trans,{id:"AeXO77",message:"Account"})}),a.jsx(wn,{}),a.jsx(t.Box,{sx:{mt:20},children:a.jsx(o.Trans,{id:"vN+hAq",message:"Available Ledger Account"})}),a.jsx(t.Box,{sx:{mt:8,color:"text.secondary",typography:"body2"},children:a.jsx(o.Trans,{id:"Z3FXyt",message:"Loading..."})})]})})}function jn({on:e,onClose:r}){return a.jsx(Ye,{open:e,width:340,onClose:r,children:a.jsxs(t.Box,{sx:{textAlign:"center",py:20},children:[a.jsx(t.Box,{component:n.Lock,sx:{mt:20,width:64,height:64,color:"primary.main"}}),a.jsx(t.Box,{sx:{mt:20,whiteSpace:"pre-wrap",fontWeight:600},children:a.jsx(o.Trans,{id:"gPbbTL",message:"The Ledger Device is locked\\nPlease unlock from the device"})}),a.jsx(t.Button,{onClick:r,fullWidth:!0,variant:t.Button.Variant.outlined,sx:{mt:24},children:a.jsx(o.Trans,{id:"zga9sT",message:"OK"})})]})})}function kn({error:e,onClose:r}){return a.jsx(Ye,{open:!!e,width:340,onClose:r,children:a.jsxs(t.Box,{sx:{textAlign:"center",p:20},children:[a.jsx(t.Box,{component:n.Error,sx:{width:40,height:40,color:"error.main"}}),a.jsx(t.Box,{sx:{typography:"caption",mt:20,whiteSpace:"pre-wrap"},children:a.jsx(o.Trans,{id:"LobdAW",message:"Unknown Error"})}),a.jsx(t.Box,{sx:{typography:"h6",mt:12,whiteSpace:"pre-wrap",color:"text.secondary"},children:e}),a.jsx(t.Button,{onClick:r,fullWidth:!0,variant:t.Button.Variant.outlined,sx:{mt:24},children:a.jsx(o.Trans,{id:"zga9sT",message:"OK"})})]})})}var Cn;function Sn({on:t,chainId:n=1,onClose:r,onConnect:o}){const[s,c]=i.useState(Cn.init),[u,l]=i.useState(""),[f,d]=i.useState();i.useEffect((()=>{c(t?Cn.readProtocol:Cn.init)}),[t]);const p=i.useMemo((()=>27404===(null==f?void 0:f.statusCode)),[f]);return a.jsxs(a.Fragment,{children:[a.jsx(vn,{on:s===Cn.readProtocol,chainId:n,onClose:r,onNext:()=>S(this,void 0,void 0,(function*(){c(Cn.loadingConnect);try{(yield function(){return S(this,void 0,void 0,(function*(){return(yield e.getLedgerUSBPackage()).getTransport()}))}()).close(),c(Cn.selectPath)}catch(e){console.error(e),r()}}))}),a.jsx(_n,{on:s===Cn.loadingConnect}),a.jsx(bn,{on:s===Cn.selectPath,onClose:r,onNext:e=>{l(e),c(Cn.selectAddress)}}),a.jsx(xn,{on:s===Cn.selectAddress,path:u,chainId:n,onClose:r,onNext:o,onError:e=>{c(Cn.selectPath),d(e)}}),a.jsx(jn,{on:!!p,onClose:()=>d(void 0)}),a.jsx(kn,{error:f&&!p?f.message:void 0,onClose:()=>d(void 0)})]})}!function(e){e[e.init=1]="init",e[e.readProtocol=2]="readProtocol",e[e.loadingConnect=3]="loadingConnect",e[e.selectPath=4]="selectPath",e[e.selectAddress=5]="selectAddress"}(Cn||(Cn={}));const Tn=e.allWalletObject.Alchemy;function En({walletWeb3:t,showAlchemyConnect:n}){const r=On({walletWeb3:t}),{chainId:o}=e.useWalletStore(),a="undefined"!=typeof window?window.location.search:"";i.useEffect((()=>{const i=new URLSearchParams(a),s=i.get("bundle");if(s){const e=i.get("orgId");r.mutate({type:"email",orgId:e,bundle:s})}else{(()=>S(this,void 0,void 0,(function*(){var r,i;if(t.connectController.getAutoCacheType()===e.WalletType.Alchemy){const e=yield null===(r=Tn.getPackage)||void 0===r?void 0:r.call(Tn),a=yield e.getAlchemySigner(o,null===(i=t.providerConfig.alchemyParams)||void 0===i?void 0:i.apiKeyObject);(yield a.getAuthDetails().catch((()=>null)))?yield hn(t,e,{chainId:o}):n()}})))()}}),[a])}function On({walletWeb3:t}){const{chainId:n}=e.useWalletStore();return l.useMutation({mutationFn:e=>S(this,void 0,void 0,(function*(){var r,o;const i=yield null===(r=Tn.getPackage)||void 0===r?void 0:r.call(Tn),a=yield i.getAlchemySigner(n);if("email"===(null==e?void 0:e.type)&&"email"in e){const t=new URLSearchParams;yield a.authenticate(Object.assign(Object.assign({},e),{redirectParams:t}))}else yield a.authenticate(e),yield hn(t,i,{chainId:n,alchemyParams:{authParams:e,apiKeyObject:null===(o=t.providerConfig.alchemyParams)||void 0===o?void 0:o.apiKeyObject}})}))})}function Bn({open:e,walletWeb3:r,setOpen:s}){var c,u;const[l,f]=i.useState(""),d=!!l&&!(e=>/^[a-zA-Z0-9._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/g.test(e))(l),p=()=>s(!1);En({walletWeb3:r,showAlchemyConnect:()=>s(!0)});const h=On({walletWeb3:r});return a.jsxs(Ye,{open:e,onClose:p,children:[a.jsx(Ze,{sx:{p:20,borderWidth:"0 0 1px",borderStyle:"solid",borderColor:"border.main"},children:a.jsx(o.Trans,{id:"RETKSh",message:"Connect Alchemy"})}),a.jsxs(t.Box,{sx:{p:20},children:[a.jsx(t.Box,{component:"img",src:Tn.logo,sx:{display:"block",mx:"auto",width:40,height:40}}),"email"===(null===(c=h.variables)||void 0===c?void 0:c.type)&&(h.isSuccess||h.isPending)?a.jsxs(a.Fragment,{children:[a.jsx(t.Box,{sx:{mt:20,textAlign:"center",typography:"caption"},children:a.jsx(o.Trans,{id:"6Ui8nZ",message:"Log in with your email"})}),a.jsx(t.Box,{sx:{mt:12,mx:"auto",maxWidth:300,textAlign:"center",color:"text.secondary",typography:"body2"},children:a.jsx(o.Trans,{id:"3UCJ3e",message:"Check your email and click the link to complete login"})}),a.jsxs(t.ButtonBase,{sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:20,mx:"auto",typography:"body2","&:hover":{color:"text.secondary"}},onClick:()=>{h.reset()},children:[a.jsx(o.Trans,{id:"sr0UJD",message:"Go Back"}),a.jsx(t.Box,{component:n.ArrowRight,sx:{width:18,height:18}})]})]}):a.jsxs(a.Fragment,{children:[a.jsx(t.Box,{sx:{mt:20,mx:"auto",textAlign:"center",maxWidth:300,typography:"caption"},children:a.jsx(o.Trans,{id:"3y6FjD",message:"Log in with your email or a passkey"})}),a.jsx(t.Input,{placeholder:Jt._({id:"6KnyG0",message:"Enter email"}),fullWidth:!0,height:48,errorMsg:d?Jt._({id:"B2Tpo0",message:"Invalid email"}):void 0,value:l,onChange:e=>f(e.target.value),sx:{mt:20}}),a.jsx(t.Button,{fullWidth:!0,disabled:!l||d,sx:{mt:12},isLoading:"email"===(null===(u=h.variables)||void 0===u?void 0:u.type)&&h.isPending,onClick:()=>{h.mutate({type:"email",email:l})},children:a.jsx(o.Trans,{id:"hQRttt",message:"Submit"})}),a.jsx(t.Box,{sx:{position:"relative",mt:20,textAlign:"center","&::before":{content:'""',display:"block",position:"absolute",top:"50%",left:0,right:0,transform:"translateY(-50%)",height:"1px",backgroundColor:"border.main"}},children:a.jsx(t.Box,{component:"span",sx:{px:8,backgroundColor:"background.paper",color:"text.secondary",position:"relative",zIndex:1},children:a.jsx(o.Trans,{id:"BzEFor",message:"or"})})}),a.jsx(t.Button,{fullWidth:!0,variant:t.Button.Variant.outlined,sx:{mt:20},onClick:()=>S(this,void 0,void 0,(function*(){yield h.mutateAsync({type:"passkey",createNew:!0,username:`DODO_${Date.now()}`}),h.isError||p()})),children:a.jsx(o.Trans,{id:"OzjK0A",message:"Create new passkey"})}),a.jsxs(t.ButtonBase,{sx:{display:"flex",justifyContent:"center",alignItems:"center",mt:12,mx:"auto",py:8,typography:"body2","&:hover":{color:"text.secondary"}},onClick:()=>S(this,void 0,void 0,(function*(){yield h.mutateAsync({type:"passkey",createNew:!1}),h.isError||p()})),children:[a.jsx(o.Trans,{id:"Mlg3Ds",message:"Choose existing passkey"}),a.jsx(t.Box,{component:n.ArrowRight,sx:{width:18,height:18}})]})]})]})]})}const In={display:"grid",gap:12,gridTemplateColumns:"repeat(1, 1fr)",alignItems:"start",px:8,py:6};function Rn({chainId:n,wallet:r,loggedIn:o,matchChain:s,selectedChainId:c,disabled:u,activeWalletType:l,installed:f,disabledClick:d,onShowLedgerConnect:p,onShowAlchemyConnect:h,onConnectWallet:g,WalletTag:y}){const v=t.useTheme(),m=o&&l===r.currentType&&(s||"walletconnect"===l.toLocaleLowerCase()),[x,b]=i.useState(!1),{connectTimeout:_,onConnectTimeout:j,switchNetwork:k,onConnected:C}=w();return a.jsxs(t.Box,{component:t.ButtonBase,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",p:v.spacing(10,12),width:"100%",color:"text.primary",borderRadius:8,opacity:u?.3:1,"&:hover":{backgroundColor:v.palette.background.tag}},onClick:()=>S(this,void 0,void 0,(function*(){if(u)return void d();if(m)return;if(r.currentType===e.WalletType.LedgerUSB){if(r.disabled)return;return void p()}if(r.currentType===e.WalletType.Alchemy){if(r.disabled)return;const e=yield function(e){return S(this,void 0,void 0,(function*(){var t;const n=yield null===(t=Tn.getPackage)||void 0===t?void 0:t.call(Tn);if(n){const t=yield n.getAlchemySigner(e);if(yield t.getAuthDetails().catch((()=>null)))return!0}return!1}))}(null!=n?n:1);if(!e)return void h()}let t;b(!0);try{yield Promise.race([(()=>S(this,void 0,void 0,(function*(){if(g)try{yield g(r);const t=e.useWalletStore.getState().chainId;C&&C(t,r)}finally{b(!1)}else{if(k&&r.currentType===l&&(!s||!o)&&c){if(void 0!==(yield k(c)))return void b(!1)}if(r.onClick)try{yield r.onClick();const t=e.useWalletStore.getState().chainId;C&&C(t,r)}finally{b(!1)}}})))(),j?new Promise(((e,n)=>t=setTimeout((()=>{j(),n()}),null!=_?_:15e3))):void 0])}catch(e){throw b(!1),e}t&&clearTimeout(t)})),children:[a.jsxs(t.Box,{sx:{position:"relative",display:"flex",alignItems:"center",gap:12,justifyContent:"center",typography:"body1",fontWeight:600},children:[a.jsx(t.Box,{component:"img",src:r.icon,sx:{width:40,height:40,borderRadius:12,border:"solid 1px",borderColor:"border.main"}}),r.title]}),y?a.jsx(y,{loading:x,wallet:r,isChecked:m,installed:!!f,children:a.jsx(yn,{loading:x,wallet:r,isChecked:m,installed:!!f})}):a.jsx(yn,{loading:x,wallet:r,isChecked:m,installed:!!f})]})}function An({chainId:r,account:s,walletWeb3:c,showOtherInjectWallet:u,onClose:l,onConnectWallet:f,WalletTag:d}){const p=t.useTheme(),h="dark"===p.palette.mode?t.alpha("#F1F902",.1):"#F1F902",{termsOfServiceLink:g,chainId:y}=w(),v=null!=y?y:r,[m,x]=i.useState(!1),[b,_]=i.useState(!1),[j,k]=i.useState(!1),C=i.useCallback((()=>{x(!0);const e=setTimeout((()=>{x(!1)}),1800);return()=>{clearTimeout(e)}}),[]),{walletList:S,userReadAndChecked:T,handleChangeUserReadAndChecked:E,activeWalletType:O}=(({walletWeb3:t,matchTestChain:n,showOtherInjectWallet:r,selectedChainId:o,hasTermsOfServiceLink:a})=>{const s=e.useWalletStore((e=>e.walletType)),{walletList:c}=gn(o,t,r),[u,l]=i.useState(a&&"1"===localStorage.getItem(pn)||!0);return{walletList:c,userReadAndChecked:u,handleChangeUserReadAndChecked:e=>{localStorage.setItem(pn,e?"1":"0"),l(e)},activeWalletType:s}})({walletWeb3:c,matchTestChain:!0,showOtherInjectWallet:u,selectedChainId:v,hasTermsOfServiceLink:!!g}),[B,I]=i.useState(!1),R=i.useMemo((()=>B?S:S.slice(0,6)),[S,B]),A=i.useMemo((()=>S.slice(6,9)),[S]);return a.jsxs(a.Fragment,{children:[a.jsx(Ze,{onClose:l,children:a.jsx(o.Trans,{id:"CtByM7",message:"Connect Wallet"})}),a.jsxs(t.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden",pb:g?0:20},children:[a.jsxs(t.Box,{sx:{overflowY:"auto"},children:[a.jsx(t.Box,{sx:Object.assign({},In),children:R.map((e=>a.jsx(Rn,{wallet:e,disabled:!T,loggedIn:!!s,selectedChainId:v,matchChain:v===r,activeWalletType:O,installed:e.isInstalled,disabledClick:C,onShowLedgerConnect:()=>_(!0),onShowAlchemyConnect:()=>k(!0),onConnectWallet:f,WalletTag:d},e.title)))}),A.length?a.jsxs(t.Box,{sx:{mx:20,display:"flex",justifyContent:"center",position:"relative",opacity:T?1:.5},children:[a.jsx(t.Box,{sx:{position:"absolute",top:"50%",right:0,left:0,height:"1px",backgroundColor:"border.main",transform:"translateY(-50%)"}}),B?a.jsx(t.Box,{component:t.ButtonBase,disabled:!T,sx:{position:"relative",padding:p.spacing(0,12),height:34,borderRadius:20,backgroundColor:"background.paper",border:"solid 1px",borderColor:"border.main","&:hover":{backgroundColor:"background.paperContrast"}},onClick:()=>I(!1),children:a.jsx(t.Box,{component:n.ArrowRight,sx:{color:"text.secondary",transform:"rotate(-90deg)"}})}):a.jsxs(t.Box,{component:t.ButtonBase,disabled:!T,sx:{position:"relative",display:"flex",alignItems:"center",padding:p.spacing(0,12),height:34,borderRadius:20,border:"solid 1px",borderColor:"border.main",backgroundColor:"background.paper",typography:"h6",color:"text.secondary","&:hover":{backgroundColor:"background.paperContrast"}},onClick:()=>I(!0),children:[a.jsx(o.Trans,{id:"yN5k0R",message:"More Wallets"}),A.map(((e,n)=>a.jsx(t.Box,{component:"img",src:e.icon,alt:"icon",sx:Object.assign({width:18,height:18},0!==n?{position:"relative",left:-2}:{ml:12})},e.title))),a.jsx(t.Box,{sx:{width:18,height:18,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"background.paperContrast",borderRadius:"50%"},children:a.jsx(t.Box,{component:n.More,sx:{width:18,height:18}})}),a.jsx(t.Box,{component:n.ArrowRight,sx:{transform:"rotate(90deg)"}})]})]}):"",a.jsx(Sn,{on:b,chainId:v,onClose:()=>_(!1),onConnect:(t,n)=>{var r;null===(r=S.find((t=>t.currentType===e.WalletType.LedgerUSB)))||void 0===r||r.onClick({ledgerParams:{path:t,account:n}})}}),!!c&&a.jsx(Bn,{open:j,setOpen:k,walletWeb3:c})]}),!!g&&a.jsx(t.Checkbox,{checked:T,onChange:e=>E(e.target.checked),label:a.jsx(t.Box,{sx:{typography:"body2","& a":{fontWeight:600,color:"primary.main"}},children:g}),sx:{m:0,p:20,alignItems:"flex-start",display:"flex",backgroundColor:m?h:"transparent","& > span":{p:0,mr:8}}})]})]})}function Pn({onClose:s,onBack:c}){const{account:u}=e.useWalletStore(),[l,f]=i.useState(!1),d=i.useCallback((()=>{const e=setTimeout((()=>{f(!1)}),1500);return()=>{clearTimeout(e)}}),[]);return u?a.jsxs(a.Fragment,{children:[a.jsx(Ze,{onClose:s,children:a.jsxs(t.ButtonBase,{onClick:c,sx:{display:"flex",gap:8,alignItems:"center",typography:"caption"},children:[a.jsx(t.Box,{component:n.ArrowBack,sx:{width:16,height:16}}),a.jsx(o.Trans,{id:"lDgVWA",message:"Receive"})]})}),a.jsx(t.Box,{sx:{display:"flex",flexDirection:"column",flex:1,overflowY:"auto"},children:a.jsxs(t.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",flex:1,pt:28,pb:20,width:326,mx:"auto"},children:[a.jsxs(t.Box,{children:[a.jsx(t.Box,{sx:{p:36,borderRadius:12,border:"solid 1px",borderColor:"border.main"},children:a.jsx(g.QRCodeSVG,{id:"qrcode",size:252,value:u,level:"M"})}),a.jsx(t.Box,{sx:{mt:12,color:"text.secondary",wordBreak:"break-all",textAlign:"center"},children:u})]}),a.jsx(t.Tooltip,{onlyClick:!0,arrow:!1,title:a.jsx(o.Trans,{id:"6V3Ea3",message:"Copied"}),open:l,onOpen:()=>{f(!0),d()},onClose:()=>f(!1),children:a.jsxs(t.ButtonBase,{onClick:()=>{r(u)},sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,mt:12,px:16,py:6,width:"100%",height:48,fontWeight:600,backgroundColor:"background.paperDarkContrast",borderRadius:8,"&:hover":{opacity:.7}},children:[a.jsx(t.Box,{component:n.Copy,sx:{width:18,height:18}}),a.jsx(o.Trans,{id:"gCNLBV",message:"Copy wallet address"})]})})]})})]}):null}function Ln({locale:e,children:t}){return i.useEffect((()=>{(()=>{S(this,void 0,void 0,(function*(){yield function(){return S(this,arguments,void 0,(function*(e="en"){try{const t=yield import(`./locales/${e}.js`);Jt.load(e,t.messages||t.default.messages)}catch(e){console.error(e)}Jt.activate(e)}))}(e)}))})()}),[e]),a.jsx(o.I18nProvider,{i18n:Jt,children:t})}exports.ClientProvider=function({children:e}){const n=new l.QueryClient,r=t.createTheme();return a.jsx(l.QueryClientProvider,{client:n,children:a.jsx(t.ThemeProvider,{theme:r,children:a.jsx(Ln,{children:e})})})},exports.ConnectDialog=function({open:t,onClose:n,walletWeb3:r,onConnectWallet:o,WalletTag:i}){const{account:s,chainId:c}=e.useWalletStore();return a.jsx(Ye,{open:t,onClose:n,width:420,children:a.jsx(An,{chainId:c,account:s,walletWeb3:r,showOtherInjectWallet:!0,onClose:n,onConnectWallet:o,WalletTag:i})})},exports.ConnectPage=An,exports.LangProvider=Ln,exports.WalletConnectProvider=b,exports.WalletDialog=function({open:t,onClose:n,walletWeb3:r,onConnectWallet:o,WalletTag:s}){const{SendTokenPage:c,chainId:u}=w(),{account:l,chainId:f,connected:d}=e.useWalletStore(),[p,h]=i.useState(!1),[g,y]=i.useState(!1);return a.jsx(Ye,{open:t,onClose:n,width:420,bodySx:{height:l&&c?"80vh":void 0},children:c&&l&&(null==d?void 0:d.wallet)?a.jsx(a.Fragment,{children:p?a.jsx(a.Fragment,{children:!!c&&a.jsx(c,{open:p,onClose:n,onBack:()=>h(!1)})}):g?a.jsx(Pn,{onClose:n,onBack:()=>y(!1)}):a.jsx(a.Fragment,{children:a.jsx(dn,{chainId:null!=u?u:f,account:l,walletWeb3:r,onClose:n,setShowSendTokenPage:h,setShowReceiveTokenPage:y})})}):a.jsx(An,{chainId:f,account:l,walletWeb3:r,showOtherInjectWallet:!0,onClose:n,onConnectWallet:o,WalletTag:s})})},exports.useWalletListByNetwork=gn;
@@ -1 +1 @@
1
- /*eslint-disable*/module.exports={messages:JSON.parse("{\"Sz0SkD\":[\"1、Ledger Live APP is closed\",[\"BR\"],\"2、The device plugged in via USB,NOT Bluetooth\",[\"BR\"],\"3、The device is unlocked and in the \",[\"ledgerAppName\"],\" app\",[\"BR\"],\"4、”Blind Signing” is enabled in \",[\"ledgerAppName\"],\" app\"],\"AeXO77\":\"Account\",\"XJOV1Y\":\"Activity\",\"OBdohg\":\"Add Liquidity\",\"Du6bPw\":\"Address\",\"Z7ZXbT\":\"Approve\",\"vN+hAq\":\"Available Ledger Account\",\"fsBGk0\":\"Balance\",\"E/yE9x\":\"Before proceeding make sure\",\"3UCJ3e\":\"Check your email and click the link to complete login\",\"Mlg3Ds\":\"Choose existing passkey\",\"zXCpR0\":\"Claim Rewards\",\"RETKSh\":\"Connect Alchemy\",\"CtByM7\":\"Connect Wallet\",\"QHcLEN\":\"Connected\",\"9zb2WA\":\"Connecting\",\"xGVfLh\":\"Continue\",\"6V3Ea3\":\"Copied\",\"gCNLBV\":\"Copy wallet address\",\"14s9LL\":\"Create Liquidity Mining\",\"OzjK0A\":\"Create new passkey\",\"WZRsOg\":\"End mining\\\\n\",\"6KnyG0\":\"Enter email\",\"7Bj3x9\":\"Failed\",\"sr0UJD\":\"Go Back\",\"S0kLOH\":\"ID\",\"9ow2PX\":\"Installed Wallet\",\"B2Tpo0\":\"Invalid email\",\"rwC96V\":\"Invalid wallet address\",\"xHr8Pp\":\"Last connection\",\"EYDfo2\":\"Loading more\",\"Z3FXyt\":\"Loading...\",\"6Ui8nZ\":\"Log in with your email\",\"3y6FjD\":\"Log in with your email or a passkey\",\"yN5k0R\":\"More Wallets\",\"JE8mMQ\":\"No tokens\",\"zga9sT\":\"OK\",\"U8oDGg\":\"On-chain transaction records\",\"BzEFor\":\"or\",\"UbRKMZ\":\"Pending\",\"8OiU8L\":\"Pool Creation\",\"lDgVWA\":\"Receive\",\"pkRuyd\":\"Receiver address\",\"3XBvkd\":\"Remove Liquidity\",\"OfhWJH\":\"Reset\",\"JlFcis\":\"Send\",\"JYKRJS\":\"Stake\",\"hQRttt\":\"Submit\",\"KAbcm2\":\"Succeeded\",\"vH2C/2\":\"Swap\",\"kdetxi\":\"The Ledger Device is locked\\nPlease unlock from the device\",\"FzJ11V\":\"This is empty\",\"TP9/K5\":\"Token\",\"zPGNJm\":\"Transfer\",\"LobdAW\":\"Unknown Error\"}")};
1
+ /*eslint-disable*/module.exports={messages:JSON.parse("{\"14s9LL\":[\"Create Liquidity Mining\"],\"3UCJ3e\":[\"Check your email and click the link to complete login\"],\"3XBvkd\":[\"Remove Liquidity\"],\"3y6FjD\":[\"Log in with your email or a passkey\"],\"6KnyG0\":[\"Enter email\"],\"6Ui8nZ\":[\"Log in with your email\"],\"6V3Ea3\":[\"Copied\"],\"7Bj3x9\":[\"Failed\"],\"8OiU8L\":[\"Pool Creation\"],\"9ow2PX\":[\"Installed Wallet\"],\"9zb2WA\":[\"Connecting\"],\"AeXO77\":[\"Account\"],\"B2Tpo0\":[\"Invalid email\"],\"BzEFor\":[\"or\"],\"CtByM7\":[\"Connect Wallet\"],\"Du6bPw\":[\"Address\"],\"E/yE9x\":[\"Before proceeding make sure\"],\"EYDfo2\":[\"Loading more\"],\"FzJ11V\":[\"This is empty\"],\"JE8mMQ\":[\"No tokens\"],\"JYKRJS\":[\"Stake\"],\"JlFcis\":[\"Send\"],\"KAbcm2\":[\"Succeeded\"],\"LobdAW\":[\"Unknown Error\"],\"Mlg3Ds\":[\"Choose existing passkey\"],\"OBdohg\":[\"Add Liquidity\"],\"OfhWJH\":[\"Reset\"],\"OzjK0A\":[\"Create new passkey\"],\"QHcLEN\":[\"Connected\"],\"RETKSh\":[\"Connect Alchemy\"],\"S0kLOH\":[\"ID\"],\"Sz0SkD\":[\"1、Ledger Live APP is closed\",[\"BR\"],\"2、The device plugged in via USB,NOT Bluetooth\",[\"BR\"],\"3、The device is unlocked and in the \",[\"ledgerAppName\"],\" app\",[\"BR\"],\"4、”Blind Signing” is enabled in \",[\"ledgerAppName\"],\" app\"],\"TP9/K5\":[\"Token\"],\"U8oDGg\":[\"On-chain transaction records\"],\"UbRKMZ\":[\"Pending\"],\"XJOV1Y\":[\"Activity\"],\"Z3FXyt\":[\"Loading...\"],\"Z7ZXbT\":[\"Approve\"],\"fsBGk0\":[\"Balance\"],\"gCNLBV\":[\"Copy wallet address\"],\"gPbbTL\":[\"The Ledger Device is locked\\\\nPlease unlock from the device\"],\"hQRttt\":[\"Submit\"],\"lDgVWA\":[\"Receive\"],\"pkRuyd\":[\"Receiver address\"],\"rwC96V\":[\"Invalid wallet address\"],\"sr0UJD\":[\"Go Back\"],\"vH2C/2\":[\"Swap\"],\"vN+hAq\":[\"Available Ledger Account\"],\"xGVfLh\":[\"Continue\"],\"xHr8Pp\":[\"Last connection\"],\"yN5k0R\":[\"More Wallets\"],\"z5vMiF\":[\"End mining\\n\"],\"zPGNJm\":[\"Transfer\"],\"zXCpR0\":[\"Claim Rewards\"],\"zga9sT\":[\"OK\"]}")};