@actual-app/web 23.7.2 → 23.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +24 -16
- package/build/index.html +1 -1
- package/build/kcab/kcab.worker.73a03b9f0217ad62df42.js +3 -0
- package/build/kcab/kcab.worker.73a03b9f0217ad62df42.js.map +1 -0
- package/build/static/css/{main.1037ae74.css → main.90cc2688.css} +2 -2
- package/build/static/css/main.90cc2688.css.map +1 -0
- package/build/static/js/281.6bb03bd1.chunk.js +2 -0
- package/build/static/js/281.6bb03bd1.chunk.js.map +1 -0
- package/build/static/js/383.1b04bac1.chunk.js +2 -0
- package/build/static/js/383.1b04bac1.chunk.js.map +1 -0
- package/build/static/js/457.4c255aed.chunk.js +2 -0
- package/build/static/js/457.4c255aed.chunk.js.map +1 -0
- package/build/static/js/876.00fe0e63.chunk.js +2 -0
- package/build/static/js/876.00fe0e63.chunk.js.map +1 -0
- package/build/static/js/969.b56f4e53.chunk.js +2 -0
- package/build/static/js/{969.98ab5142.chunk.js.map → 969.b56f4e53.chunk.js.map} +1 -1
- package/build/static/js/main.f758b66a.js +3 -0
- package/build/static/js/main.f758b66a.js.map +1 -0
- package/build/static/js/narrow-components.55a3b7fd.chunk.js +2 -0
- package/build/static/js/narrow-components.55a3b7fd.chunk.js.map +1 -0
- package/build/static/js/reports.d1b97437.chunk.js +2 -0
- package/build/static/js/reports.d1b97437.chunk.js.map +1 -0
- package/build/static/js/resize-observer-polyfill.68c3249b.chunk.js +2 -0
- package/build/static/js/{resize-observer-polyfill.a2fa22b1.chunk.js.map → resize-observer-polyfill.68c3249b.chunk.js.map} +1 -1
- package/build/static/js/wide-components.6cb72932.chunk.js +2 -0
- package/build/static/js/wide-components.6cb72932.chunk.js.map +1 -0
- package/package.json +4 -2
- package/build/kcab/kcab.worker.7aebb51bfd02e5b1a78f.js +0 -3
- package/build/kcab/kcab.worker.7aebb51bfd02e5b1a78f.js.map +0 -1
- package/build/static/css/main.1037ae74.css.map +0 -1
- package/build/static/js/457.e2e3c7b2.chunk.js +0 -2
- package/build/static/js/457.e2e3c7b2.chunk.js.map +0 -1
- package/build/static/js/969.98ab5142.chunk.js +0 -2
- package/build/static/js/main.6ae08084.js +0 -3
- package/build/static/js/main.6ae08084.js.map +0 -1
- package/build/static/js/reports.c9bf4be9.chunk.js +0 -2
- package/build/static/js/reports.c9bf4be9.chunk.js.map +0 -1
- package/build/static/js/resize-observer-polyfill.a2fa22b1.chunk.js +0 -2
- package/build/static/media/Inter.var.c2fe3cb2b7c746f7966a.woff2 +0 -0
- package/build/static/media/bg.42987350d58d04897ed83a3ce50df2d5.svg +0 -1
- /package/build/kcab/{kcab.worker.7aebb51bfd02e5b1a78f.js.LICENSE.txt → kcab.worker.73a03b9f0217ad62df42.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.6ae08084.js.LICENSE.txt → main.f758b66a.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see main.f758b66a.js.LICENSE.txt */
|
|
2
|
+
!function(){var e={95542:function(e,t,n){"use strict";n.d(t,{$:function(){return s},F:function(){return u}});var r=n(83017),o=n(1591),i=n(85761),a=n(28993);const l=(0,r.createContext)(null);function s(e){(0,o.nP)();const t=document.documentElement.clientHeight,n=document.documentElement.clientWidth,r={atLeastMediumWidth:n>=i.A.medium,isNarrowWidth:n<i.A.small,isSmallWidth:n>=i.A.small&&n<i.A.medium,isMediumWidth:n>=i.A.medium&&n<i.A.wide,isWideWidth:n>=i.A.wide,height:t,width:n};return(0,a.jsx)(l.Provider,{value:r,children:e.children})}function u(){return(0,r.useContext)(l)}},77799:function(e,t,n){"use strict";n.d(t,{$:function(){return a},F:function(){return l}});var r=n(83017),o=n(28993);let i=(0,r.createContext)(null);function a(e){let{location:t,children:n}=e;return(0,o.jsx)(i.Provider,{value:t,children:n})}function l(){return(0,r.useContext)(i)}},55082:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});n(83017);var r=n(86634),o=n(28993);var i=e=>(0,o.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,o.jsx)("path",{d:"M10 3v2a5 5 0 0 0-3.54 8.54l-1.41 1.41A7 7 0 0 1 10 3zm4.95 2.05A7 7 0 0 1 10 17v-2a5 5 0 0 0 3.54-8.54l1.41-1.41zM10 20l-4-4 4-4v8zm0-12V0l4 4-4 4z",fill:"currentColor"})}),a=n(91743);let l=r.iv.keyframes({"0%":{transform:"rotateZ(0deg)"},"100%":{transform:"rotateZ(360deg)"}});function s(e){let{animating:t,iconStyle:n}=e;return(0,o.jsx)(a.Z,{style:[{animation:t?`${l} 1s infinite linear`:null}],children:(0,o.jsx)(i,{width:14,height:14,style:n})})}},84418:function(e,t,n){"use strict";n.d(t,{Hn:function(){return J},ZP:function(){return te},Ap:function(){return ee}});var r=n(83017),o=n(71274),i=n(95542),a=n(91743),l=n(79274),s=n(86634),u=n(79515),c=n(81576),d=n(61563),f=n(28993);var h=e=>(0,f.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,f.jsx)("path",{d:"m12.95 10.707.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z",fill:"currentColor"})}),p=n(13925);var g=e=>(0,f.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,f.jsx)("path",{d:"M11 12h6v-1l-3-1V2l3-1V0H3v1l3 1v8l-3 1v1h6v7l1 1 1-1v-7z",fill:"currentColor"})});var m=e=>(0,f.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,f.jsx)("path",{d:"M19 18h-1v-8c0-.6-.4-1-1-1s-1 .4-1 1v8h-3V1c0-.6-.4-1-1-1s-1 .4-1 1v17H8V7c0-.6-.4-1-1-1s-1 .4-1 1v11H3V3c0-.6-.4-1-1-1s-1 .4-1 1v15c-.6 0-1 .4-1 1s.4 1 1 1h18c.6 0 1-.4 1-1s-.4-1-1-1z",fill:"currentColor"})});var y=e=>(0,f.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,f.jsx)("path",{d:"M18 9.87V20H2V9.87a4.25 4.25 0 0 0 3-.38V14h10V9.5a4.26 4.26 0 0 0 3 .37zM3 0h4l-.67 6.03A3.43 3.43 0 0 1 3 9C1.34 9 .42 7.73.95 6.15L3 0zm5 0h4l.7 6.3c.17 1.5-.91 2.7-2.42 2.7h-.56A2.38 2.38 0 0 1 7.3 6.3L8 0zm5 0h4l2.05 6.15C19.58 7.73 18.65 9 17 9a3.42 3.42 0 0 1-3.33-2.97L13 0z",fill:"currentColor"})});var v=e=>(0,f.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,f.jsx)("path",{d:"M17 16v4h-2v-4h-2v-3h6v3h-2zM1 9h6v3H1V9zm6-4h6v3H7V5zM3 0h2v8H3V0zm12 0h2v12h-2V0zM9 0h2v4H9V0zM3 12h2v8H3v-8zm6-4h2v12H9V8z",fill:"currentColor"})}),b=n(1836);var w=e=>(0,f.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,f.jsx)("path",{d:"M10.416 12a2.643 2.643 0 0 1 .775-1.875L20.732.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.643 2.643 0 0 1 10.416 12Z",fill:"currentColor"}),(0,f.jsx)("path",{d:"M.25 12a2.643 2.643 0 0 1 .775-1.875L10.566.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.643 2.643 0 0 1 .25 12Z",fill:"currentColor"})]}),x=n(32873),S=n(53819),k=n(78738),C=n(51045),j=n(82054),E=n(13743),T=n(1317),O=n(91742);const I=240,D=600;function _(e){let{style:t,to:n,onClick:r,activeStyle:o,forceActive:i,children:l}=e;return r?(0,f.jsx)(a.Z,{role:"button",tabIndex:0,style:[t,{touchAction:"auto",userSelect:"none",userDrag:"none",cursor:"pointer",...i?o:{}}],onClick:r,children:l}):(0,f.jsx)(C.Z,{to:n,style:t,activeStyle:o,forceActive:i,children:l})}function A(e){let{children:t,Icon:n,title:r,style:o,indent:i=0,to:l,onClick:s,button:u,forceHover:c=!1,forceActive:d=!1}=e;const h={backgroundColor:S.O9.n2},p={borderLeft:"4px solid "+S.O9.p8,paddingLeft:19+i-4,color:S.O9.p8},g=[{...S.W2.mediumText,paddingTop:9,paddingBottom:9,paddingLeft:19+i,paddingRight:10,textDecoration:"none",color:S.O9.n9,...c?h:{}},{":hover":h}],m=(0,f.jsxs)(a.Z,{style:{flexDirection:"row",alignItems:"center",height:20},children:[(0,f.jsx)(n,{width:15,height:15}),(0,f.jsx)(j.Z,{style:{marginLeft:8},children:r}),(0,f.jsx)(a.Z,{style:{flex:1}}),u]});return(0,f.jsxs)(a.Z,{style:[{flexShrink:0},o],children:[(0,f.jsx)(_,{style:g,to:l,onClick:s,activeStyle:p,forceActive:d,children:m}),t?(0,f.jsx)(a.Z,{style:{marginTop:5},children:t}):null]})}function Z(e){let{Icon:t,title:n,style:r,to:o,onClick:i,bold:l,indent:s=0}=e;const u={backgroundColor:S.O9.n2},c={borderLeft:"4px solid "+S.O9.p8,paddingLeft:10+s,color:S.O9.p8,fontWeight:l?D:null},d=[P,{color:S.O9.n9,paddingLeft:14+s,fontWeight:l?D:null},{":hover":u}],h=(0,f.jsxs)(a.Z,{style:{flexDirection:"row",alignItems:"center",height:16},children:[t&&(0,f.jsx)(t,{width:12,height:12}),(0,f.jsx)(j.Z,{style:{marginLeft:t?8:0,color:"inherit"},children:n})]});return(0,f.jsx)(a.Z,{style:[{flexShrink:0},r],children:(0,f.jsx)(_,{style:d,to:o,onClick:i,activeStyle:c,children:h})})}let P=[{marginTop:-2,marginBottom:2,paddingTop:4,paddingBottom:4,paddingRight:15,paddingLeft:10,textDecoration:"none",color:S.O9.n9},{":hover":{backgroundColor:S.O9.n2}},S.W2.smallText];function R(e){let{name:t,account:n,connected:r,failed:o,updated:i,to:l,query:u,style:c,outerStyle:d,onDragChange:h,onDrop:p}=e,g=n?n.closed?"account-closed":n.offbudget?"account-offbudget":"account-onbudget":"title",{dragRef:m}=(0,T.O1)({type:g,onDragChange:h,item:{id:n&&n.id},canDrag:null!=n}),{dropRef:y,dropPos:v}=(0,T.Zj)({types:n?[g]:[],id:n&&n.id,onDrop:p});return(0,f.jsx)(a.Z,{innerRef:y,style:[{flexShrink:0},d],children:(0,f.jsxs)(a.Z,{children:[(0,f.jsx)(T.OJ,{pos:v}),(0,f.jsx)(a.Z,{innerRef:m,children:(0,f.jsxs)(C.Z,{to:l,style:[P,c,{position:"relative",borderLeft:"4px solid transparent"},i&&{fontWeight:700}],activeStyle:{borderColor:S.O9.p8,color:S.O9.p8,fontWeight:c&&c.fontWeight||"normal","& .dot":{backgroundColor:S.O9.p8,transform:"translateX(-4.5px)"}},children:[(0,f.jsx)(a.Z,{style:{position:"absolute",left:0,top:0,bottom:0,flexDirection:"row",alignItems:"center"},children:(0,f.jsx)("div",{className:"dot",...(0,s.iv)({marginRight:3,width:5,height:5,borderRadius:5,backgroundColor:o?S.O9.r7:S.O9.g5,marginLeft:2,transition:"transform .3s",opacity:r?1:0})})}),(0,f.jsx)(k.Z,{left:t,right:(0,f.jsx)(O.Z,{debug:!0,binding:u,type:"financial"})})]})})]})})}function M(e){let{accounts:t,failedAccounts:n,updatedAccounts:o,getAccountPath:i,allAccountsPath:l,budgetedAccountPath:s,offBudgetAccountPath:u,getBalanceQuery:d,getAllAccountBalance:h,getOnBudgetBalance:p,getOffBudgetBalance:g,showClosedAccounts:m,onAddAccount:y,onToggleClosedAccounts:v,onReorder:b}=e,[w,x]=(0,r.useState)(!1),S=(0,r.useMemo)((()=>t.filter((e=>0===e.closed&&1===e.offbudget))),[t]),k=(0,r.useMemo)((()=>t.filter((e=>0===e.closed&&0===e.offbudget))),[t]),C=(0,r.useMemo)((()=>t.filter((e=>1===e.closed))),[t]);function j(e){x("start"===e.state)}let E=(e,t)=>0===e?{paddingTop:w?15:0,marginTop:w?-15:0}:null;return(0,f.jsxs)(a.Z,{children:[(0,f.jsx)(R,{name:"All accounts",to:l,query:h(),style:{fontWeight:D,marginTop:15}}),k.length>0&&(0,f.jsx)(R,{name:"For budget",to:s,query:p(),style:{fontWeight:D,marginTop:13}}),k.map(((e,t)=>(0,f.jsx)(R,{name:e.name,account:e,connected:!!e.bankId,failed:n&&n.has(e.id),updated:o&&o.includes(e.id),to:i(e),query:d(e),onDragChange:j,onDrop:b,outerStyle:E(t,k.length)},e.id))),S.length>0&&(0,f.jsx)(R,{name:"Off budget",to:u,query:g(),style:{fontWeight:D,marginTop:13}}),S.map(((e,t)=>(0,f.jsx)(R,{name:e.name,account:e,connected:!!e.bankId,failed:n&&n.has(e.id),updated:o&&o.includes(e.id),to:i(e),query:d(e),onDragChange:j,onDrop:b,outerStyle:E(t,S.length)},e.id))),C.length>0&&(0,f.jsx)(Z,{style:{marginTop:15},title:"Closed accounts"+(m?"":"..."),onClick:v,bold:!0}),m&&C.map(((e,t)=>(0,f.jsx)(R,{name:e.name,account:e,to:i(e),query:d(e),onDragChange:j,onDrop:b},e.id))),(0,f.jsx)(Z,{style:{marginTop:15,marginBottom:9},onClick:y,Icon:c.Z,title:"Add account"})]})}function N(e){let{style:t,isFloating:n,onFloat:r}=e;return(0,f.jsx)(a.Z,{className:"float",style:[t,{flexShrink:0}],children:(0,f.jsx)(E.Z,{type:"bare",onClick:r,color:S.O9.n5,children:n?(0,f.jsx)(g,{style:{margin:-2,width:15,height:15,transform:"rotate(45deg)"}}):(0,f.jsx)(w,{style:{width:13,height:13}})})})}function L(){let[e,t]=(0,r.useState)(!1),n=(0,r.useCallback)((()=>t((e=>!e))),[]),o=(0,l.TH)();const i=["/payees","/rules","/settings","/tools"].some((e=>o.pathname.startsWith(e)));return(0,r.useEffect)((()=>{i&&t(!0)}),[o.pathname]),(0,f.jsxs)(a.Z,{style:{flexShrink:0},children:[(0,f.jsx)(A,{title:"More",Icon:e?d.Z:h,onClick:n,style:{marginBottom:e?8:0},forceActive:!e&&i}),e&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Z,{title:"Payees",Icon:y,to:"/payees",indent:15}),(0,f.jsx)(Z,{title:"Rules",Icon:v,to:"/rules",indent:15}),(0,f.jsx)(Z,{title:"Settings",Icon:p.Z,to:"/settings",indent:15})]})]})}function B(e){let{style:t,budgetName:n,accounts:r,failedAccounts:o,updatedAccounts:i,getBalanceQuery:l,getAllAccountBalance:s,getOnBudgetBalance:c,getOffBudgetBalance:d,showClosedAccounts:h,isFloating:p,onFloat:g,onAddAccount:y,onToggleClosedAccounts:v,onReorder:w}=e,k=!u.jU&&"mac"===u.OS;const C=ee();return(0,f.jsxs)(a.Z,{style:[{width:I,color:S.O9.n9,backgroundColor:S.O9.n1,"& .float":{opacity:p?1:0,transition:"opacity .25s, width .25s",width:k||p?null:0},"&:hover .float":{opacity:1,width:k?null:"auto"}},t],children:[(0,f.jsxs)(a.Z,{style:[{paddingTop:35,height:30,flexDirection:"row",alignItems:"center",margin:"0 8px 23px 20px",transition:"padding .4s"},k&&{paddingTop:20,justifyContent:"flex-start"}],children:[n,(0,f.jsx)(a.Z,{style:{flex:1,flexDirection:"row"}}),!C.alwaysFloats&&(0,f.jsx)(N,{isFloating:p,onFloat:g})]}),(0,f.jsxs)(a.Z,{style:{overflow:"auto"},children:[(0,f.jsx)(A,{title:"Budget",Icon:b.Z,to:"/budget"}),(0,f.jsx)(A,{title:"Reports",Icon:m,to:"/reports"}),(0,f.jsx)(A,{title:"Schedules",Icon:x.Z,to:"/schedules"}),(0,f.jsx)(L,{}),(0,f.jsx)(a.Z,{style:{height:1,backgroundColor:S.O9.n3,marginTop:15,flexShrink:0}}),(0,f.jsx)(M,{accounts:r,failedAccounts:o,updatedAccounts:i,getAccountPath:e=>`/accounts/${e.id}`,allAccountsPath:"/accounts",budgetedAccountPath:"/accounts/budgeted",offBudgetAccountPath:"/accounts/offbudget",getBalanceQuery:l,getAllAccountBalance:s,getOnBudgetBalance:c,getOffBudgetBalance:d,showClosedAccounts:h,onAddAccount:y,onToggleClosedAccounts:v,onReorder:w})]})]})}var F=n(56740),W=n(28321),U=n(97156),z=n(43045),H=n(89220),V=n(74283),$=n(17904),q=n(18999),Y=n(10666),G=n(83679);function K(e){let{prefs:t,savePrefs:n}=e,i=(0,o.I0)(),a=(0,l.s0)();const[s,c]=(0,r.useState)(!1),[d,h]=(0,r.useState)(!1);let p=[{name:"rename",text:"Rename budget"},{name:"settings",text:"Settings"},...u.jU?[{name:"help",text:"Help"}]:[],{name:"close",text:"Close file"}];return s?(0,f.jsx)(V.Z,{children:(0,f.jsx)($.C,{style:{width:160,fontSize:16,fontWeight:500},defaultValue:t.budgetName,onEnter:async e=>{""!==e.target.value.trim()&&(await n({budgetName:e.target.value}),c(!1))},onBlur:()=>c(!1)})}):(0,f.jsxs)(E.Z,{type:"bare",color:S.O9.n9,style:{fontSize:16,fontWeight:500,marginLeft:-5,flex:"0 auto"},onClick:()=>h(!0),children:[(0,f.jsx)(Y.Z,{style:{whiteSpace:"nowrap",overflow:"hidden"},children:t.budgetName||"A budget has no name"}),(0,f.jsx)(H.Z,{width:7,height:7,style:{marginLeft:5}}),d&&(0,f.jsx)(G.u,{position:"bottom-left",style:{padding:0},onClose:()=>h(!1),children:(0,f.jsx)(q.Z,{onMenuSelect:function(e){switch(h(!1),e){case"rename":c(!0);break;case"settings":a("/settings");break;case"help":window.open("https://actualbudget.org/docs/","_blank");break;case"close":i((0,F.ej)())}},items:p})})]})}function Q(){let e=(0,o.v9)((e=>e.queries.accounts)),t=(0,o.v9)((e=>e.account.failedAccounts)),n=(0,o.v9)((e=>e.queries.updatedAccounts)),i=(0,o.v9)((e=>e.prefs.local)),a=(0,o.v9)((e=>e.prefs.global.floatingSidebar)),{getAccounts:l,replaceModal:s,savePrefs:u,saveGlobalPrefs:c}=(0,z.o)();return(0,r.useEffect)((()=>{l()}),[l]),(0,f.jsx)(B,{isFloating:a,budgetName:(0,f.jsx)(K,{prefs:i,savePrefs:u}),accounts:e,failedAccounts:t,updatedAccounts:n,getBalanceQuery:W.cW,getAllAccountBalance:W.Gm,getOnBudgetBalance:W.SZ,getOffBudgetBalance:W.An,onFloat:()=>c({floatingSidebar:!a}),onReorder:async function(t,n,r){if("bottom"===n){let t=e.findIndex((e=>e.id===r))+1;r=t<e.length?e[t].id:null}await(0,U.lW)("account-move",{id:t,targetId:r}),await l()},onAddAccount:()=>s("add-account"),showClosedAccounts:i["ui.showClosedAccounts"],onToggleClosedAccounts:()=>u({"ui.showClosedAccounts":!i["ui.showClosedAccounts"]}),style:[{flex:1},S.W2.darkScrollbar]})}const X=(0,r.createContext)(null);function J(e){let{children:t}=e,n=(0,o.v9)((e=>e.prefs.global.floatingSidebar)),[a,l]=(0,r.useState)(!0),{width:s}=(0,i.F)(),u=s<668,c=n||u;return(0,f.jsx)(X.Provider,{value:{hidden:a,setHidden:l,floating:c,alwaysFloats:u},children:t})}function ee(){let{hidden:e,setHidden:t,floating:n,alwaysFloats:o}=(0,r.useContext)(X);return(0,r.useMemo)((()=>({hidden:e,setHidden:t,floating:n,alwaysFloats:o})),[e,t,n,o])}function te(){let e=(0,o.v9)((e=>e.prefs.global.floatingSidebar)),t=ee(),{isNarrowWidth:n}=(0,i.F)(),r=e||t.alwaysFloats;return n?null:(0,f.jsx)(a.Z,{onMouseOver:r?e=>{e.stopPropagation(),t.setHidden(!1)}:null,onMouseLeave:r?()=>t.setHidden(!0):null,style:{position:r?"absolute":null,top:12,bottom:r?12:-50,zIndex:1001,borderRadius:r?"0 6px 6px 0":0,overflow:"hidden",boxShadow:!r||t.hidden?"none":"0 15px 30px 0 rgba(0,0,0,0.25), 0 3px 15px 0 rgba(0,0,0,.5)",transform:`translateY(${r?0:-12}px)\n translateX(${r&&t.hidden?-I:0}px)`,transition:"transform .5s, box-shadow .5s, border-radius .5s, bottom .5s"},children:(0,f.jsx)(Q,{})})}},52677:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var r=n(83017),o=n(30702),i=n(28993);let a=(0,r.createContext)("app");function l(e){let{keyName:t,eventType:n="keydown",handler:i}=e,l=(0,r.useContext)(a);if("keyup"!==n&&"keydown"!==n)throw new Error("KeyHandler: unknown event type: "+n);return(0,r.useEffect)((()=>{function e(e,t){if(e.preventDefault(),e.type===n&&i)return i(e,t)}return(0,o.Z)(t,{scope:l,keyup:!0},e),()=>{o.Z.unbind({key:t,scope:l,method:e})}}),[t,i,l]),null}function s(e){let{eventType:t,keys:n={}}=e,r=Object.keys(n).map((e=>(0,i.jsx)(l,{keyName:e,eventType:t,handler:n[e]},e)));return(0,i.jsx)(i.Fragment,{children:r})}o.Z.filter=e=>{let t=e.target||e.srcElement,n=t.tagName;return!!(e.metaKey||!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly))}},20356:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(83017),o=n(71274),i=n(43045),a=n(53819),l=n(13743),s=n(18999),u=n(10666),c=n(91743),d=n(4340),f=n(83679),h=n(28993);function p(e){let{hideIfNoServer:t,style:n,color:p}=e,g=(0,o.v9)((e=>e.user.data)),{getUserData:m,signOut:y,closeBudget:v}=(0,i.o)(),[b,w]=(0,r.useState)(!0),[x,S]=(0,r.useState)(!1);const k=(0,d.o1)();return(0,r.useEffect)((()=>{m().then((()=>w(!1)))}),[]),t&&!k?null:b&&k?(0,h.jsx)(u.Z,{style:[{color:a.O9.n5,fontStyle:"italic"},a.W2.delayedFadeIn,n],children:"Connecting..."}):(0,h.jsxs)(c.Z,{style:[{flexDirection:"row",alignItems:"center"},n],children:[(0,h.jsx)(l.Z,{type:"bare",onClick:()=>S(!0),style:{color:p},children:k?null!==g&&void 0!==g&&g.offline?"Server offline":"Server online":"No server"}),x&&(0,h.jsx)(f.u,{position:"bottom-right",style:{padding:0},onClose:()=>S(!1),children:(0,h.jsx)(s.Z,{onMenuSelect:async function(e){switch(S(!1),e){case"change-password":!async function(){await v(),window.__navigate("/change-password")}();break;case"sign-in":await v(),window.__navigate("/login");break;case"sign-out":y();break;case"config-server":await v(),window.__navigate("/config-server")}},items:[k&&!(null!==g&&void 0!==g&&g.offline)&&{name:"change-password",text:"Change password"},k&&{name:"sign-out",text:"Sign out"},{name:"config-server",text:k?"Change server URL":"Start using a server"}]})})]})}},10945:function(e,t,n){"use strict";n.d(t,{B:function(){return _},Z:function(){return U}});var r=n(83017),o=n(71274),i=n(45249),a=n(81785),l=n(91669),s=n(98297),u=n(99121),c=n(84214),d=n(5499),f=n(97156),h=n(41936),p=n(24917),g=n(80837),m=n(88370),y=n(69585),v=n(95058),b=n(17888),w=n(53819),x=n(13743),S=n(11599),k=n(67134),C=n(38102),j=n(99884),E=n(10666),T=n(91743),O=n(65695),I=n(28993);let D=(0,c.n)((0,u.ZP)("schedules").select("*"));function _(e){let{value:t,field:n,valueIsRaw:l,inline:s=!1,data:u,describe:c=(e=>e.name)}=e,{data:d,dateFormat:f}=(0,o.v9)((e=>{let t;if(u)t=u;else switch(n){case"payee":t=e.queries.payees;break;case"category":t=e.queries.categories.list;break;case"account":t=e.queries.accounts;break;default:t=[]}return{data:t,dateFormat:e.prefs.local.dateFormat||"MM/dd/yyyy"}})),[h,g]=(0,r.useState)(!1);function v(e){if(null==e||""===e)return"(nothing)";if("boolean"===typeof e)return e?"true":"false";switch(n){case"amount":return(0,y.zA)(e);case"date":return e?e.frequency?(0,m.o7)(e):(0,i.Z)((0,a.Z)(e),f):null;case"month":return e?(0,i.Z)((0,a.Z)(e),(0,p.LT)(f)):null;case"year":return e?(0,i.Z)((0,a.Z)(e),"yyyy"):null;case"notes":case"imported_payee":return e;case"payee":case"category":case"account":case"rule":if(l)return e;if(d&&d.length){let t=d.find((t=>t.id===e));return t?c(t):"(deleted)"}return"\u2026";default:throw new Error(`Unknown field ${n}`)}}if(Array.isArray(t)){if(0===t.length)return(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:"(empty)"});if(1===t.length)return(0,I.jsxs)(E.Z,{children:["[",(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:v(t[0])}),"]"]});let e=t;!h&&t.length>4&&(e=t.slice(0,3));let n=t.length-e.length;return(0,I.jsxs)(E.Z,{style:{color:w.O9.n3},children:["[",e.map(((e,n)=>{let r,o=(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:v(e)});return r=s?0!==n?" ":"":(0,I.jsxs)(I.Fragment,{children:[0===n&&(0,I.jsx)("br",{}),"\xa0\xa0"]}),(0,I.jsxs)(E.Z,{children:[r,o,n===t.length-1?"":",",!s&&(0,I.jsx)("br",{})]},n)})),n>0&&(0,I.jsxs)(E.Z,{style:{color:w.O9.p4},children:["\xa0\xa0",(0,I.jsxs)(k.Z,{onClick:function(e){e.preventDefault(),g(!0)},style:{color:w.O9.p4},children:[n," more items..."]}),!s&&(0,I.jsx)("br",{})]}),"]"]})}return t&&null!=t.num1&&null!=t.num2?(0,I.jsxs)(E.Z,{children:[(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:v(t.num1)})," and"," ",(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:v(t.num2)})]}):(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:v(t)})}function A(e){let{field:t,op:n,value:r,options:o,prefix:i,style:a,inline:l}=e;return(0,I.jsxs)(T.Z,{style:[{display:"block",maxWidth:"100%",backgroundColor:w.O9.pK,borderRadius:4,padding:"3px 5px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},a],children:[i&&(0,I.jsxs)(E.Z,{style:{color:w.O9.n3},children:[i," "]}),(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:(0,g.gL)(t,o)})," ",(0,I.jsx)(E.Z,{style:{color:w.O9.n3},children:(0,g.w8)(n)})," ",(0,I.jsx)(_,{value:r,field:t,inline:l})]})}function Z(e,t){return t?`${t.name} (${e.next_date})`:`Next: ${e.next_date}`}function P(e){let{value:t}=e,n=(0,o.v9)((e=>e.queries.payees)),r=(0,d.yG)(n),{data:i}=D.useQuery();return(0,I.jsx)(_,{value:t,field:"rule",data:i,describe:e=>Z(e,r[e._payee])})}function R(e){let{field:t,op:n,value:r,options:o,style:i}=e;return(0,I.jsx)(T.Z,{style:[{display:"block",maxWidth:"100%",backgroundColor:w.O9.pK,borderRadius:4,padding:"3px 5px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},i],children:"set"===n?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(E.Z,{style:{color:w.O9.n3},children:(0,g.w8)(n)})," ",(0,I.jsx)(E.Z,{style:{color:w.O9.p4},children:(0,g.gL)(t,o)})," ",(0,I.jsx)(E.Z,{style:{color:w.O9.n3},children:"to "}),(0,I.jsx)(_,{value:r,field:t})]}):"link-schedule"===n?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(E.Z,{style:{color:w.O9.n3},children:(0,g.w8)(n)})," ",(0,I.jsx)(P,{value:r})]}):null})}let M=(0,r.memo)((e=>{let{rule:t,hovered:n,selected:r,onHover:o,onEditRule:i}=e,a=(0,v.YP)(),l=r?w.O9.b8:w.O9.Cg,s=n;return(0,I.jsxs)(O.X2,{height:"auto",borderColor:l,backgroundColor:r?w.O9.hv:s?w.O9.Mr:"white",style:{fontSize:13,zIndex:r?101:"auto"},collapsed:"true",onMouseEnter:()=>o&&o(t.id),onMouseLeave:()=>o&&o(null),children:[(0,I.jsx)(O._7,{exposed:n||r,focused:!0,onSelect:e=>{a({type:"select",id:t.id,event:e})},selected:r}),(0,I.jsx)(O.bL,{name:"stage",width:50,plain:!0,style:{color:w.O9.n5},children:t.stage&&(0,I.jsx)(T.Z,{style:{alignSelf:"flex-start",margin:5,backgroundColor:w.O9.Iy,color:w.O9.b1,borderRadius:4,padding:"3px 5px"},children:t.stage})}),(0,I.jsx)(O.gN,{width:"flex",style:{padding:"15px 0"},truncate:!1,children:(0,I.jsxs)(j.Z,{direction:"row",align:"center",children:[(0,I.jsx)(T.Z,{style:{flex:1,alignItems:"flex-start"},"data-testid":"conditions",children:t.conditions.map(((e,n)=>(0,I.jsx)(A,{field:e.field,op:e.op,inline:!0,value:e.value,options:e.options,prefix:n>0?(0,g.w8)(t.conditionsOp):null,style:0!==n&&{marginTop:3}},n)))}),(0,I.jsx)(E.Z,{children:(0,I.jsx)(b.Z,{color:w.O9.n4,style:{width:12,height:12}})}),(0,I.jsx)(T.Z,{style:{flex:1,alignItems:"flex-start"},"data-testid":"actions",children:t.actions.map(((e,t)=>(0,I.jsx)(R,{field:e.field,op:e.op,value:e.value,options:e.options,style:0!==t&&{marginTop:3}},t)))})]})}),(0,I.jsx)(O.bL,{name:"edit",plain:!0,style:{padding:"0 15px",paddingLeft:5},children:(0,I.jsx)(x.Z,{as:O.Sx,onSelect:()=>i(t),children:"Edit"})})]})})),N=(0,r.forwardRef)(((e,t)=>{let{data:n,loadMore:o,style:i,onHoverLeave:a,children:l,...s}=e,u=(0,r.useRef)(),c=(0,r.useRef)(),d=(0,r.useRef)();return(0,r.useEffect)((()=>{u.current?c.current=u.current.getBoundingClientRect().height:c.current=null}),[u.current,n]),(0,I.jsx)(T.Z,{style:[{flex:1,outline:"none","& .animated .animated-row":{transition:".25s transform"}},i],tabIndex:"1","data-testid":"table",children:(0,I.jsx)(T.Z,{innerRef:d,style:{maxWidth:"100%",overflow:"auto"},onScroll:function(e){null!=c.current&&o&&e.target.scrollTop>c.current-750&&o()},children:(0,I.jsx)("div",{ref:u,onMouseLeave:a,children:l})})})}));function L(){let e=(0,v.D9)(),t=(0,v.YP)();return(0,I.jsxs)(O.xD,{version:"v2",style:{},children:[(0,I.jsx)(O._7,{exposed:!0,focused:!1,selected:e.size>0,onSelect:e=>t({type:"select-all",event:e})}),(0,I.jsx)(O.bL,{value:"Stage",width:50}),(0,I.jsx)(O.bL,{value:"Rule",width:"flex"})]})}function B(e){let{rules:t,selectedItems:n,hoveredRule:r,collapsed:o,onHover:i,onCollapse:a,onEditRule:l}=e;return 0===t.length?null:(0,I.jsx)(T.Z,{children:t.map((e=>{let t=r===e.id,o=n.has(e.id);return(0,I.jsx)(M,{rule:e,hovered:t,selected:o,onHover:i,onEditRule:l},e.id)}))})}function F(e,t,n){let{payees:r,categories:o,accounts:i}=n;if(!t)return"";let a=null;if("payee"===e)a=r.find((e=>e.id===t));else if("category"===e)a=o.find((e=>e.id===t));else{if("account"!==e)return t;a=i.find((e=>e.id===t))}return a?a.name:"(deleted)"}function W(e){let{isModal:t,payeeId:n,setLoading:i}=e,[a,u]=(0,r.useState)(null),[c,d]=(0,r.useState)(null),[p,m]=(0,r.useState)(""),y=(0,o.I0)(),{data:b}=D.useQuery(),k=(0,o.v9)((e=>({payees:e.queries.payees,categories:e.queries.categories.list,accounts:e.queries.accounts,schedules:b}))),O=(0,r.useMemo)((()=>""!==p&&c?c.filter((e=>function(e,t){let n=e.conditions.flatMap((e=>[(0,g.gL)(e.field),(0,g.w8)(e.op),"oneOf"===e.op||"notOneOf"===e.op?e.value.map((n=>F(e.field,n,t))).join(", "):F(e.field,e.value,t)])),r=e.actions.flatMap((e=>{if("set"===e.op)return[(0,g.w8)(e.op),(0,g.gL)(e.field),"to",F(e.field,e.value,t)];if("link-schedule"===e.op){let n=t.schedules.find((t=>t.id===e.value));return[(0,g.w8)(e.op),Z(n,t.payees.find((e=>e.id===n._payee)))]}return[]}));return(e.stage||"")+" "+n.join(" ")+" "+r.join(" ")}(e,k).toLowerCase().includes(p.toLowerCase()))):c),[c,p,k]),_=(0,v.ZP)("manage-rules",a,[]),[A,P]=(0,r.useState)(null),R=(0,r.useRef)(null);async function M(){i(!0);let e=null;return e=n?await(0,f.lW)("payees-get-rules",{id:n}):await(0,f.lW)("rules-get"),u(e),e}(0,r.useEffect)((()=>(h.kp("openModal","manage-rules"),async function(){let e=await M();d(e.slice(0,100)),i(!1),await y((0,s.Rr)())}(),()=>{h.kp("openModal",null)})),[]);let W=(0,r.useCallback)((e=>{y((0,l.Ll)("edit-rule",{rule:e,onSave:async e=>{let t=await M();d((n=>{let r=t.findIndex((t=>t.id===e.id));return r>n.length?t.slice(0,r+75):t.slice(0,n.length)})),i(!1)}}))}),[]);let U=(0,r.useCallback)((e=>{P(e)}),[]);return null===c?null:(0,I.jsx)(v.i5,{instance:_,children:(0,I.jsxs)(T.Z,{children:[(0,I.jsxs)(T.Z,{style:{flexDirection:"row",alignItems:"center",padding:t?"0 13px 15px":"0 0 15px",flexShrink:0},children:[(0,I.jsx)(T.Z,{style:{color:w.O9.n4,flexDirection:"row",alignItems:"center",width:"50%"},children:(0,I.jsxs)(E.Z,{children:["Rules are always run in the order that you see them."," ",(0,I.jsx)(S.Z,{to:"https://actualbudget.org/docs/budgeting/rules/",linkColor:"muted",children:"Learn more"})]})}),(0,I.jsx)(T.Z,{style:{flex:1}}),(0,I.jsx)(C.Z,{placeholder:"Filter rules...",value:p,onChange:m})]}),(0,I.jsxs)(T.Z,{style:{flex:1},children:[(0,I.jsx)(L,{}),(0,I.jsx)(N,{ref:R,data:O,loadMore:function(){d(c.concat(a.slice(c.length,c.length+50)))},style:{marginBottom:-1},children:(0,I.jsx)(B,{rules:O,selectedItems:_.items,hoveredRule:A,onHover:U,onEditRule:W})})]}),(0,I.jsx)(T.Z,{style:{paddingBlock:15,paddingInline:t?13:0,borderTop:t&&"1px solid "+w.O9.Cg,flexShrink:0},children:(0,I.jsxs)(j.Z,{direction:"row",align:"center",justify:"flex-end",spacing:2,children:[_.items.size>0&&(0,I.jsxs)(x.Z,{onClick:async function(){i(!0);let{someDeletionsFailed:e}=await(0,f.lW)("rule-delete-all",[..._.items]);e&&alert("Some rules were not deleted because they are linked to schedules");let t=await M();d((e=>t.slice(0,e.length))),_.dispatch({type:"select-none"}),i(!1)},children:["Delete ",_.items.size," rules"]}),(0,I.jsx)(x.Z,{type:"primary",onClick:function(){let e={stage:null,conditionsOp:"and",conditions:[{field:"payee",op:"is",value:n||null,type:"id"}],actions:[{op:"set",field:"category",value:null,type:"id"}]};y((0,l.Ll)("edit-rule",{rule:e,onSave:async e=>{let t=await M();d((n=>{let r=t.findIndex((t=>t.id===e.id));return t.slice(0,r+75)})),i(!1)}}))},children:"Create new rule"})]})})]})})}function U(e){let{isModal:t,payeeId:n,setLoading:r=(()=>{})}=e;return(0,I.jsx)(D.Provider,{children:(0,I.jsx)(W,{isModal:t,payeeId:n,setLoading:r})})}},17877:function(e,t,n){"use strict";n.d(t,{MD:function(){return f},T3:function(){return g},xb:function(){return h}});var r=n(83017),o=n(79274),i=n(95542),a=n(53819),l=n(42131),s=n(10666),u=n(91743),c=n(28993);let d=(0,r.createContext)({type:"page",current:void 0});function f(e){let{type:t,current:n,children:r}=e;return(0,c.jsx)(d.Provider,{value:{type:t,current:n},children:r})}function h(){return(0,r.useContext)(d)}function p(e){let{name:t,style:n}=e;const{isNarrowWidth:r}=(0,i.F)();return r?(0,c.jsx)(u.Z,{style:[{alignItems:"center",backgroundColor:a.O9.b2,color:"white",flexDirection:"row",flex:"1 0 auto",fontSize:18,fontWeight:500,height:50,justifyContent:"center",overflowY:"auto"},n],children:t}):(0,c.jsx)(s.Z,{style:[{fontSize:25,fontWeight:500,marginBottom:15},n],children:t})}function g(e){let{title:t,modalSize:n,children:r,titleStyle:s}=e,{type:d,current:f}=h(),g=(0,o.s0)(),{isNarrowWidth:m}=(0,i.F)(),y=m?10:20;if("modal"===d){let e="string"===typeof n?"medium"===n?{width:750,height:600}:{width:600}:n;return(0,c.jsx)(l.C,{title:t,isCurrent:f,size:e,onClose:()=>g(-1),children:r})}return(0,c.jsxs)(u.Z,{style:m?void 0:a.W2.page,children:[(0,c.jsx)(p,{name:t,style:{...s,paddingInline:y}}),(0,c.jsx)(u.Z,{style:m?{overflowY:"auto",padding:y}:{paddingLeft:y,paddingRight:y,flex:1},children:r})]})}},78867:function(e,t,n){"use strict";n.d(t,{wq:function(){return u},ZP:function(){return c},JS:function(){return f}});var r=n(83017),o=n(71274);var i=n(59831),a=n(95542),l=n(91743),s=n(28993);function u(e){let{children:t,privacyFilter:n,defaultPrivacyFilterProps:o}=e;return n?"boolean"===typeof n?(0,s.jsx)(c,{...o,children:t}):((e,t)=>(0,s.jsx)(c,{...t,children:e}))(t,f(o,n)):(0,s.jsx)(s.Fragment,{children:r.Children.toArray(t)})}function c(e){let{activationFilters:t,blurIntensity:n,children:l,...u}=e,c=(0,i.Z)("privacyMode"),f=(0,o.v9)((e=>{var t,n,r;return null!==(t=null===(n=e.prefs)||void 0===n||null===(r=n.local)||void 0===r?void 0:r.isPrivacyEnabled)&&void 0!==t&&t})),{isNarrowWidth:h}=(0,a.F)(),p=f&&!h&&(!t||t.every((e=>"boolean"===typeof e?e:e()))),g=null!=n?`${n}px`:"3px";return c&&p?(0,s.jsx)(d,{blurIntensity:g,...u,children:l}):(0,s.jsx)(s.Fragment,{children:r.Children.toArray(l)})}function d(e){let{blurIntensity:t,children:n,...o}=e,[i,a]=(0,r.useState)(!1),u=(0,r.useCallback)((()=>a(!0)),[a]),c=(0,r.useCallback)((()=>a(!1)),[a]),d={...!i&&{filter:`blur(${t})`,WebkitFilter:`blur(${t})`}},{style:f,...h}=o;return(0,s.jsx)(l.Z,{style:{display:null!==f&&void 0!==f&&f.display?f.display:"inline-flex",...d,...f},onPointerEnter:u,onPointerLeave:c,...h,children:n})}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return null==t||!1===t?t:!0===t?e:h(e,t)}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(((e,t)=>(Object.keys(t).forEach((n=>{const r=e[n],o=t[n];Array.isArray(r)&&Array.isArray(o)?e[n]=r.concat(...o):p(r)&&p(o)?e[n]=h(r,o):e[n]=o})),e)),e)}function p(e){return e&&"object"===typeof e}},4340:function(e,t,n){"use strict";n.d(t,{Mx:function(){return s},o1:function(){return l},q3:function(){return u},qc:function(){return d}});var r=n(83017),o=n(97156),i=n(28993);const a=(0,r.createContext)({}),l=()=>(0,r.useContext)(a).url,s=()=>(0,r.useContext)(a).version,u=()=>(0,r.useContext)(a).setURL;async function c(){let{error:e,version:t}=await(0,o.lW)("get-server-version");return e?"":t}function d(e){let{children:t}=e,[n,l]=(0,r.useState)(""),[s,u]=(0,r.useState)("");(0,r.useEffect)((()=>{!async function(){l(await(0,o.lW)("get-server-url")),u(await c())}()}),[]);let d=(0,r.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{error:n}=await(0,o.lW)("set-server-url",{...t,url:e});return n||(l(await(0,o.lW)("get-server-url")),u(await c())),{error:n}}),[l]);return(0,i.jsx)(a.Provider,{value:{url:n,setURL:d,version:s?`v${s}`:"N/A"},children:t})}},79291:function(e,t,n){"use strict";n.d(t,{rD:function(){return Y},CR:function(){return H},TE:function(){return V},ZP:function(){return K}});var r=n(83017),o=n(71274),i=n(79274),a=n(86634),l=n(79515),s=n(28321),u=n(97156),c=n(43045),d=n(59831),f=n(62177),h=n(12756),p=n(28993);var g=e=>(0,p.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,p.jsx)("path",{d:"M18.502 12.712c0 2.368-3.137 4.289-7.003 4.289S4.5 15.08 4.5 12.712c0-2.364 3.133-4.285 6.999-4.285 3.866 0 7.003 1.921 7.003 4.285Zm0 0",style:{fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",stroke:"#000",strokeOpacity:1,strokeMiterlimit:4},transform:"matrix(.96 0 0 .96 1 .48)",fill:"currentColor"}),(0,p.jsx)("path",{d:"M13.249 12.712a1.749 1.749 0 0 1-1.054 1.644 1.757 1.757 0 0 1-1.92-.354 1.752 1.752 0 0 1 1.225-3.003c.459-.004.902.175 1.232.496.325.322.513.761.517 1.217Zm0 0",style:{fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",stroke:"#000",strokeOpacity:1,strokeMiterlimit:4},transform:"matrix(.96 0 0 .96 1 .48)",fill:"currentColor"}),(0,p.jsx)("path",{d:"M10.32 8.57a.72.72 0 1 0 1.442 0Zm1.442-3.289a.72.72 0 1 0-1.441 0Zm5.8 1.973a.72.72 0 0 0-.316-.969.718.718 0 0 0-.969.313Zm-2.664 2.05a.722.722 0 0 0 .317.97c.351.18.785.039.969-.317ZM5.801 6.599a.715.715 0 0 0-.969-.313.722.722 0 0 0-.312.969Zm.097 3.359a.72.72 0 0 0 .97.316.718.718 0 0 0 .312-.968Zm5.864-1.387V5.281H10.32v3.29Zm4.515-1.972-1.379 2.707 1.286.652 1.378-2.703ZM4.52 7.254l1.378 2.703 1.282-.652L5.8 6.598Zm0 0",style:{stroke:"none",fillRule:"nonzero",fill:"#000",fillOpacity:1},transform:"translate(1)",fill:"currentColor"})]});var m=e=>(0,p.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,p.jsx)("path",{d:"M12 9.387c.398 0 .719-.32.719-.719A.717.717 0 0 0 12 7.949Zm-4.523 7.465a.72.72 0 0 0 .648-1.285Zm3.804-8.184c0 .398.32.719.719.719.398 0 .719-.32.719-.719Zm1.438-3.387A.72.72 0 0 0 12 4.56a.72.72 0 0 0-.719.722Zm-.723 2.668a.717.717 0 0 0-.715.723c0 .394.324.719.723.715Zm2.473 1.758a.72.72 0 1 0 .37-1.39Zm-7.703-3.05a.72.72 0 1 0-1.29.636Zm.09 3.421c.18.356.609.504.964.324a.718.718 0 0 0 .325-.964Zm.414 9.113c-.27.293-.25.75.043 1.02.292.27.746.25 1.015-.043Zm3.53-1.707a.72.72 0 0 0-1.058-.976Zm8.45-9.175a.717.717 0 0 0-.043-1.016.717.717 0 0 0-1.016.039Zm-3 1.132c-.27.29-.25.746.043 1.016s.75.25 1.016-.043Zm-6.508 7.067c-.27.293-.25.75.043 1.02.293.269.746.25 1.016-.044Zm2.832-2.012.531.488Zm1.043-1.133-.527-.488h-.004Zm3.692-2.949a.717.717 0 0 0-.04-1.016.722.722 0 0 0-1.019.043Zm-6.918 5.871a.72.72 0 0 0-.238 1.422Zm1.609.856v-.723Zm6.719-4.239h.722c0-.015-.003-.03-.003-.05ZM17.117 9.29a.722.722 0 0 0-.972.3.718.718 0 0 0 .3.973Zm-7.062 5.031c.23.32.68.395 1.004.164a.727.727 0 0 0 .164-1.007Zm.445-2.18.64.325Zm1.5-.933v-.719h-.004Zm.504.867c.336.211.781.106.992-.23a.722.722 0 0 0-.23-.992ZM12 7.95c-1.969 0-3.79.5-5.137 1.352-1.336.844-2.304 2.097-2.304 3.601H6c0-.832.54-1.695 1.633-2.386 1.082-.68 2.625-1.13 4.367-1.13Zm-7.441 4.953c0 1.723 1.257 3.114 2.918 3.95l.648-1.286C6.711 14.852 6 13.856 6 12.902Zm8.16-4.234V5.281H11.28v3.387Zm-.715.719c.832 0 1.66.105 2.465.32l.37-1.39a10.903 10.903 0 0 0-2.843-.368ZM5.477 7.293l1.378 2.785 1.29-.64-1.38-2.782Zm2.851 12.875 2.473-2.684-1.059-.976L7.27 19.19Zm9.863-12.836-1.941 2.11 1.059.972L19.25 8.31Zm-7.39 10.152 2.304-2.5-1.058-.976-2.305 2.5Zm2.304-2.5 1.043-1.136-1.062-.973-1.04 1.133Zm1.043-1.132 3.16-3.438-1.058-.973-3.16 3.434Zm-3.996 3.855c.614.102 1.23.152 1.848.152v-1.441c-.54 0-1.078-.043-1.61-.133Zm1.848.152c1.969 0 3.79-.504 5.137-1.351 1.336-.844 2.304-2.102 2.304-3.606H18c0 .836-.54 1.7-1.633 2.387-1.082.684-2.625 1.129-4.367 1.129Zm7.438-5.007a4.385 4.385 0 0 0-2.32-3.563l-.673 1.274A2.943 2.943 0 0 1 18 12.953Zm-8.215.625a.975.975 0 0 1-.082-1.012l-1.286-.652a2.42 2.42 0 0 0 .2 2.507Zm-.082-1.012a.98.98 0 0 1 .863-.535l-.008-1.442c-.906.008-1.73.52-2.14 1.325ZM12 11.93c.18 0 .352.047.504.144l.762-1.222A2.383 2.383 0 0 0 12 10.488Zm0 0",fill:"currentColor"})});var y=e=>(0,p.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,p.jsx)("rect",{width:23,height:3,x:.5,y:2.5,rx:1,ry:1,fill:"currentColor"}),(0,p.jsx)("rect",{width:23,height:3,x:.5,y:10.5,rx:1,ry:1,fill:"currentColor"}),(0,p.jsx)("rect",{width:23,height:3,x:.5,y:18.5,rx:1,ry:1,fill:"currentColor"})]}),v=n(95542),b=n(53819),w=n(85761),x=n(49963),S=n(80239),k=n(13743),C=n(11599),j=n(91743),E=n(83679);function T(e,t){switch(e.toUpperCase()){case"ITEM_ERROR":switch(t.toUpperCase()){case"NO_ACCOUNTS":return"No open accounts could be found. Did you close the account? If so, unlink the account.";case"ITEM_LOGIN_REQUIRED":return"Your password or something else has changed with your bank and you need to login again."}break;case"INVALID_INPUT":if("INVALID_ACCESS_TOKEN"===t.toUpperCase())return"Item is no longer authorized. You need to login again.";break;case"RATE_LIMIT_EXCEEDED":return"Rate limit exceeded for this item. Please try again later."}return(0,p.jsxs)(p.Fragment,{children:["An internal error occurred. Try to login again, or get"," ",(0,p.jsx)(C.Z,{to:"https://actualbudget.org/contact/",children:"in touch"})," ","for support."]})}function O(){let e=(0,o.v9)((e=>e.queries.accounts)),t=(0,o.v9)((e=>e.account.failedAccounts)),{unlinkAccount:n,pushModal:a}=(0,c.o)(),{id:l}=(0,i.UO)(),[s,u]=(0,r.useState)(!1);if(!t)return null;let d=t.get(l);if(!d)return null;let f=e.find((e=>e.id===l)),{type:h,code:g}=d,m="ITEM_ERROR"===h&&"ITEM_LOGIN_REQUIRED"===g||"INVALID_INPUT"===h&&"INVALID_ACCESS_TOKEN"===g;async function y(){n(f.id),u(!1)}return(0,p.jsxs)(j.Z,{children:[(0,p.jsxs)(k.Z,{type:"bare",style:{flexDirection:"row",alignItems:"center",color:b.O9.r5,backgroundColor:b.O9.as,padding:"4px 8px",borderRadius:4},onClick:()=>u(!0),children:[(0,p.jsx)(S.Z,{style:{width:14,height:14,marginRight:5}})," ","This account is experiencing connection problems. Let\u2019s fix it."]}),s&&(0,p.jsxs)(E.u,{position:"bottom-left",onClose:()=>u(!1),style:{fontSize:14,padding:15,maxWidth:400},children:[(0,p.jsx)("div",{style:{marginBottom:"1.15em"},children:"The server returned the following error:"}),(0,p.jsx)("div",{style:{marginBottom:"1.25em",color:b.O9.r5},children:T(d.type,d.code)}),(0,p.jsx)(j.Z,{style:{justifyContent:"flex-end",flexDirection:"row"},children:m?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(k.Z,{onClick:y,children:"Unlink"}),(0,p.jsx)(k.Z,{type:"primary",onClick:function(){u(!1),(0,x.F)(a,{upgradingAccountId:f.account_id})},style:{marginLeft:5},children:"Reauthorize"})]}):(0,p.jsx)(k.Z,{onClick:y,children:"Unlink account"})})]})]})}var I=n(55082),D=n(32873),_=n(97931);function A(e){let{color:t,onClick:n}=e;return(0,p.jsx)(D.Z,{style:{width:13,height:13,color:t,marginRight:5},onClick:n})}function Z(e){let{maxMonths:t,onChange:n}=e,{displayMax:r}=(0,_.s)();if(r<=1)return null;let o=[];for(let i=1;i<=r;i++)o.push((0,p.jsx)(A,{color:t>=i?b.O9.n5:b.O9.n8,onClick:()=>n(i)},i));return(0,p.jsx)(j.Z,{style:{flexDirection:"row",marginRight:20,marginTop:-1,WebkitAppRegion:"no-drag","& svg":{transition:"transform .15s"},"& svg:hover":{transform:"scale(1.2)"}},title:"Choose the number of months shown at a time",children:o})}var P=n(61039),R=n(803),M=n(10666),N=n(84418),L=n(20356),B=n(4340),F=n(17422);var W=e=>(0,p.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-moon-stars",viewBox:"0 0 16 16",style:{color:"inherit",...e.style},children:[(0,p.jsx)("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z",fill:"currentColor"}),(0,p.jsx)("path",{d:"M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z",fill:"currentColor"})]});var U=e=>(0,p.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-sun",viewBox:"0 0 16 16",style:{color:"inherit",...e.style},children:(0,p.jsx)("path",{d:"M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z",fill:"currentColor"})});function z(){let e=(0,b.Fg)(),{saveGlobalPrefs:t}=(0,c.o)(),{isNarrowWidth:n}=(0,v.F)();return n?null:(0,p.jsx)(k.Z,{type:"bare",onClick:()=>{t({theme:"dark"===e?"light":"dark"})},children:"light"===e?(0,p.jsx)(W,{style:{width:13,height:13,color:"inherit"}}):(0,p.jsx)(U,{style:{width:13,height:13,color:"inherit"}})})}let H=(0,r.createContext)();function V(e){let{children:t}=e,n=(0,r.useRef)([]);return(0,p.jsx)(H.Provider,{value:{sendEvent:function(e){n.current.forEach((t=>t(e)))},subscribe:function(e){return n.current.push(e),()=>n.current=n.current.filter((t=>t!==e))}},children:t})}function $(){let e=(0,F.Z)(s.sX());return 0!==e&&(0,p.jsxs)(P.Z,{type:"bare",to:"/accounts/uncategorized",style:{color:b.O9.r5},children:[e," uncategorized ",1===e?"transaction":"transactions"]})}function q(){let e=(0,o.v9)((e=>e.prefs.local.isPrivacyEnabled)),{savePrefs:t}=(0,c.o)(),n={width:23,height:23};return(0,p.jsx)(k.Z,{type:"bare",onClick:()=>t({isPrivacyEnabled:!e}),children:e?(0,p.jsx)(m,{style:n}):(0,p.jsx)(g,{style:n})})}function Y(e){let{style:t}=e,n=(0,o.v9)((e=>e.prefs.local.cloudFileId)),{sync:i}=(0,c.o)(),[l,s]=(0,r.useState)(!1),[d,f]=(0,r.useState)(null);return(0,r.useEffect)((()=>(0,u.oL)("sync-event",(e=>{let{type:t,subtype:r,syncDisabled:o}=e;"start"===t?(s(!0),f(null)):setTimeout((()=>{s(!1)}),200),"error"===t?f("network"===r?"offline":n?"error":"local"):"success"===t&&f(o?"disabled":null)}))),[]),(0,p.jsxs)(k.Z,{type:"bare",style:(0,a.iv)(t,{WebkitAppRegion:"none",color:"error"===d?b.O9.r7:"disabled"===d||"offline"===d||"local"===d?b.O9.n9:null},(0,a.BC)(`(min-width: ${w.Z.breakpoint_small})`,{color:"error"===d?b.O9.r4:"disabled"===d||"offline"===d||"local"===d?b.O9.n6:null})),onClick:i,children:["error"===d?(0,p.jsx)(h.Z,{width:13}):(0,p.jsx)(I.Z,{animating:l}),(0,p.jsx)(M.Z,{style:{marginLeft:3},children:"disabled"===d?"Disabled":"offline"===d?"Offline":"Sync"})]})}function G(){let e=(0,o.v9)((e=>e.prefs.global.maxMonths)),t=(0,o.v9)((e=>e.prefs.local.budgetType)),{saveGlobalPrefs:n}=(0,c.o)(),{sendEvent:i}=(0,r.useContext)(H),[a,l]=(0,r.useState)(!1),[s,u]=(0,r.useState)(!1);const f=(0,d.Z)("reportBudget");return(0,r.useEffect)((()=>{l(!1)}),[t]),(0,p.jsxs)(j.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,p.jsx)(Z,{maxMonths:e||1,onChange:e=>n({maxMonths:e})}),f&&(0,p.jsxs)(j.Z,{style:{marginLeft:-5},children:[(0,p.jsx)(k.y,{type:"bare",loading:a,style:{alignSelf:"flex-start",padding:"4px 7px"},title:"Learn more about budgeting",onClick:()=>u(!0),children:"report"===t?"Report budget":"Rollover budget"}),s&&(0,p.jsxs)(E.u,{position:"bottom-left",onClose:()=>u(!1),style:{padding:10,maxWidth:400},children:[(0,p.jsxs)(R.Z,{children:["You are currently using a"," ",(0,p.jsxs)(M.Z,{style:{fontWeight:600},children:["report"===t?"Report budget":"Rollover budget","."]})," ","Switching will not lose any data and you can always switch back."]}),(0,p.jsx)(R.Z,{children:(0,p.jsxs)(k.y,{type:"primary",loading:a,onClick:function(){l(!0),a||i("budget/switch-type")},children:["Switch to a"," ","report"===t?"Rollover budget":"Report budget"]})}),(0,p.jsx)(R.Z,{isLast:!0,children:(0,p.jsx)(C.Z,{to:"https://actualbudget.org/docs/experimental/report-budget",linkColor:"muted",children:"How do these types of budgeting work?"})})]})]})]})}function K(e){var t;let{style:n}=e,r=(0,i.s0)(),a=(0,i.TH)(),s=(0,N.Ap)(),{isNarrowWidth:u}=(0,v.F)(),c=(0,B.o1)(),h=(0,o.v9)((e=>e.prefs.global.floatingSidebar)),g=(0,d.Z)("privacyMode"),m=(0,d.Z)("themes");return u?null:(0,p.jsxs)(j.Z,{style:[{flexDirection:"row",alignItems:"center",padding:"0 15px",height:36,pointerEvents:"none","& *":{pointerEvents:"auto"}},!l.jU&&"mac"===l.OS&&h&&{paddingLeft:80},n],children:[(h||s.alwaysFloats)&&(0,p.jsx)(k.Z,{type:"bare",style:{marginRight:8},onPointerEnter:e=>{"mouse"===e.pointerType&&s.setHidden(!1)},onPointerLeave:e=>{"mouse"===e.pointerType&&s.setHidden(!0)},onPointerUp:e=>{"mouse"!==e.pointerType&&s.setHidden(!s.hidden)},children:(0,p.jsx)(y,{className:"menu",style:{width:15,height:15,color:b.O9.n5,left:0}})}),(0,p.jsxs)(i.Z5,{children:[(0,p.jsx)(i.AW,{path:"/accounts",element:null!==(t=a.state)&&void 0!==t&&t.goBack?(0,p.jsxs)(k.Z,{type:"bare",onClick:()=>r(-1),children:[(0,p.jsx)(f.Z,{width:10,height:10,style:{marginRight:5,color:"currentColor"}})," ","Back"]}):null}),(0,p.jsx)(i.AW,{path:"/accounts/:id",element:(0,p.jsx)(O,{})}),(0,p.jsx)(i.AW,{path:"/budget",element:(0,p.jsx)(G,{})}),(0,p.jsx)(i.AW,{path:"*",element:null})]}),(0,p.jsx)(j.Z,{style:{flex:1}}),(0,p.jsx)($,{}),m&&(0,p.jsx)(z,{}),g&&(0,p.jsx)(q,{}),c?(0,p.jsx)(Y,{style:{marginLeft:10}}):null,(0,p.jsx)(L.Z,{style:{marginLeft:10}})]})}},25432:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(83017),o=n(15068),i=n(53819),a=n(91743),l=n(71588),s=n(28993);function u(e){let{items:t,getItemProps:n,highlightedIndex:o,embedded:l}=e,u=null;return(0,s.jsx)(a.Z,{children:(0,s.jsx)(a.Z,{style:[{overflow:"auto",padding:"5px 0"},!l&&{maxHeight:175}],children:t.map(((e,t)=>{const a=!u||(e.offbudget!==u.offbudget&&!e.closed||e.closed!==u.closed&&!e.offbudget),c=""+(e.closed?"Closed Accounts":e.offbudget?"Off Budget":"For Budget");return u=e,[a?(0,s.jsx)("div",{style:{color:i.O9.y9,padding:"4px 9px"},"data-testid":"account-item-group",children:c},c):null,(0,r.createElement)("div",{...n?n({item:e}):null,key:e.id,style:{backgroundColor:o===t?i.O9.n4:"transparent",padding:4,paddingLeft:20,borderRadius:l?4:0},"data-testid":"account-item"+(o===t?"-highlighted":"")},e.name)]}))})})}function c(e){let{embedded:t,includeClosedAccounts:n=!0,...r}=e,i=(0,o.gM)()||[];return i=i.filter((e=>n?e:!e.closed)).sort(((e,t)=>e.closed===t.closed?e.offbudget===t.offbudget?0:e.offbudget?1:-1:e.closed?1:-1)),(0,s.jsx)(l.ZP,{strict:!0,highlightFirst:!0,embedded:t,suggestions:i,renderItems:(e,n,r)=>(0,s.jsx)(u,{items:e,getItemProps:n,highlightedIndex:r,embedded:t}),...r})}},71588:function(e,t,n){"use strict";n.d(t,{oo:function(){return ye},ZP:function(){return ve},PW:function(){return le}});var r=n(83017);function o(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var i=n(7896),a=n(80753),l=n(88960);var s=n(47633),u=n.n(s);n(63612);let c=e=>"object"==typeof e&&null!=e&&1===e.nodeType,d=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,f=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return d(n.overflowY,t)||d(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},h=(e,t,n,r,o,i,a,l)=>i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0,p=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)};Object.create;Object.create;var m=0;function y(e){return"function"===typeof e?e:v}function v(){}function b(e,t){if(e){var n=((e,t)=>{var n,r,o,i,a,l;if("undefined"==typeof document)return[];let{scrollMode:s,block:u,inline:d,boundary:g,skipOverflowHiddenElements:m}=t,y="function"==typeof g?g:e=>e!==g;if(!c(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,b=[],w=e;for(;c(w)&&y(w);){if(w=p(w),w===v){b.push(w);break}null!=w&&w===document.body&&f(w)&&!f(document.documentElement)||null!=w&&f(w,m)&&b.push(w)}let x=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,S=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,k=null!=(a=window.scrollX)?a:pageXOffset,C=null!=(l=window.scrollY)?l:pageYOffset,{height:j,width:E,top:T,right:O,bottom:I,left:D}=e.getBoundingClientRect(),_="start"===u||"nearest"===u?T:"end"===u?I:T+j/2,A="center"===d?D+E/2:"end"===d?O:D,Z=[];for(let c=0;c<b.length;c++){let e=b[c],{height:t,width:n,top:r,right:o,bottom:i,left:a}=e.getBoundingClientRect();if("if-needed"===s&&T>=0&&D>=0&&I<=S&&O<=x&&T>=r&&I<=i&&D>=a&&O<=o)return Z;let l=getComputedStyle(e),f=parseInt(l.borderLeftWidth,10),p=parseInt(l.borderTopWidth,10),g=parseInt(l.borderRightWidth,10),m=parseInt(l.borderBottomWidth,10),y=0,w=0,P="offsetWidth"in e?e.offsetWidth-e.clientWidth-f-g:0,R="offsetHeight"in e?e.offsetHeight-e.clientHeight-p-m:0,M="offsetWidth"in e?0===e.offsetWidth?0:n/e.offsetWidth:0,N="offsetHeight"in e?0===e.offsetHeight?0:t/e.offsetHeight:0;if(v===e)y="start"===u?_:"end"===u?_-S:"nearest"===u?h(C,C+S,S,p,m,C+_,C+_+j,j):_-S/2,w="start"===d?A:"center"===d?A-x/2:"end"===d?A-x:h(k,k+x,x,f,g,k+A,k+A+E,E),y=Math.max(0,y+C),w=Math.max(0,w+k);else{y="start"===u?_-r-p:"end"===u?_-i+m+R:"nearest"===u?h(r,i,t,p,m+R,_,_+j,j):_-(r+t/2)+R/2,w="start"===d?A-a-f:"center"===d?A-(a+n/2)+P/2:"end"===d?A-o+g+P:h(a,o,n,f,g+P,A,A+E,E);let{scrollLeft:l,scrollTop:s}=e;y=Math.max(0,Math.min(s+y/N,e.scrollHeight-t/N+R)),w=Math.max(0,Math.min(l+w/M,e.scrollWidth-n/M+P)),_+=s-y,A+=l-w}Z.push({el:e,top:y,left:w})}return Z})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}}function w(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function x(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function k(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"===typeof t?t(e):t&&(t.current=e)}))}}function C(){return String(m++)}function j(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function E(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function T(e){return"string"===typeof e.type}function O(e){return e.props}var I=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function D(e){void 0===e&&(e={});var t={};return I.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function _(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=A(t,r)?t[r]:e[r],n}),{})}function A(e,t){return void 0!==e[t]}function Z(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function P(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!==typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var l=R(e,a,n,r,o);return-1===l?t>=n?-1:t:l}function R(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var l=t-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return o?e>0?R(1,0,n,r,!1):R(-1,n-1,n,r,!1):-1}function M(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(w(t,e,n)||r&&w(t,n.document.activeElement,n))}))}var N=x((function(e){B(e).textContent=""}),500);function L(e,t){var n=B(t);e&&(n.textContent=e,N(t))}function B(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var F=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),W=["refKey","ref"],U=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],z=["onKeyDown","onBlur","onChange","onInput","onChangeText"],H=["refKey","ref"],V=["onMouseMove","onMouseDown","onClick","onPress","index","item"],$=function(){var e=function(e){var t,n;function s(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+C(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=D(t),n.internalSetState((0,i.Z)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=D(t),n.internalSetState((0,i.Z)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,a={},l="function"===typeof e;return!l&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,(0,i.Z)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var s=l?e(t):e;s=n.props.stateReducer(t,s),r=s.hasOwnProperty("selectedItem");var u={};return r&&s.selectedItem!==t.selectedItem&&(o=s.selectedItem),s.type=s.type||0,Object.keys(s).forEach((function(e){t[e]!==s[e]&&(a[e]=s[e]),"type"!==e&&(s[e],A(n.props,e)||(u[e]=s[e]))})),l&&s.hasOwnProperty("inputValue")&&n.props.onInputValueChange(s.inputValue,(0,i.Z)({},n.getStateAndHelpers(),s)),u}),(function(){y(t)(),Object.keys(a).length>1&&n.props.onStateChange(a,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(a,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,a=void 0===e?{}:e,l=a.refKey,s=void 0===l?"ref":l,u=a.ref,c=o(a,W),d=(void 0===t?{}:t).suppressRefError,f=void 0!==d&&d;n.getRootProps.called=!0,n.getRootProps.refKey=s,n.getRootProps.suppressRefError=f;var h=n.getState().isOpen;return(0,i.Z)(((r={})[s]=k(u,n.rootRef),r.role="combobox",r["aria-expanded"]=h,r["aria-haspopup"]="listbox",r["aria-owns"]=h?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=P(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=P(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset((0,i.Z)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=(0,i.Z)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=(0,i.Z)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=R(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=R(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick;t.onPress;var a=t.onKeyDown,l=t.onKeyUp,s=t.onBlur,u=o(t,U),c=n.getState().isOpen,d={onClick:S(r,n.buttonHandleClick),onKeyDown:S(a,n.buttonHandleKeyDown),onKeyUp:S(l,n.buttonHandleKeyUp),onBlur:S(s,n.buttonHandleBlur)},f=u.disabled?{}:d;return(0,i.Z)({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},f,u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Z(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call((0,a.Z)(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return(0,i.Z)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,a=t.onBlur,l=t.onChange,s=t.onInput;t.onChangeText;var u=o(t,z),c={};var d,f=n.getState(),h=f.inputValue,p=f.isOpen,g=f.highlightedIndex;u.disabled||((d={}).onChange=S(l,s,n.inputHandleChange),d.onKeyDown=S(r,n.inputHandleKeyDown),d.onBlur=S(a,n.inputHandleBlur),c=d);return(0,i.Z)({"aria-autocomplete":"list","aria-activedescendant":p&&"number"===typeof g&&g>=0?n.getItemId(g):null,"aria-controls":p?n.menuId:null,"aria-labelledby":u&&u["aria-label"]?void 0:n.labelId,autoComplete:"off",value:h,id:n.inputId},c,u)},n.inputHandleKeyDown=function(e){var t=Z(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call((0,a.Z)(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,a=void 0===e?{}:e,l=a.refKey,s=void 0===l?"ref":l,u=a.ref,c=o(a,H),d=(void 0===t?{}:t).suppressRefError,f=void 0!==d&&d;return n.getMenuProps.called=!0,n.getMenuProps.refKey=s,n.getMenuProps.suppressRefError=f,(0,i.Z)(((r={})[s]=k(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,a=r.onMouseMove,l=r.onMouseDown,s=r.onClick;r.onPress;var u=r.index,c=r.item,d=void 0===c?void 0:c,f=o(r,V);void 0===u?(n.items.push(d),u=n.items.indexOf(d)):n.items[u]=d;var h=s,p=((t={onMouseMove:S(a,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:S(l,(function(e){e.preventDefault()}))}).onClick=S(h,(function(){n.selectItemAtIndex(u,{type:9})})),t),g=f.disabled?{onMouseDown:p.onMouseDown}:p;return(0,i.Z)({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},g,f)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=D(e),n.internalSetState((function(t){var r=t.selectedItem;return(0,i.Z)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=D(e),n.internalSetState((function(t){var r=t.isOpen;return(0,i.Z)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"===typeof i&&n.setHighlightedIndex(i,e),y(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=x((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage((0,i.Z)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,L(o,n.props.environment.document)}),200);var r=n.props,l=r.defaultHighlightedIndex,s=r.initialHighlightedIndex,u=void 0===s?l:s,c=r.defaultIsOpen,d=r.initialIsOpen,f=void 0===d?c:d,h=r.initialInputValue,p=void 0===h?"":h,g=r.initialSelectedItem,m=void 0===g?null:g,v=n.getState({highlightedIndex:u,isOpen:f,inputValue:p,selectedItem:m});return null!=v.selectedItem&&void 0===n.props.initialInputValue&&(v.inputValue=n.props.itemToString(v.selectedItem)),n.state=v,n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,(0,l.Z)(t,n);var u=s.prototype;return u.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},u.getState=function(e){return void 0===e&&(e=this.state),_(e,this.props)},u.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},u.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},u.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},u.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=P(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},u.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,l=this.getRootProps,s=this.getToggleButtonProps,u=this.getLabelProps,c=this.getMenuProps,d=this.getInputProps,f=this.getItemProps,h=this.openMenu,p=this.closeMenu,g=this.toggleMenu,m=this.selectItem,y=this.selectItemAtIndex,v=this.selectHighlightedItem,b=this.setHighlightedIndex,w=this.clearSelection,x=this.clearItems;return{getRootProps:l,getToggleButtonProps:s,getLabelProps:u,getMenuProps:c,getInputProps:d,getItemProps:f,reset:this.reset,openMenu:h,closeMenu:p,toggleMenu:g,selectItem:m,selectItemAtIndex:y,selectHighlightedItem:v,setHighlightedIndex:b,clearSelection:w,clearItems:x,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},u.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!M(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=M(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",r),a.addEventListener("touchmove",o),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",r),a.removeEventListener("touchmove",o),a.removeEventListener("touchend",i)}},u.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},u.componentDidUpdate=function(e,t){A(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},u.componentWillUnmount=function(){this.cleanup()},u.render=function(){var e=E(this.props.children,v);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=E(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:T(t)?(0,r.cloneElement)(t,this.getRootProps(O(t))):void 0:null},s}(r.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:j,itemToString:function(e){return null==e?"":String(e)},onStateChange:v,onInputValueChange:v,onUserAction:v,onChange:v,onSelect:v,onOuterClick:v,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"===typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:b},e.stateChangeTypes=F,e}(),q=$;x((function(e,t){L(e(),t)}),200),"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect;var Y={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:b,environment:"undefined"===typeof window?{}:window};u().array.isRequired,u().func,u().func,u().func,u().number,u().number,u().number,u().bool,u().bool,u().bool,u().any,u().any,u().any,u().string,u().string,u().string,u().func,u().string,u().func,u().func,u().func,u().func,u().func,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});g(g({},Y),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(1===n?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}});u().array.isRequired,u().func,u().func,u().func,u().func,u().number,u().number,u().number,u().bool,u().bool,u().bool,u().any,u().any,u().any,u().string,u().string,u().string,u().string,u().string,u().string,u().func,u().string,u().string,u().func,u().func,u().func,u().func,u().func,u().func,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});(0,i.Z)({},Y,{selectedItemChanged:function(e,t){return e!==t},getA11yStatusMessage:j});u().array,u().array,u().array,u().func,u().func,u().func,u().number,u().number,u().number,u().func,u().func,u().string,u().string,u().shape({addEventListener:u().func,removeEventListener:u().func,document:u().shape({getElementById:u().func,activeElement:u().any,body:u().any})});var G=n(86634),K=n(22141),Q=n(53819),X=n(13743),J=n(17904),ee=n(91743),te=n(83679),ne=n(28993);const re={};function oe(e,t,n){if(e){let e=t.findIndex((e=>e.id===n));return-1===e?null:t[e]}return n}function ie(e){return null==e?"":"string"===typeof e?e:e.name||""}function ae(e){return"string"===typeof e?e:e?e.id:null}function le(e,t){return ie(e).toLowerCase().includes(t.toLowerCase())}function se(e,t){return e.filter((e=>le(e,t)))}function ue(e,t,n,r,o){let i=null;if(t)if(null==r){let e=n.find((e=>e.id===o));e&&(i=e.id)}else r<n.length&&(i=n[r].id);else i=o;null===e||void 0===e||e(i,o)}function ce(e){return(0,ne.jsx)(J.C,{...e})}function de(e,t,n){return(0,ne.jsx)("div",{children:e.map(((e,o)=>{let i=ie(e);return(0,r.createElement)("div",{...t({item:e}),key:i,...(0,G.iv)({padding:5,cursor:"default",backgroundColor:n===o?Q.O9.n4:null})},i)}))})}function fe(e){return"Enter"===e.code}function he(e){return e?ie(e):""}function pe(e){let{focused:t,embedded:n=!1,containerProps:o,labelProps:i={},inputProps:a={},suggestions:l,tooltipStyle:s,tooltipProps:u,renderInput:c=ce,renderItems:d=de,itemToString:f=he,shouldSaveFromKey:h=fe,filterSuggestions:p=se,openOnFocus:g=!0,getHighlightedIndex:m,highlightFirst:y,onUpdate:v,strict:b,onSelect:w,tableBehavior:x,value:S,isMulti:k=!1}=e;const[C,j]=(0,r.useState)((()=>oe(b,l,S))),[E,T]=(0,r.useState)(C?ie(C):""),[O,I]=(0,r.useState)(!1),[D,_]=(0,r.useState)(C),A=(0,r.useMemo)((()=>p(l,E)),[p,l,E]),[Z,P]=(0,r.useState)(null),[R,M]=(0,r.useState)(n);(0,r.useEffect)((()=>{j(oe(b,l,S))}),[S,l,b]);const N=O&&A||l;return(0,ne.jsx)(q,{onSelect:(e,t)=>{let{inputValue:n}=t;j(e),P(null),k?T(""):M(!1),w&&setTimeout((()=>{w(ae(e),n)}),0)},highlightedIndex:Z,selectedItem:C||null,itemToString:f,inputValue:E,isOpen:R,onInputValueChange:(e,t)=>{if(!document.hasFocus())return;if([q.stateChangeTypes.controlledPropUpdatedSelectedItem,q.stateChangeTypes.touchEnd].includes(t.type))return;const n=p(l,e);if(""===e)t.type!==q.stateChangeTypes.clickItem&&ue(v,b,n,null,null),P(null);else{let r=e=>y&&e.length?0:null,o=(m||r)(n);t.type!==q.stateChangeTypes.clickItem&&ue(v,b,n,o,e),P(o)}T(e),I(!0)},onStateChange:e=>{x&&e.type===q.stateChangeTypes.mouseUp||("highlightedIndex"in e&&e.type!==q.stateChangeTypes.changeInput&&P(e.highlightedIndex),"selectedItem"in e&&j(e.selectedItem),!R||e.type!==q.stateChangeTypes.keyDownArrowUp&&e.type!==q.stateChangeTypes.keyDownArrowDown||ue(v,b,A||l,null!=e.highlightedIndex?e.highlightedIndex:Z,E),re.lastChangeType=e.type)},labelId:null===i||void 0===i?void 0:i.id,children:e=>{let{getInputProps:r,getItemProps:i,isOpen:f,inputValue:p,highlightedIndex:m}=e;return(0,ne.jsxs)("div",{className:"view "+(0,G.iv)({display:"flex"}).toString(),...o,children:[c(r({focused:t,...a,onFocus:e=>{var t;null===(t=a.onFocus)||void 0===t||t.call(a,e),g&&M(!0)},onBlur:e=>{var t;if(e.preventDownshiftDefault=!0,null===(t=a.onBlur)||void 0===t||t.call(a,e),x)M(!1);else{if(""===e.target.value)return null===w||void 0===w||w(null,e.target.value),j(null),void M(!1);!function(e){let t=oe(b,l,void 0===e?S:e);j(t),T(t?ie(t):""),_(t),P(null),M(n),I(!1)}(C?ae(C):null)}},onKeyDown:e=>{let{onKeyDown:t}=a||{};if(f)if("Enter"===e.key)if(null!=m)re.lastChangeType===q.stateChangeTypes.itemMouseEnter?e.preventDefault():e.stopPropagation();else{if(!b)return e.stopPropagation(),w(E,e.target.value),T(""),j(null),P(null),void I(!1);e.preventDefault(),null===t||void 0===t||t(e)}else h(e)&&(e.preventDefault(),null===t||void 0===t||t(e));"Escape"===e.key&&(e.nativeEvent.preventDownshiftDefault=!0,n||e.stopPropagation(),ue(v,b,l,null,ae(D)),T(ie(D)),j(oe(b,l,D)),P(null),M(!!n))},onChange:e=>{const{onChange:t}=a||{};null===t||void 0===t||t(e.target.value)}})),f&&N.length>0&&(n?(0,ne.jsx)(ee.Z,{style:{marginTop:5},"data-testid":"autocomplete",children:d(N,i,m,p)}):(0,ne.jsx)(te.u,{position:"bottom-stretch",offset:2,style:{padding:0,backgroundColor:Q.O9.n1,color:"white",minWidth:200,...s},...u,"data-testid":"autocomplete",children:d(N,i,m,p)}))]})}})}function ge(e){let{name:t,onRemove:n}=e;return(0,ne.jsxs)(ee.Z,{style:{alignItems:"center",flexDirection:"row",backgroundColor:Q.O9.b9,padding:"2px 4px",margin:"2px",borderRadius:4},children:[t,(0,ne.jsx)(X.Z,{type:"bare",style:{marginLeft:1},onClick:n,children:(0,ne.jsx)(K.Z,{style:{width:8,height:8}})})]})}function me(e){let{value:t,onSelect:n,suggestions:o,strict:i,...a}=e,[l,s]=(0,r.useState)(!1),u=(0,r.useRef)();function c(e){let r=t.filter((t=>t!==e));n(r)}return(0,r.useEffect)((()=>{u.current=t})),(0,ne.jsx)(ve,{...a,isMulti:!0,value:null,suggestions:o.filter((e=>!t.includes(ae(e)))),onSelect:function(e){e&&(e=e.trim(),n([...t,e],e))},highlightFirst:!0,strict:i,tooltipProps:{forceLayout:u.current!==t},renderInput:e=>(0,ne.jsxs)(ee.Z,{style:[{display:"flex",flexWrap:"wrap",flexDirection:"row",alignItems:"center",backgroundColor:"white",borderRadius:4,border:"1px solid #d0d0d0"},l&&{border:"1px solid "+Q.O9.b5,boxShadow:"0 1px 1px "+Q.O9.b7}],children:[t.map(((e,t)=>(e=oe(i,o,e))&&(0,ne.jsx)(ge,{name:ie(e),onRemove:()=>c(ae(e))},ae(e)||t))),(0,ne.jsx)(J.C,{...e,onKeyDown:n=>function(e,n){"Backspace"===e.key&&""===e.target.value&&c(t[t.length-1]),null===n||void 0===n||n(e)}(n,e.onKeyDown),onFocus:t=>{s(!0),e.onFocus(t)},onBlur:t=>{s(!1),e.onBlur(t)},style:[{flex:1,minWidth:30,border:0,":focus":{border:0,boxShadow:"none"}},e.style]})]})})}function ye(e){let{show:t=!0,embedded:n,children:r}=e;return t&&(0,ne.jsx)(ee.Z,{style:[{flexShrink:0},n?{paddingTop:5}:{padding:5}],onMouseDown:e=>e.preventDefault(),children:r})}function ve(e){let{multi:t,...n}=e;return t?(0,ne.jsx)(me,{...n}):(0,ne.jsx)(pe,{...n})}},87740:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(83017),o=n(28993);var i=e=>(0,o.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",style:{color:"inherit",...e.style},children:(0,o.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:3.5,d:"m30 9-4-4M30 9l-4 4M6 5 2 9M2 9l4 4M10 9H3M22 9h7M16 15l6-6M16 15l-6-6M16 28V15"})}),a=n(53819),l=n(10666),s=n(91743),u=n(71588);function c(e){let{items:t,getItemProps:n,highlightedIndex:u,embedded:c,footer:d}=e,f=null;return(0,o.jsxs)(s.Z,{children:[(0,o.jsx)(s.Z,{style:[{overflow:"auto",padding:"5px 0"},!c&&{maxHeight:175}],children:t.map(((e,t)=>{if("split"===e.id)return(0,o.jsxs)(s.Z,{...n?n({item:e}):null,style:{backgroundColor:u===t?a.O9.n4:"transparent",borderRadius:c?4:0,flexShrink:0,flexDirection:"row",alignItems:"center",fontSize:11,fontWeight:500,color:a.O9.g8,padding:"6px 8px"},"data-testid":"split-transaction-button",children:[(0,o.jsx)(l.Z,{style:{lineHeight:0},children:(0,o.jsx)(i,{width:10,height:10,style:{marginRight:5}})}),"Split Transaction"]},"split");const d=e.cat_group!==f;return f=e.cat_group,(0,o.jsxs)(r.Fragment,{children:[d&&(0,o.jsx)("div",{style:{color:a.O9.y9,padding:"4px 9px"},"data-testid":"category-item-group",children:e.groupName}),(0,o.jsx)("div",{...n?n({item:e}):null,style:{backgroundColor:u===t?a.O9.n4:"transparent",padding:4,paddingLeft:20,borderRadius:c?4:0},"data-testid":"category-item"+(u===t?"-highlighted":""),children:e.name})]},e.id)}))}),d]})}function d(e){let{categoryGroups:t,showSplitOption:n,embedded:i,...a}=e,l=(0,r.useMemo)((()=>t.reduce(((e,t)=>e.concat(t.categories.map((e=>({...e,groupName:t.name}))))),n?[{id:"split",name:""}]:[])),[t]);return(0,o.jsx)(u.ZP,{strict:!0,highlightFirst:!0,embedded:i,getHighlightedIndex:e=>0===e.length?null:"split"===e[0].id?e.length>1?1:null:0,filterSuggestions:(e,t)=>e.filter((e=>"split"===e.id||(0,u.PW)(e,t)||e.groupName.toLowerCase().includes(t.toLowerCase()))),suggestions:l,renderItems:(e,t,n)=>(0,o.jsx)(c,{items:e,embedded:i,getItemProps:t,highlightedIndex:n}),...a})}},35946:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(83017),o=n(71274),i=n(98297),a=n(15068),l=n(69476),s=n(5499),u=n(81576),c=n(53819),d=n(13743),f=n(91743),h=n(71588),p=n(28993);function g(e,t){return"new"!==e||t.startsWith("new:")?e:"new:"+t}function m(e){return"string"===typeof e&&e.startsWith("new:")?"new":e}function y(e){let{items:t,getItemProps:n,highlightedIndex:o,embedded:i,inputValue:a,footer:l}=e,s=t.filtered,d=null;if(t=[...t],"new"===t[0].id){let[e,...n]=t;d=e,t=n}let h=d?1:0,g=null;return(0,p.jsxs)(f.Z,{children:[(0,p.jsxs)(f.Z,{style:[{overflow:"auto",padding:"5px 0"},!i&&{maxHeight:175}],children:[d&&(0,p.jsx)(f.Z,{...n?n({item:d}):null,style:{flexShrink:0,padding:"6px 9px",backgroundColor:0===o?c.O9.n4:"transparent",borderRadius:i?4:0},children:(0,p.jsxs)(f.Z,{style:{display:"block",color:c.O9.g8,borderRadius:4,fontSize:11,fontWeight:500},children:[(0,p.jsx)(u.Z,{width:8,height:8,style:{marginRight:5,display:"inline-block"}}),"Create Payee \u201c",a,"\u201d"]})}),t.map(((e,a)=>{let l,u=e.transfer_acct?"account":"payee";"payee"===u&&g!==u?l="Payees":"account"===u&&g!==u&&(l="Transfer To/From");let d=a===t.length-1&&s;return g=u,(0,p.jsxs)(r.Fragment,{children:[l&&(0,p.jsx)("div",{style:{color:c.O9.y9,padding:"4px 9px"},children:l},"title-"+a),(0,r.createElement)("div",{...n?n({item:e}):null,key:e.id,style:{backgroundColor:o===a+h?c.O9.n4:"transparent",borderRadius:i?4:0,padding:4,paddingLeft:20}},e.name),d&&(0,p.jsx)("div",{style:{fontSize:11,padding:5,color:c.O9.n5,textAlign:"center"},children:"More payees are available, search to find them"})]},e.id)}))]}),l]})}function v(e){let{value:t,inputProps:n,showMakeTransfer:u=!0,showManagePayees:c=!1,defaultFocusTransferPayees:f=!1,tableBehavior:v,embedded:b,onUpdate:w,onSelect:x,onManagePayees:S,accounts:k,payees:C,...j}=e,E=(0,l.n4)();C||(C=E);let T=(0,a.gM)();k||(k=T);let[O,I]=(0,r.useState)(f),[D,_]=(0,r.useState)(""),A=!!D,Z=(0,r.useMemo)((()=>{const e=function(e,t,n){let r=n?(0,s.nc)(e,n):e;return t&&r&&(r=r.filter((e=>!!e.transfer_acct))),r||[]}(C,O,k);return A?[{id:"new",name:""},...e]:e}),[C,O,k,A]),P=(0,o.I0)();const[R,M]=(0,r.useState)(!1);return(0,p.jsx)(h.ZP,{strict:!0,embedded:b,value:m(t),suggestions:Z,tableBehavior:v,itemToString:e=>e?"new"===e.id?D:e.name:"",focused:R,inputProps:{...n,onBlur:()=>{_(""),M(!1)},onFocus:()=>M(!0),onChange:_},onUpdate:(e,t)=>w&&w(g(e,t)),onSelect:async function(e,t){if(v)null===x||void 0===x||x(g(e,t));else{let n=()=>P((0,i.fz)(t));Array.isArray(e)?e=await Promise.all(e.map((e=>"new"===e?n():e))):"new"===e&&(e=await n()),null===x||void 0===x||x(e)}},getHighlightedIndex:e=>e.length>1&&"new"===e[0].id?1:0,filterSuggestions:(e,t)=>{let n=e.filter((e=>"new"===e.id?!(!t||""===t||O):(0,h.PW)(e,t)));n.sort(((e,n)=>{let r=e.name.toLowerCase().startsWith(t.toLowerCase()),o=n.name.toLowerCase().startsWith(t.toLowerCase()),i=e.name.toLowerCase()===t.toLowerCase(),a=n.name.toLowerCase()===t.toLowerCase();return"new"===e.id?-1:"new"===n.id?1:i&&!a?-1:!i&&a?1:r===o?0:r&&!o?-1:1}));let r=n.length>100;return n=n.slice(0,100),n.filtered=r,n.length>=2&&"new"===n[0].id&&n[1].name.toLowerCase()===t.toLowerCase()&&!n[1].transfer_acct?n.slice(1):n},renderItems:(e,t,n,r)=>(0,p.jsx)(y,{items:e,getItemProps:t,highlightedIndex:n,inputValue:r,embedded:b,footer:(0,p.jsxs)(h.oo,{embedded:b,children:[u&&(0,p.jsx)(d.Z,{type:O?"menuSelected":"menu",style:c&&{marginBottom:5},onClick:()=>{null===w||void 0===w||w(null),I(!O)},children:"Make Transfer"}),c&&(0,p.jsx)(d.Z,{type:"menu",onClick:()=>S(),children:"Manage Payees"})]})}),...j},O?"transfers":"all")}},97931:function(e,t,n){"use strict";n.d(t,{j:function(){return a},s:function(){return l}});var r=n(83017),o=n(28993);let i=(0,r.createContext)();function a(e){let{children:t}=e,[n,a]=(0,r.useState)(1);return(0,o.jsx)(i.Provider,{value:{displayMax:n,setDisplayMax:a},children:t})}function l(){return(0,r.useContext)(i)}},78738:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(82054),o=n(91743),i=n(28993);function a(e){let{left:t,right:n,style:a,leftStyle:l,rightStyle:s,truncate:u="left",...c}=e;const d={textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"};return(0,i.jsxs)(o.Z,{style:[{flexDirection:"row",alignItems:"center"},a],...c,children:[(0,i.jsx)(r.Z,{style:[{marginRight:10},"left"===u&&d,l],children:t}),(0,i.jsx)(r.Z,{style:[{flex:1,textAlign:"right"},"right"===u&&d,s],children:n})]})}},51045:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(79274),o=n(17745),i=n(86634),a=n(53819),l=n(28993);function s(e){let{to:t,style:n,activeStyle:s,children:u}=e,c=(0,r.bS)({path:t});return(0,l.jsx)(o.OL,{to:t,...(0,i.iv)([a.W2.smallText,n,c?s:null]),children:u})}},82054:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86634),o=n(28993);function i(e){const{style:t,innerRef:n,...i}=e;return(0,o.jsx)("div",{...i,ref:n,className:`${e.className||""} ${(0,r.iv)(e.style)}`})}},13743:function(e,t,n){"use strict";n.d(t,{y:function(){return g}});var r=n(83017),o=n(86634),i=n(9314),a=n(53819),l=n(91743),s=n(28993);const u={normal:a.rS.buttonNormalBackground,normalDisabled:a.rS.buttonNormalDisabledBackground,primary:a.rS.buttonPrimaryBackground,primaryDisabled:a.rS.buttonPrimaryDisabledBackground,bare:a.rS.buttonBareBackground,bareDisabled:a.rS.buttonBareDisabledBackground,menu:a.rS.buttonMenuBackground,menuSelected:a.rS.buttonMenuSelectedBackground},c={normal:a.rS.buttonNormalBackgroundHover,primary:a.rS.buttonPrimaryBackgroundHover,bare:a.rS.buttonBareBackgroundHover,menu:a.rS.buttonMenuBackgroundHover,menuSelected:a.rS.buttonMenuSelectedBackgroundHover},d={normal:a.rS.buttonNormalBorder,normalDisabled:a.rS.buttonNormalDisabledBorder,primary:a.rS.buttonPrimaryBorder,primaryDisabled:a.rS.buttonPrimaryDisabledBorder,menu:a.rS.buttonMenuBorder,menuSelected:a.rS.buttonMenuSelectedBorder},f={normal:a.rS.buttonNormalText,normalDisabled:a.rS.buttonNormalDisabledText,primary:a.rS.buttonPrimaryText,primaryDisabled:a.rS.buttonPrimaryDisabledText,bare:a.rS.buttonBareText,bareDisabled:a.rS.buttonBareDisabledText,menu:a.rS.buttonMenuText,menuSelected:a.rS.buttonMenuSelectedText},h={normal:a.rS.buttonNormalTextHover,primary:a.rS.buttonPrimaryTextHover,bare:a.rS.buttonBareTextHover,menu:a.rS.buttonMenuTextHover,menuSelected:a.rS.buttonMenuSelectedTextHover},p=(0,r.forwardRef)(((e,t)=>{let{children:n,pressed:r,hover:i,type:l="normal",isSubmit:p="primary"===l,color:g,style:m,disabled:y,hoveredStyle:v,activeStyle:b,bounce:w=!0,as:x="button",...S}=e,k=y?l+"Disabled":l;v=["bare"!==l&&a.W2.shadow,v,{backgroundColor:c[l],color:g||h[l]}],b=["bare"===l?{backgroundColor:a.rS.buttonBareBackgroundActive}:{transform:w&&"translateY(1px)",boxShadow:"0 1px 4px 0 "+("primary"===l?a.rS.buttonPrimaryShadow:a.rS.buttonNormalShadow),transition:"none"},b];let C=x,j=[{alignItems:"center",justifyContent:"center",flexShrink:0,padding:"bare"===l?"5px":"5px 10px",margin:0,overflow:"hidden",display:"flex",borderRadius:4,backgroundColor:u[k],border:"bare"===l?"none":"1px solid "+d[k],color:g||f[k],transition:"box-shadow .25s",WebkitAppRegion:"no-drag",...a.W2.smallText},{":hover":!y&&v},{":active":!y&&b},i&&v,r&&b,m];return(0,s.jsx)(C,{ref:t,..."string"===typeof x?(0,o.iv)(j):{style:j,type:p?"submit":"button"},disabled:y,...S,children:n})})),g=(0,r.forwardRef)(((e,t)=>{let{loading:n,children:r,...o}=e;return(0,s.jsxs)(p,{...o,ref:t,style:[{position:"relative"},o.style],children:[n&&(0,s.jsx)(l.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(i.Z,{style:{width:20,height:20}})}),(0,s.jsx)(l.Z,{style:{opacity:n?0:1,flexDirection:"row",alignItems:"center"},children:r})]})}));t.Z=p},61039:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});n(83017);var r=n(79274),o=n(13743),i=n(28993);function a(e){let{to:t,style:n,activeStyle:a,...l}=e;const s=(0,r.s0)(),u=(0,r.bS)({path:t});return(0,i.jsx)(o.Z,{style:{...n,...u?a:{}},...l,onClick:e=>{var n;null===(n=l.onClick)||void 0===n||n.call(l,e),s(t)}})}},11599:function(e,t,n){"use strict";var r=n(83017),o=n(53819),i=n(28993);let a={purple:o.O9.p4,blue:o.O9.b4,muted:"inherit"};const l=(0,r.forwardRef)(((e,t)=>{let{children:n,to:r,linkColor:o="blue"}=e;return(0,i.jsx)("a",{ref:t,href:r,target:"_blank",rel:"noopener noreferrer",style:{color:a[o]},children:n})}));t.Z=l},74283:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(83017);function o(e){let{children:t}=e,o=(0,r.useRef)(null);return(0,r.useEffect)((()=>{o.current&&!n.g.IS_DESIGN_MODE&&setTimeout((()=>{o.current&&(o.current.focus(),o.current.setSelectionRange(0,1e4))}),0)}),[]),"function"===typeof t?t(o):(0,r.cloneElement)(t,{inputRef:o})}},17904:function(e,t,n){"use strict";n.d(t,{C:function(){return c},Z:function(){return u}});var r=n(83017);var o=function(e){return function(t){e.forEach((function(e){"function"===typeof e?e(t):null!=e&&(e.current=t)}))}},i=n(86634),a=n(75197),l=n(53819),s=n(28993);const u={outline:0,backgroundColor:"white",margin:0,padding:5,borderRadius:4,border:"1px solid #d0d0d0"};var c=e=>{let{style:t,inputRef:n,onEnter:c,onUpdate:d,focused:f,...h}=e,p=(0,r.useRef)();return(0,a.X)(p,f),(0,s.jsx)("input",{ref:n?o([n,p]):p,...(0,i.iv)(u,{whiteSpace:"nowrap",overflow:"hidden",flexShrink:0,":focus":{border:"1px solid "+l.rS.formInputBorderSelected,boxShadow:"0 1px 1px "+l.rS.formInputShadowSelected},"::placeholder":{color:l.rS.formInputTextPlaceholder}},l.W2.smallText,t),...h,onKeyDown:e=>{var t;"Enter"===e.key&&c&&c(e),null===(t=h.onKeyDown)||void 0===t||t.call(h,e)},onChange:e=>{var t;d&&d(e.target.value),null===(t=h.onChange)||void 0===t||t.call(h,e)}})}},13419:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83017),o=n(53819),i=n(17904),a=n(91743),l=n(28993);function s(e){let{leftContent:t,rightContent:n,inputStyle:s,focusStyle:u,style:c,getStyle:d,...f}=e,[h,p]=(0,r.useState)(!1);return(0,l.jsxs)(a.Z,{style:[i.Z,{padding:0,flexDirection:"row",alignItems:"center"},c,h&&(null!==u&&void 0!==u?u:{boxShadow:"0 0 0 1px "+o.rS.formInputShadowSelected}),d&&d(h)],children:[t,(0,l.jsx)(i.C,{...f,style:[s,{flex:1,"&, &:focus, &:hover":{border:0,backgroundColor:"transparent",boxShadow:"none",color:"inherit"}}],onFocus:e=>{var t;p(!0),null===(t=f.onFocus)||void 0===t||t.call(f,e)},onBlur:e=>{var t;p(!1),null===(t=f.onBlur)||void 0===t||t.call(f,e)}}),n]})}},67134:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});n(83017);var r=n(86634),o=n(53819),i=n(28993);function a(e){let{style:t,children:n,...a}=e;return(0,i.jsx)("button",{type:"button",...(0,r.iv)([{textDecoration:"none",color:o.rS.pageTextLink,backgroundColor:"transparent",display:"inline",border:0,cursor:"pointer",padding:0,font:"inherit",":hover":{textDecoration:"underline",boxShadow:"none"},":focus":{boxShadow:"none"}},o.W2.smallText,t]),...a,children:n})}},18999:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(83017),o=n(53819),i=n(10666),a=n(91743),l=n(28993);function s(e){let{keyName:t}=e;return(0,l.jsx)(i.Z,{style:{fontSize:10,color:o.O9.n6},children:t})}function u(e){let{header:t,footer:n,items:c,onMenuSelect:d}=e,f=(0,r.useRef)(null),h=c.filter((e=>e)),[p,g]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=f.current;e.focus();let t=e=>{let t=h.filter((e=>e&&e!==u.line&&e.type!==u.label)),n=t.indexOf(h[p]),r=e=>h.indexOf(t[e]);switch(e.key){case"ArrowUp":e.preventDefault(),g(null===p?0:r(Math.max(n-1,0)));break;case"ArrowDown":e.preventDefault(),g(null===p?0:r(Math.min(n+1,t.length-1)));break;case"Enter":e.preventDefault();const o=h[p];null!==p&&o!==u.line&&(null===d||void 0===d||d(o.name))}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[p]),(0,l.jsxs)(a.Z,{style:{outline:"none",borderRadius:4,overflow:"hidden"},tabIndex:1,innerRef:f,children:[t,h.map(((e,t)=>{if(e===u.line)return(0,l.jsx)(a.Z,{style:{margin:"3px 0px"},children:(0,l.jsx)(a.Z,{style:{borderTop:"1px solid "+o.O9.pK}})},t);if(e.type===u.label)return(0,l.jsx)(i.Z,{style:{color:o.O9.n6,fontSize:11,lineHeight:"1em",textTransform:"uppercase",margin:"3px 9px",marginTop:5},children:e.name},e.name);let n=h[t-1];return(0,l.jsxs)(a.Z,{role:"button",style:[{cursor:"default",padding:"9px 10px",marginTop:0===t||n===u.line||n.type===u.label?0:-3,flexDirection:"row",alignItems:"center"},e.disabled&&{color:o.O9.n7},!e.disabled&&p===t&&{backgroundColor:o.O9.pK}],onMouseEnter:()=>g(t),onMouseLeave:()=>g(null),onClick:t=>!e.disabled&&d&&d(e.name),children:[(0,l.jsx)(i.Z,{style:{lineHeight:0},children:e.icon&&(0,r.createElement)(e.icon,{width:e.iconSize||10,height:e.iconSize||10,style:{marginRight:7,width:10}})}),(0,l.jsx)(i.Z,{children:e.text}),(0,l.jsx)(a.Z,{style:{flex:1}}),e.key&&(0,l.jsx)(s,{keyName:e.key})]},e.name)})),n]})}const c=Symbol("menu-line");u.line=c,u.label=Symbol("menu-label")},42131:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(83017),o=n(12942),i=n.n(o),a=n(30702),l=n(9314),s=n(28091),u=n(53819),c=n(85761),d=n(13743),f=n(10666),h=n(91743),p=n(28993);const g=e=>{let{style:t,size:n,noAnimation:o,isCurrent:i,stackIndex:a,children:l}=e,s=(0,r.useRef)(null),u=(0,r.useRef)(!1),c=(0,r.useRef)(10*Math.random()-5);return(0,r.useLayoutEffect)((()=>{function e(){i?(s.current.style.transform="translateY(0px) scale(1)",s.current.style.pointerEvents="auto"):(s.current.style.transform=`translateY(-40px) scale(.95) rotate(${c.current}deg)`,s.current.style.pointerEvents="none")}null!=s.current&&(u.current?e():o?(s.current.style.opacity=1,s.current.style.transform="translateY(0px) scale(1)",setTimeout((()=>{s.current&&(s.current.style.transition="opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)")}),0)):(s.current.style.opacity=0,s.current.style.transform="translateY(10px) scale(1)",setTimeout((()=>{s.current&&(u.current=!0,s.current.style.transition="opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)",s.current.style.opacity=1,e())}),0)))}),[o,i,a]),(0,p.jsx)(h.Z,{innerRef:s,style:[t,n&&{width:n.width,height:n.height},o&&!i&&{display:"none"}],children:l})},m=e=>{let{style:t,leftContent:n,focusButton:o=!1,children:i}=e,a=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(o&&a.current){let e=a.current.querySelector("button:not([data-hidden])");e&&e.focus()}}),[o]),(0,p.jsxs)(h.Z,{innerRef:a,style:[{flexDirection:"row",marginTop:30},t],children:[n,(0,p.jsx)(h.Z,{style:{flex:1}}),i]})};t.C=e=>{let{title:t,isCurrent:o,isHidden:m,size:y,padding:v=20,showHeader:b=!0,showTitle:w=!0,showClose:x=!0,showOverlay:S=!0,loading:k=!1,noAnimation:C=!1,focusAfterClose:j=!0,stackIndex:E,parent:T,style:O,contentStyle:I,overlayStyle:D,children:_,onClose:A}=e;return(0,r.useEffect)((()=>{let e=a.Z.getScope();return a.Z.setScope("modal"),()=>a.Z.setScope(e)}),[]),(0,p.jsx)(i(),{isOpen:!0,onRequestClose:A,shouldCloseOnOverlayClick:!1,shouldFocusAfterRender:!n.g.IS_DESIGN_MODE,shouldReturnFocusAfterClose:j,appElement:document.querySelector("#root"),parentSelector:T&&(()=>T),style:{content:{top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",overflow:"visible",border:0,fontSize:14,backgroundColor:"transparent",padding:0,pointerEvents:"auto",...I},overlay:{zIndex:3e3,backgroundColor:S&&0===E?"rgba(0, 0, 0, .1)":"none",pointerEvents:S?"auto":"none",...D,...T?{position:"absolute",top:0,left:0,right:0,bottom:0}:{}}},children:(0,p.jsxs)(g,{noAnimation:C,isCurrent:o,size:y,style:[{willChange:"opacity, transform",minWidth:"100%",minHeight:0,borderRadius:4,backgroundColor:"white",opacity:m?0:1,[`@media (min-width: ${c.Z.breakpoint_small})`]:{minWidth:c.Z.breakpoint_small}},u.W2.shadowLarge,O,u.W2.lightScrollbar],children:[b&&(0,p.jsxs)(h.Z,{style:{padding:20,position:"relative",flexShrink:0},children:[w&&(0,p.jsx)(h.Z,{style:{color:u.O9.n2,flex:1,alignSelf:"center",textAlign:"center",width:"calc(100% - 40px)"},children:(0,p.jsx)(f.Z,{style:{fontSize:25,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t})}),(0,p.jsx)(h.Z,{style:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",alignItems:"center"},children:(0,p.jsx)(h.Z,{style:{flexDirection:"row",marginRight:15},children:x&&(0,p.jsx)(d.Z,{type:"bare",onClick:A,style:{padding:"10px 10px"},"aria-label":"Close",children:(0,p.jsx)(s.Z,{width:10})})})})]}),(0,p.jsx)(h.Z,{style:{padding:v,paddingTop:0,flex:1},children:"function"===typeof _?_():_}),k&&(0,p.jsx)(h.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, .6)",alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,p.jsx)(l.Z,{style:{width:20,height:20},color:u.O9.n1})})]})})}},803:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86634),o=n(28993);function i(e){let{style:t,isLast:n,children:i,...a}=e;return(0,o.jsx)("div",{...a,...(0,r.iv)(!n&&{marginBottom:15},t,{lineHeight:"1.5em"}),children:i})}},38102:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(22141),o=n(47631),i=n(53819),a=n(13743),l=n(13419),s=n(28993);function u(e){let{inputRef:t,value:n,onChange:u,placeholder:c,isInModal:d,width:f=250}=e;return(0,s.jsx)(l.Z,{inputRef:t,style:{width:f,flex:"",borderColor:d?null:"transparent",backgroundColor:d?null:i.rS.formInputBackground},focusStyle:d?null:{boxShadow:"0 0 0 1px "+i.rS.formInputShadowSelected,backgroundColor:i.rS.formInputBackgroundSelected},leftContent:(0,s.jsx)(o.Z,{style:{width:13,height:13,flexShrink:0,color:n?i.rS.altMenuItemTextSelected:"inherit",margin:5,marginRight:0}}),rightContent:n&&(0,s.jsx)(a.Z,{type:"bare",style:{padding:8},onClick:()=>u(""),title:"Clear search term",children:(0,s.jsx)(r.Z,{style:{width:8,height:8}})}),inputStyle:{"::placeholder":{color:i.rS.formInputTextPlaceholder,transition:"color .25s"},":focus":d?null:{"::placeholder":{color:i.rS.formInputTextPlaceholderSelected}}},value:n,placeholder:c,onKeyDown:e=>{"Escape"===e.key&&u("")},onChange:e=>u(e.target.value)})}},61947:function(e,t,n){"use strict";n.d(t,{Z:function(){return ct}});var r=n(83017),o=n.t(r,2);function i(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function a(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function l(e){return"boolean"===typeof e}function s(e){return!(!e||"[object Function]"!={}.toString.call(e))}function u(e){return"string"===typeof e}function c(e,t){if(null!=e)if(s(e))e(t);else try{e.current=t}catch(n){throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useCallback)((e=>{for(let n of t)c(n,e)}),t)}function f(e){return i()?e?e.ownerDocument:document:null}function h(e,t){let n=r.createContext(t);return n.displayName=e,n}function p(e){return"which"in e?3===e.which:"button"in e&&2===e.button}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e=>null!=e)).join("--")}function m(){}function y(e){const t=(0,r.useRef)();return t.current||(t.current={v:e()}),t.current.v}function v(){let[,e]=(0,r.useState)(Object.create(null));return(0,r.useCallback)((()=>{e(Object.create(null))}),[])}var b=i()?r.useLayoutEffect:r.useEffect;function w(e,t){let n=(0,r.useRef)(t);return e((()=>{n.current=t})),(0,r.useCallback)((function(){n.current&&n.current(...arguments)}),[])}var x=!1,S=0;function k(){return++S}var C=o["useId".toString()];function j(e){if(void 0!==C){let t=C();return e??t}let t=e??(x?k():null),[n,o]=r.useState(t);return b((()=>{null===n&&o(k())}),[]),r.useEffect((()=>{!1===x&&(x=!0)}),[]),e??n??void 0}var E=n(46214),T=e=>{let{children:t,type:n="reach-portal",containerRef:o}=e,i=r.useRef(null),a=r.useRef(null),l=v();return r.useEffect((()=>{null!=o&&("object"===typeof o&&"current"in o?null==o.current&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."):console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."))}),[o]),b((()=>{if(!i.current)return;let e=i.current.ownerDocument,t=(null===o||void 0===o?void 0:o.current)||e.body;return a.current=null===e||void 0===e?void 0:e.createElement(n),t.appendChild(a.current),l(),()=>{a.current&&t&&t.removeChild(a.current)}}),[n,l,o]),a.current?(0,E.createPortal)(t,a.current):r.createElement("span",{ref:i})},O=e=>{let{unstable_skipInitialRender:t,...n}=e,[o,i]=r.useState(!1);return r.useEffect((()=>{t&&i(!0)}),[t]),t&&!o?null:r.createElement(T,{...n})};O.displayName="Portal";var I,D=["bottom","height","left","right","top","width"],_=new Map,A=function e(){var t=[];_.forEach((function(e,n){var r=n.getBoundingClientRect();(function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),D.some((function(n){return e[n]!==t[n]}))})(r,e.rect)&&(e.rect=r,t.push(e))})),t.forEach((function(e){e.callbacks.forEach((function(t){return t(e.rect)}))})),I=window.requestAnimationFrame(e)};var Z=function(e,t){return{observe:function(){var n=0===_.size;_.has(e)?_.get(e).callbacks.push(t):_.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),n&&A()},unobserve:function(){var n=_.get(e);if(n){var r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||_.delete(e),_.size||cancelAnimationFrame(I)}}}};function P(e,t,n){let o,i;l(t)?o=t:(o=(null===t||void 0===t?void 0:t.observe)??!0,i=null===t||void 0===t?void 0:t.onChange),s(n)&&(i=n),r.useEffect((()=>{l(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")}),[t]),r.useEffect((()=>{s(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")}),[n]);let[a,u]=r.useState(e.current),c=r.useRef(!1),d=r.useRef(!1),[f,h]=r.useState(null),p=r.useRef(i);return b((()=>{p.current=i,e.current!==a&&u(e.current)})),b((()=>{a&&!c.current&&(c.current=!0,h(a.getBoundingClientRect()))}),[a]),b((()=>{if(!o)return;let t=a;if(d.current||(d.current=!0,t=e.current),!t)return void console.warn("You need to place the ref");let n=Z(t,(e=>{var t;null===(t=p.current)||void 0===t||t.call(p,e),h(e)}));return n.observe(),()=>{n.unobserve()}}),[o,a,e]),f}var R=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],M=R.join(","),N="undefined"===typeof Element,L=N?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,B=!N&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},F=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(M));return t&&L.call(e,M)&&r.unshift(e),r=r.filter(n)},W=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scope:a,candidates:s})}else{L.call(a,M)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var u=a.shadowRoot||"function"===typeof r.getShadowRoot&&r.getShadowRoot(a),c=!r.shadowRootFilter||r.shadowRootFilter(a);if(u&&c){var d=e(!0===u?a.children:u.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scope:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},U=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},z=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},H=function(e){return"INPUT"===e.tagName},V=function(e){return function(e){return H(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||B(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!==typeof window&&"undefined"!==typeof window.CSS&&"function"===typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},$=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},q=function(e,t){return!(t.disabled||function(e){return H(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=L.call(e,"details>summary:first-of-type")?e.parentElement:e;if(L.call(o,"details:not([open]) *"))return!0;var i=B(e).host,a=(null===i||void 0===i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return $(e)}else{if("function"===typeof r){for(var l=e;e;){var s=e.parentElement,u=B(e);if(s&&!s.shadowRoot&&!0===r(s))return $(e);e=e.assignedSlot?e.assignedSlot:s||u===e.ownerDocument?s:u.host}e=l}if(a)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!L.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Y=function(e,t){return!(V(t)||U(t)<0||!q(e,t))},G=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},K=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,a=i?t.scope:t,l=U(a,i),s=i?e(t.candidates):a;0===l?i?n.push.apply(n,s):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})})),r.sort(z).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Q=function(e,t){var n;return n=(t=t||{}).getShadowRoot?W([e],t.includeContainer,{filter:Y.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:G}):F(e,t.includeContainer,Y.bind(null,t)),K(n)},X=r.forwardRef((function(e,t){let{unstable_skipInitialPortalRender:n,...o}=e;return r.createElement(O,{unstable_skipInitialRender:n},r.createElement(J,{ref:t,...o}))}));X.displayName="Popover";var J=r.forwardRef((function(e,t){let{as:n="div",targetRef:o,position:i=re,unstable_observableRefs:a=[],...l}=e;const s=r.useRef(null),u=P(s,{observe:!l.hidden}),c=P(o,{observe:!0}),h=d(s,t);return function(e,t){const n=f(e.current);function o(e){"Tab"===e.key&&t.current&&0===Q(t.current).length||("Tab"===e.key&&e.shiftKey?c(e)?d(e):h(e)?p(e):m(e)&&v():"Tab"===e.key&&(a()?l(e):s()?u(e):g(e)&&v()))}function i(){const r=Q(n),o=r&&e.current?r.indexOf(e.current):-1,i=r&&r[o+1];return(!t.current||!t.current.contains(i||null))&&i}function a(){return!!e.current&&e.current===n.activeElement}function l(e){const n=t.current&&Q(t.current);n&&n[0]&&(e.preventDefault(),n[0].focus())}function s(){if(!!t.current&&t.current.contains(n.activeElement||null)){const e=t.current&&Q(t.current);return Boolean(e&&e[e.length-1]===n.activeElement)}return!1}function u(e){const t=i();t&&(e.preventDefault(),t.focus())}function c(e){if(!e.shiftKey)return;const t=i();return e.target===t}function d(e){const n=t.current&&Q(t.current),r=n&&n[n.length-1];r&&(e.preventDefault(),r.focus())}function h(e){const n=t.current&&Q(t.current);return!!n&&(0!==n.length&&e.target===n[0])}function p(t){var n;t.preventDefault(),null===(n=e.current)||void 0===n||n.focus()}function g(e){const r=t.current?Q(n).filter((e=>!t.current.contains(e))):null;return!!r&&e.target===r[r.length-1]}function m(e){return e.target===Q(n)[0]}r.useEffect((()=>(n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)})),[]);let y=[];function v(){const e=t.current&&Q(t.current);e&&(e.forEach((e=>{y.push([e,e.tabIndex]),e.tabIndex=-1})),n.addEventListener("focusin",b))}function b(){n.removeEventListener("focusin",b),y.forEach((e=>{let[t,n]=e;t.tabIndex=n}))}}(o,s),r.createElement(n,{"data-reach-popover":"",ref:h,...l,style:{position:"absolute",...ee(i,c,u,...a),...l.style}})}));function ee(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return n?e(t,n,...o.map((e=>e.current))):{visibility:"hidden"}}function te(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}J.displayName="PopoverImpl";var ne,re=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=ie(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...te(e,t,r)}},oe=(e,t)=>{if(!e||!t)return{};const{directionUp:n}=ie(e,t);return{width:e.width,left:e.left,...te(e,t,n)}};function ie(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};return{directionRight:o.right&&!o.left,directionLeft:o.left&&!o.right,directionUp:o.bottom&&!o.top,directionDown:o.top&&!o.bottom}}function ae(e){let{context:t,children:n,items:o,set:i}=e,a=r.useCallback((e=>{let{element:t,index:n,...r}=e;return t?(i((e=>{if(null!=n&&-1!==n)return se(e,{element:t,index:n,...r},n);if(0===e.length)return[{...r,element:t,index:0}];if(e.find((e=>e.element===t)))return console.warn("[reach-ui]: `useDescendant` was called with an element that was already registered.\n\nIf you are using the `@reach/descendants` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app.\n\nIf you are using another `reach-ui` package, this is probably our bug!\n\nTo report a bug, open a new issue:\n\n https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md\n\nIMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed."),function(e){return e.sort(((e,t)=>e.element&&t.element?le(e.element,t.element)?-1:1:0)).map(((e,t)=>({...e,index:t})))}(e);let o,i=function(e,t){if(!t)return-1;if(!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(r&&le(r,t))return n+1}return-1}(e,t);return o=-1===i?[...e,{...r,element:t,index:e.length}]:se(e,{...r,element:t,index:i},i),o})),()=>{t&&i((e=>e.filter((e=>t!==e.element))))}):m}),[]);return r.createElement(t.Provider,{value:r.useMemo((()=>({descendants:o,registerDescendant:a})),[o,a])},n)}function le(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function se(e,t,n){return null!=n&&n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(ne||(ne={}));var ue={type:"xstate.init"};function ce(e){return void 0===e?[]:[].concat(e)}function de(e){return{type:"xstate.assign",assignment:e}}function fe(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function he(e){return function(t){return e===t}}function pe(e){return"string"==typeof e?{type:e}:e}function ge(e,t){return{value:e,context:t,actions:[],changed:!1,matches:he(e)}}var me=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function ye(e,t,n){let o=r.useRef(e),i=y((()=>function(e){var t=e.initialState,n=ne.NotStarted,r=new Set,o={_machine:e,send:function(o){n===ne.Running&&(t=e.transition(t,o),me(t,pe(o)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=ne.Running,me(t,ue),o},stop:function(){return n=ne.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}(o.current).start())),a=r.useRef(null),[l,s]=r.useState((()=>(e=>{let t;return e.subscribe((e=>{t=e})).unsubscribe(),t})(i))),c=r.useCallback((e=>{let r=u(e)?{type:e}:e,o=function(e){return Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return e[n]=r.current,e}),{})}(t);i.send({...r,lastEventType:a.current,refs:o}),a.current=r.type,n&&(console.group("Event Sent"),console.log("Event:",r),console.groupEnd())}),[n]);r.useEffect((()=>(i.subscribe((function(e){e.changed&&s(e)})),()=>{i.stop()})),[i]),r.useEffect((()=>{n&&l.changed&&(console.group("State Updated"),console.log("State:",l),console.groupEnd())}),[n,l]);return[r.useMemo((()=>({...l,matches:e=>e===l.value})),[l.changed,l.context,l.value]),c,i]}function ve(e,t){return y((()=>function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:ce(e.states[e.initial].entry).map((function(e){return fe(e,t.actions)})),context:e.context,matches:he(e.initial)},transition:function(t,r){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,l=a.value,s=a.context,u=pe(r),c=e.states[l];if(c.on){var d=ce(c.on[u.type]),f=function(t){if(void 0===t)return{value:ge(l,s)};var r="string"==typeof t?{target:t}:t,o=r.target,i=void 0===o?l:o,a=r.actions,d=void 0===a?[]:a,f=r.cond,h=s;if((void 0===f?function(){return!0}:f)(s,u)){var p=e.states[i],g=!1,m=[].concat(c.exit,d,p.entry).filter((function(e){return e})).map((function(e){return fe(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){g=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,u):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,u):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:i,context:h,actions:m,changed:i!==l||m.length>0||g,matches:he(i)}}}};try{for(var h=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),p=h.next();!p.done;p=h.next()){var g=f(p.value);if("object"==typeof g)return g.value}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}}return ge(l,s)}};return n}(e,t)))}var be=de({navigationValue:null}),we=de({typeaheadQuery:null}),xe=de({value:(e,t)=>t.value}),Se=de({value:(e,t)=>e.initialValue}),ke=de({navigationValue:(e,t)=>t.value}),Ce=de({navigationValue:e=>{let t=(n=e.value,r=e.options,n?r.find((e=>e.value===n)):void 0);var n,r,o;return t&&!t.disabled?e.value:(null===(o=e.options.find((e=>!e.disabled)))||void 0===o?void 0:o.value)||null}});function je(e,t){if("BLUR"===t.type){let{list:e,popover:n}=t.refs,{relatedTarget:r}=t,o=f(n);return!((null===o||void 0===o?void 0:o.activeElement)===e||!n||n.contains(r||(null===o||void 0===o?void 0:o.activeElement)))}return!1}function Ee(e,t){if("OUTSIDE_MOUSE_DOWN"===t.type||"OUTSIDE_MOUSE_UP"===t.type){let{button:e,popover:n}=t.refs,{relatedTarget:r}=t;return!(r===e||!e||e.contains(r)||!n||n.contains(r))}return!1}function Te(e,t){return!!e.options.find((t=>t.value===e.navigationValue))}function Oe(e,t){let{popover:n,list:r}=t.refs,{relatedTarget:o}=t;return!(n&&o&&n.contains(o)&&o!==r)&&Te(e)}function Ie(e,t){requestAnimationFrame((()=>{t.refs.list&&t.refs.list.focus()}))}function De(e,t){t.refs.button&&t.refs.button.focus()}function _e(e,t){return!t.disabled}function Ae(e,t){return"isControlled"in t&&!t.isControlled}function Ze(e,t){return"OPTION_TOUCH_START"!==t.type||!t||!t.disabled}function Pe(e,t){return(!("disabled"in t)||!t.disabled)&&("value"in t?null!=t.value:null!=e.navigationValue)}function Re(e,t){t.callback&&t.callback(t.value)}function Me(e,t){if("KEY_DOWN_ENTER"!==t.type)return;let{hiddenInput:n}=t.refs;if(n&&n.form){let e=n.form.querySelector("button:not([type]),[type='submit']");e&&e.click()}}var Ne=de({typeaheadQuery:(e,t)=>(e.typeaheadQuery||"")+t.query}),Le=de({value:(e,t)=>{if("UPDATE_AFTER_TYPEAHEAD"===t.type&&t.query){let n=We(e.options,t.query);if(n&&!n.disabled)return t.callback&&t.callback(n.value),n.value}return e.value}}),Be=de({navigationValue:(e,t)=>{if("UPDATE_AFTER_TYPEAHEAD"===t.type&&t.query){let n=We(e.options,t.query);if(n&&!n.disabled)return n.value}return e.navigationValue}}),Fe={GET_DERIVED_DATA:{actions:de(((e,t)=>({...e,...t.data})))},VALUE_CHANGE:{actions:[xe,Re]}};function We(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return null;return e.find((e=>!e.disabled&&e.label&&e.label.toLowerCase().startsWith(t.toLowerCase())))||null}var Ue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.createContext({descendants:[],registerDescendant:()=>m,...t});return n.displayName=e,n}("ListboxDescendantContext"),ze=h("ListboxContext",{}),He=h("ListboxGroupContext",{}),Ve=r.forwardRef((function(e,t){let{as:n="div","aria-labelledby":o,"aria-label":i,children:a,defaultValue:l,disabled:u=!1,form:c,name:f,onChange:h,required:p,value:m,__componentName:y="ListboxInput",...v}=e,w=r.useRef(null!=m),[x,S]=r.useState([]),k=r.useRef(null),C=r.useRef(null),E=r.useRef(null),T=r.useRef(null),O=r.useRef(null),I=r.useRef(null),D=r.useRef(null),_=ve((e=>{let{value:t}=e;return{id:"listbox",initial:"IDLE",context:{initialValue:t,value:t,options:[],navigationValue:null,typeaheadQuery:null},states:{IDLE:{on:{...Fe,BUTTON_MOUSE_DOWN:{target:"OPEN",actions:[Ce],cond:_e},KEY_DOWN_SPACE:{target:"NAVIGATING",actions:[Ce,Ie],cond:_e},KEY_DOWN_SEARCH:{target:"IDLE",actions:Ne,cond:_e},UPDATE_AFTER_TYPEAHEAD:{target:"IDLE",actions:[Le],cond:_e},CLEAR_TYPEAHEAD:{target:"IDLE",actions:we},KEY_DOWN_NAVIGATE:{target:"NAVIGATING",actions:[Ce,we,Ie],cond:_e},KEY_DOWN_ENTER:{actions:[Me],cond:_e},RESET_VALUE:{actions:[Se,Re],cond:Ae}}},INTERACTING:{entry:[be],on:{...Fe,CLEAR_NAV_SELECTION:{actions:[be,Ie]},KEY_DOWN_ENTER:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},KEY_DOWN_SPACE:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},BUTTON_MOUSE_DOWN:{target:"IDLE",actions:[De]},KEY_DOWN_ESCAPE:{target:"IDLE",actions:[De]},OPTION_MOUSE_DOWN:{target:"DRAGGING"},OUTSIDE_MOUSE_DOWN:[{target:"IDLE",cond:Ee,actions:we},{target:"DRAGGING",actions:we,cond:Te}],OUTSIDE_MOUSE_UP:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te},{target:"INTERACTING",actions:we}],KEY_DOWN_ENTER:"INTERACTING",BLUR:[{target:"IDLE",cond:je,actions:we},{target:"NAVIGATING",cond:Oe},{target:"INTERACTING",actions:we}],OPTION_TOUCH_START:{target:"NAVIGATING",actions:[ke,we],cond:Ze},OPTION_CLICK:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_PRESS:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_MOUSE_ENTER:{target:"NAVIGATING",actions:[ke,we],cond:Ze},KEY_DOWN_NAVIGATE:{target:"NAVIGATING",actions:[ke,we,Ie]}}},OPEN:{on:{...Fe,CLEAR_NAV_SELECTION:{actions:[be]},KEY_DOWN_ENTER:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},KEY_DOWN_SPACE:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},BUTTON_MOUSE_DOWN:{target:"IDLE",actions:[De]},KEY_DOWN_ESCAPE:{target:"IDLE",actions:[De]},OPTION_MOUSE_DOWN:{target:"DRAGGING"},OUTSIDE_MOUSE_DOWN:[{target:"IDLE",cond:Ee,actions:we},{target:"DRAGGING",cond:Te},{target:"INTERACTING",actions:we}],OUTSIDE_MOUSE_UP:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te},{target:"INTERACTING",actions:we}],BLUR:[{target:"IDLE",cond:je,actions:we},{target:"NAVIGATING",cond:Oe},{target:"INTERACTING",actions:we}],BUTTON_MOUSE_UP:{target:"NAVIGATING",actions:[Ce,Ie]},LIST_MOUSE_UP:{target:"NAVIGATING",actions:[Ce,Ie]},OPTION_TOUCH_START:{target:"NAVIGATING",actions:[ke,we],cond:Ze},OPTION_CLICK:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_PRESS:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},KEY_DOWN_NAVIGATE:{target:"NAVIGATING",actions:[ke,we,Ie]},KEY_DOWN_SEARCH:{target:"NAVIGATING",actions:Ne},UPDATE_AFTER_TYPEAHEAD:{actions:[Be]},CLEAR_TYPEAHEAD:{actions:we},OPTION_MOUSE_MOVE:[{target:"DRAGGING",actions:[ke],cond:Ze},{target:"DRAGGING"}]}},DRAGGING:{on:{...Fe,CLEAR_NAV_SELECTION:{actions:[be]},KEY_DOWN_ENTER:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},KEY_DOWN_SPACE:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},BUTTON_MOUSE_DOWN:{target:"IDLE",actions:[De]},KEY_DOWN_ESCAPE:{target:"IDLE",actions:[De]},OPTION_MOUSE_DOWN:{target:"DRAGGING"},OUTSIDE_MOUSE_DOWN:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te},{target:"INTERACTING",actions:we}],OUTSIDE_MOUSE_UP:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te,actions:Ie},{target:"INTERACTING",actions:[we,Ie]}],BLUR:[{target:"IDLE",cond:je,actions:we},{target:"NAVIGATING",cond:Oe},{target:"INTERACTING",actions:we}],BUTTON_MOUSE_UP:{target:"NAVIGATING",actions:[Ce,Ie]},OPTION_TOUCH_START:{target:"NAVIGATING",actions:[ke,we],cond:Ze},OPTION_CLICK:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_PRESS:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_MOUSE_ENTER:{target:"DRAGGING",actions:[ke,we],cond:Ze},KEY_DOWN_NAVIGATE:{target:"NAVIGATING",actions:[ke,we,Ie]},KEY_DOWN_SEARCH:{target:"NAVIGATING",actions:Ne},UPDATE_AFTER_TYPEAHEAD:{actions:[Be]},CLEAR_TYPEAHEAD:{actions:we},OPTION_MOUSE_MOVE:[{target:"NAVIGATING",actions:[ke],cond:Ze},{target:"NAVIGATING"}],OPTION_MOUSE_UP:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe}}},NAVIGATING:{on:{...Fe,CLEAR_NAV_SELECTION:{actions:[be,Ie]},KEY_DOWN_ENTER:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},KEY_DOWN_SPACE:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},BUTTON_MOUSE_DOWN:{target:"IDLE",actions:[De]},KEY_DOWN_ESCAPE:{target:"IDLE",actions:[De]},OPTION_MOUSE_DOWN:{target:"DRAGGING"},OUTSIDE_MOUSE_DOWN:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te},{target:"INTERACTING",actions:we}],OUTSIDE_MOUSE_UP:[{target:"IDLE",cond:Ee,actions:we},{target:"NAVIGATING",cond:Te},{target:"INTERACTING",actions:we}],BLUR:[{target:"IDLE",cond:je,actions:we},{target:"NAVIGATING",cond:Oe},{target:"INTERACTING",actions:we}],BUTTON_MOUSE_UP:{target:"NAVIGATING",actions:[Ce,Ie]},OPTION_TOUCH_START:{target:"NAVIGATING",actions:[ke,we],cond:Ze},OPTION_CLICK:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_PRESS:{target:"IDLE",actions:[xe,we,De,Re],cond:Pe},OPTION_MOUSE_ENTER:{target:"NAVIGATING",actions:[ke,we],cond:Ze},KEY_DOWN_NAVIGATE:{target:"NAVIGATING",actions:[ke,we,Ie]},KEY_DOWN_SEARCH:{target:"NAVIGATING",actions:Ne},UPDATE_AFTER_TYPEAHEAD:{actions:[Be]},CLEAR_TYPEAHEAD:{actions:we},OPTION_MOUSE_MOVE:[{target:"NAVIGATING",actions:[ke],cond:Ze},{target:"NAVIGATING"}]}}}}})({value:(w.current?m:l)||null})),[A,Z]=ye(_,{button:k,hiddenInput:C,highlightedOption:E,input:T,list:O,popover:I,selectedOption:D},false);let P=j(v.id),R=v.id||g("listbox-input",P),M=d(T,t),N=r.useMemo((()=>{let e=x.find((e=>e.value===A.context.value));return e?e.label:null}),[x,A.context.value]),L=function(e){return["NAVIGATING","OPEN","DRAGGING","INTERACTING"].includes(e)}(A.value),B={ariaLabel:i,ariaLabelledBy:o,buttonRef:k,disabled:u,highlightedOptionRef:E,isExpanded:L,listboxId:R,listboxValueLabel:N,listRef:O,onValueChange:function(e){e!==A.context.value&&(null===h||void 0===h||h(e))},popoverRef:I,selectedOptionRef:D,send:Z,state:A.value,stateData:A.context},F=r.useRef(!1);if(!w.current&&null==l&&!F.current&&x.length){F.current=!0;let e=x.find((e=>!e.disabled));e&&e.value&&Z({type:"VALUE_CHANGE",value:e.value})}return function(e,t,n){{let o=(0,r.useRef)(null!=e),i=(0,r.useRef)({componentName:n,controlledPropName:t});(0,r.useEffect)((()=>{i.current={componentName:n,controlledPropName:t}}),[n,t]),(0,r.useEffect)((()=>{let{current:t}=o,{componentName:n,controlledPropName:r}=i.current;t!==(null!=e)&&console.error(`A component is changing an ${t?"":"un"}controlled \`${r}\` state of ${n} to be ${t?"un":""}controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.\n More info: https://fb.me/react-controlled-components`)}),[e])}}(m,"value",y),function(e,t,n){let{current:o}=r.useRef(null!=e);o&&e!==t&&n()}(m,A.context.value,(()=>{Z({type:"VALUE_CHANGE",value:m})})),b((()=>{Z({type:"GET_DERIVED_DATA",data:{options:x}})}),[x,Z]),r.useEffect((()=>{function e(e){let{target:t,relatedTarget:n}=e;it(I.current,t)||Z({type:"OUTSIDE_MOUSE_DOWN",relatedTarget:n||t})}return L&&window.addEventListener("mousedown",e),()=>{window.removeEventListener("mousedown",e)}}),[Z,L]),r.useEffect((()=>{function e(e){let{target:t,relatedTarget:n}=e;it(I.current,t)||Z({type:"OUTSIDE_MOUSE_UP",relatedTarget:n||t})}return L&&window.addEventListener("mouseup",e),()=>{window.removeEventListener("mouseup",e)}}),[Z,L]),r.useEffect((()=>{var e;let t=null===(e=C.current)||void 0===e?void 0:e.form;if(t)return t.addEventListener("reset",n),()=>{null===t||void 0===t||t.removeEventListener("reset",n)};function n(e){Z({type:"RESET_VALUE",isControlled:w.current})}}),[T,w,Z]),r.createElement(n,{...v,ref:M,"data-reach-listbox-input":"","data-state":L?"expanded":"closed","data-value":A.context.value,id:R},r.createElement(ze.Provider,{value:B},r.createElement(ae,{context:Ue,items:x,set:S},s(a)?a({id:R,isExpanded:L,value:A.context.value,selectedOptionRef:D,highlightedOptionRef:E,valueLabel:N,expanded:L}):a,(c||f||p)&&r.createElement("input",{ref:C,"data-reach-listbox-hidden-input":"",disabled:u,form:c,name:f,readOnly:!0,required:p,tabIndex:-1,type:"hidden",value:A.context.value||""}))))}));Ve.displayName="ListboxInput";var $e=r.forwardRef((function(e,t){let{arrow:n="\u25bc",button:o,children:i,portal:a=!0,...l}=e;return r.createElement(Ve,{...l,__componentName:"Listbox",ref:t},(e=>{let{value:t,valueLabel:l}=e;return r.createElement(r.Fragment,null,r.createElement(Ye,{arrow:n,children:o?s(o)?o({value:t,label:l}):o:void 0}),r.createElement(Xe,{portal:a},r.createElement(Je,null,i)))}))}));$e.displayName="Listbox";var qe=r.forwardRef((function(e,t){let{"aria-label":n,arrow:o=!1,as:i="span",children:u,onKeyDown:c,onMouseDown:f,onMouseUp:h,...m}=e,{buttonRef:y,send:v,ariaLabelledBy:b,disabled:w,isExpanded:x,listboxId:S,stateData:k,listboxValueLabel:C}=r.useContext(ze),j=k.value,E=d(y,t),T=rt();let O=g("button",S),I=r.useMemo((()=>u?s(u)?u({isExpanded:x,label:C,value:j,expanded:x}):u:C),[u,C,x,j]);return r.createElement(i,{"aria-disabled":w||void 0,"aria-expanded":x||void 0,"aria-haspopup":"listbox","aria-labelledby":n?void 0:[b,O].filter(Boolean).join(" "),"aria-label":n,role:"button",tabIndex:w?-1:0,...m,ref:E,"data-reach-listbox-button":"",id:O,onKeyDown:a(c,T),onMouseDown:a(f,(function(e){p(e.nativeEvent)||(e.preventDefault(),e.stopPropagation(),v({type:"BUTTON_MOUSE_DOWN",disabled:w}))})),onMouseUp:a(h,(function(e){p(e.nativeEvent)||(e.preventDefault(),e.stopPropagation(),v({type:"BUTTON_MOUSE_UP"}))}))},I,o&&r.createElement(Ke,null,l(o)?null:o))}));qe.displayName="ListboxButton";var Ye=r.memo(qe),Ge=r.forwardRef((function(e,t){let{as:n="span",children:o,...i}=e,{isExpanded:a}=r.useContext(ze);return r.createElement(n,{"aria-hidden":!0,...i,ref:t,"data-reach-listbox-arrow":"","data-expanded":a?"":void 0},s(o)?o({isExpanded:a,expanded:a}):o||"\u25bc")}));Ge.displayName="ListboxArrow";var Ke=r.memo(Ge),Qe=r.forwardRef((function(e,t){let{as:n="div",position:o=oe,onBlur:i,onKeyDown:l,onMouseUp:s,portal:u=!0,unstable_observableRefs:c,...f}=e,{isExpanded:h,buttonRef:p,popoverRef:g,send:m}=r.useContext(ze),y=d(g,t),v=rt();let b={hidden:!h,tabIndex:-1,...f,ref:y,"data-reach-listbox-popover":"",onMouseUp:a(s,(function(){m({type:"LIST_MOUSE_UP"})})),onBlur:a(i,(function(e){let{nativeEvent:t}=e;requestAnimationFrame((()=>{m({type:"BLUR",relatedTarget:t.relatedTarget||t.target})}))})),onKeyDown:a(l,v)};return u?r.createElement(X,{...b,as:n,targetRef:p,position:o,unstable_observableRefs:c,unstable_skipInitialPortalRender:!0}):r.createElement(n,{...b})}));Qe.displayName="ListboxPopover";var Xe=r.memo(Qe),Je=r.forwardRef((function(e,t){let{as:n="ul",...o}=e,{listRef:i,ariaLabel:a,ariaLabelledBy:l,isExpanded:s,listboxId:u,stateData:{value:c,navigationValue:f}}=r.useContext(ze),h=d(t,i);return r.createElement(n,{"aria-activedescendant":ot(s?f:c),"aria-labelledby":a?void 0:l,"aria-label":a,role:"listbox",tabIndex:-1,...o,ref:h,"data-reach-listbox-list":"",id:g("listbox",u)})}));Je.displayName="ListboxList";var et=r.forwardRef((function(e,t){let{as:n="li",children:o,disabled:i,index:l,label:s,onClick:u,onMouseDown:c,onMouseEnter:f,onMouseLeave:h,onMouseMove:g,onMouseUp:m,onTouchStart:y,value:w,...x}=e,{highlightedOptionRef:S,selectedOptionRef:k,send:C,isExpanded:j,onValueChange:E,state:T,stateData:{value:O,navigationValue:I}}=r.useContext(ze),[D,_]=r.useState(s),A=s||D||"",Z=r.useRef(null),[P,R]=function(e,t){let[n,o]=(0,r.useState)(t);return[n,(0,r.useCallback)((t=>{e.current=t,o(t)}),[])]}(Z,null);!function(e,t,n){let o=v(),{registerDescendant:i,descendants:a}=r.useContext(t),l=n??a.findIndex((t=>t.element===e.element));b((()=>(e.element||o(),i({...e,index:l}))),[e,o,l,i,...Object.values(e)])}(r.useMemo((()=>({element:P,value:w,label:A,disabled:!!i})),[i,P,A,w]),Ue,l);let M=r.useCallback((e=>{!s&&e&&_((t=>e.textContent&&t!==e.textContent?e.textContent:t||""))}),[s]),N=!!I&&I===w,L=O===w,B=d(M,t,R,L?k:null,N?S:null);return r.createElement(n,{"aria-selected":(j?N:L)||void 0,"aria-disabled":i||void 0,role:"option",...x,ref:B,id:ot(w),"data-reach-listbox-option":"","data-current-nav":N?"":void 0,"data-current-selected":L?"":void 0,"data-label":A,"data-value":w,onClick:a(u,(function(e){p(e.nativeEvent)||C({type:"OPTION_CLICK",value:w,callback:E,disabled:!!i})})),onMouseDown:a(c,(function(e){p(e.nativeEvent)||(e.preventDefault(),C({type:"OPTION_MOUSE_DOWN"}))})),onMouseEnter:a(f,(function(){C({type:"OPTION_MOUSE_ENTER",value:w,disabled:!!i})})),onMouseLeave:a(h,(function(){C({type:"CLEAR_NAV_SELECTION"})})),onMouseMove:a(g,(function(){"OPEN"!==T&&I===w||C({type:"OPTION_MOUSE_MOVE",value:w,disabled:!!i})})),onMouseUp:a(m,(function(e){p(e.nativeEvent)||C({type:"OPTION_MOUSE_UP",value:w,callback:E,disabled:!!i})})),onTouchStart:a(y,(function(){C({type:"OPTION_TOUCH_START",value:w,disabled:!!i})}))},o)}));et.displayName="ListboxOption";var tt=r.forwardRef((function(e,t){let{as:n="div",label:o,children:i,...a}=e,{listboxId:l}=r.useContext(ze),s=g("label",j(a.id),l);return r.createElement(He.Provider,{value:{labelId:s}},r.createElement(n,{"aria-labelledby":s,role:"group",...a,"data-reach-listbox-group":"",ref:t},o&&r.createElement(nt,null,o),i))}));tt.displayName="ListboxGroup";var nt=r.forwardRef((function(e,t){let{as:n="span",...o}=e,{labelId:i}=r.useContext(He);return r.createElement(n,{role:"presentation",...o,ref:t,"data-reach-listbox-group-label":"",id:i})}));function rt(){let{send:e,disabled:t,onValueChange:n,stateData:{navigationValue:o,typeaheadQuery:i}}=r.useContext(ze),l=(s=Ue,r.useContext(s).descendants);var s;let c=(d=n,w(r.useEffect,d));var d;r.useEffect((()=>{i&&e({type:"UPDATE_AFTER_TYPEAHEAD",query:i,callback:c});let t=window.setTimeout((()=>{null!=i&&e({type:"CLEAR_TYPEAHEAD"})}),1e3);return()=>{window.clearTimeout(t)}}),[c,e,i]);let f=l.findIndex((e=>{let{value:t}=e;return t===o})),h=a((function(r){let{key:i}=r,a=u(i)&&1===i.length,s=l.find((e=>e.value===o));switch(i){case"Enter":return void e({type:"KEY_DOWN_ENTER",value:o,callback:n,disabled:!!(null!==s&&void 0!==s&&s.disabled||t)});case" ":return r.preventDefault(),void e({type:"KEY_DOWN_SPACE",value:o,callback:n,disabled:!!(null!==s&&void 0!==s&&s.disabled||t)});case"Escape":return void e({type:"KEY_DOWN_ESCAPE"});case"Tab":let l=r.shiftKey?"KEY_DOWN_SHIFT_TAB":"KEY_DOWN_TAB";return void e({type:l});default:return void(a&&e({type:"KEY_DOWN_SEARCH",query:i,disabled:t}))}}),function(e,t){let{descendants:n}=r.useContext(e),{callback:o,currentIndex:i,filter:a,key:l="index",orientation:s="vertical",rotate:u=!0,rtl:c=!1}=t;return function(e){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(e.key))return;let t=i??-1,r=a?n.filter(a):n;if(!r.length)return;let d=r.findIndex((e=>e.index===i));function f(){return t===g().index?u?p():r[d]:r[(d+1)%r.length]}function h(){return t===p().index?u?g():r[d]:r[(d-1+r.length)%r.length]}function p(){return r[0]}function g(){return r[r.length-1]}switch(e.key){case"ArrowDown":if("vertical"===s||"both"===s){e.preventDefault();let t=f();o("option"===l?t:t[l])}break;case"ArrowUp":if("vertical"===s||"both"===s){e.preventDefault();let t=h();o("option"===l?t:t[l])}break;case"ArrowLeft":if("horizontal"===s||"both"===s){e.preventDefault();let t=(c?f:h)();o("option"===l?t:t[l])}break;case"ArrowRight":if("horizontal"===s||"both"===s){e.preventDefault();let t=(c?h:f)();o("option"===l?t:t[l])}break;case"PageUp":e.preventDefault();let t=(e.ctrlKey?h:p)();o("option"===l?t:t[l]);break;case"Home":e.preventDefault();let n=p();o("option"===l?n:n[l]);break;case"PageDown":e.preventDefault();let r=(e.ctrlKey?f:g)();o("option"===l?r:r[l]);break;case"End":e.preventDefault();let i=g();o("option"===l?i:i[l])}}}(Ue,{currentIndex:f,orientation:"vertical",key:"index",rotate:!0,filter:e=>!e.disabled,callback(n){e({type:"KEY_DOWN_NAVIGATE",value:l[n].value,disabled:t})}}));return h}function ot(e){let{listboxId:t}=r.useContext(ze);return e?g(`option-${e}`,t):void 0}function it(e,t){return!(!e||!e.contains(t))}nt.displayName="ListboxGroupLabel";var at=n(86634),lt=n(89220),st=n(53819),ut=n(28993);function ct(e){let{options:t,value:n,defaultLabel:r="",onChange:o,style:i,wrapperStyle:a,line:l,disabledKeys:s=[]}=e;const u=t.filter((e=>e[0]===n));return(0,ut.jsxs)(Ve,{value:n,onChange:o,style:{lineHeight:"1em",...a},children:[(0,ut.jsx)(Ye,{...(0,at.iv)([{borderWidth:0,padding:"2px 5px",borderRadius:4},i]),arrow:(0,ut.jsx)(lt.Z,{style:{width:7,height:7}}),children:(0,ut.jsx)("span",{style:{display:"flex",overflowX:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"calc(100% - 12px)",minHeight:"18px",alignItems:"center"},children:0!==u.length?u[0][1]:r})}),(0,ut.jsx)(Xe,{style:{zIndex:1e4,outline:0,borderRadius:4},children:l?(0,ut.jsxs)(Je,{style:{maxHeight:250,overflowY:"auto"},children:[t.slice(0,l).map((e=>{let[t,n]=e;return(0,ut.jsx)(et,{value:t,disabled:s.includes(t),children:n},t)})),(0,ut.jsx)("div",{style:{padding:"2px",marginTop:5,borderTop:"1px solid "+st.O9.pK}}),t.slice(l,t.length).map((e=>{let[t,n]=e;return(0,ut.jsx)(et,{value:t,disabled:s.includes(t),children:n},t)}))]}):(0,ut.jsx)(Je,{style:{maxHeight:250,overflowY:"auto"},children:t.map((e=>{let[t,n]=e;return(0,ut.jsx)(et,{value:t,disabled:s.includes(t),children:n},t)}))})})]})}},99884:function(e,t,n){"use strict";var r=n(83017),o=n(10666),i=n(91743),a=n(28993);function l(e,t){return r.Children.toArray(t).reduce(((t,n)=>n?"object"===typeof n&&"type"in n&&n.type===r.Fragment?t.concat(l(n.key,n.props.children)):(t.push({key:e+n.key,child:n}),t):t),[])}const s=(0,r.forwardRef)(((e,t)=>{let{direction:n="column",align:s,justify:u,spacing:c=3,children:d,debug:f,style:h,...p}=e;const g=n.endsWith("reverse"),m=n.startsWith("row"),y=l("",d);return(0,a.jsx)(i.Z,{style:[{flexDirection:n,alignItems:s,justifyContent:u},h],innerRef:t,...p,children:y.map(((e,t)=>{let n,{key:i,child:l}=e,s=y.length===t+1;return n=m?g?"marginLeft":"marginRight":g?"marginTop":"marginBottom",(0,r.cloneElement)("string"===typeof l?(0,a.jsx)(o.Z,{children:l}):l,{key:i,style:[f&&{borderWidth:1,borderColor:"red"},s?null:{[n]:5*c},l.props?l.props.style:null]})}))})}));t.Z=s},10666:function(e,t,n){"use strict";n(83017);var r=n(86634),o=n(28993);t.Z=e=>{const{style:t,innerRef:n,...i}=e;return(0,o.jsx)("span",{...i,ref:n,className:String((0,r.iv)([e.className,e.style]))})}},91743:function(e,t,n){"use strict";n(83017);var r=n(86634),o=n(28993);t.Z=e=>{const{style:t,nativeStyle:n,innerRef:i,...a}=e;return(0,o.jsx)("div",{...a,ref:i,style:n,className:`view ${(0,r.iv)([e.className,e.style])}`})}},36717:function(e,t,n){"use strict";n.d(t,{Wi:function(){return c},XZ:function(){return d},eX:function(){return s},lX:function(){return u}});n(83017);var r=n(86634),o=n(53819),i=n(10666),a=n(91743),l=n(28993);const s=e=>{let{title:t,style:n}=e;return(0,l.jsx)(a.Z,{style:[{fontWeight:500,textTransform:"uppercase",color:o.O9.b3,marginBottom:5,lineHeight:"1em"},n],children:t})},u=e=>{let{style:t,title:n,id:r,htmlFor:a}=e;return(0,l.jsx)(i.Z,{style:[{fontSize:13,marginBottom:3,color:o.O9.n3},t],children:(0,l.jsx)("label",{htmlFor:a,id:r,children:n})})},c=e=>{let{style:t,children:n}=e;return(0,l.jsx)(a.Z,{style:t,children:n})},d=e=>(0,l.jsx)("input",{type:"checkbox",...e,...(0,r.iv)([{position:"relative",margin:0,marginRight:6,width:15,height:15,appearance:"none",outline:0,border:"1px solid #d0d0d0",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",color:"white",backgroundColor:"white",":checked":{border:"1px solid "+o.O9.b6,backgroundColor:o.O9.b6,"::after":{display:"block",background:o.O9.b6+' url(\'data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="white" d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>\') 9px 9px',width:9,height:9,content:" "}},"&.focus-visible:focus":{"::before":{position:"absolute",top:-5,bottom:-5,left:-5,right:-5,border:"2px solid "+o.O9.b5,borderRadius:6,content:" "}}}],e.style)})},97117:function(e,t,n){"use strict";n.d(t,{Jz:function(){return P},Wy:function(){return Z},ZP:function(){return q}});var r=n(83017),o=n(71274),i=n(98297),a=n(33865),l=n(99121),s=n(97156),u=n(24917),c=n(80837),d=n(69585),f=n(95058),h=n(77292),p=n(99716),g=n(22101),m=n(53819),y=n(13743),v=n(42131),b=n(61947),w=n(99884),x=n(10666),S=n(91743),k=n(21912),C=n(83679),j=n(39432),E=n(41218),T=n(64652),O=n(99446),I=n(28993);function D(e,t,n){return e.map((e=>e===t?n():e))}function _(e,t){return e.map(((e,n)=>({...e,error:t[n]})))}function A(e,t){let n=["date"];return e.find((e=>"imported_payee"===e.field))&&n.push("imported_payee"),n.push("payee"),t.find((e=>"category"===e.field))?n.push("category"):t.length>0&&!["payee","date","amount"].includes(t[0].field)&&n.push(t[0].field),n.push("amount"),n}function Z(e){let{fields:t,style:n,value:r,onChange:o}=e;return(0,I.jsx)(S.Z,{style:n,children:(0,I.jsx)(b.Z,{options:t,value:r,onChange:e=>o("field",e),style:{color:m.O9.p4}})})}function P(e){let t,{ops:n,type:r,style:o,value:i,formatOp:a=c.w8,onChange:l}=e;return"id"===r&&(n=n.filter((e=>"contains"!==e&&"doesNotContain"!==e)),t=n.length/2),"string"===r&&(t=n.length/2),(0,I.jsx)(b.Z,{options:n.map((e=>[e,a(e,r)])),value:i,onChange:e=>l("op",e),line:t,style:o})}function R(e){let{onAdd:t,onDelete:n,style:r}=e;return(0,I.jsxs)(I.Fragment,{children:[n&&(0,I.jsx)(y.Z,{type:"bare",onClick:n,style:{padding:7},"aria-label":"Delete entry",children:(0,I.jsx)(p.Z,{style:{width:8,height:8}})}),t&&(0,I.jsx)(y.Z,{type:"bare",onClick:t,style:{padding:7},"aria-label":"Add entry",children:(0,I.jsx)(h.Z,{style:{width:10,height:10}})})]})}function M(e){let{type:t}=e;return(0,I.jsx)(x.Z,{style:{fontSize:12,textAlign:"center",color:m.O9.r5,marginBottom:5},children:(0,c.zQ)(t)})}function N(e){let{error:t,style:n,children:r}=e;return(0,I.jsxs)(S.Z,{style:n,"data-testid":"editor-row",children:[(0,I.jsx)(w.Z,{direction:"row",align:"center",spacing:1,style:{padding:"3px 5px"},children:r}),t&&(0,I.jsx)(M,{type:t})]})}function L(e){let t,{ops:n,condition:r,editorStyle:o,isSchedule:i,onChange:a,onDelete:l,onAdd:s}=e,{field:u,op:c,value:d,type:f,options:h,error:p}=r;return"amount"===u&&h&&(h.inflow?u="amount-inflow":h.outflow&&(u="amount-outflow")),t="number"===f&&"isbetween"===c?(0,I.jsx)(E.I,{defaultValue:d,onChange:e=>a("value",e)}):(0,I.jsx)(O.Z,{field:u,type:f,value:d,multi:"oneOf"===c||"notOneOf"===c,onChange:e=>a("value",e)}),(0,I.jsxs)(N,{style:o,error:p,children:[(0,I.jsx)(Z,{fields:$,value:u,onChange:a}),(0,I.jsx)(P,{ops:n,value:c,type:f,onChange:a}),(0,I.jsx)(S.Z,{style:{flex:1},children:t}),(0,I.jsx)(w.Z,{direction:"row",children:(0,I.jsx)(R,{onAdd:s,onDelete:i&&"date"===u?null:l})})]})}function B(e){let{id:t}=e,n=(0,o.v9)((e=>e.prefs.local.dateFormat||"MM/dd/yyyy")),i=(0,a.gZ)({transform:(0,r.useCallback)((e=>e.filter({id:t})),[])});if(null==i)return null;if(0===i.schedules.length)return(0,I.jsx)(S.Z,{style:{flex:1},children:t});let[l]=i.schedules,s=l&&i.statuses.get(l.id);return(0,I.jsxs)(S.Z,{style:{flex:1,flexDirection:"row",alignItems:"center"},children:[(0,I.jsxs)(S.Z,{style:{marginRight:15,flexDirection:"row"},children:[(0,I.jsxs)(x.Z,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Payee:"," ",(0,I.jsx)(T.Z,{type:"payees",id:l._payee,noneColor:m.O9.n5})]}),(0,I.jsx)(x.Z,{style:{margin:"0 5px"},children:" \u2014 "}),(0,I.jsxs)(x.Z,{style:{flexShrink:0},children:["Amount: ",(c=l._amount,c?"number"===typeof c?(0,d.zA)(c):`${(0,d.zA)(c.num1)} to ${(0,d.zA)(c.num2)}`:(0,d.zA)(0))]}),(0,I.jsx)(x.Z,{style:{margin:"0 5px"},children:" \u2014 "}),(0,I.jsxs)(x.Z,{style:{flexShrink:0},children:["Next: ",u.WU(l.next_date,n)]})]}),(0,I.jsx)(k.O,{status:s})]});var c}let F=["category","payee","notes","cleared","account","date","amount"].map((e=>[e,(0,c.gL)(e)]));function W(e){let{ops:t,action:n,editorStyle:r,onChange:o,onDelete:i,onAdd:a}=e,{field:l,op:s,value:u,type:d,error:f,inputKey:h="initial"}=n;return(0,I.jsxs)(N,{style:r,error:f,children:["set"===s?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(S.Z,{style:{padding:"5px 10px",lineHeight:"1em"},children:(0,c.w8)(s)}),(0,I.jsx)(Z,{fields:F,value:l,onChange:o}),(0,I.jsx)(S.Z,{style:{flex:1},children:(0,I.jsx)(O.Z,{field:l,type:d,op:s,value:u,onChange:e=>o("value",e)},h)})]}):"link-schedule"===s?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(S.Z,{style:{padding:"5px 10px",color:m.O9.p4},children:(0,c.w8)(s)}),(0,I.jsx)(B,{id:u||null})]}):null,(0,I.jsx)(w.Z,{direction:"row",children:(0,I.jsx)(R,{onAdd:a,onDelete:"link-schedule"!==s&&i})})]})}function U(){let[e,t]=(0,r.useState)();return(0,I.jsxs)(S.Z,{style:{position:"relative",marginLeft:5},children:[(0,I.jsx)(S.Z,{onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),children:(0,I.jsx)(g.Z,{style:{width:11,height:11,color:m.O9.n4}})}),e&&(0,I.jsx)(C.u,{position:"bottom-left",style:{padding:10,color:m.O9.n4,maxWidth:450,lineHeight:1.5},children:"The stage of a rule allows you to force a specific order. Pre rules always run first, and post rules always run last. Within each stage rules are automatically ordered from least to most specific."})]})}function z(e){let{selected:t,children:n,style:r,onSelect:o}=e;return(0,I.jsx)(y.Z,{type:"bare",style:[{fontSize:"inherit"},t&&{backgroundColor:m.O9.b9,":hover":{backgroundColor:m.O9.b9}},r],onClick:o,children:n})}function H(e){return{...e,inputKey:""+Math.random()}}function V(e){let{conditionsOp:t,conditions:n,editorStyle:r,isSchedule:o,onChangeConditions:i}=e;function a(e){let r=$.map((e=>e[0])).filter((e=>"amount-inflow"!==e&&"amount-outflow"!==e));r=n.length&&"or"===t?[n[0].field]:r.filter((e=>!n.some((t=>t.field.includes(e)||e.includes(t.field)))));let o=r[0]||"payee",a=[...n];a.splice(e+1,0,{type:c.Z9.get(o),field:o,op:"is",value:null}),i(a)}return 0===n.length?(0,I.jsx)(y.Z,{style:{alignSelf:"flex-start"},onClick:function(){a(-1)},children:"Add condition"}):(0,I.jsx)(w.Z,{spacing:2,"data-testid":"condition-list",children:n.map(((e,t)=>{let l=c.wZ[e.type].ops;return"date"===e.type&&e.value&&e.value.frequency?l=["is","isapprox"]:e.options&&(e.options.inflow||e.options.outflow)&&(l=l.filter((e=>"isbetween"!==e))),(0,I.jsx)(S.Z,{children:(0,I.jsx)(L,{editorStyle:r,ops:l,condition:e,isSchedule:o,onChange:(t,r)=>{!function(e,t,r){i(D(n,e,(()=>{if("field"===t){let t={field:r};"amount-inflow"===r?(t.field="amount",t.options={inflow:!0}):"amount-outflow"===r&&(t.field="amount",t.options={outflow:!0}),t.type=c.Z9.get(t.field);let n=c.Z9.get(e.field);return"string"!==n&&"number"!==n||n!==t.type||"isbetween"===e.op?(t.op=c.wZ[t.type].ops[0],H((0,c.l1)(null,t))):(t.op=e.op,H((0,c.l1)(e.value,t)))}if("op"===t){let t=r;return"oneOf"===e.op||"notOneOf"===e.op||"oneOf"!==t&&"notOneOf"!==t?"oneOf"!==e.op&&"notOneOf"!==e.op||"oneOf"===t||"notOneOf"===t?"isbetween"!==e.op&&"isbetween"===t?(0,c.l1)({num1:(0,d.l9)(e.value),num2:(0,d.l9)(e.value)},{...e,op:r}):"isbetween"===e.op&&"isbetween"!==t?(0,c.l1)((0,d.Bf)(e.value.num1||0),{...e,op:r}):{...e,op:r}:H((0,c.l1)(e.value.length>0?e.value[0]:null,{...e,op:r})):H((0,c.l1)(null!=e.value?[e.value]:[],{...e,op:r}))}return"value"===t?(0,c.l1)(r,e):e})))}(e,t,r)},onDelete:()=>function(e){i(n.filter((t=>t!==e)))}(e),onAdd:()=>a(t)})},t)}))})}let $=["imported_payee","account","category","date","payee","notes","amount"].map((e=>[e,(0,c.gL)(e)])).concat([["amount-inflow",(0,c.gL)("amount",{inflow:!0})],["amount-outflow",(0,c.gL)("amount",{outflow:!0})]]);function q(e){let{modalProps:t,defaultRule:n,onSave:a}=e,[u,d]=(0,r.useState)(n.conditions.map(c.Qc)),[h,p]=(0,r.useState)(n.actions.map(c.Qc)),[g,b]=(0,r.useState)(n.stage),[k,C]=(0,r.useState)(n.conditionsOp),[E,T]=(0,r.useState)([]),O=(0,o.I0)(),P=(0,r.useRef)(),R=h.some((e=>"link-schedule"===e.op));(0,r.useEffect)((()=>(O((0,i.Rr)()),(0,i.Ew)(!1),()=>(0,i.Ew)(!0))),[]),(0,r.useEffect)((()=>{if(P.current){let e=P.current,t=e.scrollTop;e.scrollTop=t+1,e.scrollTop=t}!async function(){let{filters:e}=await(0,s.lW)("make-filters-from-conditions",{conditions:u.map(c.Z2)});if(e.length>0){const t="or"===k?"$or":"$and";let{data:n}=await(0,l.Vn)((0,l.ZP)("transactions").filter({[t]:e}).select("*"));T(n)}else T([])}()}),[h,u,k]);let M=(0,f.ZP)("transactions",E,[]);function N(){L(-1)}function L(e){let t=F.map((e=>e[0]));for(let o of h)t=t.filter((e=>e!==o.field));let n=t[0]||"category",r=[...h];r.splice(e+1,0,{type:c.Z9.get(n),field:n,op:"set",value:null}),p(r)}function B(e){b(e)}function $(e,t){C(t)}function q(){(0,s.lW)("rule-apply-actions",{transactionIds:[...M.items],actions:h}).then((()=>{p([...h])}))}let Y={backgroundColor:m.O9.pK,borderRadius:4};return(0,I.jsx)(v.C,{title:"Rule",padding:0,...t,style:[t.style,{flex:"inherit",maxWidth:"90%"}],children:()=>(0,I.jsxs)(S.Z,{style:{maxWidth:"100%",width:900,height:"80vh",flexGrow:0,flexShrink:0,flexBasis:"auto",overflow:"hidden"},children:[(0,I.jsxs)(S.Z,{style:{flexDirection:"row",alignItems:"center",marginBottom:15,padding:"0 20px"},children:[(0,I.jsx)(x.Z,{style:{color:m.O9.n4,marginRight:15},children:"Stage of rule:"}),(0,I.jsxs)(w.Z,{direction:"row",align:"center",spacing:1,children:[(0,I.jsx)(z,{selected:"pre"===g,onSelect:()=>B("pre"),children:"Pre"}),(0,I.jsx)(z,{selected:null===g,onSelect:()=>B(null),children:"Default"}),(0,I.jsx)(z,{selected:"post"===g,onSelect:()=>B("post"),children:"Post"}),(0,I.jsx)(U,{})]})]}),(0,I.jsx)(S.Z,{innerRef:P,style:{borderBottom:"1px solid "+m.O9.Cg,padding:20,overflow:"auto",maxHeight:"calc(100% - 300px)"},children:(0,I.jsxs)(S.Z,{style:{flexShrink:0},children:[(0,I.jsxs)(S.Z,{style:{marginBottom:30},children:[(0,I.jsxs)(x.Z,{style:{color:m.O9.n4,marginBottom:15},children:["If",(0,I.jsx)(Z,{"data-testid":"conditions-op",style:{display:"inline-flex"},fields:[["and","all"],["or","any"]],value:k,onChange:$}),"of these conditions match:"]}),(0,I.jsx)(V,{conditionsOp:k,conditions:u,editorStyle:Y,isSchedule:R,onChangeConditions:e=>d(e)})]}),(0,I.jsx)(x.Z,{style:{color:m.O9.n4,marginBottom:15},children:"Then apply these actions:"}),(0,I.jsx)(S.Z,{style:{flex:1},children:0===h.length?(0,I.jsx)(y.Z,{style:{alignSelf:"flex-start"},onClick:N,children:"Add action"}):(0,I.jsx)(w.Z,{spacing:2,"data-testid":"action-list",children:h.map(((e,t)=>(0,I.jsx)(S.Z,{children:(0,I.jsx)(W,{ops:["set","link-schedule"],action:e,editorStyle:Y,onChange:(t,n)=>{!function(e,t,n){p(D(h,e,(()=>{let r={...e};return r[t]=n,"field"===t?(r.type=c.Z9.get(r.field),r.value=null,H(r)):"op"===t?(r.value=null,r.inputKey=""+Math.random(),H(r)):r})))}(e,t,n)},onDelete:()=>function(e){p(h.filter((t=>t!==e)))}(e),onAdd:()=>L(t)})},t)))})})]})}),(0,I.jsx)(f.i5,{instance:M,children:(0,I.jsxs)(S.Z,{style:{padding:"20px",flex:1},children:[(0,I.jsxs)(S.Z,{style:{flexDirection:"row",alignItems:"center",marginBottom:12},children:[(0,I.jsx)(x.Z,{style:{color:m.O9.n4,marginBottom:0},children:"This rule applies to these transactions:"}),(0,I.jsx)(S.Z,{style:{flex:1}}),(0,I.jsxs)(y.Z,{disabled:0===M.items.size,onClick:q,children:["Apply actions (",M.items.size,")"]})]}),(0,I.jsx)(j.Z,{transactions:E,fields:A(u,h),style:{border:"1px solid "+m.O9.Cg}}),(0,I.jsxs)(w.Z,{direction:"row",justify:"flex-end",style:{marginTop:20},children:[(0,I.jsx)(y.Z,{onClick:()=>t.onClose(),children:"Cancel"}),(0,I.jsx)(y.Z,{type:"primary",onClick:()=>async function(){let e={...n,stage:g,conditionsOp:k,conditions:u.map(c.Z2),actions:h.map(c.Z2)},r=e.id?"rule-update":"rule-add",{error:o,id:i}=await(0,s.lW)(r,e);o?(o.conditionErrors&&d(_(u,o.conditionErrors)),o.actionErrors&&p(_(h,o.actionErrors))):(i&&(e.id=i),null===a||void 0===a||a(e),t.onClose())}(),children:"Save"})]})]})})]})})}},21912:function(e,t,n){"use strict";n.d(t,{O:function(){return m},V:function(){return g}});n(83017);var r=n(69585),o=n(12756),i=n(32873),a=n(46854),l=n(28993);var s=e=>(0,l.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,l.jsx)("path",{d:"M12 0C1.308 0-4.044 12.925 3.516 20.484 11.075 28.044 24 22.692 24 12 23.992 5.376 18.624.008 12 0zm.01 1.988c5.521.007 9.995 4.48 10.002 10.002 0 8.912-10.774 13.373-17.075 7.072-6.3-6.3-1.839-17.074 7.073-17.074zm6.234 4.588a1 1 0 0 0-.928.442l-6.226 8.45-4.076-3.261a1 1 0 1 0-1.25 1.563l4.888 3.908a1.011 1.011 0 0 0 1.43-.19L18.928 8.2a1 1 0 0 0-.684-1.623z",fill:"currentColor"})});var u=e=>(0,l.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,l.jsx)("path",{fill:"currentColor",d:"M12 0a10.286 10.286 0 0 0-6.243 18.45 1.714 1.714 0 0 1 .672 1.36v1.619A2.571 2.571 0 0 0 9 24a1.714 1.714 0 0 0 1.714-1.714V21a1.286 1.286 0 0 1 2.572 0v1.286A1.714 1.714 0 0 0 15 24a2.571 2.571 0 0 0 2.571-2.571V19.81a1.714 1.714 0 0 1 .672-1.36A10.286 10.286 0 0 0 12 0ZM7.714 12.429a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143Zm8.572 0a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143Z"})});var c=e=>(0,l.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,l.jsx)("path",{fill:"currentColor",d:"M23.91 9.113a1.785 1.785 0 0 0-1.453-1.227l-6.132-.926-2.714-5.506a1.863 1.863 0 0 0-3.222 0l-2.78 5.552-6.066.88a1.798 1.798 0 0 0-1 3.068l4.428 4.361-1.028 6.055a1.797 1.797 0 0 0 2.607 1.895l5.488-2.865 5.429 2.858a1.797 1.797 0 0 0 2.607-1.895l-1.011-6.128 4.394-4.286a1.786 1.786 0 0 0 .454-1.836Z"})});var d=e=>(0,l.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,l.jsx)("path",{fill:"currentColor",d:"M7.176 22.5a4.111 4.111 0 0 1-3.17-1.486l-3.62-4.6a1.8 1.8 0 1 1 2.828-2.228l3.6 4.56a.384.384 0 0 0 .379.152.52.52 0 0 0 .408-.197L20.794 2.177a1.8 1.8 0 1 1 2.812 2.246L10.39 20.964A4.12 4.12 0 0 1 7.2 22.5Z"})}),f=n(53819),h=n(10666),p=n(91743);function g(e){let t,n,r;switch(e){case"missed":t=f.O9.r1,n=f.O9.as,r=u;break;case"due":t=f.O9.y1,n=f.O9.y9,r=o.Z;break;case"upcoming":t=f.O9.p1,n=f.O9.sX,r=i.Z;break;case"paid":t=f.O9.g2,n=f.O9.pC,r=d;break;case"completed":t=f.O9.n4,n=f.O9.S0,r=c;break;case"pending":t=f.O9.g4,n=f.O9.yv,r=i.Z;break;case"scheduled":t=f.O9.n1,n=f.O9.S0,r=i.Z;break;case"cleared":t=f.O9.g5,n=f.O9.S0,r=a.Z;break;default:t=f.O9.n1,n=f.O9.S0,r=s}return{color:t,backgroundColor:n,Icon:r}}function m(e){let{status:t,style:n}=e,{color:o,backgroundColor:i,Icon:a}=g(t);return(0,l.jsxs)(p.Z,{style:[{color:o,backgroundColor:i,padding:"6px 8px",borderRadius:4,flexDirection:"row",alignItems:"center",flexShrink:0},n],children:[(0,l.jsx)(a,{style:{width:13,height:13,marginRight:7}}),(0,l.jsx)(h.Z,{style:{lineHeight:"1em"},children:(0,r.VL)(t)})]})}},95547:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(83017),o=n(71274),i=n(89474),a=n(8756),l=n(3189),s=n(45249),u=n(81785),c=n(48664),d=n(38582),f=n.n(d),h=n(24917),p=n(69585),g=n(53819),m=n(17904),y=n(91743),v=n(83679),b=n(28993);let w={"& .pika-single.actual-date-picker":{color:g.O9.S0,background:g.O9.n1,border:"none",boxShadow:"0 0px 4px rgba(0, 0, 0, .25)",borderRadius:4},"& .actual-date-picker":{"& .pika-lendar":{float:"none",width:"auto"},"& .pika-label":{backgroundColor:g.O9.n1},"& .pika-prev":{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAQ0lEQVR4Ae3KIQ4AIBTD0N0/IeHGI3UIRA3ut/Zl+ltXc5++htVAmIAwAWECwgSEKbgthEoIlRAqIVRCqINQB9nDgQd7ktwFo6UpWQAAAABJRU5ErkJggg==)"},"& .pika-next":{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAP0lEQVQ4y+3TMQoAMAgEwfwfAvvjTZ1uGzuvHhBPPGczEG+FRqqRaqQaqUaqkX6QBmmjacvQ6qEVTjsh+xizebvlaWptGXZAAAAAAElFTkSuQmCC)"},"& .pika-table th":{color:g.O9.S0,"& abbr":{textDecoration:"none"}},"& .pika-button":{backgroundColor:g.O9.n2,color:g.O9.S0},"& .is-today .pika-button":{textDecoration:"underline"},"& .is-selected .pika-button":{backgroundColor:g.O9.n5,boxShadow:"none"}}},x=(0,r.forwardRef)(((e,t)=>{let{value:n,firstDayOfWeekIdx:o,dateFormat:u,onUpdate:c,onSelect:d}=e,h=(0,r.useRef)(null),g=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({handleInputKeyDown(e){let t=null;switch(e.key){case"ArrowLeft":e.preventDefault(),t=i.Z(h.current.getDate(),1);break;case"ArrowUp":e.preventDefault(),t=i.Z(h.current.getDate(),7);break;case"ArrowRight":e.preventDefault(),t=a.Z(h.current.getDate(),1);break;case"ArrowDown":e.preventDefault(),t=a.Z(h.current.getDate(),7)}t&&(h.current.setDate(t,!0),null===c||void 0===c||c(t))}})),[]),(0,r.useLayoutEffect)((()=>(h.current=new(f())({theme:"actual-date-picker",keyboardInput:!1,firstDay:(0,p.CD)(o),defaultDate:n?l.Z(n,u,new Date):new Date,setDefaultDate:!0,toString(e){return s.Z(e,u)},parse(e){return l.Z(e,u,new Date)},onSelect:d}),g.current.appendChild(h.current.el),()=>{h.current.destroy()})),[]),(0,r.useEffect)((()=>{h.current.getDate()!==n&&h.current.setDate(l.Z(n,u,new Date),!0)}),[n,u]),(0,b.jsx)(y.Z,{style:[w,{flex:1}],innerRef:g})}));function S(e){return"Enter"===e.key}function k(e){let{containerProps:t,inputProps:n,tooltipStyle:i,value:a,isOpen:d,embedded:f,dateFormat:p="yyyy-MM-dd",focused:g,openOnFocus:w=!0,inputRef:k,shouldSaveFromKey:C=S,tableBehavior:j,onUpdate:E,onSelect:T}=e,O=(0,r.useMemo)((()=>{if(a){let e=u.Z(a);if(c.Z(e))return s.Z(e,p)}return""}),[a,p]),I=(0,r.useRef)(null),[D,_]=(0,r.useState)(O),[A,Z]=(0,r.useState)(f||d||!1),P=(0,r.useRef)(null);(0,r.useLayoutEffect)((()=>{k&&(k.current=P.current)}),[]);let[R,M]=(0,r.useState)(D),N=(0,r.useRef)(R);const L=(0,o.v9)((e=>{var t;return null!==(t=e.prefs.local)&&void 0!==t&&t.firstDayOfWeekIdx?e.prefs.local.firstDayOfWeekIdx:"0"}));(0,r.useEffect)((()=>{N.current=D}),[D]),(0,r.useEffect)((()=>_(O)),[O]),(0,r.useEffect)((()=>{if((0,h.Ze)(p).test(D)){let e=l.Z(D,(0,h.D1)(p),new Date);c.Z(e)&&(null===E||void 0===E||E(s.Z(e,"yyyy-MM-dd")),M(s.Z(e,p)))}else if((0,h._y)(p).test(D)){let e=l.Z(D,(0,h.JC)(p),new Date);c.Z(e)&&(null===E||void 0===E||E(s.Z(e,"yyyy-MM-dd")),M(s.Z(e,p)))}else{let e=l.Z(D,p,new Date);if(c.Z(e)){let t=s.Z(e,"yyyy-MM-dd");null===E||void 0===E||E(t),M(D)}}}),[D]);return(0,b.jsxs)(y.Z,{...t,children:[(0,b.jsx)(m.C,{focused:g,...n,inputRef:P,value:D,onKeyDown:function(e){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key)||e.shiftKey||e.metaKey||e.altKey||!A)if("Escape"===e.key)_(O),M(O),O===D?A&&(f||e.stopPropagation(),Z(!1)):(Z(!0),null===E||void 0===E||E(a));else if(C(e)){_(R),Z(!1);let t=l.Z(R,p,new Date);T(s.Z(t,"yyyy-MM-dd")),A&&"Enter"===e.key&&(e.stopPropagation(),e.preventDefault());let{onKeyDown:r}=n||{};null===r||void 0===r||r(e)}else A||(Z(!0),P.current&&P.current.setSelectionRange(0,1e4));else I.current.handleInputKeyDown(e)},onChange:function(e){_(e.target.value)},onFocus:e=>{var t;!f&&w&&Z(!0),null===n||void 0===n||null===(t=n.onFocus)||void 0===t||t.call(n,e)},onBlur:e=>{var t;if(f||Z(!1),null===n||void 0===n||null===(t=n.onBlur)||void 0===t||t.call(n,e),!j)if(""===D)M(null),T(null);else{_(R||"");let e=l.Z(R,p,new Date);e instanceof Date&&!isNaN(e)&&T(s.Z(e,"yyyy-MM-dd"))}}}),A&&(B=(0,b.jsx)(x,{ref:I,value:R,firstDayOfWeekIdx:L,dateFormat:p,onUpdate:e=>{M(s.Z(e,p)),null===E||void 0===E||E(s.Z(e,"yyyy-MM-dd"))},onSelect:e=>{_(s.Z(e,p)),T(s.Z(e,"yyyy-MM-dd")),Z(!1)}}),f?B:(0,b.jsx)(v.u,{position:"bottom-left",offset:2,style:[{padding:0,minWidth:225},i],children:B}))]});var B}},73964:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(83017),o=n(71274),i=n(97156),a=n(24917),l=n(88370),s=n(77292),u=n(99716),c=n(53819),d=n(13743),f=n(17904),h=n(61947),p=n(99884),g=n(10666),m=n(91743),y=n(83679),v=n(95547),b=n(28993);const w=5,x=[{id:"daily",name:"Days"},{id:"weekly",name:"Weeks"},{id:"monthly",name:"Months"},{id:"yearly",name:"Years"}],S=[...Array(31).keys()].map((e=>e+1)),k=[{id:"SU",name:"Sunday"},{id:"MO",name:"Monday"},{id:"TU",name:"Tuesday"},{id:"WE",name:"Wednesday"},{id:"TH",name:"Thursday"},{id:"FR",name:"Friday"},{id:"SA",name:"Saturday"}];function C(e){return e||{start:a.PR(),interval:1,frequency:"monthly",patterns:[E(a.PR())]}}function j(e){return{...e,interval:D(e.interval)}}function E(e){return{value:parseInt(a.WU(e,"d")),type:"day"}}function T(e){let{field:t,value:n,recurrence:r}=e;return"value"===t&&"day"!==r.type&&n>w||"type"===t&&"day"!==n&&r.value>w?{[t]:n,value:w}:{[t]:n}}function O(e,t){switch(t.type){case"replace-config":return{...e,config:t.config};case"change-field":return{...e,config:{...e.config,[t.field]:t.value,patterns:"monthly"!==e.config.frequency?[]:e.config.patterns}};case"update-recurrence":return{...e,config:{...e.config,patterns:e.config.patterns.map((e=>e===t.recurrence?{...t.recurrence,...T(t)}:e))}};case"add-recurrence":return{...e,config:{...e.config,patterns:[...e.config.patterns||[],E(e.config.start)]}};case"remove-recurrence":return{...e,config:{...e.config,patterns:e.config.patterns.filter((e=>e!==t.recurrence))}};default:return e}}function I(e){let{previewDates:t}=e;const n=(0,o.v9)((e=>(e.prefs.local.dateFormat||"MM/dd/yyyy").replace("MM","M").replace("dd","d")));if(!t)return null;let r=null;return r="string"===typeof t?(0,b.jsx)(g.Z,{children:t}):(0,b.jsxs)(m.Z,{children:[(0,b.jsx)(g.Z,{style:{fontWeight:600},children:"Upcoming dates"}),(0,b.jsx)(p.Z,{direction:"row",spacing:4,style:{marginTop:10},children:t.map((e=>(0,b.jsxs)(m.Z,{children:[(0,b.jsx)(g.Z,{children:a.WU(e,n)}),(0,b.jsx)(g.Z,{children:a.WU(e,"EEEE")})]})))})]}),(0,b.jsx)(p.Z,{direction:"column",spacing:1,style:{marginTop:15,color:c.O9.n4},children:r})}function D(e){const t=parseInt(e);return Number.isInteger(t)&&t>0?t:1}function _(e){let{config:t,dispatch:n}=e,r=(e,t,r)=>n({type:"update-recurrence",recurrence:e,field:t,value:r});return(0,b.jsx)(p.Z,{spacing:2,style:{marginTop:10},children:t.patterns.map(((e,t)=>(0,b.jsxs)(m.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,b.jsx)(h.Z,{options:[[-1,"Last"],["-","---"],...S.map((e=>[e,e]))],value:e.value,onChange:t=>r(e,"value",function(e){return"last"===e?-1:Number(e)}(t)),disabledKeys:["-"],wrapperStyle:{flex:1,marginRight:10},style:{borderWidth:1,width:"100%"}}),(0,b.jsx)(h.Z,{options:[["day","Day"],["-","---"],...k.map((e=>[e.id,e.name]))],value:e.type,onChange:t=>r(e,"type",t),disabledKeys:["-"],wrapperStyle:{flex:1,marginRight:10},style:{borderWidth:1,width:"100%"}}),(0,b.jsx)(d.Z,{type:"bare",style:{padding:7},onClick:()=>n({type:"remove-recurrence",recurrence:e}),children:(0,b.jsx)(u.Z,{style:{width:8,height:8}})}),(0,b.jsx)(d.Z,{type:"bare",style:{padding:7,marginLeft:5},onClick:()=>n({type:"add-recurrence"}),children:(0,b.jsx)(s.Z,{style:{width:10,height:10}})})]},t)))})}function A(e){let{config:t,onClose:n,onSave:a}=e,[l,s]=(0,r.useState)(null),[u,c]=(0,r.useReducer)(O,{config:C(t)}),m=(0,o.v9)((e=>e.prefs.local.dateFormat||"MM/dd/yyyy"));(0,r.useEffect)((()=>{c({type:"replace-config",config:C(t)})}),[t]);let{config:w}=u,S=(e,t)=>c({type:"change-field",field:e,value:t});return(0,r.useEffect)((()=>{!async function(){let{data:e,error:t}=await(0,i.OK)("schedule/get-upcoming-dates",{config:j(w),count:4});s(t?"Invalid rule":e)}()}),[w]),null==l?null:(0,b.jsxs)(y.u,{style:{padding:10,width:380},offset:1,position:"bottom-left",onClose:n,children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,b.jsx)("label",{htmlFor:"start",style:{marginRight:5},children:"Starts:"}),(0,b.jsx)(v.Z,{id:"start",inputProps:{placeholder:"Start Date"},value:w.start,onSelect:e=>S("start",e),containerProps:{style:{width:100}},dateFormat:m})]}),(0,b.jsxs)(p.Z,{direction:"row",align:"center",justify:"flex-start",style:{marginTop:10},spacing:2,children:[(0,b.jsx)(g.Z,{style:{whiteSpace:"nowrap"},children:"Repeat every"}),(0,b.jsx)(f.C,{id:"interval",style:{width:40},type:"text",onBlur:e=>S("interval",e.target.value),onEnter:e=>S("interval",e.target.value),defaultValue:w.interval||1}),(0,b.jsx)(h.Z,{options:x.map((e=>[e.id,e.name])),value:w.frequency,onChange:e=>S("frequency",e),style:{borderWidth:1,height:27.5}}),"monthly"!==w.frequency||null!=w.patterns&&0!==w.patterns.length?null:(0,b.jsx)(d.Z,{onClick:()=>c({type:"add-recurrence"}),children:"Add specific days"})]}),"monthly"===w.frequency&&w.patterns&&w.patterns.length>0&&(0,b.jsx)(_,{config:w,dispatch:c}),(0,b.jsx)(I,{previewDates:l}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:15,justifyContent:"flex-end"},children:[(0,b.jsx)(d.Z,{onClick:n,children:"Cancel"}),(0,b.jsx)(d.Z,{type:"primary",onClick:()=>a(j(w)),style:{marginLeft:10},children:"Apply"})]})]})}function Z(e){let{value:t,buttonStyle:n,onChange:r}=e,{isOpen:o,close:i,getOpenEvents:a}=(0,y.lL)();return(0,b.jsxs)(m.Z,{children:[(0,b.jsx)(d.Z,{...a(),style:[{textAlign:"left"},n],children:t?(0,l.o7)(t):"No recurring date"}),o&&(0,b.jsx)(A,{config:t,onClose:i,onSave:function(e){r(e),i()}})]})}},1317:function(e,t,n){"use strict";n.d(t,{OJ:function(){return B},aB:function(){return L},O1:function(){return M},Zj:function(){return N}});var r=n(83017),o=n(69093),i=n(91231);const a="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function l(e,t,n){const[o,l]=function(e,t,n){const[o,l]=(0,r.useState)((()=>t(e))),s=(0,r.useCallback)((()=>{const r=t(e);i(o,r)||(l(r),n&&n())}),[o,e,n]);return a(s),[o,s]}(e,t,n);return a((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(l,{handlerIds:[t]})}),[e,l]),o}function s(e,t,n){return l(t,e||(()=>({})),(()=>n.reconnect()))}function u(e,t){const n=[...t||[]];return null==t&&"function"!==typeof e&&n.push(e),(0,r.useMemo)((()=>"function"===typeof e?e():e),n)}function c(e){return(0,r.useMemo)((()=>e.hooks.dragSource()),[e])}function d(e){return(0,r.useMemo)((()=>e.hooks.dragPreview()),[e])}function f(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s<i.length;s++){const a=i[s];if(!l(a))return!1;const u=e[a],c=t[a];if(o=n?n.call(r,u,c,a):void 0,!1===o||void 0===o&&u!==c)return!1}return!0}function h(e){return null!==e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function p(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,r.isValidElement)(t)){const r=t;return e(r,n),r}const i=t;!function(e){if("string"===typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(i);return function(e,t){const n=e.ref;return(0,o.k)("string"!==typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?(0,r.cloneElement)(e,{ref:e=>{m(n,e),m(t,e)}}):(0,r.cloneElement)(e,{ref:t})}(i,n?t=>e(t,n):e)}}function g(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=p(r);t[n]=()=>e}})),t}function m(e,t){"function"===typeof e?e(t):e.current=t}class y{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!f(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!f(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=g({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,h(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,h(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}var v=n(53964);function b(){const{dragDropManager:e}=(0,r.useContext)(v.L);return(0,o.k)(null!=e,"Expected drag drop context"),e}let w=!1,x=!1;class S{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){(0,o.k)(!w,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return w=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{w=!1}}isDragging(){if(!this.sourceId)return!1;(0,o.k)(!x,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return x=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{x=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}class k{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"===typeof e.item?e.item:"function"===typeof e.item?e.item(t):{},null!==n&&void 0!==n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"===typeof e.canDrag?e.canDrag:"function"!==typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function C(e,t,n){const i=b(),l=function(e,t,n){const o=(0,r.useMemo)((()=>new k(e,t,n)),[t,n]);return(0,r.useEffect)((()=>{o.spec=e}),[e]),o}(e,t,n),s=function(e){return(0,r.useMemo)((()=>{const t=e.type;return(0,o.k)(null!=t,"spec.type must be defined"),t}),[e])}(e);a((function(){if(null!=s){const[e,r]=function(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}(s,l,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}}),[i,t,n,l,s])}function j(e,t){const n=u(e,t);(0,o.k)(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=b();return(0,r.useMemo)((()=>new S(e)),[e])}(),l=function(e,t){const n=b(),o=(0,r.useMemo)((()=>new y(n.getBackend())),[n]);return a((()=>(o.dragSourceOptions=e||null,o.reconnect(),()=>o.disconnectDragSource())),[o,e]),a((()=>(o.dragPreviewOptions=t||null,o.reconnect(),()=>o.disconnectDragPreview())),[o,t]),o}(n.options,n.previewOptions);return C(n,i,l),[s(n.collect,i,l),c(l),d(l)]}function E(e){return(0,r.useMemo)((()=>e.hooks.dropTarget()),[e])}class T{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!f(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=g({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,h(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}let O=!1;class I{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;(0,o.k)(!O,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return O=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{O=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}class D{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function _(e,t,n){const i=b(),l=function(e,t){const n=(0,r.useMemo)((()=>new D(e,t)),[t]);return(0,r.useEffect)((()=>{n.spec=e}),[e]),n}(e,t),s=function(e){const{accept:t}=e;return(0,r.useMemo)((()=>((0,o.k)(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);a((function(){const[e,r]=function(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}(s,l,i);return t.receiveHandlerId(e),n.receiveHandlerId(e),r}),[i,t,l,n,s.map((e=>e.toString())).join("|")])}function A(e,t){const n=u(e,t),o=function(){const e=b();return(0,r.useMemo)((()=>new I(e)),[e])}(),i=function(e){const t=b(),n=(0,r.useMemo)((()=>new T(t.getBackend())),[t]);return a((()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget())),[e]),n}(n.options);return _(n,o,i),[s(n.collect,o,i),E(i)]}var Z=n(53819),P=n(91743),R=n(28993);function M(e){let{item:t,type:n,canDrag:o,onDragChange:i}=e,a=(0,r.useRef)(i);const[,l]=j({type:n,item:()=>(a.current({state:"start-preview",type:n,item:t}),setTimeout((()=>{a.current({state:"start"})}),0),{type:n,item:t}),collect:e=>({isDragging:e.isDragging()}),end(e){a.current({state:"end",type:n,item:e})},canDrag(){return o}});return(0,r.useLayoutEffect)((()=>{a.current=i})),{dragRef:l}}function N(e){let{types:t,id:n,onDrop:o,onLongHover:i}=e,a=(0,r.useRef)(null),[l,s]=(0,r.useState)(null),[{isOver:u},c]=A({accept:t,drop(e){let{item:t}=e;o(t.id,l,n)},hover(e,t){let n=a.current.getBoundingClientRect(),r=(n.bottom-n.top)/2,o=t.getClientOffset().y-n.top;s(o<r?"top":"bottom")},collect(e){return{isOver:e.isOver()}}});return(0,r.useEffect)((()=>{let e;return i&&u&&(e=setTimeout(i,700)),()=>e&&clearTimeout(e)}),[u]),{dropRef:(d=c,f=a,(0,r.useMemo)((()=>function(e){[d,f].forEach((t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)}))}),[d,f])),dropPos:u?l:null};var d,f}const L=(0,r.createContext)(null);function B(e){let{pos:t,offset:n={}}=e,o=(0,r.useContext)(L);if(null==t)return null;let i=("first"===o?2:0)+(n.top||0),a=("last"===o?2:0)+(n.bottom||0),l="top"===t?{top:-2+i}:{bottom:-1+a};return(0,R.jsx)(P.Z,{style:[{position:"absolute",left:2,right:2,borderRadius:3,height:3,background:`linear-gradient(90deg, ${Z.O9.b4} 0%, ${Z.O9.b5} 100%)`,zIndex:1e4,pointerEvents:"none"},l]})}},91742:function(e,t,n){"use strict";var r=n(83017),o=n(53819),i=n(10666),a=n(78867),l=n(40336),s=n(69367),u=n(17422),c=n(28993);t.Z=function(e){let{binding:t,type:n,formatter:d,style:f,getStyle:h,privacyFilter:p}=e,{fullSheetName:g}=(0,s.Z)(t),m=(0,u.Z)(t),y=(0,l.v)();return(0,r.useMemo)((()=>(0,c.jsx)(a.wq,{privacyFilter:null!=p?p:"financial"===n||void 0,children:(0,c.jsx)(i.Z,{style:["financial"===n&&o.W2.tnum,f,h&&h(m)],"data-testid":g,"data-cellname":g,children:d?d(m):y(m,n)})})),[p,n,f,h,g,d,y,m])}},7401:function(e,t,n){"use strict";var r=n(83017);t.Z=(0,r.createContext)(void 0)},40336:function(e,t,n){"use strict";n.d(t,{Z:function(){return p},v:function(){return g}});var r=n(83017),o=n(71274),i="NOT_FOUND";var a=function(e,t){return e===t};function l(e,t){var n="object"===typeof t?t:{equalityCheck:t},r=n.equalityCheck,o=void 0===r?a:r,l=n.maxSize,s=void 0===l?1:l,u=n.resultEqualityCheck,c=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(o),d=1===s?function(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:i},put:function(e,n){t={key:e,value:n}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}(c):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var o=n[r];return r>0&&(n.splice(r,1),n.unshift(o)),o.value}return i}return{get:r,put:function(t,o){r(t)===i&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(s,c);function f(){var t=d.get(arguments);if(t===i){if(t=e.apply(null,arguments),u){var n=d.getEntries().find((function(e){return u(e.value,t)}));n&&(t=n.value)}d.put(arguments,t)}return t}return f.clearCache=function(){return d.clear()},f}function s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,a=0,l={memoizeOptions:void 0},s=r.pop();if("object"===typeof s&&(l=s,s=r.pop()),"function"!==typeof s)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]");var u=l.memoizeOptions,c=void 0===u?n:u,d=Array.isArray(c)?c:[c],f=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var n=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}(r),h=e.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(d)),p=e((function(){for(var e=[],t=f.length,n=0;n<t;n++)e.push(f[n].apply(null,arguments));return i=h.apply(null,e)}));return Object.assign(p,{resultFunc:s,memoizedResultFunc:h,dependencies:f,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),p}}var u=s(l),c=n(69585);const d=u((e=>e),(e=>e.prefs)),f=u(d,(e=>e.local)),h=u(f,(e=>(0,c.ff)({format:e.numberFormat,hideFraction:e.hideFraction})));function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string",n=arguments.length>2?arguments[2]:void 0;switch(t){case"string":const r=JSON.stringify(e);return'"'===r.charAt(0)&&'"'===r.charAt(r.length-1)?r.slice(1,-1):r;case"number":return""+e;case"financial-with-sign":let o=p(e,"financial",n);return"number"===typeof e&&e>=0?"+"+o:o;case"financial":if(null==e||""===e||0===e)return(0,c.zA)(0,n);if("string"===typeof e){const t=parseFloat(e);e=isNaN(t)?0:t}if("number"!==typeof e)throw new Error("Value is not a number ("+typeof e+"): "+e);return(0,c.zA)(e,n);default:throw new Error("Unknown format type: "+t)}}function g(){const e=(0,o.v9)(h);return(0,r.useCallback)((function(t){return p(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string",e.formatter)}),[e])}},69367:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(83017),o=n(7401);function i(e){if(!e)throw new Error("Sheet binding is required");const t="string"===typeof e;let i=t?e:e.name;if(!n.g.IS_TESTING||t||i||(i=e.value.toString()),null==i)throw new Error("Binding name is now required");let a=(0,r.useContext)(o.Z)||"__global",l=function(e){let t=e.indexOf("!");return-1!==t?{sheet:e.slice(0,t),name:e.slice(t+1)}:{sheet:null,name:e}}(i);return l.sheet&&(a=l.sheet,i=l.name),{sheetName:a,bindingName:i,fullSheetName:`${a}!${i}`}}},17422:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(83017),o=n(62914),i=n(69367);function a(e,t){let{sheetName:n,fullSheetName:a}=(0,i.Z)(e);const l="string"===typeof e?{name:e,value:null}:e;let s=(0,o.M)(),[u,c]=(0,r.useState)({name:a,value:void 0===l.value?null:l.value,query:l.query}),d=(0,r.useRef)(t),f=(0,r.useRef)(u.value);return(0,r.useLayoutEffect)((()=>{d.current=t,f.current=u.value})),(0,r.useLayoutEffect)((()=>(l.query&&s.createQuery(n,l.name,l.query),s.bind(n,e,null,(e=>{d.current&&d.current(e),e.value!==f.current&&c(e)})))),[n,l.name]),u.value}},65695:function(e,t,n){"use strict";n.d(t,{bL:function(){return M},Sx:function(){return V},wh:function(){return z},nu:function(){return H},gN:function(){return P},F3:function(){return W},dN:function(){return I},X2:function(){return N},_7:function(){return $},Vg:function(){return G},OX:function(){return q},iA:function(){return X},xD:function(){return Y},pX:function(){return Q},rt:function(){return R},wz:function(){return J}});var r=n(83017),o=n(71274),i=n(22644),a=n(75197),l=n(95058),s=n(9314),u=n(28091),c=n(89220),d=n(28993);var f=e=>(0,d.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,d.jsx)("path",{d:"m0 11 2-2 5 5L18 3l2 2L7 18z",fill:"currentColor"})}),h=n(53819),p=n(13743),g=n(17904),m=n(18999),y=n(10666),v=n(91743),b=n(51678),w=n(99227);const x=(e,t)=>e;function S(e){let{onResize:t,children:n}=e;return n((0,w.Z)(t))}class k extends r.PureComponent{constructor(e){super(e),this._resetIsScrollingTimeoutId=null,this.setRowAnimation=e=>{this.animationEnabled=e;let t=this._outerRef;t&&(this.animationEnabled?t.classList.add("animated"):t.classList.remove("animated"))},this.onHeaderResize=e=>{},this.getItemOffset=e=>e*this.props.itemSize,this.getItemSize=e=>this.props.itemSize,this.getEstimatedTotalSize=()=>this.props.itemSize*this.props.itemCount,this.getOffsetForIndexAndAlignment=(e,t,n)=>{const r=this.props.height,o=Math.max(0,this.props.itemCount*this.props.itemSize-r),i=Math.min(o,e*this.props.itemSize),a=Math.max(0,e*this.props.itemSize-r+this.props.itemSize);switch("smart"===t&&(t=n>=a-r&&n<=i+r?"auto":"center"),t){case"start":return i;case"end":return a;case"center":{const e=Math.round(a+(i-a)/2);return e<Math.ceil(r/2)?0:e>o+Math.floor(r/2)?o:e}default:return n>=a&&n<=i?n:n<a?a:i}},this.getStartIndexForOffset=e=>Math.max(0,Math.min(this.props.itemCount-1,Math.floor(e/this.props.itemSize))),this.getStopIndexForStartIndex=(e,t)=>{const n=e*this.props.itemSize,r=this.props.height,o=Math.ceil((r+t-n)/this.props.itemSize);return Math.max(0,Math.min(this.props.itemCount-1,e+o-1))},this._callOnItemsRendered=(0,b.Z)(((e,t,n,r)=>this.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:r}))),this._callOnScroll=(0,b.Z)(((e,t,n)=>this.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n}))),this._getItemStyle=e=>{const{direction:t,itemSize:n,layout:r}=this.props,o=this._getItemStyleCache(n,r,t);let i;if(o.hasOwnProperty(e))i=o[e];else{const t=this.getItemOffset(e),n=this.getItemSize(e);o[e]=i={position:"absolute",left:0,top:t,height:n,width:"100%"}}return i},this._getItemStyleCache=(0,b.Z)(((e,t,n)=>({}))),this._onScrollVertical=e=>{let{scrollTop:t}=e.currentTarget;this.setState((e=>{if(e.scrollOffset===t)return null;let n=t;return{isScrolling:!0,scrollDirection:e.scrollOffset<n?"forward":"backward",scrollOffset:n,scrollUpdateWasRequested:!1}}),this._resetIsScrollingDebounced)},this._outerRefSetter=e=>{const{outerRef:t}=this.props;this._outerRef=e,"function"===typeof t?t(e):null!=t&&"object"===typeof t&&t.hasOwnProperty("current")&&(t.current=e)},this._resetIsScrollingDebounced=()=>{null!==this._resetIsScrollingTimeoutId&&clearTimeout(this._resetIsScrollingTimeoutId),this._resetIsScrollingTimeoutId=setTimeout(this._resetIsScrolling,150)},this._resetIsScrolling=()=>{this._resetIsScrollingTimeoutId=null,this.setState({isScrolling:!1},(()=>{this._getItemStyleCache(-1,null)}))},this.lastPositions=(0,r.createRef)(),this.lastPositions.current=new Map,this.needsAnimationRerender=(0,r.createRef)(),this.needsAnimationRerender.current=!1,this.animationEnabled=!1,this.state={instance:this,isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"===typeof this.props.initialScrollOffset?this.props.initialScrollOffset:0,scrollUpdateWasRequested:!1}}scrollTo(e){e=Math.max(0,e),this.setState((t=>t.scrollOffset===e?null:(this.requestScrollUpdateHandled=!1,{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0})),this._resetIsScrollingDebounced)}scrollToItem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{itemCount:n}=this.props,{scrollOffset:r}=this.state;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(this.getOffsetForIndexAndAlignment(e,t,r))}componentDidMount(){const{initialScrollOffset:e}=this.props;if("number"===typeof e&&null!=this._outerRef){let t=this._outerRef;t=this._outerRef,t.scrollTop=e}this._callPropsCallbacks()}getAnchoredScrollPos(){if(this.anchored&&this.props.indexForKey&&null!=this._outerRef){let e=this.props.indexForKey(this.anchored.key);return this.getOffsetForIndexAndAlignment(e,"start")+this.anchored.offset}return null}componentDidUpdate(){const{scrollOffset:e,scrollUpdateWasRequested:t}=this.state;let n=this.getAnchoredScrollPos();if(null!=n){this._outerRef.scrollTop=n}else if(t&&!this.requestScrollUpdateHandled&&null!=this._outerRef){this.requestScrollUpdateHandled=!0;this._outerRef.scrollTop=e}this.needsAnimationRerender.current&&(this.needsAnimationRerender.current=!1,this.rerenderTimeout=setTimeout((()=>{this.forceUpdate()}),10)),this._callPropsCallbacks()}componentWillUnmount(){null!==this._resetIsScrollingTimeoutId&&clearTimeout(this._resetIsScrollingTimeoutId)}render(){const{className:e,height:t,header:n,innerRef:r,innerElementType:o,innerTagName:i,itemCount:a,renderRow:l,itemKey:s=x,outerElementType:u,outerTagName:c,style:f,useIsScrolling:h,width:p}=this.props,{isScrolling:g}=this.state,[m,y]=this._getRangeToRender(),b=new Map,w=[];if(a>0)for(let d=m;d<=y;d++){let e=s(d),t=this._getItemStyle(d),n=this.lastPositions.current.get(e),r=!1;b.set(e,t.top),this.animationEnabled&&null!=n&&n!==t.top&&(t={...t,top:n},this.needsAnimationRerender.current=!0,r=!0),w.push(l({index:d,key:e,style:t,isScrolling:h?g:void 0,isAnimating:r}))}this.lastPositions.current=b;let k=this.getEstimatedTotalSize(),C=u||c||"div",j=o||i||"div";return(0,d.jsx)(S,{onResize:this.onHeaderResize,children:o=>(0,d.jsxs)(C,{className:e,onScroll:this._onScrollVertical,ref:this._outerRefSetter,style:{height:t,width:p,overflow:"hidden auto",...f},children:[(0,d.jsx)(v.Z,{innerRef:o,children:n}),(0,d.jsx)(j,{ref:r,style:{position:"relative",height:k,width:"100%",pointerEvents:g?"none":void 0},children:w})]})})}anchor(){let e=this.props.itemKey||x,t=this._outerRef,n=t?t.scrollTop:0,r=this.getStartIndexForOffset(n),o=e(r);this.anchored={key:o,offset:n-this.getItemOffset(r)}}unanchor(){this.anchored=null}isAnchored(){return null!=this.anchored}_callPropsCallbacks(){if("function"===typeof this.props.onItemsRendered){const{itemCount:e}=this.props;if(e>0){const[e,t,n,r]=this._getRangeToRender();this._callOnItemsRendered(e,t,n,r)}}if("function"===typeof this.props.onScroll){const{scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n}=this.state;this._callOnScroll(e,t,n)}}_getRangeToRender(){let{itemCount:e,overscanCount:t}=this.props,{isScrolling:n,scrollDirection:r,scrollOffset:o}=this.state,i=this.getAnchoredScrollPos();if(null!=i&&(o=i),0===e)return[0,0,0,0];const a=this.getStartIndexForOffset(o),l=this.getStopIndexForStartIndex(a,o),s=n&&"backward"!==r?1:Math.max(1,t),u=n&&"forward"!==r?1:Math.max(1,t);return[Math.max(0,a-s),Math.max(0,Math.min(e-1,l+u)),a,l]}}k.defaultProps={direction:"ltr",renderRow:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1,headerHeight:0};var C=n(52677),j=n(78867),E=n(40336),T=n(17422),O=n(83679);const I=32,D=h.O9.S0;function _(e,t){document.hasFocus()?null===e||void 0===e||e(t):t.stopPropagation()}const A=(0,r.createContext)({backgroundColor:"white",borderColor:h.O9.n9});function Z(e){let{backgroundColor:t,borderColor:n,children:o}=e,i=(0,r.useMemo)((()=>({backgroundColor:t,borderColor:n})),[t,n]);return(0,d.jsx)(A.Provider,{value:i,children:o})}const P=(0,r.forwardRef)((function(e,t){let{width:n,name:o,borderColor:i,truncate:a=!0,children:l,style:s,contentStyle:u,...c}=e,{backgroundColor:f,borderColor:p}=(0,r.useContext)(A);return i&&(p=i),(0,d.jsx)(v.Z,{innerRef:t,...c,style:["flex"===n?{flex:1,flexBasis:0}:{width:n},{position:"relative",borderTopWidth:p?1:0,borderBottomWidth:p?1:0,borderColor:p,backgroundColor:f},h.W2.smallText,s],"data-testid":o,children:(0,d.jsx)(v.Z,{style:[{flex:1,padding:"0 5px",justifyContent:"center"},u],children:a?(0,d.jsx)(y.Z,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l}):l})})}));function R(e){let{value:t,formatter:n}=e;return(0,d.jsx)(y.Z,{style:{flexGrow:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n?n(t):t})}function M(e){let{width:t,name:o,exposed:i,focused:l,value:s,formatter:u,textAlign:c,alignItems:f,onExpose:p,borderColor:g,children:m,plain:y,style:b,valueStyle:w,unexposedContent:x,privacyFilter:S,...k}=e,C=(0,r.useRef)(null),E=(0,r.useRef)(null),{backgroundColor:T,borderColor:O}=(0,r.useContext)(A);(0,a.X)(E,void 0!==l?l:i),g&&(O=g);const I="flex"===t?{flex:1,flexBasis:0}:{width:t},D={position:"relative",textAlign:c||"left",justifyContent:"center",borderTopWidth:O?1:0,borderBottomWidth:O?1:0,borderColor:O,backgroundColor:T,alignItems:f};let _=(0,r.useMemo)((()=>(0,d.jsx)(j.wq,{privacyFilter:(0,j.JS)({activationFilters:[!l,!i],style:{position:"absolute",width:"100%",height:"100%"}},S),children:y?m:i?m():(0,d.jsx)(v.Z,{style:[{flexDirection:"row",flex:1,padding:"0 5px",alignItems:"center"},h.W2.smallText,w],onMouseDown:e=>C.current=[e.clientX,e.clientY],onClick:n.g.IS_TESTING?()=>null===p||void 0===p?void 0:p(o):e=>{C.current&&Math.abs(e.clientX-C.current[0])<5&&Math.abs(e.clientY-C.current[1])<5&&(null===p||void 0===p||p(o))},children:x||(0,d.jsx)(R,{value:s,formatter:u})})})),[S,l,i,m,y,i,w,p,o,x,s,u]);return(0,d.jsx)(v.Z,{innerRef:E,style:[I,D,b],className:"animated-cell",...k,"data-testid":o,children:_})}function N(e){let{backgroundColor:t="white",borderColor:n=h.O9.Cg,inset:o=0,collapsed:i,focused:a,highlighted:l,children:s,height:u,style:c,...f}=e,[p,g]=(0,r.useState)(!1),m=(0,r.useRef)(!1),y=(0,r.useRef)(null),b=(0,r.useRef)(null);return(0,r.useEffect)((()=>{l&&!m.current&&y.current&&(y.current.classList.add("animated"),g(!0),clearTimeout(b.current),b.current=setTimeout((()=>{g(!1),b.current=setTimeout((()=>{y.current&&y.current.classList.remove("animated")}),500)}),500))}),[l]),(0,r.useEffect)((()=>{m.current=l})),(0,d.jsx)(Z,{backgroundColor:p?h.O9.y9:t,borderColor:p?h.O9.y8:n,children:(0,d.jsxs)(v.Z,{innerRef:y,style:[{flexDirection:"row",height:u||I,flex:"0 0 "+(u||I)+"px",userSelect:"text","&.animated .animated-cell":{transition:".7s background-color"}},i&&{marginTop:-1},c],"data-testid":"row",...f,children:[0!==o&&(0,d.jsx)(P,{width:o}),s,0!==o&&(0,d.jsx)(P,{width:o})]})})}const L={backgroundColor:"white",padding:"5px 3px",margin:"0 1px"},B={backgroundColor:"transparent","::selection":{backgroundColor:"#d9d9d9"}};function F(e){let{value:t,onUpdate:n,onBlur:o,...i}=e,[a,l]=(0,r.useState)(t);return(0,d.jsx)(g.C,{...i,value:a,onUpdate:e=>l(e),onBlur:function(e){null===n||void 0===n||n(a),o&&_(o,e)},onKeyDown:function(e){"Enter"!==e.key&&"Tab"!==e.key&&e.stopPropagation(),"Escape"===e.key?a!==t&&l(t):U(e)&&(null===n||void 0===n||n(a))},style:[L,i.readOnly?B:null,i.style]})}function W(e){let{inputProps:t,onUpdate:n,onBlur:r,textAlign:o,error:i,...a}=e;return(0,d.jsx)(M,{textAlign:o,...a,children:()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(F,{value:a.value,onUpdate:n,onBlur:r,style:[{textAlign:o},t&&t.style],...t}),i&&(0,d.jsx)(O.u,{targetHeight:I,width:180,position:"bottom-left",children:i},"error")]})})}function U(e){switch(e.key){case"Tab":case"Enter":return e.preventDefault(),!0}}function z(e){let{value:t,children:n,onUpdate:o,onBlur:i,...a}=e,[l,s]=(0,r.useState)(t),[u,c]=(0,r.useState)(t);function f(e){document.hasFocus()&&(null===o||void 0===o||o(l),_(i,e))}function h(e){U(e)&&(null===o||void 0===o||o(l))}return u!==t&&(s(t),c(t)),(0,d.jsx)(M,{...a,value:t,children:()=>n({onBlur:f,onKeyDown:h,onUpdate:e=>s(e),onSave:e=>{s(e),null===o||void 0===o||o(e)},shouldSaveFromKey:U,inputStyle:L})})}function H(e){let{onDelete:t,style:n,...r}=e;return(0,d.jsx)(M,{...r,name:"delete",width:20,style:[{alignItems:"center",userSelect:"none"},n],onClick:e=>{e.stopPropagation(),null===t||void 0===t||t()},children:()=>(0,d.jsx)(u.Z,{width:7,height:7})})}const V=(0,r.forwardRef)(((e,t)=>{let{style:n,disabled:r,clickBehavior:o,onSelect:i,onEdit:a,children:l}=e;return(0,d.jsx)(v.Z,{innerRef:t,className:"cell-button",tabIndex:0,onKeyDown:e=>{"x"!==e.key&&" "!==e.key||(e.preventDefault(),r||null===i||void 0===i||i(e))},style:[{flexDirection:"row",alignItems:"center",cursor:"default",transition:"box-shadow .15s",":focus":{outline:0,boxShadow:`0 0 0 3px white, 0 0 0 5px ${h.O9.b5}`}},n],onFocus:()=>a&&a(),"data-testid":"cell-button",onClick:"none"===o?null:e=>{r||(null===i||void 0===i||i(e),null===a||void 0===a||a())},children:l})}));function $(e){let{focused:t,selected:n,partial:r,style:o,onSelect:i,onEdit:a,...l}=e;return(0,d.jsx)(M,{...l,focused:t,name:"select",width:20,style:[{alignItems:"center",userSelect:"none"},o],onClick:e=>{e.stopPropagation(),null===i||void 0===i||i(e),null===a||void 0===a||a()},children:()=>(0,d.jsx)(V,{style:[{width:12,height:12,border:"1px solid "+h.O9.n8,borderRadius:3,justifyContent:"center",alignItems:"center",":focus":{border:"1px solid "+h.O9.b5,boxShadow:"0 1px 2px "+h.O9.b5}},n&&{backgroundColor:r?h.O9.b9:h.O9.b5,borderColor:r?h.O9.b9:h.O9.b5,color:"white"}],onEdit:a,onSelect:i,clickBehavior:"none",children:n&&(0,d.jsx)(f,{width:6,height:6})})})}function q(e){let{valueProps:t,valueStyle:n,inputProps:r,textAlign:o,onSave:i,...a}=e;const{binding:l,type:s,getValueStyle:u,formatExpr:c,unformatExpr:f,privacyFilter:h}=t;let p=(0,T.Z)(l,(e=>{a.exposed&&r&&r.onBlur&&r.onBlur(e)}));return(0,d.jsx)(M,{valueStyle:u?[n,u(p)]:n,textAlign:o,...a,value:p,formatter:e=>a.formatter?a.formatter(e,s):(0,E.Z)(e,s),privacyFilter:null!=h?h:"financial"===s||void 0,"data-cellname":p,children:()=>(0,d.jsx)(F,{value:c?c(p):p,onUpdate:e=>{i(f?f(e):e)},style:{textAlign:o},...r})})}function Y(e){let{headers:t,children:n,version:r,...o}=e;return(0,d.jsx)(v.Z,{style:"v2"===r&&{borderRadius:"6px 6px 0 0",overflow:"hidden",flexShrink:0},children:(0,d.jsx)(N,{backgroundColor:"white",borderColor:h.O9.Cg,collapsed:!0,...o,style:[{zIndex:200},"v2"===r?{color:h.O9.n4,fontWeight:500}:{color:h.O9.n4},o.style],children:t?t.map((e=>(0,d.jsx)(M,{value:e.name,width:e.width,style:e.style,valueStyle:e.valueStyle},e.name))):n})})}function G(e){let{name:t,keyHandlers:n,items:o,onSelect:i}=e,a=(0,l.D9)(),[s,u]=(0,r.useState)(null);return 0===a.size?null:(0,d.jsxs)(v.Z,{style:{marginLeft:10,flexShrink:0},children:[(0,d.jsx)(C.U,{keys:n||{}}),(0,d.jsxs)(p.Z,{type:"bare",style:{color:h.O9.b3},onClick:()=>u(!0),children:[(0,d.jsx)(c.Z,{width:8,height:8,style:{marginRight:5}}),a.size," ",t]}),s&&(0,d.jsx)(O.u,{position:"bottom-right",width:200,style:{padding:0},onClose:()=>u(!1),children:(0,d.jsx)(m.Z,{onMenuSelect:e=>{i(e,[...a]),u(!1)},items:o})})]})}let K={position:"absolute",willChange:"transform",width:"100%"};const Q=(0,r.forwardRef)(((e,t)=>{let{fields:n,...r}=e,o=J(r.items,n);return(0,d.jsx)(X,{...r,navigator:o})})),X=(0,r.forwardRef)(((e,t)=>{let{items:n,count:o,headers:l,contentHeader:u,loading:c,rowHeight:f=I,backgroundColor:p=D,renderItem:g,renderEmpty:m,getItemKey:y,loadMore:b,style:w,navigator:x,listRef:S,onScroll:C,version:j="v1",animated:E,allowPopupsEscape:T,isSelected:_,saveScrollWidth:A,...Z}=e;x||(x={onEdit:()=>{},editingId:null,focusedField:null,getNavigatorProps:e=>e});let{onEdit:P,editingId:R,focusedField:M,getNavigatorProps:N}=x,L=(0,r.useRef)(null),B=(0,r.useRef)(null),F=(0,r.useRef)(null),W=(0,r.useRef)(null),U=(0,r.useRef)(!1);function z(e){let{index:t,style:r,key:o}=e,i=n[t],a=R===i.id,l=_&&_(i.id),s=g({item:i,editing:a,focusedField:a&&M,onEdit:P,index:t,position:r.top});return(0,d.jsx)(v.Z,{className:"animated-row",style:[K,{zIndex:a||l?101:"auto",transform:"translateY(var(--pos))"}],nativeStyle:{"--pos":r.top-1+"px"},"data-focus-key":i.id,children:s},o)}function H(e,t){return t*(f-1)+(f-1)/2-e/2+2*(f-1)}function V(e){let{overscanStartIndex:t,overscanStopIndex:r}=e;b&&r>n.length-100&&b()}if((0,r.useImperativeHandle)(t,(()=>({scrollTo:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"smart",r=n.findIndex((t=>t.id===e));-1!==r&&(L.current?L.current.scrollToItem(r,t):W.current=r)},scrollToTop:()=>{var e;null===(e=L.current)||void 0===e||e.scrollTo(0)},getScrolledItem:()=>{if(F.current){let e=F.current.scrollTop,t=L.current.getStartIndexForOffset(e);return n[t].id}return 0},setRowAnimation:e=>{var t;null===(t=L.current)||void 0===t||t.setRowAnimation(e)},edit(e,n,r){P(e,n),e&&r&&t.scrollTo(e)},anchor(){var e;null===(e=L.current)||void 0===e||e.anchor()},unanchor(){var e;null===(e=L.current)||void 0===e||e.unanchor()},isAnchored(){return L.current&&L.current.isAnchored()}}))),(0,r.useLayoutEffect)((()=>{var e;!U.current&&B.current&&(null===(e=L.current)||void 0===e||e.setRowAnimation(!0),U.current=!0);F.current&&A&&A(F.current.offsetParent?F.current.offsetParent.clientWidth:0,F.current?F.current.clientWidth:0)})),c)return(0,d.jsx)(v.Z,{style:[{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:p}],children:(0,d.jsx)(s.Z,{width:25,color:h.O9.n1})});let $=0===(o||n.length);return(0,d.jsxs)(v.Z,{style:[{flex:1,outline:"none","& .animated .animated-row":{transition:".25s transform"}},w],tabIndex:"1",...N(Z),"data-testid":"table",children:[l&&(0,d.jsx)(Y,{version:j,height:f,...Array.isArray(l)?{headers:l}:{children:l}}),(0,d.jsx)(v.Z,{style:{flex:1,backgroundColor:p},children:$?(q=m,null==q?null:"function"===typeof q?q():(0,d.jsx)(v.Z,{style:{justifyContent:"center",alignItems:"center",fontStyle:"italic",color:h.O9.n6,flex:1},children:q})):(0,d.jsx)(i.Z,{children:e=>{let{width:t,height:r}=e;return 0===t||0===r?null:(0,d.jsx)(O.Hp.Provider,{value:!T&&B,children:(0,d.jsx)(a.M,{children:(0,d.jsx)(k,{ref:L,header:u,innerRef:B,outerRef:F,width:t,height:r,renderRow:z,itemCount:o||n.length,itemSize:f-1,itemKey:y||((e,t)=>n[e].id),indexForKey:e=>n.findIndex((t=>t.id===e)),initialScrollOffset:W.current?H(r,W.current):0,version:j,animated:E,overscanCount:5,onItemsRendered:V,onScroll:C})})})}})})]});var q}));function J(e,t){let n="function"!==typeof t?()=>t:t,[i,a]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),u=(0,r.useRef)(),c=(0,o.oR)(),d=(0,r.useRef)(0),f=(0,r.useCallback)(((e,t)=>{a(e),s(e?t:null)}),[]);function h(){u.current.focus(),f(null),setTimeout((()=>{f(i,l)}),100)}function p(t){if(i){let r=n(e.find((e=>e.id===i))),o=r.indexOf(l)+t;o<0?function(){let t=e.findIndex((e=>e.id===i));if(t>0){let r=e[t-1],o=n(r);f(r.id,o[o.length-1])}else h()}():o>=r.length?function(){let t=e.findIndex((e=>e.id===i));if(t<e.length-1){let r=e[t+1],o=n(r);f(r.id,o[0])}else h()}():s(r[o])}}function g(t){if(i){let r=e.findIndex((e=>e.id===i));for(;;){if(r+=t,!(r>=0&&r<e.length)){h();break}{const t=e[r];if(n(t).includes(l)){f(t.id,l);break}}}}}function m(e){switch(e){case"left":p(-1);break;case"right":p(1);break;case"up":g(-1);break;case"down":g(1);break;default:throw new Error("Unknown direction: "+e)}}return(0,r.useEffect)((()=>{d.current=c.getState().modals.modalStack.length}),[]),{onEdit:f,editingId:i,focusedField:l,getNavigatorProps:function(e){return{...e,innerRef:u,onKeyDown:t=>{var n;if(null===e||void 0===e||null===(n=e.onKeyDown)||void 0===n||n.call(e,t),!t.isPropagationStopped())switch(t.key){case"ArrowUp":case"k":"INPUT"!==t.target.tagName&&m("up");break;case"ArrowDown":case"j":"INPUT"!==t.target.tagName&&m("down");break;case"Enter":case"Tab":t.preventDefault(),t.stopPropagation(),m("Enter"===t.key?t.shiftKey?"up":"down":t.shiftKey?"left":"right")}},onBlur:e=>{let t=d.current,n=c.getState().modals.modalStack.length;!document.hasFocus()||null!=e.relatedTarget&&u.current.contains(e.relatedTarget)&&u.current!==e.relatedTarget||t!==n||f(null)}}}}}},83679:function(e,t,n){"use strict";n.d(t,{Hp:function(){return s},lL:function(){return u},u:function(){return c}});var r=n(83017),o=n(46214),i=n(86634),a=n(53819),l=n(28993);const s=(0,r.createContext)();function u(){let[e,t]=(0,r.useState)(!1);return{getOpenEvents:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{onClick:n=>{var r;n.stopPropagation(),null===(r=e.onClick)||void 0===r||r.call(e,n),t(!0)}}},isOpen:e,close:()=>t(!1)}}class c extends r.Component{constructor(e){super(e),this.state={position:null},this.position=e.position||"bottom-right",this.contentRef=(0,r.createRef)()}setup(){this.layout();let e=e=>{let t=e.target;for(;t&&t!==document.documentElement&&"tooltip"!==t.dataset.testid&&null==t.dataset.reachPopover;)t=t.parentNode;var n,r;t===document.documentElement&&(null===(n=(r=this.props).onClose)||void 0===n||n.call(r))};window.document.addEventListener("mousedown",e,!1),this.contentRef.current.addEventListener("keydown",(e=>{var t,n;"Escape"===e.key&&(null===(t=(n=this.props).onClose)||void 0===t||t.call(n))}),!1),this.cleanup=()=>{window.document.removeEventListener("mousedown",e)}}componentDidMount(){this.getContainer()?this.setup():this.forceUpdate((()=>{this.getContainer()?this.setup():console.log("Warning: could not mount tooltip, container missing")}))}componentDidUpdate(e){(e.targetRect!==this.props.targetRect||e.forceTop!==this.props.forceTop||this.props.forceLayout)&&this.layout()}getContainer(){let{ignoreBoundary:e=!1}=this.props;return!e&&this.context?this.context.current:document.body}getBoundsContainer(){let e=this.getContainer();return e.parentNode&&"auto"===e.parentNode.style.overflow?e.parentNode:e}layout(){let{targetRect:e,offset:t=0}=this.props,n=this.contentRef.current;if(!n)return;let r=n.getBoundingClientRect(),o=this.target.parentNode,i=e||o.getBoundingClientRect();i={top:i.top,left:i.left,width:i.width,height:i.height};let a=this.getBoundsContainer();if(!a)return;let l=a.getBoundingClientRect();if(i.left-=l.left,i.top-=l.top,this.props.forceTop)i.top=this.props.forceTop;else{let e=r.height+t,n=i.top-e,o=i.top+i.height+e;(-1!==this.position.indexOf("top")&&n<l.top||-1!==this.position.indexOf("bottom")&&o>l.height&&n>0)&&(this.position=this.getOppositePosition(this.position)),i.top+=a.scrollTop}const s=this.getStyleForPosition(this.position,r,i,this.getContainer().getBoundingClientRect(),t);n.style.top=s.top,n.style.bottom=s.bottom,n.style.left=s.left,n.style.right=s.right,n.style.width=s.width}componentWillUnmount(){this.cleanup&&this.cleanup()}getOppositePosition(e){switch(e){case"top":case"top-left":return"bottom";case"top-right":return"bottom-right";case"bottom":case"bottom-left":return"top";case"bottom-right":return"top-right";case"bottom-stretch":return"top-stretch";case"top-stretch":return"bottom-stretch";case"bottom-center":return"top-center";case"top-center":return"bottom-center";case"right":return"right"}}getStyleForPosition(e,t,n,r,o){const i={top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"};if("top"===e||"top-right"===e||"top-left"===e)i.top=n.top-t.height-o+"px",i.left="top-right"===e?n.left+(n.width-t.width)+"px":n.left+"px";else if("bottom"===e||"bottom-right"===e||"bottom-left"===e)i.top=n.top+n.height+o+"px",i.left="bottom-right"===e?n.left+(n.width-t.width)+"px":n.left+"px";else if("bottom-center"===e)i.top=n.top+n.height+o+"px",i.left=n.left-(t.width-n.width)/2+"px";else if("top-center"===e)i.top=n.top-t.height-o+"px",i.left=n.left-(t.width-n.width)/2+"px";else if("left-center"===e)i.top=n.top-(t.height-n.height)/2+"px",i.left=n.left-t.width+"px";else if("top-stretch"===e)i.bottom=r.height-n.top+o+"px",i.left=n.left+"px",i.width=n.width+"px";else if("bottom-stretch"===e)i.top=n.top+n.height+o+"px",i.left=n.left+"px",i.width=n.width+"px";else{if("right"!==e)throw new Error("Invalid position for Tooltip: "+e);i.top=n.top+"px",i.left=n.left+n.width+o+"px"}return i}render(){const{children:e,width:t,style:n}=this.props,r={position:"absolute",zIndex:3e3,padding:5,width:t,...a.W2.shadowLarge,borderRadius:4,backgroundColor:"white"};return this.getContainer()?(0,l.jsx)("div",{ref:e=>this.target=e,children:o.createPortal((0,l.jsx)("div",{...(0,i.iv)(r,n,a.W2.darkScrollbar),ref:this.contentRef,"data-testid":"tooltip",onClick:e=>{e.stopPropagation()},children:e}),this.getContainer())}):null}}c.contextType=s},39432:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(83017),o=n(71274),i=n(48664),a=n(81785),l=n(45249),s=n(5499),u=n(69585),c=n(95058),d=n(56288),f=n(53819),h=n(65695),p=n(64652),g=n(28993);const m=(0,r.memo)((function(e){let{transaction:t,fields:n,payees:r,categories:o,accounts:i,selected:a}=e,l=(0,s.ch)(o)[t.category],m=(0,s.gI)(i)[t.account],y=(0,c.YP)();return(0,g.jsxs)(h.X2,{children:[(0,g.jsx)(h._7,{exposed:!0,focused:!1,onSelect:e=>{y({type:"select",id:t.id,event:e})},selected:a}),n.map(((e,n)=>{switch(e){case"date":return(0,g.jsx)(h.gN,{width:100,children:t.date},n);case"imported_payee":return(0,g.jsx)(h.gN,{width:"flex",children:t.imported_payee},n);case"payee":return(0,g.jsx)(h.bL,{width:"flex",exposed:!0,style:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:()=>(0,g.jsxs)(g.Fragment,{children:[t.schedule&&(0,g.jsx)(d.Z,{style:{width:13,height:13,margin:"0 5px"}}),(0,g.jsx)(p.Z,{type:"payees",id:t.payee})]})},n);case"category":return(0,g.jsx)(h.gN,{width:"flex",title:l&&l.name,children:l?l.name:""},n);case"account":return(0,g.jsx)(h.gN,{width:"flex",title:m.name,children:m.name},n);case"notes":return(0,g.jsx)(h.gN,{width:"flex",title:t.notes,children:t.notes},n);case"amount":return(0,g.jsx)(h.gN,{width:75,style:[{textAlign:"right"},f.W2.tnum],children:(0,u.zA)(t.amount)},n);default:return null}}))]})}));function y(e){let{transactions:t,schedules:n,renderEmpty:s,fields:u=["date","payee","amount"],style:d}=e,{payees:f,categories:p,accounts:y,dateFormat:v}=(0,o.v9)((e=>({payees:e.queries.payees,accounts:e.queries.accounts,categories:e.queries.categories.grouped,dateFormat:e.prefs.local.dateFormat||"MM/dd/yyyy"}))),b=(0,c.D9)(),w=(0,c.YP)(),x=(0,r.useMemo)((()=>u),[JSON.stringify(u)]),S=(0,r.useMemo)((()=>t.map((e=>function(e,t){let{date:n}=e;return(0,i.Z)((0,a.Z)(n))||(n=null),{...e,date:n?(0,l.Z)((0,a.Z)(n),t):null}}(e,v)))),[t]),k=(0,r.useCallback)((e=>{let{item:t}=e;return(0,g.jsx)(m,{transaction:t,payees:f,categories:p,accounts:y,fields:x,selected:b&&b.has(t.id)})}),[f,p,x,b]);return(0,g.jsx)(h.iA,{style:d,items:S,renderEmpty:s,headers:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h._7,{exposed:!0,focused:!1,selected:b.size>0,width:20,onSelect:e=>w({type:"select-all",event:e})}),u.map(((e,t)=>{switch(e){case"date":return(0,g.jsx)(h.gN,{width:100,children:"Date"},t);case"imported_payee":return(0,g.jsx)(h.gN,{width:"flex",children:"Imported payee"},t);case"payee":return(0,g.jsx)(h.gN,{width:"flex",children:"Payee"},t);case"category":return(0,g.jsx)(h.gN,{width:"flex",children:"Category"},t);case"account":return(0,g.jsx)(h.gN,{width:"flex",children:"Account"},t);case"notes":return(0,g.jsx)(h.gN,{width:"flex",children:"Notes"},t);case"amount":return(0,g.jsx)(h.gN,{width:75,style:{textAlign:"right"},children:"Amount"},t);default:return null}}))]}),renderItem:k})}},41218:function(e,t,n){"use strict";n.d(t,{_:function(){return d},I:function(){return f}});var r=n(83017),o=n(69585),i=n(81576),a=n(28993);var l=e=>(0,a.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 3",style:{color:"inherit",...e.style},children:(0,a.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M23 1.5A1.5 1.5 0 0 1 21.5 3h-20a1.5 1.5 0 0 1 0-3h20A1.5 1.5 0 0 1 23 1.5z"})}),s=n(13743),u=n(13419),c=n(91743);function d(e){let{id:t,defaultValue:n=0,onChange:c,style:d}=e,[f,h]=(0,r.useState)(n<=0),[p,g]=(0,r.useState)((0,o.zA)(Math.abs(n)));function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=(0,o.qT)(p);c(e?t<0?t:-t:t>0?t:-t)}return(0,a.jsx)(u.Z,{id:t,leftContent:(0,a.jsx)(s.Z,{type:"bare",style:{padding:"0 7px"},onClick:function(){h(!f),m(!f)},children:f?(0,a.jsx)(l,{style:{width:8,height:8}}):(0,a.jsx)(i.Z,{style:{width:8,height:8}})}),value:p,style:{flex:1,alignItems:"stretch",...d},inputStyle:{paddingLeft:0},onChange:e=>g(e.target.value),onBlur:e=>m()})}function f(e){let{defaultValue:t,onChange:n}=e,[o,i]=(0,r.useState)(t.num1),[l,s]=(0,r.useState)(t.num2);return(0,a.jsxs)(c.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,a.jsx)(d,{defaultValue:o,onChange:e=>{i(e),n({num1:e,num2:l})}}),(0,a.jsx)(c.Z,{style:{margin:"0 5px"},children:"and"}),(0,a.jsx)(d,{defaultValue:l,onChange:e=>{s(e),n({num1:o,num2:e})}})]})}},64652:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});n(83017);var r=n(15068),o=n(69476),i=n(53819),a=n(10666),l=n(28993);function s(e){let t,{type:n,id:s,noneColor:u=i.O9.n8}=e;switch(n){case"payees":t=o.mp;break;case"accounts":t=r.Re;break;default:throw new Error("DisplayId: unknown object type: "+n)}return(0,l.jsx)(t,{idKey:!0,children:e=>{let t=e[s];return(0,l.jsx)(a.Z,{style:null==t?{color:u}:null,title:t?t.name:"None",children:t?t.name:"None"})}})}},99446:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(83017),o=n(71274),i=n(24917),a=n(25432),l=n(71588),s=n(87740),u=n(35946),c=n(26018),d=n(53819),f=n(91743),h=n(28993);function p(e){let{items:t,getItemProps:n,highlightedIndex:o,embedded:i}=e;return(0,h.jsx)(f.Z,{children:(0,h.jsx)(f.Z,{style:[{overflow:"auto",padding:"5px 0"},!i&&{maxHeight:175}],children:t.map(((e,t)=>[(0,r.createElement)("div",{...n?n({item:e}):null,key:e.id,style:{backgroundColor:o===t?d.O9.n4:"transparent",padding:4,paddingLeft:20,borderRadius:i?4:0},"data-testid":"filter-item"+(o===t?"-highlighted":"")},e.name)]))})})}function g(e){let{embedded:t,...n}=e,r=(0,c.m)()||[];return(0,h.jsx)(l.ZP,{strict:!0,highlightFirst:!0,embedded:t,suggestions:r,renderItems:(e,n,r)=>(0,h.jsx)(p,{items:e,getItemProps:n,highlightedIndex:r,embedded:t}),...n})}var m=n(17904),y=n(36717),v=n(95547),b=n(73964);function w(e){let{field:t,subfield:n,type:r,multi:c,value:d,inputRef:p,style:w,onChange:x}=e,{saved:S,categoryGroups:k,dateFormat:C}=(0,o.v9)((e=>({saved:e.queries.saved,categoryGroups:e.queries.categories.grouped,dateFormat:e.prefs.local.dateFormat||"MM/dd/yyyy"})));if(c&&!Array.isArray(d))d=[];else if(!c&&Array.isArray(d))return null;let j,E=!c||0===d.length;switch(r){case"id":switch(t){case"payee":j=(0,h.jsx)(u.Z,{multi:c,showMakeTransfer:!1,openOnFocus:!0,value:d,onSelect:x,inputProps:{inputRef:p,...E?{placeholder:"nothing"}:null}});break;case"account":j=(0,h.jsx)(a.Z,{value:d,multi:c,openOnFocus:!0,onSelect:x,inputProps:{inputRef:p,...E?{placeholder:"nothing"}:null}});break;case"category":j=(0,h.jsx)(s.Z,{categoryGroups:k,value:d,multi:c,openOnFocus:!0,onSelect:x,inputProps:{inputRef:p,...E?{placeholder:"nothing"}:null}})}break;case"saved":if("saved"===t)j=(0,h.jsx)(g,{saved:S,value:d,multi:c,openOnFocus:!0,onSelect:x,inputProps:{inputRef:p,...E?{placeholder:"nothing"}:null}});break;case"date":switch(n){case"month":j=(0,h.jsx)(m.C,{inputRef:p,defaultValue:d||"",placeholder:(0,i.LT)(C).toLowerCase(),onEnter:e=>x(e.target.value),onBlur:e=>x(e.target.value)});break;case"year":j=(0,h.jsx)(m.C,{inputRef:p,defaultValue:d||"",placeholder:"yyyy",onEnter:e=>x(e.target.value),onBlur:e=>x(e.target.value)});break;default:j=d&&d.frequency?(0,h.jsx)(b.Z,{value:d,buttonStyle:{justifyContent:"flex-start"},onChange:x}):(0,h.jsx)(v.Z,{value:d,dateFormat:C,openOnFocus:!1,inputRef:p,inputProps:{placeholder:C.toLowerCase()},onSelect:x})}break;case"boolean":j=(0,h.jsx)(y.XZ,{checked:d,value:d,onChange:()=>x(!d)});break;default:j=c?(0,h.jsx)(l.ZP,{multi:!0,suggestions:[],value:d,inputProps:{inputRef:p},onSelect:x}):(0,h.jsx)(m.C,{inputRef:p,defaultValue:d||"",placeholder:"nothing",onEnter:e=>x(e.target.value),onBlur:e=>x(e.target.value)})}return(0,h.jsx)(f.Z,{style:[{flex:1},w],children:j})}},49963:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(97156);async function o(e){let{upgradingAccountId:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t,n){let{onSuccess:o,onClose:i}=n;e("gocardless-external-msg",{onMoveExternal:async e=>{let{institutionId:n}=e;const o=await(0,r.lW)("gocardless-create-web-token",{upgradingAccountId:t,institutionId:n,accessValidForDays:30});if(o.error)return o;const{link:i,requisitionId:a}=o;window.Actual.openURLInBrowser(i);let{error:l,data:s}=await(0,r.lW)("gocardless-poll-web-token",{upgradingAccountId:t,requisitionId:a});return{error:l,data:s}},onClose:i,onSuccess:o})}(e,t,{onSuccess:async n=>{e("select-linked-accounts",{accounts:n.accounts,requisitionId:n.id,upgradingAccountId:t})}})}},43045:function(e,t,n){"use strict";n.d(t,{o:function(){return l}});var r=n(83017),o=n(71274),i=n(18753),a=n(17199);function l(){const e=(0,o.I0)();return(0,r.useMemo)((()=>(0,i.DE)(a,e)),[e])}},59831:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(71274);const o={reportBudget:!1,goalTemplatesEnabled:!1,privacyMode:!1,themes:!1};function i(e){return(0,r.v9)((t=>{const n=t.prefs.local[`flags.${e}`];return void 0===n?o[e]||!1:n}))}},75197:function(e,t,n){"use strict";n.d(t,{M:function(){return a},X:function(){return l}});var r=n(83017),o=n(28993);let i=(0,r.createContext)(null);function a(e){let{children:t}=e,n=(0,r.useRef)(null),a=(0,r.useMemo)((()=>({keyRef:n,onKeyChange:e=>{n.current=e}})),[n]);return(0,o.jsx)(i.Provider,{value:a,children:t})}function l(e,t){let n=(0,r.useContext)(i),o=(0,r.useRef)(null);(0,r.useLayoutEffect)((()=>{let r=o.current,i=e.current;if(i&&t&&(null===r||!1===r)){let e="input,button,div[tabindex]",r=i.matches(e)?i:i.querySelector(e);t&&r&&function(e,t){if(t){let n=function(e){let t=e;for(let n=0;n<10&&t;n++){let e=t.dataset&&t.dataset.focusKey;if(e)return e;t=t.parentNode}return null}(e);e.focus({preventScroll:n&&n===t.keyRef.current}),t.onKeyChange(n)}else e.focus();"INPUT"===e.tagName&&e.setSelectionRange(0,1e4)}(r,n)}o.current=t}),[t])}},99227:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(83017);function o(e){let t=(0,r.useRef)(null);return t.current||(t.current=new ResizeObserver((t=>{e(t[0].contentRect)}))),(0,r.useCallback)((e=>{t.current.disconnect(),e&&t.current.observe(e,{box:"border-box"})}),[])}},95058:function(e,t,n){"use strict";n.d(t,{D9:function(){return p},YP:function(){return h},ZP:function(){return c},i5:function(){return g},mL:function(){return m}});var r=n(83017),o=n(71274),i=n(97156),a=n(41936),l=n(14812),s=n(28993);function u(e,t){let n=Math.min(e.start,e.end),r=Math.max(e.start,e.end);for(let o=n;o<=r;o++)t(o)}function c(e,t,n){let[l,s]=(0,r.useReducer)(((e,n)=>{switch(n.type){case"select":{let{selectedRange:r}=e,o=new Set(e.selectedItems),{id:i,event:a}=n;if(a.shiftKey&&r){let n,a,l=t.findIndex((e=>e.id===i)),s=t.findIndex((e=>e.id===r.start)),c=t.findIndex((e=>e.id===r.end));return-1===c?n={start:s,end:l}:c<s?l<=s?(n={start:s,end:l},l>c&&(a={start:l-1,end:c})):n={start:c,end:l}:l>=s?(n={start:s,end:l},l<c&&(a={start:l+1,end:c})):n={start:c,end:l},u(n,(e=>o.add(t[e].id))),a&&u(a,(e=>o.delete(t[e].id))),{...e,selectedItems:o,selectedRange:{start:t[n.start].id,end:t[n.end].id}}}{let t=null;return o.delete(i)||(o.add(i),t={start:i,end:null}),{...e,selectedItems:o,selectedRange:t}}}case"select-none":return{...e,selectedItems:new Set};case"select-all":return{...e,selectedItems:new Set(n.ids||t.map((e=>e.id))),selectedRange:n.ids&&1===n.ids.length?{start:n.ids[0],end:null}:null};default:throw new Error("Unexpected action: "+n.type)}}),null,(()=>({selectedItems:new Set(n||[]),selectedRange:n&&1===n.length?{start:n[0],end:null}:null}))),c=(0,r.useRef)(t);(0,r.useEffect)((()=>{if(l.selectedItems.size>0){let e=new Set(t.map((e=>e.id)));if(!(c.current.length===t.length&&c.current.every((t=>e.has(t.id))))){let t=[...l.selectedItems],n=t.filter((t=>e.has(t)));t.length!==n.length&&s({type:"select-all",ids:n})}}c.current=t}),[t,l.selectedItems]),(0,r.useEffect)((()=>{let t=a.a2("selectedItems");return a.kp("selectedItems",{name:e,items:l.selectedItems}),()=>a.kp("selectedItems",t)}),[l.selectedItems]);let d=(0,o.v9)((e=>e.app.lastUndoState));return(0,r.useEffect)((()=>{function t(t){let{messages:n,undoTag:r}=t,o=a.r8(r),i=new Set(n.filter((e=>"tombstone"===e.column&&1===e.value)).map((e=>e.row)));o&&o.selectedItems&&o.selectedItems.name===e&&s({type:"select-all",ids:[...o.selectedItems.items].filter((e=>!i.has(e)))})}return d&&d.current&&t(d.current),(0,i.oL)("undo-event",t)}),[]),{items:l.selectedItems,setItems:l.setSelectedItems,dispatch:s}}let d=(0,r.createContext)(null),f=(0,r.createContext)(null);function h(){return(0,r.useContext)(d)}function p(){return(0,r.useContext)(f)}function g(e){let{instance:t,fetchAllIds:n,children:o}=e,i=(0,r.useRef)(null);(0,r.useEffect)((()=>{i.current=t.items}),[t.items]);let a=(0,r.useCallback)((async e=>{if(!e.event&&(0,l.Ry)())throw new Error("SelectedDispatch actions must have an event");return"select-all"===e.type?i.current&&i.current.size>0?t.dispatch({type:"select-none",event:e.event}):n?t.dispatch({type:"select-all",ids:await n(),event:e.event}):t.dispatch({type:"select-all",event:e.event}):t.dispatch(e)}),[t.dispatch,n]);return(0,s.jsx)(f.Provider,{value:t.items,children:(0,s.jsx)(d.Provider,{value:a,children:o})})}function m(e){let{name:t,items:n,initialSelectedIds:o,fetchAllIds:i,registerDispatch:a,children:l}=e,u=c(t,n,o);return(0,r.useEffect)((()=>{null===a||void 0===a||a(u.dispatch)}),[a]),(0,s.jsx)(g,{instance:u,fetchAllIds:i,children:l})}},48099:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});var r=n(83017);function o(e){(0,r.useEffect)((()=>{!function(e){const t=document.getElementsByTagName("meta");[...t].find((e=>"theme-color"===e.name)).setAttribute("content",e)}(e)}),[e])}},63529:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(71274),o=n(4340);function i(){const e=(0,o.o1)(),t=(0,r.v9)((e=>e.user.data));return e?!t||t.offline?"offline":"online":"no-server"}},9314:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(83017),o=n(86634),i=n(28993);var a=e=>{let{color:t="currentColor"}=e,[n]=(0,r.useState)("gradient-"+Math.random());return(0,i.jsxs)("svg",{...e,viewBox:"0 0 38 38",style:{...e.style},children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:n,children:[(0,i.jsx)("stop",{stopColor:t,stopOpacity:0,offset:"0%"}),(0,i.jsx)("stop",{stopColor:t,stopOpacity:.631,offset:"63.146%"}),(0,i.jsx)("stop",{stopColor:t,offset:"100%"})]})}),(0,i.jsxs)("g",{transform:"translate(1 2)",fill:"none",fillRule:"evenodd",children:[(0,i.jsx)("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#"+n+")",strokeWidth:2,fill:"none"}),(0,i.jsx)("circle",{fill:t,cx:36,cy:18,r:1})]})]})};const l=o.iv.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(666deg)"}});var s=function(e){return(0,i.jsx)("span",{...(0,o.iv)({animationName:l,animationDuration:"1.6s",animationTimingFunction:"cubic-bezier(0.17, 0.67, 0.83, 0.67)",animationIterationCount:"infinite",lineHeight:0}),children:(0,i.jsx)(a,{...e})})}},77292:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5Z",fill:"currentColor"})]})},28091:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"none",stroke:"currentColor",d:"m2 2 20 20M22 2 2 22",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:4})})},89220:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 15",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M24.483.576c-.309-.327-.674-.49-1.097-.49H1.56C1.137.086.771.25.463.576A1.635 1.635 0 0 0 0 1.737c0 .448.154.834.463 1.161l10.913 11.558c.31.327.675.49 1.097.49.422 0 .788-.163 1.096-.49L24.483 2.898c.308-.327.463-.713.463-1.16 0-.448-.155-.835-.463-1.162Z"})})},17888:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 91 51",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M63.004.003a3 3 0 0 0-1.875 5.219L79.44 22.034H3.16a3.257 3.257 0 0 0-.313 0c-1.57.082-2.925 1.585-2.843 3.156.081 1.571 1.585 2.926 3.156 2.844H79.44L61.129 44.815a3 3 0 1 0 4.062 4.407l24-22a3 3 0 0 0 0-4.407l-24-22a3 3 0 0 0-2.187-.812Z"})})},99716:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",fill:"currentColor"})})},81576:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{fill:"currentColor",d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",className:"path"}),(0,r.jsx)("path",{fill:"currentColor",d:"M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5Z",className:"path"})]})},62177:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m3.828 9 6.071-6.071-1.414-1.414L0 10l.707.707 7.778 7.778 1.414-1.414L3.828 11H20V9H3.828z",fill:"currentColor"})})},62506:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m16.172 9-6.071-6.071 1.414-1.414L20 10l-.707.707-7.778 7.778-1.414-1.414L16.172 11H0V9z",fill:"currentColor"})})},61563:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m9.293 12.95.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z",fill:"currentColor"})})},13925:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M3.94 6.5 2.22 3.64l1.42-1.42L6.5 3.94c.52-.3 1.1-.54 1.7-.7L9 0h2l.8 3.24c.6.16 1.18.4 1.7.7l2.86-1.72 1.42 1.42-1.72 2.86c.3.52.54 1.1.7 1.7L20 9v2l-3.24.8c-.16.6-.4 1.18-.7 1.7l1.72 2.86-1.42 1.42-2.86-1.72c-.52.3-1.1.54-1.7.7L11 20H9l-.8-3.24c-.6-.16-1.18-.4-1.7-.7l-2.86 1.72-1.42-1.42 1.72-2.86c-.3-.52-.54-1.1-.7-1.7L0 11V9l3.24-.8c.16-.6.4-1.18.7-1.7zM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",fill:"currentColor"})})},97800:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M10 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0-6a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fill:"currentColor"})})},80239:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 5h2v6H9V5zm0 8h2v2H9v-2z",fill:"currentColor"})})},22101:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z",fill:"currentColor"})})},1836:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M0 4c0-1.1.9-2 2-2h15a1 1 0 0 1 1 1v1H2v1h17a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm16.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z",fill:"currentColor"})})},12756:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M23.119 20 13.772 2.15a2 2 0 0 0-3.543 0L.881 20a2 2 0 0 0 1.772 2.928h18.694A2 2 0 0 0 23.119 20ZM11 8.423a1 1 0 0 1 2 0v6a1 1 0 1 1-2 0Zm1.05 11.51h-.028a1.528 1.528 0 0 1-1.522-1.47 1.476 1.476 0 0 1 1.448-1.53h.028A1.527 1.527 0 0 1 13.5 18.4a1.475 1.475 0 0 1-1.45 1.533Z",fill:"currentColor"})})},56288:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("g",{fill:"#000",children:(0,r.jsx)("path",{d:"m23.962 17.457-.82-3.297a1.287 1.287 0 0 0-1.56-.934l-3.294.823a1.286 1.286 0 0 0-.343 2.35L19 17.03A9.538 9.538 0 0 1 12 20.604a8.652 8.652 0 0 1-8.085-5.667 1.286 1.286 0 0 0-2.415.884A11.232 11.232 0 0 0 12 23.175a12.108 12.108 0 0 0 9.214-4.8l.839.503a1.286 1.286 0 0 0 1.91-1.415ZM2.422 10.774l3.295-.823a1.286 1.286 0 0 0 .352-2.35l-.972-.583A9.588 9.588 0 0 1 12 3.396a8.652 8.652 0 0 1 8.085 5.667A1.286 1.286 0 0 0 22.5 8.18 11.232 11.232 0 0 0 12 .825 12.242 12.242 0 0 0 2.866 5.68l-.919-.552a1.286 1.286 0 0 0-1.91 1.414l.82 3.297a1.287 1.287 0 0 0 1.246.974 1.311 1.311 0 0 0 .32-.04Z",fill:"currentColor"})})})},32873:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M21.5 3h-2.75a.25.25 0 0 1-.25-.25V1a1 1 0 0 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5a.5.5 0 0 0-.5-.5H8.25A.25.25 0 0 1 8 2.751V1a1 1 0 1 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5A.5.5 0 0 0 4 3H2.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h19a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM21 22H3a.5.5 0 0 1-.5-.5v-12A.5.5 0 0 1 3 9h18a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5Z",fill:"currentColor"})})},46854:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M12 0a12 12 0 1 0 12 12A12.014 12.014 0 0 0 12 0Zm6.927 8.2-6.845 9.289a1.011 1.011 0 0 1-1.43.188l-4.888-3.908a1 1 0 1 1 1.25-1.562l4.076 3.261 6.227-8.451a1 1 0 1 1 1.61 1.183Z",fill:"currentColor"})})},22141:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z",fill:"currentColor"})})},47631:function(e,t,n){"use strict";n(83017);var r=n(28993);t.Z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m23.384 21.619-6.529-6.529a9.284 9.284 0 1 0-1.768 1.768l6.529 6.529a1.266 1.266 0 0 0 1.768 0 1.251 1.251 0 0 0 0-1.768ZM2.75 9.5a6.75 6.75 0 1 1 6.75 6.75A6.758 6.758 0 0 1 2.75 9.5Z",fill:"currentColor"})})},53819:function(e,t,n){"use strict";n.d(t,{jy:function(){return ua},O9:function(){return r},bA:function(){return Te},W2:function(){return Ce},rS:function(){return ca},Or:function(){return la},Fg:function(){return sa}});var r={};n.r(r),n.d(r,{b1:function(){return O},Iy:function(){return N},K5:function(){return L},b2:function(){return I},b3:function(){return D},b4:function(){return _},b5:function(){return A},b6:function(){return Z},b7:function(){return P},b8:function(){return R},b9:function(){return M},Cg:function(){return ve},g1:function(){return K},pC:function(){return ie},yv:function(){return ae},g2:function(){return Q},g3:function(){return X},g4:function(){return J},g5:function(){return ee},g6:function(){return te},g7:function(){return ne},g8:function(){return re},g9:function(){return oe},Mr:function(){return be},n1:function(){return B},pK:function(){return Y},S0:function(){return G},n2:function(){return F},n3:function(){return W},n4:function(){return U},n5:function(){return z},n6:function(){return H},n7:function(){return V},n8:function(){return $},n9:function(){return q},p1:function(){return le},sX:function(){return me},Ft:function(){return ye},p2:function(){return se},p3:function(){return ue},p4:function(){return ce},p5:function(){return de},p6:function(){return fe},p7:function(){return he},p8:function(){return pe},p9:function(){return ge},r1:function(){return y},as:function(){return E},Ln:function(){return T},r2:function(){return v},r3:function(){return b},r4:function(){return w},r5:function(){return x},r6:function(){return S},r7:function(){return k},r8:function(){return C},r9:function(){return j},hv:function(){return we},y1:function(){return a},Zu:function(){return g},lc:function(){return m},y2:function(){return l},y3:function(){return s},y4:function(){return u},y5:function(){return c},y6:function(){return d},y7:function(){return f},y8:function(){return h},y9:function(){return p}});var o={};n.r(o),n.d(o,{altMenuBackground:function(){return bn},altMenuBorder:function(){return En},altMenuBorderHover:function(){return Tn},altMenuItemBackground:function(){return wn},altMenuItemBackgroundHover:function(){return xn},altMenuItemText:function(){return Sn},altMenuItemTextHeader:function(){return jn},altMenuItemTextHover:function(){return kn},altMenuItemTextSelected:function(){return Cn},buttonBareBackground:function(){return or},buttonBareBackgroundActive:function(){return ar},buttonBareBackgroundHover:function(){return ir},buttonBareDisabledBackground:function(){return sr},buttonBareDisabledText:function(){return lr},buttonBareText:function(){return nr},buttonBareTextHover:function(){return rr},buttonMenuBackground:function(){return Dn},buttonMenuBackgroundHover:function(){return _n},buttonMenuBorder:function(){return An},buttonMenuSelectedBackground:function(){return Rn},buttonMenuSelectedBackgroundHover:function(){return Mn},buttonMenuSelectedBorder:function(){return Nn},buttonMenuSelectedText:function(){return Zn},buttonMenuSelectedTextHover:function(){return Pn},buttonMenuText:function(){return On},buttonMenuTextHover:function(){return In},buttonNormalBackground:function(){return Gn},buttonNormalBackgroundHover:function(){return Kn},buttonNormalBorder:function(){return Qn},buttonNormalDisabledBackground:function(){return er},buttonNormalDisabledBorder:function(){return tr},buttonNormalDisabledText:function(){return Jn},buttonNormalShadow:function(){return Xn},buttonNormalText:function(){return qn},buttonNormalTextHover:function(){return Yn},buttonPrimaryBackground:function(){return Fn},buttonPrimaryBackgroundHover:function(){return Wn},buttonPrimaryBorder:function(){return Un},buttonPrimaryDisabledBackground:function(){return Vn},buttonPrimaryDisabledBorder:function(){return $n},buttonPrimaryDisabledText:function(){return Hn},buttonPrimaryShadow:function(){return zn},buttonPrimaryText:function(){return Ln},buttonPrimaryTextHover:function(){return Bn},cardBackground:function(){return Dt},cardBorder:function(){return _t},cardShadow:function(){return At},errorAccent:function(){return yr},errorBackground:function(){return gr},errorText:function(){return mr},formInputBackground:function(){return br},formInputBackgroundSelected:function(){return wr},formInputBackgroundSelection:function(){return xr},formInputBorder:function(){return Sr},formInputBorderSelected:function(){return Cr},formInputShadowSelected:function(){return Dr},formInputText:function(){return jr},formInputTextHighlight:function(){return _r},formInputTextPlaceholder:function(){return Tr},formInputTextPlaceholderSelected:function(){return Or},formInputTextReadOnlySelection:function(){return kr},formInputTextSelected:function(){return Er},formInputTextSelection:function(){return Ir},formLabelText:function(){return vr},menuBackground:function(){return cn},menuBorder:function(){return yn},menuBorderHover:function(){return vn},menuItemBackground:function(){return dn},menuItemBackgroundHover:function(){return fn},menuItemText:function(){return hn},menuItemTextHeader:function(){return mn},menuItemTextHover:function(){return pn},menuItemTextSelected:function(){return gn},modalBackground:function(){return Ot},modalBorder:function(){return It},noticeAccent:function(){return dr},noticeBackground:function(){return ur},noticeText:function(){return cr},pageBackground:function(){return yt},pageBackgroundBottomRight:function(){return wt},pageBackgroundLineBottom:function(){return kt},pageBackgroundLineMid:function(){return St},pageBackgroundLineTop:function(){return xt},pageBackgroundModalActive:function(){return vt},pageBackgroundTopLeft:function(){return bt},pageText:function(){return Ct},pageTextLink:function(){return Tt},pageTextPositive:function(){return Et},pageTextSubdued:function(){return jt},pillBackground:function(){return Ar},pillBackgroundSelected:function(){return Rr},pillBorder:function(){return Pr},pillBorderSelected:function(){return Nr},pillText:function(){return Zr},pillTextSelected:function(){return Mr},sidebarBackground:function(){return Qt},sidebarItemAccent:function(){return tn},sidebarItemAccentHover:function(){return rn},sidebarItemAccentSelected:function(){return nn},sidebarItemBackground:function(){return Xt},sidebarItemBackgroundHover:function(){return en},sidebarItemBackgroundSelected:function(){return Jt},sidebarItemText:function(){return on},sidebarItemTextHover:function(){return ln},sidebarItemTextSelected:function(){return an},tableBackground:function(){return Zt},tableBorder:function(){return zt},tableBorderHover:function(){return Vt},tableBorderSelected:function(){return Ht},tableBorderSeparator:function(){return $t},tableHeaderBackground:function(){return Ut},tableHeaderText:function(){return Wt},tableRowBackgroundHighlight:function(){return qt},tableRowBackgroundHighlightText:function(){return Yt},tableRowBackgroundHover:function(){return Pt},tableRowHeaderBackground:function(){return Gt},tableRowHeaderText:function(){return Kt},tableText:function(){return Rt},tableTextEditing:function(){return Lt},tableTextEditingBackground:function(){return Bt},tableTextHover:function(){return Nt},tableTextInactive:function(){return Ft},tableTextSelected:function(){return Mt},tooltipBackground:function(){return sn},tooltipBorder:function(){return un},warningAccent:function(){return pr},warningBackground:function(){return fr},warningText:function(){return hr}});var i={};n.r(i),n.d(i,{altMenuBackground:function(){return Fo},altMenuBorder:function(){return qo},altMenuBorderHover:function(){return Yo},altMenuItemBackground:function(){return Wo},altMenuItemBackgroundHover:function(){return Uo},altMenuItemText:function(){return zo},altMenuItemTextHeader:function(){return $o},altMenuItemTextHover:function(){return Ho},altMenuItemTextSelected:function(){return Vo},buttonBareBackground:function(){return ji},buttonBareBackgroundActive:function(){return Ti},buttonBareBackgroundHover:function(){return Ei},buttonBareDisabledBackground:function(){return Ii},buttonBareDisabledText:function(){return Oi},buttonBareText:function(){return ki},buttonBareTextHover:function(){return Ci},buttonMenuBackground:function(){return Qo},buttonMenuBackgroundHover:function(){return Xo},buttonMenuBorder:function(){return Jo},buttonMenuSelectedBackground:function(){return ni},buttonMenuSelectedBackgroundHover:function(){return ri},buttonMenuSelectedBorder:function(){return oi},buttonMenuSelectedText:function(){return ei},buttonMenuSelectedTextHover:function(){return ti},buttonMenuText:function(){return Go},buttonMenuTextHover:function(){return Ko},buttonNormalBackground:function(){return mi},buttonNormalBackgroundHover:function(){return yi},buttonNormalBorder:function(){return vi},buttonNormalDisabledBackground:function(){return xi},buttonNormalDisabledBorder:function(){return Si},buttonNormalDisabledText:function(){return wi},buttonNormalShadow:function(){return bi},buttonNormalText:function(){return pi},buttonNormalTextHover:function(){return gi},buttonPrimaryBackground:function(){return li},buttonPrimaryBackgroundHover:function(){return si},buttonPrimaryBorder:function(){return ui},buttonPrimaryDisabledBackground:function(){return fi},buttonPrimaryDisabledBorder:function(){return hi},buttonPrimaryDisabledText:function(){return di},buttonPrimaryShadow:function(){return ci},buttonPrimaryText:function(){return ii},buttonPrimaryTextHover:function(){return ai},cardBackground:function(){return Qr},cardBorder:function(){return Xr},cardShadow:function(){return Jr},errorAccent:function(){return Li},errorBackground:function(){return Mi},errorText:function(){return Ni},formInputBackground:function(){return Fi},formInputBackgroundSelected:function(){return Wi},formInputBackgroundSelection:function(){return Ui},formInputBorder:function(){return zi},formInputBorderSelected:function(){return Vi},formInputShadowSelected:function(){return Qi},formInputText:function(){return $i},formInputTextHighlight:function(){return Xi},formInputTextPlaceholder:function(){return Yi},formInputTextPlaceholderSelected:function(){return Gi},formInputTextReadOnlySelection:function(){return Hi},formInputTextSelected:function(){return qi},formInputTextSelection:function(){return Ki},formLabelText:function(){return Bi},menuBackground:function(){return _o},menuBorder:function(){return Lo},menuBorderHover:function(){return Bo},menuItemBackground:function(){return Ao},menuItemBackgroundHover:function(){return Zo},menuItemText:function(){return Po},menuItemTextHeader:function(){return No},menuItemTextHover:function(){return Ro},menuItemTextSelected:function(){return Mo},modalBackground:function(){return Gr},modalBorder:function(){return Kr},noticeAccent:function(){return Ai},noticeBackground:function(){return Di},noticeText:function(){return _i},pageBackground:function(){return Lr},pageBackgroundBottomRight:function(){return Wr},pageBackgroundLineBottom:function(){return Hr},pageBackgroundLineMid:function(){return zr},pageBackgroundLineTop:function(){return Ur},pageBackgroundModalActive:function(){return Br},pageBackgroundTopLeft:function(){return Fr},pageText:function(){return Vr},pageTextLink:function(){return Yr},pageTextPositive:function(){return qr},pageTextSubdued:function(){return $r},pillBackground:function(){return Ji},pillBackgroundSelected:function(){return na},pillBorder:function(){return ta},pillBorderSelected:function(){return oa},pillText:function(){return ea},pillTextSelected:function(){return ra},sidebarBackground:function(){return bo},sidebarItemAccent:function(){return ko},sidebarItemAccentHover:function(){return jo},sidebarItemAccentSelected:function(){return Co},sidebarItemBackground:function(){return wo},sidebarItemBackgroundHover:function(){return So},sidebarItemBackgroundSelected:function(){return xo},sidebarItemText:function(){return Eo},sidebarItemTextHover:function(){return Oo},sidebarItemTextSelected:function(){return To},tableBackground:function(){return eo},tableBorder:function(){return co},tableBorderHover:function(){return ho},tableBorderSelected:function(){return fo},tableBorderSeparator:function(){return po},tableHeaderBackground:function(){return uo},tableHeaderText:function(){return so},tableRowBackgroundHighlight:function(){return go},tableRowBackgroundHighlightText:function(){return mo},tableRowBackgroundHover:function(){return to},tableRowHeaderBackground:function(){return yo},tableRowHeaderText:function(){return vo},tableText:function(){return no},tableTextEditing:function(){return io},tableTextEditingBackground:function(){return ao},tableTextHover:function(){return oo},tableTextInactive:function(){return lo},tableTextSelected:function(){return ro},tooltipBackground:function(){return Io},tooltipBorder:function(){return Do},warningAccent:function(){return Ri},warningBackground:function(){return Zi},warningText:function(){return Pi}});const a="#733309",l="#87540d",s="#B88115",u="#D4A31C",c="#E6BB20",d="#F2D047",f="#F5E35D",h="#FCF088",p="#FFF7C4",g="#FFFBEA",m="#FFFEFA",y="#610316",v="#8A041A",b="#AB091E",w="#CF1124",x="#E12D39",S="#EF4E4E",k="#F86A6A",C="#FF9B9B",j="#FFBDBD",E="#FFE3E3",T="#FFF1F1",O="#034388",I="#0B5FA3",D="#1271BF",_="#1980D4",A="#2B8FED",Z="#40A5F7",P="#66B5FA",R="#8BCAFD",M="#B3D9FF",N="#E3F0FF",L="#F5FCFF",B="#102A43",F="#243B53",W="#334E68",U="#486581",z="#627D98",H="#829AB1",V="#9FB3C8",$="#BCCCDC",q="#D9E2EC",Y="#E8ECF0",G="#F7FAFC",K="#014D40",Q="#0C6B58",X="#147D64",J="#199473",ee="#27AB83",te="#3EBD93",ne="#65D6AD",re="#8EEDC7",oe="#C6F7E2",ie="#EFFCF6",ae="#FAFFFD",le="#44056E",se="#580A94",ue="#690CB0",ce="#7A0ECC",de="#8719E0",fe="#9446ED",he="#A368FC",pe="#B990FF",ge="#DAC4FF",me="#F2EBFE",ye="#F9F6FE",ve=Y,be="#fafafa",we=M;var xe=n(86634),Se=n(79515),ke=n(85761);const Ce={veryLargeText:{fontSize:30,fontWeight:600},largeText:{fontSize:20,fontWeight:700,letterSpacing:.5},mediumText:{fontSize:15,fontWeight:500},smallText:{fontSize:13,[`@media (min-width: ${ke.Z.breakpoint_small})`]:{}},verySmallText:{fontSize:13},page:{flex:1,"@media (max-height: 550px)":{minHeight:700},paddingTop:8,[`@media (min-width: ${ke.Z.breakpoint_small})`]:{paddingTop:36}},pageHeader:{fontSize:25,borderBottomWidth:5,borderStyle:"solid",display:"inline",flex:0,marginTop:40,marginBottom:20,paddingBottom:5},pageContent:{paddingLeft:2,paddingRight:2,[`@media (min-width: ${ke.Z.breakpoint_small})`]:{paddingLeft:20,paddingRight:20}},settingsPageContent:{padding:20,[`@media (min-width: ${ke.Z.breakpoint_small})`]:{padding:"inherit"}},staticText:{cursor:"default",userSelect:"none"},shadow:{boxShadow:"0 2px 4px 0 rgba(0,0,0,0.1)"},shadowLarge:{boxShadow:"0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)"},tnum:{fontFeatureSettings:'"tnum"'},notFixed:{fontFeatureSettings:""},header:{headerStyle:{backgroundColor:"white",borderBottomWidth:1,borderBottomColor:q,elevation:0},headerTintColor:B,headerTitleStyle:{color:B,fontSize:15,fontWeight:600},headerBackTitle:null},text:{fontSize:16},textColor:B,delayedFadeIn:{animationName:(0,xe.F4)({"0%":{opacity:0},"100%":{opacity:1}}),animationDuration:"1s",animationFillMode:"both",animationDelay:"0.5s"},lightScrollbar:void 0,darkScrollbar:void 0,scrollbarWidth:void 0};let je=!1;function Ee(){Ce.lightScrollbar=!je&&{"& ::-webkit-scrollbar":{width:11,backgroundColor:"rgba(200, 200, 200, .2)"},"& ::-webkit-scrollbar-thumb":{width:7,borderRadius:30,backgroundClip:"padding-box",border:"2px solid rgba(0, 0, 0, 0)"},"& ::-webkit-scrollbar-thumb:vertical":{backgroundColor:"#d0d0d0"}},Ce.darkScrollbar=!je&&{"& ::-webkit-scrollbar":{width:7,backgroundColor:"rgba(0, 0, 0, 0)"},"& ::-webkit-scrollbar-thumb:vertical":{backgroundColor:"rgba(200, 200, 200, .5)"}},Ce.scrollbarWidth=je?0:13}if("web"===Se.OB){function da(){let e=document.createElement("div");e.innerHTML='<div style="width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;"/>',document.body.appendChild(e);let t=e.childNodes[0];return t.offsetWidth===t.clientWidth}je=da(),Ee(),window.addEventListener("focus",(()=>{je=da(),Ee()}))}const Te=()=>je;var Oe=n(71274);const Ie="#141520",De=G,_e=Y,Ae=q,Ze=$,Pe=V,Re=H,Me=z,Ne=U,Le=W,Be=F,Fe=B,We=N,Ue=M,ze=A,He=_,Ve=D,$e=I,qe=ae,Ye=re,Ge=ne,Ke=ee,Qe=Q,Xe=h,Je=f,et=d,tt=c,nt=l,rt=T,ot=C,it=x,at=v,lt=me,st=ge,ut=pe,ct=he,dt=fe,ft=de,ht=ce,pt=se,gt="#ffffff",mt="#000000",yt="#080811",vt=Ie,bt=Be,wt="#242733",xt=dt,St=Fe,kt=Ae,Ct=Ae,jt=Me,Et=dt,Tt=dt,Ot=Ie,It=Ne,Dt=Ie,_t=dt,At=Le,Zt=Be,Pt=Le,Rt=Ae,Mt=Ae,Nt=Re,Lt=mt,Bt=dt,Ft=Me,Wt=Pe,Ut=Le,zt=Ne,Ht=dt,Vt=ct,$t=Re,qt=pt,Yt=Ae,Gt=Le,Kt=Ae,Qt=Be,Xt=Be,Jt=Be,en=Le,tn=Be,nn=dt,rn=Le,on=Ae,an=dt,ln=Ae,sn=Ne,un=Me,cn=Ne,dn=Ne,fn=Me,hn=_e,pn=De,gn=Ze,mn=dt,yn=Be,vn=dt,bn=Le,wn=Le,xn=Ne,Sn=Ae,kn=Ae,Cn=dt,jn=ft,En=Ze,Tn=dt,On=_e,In=De,Dn="transparent",_n="rgba(200, 200, 200, .25)",An=Me,Zn=Qe,Pn=nt,Rn=Xe,Mn=Je,Nn=Rn,Ln=gt,Bn=Ln,Fn=dt,Wn=Fn,Un=Fn,zn="rgba(0, 0, 0, 0.6)",Hn=Le,Vn=Re,$n=Vn,qn=Ae,Yn=Ae,Gn=Be,Kn=Ne,Qn=Pe,Xn="rgba(0, 0, 0, 0.4)",Jn=Me,er=Be,tr=Me,nr=qn,rr=qn,or="transparent",ir="rgba(200, 200, 200, .3)",ar="rgba(200, 200, 200, .5)",lr=Jn,sr=or,ur=Qe,cr=Ge,dr=Ke,fr=nt,hr=Xe,pr=tt,gr=at,mr=ot,yr=it,vr=st,br=Be,wr=Le,xr=dt,Sr=Ne,kr=Be,Cr=dt,jr=Ae,Er=mt,Tr=Ae,Or=_e,Ir=Be,Dr=ut,_r=dt,Ar=Ne,Zr=Ze,Pr=Le,Rr=ht,Mr=Ae,Nr=dt,Lr=_e,Br=Ze,Fr=_e,Wr=Ue,Ur=gt,zr=_e,Hr=Ue,Vr="#272630",$r=Pe,qr=ft,Yr=He,Gr=gt,Kr=gt,Qr=gt,Xr=ft,Jr=Le,eo=gt,to=We,no=Le,ro=Le,oo=Fe,io=De,ao=ft,lo=Pe,so=Me,uo=De,co=Ae,fo=ft,ho=dt,po=Re,go=lt,mo=Le,yo=De,vo=Be,bo=$e,wo=$e,xo=$e,So=Ve,ko=$e,Co=ct,jo=Ve,Eo=_e,To=ct,Oo=De,Io=De,Do=De,_o=De,Ao=De,Zo=Ae,Po=Be,Ro=Be,Mo=Be,No=ht,Lo=_e,Bo=lt,Fo=$e,Wo=$e,Uo=Ve,zo=_e,Ho=De,Vo=ct,$o=ct,qo=Ve,Yo=ct,Go=_e,Ko=De,Qo="transparent",Xo="rgba(200, 200, 200, .25)",Jo=Me,ei=Qe,ti=nt,ni=Xe,ri=Je,oi=ni,ii=gt,ai=ii,li=ft,si=li,ui=li,ci="rgba(0, 0, 0, 0.3)",di=gt,fi=Pe,hi=fi,pi=Fe,gi=pi,mi=gt,yi=mi,vi=Ae,bi="rgba(0, 0, 0, 0.2)",wi=Re,xi=mi,Si=vi,ki=pi,Ci=pi,ji="transparent",Ei="rgba(100, 100, 100, .15)",Ti="rgba(100, 100, 100, .25)",Oi=wi,Ii=ji,Di=qe,_i=Ke,Ai=Ye,Zi=Xe,Pi=nt,Ri=et,Mi=rt,Ni=it,Li=ot,Bi=ze,Fi=De,Wi=gt,Ui=ft,zi=Pe,Hi=De,Vi=ft,$i=Le,qi=De,Yi=Pe,Gi=Ze,Ki=_e,Qi=ct,Xi=ft,Ji=Ae,ea=Be,ta=Ae,na=st,ra=Le,oa=ft;var ia=n(28993);const aa={light:i,dark:o},la=Object.keys(aa);function sa(){return(0,Oe.v9)((e=>{var t;return null===(t=e.prefs.global)||void 0===t?void 0:t.theme}))||"light"}function ua(){let e=sa(),t=aa[e],n=Object.keys(t).map((e=>` --color-${e}: ${t[e]};`)).join("\n");return(0,ia.jsx)("style",{children:`:root {\n${n}}`})}const ca=Object.fromEntries(Object.keys(i).map((e=>[e,`var(--color-${e})`])))},85761:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});const r={small:512,medium:730,wide:1100},o=Object.entries(r).reduce(((e,t)=>{let[n,r]=t;return e[`breakpoint_${n}`]=`${r}px`,e}),{});t.Z=o},22581:function(e,t,n){"use strict";n.d(t,{G_:function(){return d},Jb:function(){return u},cu:function(){return c},d7:function(){return f}});var r=n(83017),o=n(79274),i=n(77799),a=n(17877),l=n(28993);let s=Date.now();function u(){let e=(0,o.s0)(),t=c();return(0,r.useLayoutEffect)((()=>{window.__navigate=e,window.__pushModal=t}),[e,t]),null}function c(){let e=(0,o.s0)(),t=(0,o.TH)();return(0,r.useCallback)((function(n){return e(n,{state:{parent:t,_version:s,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}})}),[e,t])}function d(e){var t,n;return(null===(t=e.state)||void 0===t?void 0:t._version)!==s?null:(null===(n=e.state)||void 0===n?void 0:n.parent)||null}function f(e){let{render:t}=e,n=(0,o.TH)(),r=d(n),s=[n];for(;r;)s.unshift(r),r=d(r);let u=s[0],c=s.slice(1);return(0,l.jsxs)(i.$,{location:s[s.length-1],children:[t(u),c.map(((e,n)=>(0,l.jsx)(a.MD,{type:"modal",current:n===c.length-1,children:t(e)},e.key)))]})}},62914:function(e,t,n){"use strict";n.d(t,{M:function(){return u},Y:function(){return c}});var r=n(83017),o=n(47521),i=n.n(o),a=n(97156),l=n(28993);const s=(0,r.createContext)(void 0);function u(){return(0,r.useContext)(s)}function c(e){let{children:t}=e,n=(0,r.useMemo)((()=>function(){const e={},t=new(i())({max:1200}),n={};let r=!1;return new class{observeCell(t,r){return e[t]||(e[t]=[]),e[t].push(r),()=>{e[t]=e[t].filter((e=>e!==r)),0===e[t].length&&(n[t]=null)}}disableObservers(){r=!0}enableObservers(){r=!1}prewarmCache(e,n){t.set(e,n)}listen(){return(0,a.oL)("cells-changed",(function(o){r||o.forEach((r=>{const o=e[r.name];o&&(o.forEach((e=>e(r))),n[r.name]=Promise.resolve(r),t.set(r.name,r))}))}))}bind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global",r=arguments.length>1?arguments[1]:void 0,o=arguments.length>3?arguments[3]:void 0;r="string"===typeof r?{name:r,value:null}:r;let i=`${e}!${r.name}`,a=this.observeCell(i,o);if(t.has(i)&&o(t.get(i)),null!=n[i])n[i].then(o);else{const a=this.get(e,r.name);n[i]=a,a.then((e=>{n[i]===a&&(t.set(i,e),o(e))}))}return a}get(e,t){return(0,a.lW)("getCell",{sheetName:e,name:t})}getCellNames(e){return(0,a.lW)("getCellNamesInSheet",{sheetName:e})}createQuery(e,t,n){return(0,a.lW)("create-query",{sheetName:e,name:t,query:n.serialize()})}}}()),[]);return(0,r.useEffect)((()=>n.listen()),[n]),(0,l.jsx)(s.Provider,{value:n,children:t})}},73824:function(e,t,n){"use strict";n.d(t,{KT:function(){return a},Np:function(){return i},cT:function(){return s},ht:function(){return l},si:function(){return u}});var r=n(97156),o=n(15196);function i(e){return{type:o.wH,state:e}}function a(){return async e=>{n.g.Actual.applyAppUpdate(),e(i({updateInfo:null}))}}function l(e){return{type:o.HT,undoState:e}}function s(e,t){return()=>(0,r.lW)("upload-file-web",{filename:e,contents:t})}function u(){return()=>(0,r.lW)("app-focused")}},56740:function(e,t,n){"use strict";n.d(t,{$u:function(){return d},NK:function(){return h},Rb:function(){return u},S2:function(){return w},VM:function(){return g},aK:function(){return c},ef:function(){return v},ej:function(){return p},g4:function(){return x},il:function(){return b},nu:function(){return f},sX:function(){return m},xp:function(){return y}});var r=n(97156),o=n(76218),i=n(15196),a=n(73824),l=n(91669),s=n(46788);function u(e){return(t,n)=>{const{loadingText:r}=n().app;null!=r&&t((0,a.Np)({loadingText:e}))}}function c(){return async e=>{const t=await(0,r.lW)("get-budgets");e({type:i.Ud,budgets:t})}}function d(){return async e=>{const t=await(0,r.lW)("get-remote-files");e({type:i.Oi,files:t})}}function f(){return async(e,t)=>{const n=await(0,r.lW)("get-budgets"),o=await(0,r.lW)("get-remote-files");return e({type:i.GY,budgets:n,remoteFiles:o}),t().budgets.allFiles}}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return async i=>{i((0,a.Np)({loadingText:t}));let{error:u}=await(0,r.lW)("load-budget",{id:e,...n});if(u){let t=(0,o.FL)(u,e);if("out-of-sync-migrations"===u||"out-of-sync-data"===u)if("undefined"!==typeof window.confirm){window.confirm(t+" Make sure the app is up-to-date. Do you want to load a backup?")&&i((0,l.Ll)("load-backup",{budgetId:e}))}else alert(t+" Make sure the app is up-to-date.");else alert(t);i((0,a.Np)({loadingText:null}))}else i((0,l.Mr)()),await i((0,s.D0)()),i((0,a.Np)({loadingText:null}))}}function p(){return async(e,t)=>{const n=t().prefs.local;n&&n.id&&(e({type:i.DC}),e((0,a.Np)({loadingText:"Closing..."})),await(0,r.lW)("close-budget"),e((0,a.Np)({loadingText:null})),localStorage.getItem("SharedArrayBufferOverride")&&window.location.reload())}}function g(){return async(e,t)=>{let n=t().prefs.local;n&&n.id&&e({type:i.DC})}}function m(e,t){return async n=>{await(0,r.lW)("delete-budget",{id:e,cloudFileId:t}),await n(f())}}function y(){let{testMode:e=!1,demoMode:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async n=>{n((0,a.Np)({loadingText:e||t?"Making demo...":""})),t?await(0,r.lW)("create-demo-budget"):await(0,r.lW)("create-budget",{testMode:e}),n((0,l.Mr)()),await n(f()),await n((0,s.D0)()),n((0,a.Np)({loadingText:null}))}}function v(e,t){return async n=>{const{error:o}=await(0,r.lW)("import-budget",{filepath:e,type:t});if(o)throw new Error(o);n((0,l.Mr)()),await n((0,s.D0)()),window.__navigate("/budget")}}function b(e){return async t=>{let{error:n}=await(0,r.lW)("upload-budget",{id:e});return n?{error:n}:(await t(f()),{})}}function w(e){return async t=>{t((0,a.Np)({loadingText:"Downloading..."})),await t(p()),t(x(e,{replace:!0}))}}function x(e){let{replace:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async n=>{n((0,a.Np)({loadingText:"Downloading..."}));let{id:i,error:u}=await(0,r.lW)("download-budget",{fileId:e,replace:t});if(u){if("decrypt-failure"===u.reason){let r={hasExistingKey:u.meta&&u.meta.isMissingKey,cloudFileId:e,onSuccess:()=>{n(x(e,{replace:t}))}};n((0,l.Ll)("fix-encryption-key",r)),n((0,a.Np)({loadingText:null}))}else{if("file-exists"===u.reason)return alert(`A file with id \u201c${u.meta.id}\u201d already exists with the name \u201c${u.meta.name}.\u201d This file will be replaced. This probably happened because files were manually moved around outside of Actual.`),n(x(e,{replace:!0}));n((0,a.Np)({loadingText:null})),alert((0,o.Ip)(u))}return null}return await Promise.all([n((0,s.Pt)()),n(f()),n(h(i))]),n((0,a.Np)({loadingText:null})),i}}},17199:function(e,t,n){"use strict";n.r(t),n.d(t,{addGenericErrorNotification:function(){return a.R},addNotification:function(){return a.wN},applyBudgetAction:function(){return r.qu},closeAccount:function(){return r.Rc},closeAndDownloadBudget:function(){return k.S2},closeBudget:function(){return k.ej},closeBudgetUI:function(){return k.VM},closeModal:function(){return x.Mr},connectAccounts:function(){return h},connectGoCardlessAccounts:function(){return p},createAccount:function(){return r.o1},createBudget:function(){return k.xp},createCategory:function(){return r.k4},createGroup:function(){return r.sS},createPayee:function(){return r.fz},deleteBudget:function(){return k.sX},deleteCategory:function(){return r.uu},deleteGroup:function(){return r.iE},downloadBudget:function(){return k.g4},focused:function(){return C.si},forceCloseAccount:function(){return r.X_},getAccounts:function(){return r.T8},getCategories:function(){return r.CP},getPayees:function(){return r.WJ},getUserData:function(){return _.is},importBudget:function(){return k.ef},importTransactions:function(){return v},initiallyLoadPayees:function(){return r.Rr},linkAccount:function(){return f},loadAllFiles:function(){return k.nu},loadBackup:function(){return j},loadBudget:function(){return k.NK},loadBudgets:function(){return k.aK},loadGlobalPrefs:function(){return S.Pt},loadPrefs:function(){return S.D0},loadRemoteFiles:function(){return k.$u},loggedIn:function(){return _.Pl},makeBackup:function(){return E},markAccountFailed:function(){return s},markAccountRead:function(){return w},markAccountSuccess:function(){return u},moveCategory:function(){return r.Wr},moveCategoryGroup:function(){return r.eq},openAccountCloseModal:function(){return r.bJ},parseTransactions:function(){return y},popModal:function(){return x.GZ},pushModal:function(){return x.Ll},redo:function(){return r.KX},removeNotification:function(){return a.FV},reopenAccount:function(){return r.ly},replaceModal:function(){return x.OB},resetSync:function(){return O},saveGlobalPrefs:function(){return S.EY},savePrefs:function(){return S.p},setAccountsSyncing:function(){return l},setAppState:function(){return C.Np},setFailedAccounts:function(){return c},setLastTransaction:function(){return m},setLastUndoState:function(){return C.ht},setUndoEnabled:function(){return r.Ew},signOut:function(){return _.w7},sync:function(){return I},syncAccounts:function(){return g},syncAndDownload:function(){return D},undo:function(){return r.Yw},unlinkAccount:function(){return d},updateAccount:function(){return r.sG},updateApp:function(){return C.KT},updateCategory:function(){return r.yr},updateGroup:function(){return r.mD},updateNewTransactions:function(){return b},updateStatusText:function(){return k.Rb},uploadBudget:function(){return k.il},uploadFile:function(){return C.cT}});var r=n(98297),o=n(97156),i=n(15196),a=n(19122);function l(e){return{type:i._V,name:e}}function s(e,t,n){return{type:"ACCOUNT_SYNC_STATUS",id:e,failed:!0,errorType:t,errorCode:n}}function u(e){return{type:"ACCOUNT_SYNC_STATUS",id:e,failed:!1}}function c(e){return{type:i.Co,syncErrors:e}}function d(e){return async t=>{await(0,o.lW)("account-unlink",{id:e}),t(u(e)),t((0,r.T8)())}}function f(e,t,n){return async i=>{await(0,o.lW)("gocardless-accounts-link",{requisitionId:e,account:t,upgradingId:n}),await i((0,r.WJ)()),await i((0,r.T8)())}}function h(e,t,n,i){return async a=>{let l=await(0,o.lW)("accounts-connect",{institution:e,publicToken:t,accountIds:n,offbudgetIds:i});return await a((0,r.WJ)()),await a((0,r.T8)()),l}}function p(e,t,n,i){return async a=>{let l=await(0,o.lW)("gocardless-accounts-connect",{institution:e,publicToken:t,accountIds:n,offbudgetIds:i});return await a((0,r.WJ)()),await a((0,r.T8)()),l}}function g(e){return async(t,n)=>{if(n().account.accountsSyncing)return!1;if(e){let r=n().queries.accounts.find((t=>t.id===e));t(l(r.name))}else t(l("__all"));const{errors:r,newTransactions:d,matchedTransactions:f,updatedAccounts:h}=await(0,o.lW)("gocardless-accounts-sync",{id:e});if(t(l(null)),e){let n=r.find((t=>t.accountId===e));n?"SyncError"===n.type&&t(s(e,n.category,n.code)):t(u(e))}else t(c(r.filter((e=>"SyncError"===e.type)).map((e=>({id:e.accountId,type:e.category,code:e.code})))));return r.forEach((e=>{"SyncError"===e.type?t((0,a.wN)({type:"error",message:e.message})):t((0,a.wN)({type:"error",message:e.message,internal:e.internal}))})),t({type:i.GZ,newTransactions:d,matchedTransactions:f,updatedAccounts:h}),d.length>0||f.length>0}}function m(e){return{type:i.Vi,transaction:e}}function y(e,t){return async n=>await(0,o.lW)("transactions-parse-file",{filepath:e,options:t})}function v(e,t){return async n=>{let{errors:r=[],added:l,updated:s}=await(0,o.lW)("transactions-import",{accountId:e,transactions:t});return r.forEach((e=>{n((0,a.wN)({type:"error",message:e.message}))})),n({type:i.GZ,newTransactions:l,matchedTransactions:s,updatedAccounts:l.length>0?[e]:[]}),l.length>0||s.length>0}}function b(e){return{type:i.kY,changedId:e}}function w(e){return{type:i.ER,accountId:e}}var x=n(91669),S=n(46788),k=n(56740),C=n(73824);function j(e,t){return async(n,r)=>{const i=r().prefs.local;i&&i.id&&await n((0,k.ej)()),await(0,o.lW)("backup-load",{id:e,backupId:t}),n((0,k.NK)(e))}}function E(){return async(e,t)=>{const n=t().prefs.local;n&&n.id&&await(0,o.lW)("backup-make",{id:n.id})}}var T=n(76218);function O(){return async e=>{let{error:t}=await(0,o.lW)("sync-reset");t?(alert((0,T.wg)(t)),"encrypt-failure"===t.reason&&t.meta.isMissingKey||"file-has-new-key"===t.reason?e((0,x.Ll)("fix-encryption-key",{onSuccess:()=>{e(O())}})):"encrypt-failure"===t.reason&&e((0,x.Ll)("create-encryption-key",{recreate:!0}))):(await e(I()),await e((0,S.D0)()))}}function I(){return async(e,t)=>{const n=t().prefs.local;if(n&&n.id){let e=await(0,o.lW)("sync");return"error"in e?{error:e.error}:{}}}}function D(e){return async t=>{let n=await t(I());if(n.error)return{error:n.error};let r=await t(g(e));if(r){let e=await t(I());return!e.error||{error:e.error}}return{hasUpdated:r}}}var _=n(9169)},91669:function(e,t,n){"use strict";n.d(t,{GZ:function(){return a},Ll:function(){return o},Mr:function(){return l},OB:function(){return i}});var r=n(15196);function o(e,t){let n={name:e,options:t};return{type:r.jw,modal:n}}function i(e,t){let n={name:e,options:t};return{type:r.JA,modal:n}}function a(){return{type:r.TZ}}function l(){return{type:r.et}}},19122:function(e,t,n){"use strict";n.d(t,{FV:function(){return l},R:function(){return a},wN:function(){return i}});var r=n(5284),o=n(15196);function i(e){return{type:o.Dv,notification:{...e,id:e.id||(0,r.Z)()}}}function a(){return i({type:"error",message:"Something internally went wrong. You may want to restart the app if anything looks wrong. Please report this as a new issue on Github."})}function l(e){return{type:o.Kf,id:e}}},46788:function(e,t,n){"use strict";n.d(t,{D0:function(){return a},EY:function(){return u},Pt:function(){return s},p:function(){return l}});var r=n(97156),o=n(15196),i=n(91669);function a(){return async(e,t)=>{let n=await(0,r.lW)("load-prefs"),a=t().prefs.local;return n&&n.id&&!a&&e((0,i.Mr)()),e({type:o.px,prefs:n,globalPrefs:await(0,r.lW)("load-global-prefs")}),n}}function l(e){return async t=>{await(0,r.lW)("save-prefs",e),t({type:o.uF,prefs:e})}}function s(){return async(e,t)=>{let n=await(0,r.lW)("load-global-prefs");return e({type:o.px,prefs:t().prefs.local,globalPrefs:n}),n}}function u(e){return async t=>{await(0,r.lW)("save-global-prefs",e),t({type:o.CH,globalPrefs:e})}}},98297:function(e,t,n){"use strict";n.d(t,{CP:function(){return c},Ew:function(){return A},KX:function(){return P},Rc:function(){return E},Rr:function(){return w},T8:function(){return S},WJ:function(){return b},Wr:function(){return p},X_:function(){return O},Yw:function(){return Z},bJ:function(){return j},eq:function(){return g},fz:function(){return x},iE:function(){return v},k4:function(){return d},ly:function(){return T},mD:function(){return y},o1:function(){return C},qu:function(){return u},sG:function(){return k},sS:function(){return m},uu:function(){return f},yr:function(){return h}});var r=n(40337),o=n.n(r),i=n(97156),a=n(15196),l=n(91669),s=n(19122);function u(e,t,n){return async r=>{switch(t){case"budget-amount":await(0,i.lW)("budget/budget-amount",{month:e,category:n.category,amount:n.amount});break;case"copy-last":await(0,i.lW)("budget/copy-previous-month",{month:e});break;case"set-zero":await(0,i.lW)("budget/set-zero",{month:e});break;case"set-3-avg":await(0,i.lW)("budget/set-3month-avg",{month:e});break;case"check-templates":r((0,s.wN)(await(0,i.lW)("budget/check-templates")));break;case"apply-goal-template":await(0,i.lW)("budget/apply-goal-template",{month:e});break;case"overwrite-goal-template":await(0,i.lW)("budget/overwrite-goal-template",{month:e});break;case"cleanup-goal-template":r((0,s.wN)(await(0,i.lW)("budget/cleanup-goal-template",{month:e})));break;case"hold":await(0,i.lW)("budget/hold-for-next-month",{month:e,amount:n.amount});break;case"reset-hold":await(0,i.lW)("budget/reset-hold",{month:e});break;case"cover":await(0,i.lW)("budget/cover-overspending",{month:e,to:n.to,from:n.from});break;case"transfer-available":await(0,i.lW)("budget/transfer-available",{month:e,amount:n.amount,category:n.category});break;case"transfer-category":await(0,i.lW)("budget/transfer-category",{month:e,amount:n.amount,from:n.from,to:n.to});break;case"carryover":await(0,i.lW)("budget/set-carryover",{startMonth:e,category:n.category,flag:n.flag});break;case"apply-single-category-template":await(0,i.lW)("budget/apply-single-template",{month:e,category:n.category});break;case"set-single-3-avg":await(0,i.lW)("budget/set-n-month-avg",{month:e,N:3,category:n.category});break;case"set-single-6-avg":await(0,i.lW)("budget/set-n-month-avg",{month:e,N:6,category:n.category});break;case"set-single-12-avg":await(0,i.lW)("budget/set-n-month-avg",{month:e,N:12,category:n.category});break;case"copy-single-last":await(0,i.lW)("budget/copy-single-month",{month:e,category:n.category})}}}function c(){return async e=>{const t=await(0,i.lW)("get-categories");return e({type:a.X6,categories:t}),t}}function d(e,t,n){return async r=>{let o=await(0,i.lW)("category-create",{name:e,groupId:t,isIncome:n});return r(c()),o}}function f(e,t){return async n=>{let{error:r}=await(0,i.lW)("category-delete",{id:e,transferId:t});if(r){if("category-type"===r)n((0,s.wN)({type:"error",message:"A category must be transferred to another of the same type (expense or income)"}));else n((0,s.R)());throw new Error(r)}n(c()),n(b())}}function h(e){return async t=>{await(0,i.lW)("category-update",e),t(c())}}function p(e,t,n){return async r=>{await(0,i.lW)("category-move",{id:e,groupId:t,targetId:n}),await r(c())}}function g(e,t){return async n=>{await(0,i.lW)("category-group-move",{id:e,targetId:t}),await n(c())}}function m(e){return async t=>{let n=await(0,i.lW)("category-group-create",{name:e});return t(c()),n}}function y(e){const{categories:t,...n}=e;return async e=>{await(0,i.lW)("category-group-update",n),await e(c())}}function v(e,t){return async function(n,r){await(0,i.lW)("category-group-delete",{id:e,transferId:t}),await n(c()),await n(b())}}function b(){return async e=>{let t=await(0,i.lW)("payees-get");return e({type:a.gp,payees:t}),t}}function w(){return async(e,t)=>{if(0===t().queries.payees.length)return e(b())}}function x(e){return async()=>(0,i.lW)("payee-create",{name:e.trim()})}function S(){return async e=>{const t=await(0,i.lW)("accounts-get");return e({type:a.WF,accounts:t}),t}}function k(e){return async t=>{t({type:a.$E,account:e}),await(0,i.lW)("account-update",e)}}function C(e,t,n){return async r=>{let o=await(0,i.lW)("account-create",{name:e,balance:t,offBudget:n});return await r(S()),await r(b()),o}}function j(e){return async(t,n)=>{const{balance:r,numTransactions:o}=await(0,i.lW)("account-properties",{id:e}),a=n().queries.accounts.find((t=>t.id===e));t((0,l.Ll)("close-account",{account:a,balance:r,canDelete:0===o}))}}function E(e,t,n,r){return async o=>{await(0,i.lW)("account-close",{id:e,transferAccountId:t,categoryId:n,forced:r}),o(S())}}function T(e){return async t=>{await(0,i.lW)("account-reopen",{id:e}),t(S())}}function O(e){return E(e,null,null,!0)}let I=o()((()=>(0,i.lW)("undo")),100),D=o()((()=>(0,i.lW)("redo")),100),_=!0;function A(e){_=e}function Z(){return async()=>{_&&I()}}function P(){return async()=>{_&&D()}}},9169:function(e,t,n){"use strict";n.d(t,{Pl:function(){return s},is:function(){return l},w7:function(){return u}});var r=n(97156),o=n(15196),i=n(56740),a=n(46788);function l(){return async e=>{const t=await(0,r.lW)("subscribe-get-user");return e({type:o.q1,data:t}),t}}function s(){return async e=>{await e(l()),e((0,i.nu)())}}function u(){return async e=>{await(0,r.lW)("subscribe-sign-out"),e(l()),e((0,a.Pt)()),e((0,i.ej)()),e({type:o.dp})}}},15196:function(e,t,n){"use strict";n.d(t,{$E:function(){return s},CH:function(){return h},Co:function(){return D},DC:function(){return y},Dv:function(){return k},ER:function(){return a},GY:function(){return m},GZ:function(){return r},HT:function(){return E},JA:function(){return w},Kf:function(){return C},Oi:function(){return g},TZ:function(){return S},Ud:function(){return p},VM:function(){return T},Vi:function(){return i},WF:function(){return l},X6:function(){return u},_V:function(){return O},cV:function(){return I},dp:function(){return _},et:function(){return x},gp:function(){return c},jw:function(){return b},kY:function(){return o},px:function(){return d},q1:function(){return j},uF:function(){return f},wH:function(){return v}});const r="SET_NEW_TRANSACTIONS",o="UPDATE_NEW_TRANSACTIONS",i="SET_LAST_TRANSACTION",a="MARK_ACCOUNT_READ",l="LOAD_ACCOUNTS",s="UPDATE_ACCOUNT",u="LOAD_CATEGORIES",c="LOAD_PAYEES",d="SET_PREFS",f="MERGE_LOCAL_PREFS",h="MERGE_GLOBAL_PREFS",p="SET_BUDGETS",g="SET_REMOTE_FILES",m="SET_ALL_FILES",y="CLOSE_BUDGET",v="SET_APP_STATE",b="PUSH_MODAL",w="REPLACE_MODAL",x="CLOSE_MODAL",S="POP_MODAL",k="ADD_NOTIFICATION",C="REMOVE_NOTIFICATION",j="GET_USER_DATA",E="SET_LAST_UNDO_STATE",T="SET_LAST_SPLIT_STATE",O="SET_ACCOUNTS_SYNCING",I="ACCOUNT_SYNC_STATUS",D="ACCOUNT_SYNC_FAILURES",_="SIGN_OUT"},15068:function(e,t,n){"use strict";n.d(t,{BB:function(){return u},Re:function(){return c},gM:function(){return d}});var r=n(83017),o=n(99121),i=n(84214),a=n(5499),l=n(28993);let s=(0,r.createContext)(null);function u(e){let{children:t}=e,n=(0,i.y)((()=>(0,o.ZP)("accounts").select("*")),[]);return(0,l.jsx)(s.Provider,{value:n,children:t})}function c(e){let{children:t,idKey:n}=e;return t(d({idKey:n}))}function d(){let{idKey:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.useContext)(s);return e&&t?(0,a.gI)(t):t}},26018:function(e,t,n){"use strict";n.d(t,{m:function(){return a}});var r=n(83017),o=n(99121),i=n(84214);function a(){const e=((0,i.y)((()=>(0,o.ZP)("transaction_filters").select("*")),[])||[]).map((e=>({...e.fields,id:e.id,name:e.name,tombstone:e.tombstone,conditionsOp:e.conditions_op,conditions:e.conditions})));return(0,r.useMemo)((()=>function(e){return e.sort(((e,t)=>e.name.trim().localeCompare(t.name.trim(),{ignorePunctuation:!0})))}(e)),[e])}},69476:function(e,t,n){"use strict";n.d(t,{Zr:function(){return u},mp:function(){return c},n4:function(){return d}});var r=n(83017),o=n(99121),i=n(84214),a=n(5499),l=n(28993);let s=(0,r.createContext)(null);function u(e){let{children:t}=e,n=(0,i.y)((()=>(0,o.ZP)("payees").select("*")),[]);return(0,l.jsx)(s.Provider,{value:n,children:t})}function c(e){let{children:t,idKey:n}=e;return t(d({idKey:n}))}function d(){let{idKey:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.useContext)(s);return e&&t?(0,a.yG)(t):t}},33865:function(e,t,n){"use strict";n.d(t,{gZ:function(){return l},oF:function(){return c},up:function(){return u}});var r=n(83017),o=n(88370),i=n(99121),a=n(28993);function l(){let{transform:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=(0,r.useState)(null);return(0,r.useEffect)((()=>{let t,r,a=(0,i.ZP)("schedules").select("*");return t=(0,i.Y1)(e?e(a):a,(async e=>{t&&(r&&r.unsubscribe(),r=function(e,t){return(0,i.Y1)((0,o.eJ)(e),t,{mapper:t=>{let n=new Set(t.filter(Boolean).map((e=>e.schedule)));return new Map(e.map((e=>[e.id,(0,o.lR)(e.next_date,e.completed,n.has(e.id))])))}})}(e,(t=>n({schedules:e,statuses:t}))))})),()=>{t&&t.unsubscribe(),r&&r.unsubscribe()}}),[e]),t}let s=(0,r.createContext)(null);function u(e){let{transform:t,children:n}=e,r=l({transform:t});return(0,a.jsx)(s.Provider,{value:r,children:n})}function c(){return(0,r.useContext)(s)}},79515:function(e,t,n){"use strict";var r;n.d(t,{OB:function(){return l},OS:function(){return a},jU:function(){return s}});const o=navigator.platform&&"win32"===navigator.platform.toLowerCase(),i=navigator.platform&&navigator.platform.toUpperCase().indexOf("MAC")>=0,a=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o?"windows":i?"mac":"linux"),l="web",s=!(null===(r=window.Actual)||void 0===r||!r.IS_FAKE_WEB)},28321:function(e,t,n){"use strict";n.d(t,{An:function(){return p},Gm:function(){return f},PK:function(){return s},SZ:function(){return h},aK:function(){return y},cW:function(){return d},jS:function(){return c},sX:function(){return m},u8:function(){return v},yf:function(){return u}});var r=n(3189),o=n(48664),i=n(24917),a=n(57968),l=n(69585);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"account";return e?"budgeted"===e?{[`${t}.offbudget`]:!1,[`${t}.closed`]:!1}:"offbudget"===e?{[`${t}.offbudget`]:!0,[`${t}.closed`]:!1}:"uncategorized"===e?{[`${t}.offbudget`]:!1,category:null,is_parent:!1,$or:[{"payee.transfer_acct.offbudget":!0,"payee.transfer_acct":null}]}:{[t]:e}:null}function u(e){let t=(0,a.ZP)("transactions").options({splits:"grouped"}),n=s(e);return n&&(t=t.filter(n)),t}function c(e,t,n){let a,s=(0,l.Dz)(t);return a=(0,i.Ze)(n).test(t)?(0,r.Z)(t,(0,i.D1)(n),new Date):(0,i._y)(n).test(t)?(0,r.Z)(t,(0,i.JC)(n),new Date):(0,r.Z)(t,n,new Date),e.filter({$or:{"payee.name":{$like:`%${t}%`},notes:{$like:`%${t}%`},"category.name":{$like:`%${t}%`},"account.name":{$like:`%${t}%`},$or:[(0,o.Z)(a)&&{date:(0,i.is)(a)},null!=s&&{amount:{$transform:"$abs",$eq:(0,l.l9)(s)}},null!=s&&Number.isInteger(s)&&{amount:{$transform:{$abs:{$idiv:["$",100]}},$eq:s}}].filter(Boolean)}})}function d(e){return{name:`balance-${e.id}`,query:(0,a.ZP)("transactions").filter({account:e.id}).options({splits:"none"}).calculate({$sum:"$amount"})}}function f(){return{query:(0,a.ZP)("transactions").filter({"account.closed":!1}).calculate({$sum:"$amount"}),name:"accounts-balance"}}function h(){return{name:"budgeted-accounts-balance",query:(0,a.ZP)("transactions").filter({"account.offbudget":!1,"account.closed":!1}).calculate({$sum:"$amount"})}}function p(){return{name:"offbudget-accounts-balance",query:(0,a.ZP)("transactions").filter({"account.offbudget":!0,"account.closed":!1}).calculate({$sum:"$amount"})}}let g=(0,a.ZP)("transactions").filter({"account.offbudget":!1,category:null,$or:[{"payee.transfer_acct.offbudget":!0,"payee.transfer_acct":null}]});function m(){return{name:"uncategorized-amount",query:g.calculate({$count:"$id"})}}const y={incomeAvailable:"available-funds",lastMonthOverspent:"last-month-overspent",forNextMonth:"buffered",totalBudgeted:"total-budgeted",toBudget:"to-budget",fromLastMonth:"from-last-month",totalIncome:"total-income",totalSpent:"total-spent",totalBalance:"total-leftover",groupSumAmount:e=>`group-sum-amount-${e}`,groupIncomeReceived:"total-income",groupBudgeted:e=>`group-budget-${e}`,groupBalance:e=>`group-leftover-${e}`,catBudgeted:e=>`budget-${e}`,catSumAmount:e=>`sum-amount-${e}`,catBalance:e=>`leftover-${e}`,catCarryover:e=>`carryover-${e}`},v={totalBudgetedExpense:"total-budgeted",totalBudgetedIncome:"total-budget-income",totalBudgetedSaved:"total-saved",totalIncome:"total-income",totalSpent:"total-spent",totalSaved:"real-saved",totalLeftover:"total-leftover",groupSumAmount:e=>`group-sum-amount-${e}`,groupIncomeReceived:"total-income",groupBudgeted:e=>`group-budget-${e}`,groupBalance:e=>`group-leftover-${e}`,catBudgeted:e=>`budget-${e}`,catSumAmount:e=>`sum-amount-${e}`,catBalance:e=>`leftover-${e}`,catCarryover:e=>`carryover-${e}`}},99121:function(e,t,n){"use strict";n.d(t,{Zn:function(){return u},ZP:function(){return i},Y1:function(){return l},Fr:function(){return s},Vn:function(){return a}});var r=n(97156);var o=n(57968),i=o.ZP;async function a(e){return(0,r.lW)("query",e.serialize())}function l(e,t,n){let r=new u(e,t,n);return r.run(),r}function s(e,t,n){let r=new c(e,t,n);return r.run(),r}class u{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this._unsubscribe=void 0,this.data=void 0,this.dependencies=void 0,this.error=void 0,this.listeners=void 0,this.mappedData=void 0,this.mapper=void 0,this.onlySync=void 0,this.query=void 0,this.inflight=void 0,this.inflightRequestId=void 0,this.restart=void 0,this.onData=(e,t)=>{for(let n=0;n<this.listeners.length;n++)this.listeners[n](e,t)},this.onUpdate=e=>{(null==this.dependencies||e.find((e=>this.dependencies.has(e))))&&this.run()},this.run=()=>(this.subscribe(),this._fetchData((()=>a(this.query)))),this._fetchData=async e=>{let t=Math.random();this.inflightRequestId=t;let{data:n,dependencies:r}=await e();if(null==this.dependencies&&(this.dependencies=new Set(r)),this.inflightRequestId===t&&this._unsubscribe){let e=this.mappedData;this.data=n,this.mappedData=this.mapData(n),this.onData(this.mappedData,e),this.inflightRequestId=null}},this.subscribe=()=>{null==this._unsubscribe&&(this._unsubscribe=(0,r.oL)("sync-event",(e=>{let{type:t,tables:n}=e;-1!==(this.onlySync?["success"]:["applied","success"]).indexOf(t)&&this.onUpdate(n)})))},this.unsubscribe=()=>{this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)},this.mapData=e=>this.mapper?this.mapper(e):e,this.getQuery=()=>this.query,this.getData=()=>this.mappedData,this.getNumListeners=()=>this.listeners.length,this.isRunning=()=>null!=this._unsubscribe,this._optimisticUpdate=(e,t)=>{this.data=e(this.data),this.mappedData=t(this.mappedData)},this.optimisticUpdate=(e,t)=>{let n=this.mappedData;this._optimisticUpdate(e,t),this.onData(this.mappedData,n)},this.error=new Error,this.query=e,this.data=null,this.mappedData=null,this.dependencies=null,this.mapper=n.mapper,this.onlySync=n.onlySync,this.listeners=[],this.inflight=!1,this.restart=!1,t&&this.addListener(t)}addListener(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter((t=>t!==e))}}}class c extends u{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(e,t,n),this.done=void 0,this.onPageData=void 0,this.pageCount=void 0,this.runPromise=void 0,this.totalCount=void 0,this._fetchCount=()=>a(this.query.calculate({$count:"*"})).then((e=>{let{data:t}=e;this.totalCount=t})),this.run=()=>(this.subscribe(),this.runPromise=this._fetchData((async()=>(this.done=!1,this._fetchCount(),a(this.query.limit(null==this.data?this.pageCount:Math.max(this.data.length,this.pageCount)))))),this.runPromise),this.refetchUpToRow=async(e,t)=>(this.runPromise=this._fetchData((async()=>{this.done=!1,this._fetchCount();let n=(0,o.zW)(this.query,t);if(null==n)throw new Error("refetchUpToRow requires a query with orderBy");let{field:r,order:i}=n,l=await a(this.query.filter({id:e}).select(r));if(0===l.data.length)return;let s=l.data[0];l=await a(this.query.filter({[r]:{["asc"===i?"$lte":"$gte"]:s[r]}}));let u=l.data;return l=await a(this.query.filter({[r]:{["asc"===i?"$gt":"$lt"]:s[r]}}).limit(this.pageCount)),{data:u.concat(l.data),dependencies:l.dependencies}})),this.runPromise),this._fetchNext=async()=>{for(;this.inflightRequestId;)await this.runPromise;let e=this.data;if(!this.done){let{data:t}=await a(this.query.limit(this.pageCount).offset(e.length));if(this.inflightRequestId||e!==this.data)return this._fetchNext();if(0===t.length)this.done=!0;else{this.done=t.length<this.pageCount,this.data=this.data.concat(t);let e=this.mappedData,n=this.mapData(t);this.mappedData=this.mappedData.concat(n),this.onPageData(n),this.onData(this.mappedData,e)}}},this.fetchNext=function(e){let t=null;return function(){return t||(t=e(...arguments).finally((()=>{t=null})),t)}}(this._fetchNext),this.isFinished=()=>this.done,this.getTotalCount=()=>this.totalCount,this.optimisticUpdate=(e,t)=>{let n=this.data,r=this.mappedData;this._optimisticUpdate(e,t),this.totalCount+=this.data.length-n.length,this.onData(this.mappedData,r)},this.totalCount=null,this.pageCount=n.pageCount||500,this.runPromise=null,this.done=!1,this.onPageData=n.onPageData||(()=>{})}}},84214:function(e,t,n){"use strict";n.d(t,{n:function(){return a},y:function(){return l}});var r=n(83017),o=n(99121),i=n(28993);function a(e,t){return function(e,t,n){let o=new n(e,null,t),a=(0,r.createContext)(null);return{Provider:function(e){let{children:t}=e,[n,l]=(0,r.useState)(o.getData()),s=(0,r.useMemo)((()=>({data:n,query:o})),[n,o]);return(0,r.useEffect)((()=>{if(0!==o.getNumListeners())throw new Error("Query already has listeners. You cannot use the same query context `Provider` twice");let e=o.addListener((e=>l(e)));return o.isRunning()||o.run(),l(o.getData()),()=>{e(),o.unsubscribe()}}),[]),(0,i.jsx)(a.Provider,{value:s,children:t})},useQuery:function(){let e=(0,r.useContext)(a);if(null==e)throw new Error("`useQuery` tried to access a query that hasn\u2019t been run. You need to put its `Provider` in a parent component");return e}}}(e,t,o.Zn)}function l(e,t){let[n,i]=(0,r.useState)(null),a=(0,r.useMemo)(e,t);return(0,r.useEffect)((()=>{let e=(0,o.Y1)(a,(async t=>{e&&i(t)}));return()=>{e.unsubscribe(),e=null}}),[a]),n}},5499:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l},ch:function(){return c},gI:function(){return s},nc:function(){return d},yG:function(){return u}});var r=n(51678),o=n(69585),i=n(15196);const a={newTransactions:[],matchedTransactions:[],lastTransaction:null,updatedAccounts:[],accounts:[],categories:{grouped:[],list:[]},payees:[],earliestTransaction:null};function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case i.GZ:return{...e,newTransactions:t.newTransactions||[],matchedTransactions:t.matchedTransactions||[],updatedAccounts:t.updatedAccounts||[]};case i.kY:return{...e,newTransactions:e.newTransactions.filter((e=>e!==t.changedId)),matchedTransactions:e.matchedTransactions.filter((e=>e!==t.changedId))};case i.Vi:return{...e,lastTransaction:t.transaction};case i.ER:return{...e,updatedAccounts:e.updatedAccounts.filter((e=>e!==t.accountId))};case i.WF:return{...e,accounts:t.accounts};case i.$E:return{...e,accounts:e.accounts.map((e=>e.id===t.account.id?{...e,...t.account}:e))};case i.X6:return{...e,categories:t.categories};case i.gp:return{...e,payees:t.payees}}return e}const s=(0,r.Z)((e=>(0,o.ZZ)(e))),u=(0,r.Z)((e=>(0,o.ZZ)(e))),c=(0,r.Z)((e=>{let t={};return e.forEach((e=>{e.categories.forEach((e=>{t[e.id]=e}))})),t})),d=(0,r.Z)(((e,t)=>{let n=s(t);return e.filter((e=>{if(e.transfer_acct){let t=n[e.transfer_acct];return null!=t&&!t.closed}return!0}))}))},97156:function(e,t,n){"use strict";n.d(t,{S1:function(){return d},oL:function(){return p},lW:function(){return f},OK:function(){return h},Ev:function(){return g}});var r=n(5284);var o=n(41936);let i=new Map,a=new Map,l=[],s=null;class u extends Error{constructor(e,t,n,r,o){super(e),this.url=void 0,this.line=void 0,this.column=void 0,this.name=this.constructor.name,this.message=e,Object.defineProperty(this,"stack",{get:function(){return"extended "+this._stack},set:function(e){this._stack=e}}),this.stack=t,this.url=n,this.line=r,this.column=o}}function c(e,t,n){s=e,e.onmessage=r=>{let s=r.data;var c;"connect"===s.type?(l.length>0&&(l.forEach((t=>e.postMessage(t))),l=null),t()):"app-init-failure"===s.type?n(s):"capture-exception"===s.type?(c=s.stack?new u(s.message,s.stack,s.url,s.line,s.column):s.exc,console.log("[Exception]",c),s.message&&s.message.includes("indexeddb-quota-error")&&alert("We hit a limit on the local storage available. Edits may not be saved. Please get in touch https://actualbudget.org/contact/ so we can help debug this.")):"capture-breadcrumb"===s.type?s.data:function(e){if("error"===e.type){const{id:t}=e;i.delete(t)}else if("reply"===e.type){const{id:t,result:n,mutated:r,undoTag:a}=e,l=i.get(t);l&&(i.delete(t),r||o.gc(a),l.resolve(n))}else if("push"===e.type){const{name:t,args:n}=e,r=a.get(t);if(r)for(let e=0;e<r.length&&!0!==r[e](n);e++);}else if(!e.type.startsWith("__"))throw new Error("Unknown message type: "+JSON.stringify(e))}(s)},e instanceof MessagePort&&e.start()}const d=async function(e){return new Promise(((t,n)=>c(e,t,n)))},f=function(e,t){let{catchErrors:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((a,u)=>{let c=(0,r.Z)();i.set(c,{resolve:a,reject:u});let d={id:c,name:e,args:t,undoTag:o.CO(),catchErrors:n};l?l.push(d):s.postMessage(d)}))},h=function(e,t){return f(e,t,{catchErrors:!0})},p=function(e,t){return a.get(e)||a.set(e,[]),a.get(e).push(t),()=>{let n=a.get(e);a.set(e,n.filter((e=>e!==t)))}},g=function(e){a.set(e,[])}},41936:function(e,t,n){"use strict";n.d(t,{CO:function(){return u},a2:function(){return l},gc:function(){return c},kp:function(){return a},r8:function(){return s}});var r=n(5284);let o=[],i={url:null,openModal:null,selectedItems:null};const a=function(e,t){i[e]=t,i.id=(0,r.Z)()},l=function(e){return i[e]},s=function(e){return o.find((t=>t.id===e))},u=function(){let e={...i,id:(0,r.Z)()};return o.unshift(e),o=o.slice(0,40),e.id},c=function(e){o=o.filter((t=>t.id!==e))}},14812:function(e,t,n){"use strict";function r(){return"true"===String({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BACKEND_WORKER_HASH:"73a03b9f0217ad62df42"}.REACT_APP_NETLIFY)||!1}function o(){return navigator.userAgent.indexOf("Electron")>=0}n.d(t,{Ry:function(){return r},d:function(){return o}})},76218:function(e,t,n){"use strict";function r(e){let{reason:t,meta:n}=e;switch(t){case"unauthorized":return"You are not logged in.";case"encrypt-failure":return n.isMissingKey?"Encrypting your file failed because you are missing your encryption key. Create your key in the next step.":"Encrypting the file failed. You have the correct key so this is an internal bug. To fix this, generate a new key in the next step.";case"file-has-reset":return"Something went wrong while resetting your file. Please try again.";case"file-has-new-key":return"Unable to encrypt your data because you are missing the key. Create the latest key in the next step.";case"network":return"Uploading the file failed. Check your network connection.";default:return`An internal error occurred, sorry! Visit https://actualbudget.org/contact/ for support. (ref: ${t})`}}function o(e){let{reason:t,meta:n,fileName:r}=e;switch(t){case"network":case"download-failure":return"Downloading the file failed. Check your network connection.";case"not-zip-file":case"invalid-zip-file":case"invalid-meta-file":return"Downloaded file is invalid, sorry! Visit https://actualbudget.org/contact/ for support.";case"decrypt-failure":return"Unable to decrypt file "+(r||"(unknown)")+". To change your key, first download this file with the proper password.";case"out-of-sync-migrations":return"This budget cannot be loaded with this version of the app. Make sure the app is up-to-date.";default:return`Something went wrong trying to download that file, sorry! Visit https://actualbudget.org/contact/ for support. (reason: ${t}${n&&n.fileId?`, fileId: ${n.fileId}`:""})`}}function i(e){return r(e)}function a(e){let{reason:t}=e;switch(t){case"network":return"Unable to connect to the server. We need to access the server to get some information about your keys.";case"old-key-style":return"This file is encrypted with an old unsupported key style. Recreate the key on a device where the file is available, or use an older version of Actual to download it.";case"decrypt-failure":return"Unable to decrypt file with this password. Please try again.";default:return"Something went wrong trying to create a key, sorry! Visit https://actualbudget.org/contact/ for support."}}function l(e,t){return"out-of-sync-migrations"===e||"out-of-sync-data"===e?"This budget cannot be loaded with this version of the app.":"budget-not-found"===e?`Budget \u201c${t}\u201d not found. Check the id of your budget in the Advanced section of the settings page.`:`We had an unknown problem opening \u201c${t}\u201d.`}n.d(t,{Ez:function(){return a},FL:function(){return l},Ip:function(){return o},wg:function(){return r},zJ:function(){return i}})},24917:function(e,t,n){"use strict";n.d(t,{E4:function(){return x},zI:function(){return b},PR:function(){return y},dK:function(){return m},is:function(){return g},Gn:function(){return T},WU:function(){return _},D1:function(){return A},Ze:function(){return Z},jw:function(){return I},LT:function(){return P},JC:function(){return R},_y:function(){return M},So:function(){return O},Ax:function(){return k},DT:function(){return p},dy:function(){return v},Do:function(){return j},cv:function(){return D},kw:function(){return S},W9:function(){return w}});var r=n(45249),o=n(79398),i=n(49375),a=n(48116);function l(e,t){(0,a.Z)(2,arguments);var n=(0,i.Z)(e),r=(0,o.Z)(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var l=n.getDate(),s=new Date(n.getTime());return s.setMonth(n.getMonth()+r+1,0),l>=s.getDate()?s:(n.setFullYear(s.getFullYear(),s.getMonth(),l),n)}function s(e,t){return(0,a.Z)(2,arguments),l(e,-(0,o.Z)(t))}var u=n(8756),c=n(89474);function d(e,t){(0,a.Z)(2,arguments);var n=(0,i.Z)(e),r=(0,i.Z)(t);return n.getTime()<r.getTime()}var f=n(51678);function h(e){if("string"===typeof e){let[t,n,r]=e.split("-");return null!=r?new Date(parseInt(t),parseInt(n)-1,parseInt(r),12):null!=n?new Date(parseInt(t),parseInt(n)-1,1,12):new Date(parseInt(t),0,1,12)}return"number"===typeof e?new Date(e):e}function p(e){return r.Z(h(e),"yyyy-MM")}function g(e){return r.Z(h(e),"yyyy-MM-dd")}function m(){return n.g.IS_TESTING?n.g.currentMonth||"2017-01":r.Z(new Date,"yyyy-MM")}function y(){return n.g.IS_TESTING?"2017-01-01":r.Z(new Date,"yyyy-MM-dd")}function v(e){return r.Z(s(h(e),1),"yyyy-MM")}function b(e,t){return r.Z(l(h(e),t),"yyyy-MM")}function w(e,t){return r.Z(s(h(e),t),"yyyy-MM")}function x(e,t){return r.Z(u.Z(h(e),t),"yyyy-MM-dd")}function S(e,t){return r.Z(c.Z(h(e),t),"yyyy-MM-dd")}function k(e,t){return function(e,t){(0,a.Z)(2,arguments);var n=(0,i.Z)(e),r=(0,i.Z)(t);return n.getTime()>r.getTime()}(h(e),h(t))}function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=p(e);for(;d(h(o),h(t));)r.push(o),o=b(o,1);return n&&r.push(o),r}function j(e,t){return C(e,t,!0)}function E(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];let o=e;for(;d(h(o),h(t));)r.push(o),o=x(o,1);return n&&r.push(o),r}function T(e,t){return E(e,t,!0)}function O(e){return e.slice(0,4)}function I(e){return e.slice(0,7)}function D(e){return"budget"+e.replace("-","")}function _(e,t){return r.Z(h(e),t)}(0,f.Z)((e=>new RegExp(e.replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{4}"))));const A=(0,f.Z)((e=>e.replace(/y+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,""))),Z=(0,f.Z)((e=>{let t=e.replace(/y+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}");return new RegExp("^"+t+"$")})),P=(0,f.Z)((e=>e.replace(/d+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/\/\//,"/").replace(/\.\./,".").replace(/--/,"-"))),R=((0,f.Z)((e=>{let t=e.replace(/d+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/\/\//,"/").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{2,4}");return new RegExp("^"+t+"$")})),(0,f.Z)((e=>e.replace(/y+/g,"yy")))),M=(0,f.Z)((e=>{let t=e.replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{2}");return new RegExp("^"+t+"$")}))},57968:function(e,t,n){"use strict";n.d(t,{ZP:function(){return i},zW:function(){return o}});class r{constructor(e){this.state=void 0,this.state={filterExpressions:e.filterExpressions||[],selectExpressions:e.selectExpressions||[],groupExpressions:e.groupExpressions||[],orderExpressions:e.orderExpressions||[],calculation:!1,rawMode:!1,withDead:!1,validateRefs:!0,limit:null,offset:null,...e}}filter(e){return new r({...this.state,filterExpressions:[...this.state.filterExpressions,e]})}unfilter(e){let t=new Set(e);return new r({...this.state,filterExpressions:this.state.filterExpressions.filter((e=>!t.has(Object.keys(e)[0])))})}select(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)||(e=[e]);let t=new r({...this.state,selectExpressions:e});return t.state.calculation=!1,t}calculate(e){let t=this.select({result:e});return t.state.calculation=!0,t}groupBy(e){return Array.isArray(e)||(e=[e]),new r({...this.state,groupExpressions:[...this.state.groupExpressions,...e]})}orderBy(e){return Array.isArray(e)||(e=[e]),new r({...this.state,orderExpressions:[...this.state.orderExpressions,...e]})}limit(e){return new r({...this.state,limit:e})}offset(e){return new r({...this.state,offset:e})}raw(){return new r({...this.state,rawMode:!0})}withDead(){return new r({...this.state,withDead:!0})}withoutValidatedRefs(){return new r({...this.state,validateRefs:!1})}options(e){return new r({...this.state,tableOptions:e})}serialize(){return this.state}}function o(e,t){let n=e.serialize().orderExpressions;if(0===n.length)return t?{order:"asc",...t}:null;let r=n[0];if("string"===typeof r)return{field:r,order:"asc"};let[o]=Object.keys(r);return{field:o,order:r[o]}}function i(e){return new r({table:e})}},80837:function(e,t,n){"use strict";n.d(t,{Qc:function(){return c},Z:function(){return s},Z2:function(){return d},Z9:function(){return i},gL:function(){return a},l1:function(){return f},w8:function(){return l},wZ:function(){return o},zQ:function(){return u}});var r=n(69585);const o={date:{ops:["is","isapprox","gt","gte","lt","lte"],nullable:!1},id:{ops:["is","contains","oneOf","isNot","doesNotContain","notOneOf"],nullable:!0},saved:{ops:[],nullable:!1},string:{ops:["is","contains","oneOf","isNot","doesNotContain","notOneOf"],nullable:!1},number:{ops:["is","isapprox","isbetween","gt","gte","lt","lte"],nullable:!1},boolean:{ops:["is"],nullable:!1}},i=new Map(Object.entries({imported_payee:"string",payee:"id",date:"date",notes:"string",amount:"number",amountInflow:"number",amountOutfow:"number",category:"id",account:"id",cleared:"boolean",saved:"saved"}));function a(e,t){switch(t=t||{},e){case"imported_payee":return"imported payee";case"amount":return t.inflow?"amount (inflow)":t.outflow?"amount (outflow)":"amount";case"amount-inflow":return"amount (inflow)";case"amount-outflow":return"amount (outflow)";default:return e}}function l(e,t){switch(e){case"oneOf":return"one of";case"notOneOf":return"not one of";case"is":return"is";case"isNot":return"is not";case"isapprox":return"is approx";case"isbetween":return"is between";case"contains":return"contains";case"doesNotContain":return"does not contain";case"gt":return"date"===t?"is after":"is greater than";case"gte":return"date"===t?"is after or equals":"is greater than or equals";case"lt":return"date"===t?"is before":"is less than";case"lte":return"date"===t?"is before or equals":"is less than or equals";case"true":return"is true";case"false":return"is false";case"set":return"set";case"link-schedule":return"link schedule";case"and":return"and";case"or":return"or";default:return""}}function s(e){return"amount-inflow"===e?{field:"amount",options:{inflow:!0}}:"amount-outflow"===e?{field:"amount",options:{outflow:!0}}:{field:e}}function u(e){switch(e){case"date-format":return"Invalid date format";case"no-null":case"no-empty-array":case"no-empty-string":return"Value cannot be empty";case"not-number":return"Value must be a number";case"invalid-field":return"Please choose a valid field for this type of rule";default:return"Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support"}}function c(e){switch(e.type){case"number":{let t=e.value;return"amount"===e.field&&"isbetween"!==e.op&&null!=t&&(t=(0,r.Bf)(t)),{...e,value:t}}case"string":{let t=null==e.value?"":e.value;return{...e,value:t}}case"boolean":{let t=e.value;return{...e,value:t}}}return{...e,error:null}}function d(e){let{error:t,inputKey:n,...o}=e;switch(o.type){case"number":{let e=o.value;return"amount"===o.field&&"isbetween"!==o.op&&(e=(0,r.l9)(e)),{...o,value:e}}case"string":{let e=null==o.value?"":o.value;return{...o,value:e}}case"boolean":{let e=null!=o.value&&o.value;return{...o,value:e}}}return o}function f(e,t){if("number"===t.type)if("isbetween"!==t.op)return{...t,error:null,value:e&&(0,r.Dz)(String(e))||0};return{...t,error:null,value:e}}},88370:function(e,t,n){"use strict";n.d(t,{eJ:function(){return a},lP:function(){return d},lR:function(){return i},lq:function(){return c},o7:function(){return u}});var r=n(24917),o=n(57968);function i(e,t,n){let o=r.PR();return t?"completed":n?"paid":e===o?"due":e>o&&e<=r.E4(o,7)?"upcoming":e<o?"missed":"scheduled"}function a(e){let t=e.map((e=>{let t=e._conditions.find((e=>"date"===e.field));return{$and:{schedule:e.id,date:{$gte:t&&"is"===t.op?e.next_date:r.kw(e.next_date,2)}}}}));return(0,o.ZP)("transactions").filter({$or:t}).orderBy({date:"desc"}).groupBy("schedule").select(["schedule","date"])}function l(e){return r.WU(new Date(2020,0,e,12),"do")}function s(e){return{SU:"Sunday",MO:"Monday",TU:"Tuesday",WE:"Wednesday",TH:"Thursday",FR:"Friday",SA:"Saturday"}[e]}function u(e){let t=e.interval||1;switch(e.frequency){case"daily":{let e="Every ";return e+=1!==t?`${t} days`:"day",e}case"weekly":{let n="Every ";return n+=1!==t?`${t} weeks`:"week",n+=" on "+r.WU(e.start,"EEEE"),n}case"monthly":{let n="Every ";if(n+=1!==t?`${t} months`:"month",e.patterns&&e.patterns.length>0){let t=[...e.patterns].sort(((e,t)=>{let n=("day"===e.type?1:0)-("day"===t.type?1:0),r=e.value-t.value;return 0===n?r:n})).filter((e=>-1!==e.value));t=t.concat(e.patterns.filter((e=>-1===e.value))),n+=" on the ";let r=[],o=new Set(t.map((e=>e.type))),i=1===o.size&&!o.has("day");for(let e of t)if("day"===e.type)-1===e.value?r.push("last day"):r.push(l(e.value));else{let t=i?"":" "+s(e.type);-1===e.value?r.push("last"+t):r.push(l(e.value)+t)}r.length>2?(n+=r.slice(0,r.length-1).join(", "),n+=", and ",n+=r[r.length-1]):n+=r.join(" and "),i&&(n+=" "+s(t[0].type))}else n+=" on the "+r.WU(e.start,"do");return n}case"yearly":{let n="Every ";return n+=1!==t?`${t} years`:"year",n+=" on "+r.WU(e.start,"LLL do"),n}default:return"Recurring error"}}function c(e){return{payee:e.find((e=>"is"===e.op&&"payee"===e.field))||e.find((e=>"is"===e.op&&"description"===e.field))||null,account:e.find((e=>"is"===e.op&&"account"===e.field))||e.find((e=>"is"===e.op&&"acct"===e.field))||null,amount:e.find((e=>("is"===e.op||"isapprox"===e.op||"isbetween"===e.op)&&"amount"===e.field))||null,date:e.find((e=>("is"===e.op||"isapprox"===e.op)&&"date"===e.field))||null}}function d(e){return e&&"number"!==typeof e?Math.round((e.num1+e.num2)/2):e}},69585:function(e,t,n){"use strict";function r(e){return e[e.length-1]}function o(e,t){const n=e.id?{id:e.id}:{},r=Object.keys(t);let o=!1;for(let i=0;i<r.length;i++){let a=r[i];e[a]!==t[a]&&(n[a]=t[a],o=!0)}return o?n:null}function i(e,t){return t=[...t],e.added&&e.added.forEach((e=>{t.push(e)})),e.updated&&e.updated.forEach((e=>{let{id:n,...r}=e;const o=t.findIndex((e=>e.id===n));t[o]={...t[o],...r}})),e.deleted&&e.deleted.forEach((e=>{const n=t.findIndex((t=>e.id===t.id));-1!==n&&t.splice(n,1)})),t}function a(e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];t.set(r.id,r)}return t}function l(e,t){let n=a(e),r=a(t),i=[],l=[],s=e.filter((e=>!r.has(e.id))).map((e=>({id:e.id})));return t.forEach((e=>{let t=n.get(e.id);if(t){const n=o(t,e);n&&l.push(n)}else i.push(e)})),{added:i,updated:l,deleted:s}}function s(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];t[r.id]=r}return t}function u(e){return e[0].toUpperCase()+e.slice(1)}n.d(t,{Bf:function(){return C},CD:function(){return S},Dz:function(){return w},Th:function(){return l},VL:function(){return u},Z$:function(){return r},ZZ:function(){return s},eY:function(){return b},ff:function(){return h},id:function(){return c},k4:function(){return o},l9:function(){return k},qP:function(){return j},qT:function(){return x},sD:function(){return y},yC:function(){return f},zA:function(){return v},zb:function(){return i}});const c=[{value:"comma-dot",label:"1,000.33",labelNoFraction:"1,000"},{value:"dot-comma",label:"1.000,33",labelNoFraction:"1.000"},{value:"space-comma",label:"1 000,33",labelNoFraction:"1 000"},{value:"space-dot",label:"1 000.33",labelNoFraction:"1 000"},{value:"comma-dot-in",label:"1,00,000.33",labelNoFraction:"1,00,000"}];let d={format:"comma-dot",hideFraction:!1};function f(e){d=e}function h(){let e,t,n,{format:r,hideFraction:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;switch(r){case"space-comma":e="en-ZA",t=/[^-0-9,]/g,n=",";break;case"dot-comma":e="de-DE",t=/[^-0-9,]/g,n=",";break;case"space-dot":e="dje",t=/[^-0-9.]/g,n=".";break;case"comma-dot-in":e="en-IN",t=/[^-0-9.]/g,n=".";break;default:e="en-US",t=/[^-0-9.]/g,n="."}return{value:r,separator:n,formatter:new Intl.NumberFormat(e,{minimumFractionDigits:o?0:2,maximumFractionDigits:o?0:2}),regex:t}}const p=2**51-1,g=-p;function m(e){if(!Number.isInteger(e))throw new Error("safeNumber: number is not an integer: "+JSON.stringify(e));if(e>p||e<g)throw new Error("safeNumber: can\u2019t safely perform arithmetic with number: "+e);return e}function y(e){return C(x(e)||0)}function v(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:h().formatter).format(m(e)/100)}function b(e){return h().formatter.format(e)}function w(e){let t=parseFloat(e.replace(h().regex,"").replace(h().separator,"."));return isNaN(t)?null:t}function x(e){let t=w(e);return null==t?null:k(t)}function S(e){let t=parseInt(e.replace(/[^-0-9.,]/g,""));return isNaN(t)?null:t}function k(e){return Math.round(100*e)}function C(e){return parseFloat((m(e)/100).toFixed(2))}function j(e){function t(e){return isNaN(e)?null:e}function n(e){return e.replace(/[^0-9-]/g,"")}e.startsWith("(")&&e.endsWith(")")&&(e=e.replace("(","-").replace(")",""));let r=e.match(/[.,][^.,]*$/);if(!r||0===r.index)return t(parseFloat(n(e)));let o=n(e.slice(0,r.index)),i=n(e.slice(r.index+1));return t(parseFloat(o+"."+i))}},76166:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var o;n.d(t,{Ep:function(){return d},J0:function(){return l},LX:function(){return T},RQ:function(){return Z},WK:function(){return L},Zn:function(){return I},Zq:function(){return _},aU:function(){return o},cP:function(){return f},fp:function(){return g},lX:function(){return a},pC:function(){return A}}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){return void 0===e&&(e={}),h((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return c("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:d(t)}),null,e)}function l(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function s(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function h(e,t,n,a){void 0===a&&(a={});let{window:s=document.defaultView,v5Compat:f=!1}=a,h=s.history,p=o.Pop,g=null,m=y();function y(){return(h.state||{idx:null}).idx}function v(){p=o.Pop;let e=y(),t=null==e?null:e-m;m=e,g&&g({action:p,location:w.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"===typeof e?e:d(e);return l(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,h.replaceState(r({},h.state,{idx:m}),""));let w={get action(){return p},get location(){return e(s,h)},listen(e){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(i,v),g=e,()=>{s.removeEventListener(i,v),g=null}},createHref(e){return t(s,e)},createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=o.Push;let r=c(w.location,e,t);n&&n(r,e),m=y()+1;let i=u(r,m),a=w.createHref(r);try{h.pushState(i,"",a)}catch(l){s.location.assign(a)}f&&g&&g({action:p,location:w.location,delta:1})},replace:function(e,t){p=o.Replace;let r=c(w.location,e,t);n&&n(r,e),m=y();let i=u(r,m),a=w.createHref(r);h.replaceState(i,"",a),f&&g&&g({action:p,location:w.location,delta:0})},go(e){return h.go(e)}};return w}var p;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(p||(p={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function g(e,t,n){void 0===n&&(n="/");let r=I(("string"===typeof t?f(t):t).pathname||"/",n);if(null==r)return null;let o=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let a=0;null==i&&a<o.length;++a)i=E(o[a],O(r));return i}function m(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(l(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=Z([r,a.relativePath]),u=n.concat(a);e.children&&e.children.length>0&&(l(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),m(e.children,t,u,s)),(null!=e.path||e.index)&&t.push({path:s,score:j(s,e.index),routesMeta:u})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of y(e.path))o(e,t,r);else o(e,t)})),t}function y(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=y(r.join("/")),l=[];return l.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&l.push(...a),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const v=/^:\w+$/,b=3,w=2,x=1,S=10,k=-2,C=e=>"*"===e;function j(e,t){let n=e.split("/"),r=n.length;return n.some(C)&&(r+=k),t&&(r+=w),n.filter((e=>!C(e))).reduce(((e,t)=>e+(v.test(t)?b:""===t?x:S)),r)}function E(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a<n.length;++a){let e=n[a],l=a===n.length-1,s="/"===o?t:t.slice(o.length)||"/",u=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},s);if(!u)return null;Object.assign(r,u.params);let c=e.route;i.push({params:r,pathname:Z([o,u.pathname]),pathnameBase:P(Z([o,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(o=Z([o,u.pathnameBase]))}return i}function T(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);s("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(r.push(t),"/([^\\/]+)")));e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=l[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return s(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(l[n]||"",t),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function O(e){try{return decodeURI(e)}catch(t){return s(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function D(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function _(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function A(e,t,n,o){let i;void 0===o&&(o=!1),"string"===typeof e?i=f(e):(i=r({},e),l(!i.pathname||!i.pathname.includes("?"),D("?","pathname","search",i)),l(!i.pathname||!i.pathname.includes("#"),D("#","pathname","hash",i)),l(!i.search||!i.search.includes("#"),D("#","search","hash",i)));let a,s=""===e||""===i.pathname,u=s?"/":i.pathname;if(o||null==u)a=n;else{let e=t.length-1;if(u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:R(r),hash:M(o)}}(i,a),d=u&&"/"!==u&&u.endsWith("/"),h=(s||"."===u)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}const Z=e=>e.join("/").replace(/\/\/+/g,"/"),P=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",M=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class N extends Error{}function L(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const B=["post","put","patch","delete"],F=(new Set(B),["get",...B]);new Set(F),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;Symbol("deferred")},79423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e)};var r,o=n(28087),i=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},95685:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&n.test(e)};var n=/-webkit-|-moz-|-ms-/;e.exports=t.default},92393:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},o=function(e,t,n){var o,i=r[e];return o="string"===typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function i(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var a={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},l={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},s=function(e,t,n,r){return l[e]};function u(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!==n&&void 0!==n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var c={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:u({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:u({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:u({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:u({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:u({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function d(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,l=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(function(e){return e.test(l)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(s,(function(e){return e.test(l)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(l.length)}}}var f,h={ordinalNumber:(f={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(f.matchPattern);if(!n)return null;var r=n[0],o=e.match(f.parsePattern);if(!o)return null;var i=f.valueCallback?f.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:d({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:d({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:d({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},p={code:"en-US",formatDistance:o,formatLong:a,formatRelative:s,localize:c,match:h,options:{weekStartsOn:0,firstWeekContainsDate:1}}},10643:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});var r={};function o(){return r}},83387:function(e,t){"use strict";var n=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},r=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},o={p:r,P:function(e,t){var o,i=e.match(/(P+)(p+)?/)||[],a=i[1],l=i[2];if(!l)return n(e,t);switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",n(a,t)).replace("{{time}}",r(l,t))}};t.Z=o},98919:function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,{Z:function(){return r}})},74394:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(49375),o=n(20359),i=n(57688),a=n(48116);var l=6048e5;function s(e){(0,a.Z)(1,arguments);var t=(0,r.Z)(e),n=(0,o.Z)(t).getTime()-function(e){(0,a.Z)(1,arguments);var t=(0,i.Z)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,o.Z)(n)}(t).getTime();return Math.round(n/l)+1}},57688:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(49375),o=n(48116),i=n(20359);function a(e){(0,o.Z)(1,arguments);var t=(0,r.Z)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var l=(0,i.Z)(a),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var u=(0,i.Z)(s);return t.getTime()>=l.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}},76088:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(49375),o=n(37561),i=n(15717),a=n(48116),l=n(79398),s=n(10643);var u=6048e5;function c(e,t){(0,a.Z)(1,arguments);var n=(0,r.Z)(e),c=(0,o.Z)(n,t).getTime()-function(e,t){var n,r,u,c,d,f,h,p;(0,a.Z)(1,arguments);var g=(0,s.j)(),m=(0,l.Z)(null!==(n=null!==(r=null!==(u=null!==(c=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==u?u:g.firstWeekContainsDate)&&void 0!==r?r:null===(h=g.locale)||void 0===h||null===(p=h.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1),y=(0,i.Z)(e,t),v=new Date(0);return v.setUTCFullYear(y,0,m),v.setUTCHours(0,0,0,0),(0,o.Z)(v,t)}(n,t).getTime();return Math.round(c/u)+1}},15717:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(49375),o=n(48116),i=n(37561),a=n(79398),l=n(10643);function s(e,t){var n,s,u,c,d,f,h,p;(0,o.Z)(1,arguments);var g=(0,r.Z)(e),m=g.getUTCFullYear(),y=(0,l.j)(),v=(0,a.Z)(null!==(n=null!==(s=null!==(u=null!==(c=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null===t||void 0===t||null===(d=t.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==u?u:y.firstWeekContainsDate)&&void 0!==s?s:null===(h=y.locale)||void 0===h||null===(p=h.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(m+1,0,v),b.setUTCHours(0,0,0,0);var w=(0,i.Z)(b,t),x=new Date(0);x.setUTCFullYear(m,0,v),x.setUTCHours(0,0,0,0);var S=(0,i.Z)(x,t);return g.getTime()>=w.getTime()?m+1:g.getTime()>=S.getTime()?m:m-1}},62706:function(e,t,n){"use strict";n.d(t,{Do:function(){return a},Iu:function(){return i},qp:function(){return l}});var r=["D","DD"],o=["YY","YYYY"];function i(e){return-1!==r.indexOf(e)}function a(e){return-1!==o.indexOf(e)}function l(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},48116:function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:function(){return r}})},20359:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(49375),o=n(48116);function i(e){(0,o.Z)(1,arguments);var t=(0,r.Z)(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t}},37561:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(49375),o=n(48116),i=n(79398),a=n(10643);function l(e,t){var n,l,s,u,c,d,f,h;(0,o.Z)(1,arguments);var p=(0,a.j)(),g=(0,i.Z)(null!==(n=null!==(l=null!==(s=null!==(u=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==u?u:null===t||void 0===t||null===(c=t.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==s?s:p.weekStartsOn)&&void 0!==l?l:null===(f=p.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.Z)(e),y=m.getUTCDay(),v=(y<g?7:0)+y-g;return m.setUTCDate(m.getUTCDate()-v),m.setUTCHours(0,0,0,0),m}},79398:function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:function(){return r}})},8756:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(79398),o=n(49375),i=n(48116);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e),a=(0,r.Z)(t);return isNaN(a)?new Date(NaN):a?(n.setDate(n.getDate()+a),n):n}},61722:function(e,t,n){"use strict";n.d(t,{qk:function(){return i},vh:function(){return o},yJ:function(){return r}});Math.pow(10,8);var r=6e4,o=36e5,i=1e3},45249:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(48664),o=n(11898),i=n(49375),a=n(48116);var l=n(74394),s=n(57688),u=n(76088),c=n(15717);function d(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var f={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return d("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):d(n+1,2)},d:function(e,t){return d(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return d(e.getUTCHours()%12||12,t.length)},H:function(e,t){return d(e.getUTCHours(),t.length)},m:function(e,t){return d(e.getUTCMinutes(),t.length)},s:function(e,t){return d(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return d(Math.floor(r*Math.pow(10,n-3)),t.length)}},h="midnight",p="noon",g="morning",m="afternoon",y="evening",v="night",b={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return f.y(e,t)},Y:function(e,t,n,r){var o=(0,c.Z)(e,r),i=o>0?o:1-o;return"YY"===t?d(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):d(i,t.length)},R:function(e,t){return d((0,s.Z)(e),t.length)},u:function(e,t){return d(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return d(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return f.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=(0,u.Z)(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):d(o,t.length)},I:function(e,t,n){var r=(0,l.Z)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):d(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):f.d(e,t)},D:function(e,t,n){var r=function(e){(0,a.Z)(1,arguments);var t=(0,i.Z)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):d(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return d(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return d(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return d(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?p:0===o?h:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?y:o>=12?m:o>=4?g:v,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return f.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):f.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):d(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):f.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):f.s(e,t)},S:function(e,t){return f.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return x(o);case"XXXX":case"XX":return S(o);default:return S(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return x(o);case"xxxx":case"xx":return S(o);default:return S(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+w(o,":");default:return"GMT"+S(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+w(o,":");default:return"GMT"+S(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return d(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return d((r._originalDate||e).getTime(),t.length)}};function w(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+d(i,2)}function x(e,t){return e%60===0?(e>0?"-":"+")+d(Math.abs(e)/60,2):S(e,t)}function S(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+d(Math.floor(o/60),2)+n+d(o%60,2)}var k=b,C=n(83387),j=n(98919),E=n(62706),T=n(79398),O=n(10643),I=n(92393),D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A=/^'([^]*?)'?$/,Z=/''/g,P=/[a-zA-Z]/;function R(e,t,n){var l,s,u,c,d,f,h,p,g,m,y,v,b,w,x,S,R,M;(0,a.Z)(2,arguments);var N=String(t),L=(0,O.j)(),B=null!==(l=null!==(s=null===n||void 0===n?void 0:n.locale)&&void 0!==s?s:L.locale)&&void 0!==l?l:I.Z,F=(0,T.Z)(null!==(u=null!==(c=null!==(d=null!==(f=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==f?f:null===n||void 0===n||null===(h=n.locale)||void 0===h||null===(p=h.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==d?d:L.firstWeekContainsDate)&&void 0!==c?c:null===(g=L.locale)||void 0===g||null===(m=g.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==u?u:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=(0,T.Z)(null!==(y=null!==(v=null!==(b=null!==(w=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==w?w:null===n||void 0===n||null===(x=n.locale)||void 0===x||null===(S=x.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:L.weekStartsOn)&&void 0!==v?v:null===(R=L.locale)||void 0===R||null===(M=R.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==y?y:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!B.localize)throw new RangeError("locale must contain localize property");if(!B.formatLong)throw new RangeError("locale must contain formatLong property");var U=(0,i.Z)(e);if(!(0,r.Z)(U))throw new RangeError("Invalid time value");var z=(0,j.Z)(U),H=(0,o.Z)(U,z),V={firstWeekContainsDate:F,weekStartsOn:W,locale:B,_originalDate:U};return N.match(_).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,C.Z[t])(e,B.formatLong):e})).join("").match(D).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(A);if(!t)return e;return t[1].replace(Z,"'")}(r);var i=k[o];if(i)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,E.Do)(r)||(0,E.qp)(r,t,String(e)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,E.Iu)(r)||(0,E.qp)(r,t,String(e)),i(H,r,B.localize,V);if(o.match(P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}},48664:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(86522),o=n(48116);var i=n(49375);function a(e){if((0,o.Z)(1,arguments),!function(e){return(0,o.Z)(1,arguments),e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!==typeof e)return!1;var t=(0,i.Z)(e);return!isNaN(Number(t))}},3189:function(e,t,n){"use strict";n.d(t,{Z:function(){return Le}});var r=n(86522);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}var a=n(92393),l=n(11898),s=n(49375);function u(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var c=n(83387),d=n(98919),f=n(62706),h=n(79398),p=n(48116),g=n(80753),m=n(88960);function y(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,m.Z)(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===(0,r.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,g.Z)(e)}(this,n)}}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var x=n(45850);function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,x.Z)(r.key),r)}}function k(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var C=n(56666),j=function(){function e(){w(this,e),(0,C.Z)(this,"priority",void 0),(0,C.Z)(this,"subPriority",0)}return k(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),E=function(e){y(n,e);var t=b(n);function n(e,r,o,i,a){var l;return w(this,n),(l=t.call(this)).value=e,l.validateValue=r,l.setValue=o,l.priority=i,a&&(l.subPriority=a),l}return k(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(j),T=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",10),(0,C.Z)((0,g.Z)(e),"subPriority",-1),e}return k(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(j),O=function(){function e(){w(this,e),(0,C.Z)(this,"incompatibleTokens",void 0),(0,C.Z)(this,"priority",void 0),(0,C.Z)(this,"subPriority",void 0)}return k(e,[{key:"run",value:function(e,t,n,r){var o=this.parse(e,t,n,r);return o?{setter:new E(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}(),I=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",140),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["R","u","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(O),D=n(61722),_={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},A=/^([+-])(\d{2})(\d{2})?|Z/,Z=/^([+-])(\d{2})(\d{2})|Z/,P=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,R=/^([+-])(\d{2}):(\d{2})|Z/,M=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function N(e,t){return e?{value:t(e.value),rest:e.rest}:e}function L(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function B(e,t){var n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};var r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*D.vh+i*D.yJ+a*D.qk),rest:t.slice(n[0].length)}}function F(e){return L(_.anyDigitsSigned,e)}function W(e,t){switch(e){case 1:return L(_.singleDigit,t);case 2:return L(_.twoDigits,t);case 3:return L(_.threeDigits,t);case 4:return L(_.fourDigits,t);default:return L(new RegExp("^\\d{1,"+e+"}"),t)}}function U(e,t){switch(e){case 1:return L(_.singleDigitSigned,t);case 2:return L(_.twoDigitsSigned,t);case 3:return L(_.threeDigitsSigned,t);case 4:return L(_.fourDigitsSigned,t);default:return L(new RegExp("^-?\\d{1,"+e+"}"),t)}}function z(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function H(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var i=o+50;n=e+100*Math.floor(i/100)-(e>=i%100?100:0)}return r?n:1-n}function V(e){return e%400===0||e%4===0&&e%100!==0}var $=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",130),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return N(W(4,e),r);case"yo":return N(n.ordinalNumber(e,{unit:"year"}),r);default:return N(W(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=H(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(O),q=n(15717),Y=n(37561),G=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",130),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return N(W(4,e),r);case"Yo":return N(n.ordinalNumber(e,{unit:"year"}),r);default:return N(W(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var o=(0,q.Z)(e,r);if(n.isTwoDigitYear){var i=H(n.year,o);return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Y.Z)(e,r)}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Y.Z)(e,r)}}]),n}(O),K=n(20359),Q=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",130),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t){return U("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),(0,K.Z)(r)}}]),n}(O),X=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",130),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t){return U("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(O),J=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",120),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return W(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(O),ee=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",120),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return W(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(O),te=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),(0,C.Z)((0,g.Z)(e),"priority",110),e}return k(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return N(L(_.month,e),r);case"MM":return N(W(2,e),r);case"Mo":return N(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(O),ne=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",110),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return N(L(_.month,e),r);case"LL":return N(W(2,e),r);case"Lo":return N(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(O),re=n(76088);var oe=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",100),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"w":return L(_.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,Y.Z)(function(e,t,n){(0,p.Z)(2,arguments);var r=(0,s.Z)(e),o=(0,h.Z)(t),i=(0,re.Z)(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*i),r}(e,n,r),r)}}]),n}(O),ie=n(74394);var ae=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",100),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"I":return L(_.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,K.Z)(function(e,t){(0,p.Z)(2,arguments);var n=(0,s.Z)(e),r=(0,h.Z)(t),o=(0,ie.Z)(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}]),n}(O),le=[31,28,31,30,31,30,31,31,30,31,30,31],se=[31,29,31,30,31,30,31,31,30,31,30,31],ue=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"subPriority",1),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"d":return L(_.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){var n=V(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=se[r]:t>=1&&t<=le[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(O),ce=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"subpriority",1),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return L(_.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return V(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(O),de=n(10643);function fe(e,t,n){var r,o,i,a,l,u,c,d;(0,p.Z)(2,arguments);var f=(0,de.j)(),g=(0,h.Z)(null!==(r=null!==(o=null!==(i=null!==(a=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==a?a:null===n||void 0===n||null===(l=n.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==i?i:f.weekStartsOn)&&void 0!==o?o:null===(c=f.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,s.Z)(e),y=(0,h.Z)(t),v=((y%7+7)%7<g?7:0)+y-m.getUTCDay();return m.setUTCDate(m.getUTCDate()+v),m}var he=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=fe(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(O),pe=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return N(W(t.length,e),o);case"eo":return N(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=fe(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(O),ge=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return N(W(t.length,e),o);case"co":return N(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=fe(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(O);var me=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",90),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return W(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return N(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return N(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return N(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return N(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return e=function(e,t){(0,p.Z)(2,arguments);var n=(0,h.Z)(t);n%7===0&&(n-=7);var r=(0,s.Z)(e),o=((n%7+7)%7<1?7:0)+n-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+o),r}(e,n),e.setUTCHours(0,0,0,0),e}}]),n}(O),ye=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",80),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(z(n),0,0,0),e}}]),n}(O),ve=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",80),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(z(n),0,0,0),e}}]),n}(O),be=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",80),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["a","b","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(z(n),0,0,0),e}}]),n}(O),we=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",70),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["H","K","k","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"h":return L(_.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(O),xe=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",70),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"H":return L(_.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(O),Se=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",70),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["h","H","k","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"K":return L(_.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(O),ke=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",70),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"k":return L(_.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(O),Ce=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",60),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"m":return L(_.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(O),je=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",50),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["t","T"]),e}return k(n,[{key:"parse",value:function(e,t,n){switch(t){case"s":return L(_.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return W(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(O),Ee=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",30),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["t","T"]),e}return k(n,[{key:"parse",value:function(e,t){return N(W(t.length,e),(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),n}(O),Te=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",10),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["t","T","x"]),e}return k(n,[{key:"parse",value:function(e,t){switch(t){case"X":return B(A,e);case"XX":return B(Z,e);case"XXXX":return B(P,e);case"XXXXX":return B(M,e);default:return B(R,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(O),Oe=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",10),(0,C.Z)((0,g.Z)(e),"incompatibleTokens",["t","T","X"]),e}return k(n,[{key:"parse",value:function(e,t){switch(t){case"x":return B(A,e);case"xx":return B(Z,e);case"xxxx":return B(P,e);case"xxxxx":return B(M,e);default:return B(R,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(O),Ie=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",40),(0,C.Z)((0,g.Z)(e),"incompatibleTokens","*"),e}return k(n,[{key:"parse",value:function(e){return F(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(O),De=function(e){y(n,e);var t=b(n);function n(){var e;w(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),(0,C.Z)((0,g.Z)(e),"priority",20),(0,C.Z)((0,g.Z)(e),"incompatibleTokens","*"),e}return k(n,[{key:"parse",value:function(e){return F(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(O),_e={G:new I,y:new $,Y:new G,R:new Q,u:new X,Q:new J,q:new ee,M:new te,L:new ne,w:new oe,I:new ae,d:new ue,D:new ce,E:new he,e:new pe,c:new ge,i:new me,a:new ye,b:new ve,B:new be,h:new we,H:new xe,K:new Se,k:new ke,m:new Ce,s:new je,S:new Ee,X:new Te,x:new Oe,t:new Ie,T:new De},Ae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pe=/^'([^]*?)'?$/,Re=/''/g,Me=/\S/,Ne=/[a-zA-Z]/;function Le(e,t,n,o){var g,m,y,v,b,w,x,S,k,C,j,E,O,I,D,_,A,Z;(0,p.Z)(3,arguments);var P=String(e),R=String(t),M=(0,de.j)(),N=null!==(g=null!==(m=null===o||void 0===o?void 0:o.locale)&&void 0!==m?m:M.locale)&&void 0!==g?g:a.Z;if(!N.match)throw new RangeError("locale must contain match property");var L=(0,h.Z)(null!==(y=null!==(v=null!==(b=null!==(w=null===o||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==w?w:null===o||void 0===o||null===(x=o.locale)||void 0===x||null===(S=x.options)||void 0===S?void 0:S.firstWeekContainsDate)&&void 0!==b?b:M.firstWeekContainsDate)&&void 0!==v?v:null===(k=M.locale)||void 0===k||null===(C=k.options)||void 0===C?void 0:C.firstWeekContainsDate)&&void 0!==y?y:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=(0,h.Z)(null!==(j=null!==(E=null!==(O=null!==(I=null===o||void 0===o?void 0:o.weekStartsOn)&&void 0!==I?I:null===o||void 0===o||null===(D=o.locale)||void 0===D||null===(_=D.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==O?O:M.weekStartsOn)&&void 0!==E?E:null===(A=M.locale)||void 0===A||null===(Z=A.options)||void 0===Z?void 0:Z.weekStartsOn)&&void 0!==j?j:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===R)return""===P?(0,s.Z)(n):new Date(NaN);var F,W={firstWeekContainsDate:L,weekStartsOn:B,locale:N},U=[new T],z=R.match(Ze).map((function(e){var t=e[0];return t in c.Z?(0,c.Z[t])(e,N.formatLong):e})).join("").match(Ae),H=[],V=i(z);try{var $=function(){var t=F.value;null!==o&&void 0!==o&&o.useAdditionalWeekYearTokens||!(0,f.Do)(t)||(0,f.qp)(t,R,e),null!==o&&void 0!==o&&o.useAdditionalDayOfYearTokens||!(0,f.Iu)(t)||(0,f.qp)(t,R,e);var n=t[0],r=_e[n];if(r){var i=r.incompatibleTokens;if(Array.isArray(i)){var a=H.find((function(e){return i.includes(e.token)||e.token===n}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===r.incompatibleTokens&&H.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));H.push({token:n,fullToken:t});var l=r.run(P,t,N.match,W);if(!l)return{v:new Date(NaN)};U.push(l.setter),P=l.rest}else{if(n.match(Ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=t.match(Pe)[1].replace(Re,"'")),0!==P.indexOf(t))return{v:new Date(NaN)};P=P.slice(t.length)}};for(V.s();!(F=V.n()).done;){var q=$();if("object"===(0,r.Z)(q))return q.v}}catch(ne){V.e(ne)}finally{V.f()}if(P.length>0&&Me.test(P))return new Date(NaN);var Y=U.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return U.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),G=(0,s.Z)(n);if(isNaN(G.getTime()))return new Date(NaN);var K,Q=(0,l.Z)(G,(0,d.Z)(G)),X={},J=i(Y);try{for(J.s();!(K=J.n()).done;){var ee=K.value;if(!ee.validate(Q,W))return new Date(NaN);var te=ee.set(Q,X,W);Array.isArray(te)?(Q=te[0],u(X,te[1])):Q=te}}catch(ne){J.e(ne)}finally{J.f()}return Q}},81785:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(61722),o=n(48116),i=n(79398);function a(e,t){var n;(0,o.Z)(1,arguments);var a=(0,i.Z)(null!==(n=null===t||void 0===t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var g,m=function(e){var t,n={},r=e.split(l.dateTimeDelimiter);if(r.length>2)return n;/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],l.timeZoneDelimiter.test(n.date)&&(n.date=e.split(l.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var o=l.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}(e);if(m.date){var y=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:null===i?o:100*i,restDateString:e.slice((r[1]||r[2]).length)}}(m.date,a);g=function(e,t){if(null===t)return new Date(NaN);var n=e.match(s);if(!n)return new Date(NaN);var r=!!n[4],o=d(n[1]),i=d(n[2])-1,a=d(n[3]),l=d(n[4]),u=d(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,u)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,i=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}(t,l,u):new Date(NaN);var c=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(h[t]||(p(e)?29:28))}(t,i,a)&&function(e,t){return t>=1&&t<=(p(e)?366:365)}(t,o)?(c.setUTCFullYear(t,i,Math.max(o,a)),c):new Date(NaN)}(y.restDateString,y.year)}if(!g||isNaN(g.getTime()))return new Date(NaN);var v,b=g.getTime(),w=0;if(m.time&&(w=function(e){var t=e.match(u);if(!t)return NaN;var n=f(t[1]),o=f(t[2]),i=f(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,i))return NaN;return n*r.vh+o*r.yJ+1e3*i}(m.time),isNaN(w)))return new Date(NaN);if(!m.timezone){var x=new Date(b+w),S=new Date(0);return S.setFullYear(x.getUTCFullYear(),x.getUTCMonth(),x.getUTCDate()),S.setHours(x.getUTCHours(),x.getUTCMinutes(),x.getUTCSeconds(),x.getUTCMilliseconds()),S}return v=function(e){if("Z"===e)return 0;var t=e.match(c);if(!t)return 0;var n="+"===t[1]?-1:1,o=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,i))return NaN;return n*(o*r.vh+i*r.yJ)}(m.timezone),isNaN(v)?new Date(NaN):new Date(b+w+v)}var l={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},s=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,c=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e){return e?parseInt(e):1}function f(e){return e&&parseFloat(e.replace(",","."))||0}var h=[31,null,31,30,31,30,31,31,30,31,30,31];function p(e){return e%400===0||e%4===0&&e%100!==0}},89474:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(8756),o=n(48116),i=n(79398);function a(e,t){(0,o.Z)(2,arguments);var n=(0,i.Z)(t);return(0,r.Z)(e,-n)}},11898:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(79398),o=n(49375),i=n(48116);function a(e,t){return(0,i.Z)(2,arguments),function(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e).getTime(),a=(0,r.Z)(t);return new Date(n+a)}(e,-(0,r.Z)(t))}},49375:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86522),o=n(48116);function i(e){(0,o.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},36881:function(e,t){"use strict";var n=60103,r=60106,o=60107,i=60108,a=60114,l=60109,s=60110,u=60112,c=60113,d=60120,f=60115,h=60116,p=60121,g=60122,m=60117,y=60129,v=60131;if("function"===typeof Symbol&&Symbol.for){var b=Symbol.for;n=b("react.element"),r=b("react.portal"),o=b("react.fragment"),i=b("react.strict_mode"),a=b("react.profiler"),l=b("react.provider"),s=b("react.context"),u=b("react.forward_ref"),c=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),g=b("react.server.block"),m=b("react.fundamental"),y=b("react.debug_trace_mode"),v=b("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case f:case l:return e;default:return t}}case r:return t}}}},63612:function(e,t,n){"use strict";n(36881)},7276:function(e,t,n){var r;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},91231:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}},46184:function(e){"use strict";var t=/-(.)/g;e.exports=function(e){return e.replace(t,(function(e,t){return t.toUpperCase()}))}},15114:function(e,t,n){"use strict";var r=n(46184),o=/^-ms-/;e.exports=function(e){return r(e.replace(o,"ms-"))}},2341:function(e){"use strict";function t(e){return function(){return e}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},26791:function(e){"use strict";var t=/([A-Z])/g;e.exports=function(e){return e.replace(t,"-$1").toLowerCase()}},86800:function(e,t,n){"use strict";var r=n(26791),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},41963:function(e){"use strict";e.exports=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}},10565:function(e,t,n){"use strict";var r=n(2341);e.exports=r},51503:function(){!function(){"use strict";function e(){var e=!0,t=!1,n=null,r={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function i(e){var t=e.type,n=e.tagName;return!("INPUT"!=n||!r[t]||e.readOnly)||"TEXTAREA"==n&&!e.readOnly||!!e.isContentEditable}function a(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function s(t){o(document.activeElement)&&a(document.activeElement),e=!0}function u(t){e=!1}function c(t){o(t.target)&&(e||i(t.target))&&a(t.target)}function d(e){o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(t=!0,window.clearTimeout(n),n=window.setTimeout((function(){t=!1,window.clearTimeout(n)}),100),l(e.target))}function f(n){"hidden"==document.visibilityState&&(t&&(e=!0),h())}function h(){document.addEventListener("mousemove",g),document.addEventListener("mousedown",g),document.addEventListener("mouseup",g),document.addEventListener("pointermove",g),document.addEventListener("pointerdown",g),document.addEventListener("pointerup",g),document.addEventListener("touchmove",g),document.addEventListener("touchstart",g),document.addEventListener("touchend",g)}function p(){document.removeEventListener("mousemove",g),document.removeEventListener("mousedown",g),document.removeEventListener("mouseup",g),document.removeEventListener("pointermove",g),document.removeEventListener("pointerdown",g),document.removeEventListener("pointerup",g),document.removeEventListener("touchmove",g),document.removeEventListener("touchstart",g),document.removeEventListener("touchend",g)}function g(t){"html"!==t.target.nodeName.toLowerCase()&&(e=!1,p())}document.addEventListener("keydown",s,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("focus",c,!0),document.addEventListener("blur",d,!0),document.addEventListener("visibilitychange",f,!0),h(),document.body.classList.add("js-focus-visible")}function t(e){var t;function n(){t||(t=!0,e())}["interactive","complete"].indexOf(document.readyState)>=0?e():(t=!1,document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1))}"undefined"!==typeof document&&t(e)}()},55607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowStart:!0,gridRowEnd:!0,gridColumn:!0,gridColumnStart:!0,gridColumnEnd:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var r=["Webkit","ms","Moz","O"];Object.keys(n).forEach((function(e){r.forEach((function(t){n[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=n[e]}))}));var o={isUnitlessNumber:n,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}};t.default=o},67135:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(55607));o(n(10565));function o(e){return e&&e.__esModule?e:{default:e}}var i=r.default.isUnitlessNumber;t.default=function(e,t,n){return null==t||"boolean"===typeof t||""===t?"":isNaN(t)||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"===typeof t&&(t=t.trim()),t+"px")}},70373:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processStyleName=void 0,t.createMarkupForStyles=function(e,t){var n="";for(var o in e){var i=0===o.indexOf("--");if(e.hasOwnProperty(o)&&"label"!==o){var a=e[o];0,null!=a&&(i?n+=o+":"+a+";":(n+=l(o)+":",n+=(0,r.default)(o,a,t)+";"))}}return n||null};a(n(15114));var r=a(n(67135)),o=a(n(86800)),i=a(n(41963));a(n(10565));function a(e){return e&&e.__esModule?e:{default:e}}var l=t.processStyleName=(0,i.default)(o.default)},20578:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function r(e){if(function(e){return null===e||void 0===e||!1===e||"object"===("undefined"===typeof e?"undefined":n(e))&&0===Object.keys(e).length}(e))return null;if("object"!==("undefined"===typeof e?"undefined":n(e)))return e;for(var t={},r=Object.keys(e),i=!1,a=0;a<r.length;a++){var l=e[r[a]],s=o(l);null!==s&&s===l||(i=!0),null!==s&&(t[r[a]]=s)}return 0===Object.keys(t).length?null:i?t:e}function o(e){return Array.isArray(e)?function(e){var t=!1,n=[];return e.forEach((function(e){var r=o(e);null!==r&&r===e||(t=!0),null!==r&&n.push(r)})),0==n.length?null:t?n:e}(e):r(e)}t.default=o},95726:function(e,t){"use strict";function n(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)+(e.charCodeAt(t++)<<16)+(e.charCodeAt(t)<<24)}function r(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)}function o(e,t){return(65535&(e|=0))*(t|=0)+(((e>>>16)*t&65535)<<16)|0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i=1540483477,a=t^e.length,l=e.length,s=0;for(;l>=4;){var u=n(e,s);u=o(u,i),u=o(u^=u>>>24,i),a=o(a,i),a^=u,s+=4,l-=4}switch(l){case 3:a^=r(e,s),a=o(a^=e.charCodeAt(s+2)<<16,i);break;case 2:a=o(a^=r(e,s),i);break;case 1:a=o(a^=e.charCodeAt(s),i)}return a=o(a^=a>>>13,i),(a^=a>>>15)>>>0}},86634:function(e,t,n){"use strict";t.F4=void 0,t.iv=$,t.BC=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $(c({},"@media "+e,n))},t.bb=function(e){return G("::before",e)};var r=u(n(65832)),o=n(16349),i=n(70373),a=u(n(20578)),l=n(85221),s=u(n(95726));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=new o.StyleSheet;d.inject();var f=d.plugins=new l.PluginSet([l.prefixes,l.contentWrap,l.fallbacks]);f.media=new l.PluginSet,f.fontFace=new l.PluginSet,f.keyframes=new l.PluginSet([l.prefixes,l.fallbacks]);var h=!1,p=!1,g="undefined"!==typeof window,m=h,y=!1,v=!1;var b=h;function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.toLowerCase().replace(/[^a-z0-9]/g,t)}function x(e){var t=JSON.stringify(e),n=(0,s.default)(t).toString(36);return e.label&&e.label.length>0&&h?w(e.label.join("."),"-")+"-"+n:n}function S(e){var t=Object.keys(e).filter((function(e){return"toString"!==e}));return 1===t.length&&!!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(t[0])}function k(e){var t=Object.keys(e).filter((function(e){return"toString"!==e}));if(1!==t.length)throw new Error("not a rule");var n=/data\-css\-([a-zA-Z0-9\-_]+)/.exec(t[0]);if(!n)throw new Error("not a rule");return n[1]}var C=/[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;function j(e){if(-1===e.indexOf(","))return[e];for(var t,n=[],r=[],o=0;t=C.exec(e);)switch(t[0]){case"(":o++;break;case")":o--;break;case",":if(o)break;n.push(t.index)}for(t=n.length;t--;)r.unshift(e.slice(n[t]+1)),e=e.slice(0,n[t]);return r.unshift(e),r}function E(e,t){if(!e)return t.replace(/\&/g,"");if(!t)return".css-"+e+",[data-css-"+e+"]";var n=j(t).map((function(t){return t.indexOf("&")>=0?[t.replace(/\&/gm,".css-"+e),t.replace(/\&/gm,"[data-css-"+e+"]")].join(","):".css-"+e+t+",[data-css-"+e+"]"+t})).join(",");return m&&/^\&\:/.exec(t)&&!/\s/.exec(t)&&(n+=",.css-"+e+"[data-simulate-"+w(t)+"],[data-css-"+e+"][data-simulate-"+w(t)+"]"),n}function T(e){var t=e.selector,n=e.style,r=f.transform({selector:t,style:n});return r.selector+"{"+(0,i.createMarkupForStyles)(r.style)+"}"}function O(e){var t=void 0,n=void 0,r=void 0,o=void 0;return Object.keys(e).forEach((function(i){i.indexOf("&")>=0?(n=n||{})[i]=e[i]:0===i.indexOf("@media")?(r=r||{})[i]=O(e[i]):0===i.indexOf("@supports")?(o=o||{})[i]=O(e[i]):"label"===i?e.label.length>0&&((t=t||{}).label=b?e.label.join("."):""):(t=t||{})[i]=e[i]})),{plain:t,selects:n,medias:r,supports:o}}function I(e,t){var n=[],r=t.plain,o=t.selects,i=t.medias,a=t.supports;return r&&n.push(T({style:r,selector:E(e)})),o&&Object.keys(o).forEach((function(t){return n.push(T({style:o[t],selector:E(e,t)}))})),i&&Object.keys(i).forEach((function(t){return n.push(t+"{"+I(e,i[t]).join("")+"}")})),a&&Object.keys(a).forEach((function(t){return n.push(t+"{"+I(e,a[t]).join("")+"}")})),n}var D=d.inserted={};var _=d.registered={};function A(e){_[e.id]||(_[e.id]=e)}var Z={};function P(e){if(A(e),function(e){if(!D[e.id]){D[e.id]=!0;var t=O(e.style),n=I(e.id,t);D[e.id]=!!g||n,n.forEach((function(e){return d.insert(e)}))}}(e),Z[e.id])return Z[e.id];var t=c({},"data-css-"+e.id,b&&e.label||"");return Object.defineProperty(t,"toString",{enumerable:!1,value:function(){return"css-"+e.id}}),Z[e.id]=t,t}function R(e,t){var n=j(e).map((function(e){return e.indexOf("&")>=0?e:"&"+e})),r=j(t).map((function(e){return e.indexOf("&")>=0?e:"&"+e}));return r.reduce((function(e,t){return e.concat(n.map((function(e){return t.replace(/\&/g,e)})))}),[]).join(",")}function M(e,t){return e?"@supports "+e.substring(9)+" and "+t.substring(9):t}function N(e){for(var t=[],n=0;n<e.length;n++)t=Array.isArray(e[n])?t.concat(N(e[n])):t.concat(e[n]);return t}var L={"::placeholder":["::-webkit-input-placeholder","::-moz-placeholder","::-ms-input-placeholder"],":fullscreen":[":-webkit-full-screen",":-moz-full-screen",":-ms-fullscreen"]};function B(e,t){var n=t.selector,r=void 0===n?"":n,o=t.mq,i=void 0===o?"":o,l=t.supp,s=void 0===l?"":l,u=t.src,c=void 0===u?{}:u;Array.isArray(c)||(c=[c]),(c=N(c)).forEach((function(t){if(S(t)){var n=function(e){if(S(e)){var t=_[k(e)];if(null==t)throw new Error("[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79");return t}return e}(t);if("css"!==n.type)throw new Error("cannot merge this rule");t=n.style}(t=(0,a.default)(t))&&t.composes&&B(e,{selector:r,mq:i,supp:s,src:t.composes}),Object.keys(t||{}).forEach((function(n){if(function(e){for(var t=[":",".","[",">"," "],n=!1,r=e.charAt(0),o=0;o<t.length;o++)if(r===t[o]){n=!0;break}return n||e.indexOf("&")>=0}(n))L[n]&&L[n].forEach((function(o){return B(e,{selector:R(r,o),mq:i,supp:s,src:t[n]})})),B(e,{selector:R(r,n),mq:i,supp:s,src:t[n]});else if(function(e){return 0===e.indexOf("@media")}(n))B(e,{selector:r,mq:(a=i,l=n,a?"@media "+a.substring(6)+" and "+l.substring(6):l),supp:s,src:t[n]});else if(function(e){return 0===e.indexOf("@supports")}(n))B(e,{selector:r,mq:i,supp:M(s,n),src:t[n]});else if("composes"===n);else{var o=e;s&&(o[s]=o[s]||{},o=o[s]),i&&(o[i]=o[i]||{},o=o[i]),r&&(o[r]=o[r]||{},o=o[r]),"label"===n?b&&(e.label=e.label.concat(t.label)):o[n]=t[n]}var a,l}))}))}function F(e){var t={label:[]};return B(t,{src:e}),P({id:x(t),style:t,label:b?t.label.join("."):"",type:"css"})}var W={};Object.defineProperty(W,"toString",{enumerable:!1,value:function(){return"css-nil"}});var U="undefined"!==typeof WeakMap?[W,new WeakMap,new WeakMap,new WeakMap]:[W],z=!1;var H,V="undefined"!==typeof WeakMap?(H=F,function(e){if(U[e.length]){for(var t=U[e.length],n=0;n<e.length-1;)t.has(e[n])||t.set(e[n],new WeakMap),t=t.get(e[n]),n++;if(t.has(e[e.length-1])){var r=t.get(e[n]);if(_[r.toString().substring(4)])return r}}var o=H(e);if(U[e.length]){for(var i=0,a=U[e.length];i<e.length-1;)a=a.get(e[i]),i++;try{a.set(e[i],o)}catch(s){var l;h&&!z&&(z=!0,(l=console).warn.apply(l,["failed setting the WeakMap cache for args:"].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e))),console.warn("this should NOT happen, please file a bug on the github repo."))}}return o}):F;function $(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t[0]&&t[0].length&&t[0].raw)throw new Error("you forgot to include glamor/babel in your babel plugins.");return(t=(0,a.default)(t))?V(t):W}$.insert=function(e){var t={id:x(e),css:e,type:"raw"};A(t),D[t.id]||(d.insert(t.css),D[t.id]=!!g||[t.css])};$.insert;$.global=function(e,t){if(t=(0,a.default)(t))return $.insert(T({selector:e,style:t}))};$.global;$.keyframes=function(e,t){t||(t=e,e="animation");var n={id:x({name:e,kfs:t=(0,a.default)(t)||{}}),type:"keyframes",name:e,keyframes:t};return A(n),function(e){if(!D[e.id]){var t=Object.keys(e.keyframes).map((function(t){var n=f.keyframes.transform({id:e.id,name:t,style:e.keyframes[t]});return n.name+"{"+(0,i.createMarkupForStyles)(n.style)+"}"})).join(""),n=["-webkit-","-moz-","-o-",""].map((function(n){return"@"+n+"keyframes "+e.name+"_"+e.id+"{"+t+"}"}));n.forEach((function(e){return d.insert(e)})),D[e.id]=!!g||n}}(n),e+"_"+n.id},$.fontFace=function(e){var t={id:x(e=(0,a.default)(e)),type:"font-face",font:e};return A(t),function(e){if(!D[e.id]){var t="@font-face{"+(0,i.createMarkupForStyles)(e.font)+"}";d.insert(t),D[e.id]=!!g||[t]}}(t),e.fontFamily};$.fontFace,t.F4=$.keyframes;var q=$;function Y(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e?$(c({},e,n)):q(n)}function G(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return $(c({},e,n))}},85221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.PluginSet=s,t.fallbacks=function(e){if(Object.keys(e.style).map((function(t){return Array.isArray(e.style[t])})).indexOf(!0)>=0){var t=e.style,n=Object.keys(t).reduce((function(e,n){return e[n]=Array.isArray(t[n])?t[n].join("; "+(0,i.processStyleName)(n)+": "):t[n],e}),{});return(0,o.default)({},e,{style:n})}return e},t.contentWrap=function(e){if(e.style.content){var t=e.style.content;return u.indexOf(t)>=0||/^(attr|calc|counters?|url)\(/.test(t)?e:t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)?r({},e,{style:r({},e.style,{content:'"'+t+'"'})}):e}return e},t.prefixes=function(e){return(0,o.default)({},e,{style:(0,a.default)(r({},e.style))})};var o=l(n(65832)),i=n(70373),a=l(n(78490));function l(e){return e&&e.__esModule?e:{default:e}}function s(e){this.fns=e||[]}(0,o.default)(s.prototype,{add:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){e.fns.indexOf(t)>=0||(e.fns=[t].concat(e.fns))}))},remove:function(e){this.fns=this.fns.filter((function(t){return t!==e}))},clear:function(){this.fns=[]},transform:function(e){return this.fns.reduce((function(e,t){return t(e)}),e)}});var u=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit"]},78490:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t in e){var n=e[t],r=(0,i.default)(y,t,n,e,v);r&&(e[t]=r),(0,o.default)(v,t,e)}return e};var r=m(n(35699)),o=m(n(64761)),i=m(n(95485)),a=m(n(69733)),l=m(n(43425)),s=m(n(4214)),u=m(n(82518)),c=m(n(42105)),d=m(n(55441)),f=m(n(3047)),h=m(n(93920)),p=m(n(75180)),g=m(n(53886));function m(e){return e&&e.__esModule?e:{default:e}}var y=[l.default,a.default,s.default,c.default,d.default,f.default,h.default,p.default,g.default,u.default],v=r.default.prefixMap},16349:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleSheet=h;var r,o=n(65832),i=(r=o)&&r.__esModule?r:{default:r};function a(e){return e[e.length-1]}function l(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}var s="undefined"!==typeof window,u=!1,c=!1,d=function(){if(s){var e=document.createElement("div");return e.innerHTML="\x3c!--[if lt IE 10]><i></i><![endif]--\x3e",1===e.getElementsByTagName("i").length}}();function f(){var e=document.createElement("style");return e.type="text/css",e.setAttribute("data-glamor",""),e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e),e}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.speedy,n=void 0===t?!u&&!c:t,r=e.maxLength,o=void 0===r?s&&d?4e3:65e3:r;this.isSpeedy=n,this.sheet=void 0,this.tags=[],this.maxLength=o,this.ctr=0}(0,i.default)(h.prototype,{getSheet:function(){return l(a(this.tags))},inject:function(){var e=this;if(this.injected)throw new Error("already injected stylesheet!");s?this.tags[0]=f():this.sheet={cssRules:[],insertRule:function(t){e.sheet.cssRules.push({cssText:t})}},this.injected=!0},speedy:function(e){if(0!==this.ctr)throw new Error("cannot change speedy mode after inserting any rule to sheet. Either call speedy("+e+") earlier in your app, or call flush() before speedy("+e+")");this.isSpeedy=!!e},_insert:function(e){try{var t=this.getSheet();t.insertRule(e,-1!==e.indexOf("@import")?0:t.cssRules.length)}catch(n){u&&console.warn("whoops, illegal rule inserted",e)}},insert:function(e){if(s)if(this.isSpeedy&&this.getSheet().insertRule)this._insert(e);else if(-1!==e.indexOf("@import")){var t=a(this.tags);t.insertBefore(document.createTextNode(e),t.firstChild)}else a(this.tags).appendChild(document.createTextNode(e));else this.sheet.insertRule(e,-1!==e.indexOf("@import")?0:this.sheet.cssRules.length);return this.ctr++,s&&this.ctr%this.maxLength===0&&this.tags.push(f()),this.ctr-1},delete:function(e){return this.replace(e,"")},flush:function(){s?(this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.sheet=null,this.ctr=0):this.sheet.cssRules=[],this.injected=!1},rules:function(){if(!s)return this.sheet.cssRules;var e=[];return this.tags.forEach((function(t){return e.splice.apply(e,[e.length,0].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Array.from(l(t).cssRules))))})),e}})},47204:function(e,t,n){"use strict";var r=n(35412),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var l=s(t),g=s(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!g||!g[y])&&(!l||!l[y])){var v=f(n,y);try{u(t,y,v)}catch(b){}}}}return t}},30702:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r="undefined"!==typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function o(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function i(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function a(e){"string"!==typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var l={backspace:8,"\u232b":8,tab:9,clear:12,enter:13,"\u21a9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21ea":20,",":188,".":190,"/":191,"`":192,"-":r?173:189,"=":r?61:187,";":r?59:186,"'":222,"[":219,"]":221,"\\":220},s={"\u21e7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},u={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},c={16:!1,18:!1,17:!1,91:!1},d={},f=1;f<20;f++)l["f".concat(f)]=111+f;var h=[],p=!1,g="all",m=[],y=function(e){return l[e.toLowerCase()]||s[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function v(e){g=e||"all"}function b(){return g||"all"}var w=function(e){var t=e.key,n=e.scope,r=e.method,o=e.splitKey,l=void 0===o?"+":o;a(t).forEach((function(e){var t=e.split(l),o=t.length,a=t[o-1],u="*"===a?"*":y(a);if(d[u]){n||(n=b());var c=o>1?i(s,t):[];d[u]=d[u].filter((function(e){return!((!r||e.method===r)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i<n.length;i++)-1===r.indexOf(n[i])&&(o=!1);return o}(e.mods,c))}))}}))};function x(e,t,n,r){var o;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var i in o=t.mods.length>0,c)Object.prototype.hasOwnProperty.call(c,i)&&(!c[i]&&t.mods.indexOf(+i)>-1||c[i]&&-1===t.mods.indexOf(+i))&&(o=!1);(0!==t.mods.length||c[16]||c[18]||c[17]||c[91])&&!o&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function S(e,t){var n=d["*"],r=e.keyCode||e.which||e.charCode;if(k.filter.call(this,e)){if(93!==r&&224!==r||(r=91),-1===h.indexOf(r)&&229!==r&&h.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=u[t];e[t]&&-1===h.indexOf(n)?h.push(n):!e[t]&&h.indexOf(n)>-1?h.splice(h.indexOf(n),1):"metaKey"===t&&e[t]&&3===h.length&&(e.ctrlKey||e.shiftKey||e.altKey||(h=h.slice(h.indexOf(n))))})),r in c){for(var o in c[r]=!0,s)s[o]===r&&(k[o]=!0);if(!n)return}for(var i in c)Object.prototype.hasOwnProperty.call(c,i)&&(c[i]=e[u[i]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===h.indexOf(17)&&h.push(17),-1===h.indexOf(18)&&h.push(18),c[17]=!0,c[18]=!0);var a=b();if(n)for(var l=0;l<n.length;l++)n[l].scope===a&&("keydown"===e.type&&n[l].keydown||"keyup"===e.type&&n[l].keyup)&&x(e,n[l],a,t);if(r in d)for(var f=0;f<d[r].length;f++)if(("keydown"===e.type&&d[r][f].keydown||"keyup"===e.type&&d[r][f].keyup)&&d[r][f].key&&d[r][f].scope===a){for(var p=d[r][f],g=p.splitKey,m=p.key.split(g),v=[],w=0;w<m.length;w++)v.push(y(m[w]));v.sort().join("")===h.slice().sort().join("")&&x(e,p,a,t)}}}function k(e,t,n){h=[];var r=a(e),l=[],u="all",f=document,g=0,v=!1,b=!0,w="+",x=!1;for(void 0===n&&"function"===typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(u=t.scope),t.element&&(f=t.element),t.keyup&&(v=t.keyup),void 0!==t.keydown&&(b=t.keydown),void 0!==t.capture&&(x=t.capture),"string"===typeof t.splitKey&&(w=t.splitKey)),"string"===typeof t&&(u=t);g<r.length;g++)l=[],(e=r[g].split(w)).length>1&&(l=i(s,e)),(e="*"===(e=e[e.length-1])?"*":y(e))in d||(d[e]=[]),d[e].push({keyup:v,keydown:b,scope:u,mods:l,shortcut:r[g],method:n,key:r[g],splitKey:w,element:f});"undefined"!==typeof f&&!function(e){return m.indexOf(e)>-1}(f)&&window&&(m.push(f),o(f,"keydown",(function(e){S(e,f)}),x),p||(p=!0,o(window,"focus",(function(){h=[]}),x)),o(f,"keyup",(function(e){S(e,f),function(e){var t=e.keyCode||e.which||e.charCode,n=h.indexOf(t);if(n>=0&&h.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&h.splice(0,h.length),93!==t&&224!==t||(t=91),t in c)for(var r in c[t]=!1,s)s[r]===t&&(k[r]=!1)}(e)}),x))}var C={getPressedKeyString:function(){return h.map((function(e){return t=e,Object.keys(l).find((function(e){return l[e]===t}))||function(e){return Object.keys(s).find((function(t){return s[t]===e}))}(e)||String.fromCharCode(e);var t}))},setScope:v,getScope:b,deleteScope:function(e,t){var n,r;for(var o in e||(e=b()),d)if(Object.prototype.hasOwnProperty.call(d,o))for(n=d[o],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;b()===e&&v(t||"all")},getPressedKeyCodes:function(){return h.slice(0)},isPressed:function(e){return"string"===typeof e&&(e=y(e)),-1!==h.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return!t.isContentEditable&&("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n||t.readOnly)||(r=!1),r},trigger:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(d).forEach((function(n){d[n].filter((function(n){return n.scope===t&&n.shortcut===e})).forEach((function(e){e&&e.method&&e.method()}))}))},unbind:function(e){if("undefined"===typeof e)Object.keys(d).forEach((function(e){return delete d[e]}));else if(Array.isArray(e))e.forEach((function(e){e.key&&w(e)}));else if("object"===typeof e)e.key&&w(e);else if("string"===typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n[0],i=n[1];"function"===typeof o&&(i=o,o=""),w({key:e,scope:o,method:i,splitKey:"+"})}},keyMap:l,modifier:s,modifierMap:u};for(var j in C)Object.prototype.hasOwnProperty.call(C,j)&&(k[j]=C[j]);if("undefined"!==typeof window){var E=window.hotkeys;k.noConflict=function(e){return e&&window.hotkeys===k&&(window.hotkeys=E),k},window.hotkeys=k}},28087:function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,o=/^ms-/,i={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(i.hasOwnProperty(e))return i[e];var t=e.replace(r,a);return i[e]=o.test(t)?"-"+t:t}},43425:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,i.default)(t)&&t.indexOf("cross-fade(")>-1)return a.map((function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")}))};var r,o=n(95685),i=(r=o)&&r.__esModule?r:{default:r};var a=["-webkit-",""];e.exports=t.default},69733:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("cursor"===e&&r.hasOwnProperty(t))return n.map((function(e){return e+t}))};var n=["-webkit-","-moz-",""],r={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};e.exports=t.default},4214:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,i.default)(t)&&t.indexOf("filter(")>-1)return a.map((function(e){return t.replace(/filter\(/g,e+"filter(")}))};var r,o=n(95685),i=(r=o)&&r.__esModule?r:{default:r};var a=["-webkit-",""];e.exports=t.default},82518:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("display"===e&&n.hasOwnProperty(t))return n[t]};var n={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};e.exports=t.default},42105:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,o){"flexDirection"===e&&"string"===typeof t&&(t.indexOf("column")>-1?o.WebkitBoxOrient="vertical":o.WebkitBoxOrient="horizontal",t.indexOf("reverse")>-1?o.WebkitBoxDirection="reverse":o.WebkitBoxDirection="normal");r.hasOwnProperty(e)&&(o[r[e]]=n[t]||t)};var n={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},r={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};e.exports=t.default},55441:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,i.default)(t)&&l.test(t))return a.map((function(e){return e+t}))};var r,o=n(95685),i=(r=o)&&r.__esModule?r:{default:r};var a=["-webkit-","-moz-",""],l=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},3047:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,i.default)(t)&&t.indexOf("image-set(")>-1)return a.map((function(e){return t.replace(/image-set\(/g,e+"image-set(")}))};var r,o=n(95685),i=(r=o)&&r.__esModule?r:{default:r};var a=["-webkit-",""];e.exports=t.default},93920:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]},e.exports=t.default},75180:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(r.hasOwnProperty(e)&&o.hasOwnProperty(t))return n.map((function(e){return e+t}))};var n=["-webkit-","-moz-",""],r={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},o={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},53886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){if("string"===typeof t&&l.hasOwnProperty(e)){var u=function(e,t){if((0,o.default)(e))return e;for(var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),i=0,a=n.length;i<a;++i){var l=n[i],u=[l];for(var c in t){var d=(0,r.default)(c);if(l.indexOf(d)>-1&&"order"!==d)for(var f=t[c],h=0,p=f.length;h<p;++h)u.unshift(l.replace(d,s[f[h]]+d))}n[i]=u.join(",")}return n.join(",")}(t,a),c=u.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-moz-|-ms-/.test(e)})).join(",");if(e.indexOf("Webkit")>-1)return c;var d=u.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-webkit-|-ms-/.test(e)})).join(",");return e.indexOf("Moz")>-1?d:(n["Webkit"+(0,i.default)(e)]=c,n["Moz"+(0,i.default)(e)]=d,u)}};var r=a(n(79423)),o=a(n(95685)),i=a(n(36059));function a(e){return e&&e.__esModule?e:{default:e}}var l={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},s={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};e.exports=t.default},35699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=["Webkit"],r=["Moz"],o=["ms"],i=["Webkit","Moz"],a=["Webkit","ms"],l=["Webkit","Moz","ms"];t.default={plugins:[],prefixMap:{appearance:i,userSelect:l,textEmphasisPosition:n,textEmphasis:n,textEmphasisStyle:n,textEmphasisColor:n,boxDecorationBreak:n,clipPath:n,maskImage:n,maskMode:n,maskRepeat:n,maskPosition:n,maskClip:n,maskOrigin:n,maskSize:n,maskComposite:n,mask:n,maskBorderSource:n,maskBorderMode:n,maskBorderSlice:n,maskBorderWidth:n,maskBorderOutset:n,maskBorderRepeat:n,maskBorder:n,maskType:n,textDecorationStyle:n,textDecorationSkip:n,textDecorationLine:n,textDecorationColor:n,filter:n,fontFeatureSettings:n,breakAfter:l,breakBefore:l,breakInside:l,columnCount:i,columnFill:i,columnGap:i,columnRule:i,columnRuleColor:i,columnRuleStyle:i,columnRuleWidth:i,columns:i,columnSpan:i,columnWidth:i,writingMode:a,flex:n,flexBasis:n,flexDirection:n,flexGrow:n,flexFlow:n,flexShrink:n,flexWrap:n,alignContent:n,alignItems:n,alignSelf:n,justifyContent:n,order:n,transform:n,transformOrigin:n,transformOriginX:n,transformOriginY:n,backfaceVisibility:n,perspective:n,perspectiveOrigin:n,transformStyle:n,transformOriginZ:n,animation:n,animationDelay:n,animationDirection:n,animationFillMode:n,animationDuration:n,animationIterationCount:n,animationName:n,animationPlayState:n,animationTimingFunction:n,backdropFilter:n,fontKerning:n,scrollSnapType:a,scrollSnapPointsX:a,scrollSnapPointsY:a,scrollSnapDestination:a,scrollSnapCoordinate:a,shapeImageThreshold:n,shapeImageMargin:n,shapeImageOutside:n,hyphens:l,flowInto:a,flowFrom:a,regionFragment:a,textAlignLast:r,tabSize:r,wrapFlow:o,wrapThrough:o,wrapMargin:o,gridTemplateColumns:o,gridTemplateRows:o,gridTemplateAreas:o,gridTemplate:o,gridAutoColumns:o,gridAutoRows:o,gridAutoFlow:o,grid:o,gridRowStart:o,gridColumnStart:o,gridRowEnd:o,gridRow:o,gridColumn:o,gridColumnEnd:o,gridColumnGap:o,gridRowGap:o,gridArea:o,gridGap:o,textSizeAdjust:a,borderImage:n,borderImageOutset:n,borderImageRepeat:n,borderImageSlice:n,borderImageSource:n,borderImageWidth:n,transitionDelay:n,transitionDuration:n,transitionProperty:n,transitionTimingFunction:n}},e.exports=t.default},36059:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},64761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e.hasOwnProperty(t))for(var r=e[t],o=0,a=r.length;o<a;++o)n[r[o]+(0,i.default)(t)]=n[t]};var r,o=n(36059),i=(r=o)&&r.__esModule?r:{default:r};e.exports=t.default},95485:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o){for(var i=0,a=e.length;i<a;++i){var l=e[i](t,n,r,o);if(l)return l}},e.exports=t.default},47521:function(e,t,n){"use strict";const r=n(91438),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),l=Symbol("allowStale"),s=Symbol("maxAge"),u=Symbol("dispose"),c=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1;const g=(e,t,n)=>{const r=e[f].get(t);if(r){const t=r.value;if(m(e,t)){if(v(e,r),!e[l])return}else n&&(e[h]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[s])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[s]&&n>e[s]},y=e=>{if(e[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[i]-=n.length,e[f].delete(n.key),e[d].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;m(e,o)&&(v(e,n),e[l]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"===typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!==typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||p;if(this[a]="function"!==typeof t?p:t,this[l]=e.stale||!1,e.maxAge&&"number"!==typeof e.maxAge)throw new TypeError("maxAge must be a number");this[s]=e.maxAge||0,this[u]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!==typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[l]=!!e}get allowStale(){return this[l]}set maxAge(e){if("number"!==typeof e)throw new TypeError("maxAge must be a non-negative number");this[s]=e,y(this)}get maxAge(){return this[s]}set lengthCalculator(e){"function"!==typeof e&&(e=p),e!==this[a]&&(this[a]=e,this[i]=0,this[d].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach((e=>this[u](e.key,e.value))),this[f]=new Map,this[d]=new r,this[i]=0}dump(){return this[d].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[s])&&"number"!==typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,l=this[a](t,e);if(this[f].has(e)){if(l>this[o])return v(this,this[f].get(e)),!1;const a=this[f].get(e).value;return this[u]&&(this[c]||this[u](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=l-a.length,a.length=l,this.get(e),y(this),!0}const h=new b(e,t,l,r,n);return h.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=h.length,this[d].unshift(h),this[f].set(e,this[d].head),y(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[f].forEach(((e,t)=>g(this,t,!1)))}}},81288:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},91438:function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"===typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t,n){var r=t===e.head?new l(n,null,t,e):new l(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function i(e,t){e.tail=new l(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new l(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function l(e,t,n,r){if(!(this instanceof l))return new l(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=l,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var i=[];for(n=0;r&&n<t;n++)i.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(n=2;n<arguments.length;n++)r=o(this,r,arguments[n]);return i},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(81288)(r)}catch(s){}},51678:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function o(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(o=e[n],i=t[n],!(o===i||r(o)&&r(i)))return!1;var o,i;return!0}function i(e,t){void 0===t&&(t=o);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}},65832:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,o){for(var i,a,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var u in i=Object(arguments[s]))n.call(i,u)&&(l[u]=i[u]);if(t){a=t(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(l[a[c]]=i[a[c]])}}return l}},38582:function(e){!function(t,n){"use strict";e.exports=function(e){var t="function"===typeof e,n=!!window.addEventListener,r=window.document,o=window.setTimeout,i=function(e,t,r,o){n?e.addEventListener(t,r,!!o):e.attachEvent("on"+t,r)},a=function(e,t,r,o){n?e.removeEventListener(t,r,!!o):e.detachEvent("on"+t,r)},l=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},s=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e,t){s(e,t)||(e.className=""===e.className?t:e.className+" "+t)},c=function(e,t){e.className=l((" "+e.className+" ").replace(" "+t+" "," "))},d=function(e){return/Array/.test(Object.prototype.toString.call(e))},f=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},h=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4===0&&e%100!==0||e%400===0},g=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},m=function(e){f(e)&&e.setHours(0,0,0,0)},y=function(e,t){return e.getTime()===t.getTime()},v=function(e,t,n){var r,o;for(r in t)(o=void 0!==e[r])&&"object"===typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?f(t[r])?n&&(e[r]=new Date(t[r].getTime())):d(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=v({},t[r],n):!n&&o||(e[r]=t[r]);return e},b=function(e,t,n){var o;r.createEvent?((o=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),o=v(o,n),e.dispatchEvent(o)):r.createEventObject&&(o=r.createEventObject(),o=v(o,n),e.fireEvent("on"+t,o))},w=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},x={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},S=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},k=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},C=function(e,t,n){var r=new Date(n,0,1);return'<td class="pika-week">'+Math.ceil(((new Date(n,t,e)-r)/864e5+r.getDay()+1)/7)+"</td>"},j=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},E=function(e){return"<tbody>"+e.join("")+"</tbody>"},T=function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+S(e,t)+'">'+S(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},O=function(e,t,n,r,o,i){var a,l,s,u,c,f=e._o,h=n===f.minYear,p=n===f.maxYear,g='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',m=!0,y=!0;for(s=[],a=0;a<12;a++)s.push('<option value="'+(n===o?a-t:12+a-t)+'"'+(a===r?' selected="selected"':"")+(h&&a<f.minMonth||p&&a>f.maxMonth?'disabled="disabled"':"")+">"+f.i18n.months[a]+"</option>");for(u='<div class="pika-label">'+f.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+s.join("")+"</select></div>",d(f.yearRange)?(a=f.yearRange[0],l=f.yearRange[1]+1):(a=n-f.yearRange,l=1+n+f.yearRange),s=[];a<l&&a<=f.maxYear;a++)a>=f.minYear&&s.push('<option value="'+a+'"'+(a===n?' selected="selected"':"")+">"+a+"</option>");return c='<div class="pika-label">'+n+f.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+s.join("")+"</select></div>",f.showMonthAfterYear?g+=c+u:g+=u+c,h&&(0===r||f.minMonth>=r)&&(m=!1),p&&(11===r||f.maxMonth<=r)&&(y=!1),0===t&&(g+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+f.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+f.i18n.nextMonth+"</button>"),g+"</div>"},I=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+T(e)+E(t)+"</table>"},D=function(a){var l=this,u=l.config(a);l._onMouseDown=function(e){if(l._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(s(t,"is-disabled")||(!s(t,"pika-button")||s(t,"is-empty")||s(t.parentNode,"is-disabled")?s(t,"pika-prev")?l.prevMonth():s(t,"pika-next")&&l.nextMonth():(l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&o((function(){l.hide(),u.blurFieldOnSelect&&u.field&&u.field.blur()}),100))),s(t,"pika-select"))l._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},l._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(s(t,"pika-select-month")?l.gotoMonth(t.value):s(t,"pika-select-year")&&l.gotoYear(t.value))},l._onKeyChange=function(e){if(e=e||window.event,l.isVisible())switch(e.keyCode){case 13:case 27:u.field&&u.field.blur();break;case 37:e.preventDefault(),l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7)}},l._onInputChange=function(n){var r;n.firedBy!==l&&(r=u.parse?u.parse(u.field.value,u.format):t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),f(r)&&l.setDate(r),l._v||l.show())},l._onInputFocus=function(){l.show()},l._onInputClick=function(){l.show()},l._onInputBlur=function(){var e=r.activeElement;do{if(s(e,"pika-single"))return}while(e=e.parentNode);l._c||(l._b=o((function(){l.hide()}),50)),l._c=!1},l._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&s(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",l._onChange)));do{if(s(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);l._v&&t!==u.trigger&&r!==u.trigger&&l.hide()}},l.el=r.createElement("div"),l.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(l.el,"mousedown",l._onMouseDown,!0),i(l.el,"touchend",l._onMouseDown,!0),i(l.el,"change",l._onChange),u.keyboardInput&&i(r,"keydown",l._onKeyChange),u.field&&(u.container?u.container.appendChild(l.el):u.bound?r.body.appendChild(l.el):u.field.parentNode.insertBefore(l.el,u.field.nextSibling),i(u.field,"change",l._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var c=u.defaultDate;f(c)?u.setDefaultDate?l.setDate(c,!0):l.gotoDate(c):l.gotoDate(new Date),u.bound?(this.hide(),l.el.className+=" is-bound",i(u.trigger,"click",l._onInputClick),i(u.trigger,"focus",l._onInputFocus),i(u.trigger,"blur",l._onInputBlur)):this.show()};return D.prototype={config:function(e){this._o||(this._o=v({},x,!0));var t=v(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"===typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"===typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,f(t.minDate)||(t.minDate=!1),f(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),d(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||x.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,f(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",b(this._o.field,"change",{firedBy:this})),this.draw();if("string"===typeof e&&(e=new Date(Date.parse(e))),f(e)){var n=this._o.minDate,r=this._o.maxDate;f(n)&&e<n?e=n:f(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),m(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),b(this._o.field,"change",{firedBy:this})),t||"function"!==typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(f(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=o<n.getTime()||r.getTime()<o}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){var n,r=this.getDate()||new Date,o=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+o):"subtract"===e&&(n=new Date(r.valueOf()-o)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=w(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=w({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(m(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=x.minDate,this._o.minYear=x.minYear,this._o.minMonth=x.minMonth,this._o.startRange=x.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(m(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=x.maxDate,this._o.maxYear=x.maxYear,this._o.maxMonth=x.maxMonth,this._o.endRange=x.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,i=n.maxYear,a=n.minMonth,l=n.maxMonth,s="";this._y<=r&&(this._y=r,!isNaN(a)&&this._m<a&&(this._m=a)),this._y>=i&&(this._y=i,!isNaN(l)&&this._m>l&&(this._m=l)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)s+='<div class="pika-lendar">'+O(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=s,n.bound&&"hidden"!==n.field.type&&o((function(){n.trigger.focus()}),1),"function"===typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)}},adjustPosition:function(){var e,t,n,o,i,a,l,s,d,f,h,p;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,o=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,a=window.innerHeight||r.documentElement.clientHeight,l=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,h=!0,p=!0,"function"===typeof e.getBoundingClientRect)s=(f=e.getBoundingClientRect()).left+window.pageXOffset,d=f.bottom+window.pageYOffset;else for(s=t.offsetLeft,d=t.offsetTop+t.offsetHeight;t=t.offsetParent;)s+=t.offsetLeft,d+=t.offsetTop;(this._o.reposition&&s+n>i||this._o.position.indexOf("right")>-1&&s-n+e.offsetWidth>0)&&(s=s-n+e.offsetWidth,h=!1),(this._o.reposition&&d+o>a+l||this._o.position.indexOf("top")>-1&&d-o-e.offsetHeight>0)&&(d=d-o-e.offsetHeight,p=!1),this.el.style.left=s+"px",this.el.style.top=d+"px",u(this.el,h?"left-aligned":"right-aligned"),u(this.el,p?"bottom-aligned":"top-aligned"),c(this.el,h?"right-aligned":"left-aligned"),c(this.el,p?"top-aligned":"bottom-aligned")}},render:function(e,t,n){var r=this._o,o=new Date,i=g(e,t),a=new Date(e,t,1).getDay(),l=[],s=[];m(o),r.firstDay>0&&(a-=r.firstDay)<0&&(a+=7);for(var u=0===t?11:t-1,c=11===t?0:t+1,d=0===t?e-1:e,p=11===t?e+1:e,v=g(d,u),b=i+a,w=b;w>7;)w-=7;b+=7-w;for(var x=!1,S=0,E=0;S<b;S++){var T=new Date(e,t,S-a+1),O=!!f(this._d)&&y(T,this._d),D=y(T,o),_=-1!==r.events.indexOf(T.toDateString()),A=S<a||S>=i+a,Z=S-a+1,P=t,R=e,M=r.startRange&&y(r.startRange,T),N=r.endRange&&y(r.endRange,T),L=r.startRange&&r.endRange&&r.startRange<T&&T<r.endRange;A&&(S<a?(Z=v+Z,P=u,R=d):(Z-=i,P=c,R=p));var B={day:Z,month:P,year:R,hasEvent:_,isSelected:O,isToday:D,isDisabled:r.minDate&&T<r.minDate||r.maxDate&&T>r.maxDate||r.disableWeekends&&h(T)||r.disableDayFn&&r.disableDayFn(T),isEmpty:A,isStartRange:M,isEndRange:N,isInRange:L,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&O&&(x=!0),s.push(k(B)),7===++E&&(r.showWeekNumber&&s.unshift(C(S-a,t,e)),l.push(j(s,r.isRTL,r.pickWholeWeek,x)),s=[],E=0,x=!1)}return I(r,l,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),c(this.el,"is-hidden"),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"===typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&a(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",u(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"===typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),a(this.el,"mousedown",this._onMouseDown,!0),a(this.el,"touchend",this._onMouseDown,!0),a(this.el,"change",this._onChange),e.keyboardInput&&a(r,"keydown",this._onKeyChange),e.field&&(a(e.field,"change",this._onInputChange),e.bound&&(a(e.trigger,"click",this._onInputClick),a(e.trigger,"focus",this._onInputFocus),a(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},D}(null)}()},31266:function(e,t,n){"use strict";var r=n(75092);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},47633:function(e,t,n){e.exports=n(31266)()},75092:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},52663:function(e,t,n){"use strict";var r=n(83017),o=n(94796);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,l={};function s(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function g(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(p,e)||!d.call(h,e)&&(f.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,v);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),A=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var Z=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var P=Symbol.iterator;function R(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=P&&e[P]||e["@@iterator"])?e:null}var M,N=Object.assign;function L(e){if(void 0===M)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);M=t&&t[1]||""}return"\n"+M+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l]){var s="\n"+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=a&&0<=l);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function W(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case k:return"Fragment";case S:return"Portal";case j:return"Profiler";case C:return"StrictMode";case I:return"Suspense";case D:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){Q(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return N({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ie(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ye=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,ke=null,Ce=null;function je(e){if(e=wo(e)){if("function"!==typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function Ee(e){ke?Ce?Ce.push(e):Ce=[e]:ke=e}function Te(){if(ke){var e=ke,t=Ce;if(Ce=ke=null,je(e),t)for(e=0;e<t.length;e++)je(t[e])}}function Oe(e,t){return e(t)}function Ie(){}var De=!1;function _e(e,t,n){if(De)return e(t,n);De=!0;try{return Oe(e,t,n)}finally{De=!1,(null!==ke||null!==Ce)&&(Ie(),Te())}}function Ae(e,t){var n=e.stateNode;if(null===n)return null;var r=So(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Ze=!1;if(c)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){Ze=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(ce){Ze=!1}function Re(e,t,n,r,o,i,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Me=!1,Ne=null,Le=!1,Be=null,Fe={onError:function(e){Me=!0,Ne=e}};function We(e,t,n,r,o,i,a,l,s){Me=!1,Ne=null,Re.apply(Fe,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(Ue(e)!==e)throw Error(i(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return He(o),e;if(a===r)return He(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=a;break}if(s===r){l=!0,r=o,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,r=o;break}if(s===r){l=!0,r=a,n=o;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var qe=o.unstable_scheduleCallback,Ye=o.unstable_cancelCallback,Ge=o.unstable_shouldYield,Ke=o.unstable_requestPaint,Qe=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(lt(e)/st|0)|0},lt=Math.log,st=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var l=a&~o;0!==l?r=dt(l):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function vt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var xt,St,kt,Ct,jt,Et=!1,Tt=[],Ot=null,It=null,Dt=null,_t=new Map,At=new Map,Zt=[],Pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rt(e,t){switch(e){case"focusin":case"focusout":Ot=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":_t.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":At.delete(t.pointerId)}}function Mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=wo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Nt(e){var t=bo(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ze(n)))return e.blockedOn=t,void jt(e.priority,(function(){kt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Lt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Bt(e,t,n){Lt(e)&&n.delete(t)}function Ft(){Et=!1,null!==Ot&&Lt(Ot)&&(Ot=null),null!==It&&Lt(It)&&(It=null),null!==Dt&&Lt(Dt)&&(Dt=null),_t.forEach(Bt),At.forEach(Bt)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ft)))}function Ut(e){function t(t){return Wt(t,e)}if(0<Tt.length){Wt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ot&&Wt(Ot,e),null!==It&&Wt(It,e),null!==Dt&&Wt(Dt,e),_t.forEach(t),At.forEach(t),n=0;n<Zt.length;n++)(r=Zt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Zt.length&&null===(n=Zt[0]).blockedOn;)Nt(n),null===n.blockedOn&&Zt.shift()}var zt=w.ReactCurrentBatchConfig,Ht=!0;function Vt(e,t,n,r){var o=bt,i=zt.transition;zt.transition=null;try{bt=1,qt(e,t,n,r)}finally{bt=o,zt.transition=i}}function $t(e,t,n,r){var o=bt,i=zt.transition;zt.transition=null;try{bt=4,qt(e,t,n,r)}finally{bt=o,zt.transition=i}}function qt(e,t,n,r){if(Ht){var o=Gt(e,t,n,r);if(null===o)Hr(e,t,r,Yt,n),Rt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Ot=Mt(Ot,e,t,n,r,o),!0;case"dragenter":return It=Mt(It,e,t,n,r,o),!0;case"mouseover":return Dt=Mt(Dt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return _t.set(i,Mt(_t.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,At.set(i,Mt(At.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Rt(e,r),4&t&&-1<Pt.indexOf(e)){for(;null!==o;){var i=wo(o);if(null!==i&&xt(i),null===(i=Gt(e,t,n,r))&&Hr(e,t,r,Yt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Yt=null;function Gt(e,t,n,r){if(Yt=null,null!==(e=bo(e=xe(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ze(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Xt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Xt,r=n.length,o="value"in Qt?Qt.value:Qt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,ln,sn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=N({},un,{view:0,detail:0}),fn=on(dn),hn=N({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(an=e.screenX-sn.screenX,ln=e.screenY-sn.screenY):ln=an=0,sn=e),an)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),pn=on(hn),gn=on(N({},hn,{dataTransfer:0})),mn=on(N({},dn,{relatedTarget:0})),yn=on(N({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=N({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(vn),wn=on(N({},un,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function jn(){return Cn}var En=N({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=on(En),On=on(N({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=on(N({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Dn=on(N({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),_n=N({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),An=on(_n),Zn=[9,13,27,32],Pn=c&&"CompositionEvent"in window,Rn=null;c&&"documentMode"in document&&(Rn=document.documentMode);var Mn=c&&"TextEvent"in window&&!Rn,Nn=c&&(!Pn||Rn&&8<Rn&&11>=Rn),Ln=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Zn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ee(r),0<(t=$r(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,qn=null;function Yn(e){Lr(e,0)}function Gn(e){if(q(xo(e)))return e}function Kn(e,t){if("change"===e)return t}var Qn=!1;if(c){var Xn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Xn=Jn}else Xn=!1;Qn=Xn&&(!document.documentMode||9<document.documentMode)}function tr(){$n&&($n.detachEvent("onpropertychange",nr),qn=$n=null)}function nr(e){if("value"===e.propertyName&&Gn(qn)){var t=[];Vn(t,qn,e,xe(e)),_e(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,($n=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn(qn)}function ir(e,t){if("click"===e)return Gn(t)}function ar(e,t){if("input"===e||"change"===e)return Gn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function sr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!lr(e[o],t[o]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cr(n,i);var a=cr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=c&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,vr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==Y(r)||("selectionStart"in(r=mr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=$r(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},kr={},Cr={};function jr(e){if(kr[e])return kr[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Cr)return kr[e]=n[t];return e}c&&(Cr=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Er=jr("animationend"),Tr=jr("animationiteration"),Or=jr("animationstart"),Ir=jr("transitionend"),Dr=new Map,_r="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ar(e,t){Dr.set(e,t),s(t,[e])}for(var Zr=0;Zr<_r.length;Zr++){var Pr=_r[Zr];Ar(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Ar(Er,"onAnimationEnd"),Ar(Tr,"onAnimationIteration"),Ar(Or,"onAnimationStart"),Ar("dblclick","onDoubleClick"),Ar("focusin","onFocus"),Ar("focusout","onBlur"),Ar(Ir,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rr));function Nr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,l,s,u){if(We.apply(this,arguments),Me){if(!Me)throw Error(i(198));var c=Ne;Me=!1,Ne=null,Le||(Le=!0,Be=c)}}(r,t,void 0,e),e.currentTarget=null}function Lr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;Nr(o,l,u),i=s}else for(a=0;a<r.length;a++){if(s=(l=r[a]).instance,u=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;Nr(o,l,u),i=s}}}if(Le)throw e=Be,Le=!1,Be=null,e}function Br(e,t){var n=t[mo];void 0===n&&(n=t[mo]=new Set);var r=e+"__bubble";n.has(r)||(zr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),zr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Wr]){e[Wr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Mr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,Fr("selectionchange",!1,t))}}function zr(e,t,n,r){switch(Kt(t)){case 1:var o=Vt;break;case 4:o=$t;break;default:o=qt}n=o.bind(null,t,n,e),o=void 0,!Ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if((3===s||4===s)&&((s=a.stateNode.containerInfo)===o||8===s.nodeType&&s.parentNode===o))return;a=a.return}for(;null!==l;){if(null===(a=bo(l)))return;if(5===(s=a.tag)||6===s){r=i=a;continue e}l=l.parentNode}}r=r.return}_e((function(){var r=i,o=xe(n),a=[];e:{var l=Dr.get(e);if(void 0!==l){var s=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=Tn;break;case"focusin":u="focus",s=mn;break;case"focusout":u="blur",s=mn;break;case"beforeblur":case"afterblur":s=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=In;break;case Er:case Tr:case Or:s=yn;break;case Ir:s=Dn;break;case"scroll":s=fn;break;case"wheel":s=An;break;case"copy":case"cut":case"paste":s=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=On}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==l?l+"Capture":null:l;c=[];for(var h,p=r;null!==p;){var g=(h=p).stateNode;if(5===h.tag&&null!==g&&(h=g,null!==f&&(null!=(g=Ae(p,f))&&c.push(Vr(p,g,h)))),d)break;p=p.return}0<c.length&&(l=new s(l,u,null,n,o),a.push({event:l,listeners:c}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!bo(u)&&!u[go])&&(s||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?bo(u):null)&&(u!==(d=Ue(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=pn,g="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=On,g="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==s?l:xo(s),h=null==u?l:xo(u),(l=new c(g,p+"leave",s,n,o)).target=d,l.relatedTarget=h,g=null,bo(o)===r&&((c=new c(f,p+"enter",u,n,o)).target=h,c.relatedTarget=d,g=c),d=g,s&&u)e:{for(f=u,p=0,h=c=s;h;h=qr(h))p++;for(h=0,g=f;g;g=qr(g))h++;for(;0<p-h;)c=qr(c),p--;for(;0<h-p;)f=qr(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=qr(c),f=qr(f)}c=null}else c=null;null!==s&&Yr(a,l,s,c,!1),null!==u&&null!==d&&Yr(a,d,u,c,!0)}if("select"===(s=(l=r?xo(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var m=Kn;else if(Hn(l))if(Qn)m=ar;else{m=or;var y=rr}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(m=ir);switch(m&&(m=m(e,r))?Vn(a,m,n,o):(y&&y(e,l,r),"focusout"===e&&(y=l._wrapperState)&&y.controlled&&"number"===l.type&&ee(l,"number",l.value)),y=r?xo(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,vr=null);break;case"focusout":vr=yr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":wr(a,n,o)}var v;if(Pn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Nn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(v=en()):(Xt="value"in(Qt=o)?Qt.value:Qt.textContent,Un=!0)),0<(y=$r(r,b)).length&&(b=new wn(b,e,null,n,o),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Wn(n))&&(b.data=v))),(v=Mn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Bn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Pn&&Fn(e,t)?(e=en(),Jt=Xt=Qt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=$r(r,"onBeforeInput")).length&&(o=new wn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=v))}Lr(a,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $r(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ae(e,n))&&r.unshift(Vr(e,i,o)),null!=(i=Ae(e,t))&&r.push(Vr(e,i,o))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,o?null!=(s=Ae(n,i))&&a.unshift(Vr(n,s,l)):o||null!=(s=Ae(n,i))&&a.push(Vr(n,s,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Gr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Gr,"\n").replace(Kr,"")}function Xr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(i(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(lo)}:ro;function lo(e){setTimeout((function(){throw e}))}function so(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ut(t)}function uo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function co(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),ho="__reactFiber$"+fo,po="__reactProps$"+fo,go="__reactContainer$"+fo,mo="__reactEvents$"+fo,yo="__reactListeners$"+fo,vo="__reactHandles$"+fo;function bo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=co(e);null!==e;){if(n=e[ho])return n;e=co(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[ho]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function xo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function So(e){return e[po]||null}var ko=[],Co=-1;function jo(e){return{current:e}}function Eo(e){0>Co||(e.current=ko[Co],ko[Co]=null,Co--)}function To(e,t){Co++,ko[Co]=e.current,e.current=t}var Oo={},Io=jo(Oo),Do=jo(!1),_o=Oo;function Ao(e,t){var n=e.type.contextTypes;if(!n)return Oo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Zo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Po(){Eo(Do),Eo(Io)}function Ro(e,t,n){if(Io.current!==Oo)throw Error(i(168));To(Io,t),To(Do,n)}function Mo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,z(e)||"Unknown",o));return N({},n,r)}function No(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oo,_o=Io.current,To(Io,e),To(Do,Do.current),!0}function Lo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Mo(e,t,_o),r.__reactInternalMemoizedMergedChildContext=e,Eo(Do),Eo(Io),To(Io,e)):Eo(Do),To(Do,n)}var Bo=null,Fo=!1,Wo=!1;function Uo(e){null===Bo?Bo=[e]:Bo.push(e)}function zo(){if(!Wo&&null!==Bo){Wo=!0;var e=0,t=bt;try{var n=Bo;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,Fo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),qe(Je,zo),o}finally{bt=t,Wo=!1}}return null}var Ho=[],Vo=0,$o=null,qo=0,Yo=[],Go=0,Ko=null,Qo=1,Xo="";function Jo(e,t){Ho[Vo++]=qo,Ho[Vo++]=$o,$o=e,qo=t}function ei(e,t,n){Yo[Go++]=Qo,Yo[Go++]=Xo,Yo[Go++]=Ko,Ko=e;var r=Qo;e=Xo;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Qo=1<<32-at(t)+o|n<<o|r,Xo=i+e}else Qo=1<<i|n<<o|r,Xo=e}function ti(e){null!==e.return&&(Jo(e,1),ei(e,1,0))}function ni(e){for(;e===$o;)$o=Ho[--Vo],Ho[Vo]=null,qo=Ho[--Vo],Ho[Vo]=null;for(;e===Ko;)Ko=Yo[--Go],Yo[Go]=null,Xo=Yo[--Go],Yo[Go]=null,Qo=Yo[--Go],Yo[Go]=null}var ri=null,oi=null,ii=!1,ai=null;function li(e,t){var n=Au(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function si(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ko?{id:Qo,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Au(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function ui(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ci(e){if(ii){var t=oi;if(t){var n=t;if(!si(e,t)){if(ui(e))throw Error(i(418));t=uo(n.nextSibling);var r=ri;t&&si(e,t)?li(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(ui(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function fi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(ui(e))throw hi(),Error(i(418));for(;t;)li(e,t),t=uo(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=uo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?uo(e.stateNode.nextSibling):null;return!0}function hi(){for(var e=oi;e;)e=uo(e.nextSibling)}function pi(){oi=ri=null,ii=!1}function gi(e){null===ai?ai=[e]:ai.push(e)}var mi=w.ReactCurrentBatchConfig;function yi(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var vi=jo(null),bi=null,wi=null,xi=null;function Si(){xi=wi=bi=null}function ki(e){var t=vi.current;Eo(vi),e._currentValue=t}function Ci(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ji(e,t){bi=e,xi=wi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(wl=!0),e.firstContext=null)}function Ei(e){var t=e._currentValue;if(xi!==e)if(e={context:e,memoizedValue:t,next:null},null===wi){if(null===bi)throw Error(i(308));wi=e,bi.dependencies={lanes:0,firstContext:e}}else wi=wi.next=e;return t}var Ti=null;function Oi(e){null===Ti?Ti=[e]:Ti.push(e)}function Ii(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Oi(t)):(n.next=o.next,o.next=n),t.interleaved=n,Di(e,r)}function Di(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var _i=!1;function Ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ri(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Is)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Di(e,n)}return null===(o=r.interleaved)?(t.next=t,Oi(r)):(t.next=o.next,o.next=t),r.interleaved=t,Di(e,n)}function Mi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}function Ni(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Li(e,t,n,r){var o=e.updateQueue;_i=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var s=l,u=s.next;s.next=null,null===a?i=u:a.next=u,a=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==i){var d=o.baseState;for(a=0,c=u=s=null,l=i;;){var f=l.lane,h=l.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,g=l;switch(f=t,h=n,g.tag){case 1:if("function"===typeof(p=g.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=g.payload)?p.call(h,d,f):p)||void 0===f)break e;d=N({},d,f);break e;case 2:_i=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[l]:f.push(l))}else h={eventTime:h,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=h,s=d):c=c.next=h,a|=f;if(null===(l=l.next)){if(null===(l=o.shared.pending))break;l=(f=l).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(s=d),o.baseState=s,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ns|=a,e.lanes=a,e.memoizedState=d}}function Bi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var Fi=(new r.Component).refs;function Wi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ui={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),o=nu(e),i=Pi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ri(e,i,o))&&(ru(t,e,o,r),Mi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),o=nu(e),i=Pi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ri(e,i,o))&&(ru(t,e,o,r),Mi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),o=Pi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Ri(e,o,r))&&(ru(t,e,r,n),Mi(t,e,r))}};function zi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(o,i))}function Hi(e,t,n){var r=!1,o=Oo,i=t.contextType;return"object"===typeof i&&null!==i?i=Ei(i):(o=Zo(t)?_o:Io.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Ao(e,o):Oo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ui,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Vi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ui.enqueueReplaceState(t,t.state,null)}function $i(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Fi,Ai(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=Ei(i):(i=Zo(t)?_o:Io.current,o.context=Ao(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(Wi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ui.enqueueReplaceState(o,o.state,null),Li(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function qi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===Fi&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Yi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gi(e){return(0,e._init)(e._payload)}function Ki(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Pu(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Lu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===k?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===A&&Gi(i)===t.type)?((r=o(t,n.props)).ref=qi(e,t,n),r.return=e,r):((r=Ru(n.type,n.key,n.props,null,e.mode,r)).ref=qi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Mu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Lu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Ru(t.type,t.key,t.props,null,e.mode,n)).ref=qi(e,null,t),n.return=e,n;case S:return(t=Bu(t,e.mode,n)).return=e,t;case A:return f(e,(0,t._init)(t._payload),n)}if(te(t)||R(t))return(t=Mu(t,e.mode,n,null)).return=e,t;Yi(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?u(e,t,n,r):null;case S:return n.key===o?c(e,t,n,r):null;case A:return h(e,t,(o=n._init)(n._payload),r)}if(te(n)||R(n))return null!==o?null:d(e,t,n,r,null);Yi(e,n)}return null}function p(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case A:return p(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||R(r))return d(t,e=e.get(n)||null,r,o,null);Yi(t,r)}return null}function g(o,i,l,s){for(var u=null,c=null,d=i,g=i=0,m=null;null!==d&&g<l.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var y=h(o,d,l[g],s);if(null===y){null===d&&(d=m);break}e&&d&&null===y.alternate&&t(o,d),i=a(y,i,g),null===c?u=y:c.sibling=y,c=y,d=m}if(g===l.length)return n(o,d),ii&&Jo(o,g),u;if(null===d){for(;g<l.length;g++)null!==(d=f(o,l[g],s))&&(i=a(d,i,g),null===c?u=d:c.sibling=d,c=d);return ii&&Jo(o,g),u}for(d=r(o,d);g<l.length;g++)null!==(m=p(d,o,g,l[g],s))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),i=a(m,i,g),null===c?u=m:c.sibling=m,c=m);return e&&d.forEach((function(e){return t(o,e)})),ii&&Jo(o,g),u}function m(o,l,s,u){var c=R(s);if("function"!==typeof c)throw Error(i(150));if(null==(s=c.call(s)))throw Error(i(151));for(var d=c=null,g=l,m=l=0,y=null,v=s.next();null!==g&&!v.done;m++,v=s.next()){g.index>m?(y=g,g=null):y=g.sibling;var b=h(o,g,v.value,u);if(null===b){null===g&&(g=y);break}e&&g&&null===b.alternate&&t(o,g),l=a(b,l,m),null===d?c=b:d.sibling=b,d=b,g=y}if(v.done)return n(o,g),ii&&Jo(o,m),c;if(null===g){for(;!v.done;m++,v=s.next())null!==(v=f(o,v.value,u))&&(l=a(v,l,m),null===d?c=v:d.sibling=v,d=v);return ii&&Jo(o,m),c}for(g=r(o,g);!v.done;m++,v=s.next())null!==(v=p(g,o,m,v.value,u))&&(e&&null!==v.alternate&&g.delete(null===v.key?m:v.key),l=a(v,l,m),null===d?c=v:d.sibling=v,d=v);return e&&g.forEach((function(e){return t(o,e)})),ii&&Jo(o,m),c}return function e(r,i,a,s){if("object"===typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case x:e:{for(var u=a.key,c=i;null!==c;){if(c.key===u){if((u=a.type)===k){if(7===c.tag){n(r,c.sibling),(i=o(c,a.props.children)).return=r,r=i;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===A&&Gi(u)===c.type){n(r,c.sibling),(i=o(c,a.props)).ref=qi(r,c,a),i.return=r,r=i;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===k?((i=Mu(a.props.children,r.mode,s,a.key)).return=r,r=i):((s=Ru(a.type,a.key,a.props,null,r.mode,s)).ref=qi(r,i,a),s.return=r,r=s)}return l(r);case S:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Bu(a,r.mode,s)).return=r,r=i}return l(r);case A:return e(r,i,(c=a._init)(a._payload),s)}if(te(a))return g(r,i,a,s);if(R(a))return m(r,i,a,s);Yi(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Lu(a,r.mode,s)).return=r,r=i),l(r)):n(r,i)}}var Qi=Ki(!0),Xi=Ki(!1),Ji={},ea=jo(Ji),ta=jo(Ji),na=jo(Ji);function ra(e){if(e===Ji)throw Error(i(174));return e}function oa(e,t){switch(To(na,t),To(ta,e),To(ea,Ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Eo(ea),To(ea,t)}function ia(){Eo(ea),Eo(ta),Eo(na)}function aa(e){ra(na.current);var t=ra(ea.current),n=se(t,e.type);t!==n&&(To(ta,e),To(ea,n))}function la(e){ta.current===e&&(Eo(ea),Eo(ta))}var sa=jo(0);function ua(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ca=[];function da(){for(var e=0;e<ca.length;e++)ca[e]._workInProgressVersionPrimary=null;ca.length=0}var fa=w.ReactCurrentDispatcher,ha=w.ReactCurrentBatchConfig,pa=0,ga=null,ma=null,ya=null,va=!1,ba=!1,wa=0,xa=0;function Sa(){throw Error(i(321))}function ka(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Ca(e,t,n,r,o,a){if(pa=a,ga=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fa.current=null===e||null===e.memoizedState?ll:sl,e=n(r,o),ba){a=0;do{if(ba=!1,wa=0,25<=a)throw Error(i(301));a+=1,ya=ma=null,t.updateQueue=null,fa.current=ul,e=n(r,o)}while(ba)}if(fa.current=al,t=null!==ma&&null!==ma.next,pa=0,ya=ma=ga=null,va=!1,t)throw Error(i(300));return e}function ja(){var e=0!==wa;return wa=0,e}function Ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ya?ga.memoizedState=ya=e:ya=ya.next=e,ya}function Ta(){if(null===ma){var e=ga.alternate;e=null!==e?e.memoizedState:null}else e=ma.next;var t=null===ya?ga.memoizedState:ya.next;if(null!==t)ya=t,ma=e;else{if(null===e)throw Error(i(310));e={memoizedState:(ma=e).memoizedState,baseState:ma.baseState,baseQueue:ma.baseQueue,queue:ma.queue,next:null},null===ya?ga.memoizedState=ya=e:ya=ya.next=e}return ya}function Oa(e,t){return"function"===typeof t?t(e):t}function Ia(e){var t=Ta(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=ma,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var l=o.next;o.next=a.next,a.next=l}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=l=null,u=null,c=a;do{var d=c.lane;if((pa&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(s=u=f,l=r):u=u.next=f,ga.lanes|=d,Ns|=d}c=c.next}while(null!==c&&c!==a);null===u?l=r:u.next=s,lr(r,t.memoizedState)||(wl=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ga.lanes|=a,Ns|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Da(e){var t=Ta(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{a=e(a,l.action),l=l.next}while(l!==o);lr(a,t.memoizedState)||(wl=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function _a(){}function Aa(e,t){var n=ga,r=Ta(),o=t(),a=!lr(r.memoizedState,o);if(a&&(r.memoizedState=o,wl=!0),r=r.queue,Ha(Ra.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ya&&1&ya.memoizedState.tag){if(n.flags|=2048,Ba(9,Pa.bind(null,n,r,o,t),void 0,null),null===Ds)throw Error(i(349));0!==(30&pa)||Za(n,t,o)}return o}function Za(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Pa(e,t,n,r){t.value=n,t.getSnapshot=r,Ma(t)&&Na(e)}function Ra(e,t,n){return n((function(){Ma(t)&&Na(e)}))}function Ma(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(r){return!0}}function Na(e){var t=Di(e,1);null!==t&&ru(t,e,1,-1)}function La(e){var t=Ea();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:e},t.queue=e,e=e.dispatch=nl.bind(null,ga,e),[t.memoizedState,e]}function Ba(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ga.updateQueue)?(t={lastEffect:null,stores:null},ga.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fa(){return Ta().memoizedState}function Wa(e,t,n,r){var o=Ea();ga.flags|=e,o.memoizedState=Ba(1|t,n,void 0,void 0===r?null:r)}function Ua(e,t,n,r){var o=Ta();r=void 0===r?null:r;var i=void 0;if(null!==ma){var a=ma.memoizedState;if(i=a.destroy,null!==r&&ka(r,a.deps))return void(o.memoizedState=Ba(t,n,i,r))}ga.flags|=e,o.memoizedState=Ba(1|t,n,i,r)}function za(e,t){return Wa(8390656,8,e,t)}function Ha(e,t){return Ua(2048,8,e,t)}function Va(e,t){return Ua(4,2,e,t)}function $a(e,t){return Ua(4,4,e,t)}function qa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ya(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ua(4,4,qa.bind(null,t,e),n)}function Ga(){}function Ka(e,t){var n=Ta();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qa(e,t){var n=Ta();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ka(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xa(e,t,n){return 0===(21&pa)?(e.baseState&&(e.baseState=!1,wl=!0),e.memoizedState=n):(lr(n,t)||(n=gt(),ga.lanes|=n,Ns|=n,e.baseState=!0),t)}function Ja(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{bt=n,ha.transition=r}}function el(){return Ta().memoizedState}function tl(e,t,n){var r=nu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e))ol(t,n);else if(null!==(n=Ii(e,t,n,r))){ru(n,e,r,tu()),il(n,t,r)}}function nl(e,t,n){var r=nu(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))ol(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,lr(l,a)){var s=t.interleaved;return null===s?(o.next=o,Oi(t)):(o.next=s.next,s.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=Ii(e,t,o,r))&&(ru(n,e,r,o=tu()),il(n,t,r))}}function rl(e){var t=e.alternate;return e===ga||null!==t&&t===ga}function ol(e,t){ba=va=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function il(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,vt(e,n)}}var al={readContext:Ei,useCallback:Sa,useContext:Sa,useEffect:Sa,useImperativeHandle:Sa,useInsertionEffect:Sa,useLayoutEffect:Sa,useMemo:Sa,useReducer:Sa,useRef:Sa,useState:Sa,useDebugValue:Sa,useDeferredValue:Sa,useTransition:Sa,useMutableSource:Sa,useSyncExternalStore:Sa,useId:Sa,unstable_isNewReconciler:!1},ll={readContext:Ei,useCallback:function(e,t){return Ea().memoizedState=[e,void 0===t?null:t],e},useContext:Ei,useEffect:za,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Wa(4194308,4,qa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wa(4,2,e,t)},useMemo:function(e,t){var n=Ea();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ea();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tl.bind(null,ga,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ea().memoizedState=e},useState:La,useDebugValue:Ga,useDeferredValue:function(e){return Ea().memoizedState=e},useTransition:function(){var e=La(!1),t=e[0];return e=Ja.bind(null,e[1]),Ea().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ga,o=Ea();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Ds)throw Error(i(349));0!==(30&pa)||Za(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,za(Ra.bind(null,r,a,e),[e]),r.flags|=2048,Ba(9,Pa.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ea(),t=Ds.identifierPrefix;if(ii){var n=Xo;t=":"+t+"R"+(n=(Qo&~(1<<32-at(Qo)-1)).toString(32)+n),0<(n=wa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=xa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sl={readContext:Ei,useCallback:Ka,useContext:Ei,useEffect:Ha,useImperativeHandle:Ya,useInsertionEffect:Va,useLayoutEffect:$a,useMemo:Qa,useReducer:Ia,useRef:Fa,useState:function(){return Ia(Oa)},useDebugValue:Ga,useDeferredValue:function(e){return Xa(Ta(),ma.memoizedState,e)},useTransition:function(){return[Ia(Oa)[0],Ta().memoizedState]},useMutableSource:_a,useSyncExternalStore:Aa,useId:el,unstable_isNewReconciler:!1},ul={readContext:Ei,useCallback:Ka,useContext:Ei,useEffect:Ha,useImperativeHandle:Ya,useInsertionEffect:Va,useLayoutEffect:$a,useMemo:Qa,useReducer:Da,useRef:Fa,useState:function(){return Da(Oa)},useDebugValue:Ga,useDeferredValue:function(e){var t=Ta();return null===ma?t.memoizedState=e:Xa(t,ma.memoizedState,e)},useTransition:function(){return[Da(Oa)[0],Ta().memoizedState]},useMutableSource:_a,useSyncExternalStore:Aa,useId:el,unstable_isNewReconciler:!1};function cl(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function dl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fl(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hl="function"===typeof WeakMap?WeakMap:Map;function pl(e,t,n){(n=Pi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vs||(Vs=!0,$s=r),fl(0,t)},n}function gl(e,t,n){(n=Pi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fl(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){fl(0,t),"function"!==typeof r&&(null===qs?qs=new Set([this]):qs.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ml(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Eu.bind(null,e,t,n),t.then(e,e))}function yl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vl(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Pi(-1,1)).tag=2,Ri(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var bl=w.ReactCurrentOwner,wl=!1;function xl(e,t,n,r){t.child=null===e?Xi(t,null,n,r):Qi(t,e.child,n,r)}function Sl(e,t,n,r,o){n=n.render;var i=t.ref;return ji(t,o),r=Ca(e,t,n,r,i,o),n=ja(),null===e||wl?(ii&&n&&ti(t),t.flags|=1,xl(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vl(e,t,o))}function kl(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Zu(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ru(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Cl(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(a,r)&&e.ref===t.ref)return Vl(e,t,o)}return t.flags|=1,(e=Pu(i,r)).ref=t.ref,e.return=t,t.child=e}function Cl(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(sr(i,r)&&e.ref===t.ref){if(wl=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Vl(e,t,o);0!==(131072&e.flags)&&(wl=!0)}}return Tl(e,t,n,r,o)}function jl(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},To(Ps,Zs),Zs|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,To(Ps,Zs),Zs|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,To(Ps,Zs),Zs|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,To(Ps,Zs),Zs|=r;return xl(e,t,o,n),t.child}function El(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tl(e,t,n,r,o){var i=Zo(n)?_o:Io.current;return i=Ao(t,i),ji(t,o),n=Ca(e,t,n,r,i,o),r=ja(),null===e||wl?(ii&&r&&ti(t),t.flags|=1,xl(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vl(e,t,o))}function Ol(e,t,n,r,o){if(Zo(n)){var i=!0;No(t)}else i=!1;if(ji(t,o),null===t.stateNode)Hl(e,t),Hi(t,n,r),$i(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=Ei(u):u=Ao(t,u=Zo(n)?_o:Io.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==r||s!==u)&&Vi(t,a,r,u),_i=!1;var f=t.memoizedState;a.state=f,Li(t,r,a,o),s=t.memoizedState,l!==r||f!==s||Do.current||_i?("function"===typeof c&&(Wi(t,n,c,r),s=t.memoizedState),(l=_i||zi(t,n,l,r,f,s,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Zi(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:yi(t.type,l),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(s=n.contextType)&&null!==s?s=Ei(s):s=Ao(t,s=Zo(n)?_o:Io.current);var h=n.getDerivedStateFromProps;(c="function"===typeof h||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==d||f!==s)&&Vi(t,a,r,s),_i=!1,f=t.memoizedState,a.state=f,Li(t,r,a,o);var p=t.memoizedState;l!==d||f!==p||Do.current||_i?("function"===typeof h&&(Wi(t,n,h,r),p=t.memoizedState),(u=_i||zi(t,n,u,r,f,p,s)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,s),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,s)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=s,r=u):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Il(e,t,n,r,i,o)}function Il(e,t,n,r,o,i){El(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&Lo(t,n,!1),Vl(e,t,i);r=t.stateNode,bl.current=t;var l=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Qi(t,e.child,null,i),t.child=Qi(t,null,l,i)):xl(e,t,l,i),t.memoizedState=r.state,o&&Lo(t,n,!0),t.child}function Dl(e){var t=e.stateNode;t.pendingContext?Ro(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ro(0,t.context,!1),oa(e,t.containerInfo)}function _l(e,t,n,r,o){return pi(),gi(o),t.flags|=256,xl(e,t,n,r),t.child}var Al,Zl,Pl,Rl,Ml={dehydrated:null,treeContext:null,retryLane:0};function Nl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ll(e,t,n){var r,o=t.pendingProps,a=sa.current,l=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),To(sa,1&a),null===e)return ci(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(s=o.children,e=o.fallback,l?(o=t.mode,l=t.child,s={mode:"hidden",children:s},0===(1&o)&&null!==l?(l.childLanes=0,l.pendingProps=s):l=Nu(s,o,0,null),e=Mu(e,o,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Nl(n),t.memoizedState=Ml,e):Bl(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,l){if(n)return 256&t.flags?(t.flags&=-257,Fl(e,t,l,r=dl(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Nu({mode:"visible",children:r.children},o,0,null),(a=Mu(a,o,l,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&Qi(t,e.child,null,l),t.child.memoizedState=Nl(l),t.memoizedState=Ml,a);if(0===(1&t.mode))return Fl(e,t,l,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Fl(e,t,l,r=dl(a=Error(i(419)),r,void 0))}if(s=0!==(l&e.childLanes),wl||s){if(null!==(r=Ds)){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|l))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Di(e,o),ru(r,e,o,-1))}return mu(),Fl(e,t,l,r=dl(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Ou.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=uo(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(Yo[Go++]=Qo,Yo[Go++]=Xo,Yo[Go++]=Ko,Qo=e.id,Xo=e.overflow,Ko=t),t=Bl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(l){l=o.fallback,s=t.mode,r=(a=e.child).sibling;var u={mode:"hidden",children:o.children};return 0===(1&s)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=Pu(a,u)).subtreeFlags=14680064&a.subtreeFlags,null!==r?l=Pu(r,l):(l=Mu(l,s,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,o=l,l=t.child,s=null===(s=e.child.memoizedState)?Nl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Ml,o}return e=(l=e.child).sibling,o=Pu(l,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bl(e,t){return(t=Nu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fl(e,t,n,r){return null!==r&&gi(r),Qi(t,e.child,null,n),(e=Bl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Wl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ci(e.return,t,n)}function Ul(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function zl(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(xl(e,t,r.children,n),0!==(2&(r=sa.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wl(e,n,t);else if(19===e.tag)Wl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(To(sa,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ua(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ul(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ua(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ul(t,!0,n,null,i);break;case"together":Ul(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hl(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ns|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Pu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function $l(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ql(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Yl(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ql(t),null;case 1:case 17:return Zo(t.type)&&Po(),ql(t),null;case 3:return r=t.stateNode,ia(),Eo(Do),Eo(Io),da(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ai&&(lu(ai),ai=null))),Zl(e,t),ql(t),null;case 5:la(t);var o=ra(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Pl(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return ql(t),null}if(e=ra(ea.current),fi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ho]=t,r[po]=a,e=0!==(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":K(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":oe(r,a),Br("invalid",r)}for(var s in ve(n,a),o=null,a)if(a.hasOwnProperty(s)){var u=a[s];"children"===s?"string"===typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&Xr(r.textContent,u,e),o=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Xr(r.textContent,u,e),o=["children",""+u]):l.hasOwnProperty(s)&&null!=u&&"onScroll"===s&&Br("scroll",r)}switch(n){case"input":$(r),J(r,a,!0);break;case"textarea":$(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ho]=t,e[po]=r,Al(e,t,!1,!1),t.stateNode=e;e:{switch(s=be(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Rr.length;o++)Br(Rr[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":K(e,r),o=G(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=N({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(a in ve(n,o),u=o)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?me(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"===typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(l.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Br("scroll",e):null!=c&&b(e,a,c,s))}switch(n){case"input":$(e),J(e,r,!1);break;case"textarea":$(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ql(t),null;case 6:if(e&&null!=t.stateNode)Rl(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=ra(na.current),ra(ea.current),fi(t)){if(r=t.stateNode,n=t.memoizedProps,r[ho]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Xr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ho]=t,t.stateNode=r}return ql(t),null;case 13:if(Eo(sa),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))hi(),pi(),t.flags|=98560,a=!1;else if(a=fi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[ho]=t}else pi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ql(t),a=!1}else null!==ai&&(lu(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&sa.current)?0===Rs&&(Rs=3):mu())),null!==t.updateQueue&&(t.flags|=4),ql(t),null);case 4:return ia(),Zl(e,t),null===e&&Ur(t.stateNode.containerInfo),ql(t),null;case 10:return ki(t.type._context),ql(t),null;case 19:if(Eo(sa),null===(a=t.memoizedState))return ql(t),null;if(r=0!==(128&t.flags),null===(s=a.rendering))if(r)$l(a,!1);else{if(0!==Rs||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(s=ua(e))){for(t.flags|=128,$l(a,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(s=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return To(sa,1&sa.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>zs&&(t.flags|=128,r=!0,$l(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ua(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),$l(a,!0),null===a.tail&&"hidden"===a.tailMode&&!s.alternate&&!ii)return ql(t),null}else 2*Qe()-a.renderingStartTime>zs&&1073741824!==n&&(t.flags|=128,r=!0,$l(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=a.last)?n.sibling=s:t.child=s,a.last=s)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=sa.current,To(sa,r?1&n|2:1&n),t):(ql(t),null);case 22:case 23:return fu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Zs)&&(ql(t),6&t.subtreeFlags&&(t.flags|=8192)):ql(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Gl(e,t){switch(ni(t),t.tag){case 1:return Zo(t.type)&&Po(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ia(),Eo(Do),Eo(Io),da(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return la(t),null;case 13:if(Eo(sa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));pi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Eo(sa),null;case 4:return ia(),null;case 10:return ki(t.type._context),null;case 22:case 23:return fu(),null;default:return null}}Al=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Zl=function(){},Pl=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ra(ea.current);var i,a=null;switch(n){case"input":o=G(e,o),r=G(e,r),a=[];break;case"select":o=N({},o,{value:void 0}),r=N({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(c in ve(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(s=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(i in s)!s.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&s[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Br("scroll",e),a||s===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Rl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Kl=!1,Ql=!1,Xl="function"===typeof WeakSet?WeakSet:Set,Jl=null;function es(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){ju(e,t,r)}else n.current=null}function ts(e,t,n){try{n()}catch(r){ju(e,t,r)}}var ns=!1;function rs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&ts(t,n,i)}o=o.next}while(o!==r)}}function os(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function is(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function as(e){var t=e.alternate;null!==t&&(e.alternate=null,as(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[po],delete t[mo],delete t[yo],delete t[vo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ls(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function us(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(us(e,t,n),e=e.sibling;null!==e;)us(e,t,n),e=e.sibling}function cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cs(e,t,n),e=e.sibling;null!==e;)cs(e,t,n),e=e.sibling}var ds=null,fs=!1;function hs(e,t,n){for(n=n.child;null!==n;)ps(e,t,n),n=n.sibling}function ps(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(l){}switch(n.tag){case 5:Ql||es(n,t);case 6:var r=ds,o=fs;ds=null,hs(e,t,n),fs=o,null!==(ds=r)&&(fs?(e=ds,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ds.removeChild(n.stateNode));break;case 18:null!==ds&&(fs?(e=ds,n=n.stateNode,8===e.nodeType?so(e.parentNode,n):1===e.nodeType&&so(e,n),Ut(e)):so(ds,n.stateNode));break;case 4:r=ds,o=fs,ds=n.stateNode.containerInfo,fs=!0,hs(e,t,n),ds=r,fs=o;break;case 0:case 11:case 14:case 15:if(!Ql&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&ts(n,t,a),o=o.next}while(o!==r)}hs(e,t,n);break;case 1:if(!Ql&&(es(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ju(n,t,l)}hs(e,t,n);break;case 21:hs(e,t,n);break;case 22:1&n.mode?(Ql=(r=Ql)||null!==n.memoizedState,hs(e,t,n),Ql=r):hs(e,t,n);break;default:hs(e,t,n)}}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Xl),t.forEach((function(t){var r=Iu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ms(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 5:ds=s.stateNode,fs=!1;break e;case 3:case 4:ds=s.stateNode.containerInfo,fs=!0;break e}s=s.return}if(null===ds)throw Error(i(160));ps(a,l,o),ds=null,fs=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(c){ju(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ys(t,e),t=t.sibling}function ys(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ms(t,e),vs(e),4&r){try{rs(3,e,e.return),os(3,e)}catch(m){ju(e,e.return,m)}try{rs(5,e,e.return)}catch(m){ju(e,e.return,m)}}break;case 1:ms(t,e),vs(e),512&r&&null!==n&&es(n,n.return);break;case 5:if(ms(t,e),vs(e),512&r&&null!==n&&es(n,n.return),32&e.flags){var o=e.stateNode;try{fe(o,"")}catch(m){ju(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,l=null!==n?n.memoizedProps:a,s=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===s&&"radio"===a.type&&null!=a.name&&Q(o,a),be(s,l);var c=be(s,a);for(l=0;l<u.length;l+=2){var d=u[l],f=u[l+1];"style"===d?me(o,f):"dangerouslySetInnerHTML"===d?de(o,f):"children"===d?fe(o,f):b(o,d,f,c)}switch(s){case"input":X(o,a);break;case"textarea":ie(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(o,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[po]=a}catch(m){ju(e,e.return,m)}}break;case 6:if(ms(t,e),vs(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){ju(e,e.return,m)}}break;case 3:if(ms(t,e),vs(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(m){ju(e,e.return,m)}break;case 4:default:ms(t,e),vs(e);break;case 13:ms(t,e),vs(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Us=Qe())),4&r&&gs(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ql=(c=Ql)||d,ms(t,e),Ql=c):ms(t,e),vs(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Jl=e,d=e.child;null!==d;){for(f=Jl=d;null!==Jl;){switch(p=(h=Jl).child,h.tag){case 0:case 11:case 14:case 15:rs(4,h,h.return);break;case 1:es(h,h.return);var g=h.stateNode;if("function"===typeof g.componentWillUnmount){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){ju(r,n,m)}}break;case 5:es(h,h.return);break;case 22:if(null!==h.memoizedState){Ss(f);continue}}null!==p?(p.return=h,Jl=p):Ss(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,c?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=f.stateNode,l=void 0!==(u=f.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,s.style.display=ge("display",l))}catch(m){ju(e,e.return,m)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){ju(e,e.return,m)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ms(t,e),vs(e),4&r&&gs(e);case 21:}}function vs(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ls(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(fe(o,""),r.flags&=-33),cs(e,ss(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;us(e,ss(e),a);break;default:throw Error(i(161))}}catch(l){ju(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bs(e,t,n){Jl=e,ws(e,t,n)}function ws(e,t,n){for(var r=0!==(1&e.mode);null!==Jl;){var o=Jl,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Kl;if(!a){var l=o.alternate,s=null!==l&&null!==l.memoizedState||Ql;l=Kl;var u=Ql;if(Kl=a,(Ql=s)&&!u)for(Jl=o;null!==Jl;)s=(a=Jl).child,22===a.tag&&null!==a.memoizedState?ks(o):null!==s?(s.return=a,Jl=s):ks(o);for(;null!==i;)Jl=i,ws(i,t,n),i=i.sibling;Jl=o,Kl=l,Ql=u}xs(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Jl=i):xs(e)}}function xs(e){for(;null!==Jl;){var t=Jl;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ql||os(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ql)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:yi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Bi(t,a,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Bi(t,l,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Ut(f)}}}break;default:throw Error(i(163))}Ql||512&t.flags&&is(t)}catch(h){ju(t,t.return,h)}}if(t===e){Jl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Jl=n;break}Jl=t.return}}function Ss(e){for(;null!==Jl;){var t=Jl;if(t===e){Jl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Jl=n;break}Jl=t.return}}function ks(e){for(;null!==Jl;){var t=Jl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{os(4,t)}catch(s){ju(t,n,s)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(s){ju(t,o,s)}}var i=t.return;try{is(t)}catch(s){ju(t,i,s)}break;case 5:var a=t.return;try{is(t)}catch(s){ju(t,a,s)}}}catch(s){ju(t,t.return,s)}if(t===e){Jl=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Jl=l;break}Jl=t.return}}var Cs,js=Math.ceil,Es=w.ReactCurrentDispatcher,Ts=w.ReactCurrentOwner,Os=w.ReactCurrentBatchConfig,Is=0,Ds=null,_s=null,As=0,Zs=0,Ps=jo(0),Rs=0,Ms=null,Ns=0,Ls=0,Bs=0,Fs=null,Ws=null,Us=0,zs=1/0,Hs=null,Vs=!1,$s=null,qs=null,Ys=!1,Gs=null,Ks=0,Qs=0,Xs=null,Js=-1,eu=0;function tu(){return 0!==(6&Is)?Qe():-1!==Js?Js:Js=Qe()}function nu(e){return 0===(1&e.mode)?1:0!==(2&Is)&&0!==As?As&-As:null!==mi.transition?(0===eu&&(eu=gt()),eu):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function ru(e,t,n,r){if(50<Qs)throw Qs=0,Xs=null,Error(i(185));yt(e,n,r),0!==(2&Is)&&e===Ds||(e===Ds&&(0===(2&Is)&&(Ls|=n),4===Rs&&su(e,As)),ou(e,r),1===n&&0===Is&&0===(1&t.mode)&&(zs=Qe()+500,Fo&&zo()))}function ou(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),l=1<<a,s=o[a];-1===s?0!==(l&n)&&0===(l&r)||(o[a]=ht(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}}(e,t);var r=ft(e,e===Ds?As:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Fo=!0,Uo(e)}(uu.bind(null,e)):Uo(uu.bind(null,e)),ao((function(){0===(6&Is)&&zo()})),n=null;else{switch(wt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Du(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Js=-1,eu=0,0!==(6&Is))throw Error(i(327));var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=ft(e,e===Ds?As:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=yu(e,r);else{t=r;var o=Is;Is|=2;var a=gu();for(Ds===e&&As===t||(Hs=null,zs=Qe()+500,hu(e,t));;)try{bu();break}catch(s){pu(e,s)}Si(),Es.current=a,Is=o,null!==_s?t=0:(Ds=null,As=0,t=Rs)}if(0!==t){if(2===t&&(0!==(o=pt(e))&&(r=o,t=au(e,o))),1===t)throw n=Ms,hu(e,0),su(e,r),ou(e,Qe()),n;if(6===t)su(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!lr(i(),o))return!1}catch(l){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=yu(e,r))&&(0!==(a=pt(e))&&(r=a,t=au(e,a))),1===t))throw n=Ms,hu(e,0),su(e,r),ou(e,Qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Su(e,Ws,Hs);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=Us+500-Qe())){if(0!==ft(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Su.bind(null,e,Ws,Hs),t);break}Su(e,Ws,Hs);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-at(r);a=1<<l,(l=t[l])>o&&(o=l),r&=~a}if(r=o,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*js(r/1960))-r)){e.timeoutHandle=ro(Su.bind(null,e,Ws,Hs),r);break}Su(e,Ws,Hs);break;default:throw Error(i(329))}}}return ou(e,Qe()),e.callbackNode===n?iu.bind(null,e):null}function au(e,t){var n=Fs;return e.current.memoizedState.isDehydrated&&(hu(e,t).flags|=256),2!==(e=yu(e,t))&&(t=Ws,Ws=n,null!==t&&lu(t)),e}function lu(e){null===Ws?Ws=e:Ws.push.apply(Ws,e)}function su(e,t){for(t&=~Bs,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(0!==(6&Is))throw Error(i(327));ku();var t=ft(e,0);if(0===(1&t))return ou(e,Qe()),null;var n=yu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=Ms,hu(e,0),su(e,t),ou(e,Qe()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Su(e,Ws,Hs),ou(e,Qe()),null}function cu(e,t){var n=Is;Is|=1;try{return e(t)}finally{0===(Is=n)&&(zs=Qe()+500,Fo&&zo())}}function du(e){null!==Gs&&0===Gs.tag&&0===(6&Is)&&ku();var t=Is;Is|=1;var n=Os.transition,r=bt;try{if(Os.transition=null,bt=1,e)return e()}finally{bt=r,Os.transition=n,0===(6&(Is=t))&&zo()}}function fu(){Zs=Ps.current,Eo(Ps)}function hu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==_s)for(n=_s.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Po();break;case 3:ia(),Eo(Do),Eo(Io),da();break;case 5:la(r);break;case 4:ia();break;case 13:case 19:Eo(sa);break;case 10:ki(r.type._context);break;case 22:case 23:fu()}n=n.return}if(Ds=e,_s=e=Pu(e.current,null),As=Zs=t,Rs=0,Ms=null,Bs=Ls=Ns=0,Ws=Fs=null,null!==Ti){for(t=0;t<Ti.length;t++)if(null!==(r=(n=Ti[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Ti=null}return e}function pu(e,t){for(;;){var n=_s;try{if(Si(),fa.current=al,va){for(var r=ga.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}va=!1}if(pa=0,ya=ma=ga=null,ba=!1,wa=0,Ts.current=null,null===n||null===n.return){Rs=1,Ms=t,_s=null;break}e:{var a=e,l=n.return,s=n,u=t;if(t=As,s.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=s,f=d.tag;if(0===(1&d.mode)&&(0===f||11===f||15===f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=yl(l);if(null!==p){p.flags&=-257,vl(p,l,s,0,t),1&p.mode&&ml(a,c,t),u=c;var g=(t=p).updateQueue;if(null===g){var m=new Set;m.add(u),t.updateQueue=m}else g.add(u);break e}if(0===(1&t)){ml(a,c,t),mu();break e}u=Error(i(426))}else if(ii&&1&s.mode){var y=yl(l);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),vl(y,l,s,0,t),gi(cl(u,s));break e}}a=u=cl(u,s),4!==Rs&&(Rs=2),null===Fs?Fs=[a]:Fs.push(a),a=l;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ni(a,pl(0,u,t));break e;case 1:s=u;var v=a.type,b=a.stateNode;if(0===(128&a.flags)&&("function"===typeof v.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===qs||!qs.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Ni(a,gl(a,s,t));break e}}a=a.return}while(null!==a)}xu(n)}catch(w){t=w,_s===n&&null!==n&&(_s=n=n.return);continue}break}}function gu(){var e=Es.current;return Es.current=al,null===e?al:e}function mu(){0!==Rs&&3!==Rs&&2!==Rs||(Rs=4),null===Ds||0===(268435455&Ns)&&0===(268435455&Ls)||su(Ds,As)}function yu(e,t){var n=Is;Is|=2;var r=gu();for(Ds===e&&As===t||(Hs=null,hu(e,t));;)try{vu();break}catch(o){pu(e,o)}if(Si(),Is=n,Es.current=r,null!==_s)throw Error(i(261));return Ds=null,As=0,Rs}function vu(){for(;null!==_s;)wu(_s)}function bu(){for(;null!==_s&&!Ge();)wu(_s)}function wu(e){var t=Cs(e.alternate,e,Zs);e.memoizedProps=e.pendingProps,null===t?xu(e):_s=t,Ts.current=null}function xu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Yl(n,t,Zs)))return void(_s=n)}else{if(null!==(n=Gl(n,t)))return n.flags&=32767,void(_s=n);if(null===e)return Rs=6,void(_s=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(_s=t);_s=t=e}while(null!==t);0===Rs&&(Rs=5)}function Su(e,t,n){var r=bt,o=Os.transition;try{Os.transition=null,bt=1,function(e,t,n,r){do{ku()}while(null!==Gs);if(0!==(6&Is))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Ds&&(_s=Ds=null,As=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Ys||(Ys=!0,Du(tt,(function(){return ku(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Os.transition,Os.transition=null;var l=bt;bt=1;var s=Is;Is|=4,Ts.current=null,function(e,t){if(eo=Ht,hr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(x){n=null;break e}var l=0,s=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==o&&3!==f.nodeType||(s=l+o),f!==a||0!==r&&3!==f.nodeType||(u=l+r),3===f.nodeType&&(l+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===o&&(s=l),h===a&&++d===r&&(u=l),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Ht=!1,Jl=t;null!==Jl;)if(e=(t=Jl).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Jl=e;else for(;null!==Jl;){t=Jl;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:yi(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(i(163))}}catch(x){ju(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Jl=e;break}Jl=t.return}g=ns,ns=!1}(e,n),ys(n,e),pr(to),Ht=!!eo,to=eo=null,e.current=n,bs(n,e,o),Ke(),Is=s,bt=l,Os.transition=a}else e.current=n;if(Ys&&(Ys=!1,Gs=e,Ks=o),a=e.pendingLanes,0===a&&(qs=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),ou(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Vs)throw Vs=!1,e=$s,$s=null,e;0!==(1&Ks)&&0!==e.tag&&ku(),a=e.pendingLanes,0!==(1&a)?e===Xs?Qs++:(Qs=0,Xs=e):Qs=0,zo()}(e,t,n,r)}finally{Os.transition=o,bt=r}return null}function ku(){if(null!==Gs){var e=wt(Ks),t=Os.transition,n=bt;try{if(Os.transition=null,bt=16>e?16:e,null===Gs)var r=!1;else{if(e=Gs,Gs=null,Ks=0,0!==(6&Is))throw Error(i(331));var o=Is;for(Is|=4,Jl=e.current;null!==Jl;){var a=Jl,l=a.child;if(0!==(16&Jl.flags)){var s=a.deletions;if(null!==s){for(var u=0;u<s.length;u++){var c=s[u];for(Jl=c;null!==Jl;){var d=Jl;switch(d.tag){case 0:case 11:case 15:rs(8,d,a)}var f=d.child;if(null!==f)f.return=d,Jl=f;else for(;null!==Jl;){var h=(d=Jl).sibling,p=d.return;if(as(d),d===c){Jl=null;break}if(null!==h){h.return=p,Jl=h;break}Jl=p}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Jl=a}}if(0!==(2064&a.subtreeFlags)&&null!==l)l.return=a,Jl=l;else e:for(;null!==Jl;){if(0!==(2048&(a=Jl).flags))switch(a.tag){case 0:case 11:case 15:rs(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Jl=v;break e}Jl=a.return}}var b=e.current;for(Jl=b;null!==Jl;){var w=(l=Jl).child;if(0!==(2064&l.subtreeFlags)&&null!==w)w.return=l,Jl=w;else e:for(l=b;null!==Jl;){if(0!==(2048&(s=Jl).flags))try{switch(s.tag){case 0:case 11:case 15:os(9,s)}}catch(S){ju(s,s.return,S)}if(s===l){Jl=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,Jl=x;break e}Jl=s.return}}if(Is=o,zo(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(S){}r=!0}return r}finally{bt=n,Os.transition=t}}return!1}function Cu(e,t,n){e=Ri(e,t=pl(0,t=cl(n,t),1),1),t=tu(),null!==e&&(yt(e,1,t),ou(e,t))}function ju(e,t,n){if(3===e.tag)Cu(e,e,n);else for(;null!==t;){if(3===t.tag){Cu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r))){t=Ri(t,e=gl(t,e=cl(n,e),1),1),e=tu(),null!==t&&(yt(t,1,e),ou(t,e));break}}t=t.return}}function Eu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,Ds===e&&(As&n)===n&&(4===Rs||3===Rs&&(130023424&As)===As&&500>Qe()-Us?hu(e,0):Bs|=n),ou(e,t)}function Tu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=tu();null!==(e=Di(e,t))&&(yt(e,t,n),ou(e,n))}function Ou(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Tu(e,n)}function Iu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Tu(e,n)}function Du(e,t){return qe(e,t)}function _u(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Au(e,t,n,r){return new _u(e,t,n,r)}function Zu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pu(e,t){var n=e.alternate;return null===n?((n=Au(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ru(e,t,n,r,o,a){var l=2;if(r=e,"function"===typeof e)Zu(e)&&(l=1);else if("string"===typeof e)l=5;else e:switch(e){case k:return Mu(n.children,o,a,t);case C:l=8,o|=8;break;case j:return(e=Au(12,n,t,2|o)).elementType=j,e.lanes=a,e;case I:return(e=Au(13,n,t,o)).elementType=I,e.lanes=a,e;case D:return(e=Au(19,n,t,o)).elementType=D,e.lanes=a,e;case Z:return Nu(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case E:l=10;break e;case T:l=9;break e;case O:l=11;break e;case _:l=14;break e;case A:l=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Au(l,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Mu(e,t,n,r){return(e=Au(7,e,r,t)).lanes=n,e}function Nu(e,t,n,r){return(e=Au(22,e,r,t)).elementType=Z,e.lanes=n,e.stateNode={isHidden:!1},e}function Lu(e,t,n){return(e=Au(6,e,null,t)).lanes=n,e}function Bu(e,t,n){return(t=Au(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Wu(e,t,n,r,o,i,a,l,s){return e=new Fu(e,t,n,l,s),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Au(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ai(i),e}function Uu(e){if(!e)return Oo;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Zo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Zo(n))return Mo(e,n,t)}return t}function zu(e,t,n,r,o,i,a,l,s){return(e=Wu(n,r,!0,e,0,i,0,l,s)).context=Uu(null),n=e.current,(i=Pi(r=tu(),o=nu(n))).callback=void 0!==t&&null!==t?t:null,Ri(n,i,o),e.current.lanes=o,yt(e,o,r),ou(e,r),e}function Hu(e,t,n,r){var o=t.current,i=tu(),a=nu(o);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Pi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ri(o,t,a))&&(ru(e,o,a,i),Mi(e,o,a)),a}function Vu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $u(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){$u(e,t),(e=e.alternate)&&$u(e,t)}Cs=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Do.current)wl=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return wl=!1,function(e,t,n){switch(t.tag){case 3:Dl(t),pi();break;case 5:aa(t);break;case 1:Zo(t.type)&&No(t);break;case 4:oa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;To(vi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(To(sa,1&sa.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ll(e,t,n):(To(sa,1&sa.current),null!==(e=Vl(e,t,n))?e.sibling:null);To(sa,1&sa.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return zl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),To(sa,sa.current),r)break;return null;case 22:case 23:return t.lanes=0,jl(e,t,n)}return Vl(e,t,n)}(e,t,n);wl=0!==(131072&e.flags)}else wl=!1,ii&&0!==(1048576&t.flags)&&ei(t,qo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var o=Ao(t,Io.current);ji(t,n),o=Ca(null,t,r,e,o,n);var a=ja();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Zo(r)?(a=!0,No(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ai(t),o.updater=Ui,t.stateNode=o,o._reactInternals=t,$i(t,r,e,n),t=Il(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),xl(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Zu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===O)return 11;if(e===_)return 14}return 2}(r),e=yi(r,e),o){case 0:t=Tl(null,t,r,e,n);break e;case 1:t=Ol(null,t,r,e,n);break e;case 11:t=Sl(null,t,r,e,n);break e;case 14:t=kl(null,t,r,yi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Tl(e,t,r,o=t.elementType===r?o:yi(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ol(e,t,r,o=t.elementType===r?o:yi(r,o),n);case 3:e:{if(Dl(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Zi(e,t),Li(t,r,null,n);var l=t.memoizedState;if(r=l.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=_l(e,t,r,n,o=cl(Error(i(423)),t));break e}if(r!==o){t=_l(e,t,r,n,o=cl(Error(i(424)),t));break e}for(oi=uo(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=Xi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pi(),r===o){t=Vl(e,t,n);break e}xl(e,t,r,n)}t=t.child}return t;case 5:return aa(t),null===e&&ci(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,l=o.children,no(r,o)?l=null:null!==a&&no(r,a)&&(t.flags|=32),El(e,t),xl(e,t,l,n),t.child;case 6:return null===e&&ci(t),null;case 13:return Ll(e,t,n);case 4:return oa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Qi(t,null,r,n):xl(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Sl(e,t,r,o=t.elementType===r?o:yi(r,o),n);case 7:return xl(e,t,t.pendingProps,n),t.child;case 8:case 12:return xl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,l=o.value,To(vi,r._currentValue),r._currentValue=l,null!==a)if(lr(a.value,l)){if(a.children===o.children&&!Do.current){t=Vl(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){l=a.child;for(var u=s.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=Pi(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Ci(a.return,n,t),s.lanes|=n;break}u=u.next}}else if(10===a.tag)l=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(l=a.return))throw Error(i(341));l.lanes|=n,null!==(s=l.alternate)&&(s.lanes|=n),Ci(l,n,t),l=a.sibling}else l=a.child;if(null!==l)l.return=a;else for(l=a;null!==l;){if(l===t){l=null;break}if(null!==(a=l.sibling)){a.return=l.return,l=a;break}l=l.return}a=l}xl(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ji(t,n),r=r(o=Ei(o)),t.flags|=1,xl(e,t,r,n),t.child;case 14:return o=yi(r=t.type,t.pendingProps),kl(e,t,r,o=yi(r.type,o),n);case 15:return Cl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yi(r,o),Hl(e,t),t.tag=1,Zo(r)?(e=!0,No(t)):e=!1,ji(t,n),Hi(t,r,o),$i(t,r,o,n),Il(null,t,r,!0,e,n);case 19:return zl(e,t,n);case 22:return jl(e,t,n)}throw Error(i(156,t.tag))};var Yu="function"===typeof reportError?reportError:function(e){console.error(e)};function Gu(e){this._internalRoot=e}function Ku(e){this._internalRoot=e}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function ec(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var l=o;o=function(){var e=Vu(a);l.call(e)}}Hu(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Vu(a);i.call(e)}}var a=zu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=a,e[go]=a.current,Ur(8===e.nodeType?e.parentNode:e),du(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var l=r;r=function(){var e=Vu(s);l.call(e)}}var s=Wu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=s,e[go]=s.current,Ur(8===e.nodeType?e.parentNode:e),du((function(){Hu(t,s,n,r)})),s}(n,t,e,o,r);return Vu(a)}Ku.prototype.render=Gu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Hu(e,t,null,null)},Ku.prototype.unmount=Gu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;du((function(){Hu(null,e,null,null)})),t[go]=null}},Ku.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zt.length&&0!==t&&t<Zt[n].priority;n++);Zt.splice(n,0,e),0===n&&Nt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(vt(t,1|n),ou(t,Qe()),0===(6&Is)&&(zs=Qe()+500,zo()))}break;case 13:du((function(){var t=Di(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}})),qu(e,1)}},St=function(e){if(13===e.tag){var t=Di(e,134217728);if(null!==t)ru(t,e,134217728,tu());qu(e,134217728)}},kt=function(e){if(13===e.tag){var t=nu(e),n=Di(e,t);if(null!==n)ru(n,e,t,tu());qu(e,t)}},Ct=function(){return bt},jt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Se=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=So(r);if(!o)throw Error(i(90));q(r),X(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Oe=cu,Ie=du;var tc={usingClientEntryPoint:!1,Events:[wo,xo,So,Ee,Te,cu]},nc={findFiberByHostInstance:bo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{ot=oc.inject(rc),it=oc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qu(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Qu(e))throw Error(i(299));var n=!1,r="",o=Yu;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Wu(e,1,!1,null,0,n,0,r,o),e[go]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Gu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return du(e)},t.hydrate=function(e,t,n){if(!Xu(t))throw Error(i(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qu(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",l=Yu;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=zu(t,null,e,1,null!=n?n:null,o,0,a,l),e[go]=t.current,Ur(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ku(t)},t.render=function(e,t,n){if(!Xu(t))throw Error(i(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(i(40));return!!e._reactRootContainer&&(du((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[go]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xu(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},57282:function(e,t,n){"use strict";var r=n(46214);t.s=r.createRoot,r.hydrateRoot},46214:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(52663)},4740:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case l:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case f:case m:case g:case s:return e;default:return t}}case o:return t}}}function S(e){return x(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=m,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||x(e)===c},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===l||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=x},35412:function(e,t,n){"use strict";e.exports=n(4740)},4370:function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,l=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?l="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==l){var s=e.displayName||e.name,u="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:function(){return a}}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},5818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(83017),a=p(i),l=p(n(46214)),s=p(n(47633)),u=p(n(48108)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(631)),d=n(37328),f=p(d),h=n(4370);function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var m=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",v=d.canUseDOM&&void 0!==l.default.createPortal,b=function(e){return document.createElement(e)},w=function(){return v?l.default.createPortal:l.default.unstable_renderSubtreeIntoContainer};function x(e){return e()}var S=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,s=Array(i),c=0;c<i;c++)s[c]=arguments[c];return n=o=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),o.removePortal=function(){!v&&l.default.unmountComponentAtNode(o.node);var e=x(o.props.parentSelector);e&&e.contains(o.node)?e.removeChild(o.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=w()(o,a.default.createElement(u.default,r({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},g(o,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(v||(this.node=b("div")),this.node.className=this.props.portalClassName,x(this.props.parentSelector).appendChild(this.node),!v&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:x(e.parentSelector),nextParent:x(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,o=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,l=n.nextParent;l!==a&&(a.removeChild(this.node),l.appendChild(this.node)),(e.isOpen||o)&&!v&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&v?(!this.node&&v&&(this.node=b("div")),w()(a.default.createElement(u.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(i.Component);S.propTypes={isOpen:s.default.bool.isRequired,style:s.default.shape({content:s.default.object,overlay:s.default.object}),portalClassName:s.default.string,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,className:s.default.oneOfType([s.default.string,s.default.shape({base:s.default.string.isRequired,afterOpen:s.default.string.isRequired,beforeClose:s.default.string.isRequired})]),overlayClassName:s.default.oneOfType([s.default.string,s.default.shape({base:s.default.string.isRequired,afterOpen:s.default.string.isRequired,beforeClose:s.default.string.isRequired})]),appElement:s.default.oneOfType([s.default.instanceOf(f.default),s.default.instanceOf(d.SafeHTMLCollection),s.default.instanceOf(d.SafeNodeList),s.default.arrayOf(s.default.instanceOf(f.default))]),onAfterOpen:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,ariaHideApp:s.default.bool,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,parentSelector:s.default.func,aria:s.default.object,data:s.default.object,role:s.default.string,contentLabel:s.default.string,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func},S.defaultProps={isOpen:!1,portalClassName:m,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},S.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,h.polyfill)(S),t.default=S},48108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(83017),l=m(n(47633)),s=g(n(76276)),u=m(n(80576)),c=g(n(631)),d=g(n(68066)),f=n(37328),h=m(f),p=m(n(27127));function g(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}n(92201);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},v=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName,a=e.parentSelector,l=a&&a().ownerDocument||document;i&&d.remove(l.body,i),o&&d.remove(l.getElementsByTagName("html")[0],o),r&&v>0&&0===(v-=1)&&c.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(s.returnFocus(n.props.preventScroll),s.teardownScopedFocus()):s.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),p.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(s.setupScopedFocus(n.node),s.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,u.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===("undefined"===typeof t?"undefined":o(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"===typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName,i=e.parentSelector,a=i&&i().ownerDocument||document;o&&d.add(a.body,o),r&&d.add(a.getElementsByTagName("html")[0],r),n&&(v+=1,c.hide(t)),p.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,i=e.defaultStyles,a=e.children,l=n?{}:i.content,s=o?{}:i.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=r({id:t,ref:this.setContentRef,style:r({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,a);return this.props.overlayElement(u,d)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),parentSelector:l.default.func,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.oneOfType([l.default.instanceOf(h.default),l.default.instanceOf(f.SafeHTMLCollection),l.default.instanceOf(f.SafeNodeList),l.default.arrayOf(l.default.instanceOf(h.default))]),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func,testId:l.default.string},t.default=b,e.exports=t.default},631:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){l&&(l.removeAttribute?l.removeAttribute("aria-hidden"):null!=l.length?l.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(l).forEach((function(e){return e.removeAttribute("aria-hidden")})));l=null},t.log=function(){0},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"===typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return l=t||l},t.validateElement=u,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){l=null};var r,o=n(98136),i=(r=o)&&r.__esModule?r:{default:r},a=n(37328);var l=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){var t=e||l;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},92201:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,l],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}a=l=null,s=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(s.length);for(var e=[a,l],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,o=n(27127),i=(r=o)&&r.__esModule?r:{default:r};var a=void 0,l=void 0,s=[];function u(){0!==s.length&&s[s.length-1].focusContent()}i.default.subscribe((function(e,t){a||l||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",u),(l=a.cloneNode()).addEventListener("focus",u)),(s=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(a.parentElement&&a.parentElement.removeChild(a),l.parentElement&&l.parentElement.removeChild(l))}))},68066:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)o(e,n[t]);var i=document.body;for(var a in r)o(i,r[a]);n={},r={}},t.log=function(){0};var n={},r={};function o(e,t){e.classList.remove(t)}t.add=function(e,t){return o=e.classList,i="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),o.add(e)}));var o,i},t.remove=function(e,t){return o=e.classList,i="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&o.remove(e)}));var o,i}},76276:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){0},t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(n){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var r,o=n(74926),i=(r=o)&&r.__esModule?r:{default:r};var a=[],l=null,s=!1;function u(){s=!0}function c(){if(s){if(s=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,i.default)(l)[0]||l).focus()}),0)}}},27127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(r.openInstances.length),r.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){r=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},r=new n;t.default=r},37328:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,o=n(7276);var i=((r=o)&&r.__esModule?r:{default:r}).default,a=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM;t.default=a},80576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,l=n[0],s=n[n.length-1],u=a();if(e===u){if(!o)return;r=s}s!==u||o||(r=l);l===u&&o&&(r=s);if(r)return t.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var d=n.indexOf(u);d>-1&&(d+=o?-1:1);if("undefined"===typeof(r=n[d]))return t.preventDefault(),void(r=o?s:l).focus();t.preventDefault(),r.focus()};var r,o=n(74926),i=(r=o)&&r.__esModule?r:{default:r};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},74926:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(l)};var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var o=window.getComputedStyle(e),i=o.getPropertyValue("display");return t?i!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,o):i===n}catch(a){return console.warn("Failed to inspect element style"),!1}}function a(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}e.exports=t.default},12942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5818),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},71274:function(e,t,n){"use strict";n.d(t,{zt:function(){return u},I0:function(){return g},v9:function(){return b},oR:function(){return h}});var r=n(83017),o=r.createContext(null);var i=function(e){e()},a=function(){return i},l={notify:function(){}};var s=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=l,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=a(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=l)},e}();var u=function(e){var t=e.store,n=e.context,i=e.children,a=(0,r.useMemo)((function(){var e=new s(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),l=(0,r.useMemo)((function(){return t.getState()}),[t]);(0,r.useEffect)((function(){var e=a.subscription;return e.trySubscribe(),l!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,l]);var u=n||o;return r.createElement(u.Provider,{value:a},i)},c=(n(47204),n(35412),"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect);n(18753);n(7896);function d(){return(0,r.useContext)(o)}function f(e){void 0===e&&(e=o);var t=e===o?d:function(){return(0,r.useContext)(e)};return function(){return t().store}}var h=f();function p(e){void 0===e&&(e=o);var t=e===o?h:f(e);return function(){return t().dispatch}}var g=p(),m=function(e,t){return e===t};function y(e){void 0===e&&(e=o);var t=e===o?d:function(){return(0,r.useContext)(e)};return function(e,n){void 0===n&&(n=m);var o=t(),i=function(e,t,n,o){var i,a=(0,r.useReducer)((function(e){return e+1}),0)[1],l=(0,r.useMemo)((function(){return new s(n,o)}),[n,o]),u=(0,r.useRef)(),d=(0,r.useRef)(),f=(0,r.useRef)(),h=(0,r.useRef)(),p=n.getState();try{i=e!==d.current||p!==f.current||u.current?e(p):h.current}catch(g){throw u.current&&(g.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),g}return c((function(){d.current=e,f.current=p,h.current=i,u.current=void 0})),c((function(){function e(){try{var e=d.current(n.getState());if(t(e,h.current))return;h.current=e}catch(g){u.current=g}a()}return l.onStateChange=e,l.trySubscribe(),e(),function(){return l.tryUnsubscribe()}}),[n,l]),i}(e,n,o.store,o.subscription);return(0,r.useDebugValue)(i),i}}var v,b=y(),w=n(46214);v=w.unstable_batchedUpdates,i=v},17745:function(e,t,n){"use strict";n.d(t,{OL:function(){return p},VK:function(){return c},rU:function(){return h}});var r=n(83017),o=n(79274),i=n(76166);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}const s=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],u=["aria-current","caseSensitive","className","end","style","to","children"];function c(e){let{basename:t,children:n,window:a}=e,l=r.useRef();null==l.current&&(l.current=(0,i.lX)({window:a,v5Compat:!0}));let s=l.current,[u,c]=r.useState({action:s.action,location:s.location});return r.useLayoutEffect((()=>s.listen(c)),[s]),r.createElement(o.F0,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:s})}const d="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,f=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,h=r.forwardRef((function(e,t){let n,{onClick:u,relative:c,reloadDocument:h,replace:p,state:g,target:m,to:y,preventScrollReset:v}=e,b=l(e,s),{basename:w}=r.useContext(o.Us),x=!1;if("string"===typeof y&&f.test(y)&&(n=y,d))try{let e=new URL(window.location.href),t=y.startsWith("//")?new URL(e.protocol+y):new URL(y),n=(0,i.Zn)(t.pathname,w);t.origin===e.origin&&null!=n?y=n+t.search+t.hash:x=!0}catch(C){}let S=(0,o.oQ)(y,{relative:c}),k=function(e,t){let{target:n,replace:a,state:l,preventScrollReset:s,relative:u}=void 0===t?{}:t,c=(0,o.s0)(),d=(0,o.TH)(),f=(0,o.WU)(e,{relative:u});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:(0,i.Ep)(d)===(0,i.Ep)(f);c(e,{replace:n,state:l,preventScrollReset:s,relative:u})}}),[d,c,f,a,l,n,e,s,u])}(y,{replace:p,state:g,target:m,preventScrollReset:v,relative:c});return r.createElement("a",a({},b,{href:n||S,onClick:x||h?u:function(e){u&&u(e),e.defaultPrevented||k(e)},ref:t,target:m}))}));const p=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:c=!1,style:d,to:f,children:p}=e,g=l(e,u),m=(0,o.WU)(f,{relative:g.relative}),y=(0,o.TH)(),v=r.useContext(o.FR),{navigator:b}=r.useContext(o.Us),w=b.encodeLocation?b.encodeLocation(m).pathname:m.pathname,x=y.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(x=x.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase());let k,C=x===w||!c&&x.startsWith(w)&&"/"===x.charAt(w.length),j=null!=S&&(S===w||!c&&S.startsWith(w)&&"/"===S.charAt(w.length)),E=C?n:void 0;k="function"===typeof s?s({isActive:C,isPending:j}):[s,C?"active":null,j?"pending":null].filter(Boolean).join(" ");let T="function"===typeof d?d({isActive:C,isPending:j}):d;return r.createElement(h,a({},g,{"aria-current":E,className:k,ref:t,style:T,to:f}),"function"===typeof p?p({isActive:C,isPending:j}):p)}));var g,m;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(g||(g={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(m||(m={}))},79274:function(e,t,n){"use strict";n.d(t,{AW:function(){return A},F0:function(){return Z},FR:function(){return l},Fg:function(){return _},TH:function(){return p},UO:function(){return v},Us:function(){return s},WU:function(){return b},Z5:function(){return P},bS:function(){return g},oQ:function(){return f},s0:function(){return y}});var r=n(83017),o=n(76166);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const a=r.createContext(null);const l=r.createContext(null);const s=r.createContext(null);const u=r.createContext(null);const c=r.createContext({outlet:null,matches:[],isDataRoute:!1});const d=r.createContext(null);function f(e,t){let{relative:n}=void 0===t?{}:t;h()||(0,o.J0)(!1);let{basename:i,navigator:a}=r.useContext(s),{hash:l,pathname:u,search:c}=b(e,{relative:n}),d=u;return"/"!==i&&(d="/"===u?i:(0,o.RQ)([i,u])),a.createHref({pathname:d,search:c,hash:l})}function h(){return null!=r.useContext(u)}function p(){return h()||(0,o.J0)(!1),r.useContext(u).location}function g(e){h()||(0,o.J0)(!1);let{pathname:t}=p();return r.useMemo((()=>(0,o.LX)(e,t)),[t,e])}function m(e){r.useContext(s).static||r.useLayoutEffect(e)}function y(){let{isDataRoute:e}=r.useContext(c);return e?function(){let{router:e}=O(E.UseNavigateStable),t=D(T.UseNavigateStable),n=r.useRef(!1);return m((()=>{n.current=!0})),r.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,i({fromRouteId:t},o)))}),[e,t])}():function(){h()||(0,o.J0)(!1);let e=r.useContext(a),{basename:t,navigator:n}=r.useContext(s),{matches:i}=r.useContext(c),{pathname:l}=p(),u=JSON.stringify((0,o.Zq)(i).map((e=>e.pathnameBase))),d=r.useRef(!1);return m((()=>{d.current=!0})),r.useCallback((function(r,i){if(void 0===i&&(i={}),!d.current)return;if("number"===typeof r)return void n.go(r);let a=(0,o.pC)(r,JSON.parse(u),l,"path"===i.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:(0,o.RQ)([t,a.pathname])),(i.replace?n.replace:n.push)(a,i.state,i)}),[t,n,u,l,e])}()}function v(){let{matches:e}=r.useContext(c),t=e[e.length-1];return t?t.params:{}}function b(e,t){let{relative:n}=void 0===t?{}:t,{matches:i}=r.useContext(c),{pathname:a}=p(),l=JSON.stringify((0,o.Zq)(i).map((e=>e.pathnameBase)));return r.useMemo((()=>(0,o.pC)(e,JSON.parse(l),a,"path"===n)),[e,l,a,n])}function w(e,t,n){h()||(0,o.J0)(!1);let{navigator:a}=r.useContext(s),{matches:l}=r.useContext(c),d=l[l.length-1],f=d?d.params:{},g=(d&&d.pathname,d?d.pathnameBase:"/");d&&d.route;let m,y=p();if(t){var v;let e="string"===typeof t?(0,o.cP)(t):t;"/"===g||(null==(v=e.pathname)?void 0:v.startsWith(g))||(0,o.J0)(!1),m=e}else m=y;let b=m.pathname||"/",w="/"===g?b:b.slice(g.length)||"/",x=(0,o.fp)(e,{pathname:w});let S=j(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},f,e.params),pathname:(0,o.RQ)([g,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?g:(0,o.RQ)([g,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n);return t&&S?r.createElement(u.Provider,{value:{location:i({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:o.aU.Pop}},S):S}function x(){let e=function(){var e;let t=r.useContext(d),n=I(T.UseRouteError),o=D(T.UseRouteError);if(t)return t;return null==(e=n.errors)?void 0:e[o]}(),t=(0,o.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:a},n):null,null)}const S=r.createElement(x,null);class k extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(c.Provider,{value:this.props.routeContext},r.createElement(d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function C(e){let{routeContext:t,match:n,children:o}=e,i=r.useContext(a);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(c.Provider,{value:t},o)}function j(e,t,n){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var a;if(null==(a=n)||!a.errors)return null;e=n.matches}let l=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||(0,o.J0)(!1),l=l.slice(0,Math.min(l.length,e+1))}return l.reduceRight(((e,o,i)=>{let a=o.route.id?null==s?void 0:s[o.route.id]:null,u=null;n&&(u=o.route.errorElement||S);let c=t.concat(l.slice(0,i+1)),d=()=>{let t;return t=a?u:o.route.Component?r.createElement(o.route.Component,null):o.route.element?o.route.element:e,r.createElement(C,{match:o,routeContext:{outlet:e,matches:c,isDataRoute:null!=n},children:t})};return n&&(o.route.ErrorBoundary||o.route.errorElement||0===i)?r.createElement(k,{location:n.location,revalidation:n.revalidation,component:u,error:a,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()}),null)}var E,T;function O(e){let t=r.useContext(a);return t||(0,o.J0)(!1),t}function I(e){let t=r.useContext(l);return t||(0,o.J0)(!1),t}function D(e){let t=function(e){let t=r.useContext(c);return t||(0,o.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,o.J0)(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(E||(E={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(T||(T={}));function _(e){let{to:t,replace:n,state:i,relative:a}=e;h()||(0,o.J0)(!1);let{matches:l}=r.useContext(c),{pathname:s}=p(),u=y(),d=(0,o.pC)(t,(0,o.Zq)(l).map((e=>e.pathnameBase)),s,"path"===a),f=JSON.stringify(d);return r.useEffect((()=>u(JSON.parse(f),{replace:n,state:i,relative:a})),[u,f,a,n,i]),null}function A(e){(0,o.J0)(!1)}function Z(e){let{basename:t="/",children:n=null,location:i,navigationType:a=o.aU.Pop,navigator:l,static:c=!1}=e;h()&&(0,o.J0)(!1);let d=t.replace(/^\/*/,"/"),f=r.useMemo((()=>({basename:d,navigator:l,static:c})),[d,l,c]);"string"===typeof i&&(i=(0,o.cP)(i));let{pathname:p="/",search:g="",hash:m="",state:y=null,key:v="default"}=i,b=r.useMemo((()=>{let e=(0,o.Zn)(p,d);return null==e?null:{location:{pathname:e,search:g,hash:m,state:y,key:v},navigationType:a}}),[d,p,g,m,y,v,a]);return null==b?null:r.createElement(s.Provider,{value:f},r.createElement(u.Provider,{children:n,value:b}))}function P(e){let{children:t,location:n}=e;return w(N(t),n)}var R;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(R||(R={}));new Promise((()=>{}));class M extends r.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,o=R.pending;if(n instanceof Promise)if(this.state.error){R.error;let e=this.state.error;Promise.reject().catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(n,void 0!==r._error?R.error:void 0!==r._data?R.success:R.pending):(R.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else R.success,Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(o===R.error&&r._error instanceof AbortedDeferredError)throw neverSettledPromise;if(o===R.error&&!t)throw r._error;if(o===R.error)return React.createElement(AwaitContext.Provider,{value:r,children:t});if(o===R.success)return React.createElement(AwaitContext.Provider,{value:r,children:e});throw r}}function N(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,i)=>{if(!r.isValidElement(e))return;let a=[...t,i];if(e.type===r.Fragment)return void n.push.apply(n,N(e.props.children,a));e.type!==A&&(0,o.J0)(!1),e.props.index&&e.props.children&&(0,o.J0)(!1);let l={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=N(e.props.children,a)),n.push(l)})),n}},27807:function(e,t,n){"use strict";n.d(t,{q:function(){return Un},q_:function(){return xn},Yz:function(){return Sn}});var r=b(),o=e=>g(e,r),i=b();o.write=e=>g(e,i);var a=b();o.onStart=e=>g(e,a);var l=b();o.onFrame=e=>g(e,l);var s=b();o.onFinish=e=>g(e,s);var u=[];o.setTimeout=(e,t)=>{let n=o.now()+t,r=()=>{let e=u.findIndex((e=>e.cancel==r));~e&&u.splice(e,1),h-=~e?1:0},i={time:n,handler:e,cancel:r};return u.splice(c(n),0,i),h+=1,m(),i};var c=e=>~(~u.findIndex((t=>t.time>e))||~u.length);o.cancel=e=>{a.delete(e),l.delete(e),s.delete(e),r.delete(e),i.delete(e)},o.sync=e=>{p=!0,o.batchedUpdates(e),p=!1},o.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];t=r,o.onStart(n)}return r.handler=e,r.cancel=()=>{a.delete(n),t=null},r};var d=typeof window<"u"?window.requestAnimationFrame:()=>{};o.use=e=>d=e,o.now=typeof performance<"u"?()=>performance.now():Date.now,o.batchedUpdates=e=>e(),o.catch=console.error,o.frameLoop="always",o.advance=()=>{"demand"!==o.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):v()};var f=-1,h=0,p=!1;function g(e,t){p?(t.delete(e),e(0)):(t.add(e),m())}function m(){f<0&&(f=0,"demand"!==o.frameLoop&&d(y))}function y(){~f&&(d(y),o.batchedUpdates(v))}function v(){let e=f;f=o.now();let t=c(f);t&&(w(u.splice(0,t),(e=>e.handler())),h-=t),h?(a.flush(),r.flush(e?Math.min(64,f-e):16.667),l.flush(),i.flush(),s.flush()):f=-1}function b(){let e=new Set,t=e;return{add(n){h+=t!=e||e.has(n)?0:1,e.add(n)},delete(n){return h-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,h-=t.size,w(t,(t=>t(n)&&e.add(t))),h+=e.size,t=e)}}}function w(e,t){e.forEach((e=>{try{t(e)}catch(n){o.catch(n)}}))}var x=n(83017),S=Object.defineProperty,k={};function C(){}((e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:!0})})(k,{assign:()=>L,colors:()=>R,createStringInterpolator:()=>_,skipAnimation:()=>M,to:()=>A,willAdvance:()=>N});var j={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function E(e,t){if(j.arr(e)){if(!j.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var T=(e,t)=>e.forEach(t);function O(e,t,n){if(j.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var I=e=>j.und(e)?[]:j.arr(e)?e:[e];function D(e,t){if(e.size){let n=Array.from(e);e.clear(),T(n,t)}}var _,A,Z=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return D(e,(e=>e(...n)))},P=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),R=null,M=!1,N=C,L=e=>{e.to&&(A=e.to),e.now&&(o.now=e.now),void 0!==e.colors&&(R=e.colors),null!=e.skipAnimation&&(M=e.skipAnimation),e.createStringInterpolator&&(_=e.createStringInterpolator),e.requestAnimationFrame&&o.use(e.requestAnimationFrame),e.batchedUpdates&&(o.batchedUpdates=e.batchedUpdates),e.willAdvance&&(N=e.willAdvance),e.frameLoop&&(o.frameLoop=e.frameLoop)},B=new Set,F=[],W=[],U=0,z={get idle(){return!B.size&&!F.length},start(e){U>e.priority?(B.add(e),o.onStart(H)):(V(e),o(q))},advance:q,sort(e){if(U)o.onFrame((()=>z.sort(e)));else{let t=F.indexOf(e);~t&&(F.splice(t,1),$(e))}},clear(){F=[],B.clear()}};function H(){B.forEach(V),B.clear(),o(q)}function V(e){F.includes(e)||$(e)}function $(e){F.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(F,(t=>t.priority>e.priority)),0,e)}function q(e){let t=W;for(let n=0;n<F.length;n++){let r=F[n];U=r.priority,r.idle||(N(r),r.advance(e),r.idle||t.push(r))}return U=0,(W=F).length=0,(F=t).length>0}var Y="[-+]?\\d*\\.?\\d+",G=Y+"%";function K(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var Q=new RegExp("rgb"+K(Y,Y,Y)),X=new RegExp("rgba"+K(Y,Y,Y,Y)),J=new RegExp("hsl"+K(Y,G,G)),ee=new RegExp("hsla"+K(Y,G,G,Y)),te=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ne=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,re=/^#([0-9a-fA-F]{6})$/,oe=/^#([0-9a-fA-F]{8})$/;function ie(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ae(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ie(o,r,e+1/3),a=ie(o,r,e),l=ie(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function le(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function se(e){return(parseFloat(e)%360+360)%360/360}function ue(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ce(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function de(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=re.exec(e))?parseInt(t[1]+"ff",16)>>>0:R&&void 0!==R[e]?R[e]:(t=Q.exec(e))?(le(t[1])<<24|le(t[2])<<16|le(t[3])<<8|255)>>>0:(t=X.exec(e))?(le(t[1])<<24|le(t[2])<<16|le(t[3])<<8|ue(t[4]))>>>0:(t=te.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=oe.exec(e))?parseInt(t[1],16)>>>0:(t=ne.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=J.exec(e))?(255|ae(se(t[1]),ce(t[2]),ce(t[3])))>>>0:(t=ee.exec(e))?(ae(se(t[1]),ce(t[2]),ce(t[3]))|ue(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var fe=(e,t,n)=>{if(j.fun(e))return e;if(j.arr(e))return fe({range:e,output:t,extrapolate:n});if(j.str(e.output[0]))return _(e);let r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,l,s){let u=s?s(e):e;if(u<t){if("identity"===a)return u;"clamp"===a&&(u=t)}if(u>n){if("identity"===l)return u;"clamp"===l&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r,u)}(e,i[t],i[t+1],o[t],o[t+1],s,a,l,r.map)}};var he=1.70158,pe=1.525*he,ge=he+1,me=2*Math.PI/3,ye=2*Math.PI/4.5,ve=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,be={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ge*e*e*e-he*e*e,easeOutBack:e=>1+ge*Math.pow(e-1,3)+he*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(pe+1)*e-pe)/2:(Math.pow(2*e-2,2)*((pe+1)*(2*e-2)+pe)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*me),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*me)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ye)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ye)/2+1,easeInBounce:e=>1-ve(1-e),easeOutBounce:ve,easeInOutBounce:e=>e<.5?(1-ve(1-2*e))/2:(1+ve(2*e-1))/2,steps:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return n=>{let r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}}},we=Symbol.for("FluidValue.get"),xe=Symbol.for("FluidValue.observers"),Se=e=>!(!e||!e[we]),ke=e=>e&&e[we]?e[we]():e,Ce=e=>e[xe]||null;function je(e,t){let n=e[xe];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ee=class{[we];[xe];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Te(this,e)}},Te=(e,t)=>_e(e,we,t);function Oe(e,t){if(e[we]){let n=e[xe];n||_e(e,xe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ie(e,t){let n=e[xe];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[xe]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var De,_e=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ae=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ze=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Pe=new RegExp(`(${Ae.source})(%|[a-z]+)`,"i"),Re=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Me=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ne=e=>{let[t,n]=Le(e);if(!t||P())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Me.test(n)?Ne(n):n||e},Le=e=>{let t=Me.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},Be=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Fe=e=>{De||(De=R?new RegExp(`(${Object.keys(R).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>ke(e).replace(Me,Ne).replace(Ze,de).replace(De,de))),n=t.map((e=>e.match(Ae).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>fe({...e,output:t})));return e=>{var n;let o=!Pe.test(t[0])&&(null===(n=t.find((e=>Pe.test(e))))||void 0===n?void 0:n.replace(Ae,"")),i=0;return t[0].replace(Ae,(()=>`${r[i++](e)}${o||""}`)).replace(Re,Be)}},We="react-spring: ",Ue=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${We}once requires a function parameter`);return function(){n||(t(...arguments),n=!0)}},ze=Ue(console.warn);var He=Ue(console.warn);function Ve(e){return j.str(e)&&("#"==e[0]||/\d/.test(e)||!P()&&Me.test(e)||e in(R||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var $e=P()?x.useEffect:x.useLayoutEffect,qe=()=>{let e=(0,x.useRef)(!1);return $e((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function Ye(){let e=(0,x.useState)()[1],t=qe();return()=>{t.current&&e(Math.random())}}var Ge=e=>(0,x.useEffect)(e,Ke),Ke=[];function Qe(e){let t=(0,x.useRef)();return(0,x.useEffect)((()=>{t.current=e})),t.current}var Xe=Symbol.for("Animated:node"),Je=e=>e&&e[Xe],et=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,Xe,t),tt=e=>e&&e[Xe]&&e[Xe].getPayload(),nt=class{payload;constructor(){et(this,this)}getPayload(){return this.payload||[]}},rt=class extends nt{constructor(e){super(),this._value=e,j.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new rt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return j.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,j.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ot=class extends rt{_string=null;_toString;constructor(e){super(0),this._toString=fe({output:[e,e]})}static create(e){return new ot(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(j.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=fe({output:[this.getValue(),e]})),this._value=0,super.reset()}},it={dependencies:null},at=class extends nt{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return O(this.source,((n,r)=>{var o;(o=n)&&o[Xe]===o?t[r]=n.getValue(e):Se(n)?t[r]=ke(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&T(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return O(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){it.dependencies&&Se(e)&&it.dependencies.add(e);let t=tt(e);t&&T(t,(e=>this.add(e)))}},lt=class extends at{constructor(e){super(e)}static create(e){return new lt(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(st)),!0)}};function st(e){return(Ve(e)?ot:rt).create(e)}function ut(e){let t=Je(e);return t?t.constructor:j.arr(e)?lt:Ve(e)?ot:rt}var ct=(e,t)=>{let n=!j.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)(((r,i)=>{let a=(0,x.useRef)(null),l=n&&(0,x.useCallback)((e=>{a.current=function(e,t){return e&&(j.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[s,u]=function(e,t){let n=new Set;return it.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new at(e),it.dependencies=null,[e,n]}(r,t),c=Ye(),d=()=>{let e=a.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},f=new dt(d,u),h=(0,x.useRef)();$e((()=>(h.current=f,T(u,(e=>Oe(e,f))),()=>{h.current&&(T(h.current.deps,(e=>Ie(e,h.current))),o.cancel(h.current.update))}))),(0,x.useEffect)(d,[]),Ge((()=>()=>{let e=h.current;T(e.deps,(t=>Ie(t,e)))}));let p=t.getComponentProps(s.getValue());return x.createElement(e,{...p,ref:l})}))},dt=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&o.write(this.update)}};var ft=Symbol.for("AnimatedComponent"),ht=e=>j.str(e)?e:e&&j.str(e.displayName)?e.displayName:j.fun(e)&&e.name||null;function pt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return j.fun(e)?e(...n):e}var gt=(e,t)=>!0===e||!!(t&&e&&(j.fun(e)?e(t):I(e).includes(t))),mt=(e,t)=>j.obj(e)?t&&e[t]:e,yt=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,vt=e=>e,bt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt,n=wt;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let r={};for(let o of n){let n=t(e[o],o);j.und(n)||(r[o]=n)}return r},wt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function St(e){let t=function(e){let t={},n=0;if(O(e,((e,r)=>{xt[r]||(t[r]=e,n++)})),n)return t}(e);if(t){let n={to:t};return O(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function kt(e){return e=ke(e),j.arr(e)?e.map(kt):Ve(e)?k.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ct(e){for(let t in e)return!0;return!1}function jt(e){return j.fun(e)||j.arr(e)&&j.obj(e[0])}function Et(e,t){var n;null!==(n=e.ref)&&void 0!==n&&n.delete(e),null===t||void 0===t||t.delete(e)}function Tt(e,t){var n;t&&e.ref!==t&&(null!==(n=e.ref)&&void 0!==n&&n.delete(e),t.add(e),e.ref=t)}var Ot={tension:170,friction:26,mass:1,damping:1,easing:be.linear,clamp:!1};function It(e,t){if(j.und(t.decay)){let n=!j.und(t.tension)||!j.und(t.friction);(n||!j.und(t.frequency)||!j.und(t.damping)||!j.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Dt=[];function _t(e,t){let{key:n,props:r,defaultProps:i,state:a,actions:l}=t;return new Promise(((t,s)=>{let u,c,d=gt(r.cancel??(null===i||void 0===i?void 0:i.cancel),n);if(d)p();else{j.und(r.pause)||(a.paused=gt(r.pause,n));let e=null===i||void 0===i?void 0:i.pause;!0!==e&&(e=a.paused||gt(e,n)),u=pt(r.delay||0,n),e?(a.resumeQueue.add(h),l.pause()):(l.resume(),h())}function f(){a.resumeQueue.add(h),a.timeouts.delete(c),c.cancel(),u=c.time-o.now()}function h(){u>0&&!k.skipAnimation?(a.delayed=!0,c=o.setTimeout(p,u),a.pauseQueue.add(f),a.timeouts.add(c)):p()}function p(){a.delayed&&(a.delayed=!1),a.pauseQueue.delete(f),a.timeouts.delete(c),e<=(a.cancelId||0)&&(d=!0);try{l.start({...r,callId:e,cancel:d},t)}catch(g){s(g)}}}))}var At=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?Rt(e.get()):t.every((e=>e.noop))?Zt(e.get()):Pt(e.get(),t.every((e=>e.finished))),Zt=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Pt=function(e,t){return{value:e,finished:t,cancelled:arguments.length>2&&void 0!==arguments[2]&&arguments[2]}},Rt=e=>({value:e,cancelled:!0,finished:!1});function Mt(e,t,n,r){let{callId:i,parentId:a,onRest:l}=t,{asyncTo:s,promise:u}=n;return a||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let c,d,h,p=bt(t,((e,t)=>"onRest"===t?void 0:e)),g=new Promise(((e,t)=>(c=e,d=t))),m=e=>{let t=i<=(n.cancelId||0)&&Rt(r)||i!==n.asyncId&&Pt(r,!1);if(t)throw e.result=t,d(e),e},y=(e,t)=>{let o=new Lt,a=new Bt;return(async()=>{if(k.skipAnimation)throw Nt(n),a.result=Pt(r,!1),d(a),a;m(o);let l=j.obj(e)?{...e}:{...t,to:e};l.parentId=i,O(p,((e,t)=>{j.und(l[t])&&(l[t]=e)}));let s=await r.start(l);return m(o),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),s})()};if(k.skipAnimation)return Nt(n),Pt(r,!1);try{let t;t=j.arr(e)?(async e=>{for(let t of e)await y(t)})(e):Promise.resolve(e(y,r.stop.bind(r))),await Promise.all([t.then(c),g]),h=Pt(r.get(),!0,!1)}catch(f){if(f instanceof Lt)h=f.result;else{if(!(f instanceof Bt))throw f;h=f.result}}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?u:void 0)}return j.fun(l)&&o.batchedUpdates((()=>{l(h,r,r.item)})),h})():u}function Nt(e,t){D(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Lt=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Bt=class extends Error{result;constructor(){super("SkipAnimationSignal")}},Ft=e=>e instanceof Ut,Wt=1,Ut=class extends Ee{id=Wt++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Je(this);return e&&e.getValue()}to(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return k.to(this,t)}interpolate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ze(`${We}The "interpolate" function is deprecated in v9 (use "to" instead)`),k.to(this,t)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e){je(this,{type:"change",parent:this,value:e,idle:arguments.length>1&&void 0!==arguments[1]&&arguments[1]})}_onPriorityChange(e){this.idle||z.sort(this),je(this,{type:"priority",parent:this,priority:e})}},zt=Symbol.for("SpringPhase"),Ht=e=>(1&e[zt])>0,Vt=e=>(2&e[zt])>0,$t=e=>(4&e[zt])>0,qt=(e,t)=>t?e[zt]|=3:e[zt]&=-3,Yt=(e,t)=>t?e[zt]|=4:e[zt]&=-5,Gt=class extends Ut{key;animation=new class{changed=!1;values=Dt;toValues=null;fromValues=Dt;to;from;config=new class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Ot)}};immediate=!1};queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!j.und(e)||!j.und(t)){let n=j.obj(e)?{...e}:{...t,from:e};j.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Vt(this)||this._state.asyncTo)||$t(this)}get goal(){return ke(this.animation.to)}get velocity(){let e=Je(this);return e instanceof rt?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Ht(this)}get isAnimating(){return Vt(this)}get isPaused(){return $t(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:o}=r,{config:i}=r,a=tt(r.to);!a&&Se(r.to)&&(o=I(ke(r.to))),r.values.forEach(((l,s)=>{if(l.done)return;let u=l.constructor==ot?1:a?a[s].lastPosition:o[s],c=r.immediate,d=u;if(!c){if(d=l.lastPosition,i.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,o=r.fromValues[s],a=null!=l.v0?l.v0:l.v0=j.arr(i.velocity)?i.velocity[s]:i.velocity,f=i.precision||(o==u?.005:Math.min(1,.001*Math.abs(u-o)));if(j.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*n);d=o+a/(1-e)*(1-r),c=Math.abs(l.lastPosition-d)<=f,t=a*r}else{t=null==l.lastVelocity?a:l.lastVelocity;let n,r=i.restVelocity||f/10,s=i.clamp?0:i.bounce,h=!j.und(s),p=o==u?l.v0>0:o<u,g=!1,m=1,y=Math.ceil(e/m);for(let e=0;e<y&&(n=Math.abs(t)>r,n||(c=Math.abs(u-d)<=f,!c));++e){h&&(g=d==u||d>u==p,g&&(t=-t*s,d=u)),t+=(1e-6*-i.tension*(d-u)+.001*-i.friction*t)/i.mass*m,d+=t*m}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,n=l.elapsedTime+=e)),r=(i.progress||0)+n/this._memoizedDuration,r=r>1?1:r<0?0:r,l.durationProgress=r),d=o+i.easing(r)*(u-o),t=(d-l.lastPosition)/e,c=1==r}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[s].done&&(c=!1),c?l.done=!0:t=!1,l.setValue(d,i.round)&&(n=!0)}));let l=Je(this),s=l.getValue();if(t){let e=ke(r.to);s===e&&!n||i.decay?n&&i.decay&&this._onChange(s):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(s)}set(e){return o.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Vt(this)){let{to:e,config:t}=this.animation;o.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return j.und(e)?(n=this.queue||[],this.queue=[]):n=[j.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>At(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),Nt(this._state,e&&this._lastCallId),o.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;n=j.obj(n)?n[t]:n,(null==n||jt(n))&&(n=void 0),r=j.obj(r)?r[t]:r,null==r&&(r=void 0);let o={to:n,from:r};return Ht(this)||(e.reverse&&([n,r]=[r,n]),r=ke(r),j.und(r)?Je(this)||this._set(n):this._set(r)),o}_update(e,t){let{...n}=e,{key:r,defaultProps:o}=this;n.default&&Object.assign(o,bt(n,((e,t)=>/^on/.test(t)?mt(e,r):e))),nn(this,n,"onProps"),rn(this,"onProps",n,this);let i=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return _t(++this._lastCallId,{key:r,props:n,defaultProps:o,state:a,actions:{pause:()=>{$t(this)||(Yt(this,!0),Z(a.pauseQueue),rn(this,"onPause",Pt(this,Kt(this,this.animation.to)),this))},resume:()=>{$t(this)&&(Yt(this,!1),Vt(this)&&this._resume(),Z(a.resumeQueue),rn(this,"onResume",Pt(this,Kt(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){let e=Qt(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Rt(this));let r=!j.und(e.to),i=!j.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(Rt(this));this._lastToId=t.callId}let{key:a,defaultProps:l,animation:s}=this,{to:u,from:c}=s,{to:d=u,from:f=c}=e;i&&!r&&(!t.default||j.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);let h=!E(f,c);h&&(s.from=f),f=ke(f);let p=!E(d,u);p&&this._focus(d);let g=jt(t.to),{config:m}=s,{decay:y,velocity:v}=m;(r||i)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(It(n={...n},t),t={...n,...t}),It(e,t),Object.assign(e,t);for(let a in Ot)null==e[a]&&(e[a]=Ot[a]);let{frequency:r,damping:o}=e,{mass:i}=e;j.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,pt(t.config,a),t.config!==l.config?pt(l.config,a):void 0);let b=Je(this);if(!b||j.und(d))return n(Pt(this,!0));let w=j.und(t.reset)?i&&!t.default:!j.und(f)&>(t.reset,a),x=w?f:this.get(),S=kt(d),k=j.num(S)||j.arr(S)||Ve(S),C=!g&&(!k||gt(l.immediate||t.immediate,a));if(p){let e=ut(d);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(S)}}let O=b.constructor,D=Se(d),_=!1;if(!D){let e=w||!Ht(this)&&h;(p||e)&&(_=E(kt(x),S),D=!_),(!E(s.immediate,C)&&!C||!E(m.decay,y)||!E(m.velocity,v))&&(D=!0)}if(_&&Vt(this)&&(s.changed&&!w?D=!0:D||this._stop(u)),!g&&((D||Se(u))&&(s.values=b.getPayload(),s.toValues=Se(d)?null:O==ot?[1]:I(S)),s.immediate!=C&&(s.immediate=C,!C&&!w&&this._set(u)),D)){let{onRest:e}=s;T(tn,(e=>nn(this,t,e)));let r=Pt(this,Kt(this,u));Z(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&o.batchedUpdates((()=>{var t;s.changed=!w,null!==e&&void 0!==e&&e(r,this),w?pt(l.onRest,r):null===(t=s.onStart)||void 0===t||t.call(s,r,this)}))}w&&this._set(x),g?n(Mt(t.to,t,this._state,this)):D?this._start():Vt(this)&&!p?this._pendingCalls.add(n):n(Zt(x))}_focus(e){let t=this.animation;e!==t.to&&(Ce(this)&&this._detach(),t.to=e,Ce(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Se(t)&&(Oe(t,this),Ft(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Se(e)&&Ie(e,this)}_set(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=ke(e);if(!j.und(n)){let e=Je(this);if(!e||!E(n,e.getValue())){let r=ut(n);e&&e.constructor==r?e.setValue(n):et(this,r.create(n)),e&&o.batchedUpdates((()=>{this._onChange(n,t)}))}}return Je(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rn(this,"onStart",Pt(this,Kt(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),pt(this.animation.onChange,e,this)),pt(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;Je(this).reset(ke(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),Vt(this)||(qt(this,!0),$t(this)||this._resume())}_resume(){k.skipAnimation?this.finish():z.start(this)}_stop(e,t){if(Vt(this)){qt(this,!1);let n=this.animation;T(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),je(this,{type:"idle",parent:this});let r=t?Rt(this.get()):Pt(this.get(),Kt(this,e??n.to));Z(this._pendingCalls,r),n.changed&&(n.changed=!1,rn(this,"onRest",r,this))}}};function Kt(e,t){let n=kt(t);return E(kt(e.get()),n)}function Qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.loop,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.to,r=pt(t);if(r){let o=!0!==r&&St(r),i=(o||e).reverse,a=!o||o.reset;return Xt({...e,loop:t,default:!1,pause:void 0,to:!i||jt(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function Xt(e){let{to:t,from:n}=e=St(e),r=new Set;return j.obj(t)&&en(t,r),j.obj(n)&&en(n,r),e.keys=r.size?Array.from(r):null,e}function Jt(e){let t=Xt(e);return j.und(t.default)&&(t.default=bt(t)),t}function en(e,t){O(e,((e,n)=>null!=e&&t.add(n)))}var tn=["onStart","onRest","onChange","onPause","onResume"];function nn(e,t,n){e.animation[n]=t[n]!==yt(t,n)?mt(t[n],e.key):void 0}function rn(e,t){for(var n,r,o,i,a=arguments.length,l=new Array(a>2?a-2:0),s=2;s<a;s++)l[s-2]=arguments[s];null!==(n=(r=e.animation)[t])&&void 0!==n&&n.call(r,...l),null===(o=(i=e.defaultProps)[t])||void 0===o||o.call(i,...l)}var on=["onStart","onChange","onRest"],an=1,ln=class{id=an++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];j.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Xt(e)),this}start(e){let{queue:t}=this;return e?t=I(e).map(Xt):this.queue=[],this._flush?this._flush(this,t):(pn(this,t),sn(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;T(I(t),(t=>n[t].stop(!!e)))}else Nt(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(j.und(e))this.start({pause:!0});else{let t=this.springs;T(I(e),(e=>t[e].pause()))}return this}resume(e){if(j.und(e))this.start({pause:!1});else{let t=this.springs;T(I(e),(e=>t[e].resume()))}return this}each(e){O(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,D(e,(e=>{let[t,n]=e;n.value=this.get(),t(n,this,this._item)})));let i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&D(t,(e=>{let[t,n]=e;n.value=a,t(n,this,this._item)})),i&&(this._started=!1,D(n,(e=>{let[t,n]=e;n.value=a,t(n,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}o.onFrame(this._onFrame)}};function sn(e,t){return Promise.all(t.map((t=>un(e,t)))).then((t=>At(e,t)))}async function un(e,t,n){let{keys:r,to:i,from:a,loop:l,onRest:s,onResolve:u}=t,c=j.obj(t.default)&&t.default;l&&(t.loop=!1),!1===i&&(t.to=null),!1===a&&(t.from=null);let d=j.arr(i)||j.fun(i)?i:void 0;d?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):T(on,(n=>{let r=t[n];if(j.fun(r)){let o=e._events[n];t[n]=e=>{let{finished:t,cancelled:n}=e,i=o.get(r);i?(t||(i.finished=!1),n&&(i.cancelled=!0)):o.set(r,{value:null,finished:t||!1,cancelled:n||!1})},c&&(c[n]=t[n])}}));let f=e._state;t.pause===!f.paused?(f.paused=t.pause,Z(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);let h=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===yt(t,"cancel");(d||p&&f.asyncId)&&h.push(_t(++e._lastAsyncId,{props:t,state:f,actions:{pause:C,resume:C,start(t,n){p?(Nt(f,e._lastAsyncId),n(Rt(e))):(t.onRest=s,n(Mt(d,t,f,e)))}}})),f.paused&&await new Promise((e=>{f.resumeQueue.add(e)}));let g=At(e,await Promise.all(h));if(l&&g.finished&&(!n||!g.noop)){let n=Qt(t,l,i);if(n)return pn(e,[n]),un(e,n,!0)}return u&&o.batchedUpdates((()=>u(g,e,e.item))),g}function cn(e,t){let n={...e.springs};return t&&T(I(t),(e=>{j.und(e.keys)&&(e=Xt(e)),j.obj(e.to)||(e={...e,to:void 0}),hn(n,e,(e=>fn(e)))})),dn(e,n),n}function dn(e,t){O(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Oe(t,e))}))}function fn(e,t){let n=new Gt;return n.key=e,t&&Oe(n,t),n}function hn(e,t,n){t.keys&&T(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function pn(e,t){T(t,(t=>{hn(e.springs,t,(t=>fn(t,e)))}))}var gn,mn,yn=e=>{let{children:t,...n}=e,r=(0,x.useContext)(vn),o=n.pause||!!r.pause,i=n.immediate||!!r.immediate;n=function(e,t){let[n]=(0,x.useState)((()=>({inputs:t,result:e()}))),r=(0,x.useRef)(),o=r.current,i=o;return i?t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs)||(i={inputs:t,result:e()}):i=n,(0,x.useEffect)((()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:i})),[o,i]);let{Provider:a}=vn;return x.createElement(a,{value:n},t)},vn=(gn=yn,mn={},Object.assign(gn,x.createContext(mn)),gn.Provider._context=gn,gn.Consumer._context=gn,gn);yn.Provider=vn.Provider,yn.Consumer=vn.Consumer;var bn=()=>{let e=[],t=function(t){He(`${We}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);let r=[];return T(e,((e,o)=>{if(j.und(t))r.push(e.start());else{let i=n(t,e,o);i&&r.push(e.start(i))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return T(e,(e=>e.pause(...arguments))),this},t.resume=function(){return T(e,(e=>e.resume(...arguments))),this},t.set=function(t){T(e,((e,n)=>{let r=j.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){let n=[];return T(e,((e,r)=>{if(j.und(t))n.push(e.start());else{let o=this._getProps(t,e,r);o&&n.push(e.start(o))}})),n},t.stop=function(){return T(e,(e=>e.stop(...arguments))),this},t.update=function(t){return T(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};let n=function(e,t,n){return j.fun(e)?e(n,t):e};return t._getProps=n,t};function wn(e,t,n){let r=j.fun(t)&&t;r&&!n&&(n=[]);let o=(0,x.useMemo)((()=>r||3==arguments.length?bn():void 0),[]),i=(0,x.useRef)(0),a=Ye(),l=(0,x.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){let n=cn(e,t);return i.current>0&&!l.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?sn(e,t):new Promise((r=>{dn(e,n),l.queue.push((()=>{r(sn(e,t))})),a()}))}})),[]),s=(0,x.useRef)([...l.ctrls]),u=[],c=Qe(e)||0;function d(e,n){for(let o=e;o<n;o++){let e=s.current[o]||(s.current[o]=new ln(null,l.flush)),n=r?r(o,e):t[o];n&&(u[o]=Jt(n))}}(0,x.useMemo)((()=>{T(s.current.slice(e,c),(e=>{Et(e,o),e.stop(!0)})),s.current.length=e,d(c,e)}),[e]),(0,x.useMemo)((()=>{d(0,Math.min(c,e))}),n);let f=s.current.map(((e,t)=>cn(e,u[t]))),h=(0,x.useContext)(yn),p=Qe(h),g=h!==p&&Ct(h);$e((()=>{i.current++,l.ctrls=s.current;let{queue:e}=l;e.length&&(l.queue=[],T(e,(e=>e()))),T(s.current,((e,t)=>{null!==o&&void 0!==o&&o.add(e),g&&e.start({default:h});let n=u[t];n&&(Tt(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ge((()=>()=>{T(l.ctrls,(e=>e.stop(!0)))}));let m=f.map((e=>({...e})));return o?[m,o]:m}function xn(e,t){let n=j.fun(e),[[r],o]=wn(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}function Sn(e,t,n){let r=j.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:l=!0,exitBeforeEnter:s=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=(0,x.useMemo)((()=>r||3==arguments.length?bn():void 0),[]),h=I(e),p=[],g=(0,x.useRef)(null),m=o?null:g.current;$e((()=>{g.current=p})),Ge((()=>(T(p,(e=>{null!==f&&void 0!==f&&f.add(e.ctrl),e.ctrl.ref=f})),()=>{T(g.current,(e=>{e.expired&&clearTimeout(e.expirationId),Et(e.ctrl,f),e.ctrl.stop(!0)}))})));let y=function(e,t,n){let{key:r,keys:o=r}=t;if(null===o){let t=new Set;return e.map((e=>{let r=n&&n.find((n=>n.item===e&&"leave"!==n.phase&&!t.has(n)));return r?(t.add(r),r.key):kn++}))}return j.und(o)?e:j.fun(o)?e.map(o):I(o)}(h,r?r():t,m),v=o&&g.current||[];$e((()=>T(v,(e=>{let{ctrl:t,item:n,key:r}=e;Et(t,f),pt(u,n,r)}))));let b=[];if(m&&T(m,((e,t)=>{e.expired?(clearTimeout(e.expirationId),v.push(e)):~(t=b[t]=y.indexOf(e.key))&&(p[t]=e)})),T(h,((e,t)=>{p[t]||(p[t]={key:y[t],item:e,phase:"mount",ctrl:new ln},p[t].ctrl.item=e)})),b.length){let e=-1,{leave:n}=r?r():t;T(b,((t,r)=>{let o=m[r];~t?(e=p.indexOf(o),p[e]={...o,item:h[t]}):n&&p.splice(++e,0,o)}))}j.fun(i)&&p.sort(((e,t)=>i(e.item,t.item)));let w=-a,S=Ye(),k=bt(t),C=new Map,E=(0,x.useRef)(new Map),O=(0,x.useRef)(!1);T(p,((e,n)=>{let o,i,u=e.key,f=e.phase,h=r?r():t,p=pt(h.delay||0,u);if("mount"==f)o=h.enter,i="enter";else{let e=y.indexOf(u)<0;if("leave"!=f)if(e)o=h.leave,i="leave";else{if(!(o=h.update))return;i="update"}else{if(e)return;o=h.enter,i="enter"}}if(o=pt(o,e.item,n),o=j.obj(o)?St(o):{to:o},!o.config){let t=d||k.config;o.config=pt(t,e.item,n,i)}w+=a;let v={...k,delay:p+w,ref:c,immediate:h.immediate,reset:!1,...o};if("enter"==i&&j.und(v.from)){let o=r?r():t,i=j.und(o.initial)||m?o.from:o.initial;v.from=pt(i,e.item,n)}let{onResolve:b}=v;v.onResolve=e=>{pt(b,e);let t=g.current,n=t.find((e=>e.key===u));if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){let e=t.every((e=>e.ctrl.idle));if("leave"==n.phase){let t=pt(l,n.item);if(!1!==t){let r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(S,r)))}}e&&t.some((e=>e.expired))&&(E.current.delete(n),s&&(O.current=!0),S())}};let x=cn(e.ctrl,v);"leave"===i&&s?E.current.set(e,{phase:i,springs:x,payload:v}):C.set(e,{phase:i,springs:x,payload:v})}));let D=(0,x.useContext)(yn),_=Qe(D),A=D!==_&&Ct(D);$e((()=>{A&&T(p,(e=>{e.ctrl.start({default:D})}))}),[D]),T(C,((e,t)=>{if(E.current.size){let e=p.findIndex((e=>e.key===t.key));p.splice(e,1)}})),$e((()=>{T(E.current.size?E.current:C,((e,t)=>{let{phase:n,payload:r}=e,{ctrl:o}=t;t.phase=n,null!==f&&void 0!==f&&f.add(o),A&&"enter"==n&&o.start({default:D}),r&&(Tt(o,r.ref),!o.ref&&!f||O.current?(o.start(r),O.current&&(O.current=!1)):o.update(r))}))}),o?void 0:n);let Z=e=>x.createElement(x.Fragment,null,p.map(((t,n)=>{let{springs:r}=C.get(t)||t.ctrl,o=e({...r},t.item,t,n);return o&&o.type?x.createElement(o.type,{...o.props,key:j.str(t.key)||j.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o})));return f?[Z,f]:Z}var kn=1;var Cn=class extends Ut{constructor(e,t){super(),this.source=e,this.calc=fe(...t);let n=this._get(),r=ut(n);et(this,r.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();E(t,this.get())||(Je(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&En(this._active)&&Tn(this)}_get(){let e=j.arr(this.source)?this.source.map(ke):I(ke(this.source));return this.calc(...e)}_start(){this.idle&&!En(this._active)&&(this.idle=!1,T(tt(this),(e=>{e.done=!1})),k.skipAnimation?(o.batchedUpdates((()=>this.advance())),Tn(this)):z.start(this))}_attach(){let e=1;T(I(this.source),(t=>{Se(t)&&Oe(t,this),Ft(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){T(I(this.source),(e=>{Se(e)&&Ie(e,this)})),this._active.clear(),Tn(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=I(this.source).reduce(((e,t)=>Math.max(e,(Ft(t)?t.priority:0)+1)),0))}};function jn(e){return!1!==e.idle}function En(e){return!e.size||Array.from(e).every(jn)}function Tn(e){e.idle||(e.idle=!0,T(tt(e),(e=>{e.done=!0})),je(e,{type:"idle",parent:e}))}k.assign({createStringInterpolator:Fe,to:(e,t)=>new Cn(e,t)});z.advance;var On=n(46214),In=/^--/;function Dn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||In.test(e)||An.hasOwnProperty(e)&&An[e]?(""+t).trim():t+"px"}var _n={};var An={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zn=["Webkit","Ms","Moz","O"];An=Object.keys(An).reduce(((e,t)=>(Zn.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),An);var Pn=/^(matrix|translate|scale|rotate|skew)/,Rn=/^(translate)/,Mn=/^(rotate|skew)/,Nn=(e,t)=>j.num(e)&&0!==e?e+t:e,Ln=(e,t)=>j.arr(e)?e.every((e=>Ln(e,t))):j.num(e)?e===t:parseFloat(e)===t,Bn=class extends at{constructor(e){let{x:t,y:n,z:r,...o}=e,i=[],a=[];(t||n||r)&&(i.push([t||0,n||0,r||0]),a.push((e=>[`translate3d(${e.map((e=>Nn(e,"px"))).join(",")})`,Ln(e,0)]))),O(o,((e,t)=>{if("transform"===t)i.push([e||""]),a.push((e=>[e,""===e]));else if(Pn.test(t)){if(delete o[t],j.und(e))return;let n=Rn.test(t)?"px":Mn.test(t)?"deg":"";i.push(I(e)),a.push("rotate3d"===t?e=>{let[t,r,o,i]=e;return[`rotate3d(${t},${r},${o},${Nn(i,n)})`,Ln(i,0)]}:e=>[`${t}(${e.map((e=>Nn(e,n))).join(",")})`,Ln(e,t.startsWith("scale")?1:0)])}})),i.length&&(o.transform=new Fn(i,a)),super(o)}},Fn=class extends Ee{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return T(this.inputs,((n,r)=>{let o=ke(n[0]),[i,a]=this.transforms[r](j.arr(o)?o:n.map(ke));e+=" "+i,t=t&&a})),t?"none":e}observerAdded(e){1==e&&T(this.inputs,(e=>T(e,(e=>Se(e)&&Oe(e,this)))))}observerRemoved(e){0==e&&T(this.inputs,(e=>T(e,(e=>Se(e)&&Ie(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),je(this,e)}};k.assign({batchedUpdates:On.unstable_batchedUpdates,createStringInterpolator:Fe,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Wn=function(e){let{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new at(e)),getComponentProps:r=(e=>e)}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{let t=ht(e)||"Anonymous";return(e=j.str(e)?i[e]||(i[e]=ct(e,o)):e[ft]||(e[ft]=ct(e,o))).displayName=`Animated(${t})`,e};return O(e,((t,n)=>{j.arr(e)&&(n=ht(t)),i[n]=i(t)})),{animated:i}}(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:l,...s}=t,u=Object.values(s),c=Object.keys(s).map((t=>n||e.hasAttribute(t)?t:_n[t]||(_n[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==o&&(e.textContent=o);for(let d in r)if(r.hasOwnProperty(d)){let t=Dn(d,r[d]);In.test(d)?e.style.setProperty(d,t):e.style[d]=t}c.forEach(((t,n)=>{e.setAttribute(t,u[n])})),void 0!==i&&(e.scrollTop=i),void 0!==a&&(e.scrollLeft=a),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Bn(e),getComponentProps:e=>{let{scrollTop:t,scrollLeft:n,...r}=e;return r}}),Un=Wn.animated},22644:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r,o=n(83017),i="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{};let a;a="undefined"!==typeof window?window:"undefined"!==typeof self?self:i;let l=null,s=null;const u=a.clearTimeout,c=a.setTimeout,d=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame,f=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame;function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}null==d||null==f?(l=u,s=function(e){return c(e,20)}):(l=function(e){let[t,n]=e;d(t),u(n)},s=function(e){const t=f((function(){u(n),e()})),n=c((function(){d(t),e()}),20);return[t,n]}),r={createDetectElementResize:function(e){let t,n,r,o,i,u,c;const d="undefined"!==typeof document&&document.attachEvent;if(!d){u=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},c=function(e){if(e.target.className&&"function"===typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;u(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=s((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,a="";r="animationstart";const d="Webkit Moz O ms".split(" ");let f="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<d.length;n++)if(void 0!==t.style[d[n]+"AnimationName"]){h=d[n],a="-"+h.toLowerCase()+"-",r=f[n],e=!0;break}}n="resizeanim",t="@"+a+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=a+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,l){if(d)i.attachEvent("onresize",l);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,s=a.getComputedStyle(i);s&&"static"===s.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const d=l.createElement("div");d.className="expand-trigger",d.appendChild(l.createElement("div"));const f=l.createElement("div");f.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(f),i.appendChild(i.__resizeTriggers__),u(i),i.addEventListener("scroll",c,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&u(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(l)}},removeResizeListener:function(e,t){if(d)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}};class p extends o.Component{constructor(){super(...arguments),h(this,"state",{height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0}),h(this,"_autoSizer",null),h(this,"_detectElementResize",null),h(this,"_parentNode",null),h(this,"_resizeObserver",null),h(this,"_onResize",(()=>{const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){var r,o,i,a;const l=window.getComputedStyle(this._parentNode)||{},s=parseInt(null!==(r=l.paddingLeft)&&void 0!==r?r:"0",10),u=parseInt(null!==(o=l.paddingRight)&&void 0!==o?o:"0",10),c=parseInt(null!==(i=l.paddingTop)&&void 0!==i?i:"0",10),d=parseInt(null!==(a=l.paddingBottom)&&void 0!==a?a:"0",10),f=this._parentNode.getBoundingClientRect(),h=f.height-c-d,p=f.width-s-u,g=this._parentNode.offsetHeight-c-d,m=this._parentNode.offsetWidth-s-u;(e||this.state.height===g&&this.state.scaledHeight===h)&&(t||this.state.width===m&&this.state.scaledWidth===p)||(this.setState({height:g,width:m,scaledHeight:h,scaledWidth:p}),"function"===typeof n&&n({height:g,scaledHeight:h,scaledWidth:p,width:m}))}})),h(this,"_setRef",(e=>{this._autoSizer=e}))}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!==typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((()=>{setTimeout(this._onResize,0)})),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=(0,r.createDetectElementResize)(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r,disableWidth:i,nonce:a,onResize:l,style:s,tagName:u="div",...c}=this.props,{height:d,scaledHeight:f,scaledWidth:h,width:p}=this.state,g={overflow:"visible"},m={};let y=!1;return r||(0===d&&(y=!0),g.height=0,m.height=d,m.scaledHeight=f),i||(0===p&&(y=!0),g.width=0,m.width=p,m.scaledWidth=h),(0,o.createElement)(u,{ref:this._setRef,style:{...g,...s},...c},!y&&e(m))}}h(p,"defaultProps",{onResize:()=>{},disableHeight:!1,disableWidth:!1,style:{}});var g=p},82786:function(e,t,n){"use strict";var r=n(83017),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:l.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},66519:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,g(w,y.prototype),w.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,r){var o,i={},a=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,o)&&!C.hasOwnProperty(o)&&(i[o]=t[o]);var s=arguments.length-2;if(1===s)i.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(o in s=e.defaultProps)void 0===i[o]&&(i[o]=s[o]);return{$$typeof:n,type:e,key:a,ref:l,props:i,_owner:k.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function O(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function I(e,t,o,i,a){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return a=a(s=e),e=""===i?"."+O(s,0):i,x(a)?(o="",null!=e&&(o=e.replace(T,"$&/")+"/"),I(a,t,o,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+e)),t.push(a)),1;if(s=0,i=""===i?".":i+":",x(e))for(var u=0;u<e.length;u++){var c=i+O(l=e[u],u);s+=I(l,t,o,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=I(l=l.value,t,o,c=i+O(l,u++),a);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function D(e,t,n){if(null==e)return e;var r=[],o=0;return I(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function _(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A={current:null},Z={transition:null},P={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:Z,ReactCurrentOwner:k};t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=a,t.PureComponent=b,t.StrictMode=i,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),i=e.key,a=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,l=k.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)S.call(t,u)&&!C.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=j,t.createFactory=function(e){var t=j.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=Z.transition;Z.transition={};try{e()}finally{Z.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return A.current.useCallback(e,t)},t.useContext=function(e){return A.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return A.current.useDeferredValue(e)},t.useEffect=function(e,t){return A.current.useEffect(e,t)},t.useId=function(){return A.current.useId()},t.useImperativeHandle=function(e,t,n){return A.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return A.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.current.useMemo(e,t)},t.useReducer=function(e,t,n){return A.current.useReducer(e,t,n)},t.useRef=function(e){return A.current.useRef(e)},t.useState=function(e){return A.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return A.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return A.current.useTransition()},t.version="18.2.0"},83017:function(e,t,n){"use strict";e.exports=n(66519)},28993:function(e,t,n){"use strict";e.exports=n(82786)},18753:function(e,t,n){"use strict";n.d(t,{md:function(){return m},DE:function(){return p},UY:function(){return f},MT:function(){return d}});var r=n(56666);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var l="function"===typeof Symbol&&Symbol.observable||"@@observable",s=function(){return Math.random().toString(36).substring(7).split("").join(".")},u={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function c(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function d(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(a(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(a(1));return n(d)(e,t)}if("function"!==typeof e)throw new Error(a(2));var o=e,i=t,s=[],f=s,h=!1;function p(){f===s&&(f=s.slice())}function g(){if(h)throw new Error(a(3));return i}function m(e){if("function"!==typeof e)throw new Error(a(4));if(h)throw new Error(a(5));var t=!0;return p(),f.push(e),function(){if(t){if(h)throw new Error(a(6));t=!1,p();var n=f.indexOf(e);f.splice(n,1),s=null}}}function y(e){if(!c(e))throw new Error(a(7));if("undefined"===typeof e.type)throw new Error(a(8));if(h)throw new Error(a(9));try{h=!0,i=o(i,e)}finally{h=!1}for(var t=s=f,n=0;n<t.length;n++){(0,t[n])()}return e}return y({type:u.INIT}),(r={dispatch:y,subscribe:m,getState:g,replaceReducer:function(e){if("function"!==typeof e)throw new Error(a(10));o=e,y({type:u.REPLACE})}})[l]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!==typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(g())}return n(),{unsubscribe:t(n)}}})[l]=function(){return this},e},r}function f(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];0,"function"===typeof e[o]&&(n[o]=e[o])}var i,l=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if("undefined"===typeof n(void 0,{type:u.INIT}))throw new Error(a(12));if("undefined"===typeof n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13))}))}(n)}catch(s){i=s}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},s=0;s<l.length;s++){var u=l[s],c=n[u],d=e[u],f=c(d,t);if("undefined"===typeof f){t&&t.type;throw new Error(a(14))}o[u]=f,r=r||f!==d}return(r=r||l.length!==Object.keys(e).length)?o:e}}function h(e,t){return function(){return t(e.apply(this,arguments))}}function p(e,t){if("function"===typeof e)return h(e,t);if("object"!==typeof e||null===e)throw new Error(a(16));var n={};for(var r in e){var o=e[r];"function"===typeof o&&(n[r]=h(o,t))}return n}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(a(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},l=t.map((function(e){return e(o)}));return r=g.apply(void 0,l)(n.dispatch),i(i({},n),{},{dispatch:r})}}}},72383:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>i(s,n))u<o&&0>i(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(u<o&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(m=!1,w(e),!g)if(null!==r(u))g=!0,Z(S);else{var t=r(c);null!==t&&P(x,t.startTime-e)}}function S(e,n){g=!1,m&&(m=!1,v(E),E=-1),p=!0;var i=h;try{for(w(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!I());){var a=f.callback;if("function"===typeof a){f.callback=null,h=f.priorityLevel;var l=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof l?f.callback=l:f===r(u)&&o(u),w(n)}else o(u);f=r(u)}if(null!==f)var s=!0;else{var d=r(c);null!==d&&P(x,d.startTime-n),s=!1}return s}finally{f=null,h=i,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,j=null,E=-1,T=5,O=-1;function I(){return!(t.unstable_now()-O<T)}function D(){if(null!==j){var e=t.unstable_now();O=e;var n=!0;try{n=j(!0,e)}finally{n?k():(C=!1,j=null)}}else C=!1}if("function"===typeof b)k=function(){b(D)};else if("undefined"!==typeof MessageChannel){var _=new MessageChannel,A=_.port2;_.port1.onmessage=D,k=function(){A.postMessage(null)}}else k=function(){y(D,0)};function Z(e){j=e,C||(C=!0,k())}function P(e,n){E=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,Z(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:l=i+l,sortIndex:-1},i>a?(e.sortIndex=i,n(c,e),null===r(u)&&e===r(c)&&(m?(v(E),E=-1):m=!0,P(x,i-a))):(e.sortIndex=l,n(u,e),g||p||(g=!0,Z(S))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},94796:function(e,t,n){"use strict";e.exports=n(72383)},40337:function(e){e.exports=function(e,t){var n,r,o,i,a=0;return function(){n=this,r=arguments;var e=new Date-a;return i||(e>=t?l():i=setTimeout(l,t-e)),o};function l(){i=0,a=+new Date,o=e.apply(n,r),n=null,r=null}}},5284:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16);function a(){if(!o&&(o="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const l=[];for(let c=0;c<256;++c)l.push((c+256).toString(16).slice(1));function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase()}var u=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return s(o)}},98136:function(e){"use strict";var t=function(){};e.exports=t},56104:function(e,t,n){"use strict";e.exports=n.p+"static/media/browser-server.14ed34b8682d7b10163f.js"},80753:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},56666:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(45850);function o(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},7896:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:function(){return r}})},88960:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},45850:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(86522);function o(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==(0,r.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},86522:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},98879:function(e,t,n){"use strict";n.d(t,{Av:function(){return c},gP:function(){return u}});var r=n(83017);const o={prefix:String(Math.round(1e10*Math.random())),current:0,isSSR:!1},i=r.createContext(o);let a=Boolean("undefined"!==typeof window&&window.document&&window.document.createElement),l=new WeakMap;function s(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,r.useContext)(i),n=(0,r.useRef)(null);if(null===n.current&&!e){var o,a;let e=null===(o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===o||null===(a=o.ReactCurrentOwner)||void 0===a?void 0:a.current;if(e){let n=l.get(e);null==n?l.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,l.delete(e))}n.current=++t.current}return n.current}function u(e){let t=(0,r.useContext)(i);t!==o||a||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=s(!!e);return e||`react-aria${t.prefix}-${n}`}function c(){return(0,r.useContext)(i).isSSR}},1591:function(e,t,n){"use strict";n.d(t,{zL:function(){return v},Ao:function(){return b},ad:function(){return F},gn:function(){return B},V5:function(){return L},Zj:function(){return $},cr:function(){return q},Pf:function(){return W},dG:function(){return p},QB:function(){return C},zT:function(){return z},Gt:function(){return V},PK:function(){return R},zX:function(){return U},xi:function(){return j},Me:function(){return c},bE:function(){return E},bt:function(){return l},mp:function(){return f},lE:function(){return T},nP:function(){return _}});var r=n(83017),o=n(98879);function i(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=i(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var a=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=i(e))&&(r&&(r+=" "),r+=t);return r};const l="undefined"!==typeof window?r.useLayoutEffect:()=>{};function s(e){let[t,n]=(0,r.useState)(e),o=(0,r.useRef)(t),i=(0,r.useRef)(null);o.current=t;let a=(0,r.useRef)(null);a.current=()=>{let e=i.current.next();e.done?i.current=null:t===e.value?a.current():n(e.value)},l((()=>{i.current&&a.current()}));let s=(0,r.useCallback)((e=>{i.current=e(o.current),a.current()}),[i,a]);return[t,s]}let u=new Map;function c(e){let[t,n]=(0,r.useState)(e),i=(0,r.useRef)(null),a=(0,o.gP)(t),s=(0,r.useCallback)((e=>{i.current=e}),[]);return u.set(a,s),l((()=>{let e=a;return()=>{u.delete(e)}}),[a]),(0,r.useEffect)((()=>{let e=i.current;e&&(i.current=null,n(e))})),a}function d(e,t){if(e===t)return e;let n=u.get(e);if(n)return n(t),t;let r=u.get(t);return r?(r(e),e):t}function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=c(),[n,o]=s(t),i=(0,r.useCallback)((()=>{o((function*(){yield t,yield document.getElementById(t)?t:void 0}))}),[t,o]);return l(i,[t,i,...e]),n}function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(let e of t)"function"===typeof e&&e(...arguments)}}function p(){let e={...arguments.length<=0?void 0:arguments[0]};for(let t=1;t<arguments.length;t++){let n=t<0||arguments.length<=t?void 0:arguments[t];for(let t in n){let r=e[t],o=n[t];"function"===typeof r&&"function"===typeof o&&"o"===t[0]&&"n"===t[1]&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90?e[t]=h(r,o):"className"!==t&&"UNSAFE_className"!==t||"string"!==typeof r||"string"!==typeof o?"id"===t&&r&&o?e.id=d(r,o):e[t]=void 0!==o?o:r:e[t]=a(r,o)}}return e}const g=new Set(["id"]),m=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y=/^(data-.*)$/;function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{labelable:n,propNames:r}=t,o={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(g.has(i)||n&&m.has(i)||(null===r||void 0===r?void 0:r.has(i))||y.test(i))&&(o[i]=e[i]);return o}function b(e){if(function(){if(null==w){w=!1;try{document.createElement("div").focus({get preventScroll(){return w=!0,!0}})}catch(e){}}return w}())e.focus({preventScroll:!0});else{let t=function(e){var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft});return n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let w=null;let x=new Map,S=new Set;function k(){if("undefined"===typeof window)return;let e=t=>{let n=x.get(t.target);if(n&&(n.delete(t.propertyName),0===n.size&&(t.target.removeEventListener("transitioncancel",e),x.delete(t.target)),0===x.size)){for(let e of S)e();S.clear()}};document.body.addEventListener("transitionrun",(t=>{let n=x.get(t.target);n||(n=new Set,x.set(t.target,n),t.target.addEventListener("transitioncancel",e)),n.add(t.propertyName)})),document.body.addEventListener("transitionend",e)}function C(e){requestAnimationFrame((()=>{0===x.size?e():S.add(e)}))}"undefined"!==typeof document&&("loading"!==document.readyState?k():document.addEventListener("DOMContentLoaded",k));function j(){let e=(0,r.useRef)(new Map),t=(0,r.useCallback)(((t,n,r,o)=>{let i=(null===o||void 0===o?void 0:o.once)?function(){e.current.delete(r),r(...arguments)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,r,o)}),[]),n=(0,r.useCallback)(((t,n,r,o)=>{var i;let a=(null===(i=e.current.get(r))||void 0===i?void 0:i.fn)||r;t.removeEventListener(n,a,o),e.current.delete(r)}),[]),o=(0,r.useCallback)((()=>{e.current.forEach(((e,t)=>{n(e.eventTarget,e.type,t,e.options)}))}),[n]);return(0,r.useEffect)((()=>o),[o]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:o}}function E(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;if(n=c(n),o&&r){let e=new Set([...o.trim().split(/\s+/),n]);o=[...e].join(" ")}else o&&(o=o.trim().split(/\s+/).join(" "));return r||o||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function T(e,t){l((()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}}),[e,t])}function O(e){for(I(e)&&(e=e.parentElement);e&&!I(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function I(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let D="undefined"!==typeof window&&window.visualViewport;function _(){let[e,t]=(0,r.useState)((()=>A()));return(0,r.useEffect)((()=>{let e=()=>{t((e=>{let t=A();return t.width===e.width&&t.height===e.height?e:t}))};return D?D.addEventListener("resize",e):window.addEventListener("resize",e),()=>{D?D.removeEventListener("resize",e):window.removeEventListener("resize",e)}}),[]),e}function A(){return{width:(null===D||void 0===D?void 0:D.width)||window.innerWidth,height:(null===D||void 0===D?void 0:D.height)||window.innerHeight}}let Z=0;const P=new Map;function R(e){let[t,n]=(0,r.useState)(void 0);return l((()=>{if(!e)return;let t=P.get(e);if(t)n(t.element.id);else{let r="react-aria-description-"+Z++;n(r);let o=document.createElement("div");o.id=r,o.style.display="none",o.textContent=e,document.body.appendChild(o),t={refCount:0,element:o},P.set(e,t)}return t.refCount++,()=>{0===--t.refCount&&(t.element.remove(),P.delete(e))}}),[e]),{"aria-describedby":e?t:void 0}}function M(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function N(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function L(){return N(/^Mac/i)}function B(){return N(/^iPhone/i)||N(/^iPad/i)||L()&&navigator.maxTouchPoints>1}function F(){return L()||B()}function W(){return M(/AppleWebKit/i)&&!M(/Chrome/i)}function U(e,t,n,o){let i=(0,r.useRef)(n);i.current=n;let a=null==n;(0,r.useEffect)((()=>{if(a)return;let n=e.current,r=e=>i.current.call(this,e);return n.addEventListener(t,r,o),()=>{n.removeEventListener(t,r,o)}}),[e,t,o,a])}function z(e,t){let n=H(e,t,"left"),r=H(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight,a=e.scrollLeft,l=e.scrollTop,{borderTopWidth:s,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(s,10),f=c+e.clientWidth,h=d+e.clientHeight;n<=a?a=n-parseInt(u,10):n+o>f&&(a+=n+o-f),r<=d?l=r-parseInt(s,10):r+i>h&&(l+=r+i-h),e.scrollLeft=a,e.scrollTop=l}function H(e,t,n){const r="left"===n?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function V(e,t){if(document.contains(e)){let a=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(a).overflow){let t=O(e);for(;e&&t&&e!==a&&t!==a;)z(t,e),t=O(e=t)}else{var n;let{left:a,top:l}=e.getBoundingClientRect();null===e||void 0===e||null===(n=e.scrollIntoView)||void 0===n||n.call(e,{block:"nearest"});let{left:s,top:u}=e.getBoundingClientRect();var r,o,i;if(Math.abs(a-s)>1||Math.abs(l-u)>1)null===t||void 0===t||null===(r=t.containingElement)||void 0===r||null===(o=r.scrollIntoView)||void 0===o||o.call(r,{block:"center",inline:"center"}),null===(i=e.scrollIntoView)||void 0===i||i.call(e,{block:"nearest"})}}}function $(e){return!(0!==e.mozInputSource||!e.isTrusted)||(M(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function q(e){return 0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType}},69093:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if("undefined"!==typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;e=new Error(t.replace(/%s/g,(function(){return r[n++]}))),e.name="Invariant Violation"}throw e.framesToPop=1,e}}n.d(t,{k:function(){return r}})},53964:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});const r=(0,n(83017).createContext)({dragDropManager:void 0})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&r;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+({162:"wide-components",447:"narrow-components",737:"resize-observer-polyfill",992:"reports"}[e]||e)+"."+{162:"6cb72932",281:"6bb03bd1",383:"1b04bac1",447:"55a3b7fd",457:"4c255aed",737:"68c3249b",876:"00fe0e63",969:"b56f4e53",992:"d1b97437"}[e]+".chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="@actual-app/web:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var l,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){l=d;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",t+i),l.src=r),e[r]=[o];var f=function(t,n){l.onerror=l.onload=null,clearTimeout(h);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((function(e){return e(n)})),t)return t(n)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),s&&document.head.appendChild(l)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){n.b=document.baseURI||self.location.href;var e={179:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((function(n,r){o=e[t]=[n,r]}));r.push(o[2]=i);var a=n.p+n.u(t),l=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",l.name="ChunkLoadError",l.type=i,l.request=a,o[1](l)}}),"chunk-"+t,t)}};var t=function(t,r){var o,i,a=r[0],l=r[1],s=r[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);u<a.length;u++)i=a[u],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunk_actual_app_web=self.webpackChunk_actual_app_web||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};function t(e){return(t,n,r)=>{if("undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope)throw new Error("`startWorkerFromMain` should only be called from the main thread");if("undefined"===typeof Worker)throw new Error("Web workers not available. sqlite3 requires web workers to work.");e().then((e=>{let{default:o}=e,i=new o;i.postMessage({type:"init",buffers:[t,n]}),i.addEventListener("message",(e=>{r.postMessage(e.data)}))}))}}n.r(e),n.d(e,{FILE:function(){return pt},HTML:function(){return yt},TEXT:function(){return mt},URL:function(){return gt}});const r=function(e,n){const r=t(n);return t=>{t.addEventListener("message",(n=>{if(n.data.type===e)r(n.data.argBuffer,n.data.resultBuffer,t)}))}}("__absurd:spawn-idb-worker",(()=>n.e(969).then(n.bind(n,46969))));const o=new URL(n(56104),n.b);let i,a=!1,l="23.8.0";i=new Worker(o),r(i),window.SharedArrayBuffer&&localStorage.removeItem("SharedArrayBufferOverride"),i.postMessage({type:"init",version:l,isDev:a,publicUrl:"",hash:"73a03b9f0217ad62df42",isSharedArrayBufferOverrideEnabled:localStorage.getItem("SharedArrayBufferOverride")}),n.g.Actual={IS_DEV:a,ACTUAL_VERSION:l,IS_FAKE_WEB:!0,logToTerminal:function(){console.log(...arguments)},relaunch:()=>{window.location.reload()},openFileDialog:async e=>{let{filters:t=[],properties:n}=e;return new Promise((e=>{let n=!1,r=document.body.querySelector('input[id="open-file-dialog-input"]');r||(n=!0,r=document.createElement("input")),r.type="file",r.id="open-file-dialog-input",r.value=null;let o=t.find((e=>e.extensions));o&&(r.accept=o.extensions.map((e=>"."+e)).join(",")),r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.display="none",r.onchange=t=>{let n=t.target.files[0],r=n.name.replace(/.*(\.[^.]*)/,"file$1");if(n){var o=new FileReader;o.readAsArrayBuffer(n),o.onload=async function(t){let n=`/uploads/${r}`;window.__actionsForMenu.uploadFile(r,t.target.result).then((()=>e([n])))},o.onerror=function(e){alert("Error reading file")}}},n&&document.body.appendChild(r),r.click()}))},saveFile:(e,t,n)=>{const r=document.createElement("a");r.style="display: none",r.download=t,r.rel="noopener";const o=new Blob([e]);r.href=URL.createObjectURL(o),r.dispatchEvent(new MouseEvent("click"))},openURLInBrowser:e=>{window.open(e,"_blank")},onEventFromMain:(e,t)=>{},applyAppUpdate:()=>{},updateAppMenu:e=>{},getServerSocket:async()=>i},document.addEventListener("keydown",(e=>{if(e.metaKey||e.ctrlKey)if("o"===e.key)e.preventDefault(),window.__actionsForMenu.closeBudget();else if("z"===e.key.toLowerCase()){if("INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||e.target.isContentEditable)return;e.preventDefault(),e.shiftKey?window.__actionsForMenu.redo():window.__actionsForMenu.undo()}}));var s=n(83017),u=n(71274),c=n(57282),d=n(18753);function f(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var h=f();h.withExtraArgument=f;var p=h,g=n(17199),m=n(15196),y=n(99121);const v={failedAccounts:new Map,accountsSyncing:null};const b={loadingText:null,updateInfo:null,showUpdateNotification:!0,managerHasInitialized:!1,lastUndoState:{current:null},lastSplitState:{current:null}};function w(e,t){console.log({localFiles:e,remoteFiles:t});let n=new Set,r=e.map((e=>{let{cloudFileId:r,groupId:o}=e;if(r&&o){if(null==t)return{...e,cloudFileId:r,groupId:o,deleted:!1,state:"unknown"};let i=t.find((t=>e.cloudFileId===t.fileId));return i?(n.add(i.fileId),i.groupId===e.groupId?{...e,cloudFileId:r,groupId:o,name:i.name,deleted:i.deleted,encryptKeyId:i.encryptKeyId,hasKey:i.hasKey,state:"synced"}:{...e,cloudFileId:r,groupId:o,name:i.name,deleted:i.deleted,encryptKeyId:i.encryptKeyId,hasKey:i.hasKey,state:"detached"}):{...e,cloudFileId:r,groupId:o,deleted:!1,state:"broken"}}return{...e,deleted:!1,state:"local"}})),o=((i=r.concat((t||[]).filter((e=>!n.has(e.fileId))).map((e=>({cloudFileId:e.fileId,groupId:e.groupId,name:e.name,deleted:e.deleted,encryptKeyId:e.encryptKeyId,hasKey:e.hasKey,state:"remote"})))).filter((e=>!e.deleted))).sort(((e,t)=>{let n=e.name.toLowerCase(),r=t.name.toLowerCase(),o=n<r?-1:n>r?1:0;if(0===o){let t="remote"===e.state?e.cloudFileId:e.id,n="remote"===e.state?e.cloudFileId:e.id;o=t<n?-1:t>n?1:0}return o})),i);var i;return o.filter((e=>"broken"!==e.state)).concat(o.filter((e=>"broken"===e.state)))}const x={budgets:[],remoteFiles:null,allFiles:null};const S={modalStack:[],isHidden:!1};var k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.jw:return{...e,modalStack:[...e.modalStack,t.modal]};case m.JA:return{...e,modalStack:[t.modal]};case m.TZ:return{...e,modalStack:e.modalStack.slice(0,-1)};case m.et:return{...e,modalStack:[]};case m.wH:if("loadingText"in t.state)return{...e,isHidden:null!=t.state.loadingText};break;case m.dp:return S}return e};const C={notifications:[]};var j=n(69585);const E={local:null,global:null};var T=n(5499);const O={data:null};const I={app:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.wH:return{...e,...t.state};case m.HT:return e.lastUndoState.current=t.undoState,e;case m.VM:return e.lastSplitState.current=t.splitState,e}return e},queries:T.ZP,account:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m._V:return{...e,accountsSyncing:t.name};case m.cV:{let n=new Map(e.failedAccounts);return t.failed?n.set(t.id,{type:t.errorType,code:t.errorCode}):n.delete(t.id),{...e,failedAccounts:n}}case m.Co:{let n=new Map;return t.syncErrors.forEach((e=>{n.set(e.id,{type:e.type,code:e.code})})),{...e,failedAccounts:n}}}return e},prefs:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.px:return t.prefs&&(0,j.yC)({format:t.prefs.numberFormat||"comma-dot",hideFraction:t.prefs.hideFraction}),{local:t.prefs,global:t.globalPrefs};case m.uF:return(t.prefs.numberFormat||null!=t.prefs.hideFraction)&&(0,j.yC)({format:t.prefs.numberFormat||e.local.numberFormat,hideFraction:null!=t.prefs.hideFraction?t.prefs.hideFraction:e.local.hideFraction}),{...e,local:{...e.local,...t.prefs}};case m.CH:return{...e,global:{...e.global,...t.globalPrefs}}}return e},modals:k,notifications:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.Dv:return e.notifications.find((e=>e.id===t.notification.id))?e:{...e,notifications:[...e.notifications,t.notification]};case m.Kf:return{...e,notifications:e.notifications.filter((e=>e.id!==t.id))}}return e},budgets:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.Ud:return{...e,budgets:t.budgets,allFiles:w(t.budgets,e.remoteFiles)};case m.Oi:return{...e,remoteFiles:t.files,allFiles:w(e.budgets,t.files)};case m.GY:return{...e,budgets:t.budgets,remoteFiles:t.remoteFiles,allFiles:w(t.budgets,t.remoteFiles)};case m.dp:return{...e,allFiles:null}}return e},user:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;return t.type===m.q1?{...e,data:t.data}:e}};var D=I,_=n(97156),A=n(86634),Z=n(43045);async function P(){if("ResizeObserver"in window===!1){const e=await n.e(737).then(n.bind(n,79145));window.ResizeObserver=e.ResizeObserver}}var R=n(95542),M=n(53819),N=n(9314),L=n(82054),B=n(91743),F=n(28993);function W(e){return(0,F.jsx)(U,{...e},e.name)}function U(e){let{name:t,message:n,importer:r}=e,[o,i]=(0,s.useState)(null);return(0,s.useEffect)((()=>{r().then((e=>i((()=>e[t]))))}),[t,r]),o?(0,F.jsx)(o,{}):(0,F.jsxs)(B.Z,{style:[{flex:1,gap:20,justifyContent:"center",alignItems:"center"},M.W2.delayedFadeIn],children:[n&&(0,F.jsx)(L.Z,{style:{marginBottom:20,fontSize:18},children:n}),(0,F.jsx)(N.Z,{width:25,color:M.O9.n1})]})}function z(){return(0,F.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:M.rS.pageBackground},children:(0,F.jsxs)("svg",{viewBox:"0 0 642 535",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%"},children:[(0,F.jsx)("path",{fill:"url(#paint0_linear)",d:"M0 0h642v535H0z"}),(0,F.jsx)("defs",{children:(0,F.jsxs)("linearGradient",{id:"paint0_linear",x1:"162",y1:"23.261",x2:"468.904",y2:"520.44",gradientUnits:"userSpaceOnUse",children:[(0,F.jsx)("stop",{stopColor:M.rS.pageBackgroundTopLeft}),(0,F.jsx)("stop",{offset:"1",stopColor:M.rS.pageBackgroundBottomRight,stopOpacity:"0.5"})]})}),(0,F.jsx)(W,{importer:()=>n.e(383).then(n.bind(n,51383)),name:"BackgroundImage"})]})})}var H=function(e){let{initializing:t,loadingText:n}=e;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(z,{}),(null!=n||t)&&(0,F.jsxs)(B.Z,{...(0,A.iv)({position:"absolute",top:0,left:0,right:0,padding:50,paddingTop:200,color:M.rS.pageText,alignItems:"center"}),children:[(0,F.jsx)(L.Z,{style:{marginBottom:20,fontSize:18},children:n}),(0,F.jsx)(N.Z,{width:25,color:M.rS.pageText})]})]})},V=n(11599);function $(){return(0,F.jsxs)(B.Z,{style:[{padding:"6px 20px",display:"flex",flexDirection:"row",justifyContent:"space-between",color:M.rS.warningText,backgroundColor:M.rS.warningBackground,borderBottom:`1px solid ${M.rS.warningAccent}`,zIndex:1,flexShrink:0}],children:[(0,F.jsx)(B.Z,{children:"This is a demo build of Actual."}),(0,F.jsx)(B.Z,{children:(0,F.jsxs)(V.Z,{linkColor:"blue",to:`https://github.com/actualbudget/actual/pull/${{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BACKEND_WORKER_HASH:"73a03b9f0217ad62df42"}.REACT_APP_REVIEW_ID}`,children:["Open the PR: #",{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BACKEND_WORKER_HASH:"73a03b9f0217ad62df42"}.REACT_APP_REVIEW_ID]})})]})}var q=n(13743),Y=n(67134),G=n(42131),K=n(803),Q=n(99884),X=n(10666),J=n(36717);class ee extends s.Component{constructor(){super(...arguments),this.state={showError:!1}}renderSimple(e){let t;return t=e.IDBFailure?(0,F.jsx)(X.Z,{children:"Your browser doesn\u2019t support IndexedDB in this environment, a feature that Actual requires to run. This might happen if you are in private browsing mode. Please try a different browser or turn off private browsing."}):e.SharedArrayBufferMissing?(0,F.jsxs)(X.Z,{children:["Actual requires access to ",(0,F.jsx)("code",{children:"SharedArrayBuffer"})," in order to function properly. If you\u2019re seeing this error, either your browser does not support ",(0,F.jsx)("code",{children:"SharedArrayBuffer"}),", or your server is not sending the appropriate headers, or you are not using HTTPS. See"," ",(0,F.jsx)(V.Z,{linkColor:"muted",to:"https://actualbudget.org/docs/troubleshooting/shared-array-buffer",children:"our troubleshooting documentation"})," ","to learn more. ",(0,F.jsx)(ne,{})]}):(0,F.jsxs)(X.Z,{children:["There was a problem loading the app in this browser version. If this continues to be a problem, you can"," ",(0,F.jsx)(V.Z,{linkColor:"muted",to:"https://github.com/actualbudget/releases",children:"download the desktop app"}),"."]}),(0,F.jsx)(B.Z,{style:{alignItems:"center",justifyContent:"center",height:"100%"},children:(0,F.jsxs)(Q.Z,{style:{paddingBottom:100,maxWidth:500,color:M.rS.errorText,backgroundColor:M.rS.errorBackground,lineHeight:"1.5em",fontSize:15},children:[(0,F.jsx)(X.Z,{children:t}),(0,F.jsxs)(X.Z,{children:["Please get"," ",(0,F.jsx)(V.Z,{linkColor:"muted",to:"https://actualbudget.org/contact",children:"in touch"})," ","for support"]})]})})}render(){const{buttonText:e,error:t}=this.props,{showError:n}=this.state;return"app-init-failure"===t.type?this.renderSimple(t):(0,F.jsx)(G.C,{isCurrent:!0,showClose:!1,title:"Fatal Error",children:()=>(0,F.jsxs)(B.Z,{style:{maxWidth:500},children:[(0,F.jsx)(K.Z,{children:"There was an unrecoverable error in the UI. Sorry!"}),(0,F.jsxs)(K.Z,{children:["If this error persists, please get"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/contact",children:"in touch"})," ","so it can be investigated."]}),(0,F.jsx)(K.Z,{children:(0,F.jsx)(q.Z,{onClick:()=>window.Actual.relaunch(),children:e})}),(0,F.jsxs)(K.Z,{isLast:!0,style:{fontSize:11},children:[(0,F.jsx)(Y.Z,{onClick:()=>this.setState({showError:!0}),children:"Show Error"}),n&&(0,F.jsx)(L.Z,{style:{marginTop:5,height:100,overflow:"auto"},children:t.stack})]})]})})}}var te=ee;function ne(){let[e,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(!1);return e?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(K.Z,{style:{marginTop:10},children:["Actual uses ",(0,F.jsx)("code",{children:"SharedArrayBuffer"})," to allow usage from multiple tabs at once and to ensure correct behavior when switching files. While it can run without access to ",(0,F.jsx)("code",{children:"SharedArrayBuffer"}),", you may encounter data loss or notice multiple budget files being merged with each other."]}),(0,F.jsxs)("label",{style:{display:"flex",alignItems:"center",marginBottom:10},children:[(0,F.jsx)(J.XZ,{checked:n,onChange:r})," I understand the risks, run Actual in the unsupported fallback mode"]}),(0,F.jsx)(q.Z,{disabled:!n,onClick:()=>{window.localStorage.setItem("SharedArrayBufferOverride","true"),window.location.reload()},children:"Open Actual"})]}):(0,F.jsx)(Y.Z,{onClick:()=>t(!0),style:{marginLeft:5},children:"Advanced options"})}var re=n(69093);function oe(e){return"object"===typeof e}const ie="dnd-core/INIT_COORDS",ae="dnd-core/BEGIN_DRAG",le="dnd-core/PUBLISH_DRAG_SOURCE",se="dnd-core/HOVER",ue="dnd-core/DROP",ce="dnd-core/END_DRAG";function de(e,t){return{type:ie,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const fe={type:ie,payload:{clientOffset:null,sourceClientOffset:null}};function he(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0};const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:i}=n,a=e.getMonitor(),l=e.getRegistry();e.dispatch(de(o)),function(e,t,n){(0,re.k)(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){(0,re.k)(n.getSource(e),"Expected sourceIds to be registered.")}))}(t,a,l);const s=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==s)return void e.dispatch(fe);let u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){(0,re.k)("function"===typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),u=i(s)}e.dispatch(de(o,u));const c=l.getSource(s).beginDrag(a,s);if(null==c)return;!function(e){(0,re.k)(oe(e),"Item must be an object.")}(c),l.pinSource(s);const d=l.getSourceType(s);return{type:ae,payload:{itemType:d,item:c,sourceId:s,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){pe(e,t,n[t])}))}return e}function me(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.getMonitor(),r=e.getRegistry();!function(e){(0,re.k)(e.isDragging(),"Cannot call drop while not dragging."),(0,re.k)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const o=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);o.forEach(((o,i)=>{const a=function(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;(function(e){(0,re.k)("undefined"===typeof e||oe(e),"Drop result must either be an object or undefined.")})(i),"undefined"===typeof i&&(i=0===t?{}:r.getDropResult());return i}(o,i,r,n),l={type:ue,payload:{dropResult:ge({},t,a)}};e.dispatch(l)}))}}function ye(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){(0,re.k)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:ce}}}function ve(e,t){return null===t?null===e:Array.isArray(e)?e.some((e=>e===t)):e===t}function be(e){return function(t){let{clientOffset:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e){(0,re.k)(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];ve(t.getTargetType(o),n)||e.splice(r,1)}}(r,i,o.getItemType()),function(e,t,n){(0,re.k)(t.isDragging(),"Cannot call hover while not dragging."),(0,re.k)(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];(0,re.k)(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array.");const o=n.getTarget(t);(0,re.k)(o,"Expected targetIds to be registered.")}}(r,o,i),function(e,t,n){e.forEach((function(e){n.getTarget(e).hover(t,e)}))}(r,o,i),{type:se,payload:{targetIds:r,clientOffset:n||null}}}}function we(e){return function(){if(e.getMonitor().isDragging())return{type:le}}}class xe{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:he(e),publishDragSource:we(e),hover:be(e),drop:me(e),endDrag:ye(e)}}(this);return Object.keys(n).reduce(((r,o)=>{const i=n[o];var a;return r[o]=(a=i,function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];const i=a.apply(e,r);"undefined"!==typeof i&&t(i)}),r}),{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function Se(e,t){return{x:e.x-t.x,y:e.y-t.y}}const ke=[],Ce=[];ke.__IS_NONE__=!0,Ce.__IS_ALL__=!0;class je{subscribeToStateChange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{handlerIds:n}=t;(0,re.k)("function"===typeof e,"listener must be a function."),(0,re.k)("undefined"===typeof n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe((()=>{const t=this.store.getState(),o=t.stateId;try{const i=o===r||o===r+1&&!function(e,t){return e!==ke&&(e===Ce||"undefined"===typeof t||(n=e,t.filter((e=>n.indexOf(e)>-1))).length>0);var n}(t.dirtyHandlerIds,n);i||e()}finally{r=o}}))}subscribeToOffsetChange(e){(0,re.k)("function"===typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe((()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())}))}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return(0,re.k)(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if((0,re.k)(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if((0,re.k)(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!ve(r,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?Se((i=r,{x:(o=t).x+i.x,y:o.y+i.y}),n):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?Se(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const Ee="undefined"!==typeof global?global:self,Te=Ee.MutationObserver||Ee.WebKitMutationObserver;function Oe(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const Ie="function"===typeof Te?function(e){let t=1;const n=new Te(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:Oe;class De{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const _e=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ie(this.flush),this.requestErrorThrow=Oe((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Ae=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new De(this.onError,(e=>t[t.length]=e));return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(_e.registerPendingError);const Ze="dnd-core/ADD_SOURCE",Pe="dnd-core/ADD_TARGET",Re="dnd-core/REMOVE_SOURCE",Me="dnd-core/REMOVE_TARGET";function Ne(e,t){t&&Array.isArray(e)?e.forEach((e=>Ne(e,!1))):(0,re.k)("string"===typeof e||"symbol"===typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Le;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Le||(Le={}));let Be=0;function Fe(e){const t=(Be++).toString();switch(e){case Le.SOURCE:return`S${t}`;case Le.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function We(e){switch(e[0]){case"S":return Le.SOURCE;case"T":return Le.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ue(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}class ze{addSource(e,t){Ne(e),function(e){(0,re.k)("function"===typeof e.canDrag,"Expected canDrag to be a function."),(0,re.k)("function"===typeof e.beginDrag,"Expected beginDrag to be a function."),(0,re.k)("function"===typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(Le.SOURCE,e,t);return this.store.dispatch(function(e){return{type:Ze,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Ne(e,!0),function(e){(0,re.k)("function"===typeof e.canDrop,"Expected canDrop to be a function."),(0,re.k)("function"===typeof e.hover,"Expected hover to be a function."),(0,re.k)("function"===typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(Le.TARGET,e,t);return this.store.dispatch(function(e){return{type:Pe,payload:{targetId:e}}}(n)),n}containsHandler(e){return Ue(this.dragSources,e)||Ue(this.dropTargets,e)}getSource(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,re.k)(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return(0,re.k)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return(0,re.k)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return(0,re.k)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return We(e)===Le.SOURCE}isTargetId(e){return We(e)===Le.TARGET}removeSource(e){var t;(0,re.k)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Re,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},_e.enqueueTask(Ae.create(t))}removeTarget(e){(0,re.k)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Me,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);(0,re.k)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){(0,re.k)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=Fe(e);return this.types.set(r,t),e===Le.SOURCE?this.dragSources.set(r,n):e===Le.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const He=(e,t)=>e===t;function Ve(){let e=arguments.length>1?arguments[1]:void 0;switch(e.type){case se:break;case Ze:case Pe:case Me:case Re:return ke;default:return Ce}const{targetIds:t=[],prevTargetIds:n=[]}=e.payload,r=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach(((e,t)=>{1===e&&o.push(t)})),o}(t,n),o=r.length>0||!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He;if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(t,n);if(!o)return ke;const i=n[n.length-1],a=t[t.length-1];return i!==a&&(i&&r.push(i),a&&r.push(a)),r}function $e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qe={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qe,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case ie:case ae:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case se:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$e(e,t,n[t])}))}return e}({},e,{clientOffset:n.clientOffset});case ce:case ue:return qe;default:return e}var r,o}function Ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ge(e,t,n[t])}))}return e}const Qe={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Xe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe,t=arguments.length>1?arguments[1]:void 0;const{payload:n}=t;switch(t.type){case ae:return Ke({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case le:return Ke({},e,{isSourcePublic:!0});case se:return Ke({},e,{targetIds:n.targetIds});case Me:return-1===e.targetIds.indexOf(n.targetId)?e:Ke({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter((e=>e!==o)))});case ue:return Ke({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case ce:return Ke({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function Je(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case Ze:case Pe:return e+1;case Re:case Me:return e-1;default:return e}}function et(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tt(e,t,n[t])}))}return e}function rt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Ve(e.dirtyHandlerIds,{type:t.type,payload:nt({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",o=[],r.split(".").reduce(((e,t)=>e&&e[t]?e[t]:o||null),n))})}),dragOffset:Ye(e.dragOffset,t),refCount:Je(e.refCount,t),dragOperation:Xe(e.dragOperation,t),stateId:et(e.stateId)};var n,r,o}function ot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){const t="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,d.MT)(rt,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(arguments.length>3&&void 0!==arguments[3]&&arguments[3]),o=new je(r,new ze(r)),i=new xe(r,o),a=e(i,t,n);return i.receiveBackend(a),i}var it=n(53964);function at(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let lt=0;const st=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var ut=(0,s.memo)((function(e){var{children:t}=e,n=at(e,["children"]);const[r,o]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=t;o[st]||(o[st]={dragDropManager:ot(e,t,n,r)});return o[st]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return(0,s.useEffect)((()=>{if(o){const e=ct();return++lt,()=>{0===--lt&&(e[st]=null)}}}),[]),(0,F.jsx)(it.L.Provider,{value:r,children:t})}));function ct(){return"undefined"!==typeof global?global:window}function dt(e){let t=null;return()=>(null==t&&(t=e()),t)}class ft{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach((e=>o.push(e))),o}(this.entered.filter((t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e)))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter((e=>e!==r))),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ht{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})}))}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach((n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const pt="__NATIVE_FILE__",gt="__NATIVE_URL__",mt="__NATIVE_TEXT__",yt="__NATIVE_HTML__";function vt(e,t,n){const r=t.reduce(((t,n)=>t||e.getData(n)),"");return null!=r?r:n}const bt={[pt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[yt]:{exposeProperties:{html:(e,t)=>vt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[gt]:{exposeProperties:{urls:(e,t)=>vt(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[mt]:{exposeProperties:{text:(e,t)=>vt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function wt(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(bt).filter((e=>{const n=bt[e];return!!(null===n||void 0===n?void 0:n.matchesTypes)&&n.matchesTypes.some((e=>t.indexOf(e)>-1))}))[0]||null}const xt=dt((()=>/firefox/i.test(navigator.userAgent))),St=dt((()=>Boolean(window.safari)));class kt{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:i}=this;let a=t.length-1;if(e===t[a])return n[a];let l,s=0,u=i.length-1;for(;s<=u;){l=Math.floor(.5*(s+u));const r=t[l];if(r<e)s=l+1;else{if(!(r>e))return n[l];u=l-1}}a=Math.max(0,u);const c=e-t[a],d=c*c;return n[a]+r[a]*c+o[a]*d+i[a]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let h=0;h<n;h++)r.push(h);r.sort(((t,n)=>e[t]<e[n]?-1:1));const o=[],i=[],a=[];let l,s;for(let h=0;h<n-1;h++)l=e[h+1]-e[h],s=t[h+1]-t[h],i.push(l),o.push(s),a.push(s/l);const u=[a[0]];for(let h=0;h<i.length-1;h++){const e=a[h],t=a[h+1];if(e*t<=0)u.push(0);else{l=i[h];const n=i[h+1],r=l+n;u.push(3*r/((r+n)/e+(r+l)/t))}}u.push(a[a.length-1]);const c=[],d=[];let f;for(let h=0;h<u.length-1;h++){f=a[h];const e=u[h],t=1/i[h],n=e+u[h+1]-f-f;c.push((f-e-n)*t),d.push(n*t*t)}this.xs=e,this.ys=t,this.c1s=u,this.c2s=c,this.c3s=d}}const Ct=1;function jt(e){const t=e.nodeType===Ct?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Et(e){return{x:e.clientX,y:e.clientY}}function Tt(e,t,n,r,o){const i=function(e){var t;return"IMG"===e.nodeName&&(xt()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),a=jt(i?e:t),l={x:n.x-a.x,y:n.y-a.y},{offsetWidth:s,offsetHeight:u}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:h}=function(e,t,n,r){let o=e?t.width:n,i=e?t.height:r;return St()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(i,t,s,u),{offsetX:p,offsetY:g}=o,m=0===g||g;return{x:0===p||p?p:new kt([0,.5,1],[l.x,l.x/s*f,l.x+f-s]).interpolate(c),y:m?g:(()=>{let e=new kt([0,.5,1],[l.y,l.y/u*h,l.y+h-u]).interpolate(d);return St()&&i&&(e+=(window.devicePixelRatio-1)*h),e})()}}class Ot{get window(){return this.globalContext?this.globalContext:"undefined"!==typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){It(e,t,n[t])}))}return e}class _t{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Dt({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Dt({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(e).some((n=>e[n]===t))}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=bt[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new ht(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout((()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&jt(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!==typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Et(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=wt(r);if(this.monitor.isDragging()){if(r&&"function"===typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:i,offsetX:a,offsetY:l}=this.getCurrentSourcePreviewNodeOptions(),s=Tt(t,o,n,{anchorX:e,anchorY:i},{offsetX:a,offsetY:l});r.setDragImage(o,s.x,s.y)}}try{null===r||void 0===r||r.setData("application/json",{})}catch(i){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=wt(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Et(e)});t.some((e=>this.monitor.canDropOnTarget(e)))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Et(e),this.scheduleHover(t);(t||[]).some((e=>this.monitor.canDropOnTarget(e)))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):wt(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Et(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"===typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Ot(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new ft(this.isNodeInDocument)}}const At=function(e,t,n){return new _t(e,t,n)};var Zt=n(79274),Pt=n(17745),Rt=n(30702),Mt=n(15068),Nt=n(69476),Lt=n(62914);var Bt=n(41936),Ft=n(13925);var Wt=e=>(0,F.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:[(0,F.jsx)("g",{clipPath:"url(#a)",children:(0,F.jsx)("path",{fill:"currentColor",d:"M1.857 7.612H.98a.98.98 0 0 0-.98.98v2.224c0 .449.184.857.51 1.163.612.551 1.816 1.49 3.735 2.368a.571.571 0 0 1 .306.346l.939 3.286a.484.484 0 0 0 .469.347h1.47a.479.479 0 0 0 .469-.367l.47-1.817a.262.262 0 0 1 .326-.183c.571.122 1.183.163 1.795.163.613 0 1.225-.061 1.796-.163.143-.02.286.06.327.183l.47 1.817a.502.502 0 0 0 .468.367h1.47a.484.484 0 0 0 .47-.347l1.224-4.245a.487.487 0 0 1 .122-.224c.919-.98 1.53-2.163 1.735-3.47h.49c.53 0 .959-.448.938-.979-.02-.51-.47-.918-.98-.918h-.448C18.06 4.673 14.632 2 10.489 2c-1.775 0-3.428.49-4.755 1.326-.591-.408-1.469-.734-2.693-.632-.49.04-.715.612-.388.959.408.429.796 1 .877 1.735L1.857 7.612Zm3.122.98a.862.862 0 0 1-.857-.858c0-.469.388-.857.857-.857.47 0 .858.388.858.857 0 .47-.388.858-.858.858Z"})}),(0,F.jsx)("defs",{children:(0,F.jsx)("clipPath",{id:"a",children:(0,F.jsx)("path",{fill:"currentColor",d:"M0 0h20v20H0z"})})})]}),Ut=n(1836),zt=n(22581);function Ht(e){return e.replace("v","").split(".").map((e=>parseInt(e)))}function Vt(e,t){let n=Ht(e),r=Ht(t);return n[0]-r[0]||n[1]-r[1]||n[2]-r[2]}async function $t(){let e=await fetch("https://api.github.com/repos/actualbudget/actual/tags"),t=(await e.json()).map((e=>e.name)).concat([`v${window.Actual.ACTUAL_VERSION}`]);return t.sort(Vt),t[t.length-1]}async function qt(e){return Vt(window.Actual.ACTUAL_VERSION,e)<0}var Yt=n(27807),Gt=n(55082);function Kt(){let e=(0,u.v9)((e=>e.account.accountsSyncing)),t=e?"__all"===e?"accounts":e:null;const n=(0,Yt.Yz)(t,{from:{opacity:0,transform:"translateY(-100px)"},enter:{opacity:1,transform:"translateY(0)"},leave:{opacity:0,transform:"translateY(-100px)"},unique:!0});return(0,F.jsx)(B.Z,{style:{position:"absolute",top:0,left:0,right:0,marginTop:5,alignItems:"center",zIndex:501},children:n(((e,t)=>t&&(0,F.jsx)(Yt.q.div,{style:e,children:(0,F.jsxs)(B.Z,{style:{borderRadius:4,backgroundColor:M.O9.b9,color:M.O9.b1,padding:"5px 13px",flexDirection:"row",alignItems:"center",...M.W2.shadow},children:[(0,F.jsx)(Gt.Z,{animating:!0,iconStyle:{color:M.O9.b1}}),(0,F.jsxs)(X.Z,{children:["Syncing ",t]})]})},t)))})}var Qt=n(97931),Xt=n(84418),Jt=n(79515);function en(){let e=(0,Zt.s0)();return(0,s.useEffect)((()=>{const t=t=>{if(!Jt.jU&&t.metaKey)switch(t.key){case"1":e("/budget");break;case"2":e("/reports");break;case"3":e("/accounts");break;case",":"mac"===Jt.OS&&e("/settings")}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)}),[]),null}var tn=n(10945),nn=n(17877);function rn(){return(0,F.jsx)(nn.T3,{title:"Rules",children:(0,F.jsx)(tn.Z,{})})}var on=n(63529),an=n(28321),ln=n(24917),sn=n(91742),un=n(40336),cn=n(7401),dn=n(17422);var fn=function(e){let{month:t,modalProps:n}=e;const r=ln.WU(ln.dy(t),"MMM"),o=(0,dn.Z)(an.aK.toBudget);return(0,F.jsx)(G.C,{title:"Budget Details",...n,animate:!0,children:()=>(0,F.jsxs)(cn.Z.Provider,{value:ln.cv(t),children:[(0,F.jsxs)(B.Z,{style:{flexDirection:"row",justifyContent:"center",paddingTop:15,paddingBottom:15},children:[(0,F.jsxs)(B.Z,{style:[M.W2.text,{fontWeight:"600",textAlign:"right",marginRight:10}],children:[(0,F.jsx)(sn.Z,{binding:an.aK.incomeAvailable,type:"financial"}),(0,F.jsx)(sn.Z,{binding:an.aK.lastMonthOverspent,type:"financial"}),(0,F.jsx)(sn.Z,{binding:an.aK.totalBudgeted,type:"financial"}),(0,F.jsx)(sn.Z,{binding:an.aK.forNextMonth,type:"financial"})]}),(0,F.jsxs)(B.Z,{style:[M.W2.text,{display:"flex",flexDirection:"column",textAlign:"left"}],children:[(0,F.jsx)(X.Z,{children:"Available Funds"}),(0,F.jsxs)(X.Z,{children:["Overspent in ",r]}),(0,F.jsx)(X.Z,{children:"Budgeted"}),(0,F.jsx)(X.Z,{children:"For Next Month"})]})]}),(0,F.jsxs)(B.Z,{style:{alignItems:"center",marginBottom:15},children:[(0,F.jsx)(X.Z,{style:M.W2.text,children:o<0?"Overbudget:":"To budget:"}),(0,F.jsx)(X.Z,{style:[M.W2.text,{fontWeight:"600",fontSize:22,color:o<0?M.O9.r4:M.O9.n1}],children:(0,un.Z)(o,"financial")})]}),(0,F.jsx)(B.Z,{style:{flexDirection:"row",justifyContent:"center",paddingBottom:15},children:(0,F.jsx)(q.Z,{style:{marginRight:10},onClick:n.onClose,children:"Close"})})]})})},hn=n(25432),pn=n(87740);function gn(e){let{style:t,children:n}=e;return(0,F.jsx)(B.Z,{style:[{color:"red",fontSize:13},t],children:n})}function mn(e,t,n){const r=n.find((e=>e.id===t)),o=r&&1===r.offbudget;return 0===e.offbudget&&o}var yn=function(e){let{account:t,accounts:n,categoryGroups:r,balance:o,canDelete:i,actions:a,modalProps:l}=e,[u,c]=(0,s.useState)(!1),[d,f]=(0,s.useState)(""),[h,p]=(0,s.useState)(""),[g,m]=(0,s.useState)(!1),[y,v]=(0,s.useState)(!1);return(0,F.jsx)(G.C,{title:"Close Account",...l,style:{flex:0},loading:u,children:()=>(0,F.jsxs)(B.Z,{children:[(0,F.jsxs)(K.Z,{children:["Are you sure you want to close ",(0,F.jsx)("strong",{children:t.name}),"?"," ",i?(0,F.jsx)("span",{children:"This account has no transactions so it will be permanently deleted."}):(0,F.jsx)("span",{children:"This account has transactions so we can\u2019t permanently delete it."})]}),(0,F.jsxs)("form",{onSubmit:e=>{e.preventDefault();let r=0!==o&&""===d;m(r);let i=mn(t,d,n)&&""===h;v(i),r||i||(c(!0),a.closeAccount(t.id,d||null,h||null).then((()=>{l.onClose()})))},children:[0!==o&&(0,F.jsxs)(B.Z,{children:[(0,F.jsxs)(K.Z,{children:["This account has a balance of"," ",(0,F.jsx)("strong",{children:(0,j.zA)(o)}),". To close this account, select a different account to transfer this balance to:"]}),(0,F.jsx)(B.Z,{style:{marginBottom:15},children:(0,F.jsx)(hn.Z,{includeClosedAccounts:!1,value:d,accounts:n,inputProps:{placeholder:"Select account..."},onSelect:e=>{f(e),g&&e&&m(!1)}})}),g&&(0,F.jsx)(gn,{style:{marginBottom:15},children:"Transfer is required"}),mn(t,d,n)&&(0,F.jsxs)(B.Z,{style:{marginBottom:15},children:[(0,F.jsx)(K.Z,{children:"Since you are transferring the balance from a budgeted account to an off-budget account, this transaction must be categorized. Select a category:"}),(0,F.jsx)(pn.Z,{categoryGroups:r,value:h,inputProps:{placeholder:"Select category..."},onSelect:e=>{p(e),y&&e&&v(!1)}}),y&&(0,F.jsx)(gn,{children:"Category is required"})]})]}),!i&&(0,F.jsx)(B.Z,{style:{marginBottom:15},children:(0,F.jsxs)(X.Z,{style:{fontSize:12},children:["You can also"," ",(0,F.jsx)(Y.Z,{onClick:()=>{c(!0),a.forceCloseAccount(t.id).then((()=>l.onClose()))},style:{color:M.O9.r6},children:"force close"})," ","the account which will delete it and all its transactions permanently. Doing so may change your budget unexpectedly since money in it may vanish."]})}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",justifyContent:"flex-end"},children:[(0,F.jsx)(q.Z,{style:{marginRight:10},onClick:l.onClose,children:"Cancel"}),(0,F.jsx)(q.Z,{type:"primary",children:"Close Account"})]})]})]})})};function vn(e){let{modalProps:t,category:n,group:r,categoryGroups:o,onDelete:i}=e;const[a,l]=(0,s.useState)(null),[u,c]=(0,s.useState)(null),d=e=>{let t;if("required-transfer"===e)t="You must select a category";else t="Something bad happened, sorry!";return(0,F.jsx)(X.Z,{style:{marginTop:15,color:M.O9.r4},children:t})},f=!!(n||r).is_income;return(0,F.jsx)(G.C,{title:"Confirm Delete",...t,style:{flex:0},children:()=>(0,F.jsxs)(B.Z,{style:{lineHeight:1.5},children:[r?(0,F.jsxs)(L.Z,{children:["Categories in the group ",(0,F.jsx)("strong",{children:r.name})," are used by existing transaction",!f&&" or it has a positive leftover balance currently","."," ",(0,F.jsx)("strong",{children:"Are you sure you want to delete it?"})," If so, you must select another category to transfer existing transactions and balance to."]}):(0,F.jsxs)(L.Z,{children:[(0,F.jsx)("strong",{children:n.name})," is used by existing transactions",!f&&" or it has a positive leftover balance currently","."," ",(0,F.jsx)("strong",{children:"Are you sure you want to delete it?"})," If so, you must select another category to transfer existing transactions and balance to."]}),u&&d(u),(0,F.jsxs)(B.Z,{style:{marginTop:20,flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[(0,F.jsx)(X.Z,{children:"Transfer to:"}),(0,F.jsx)(B.Z,{style:{flex:1,marginLeft:10,marginRight:30},children:(0,F.jsx)(pn.Z,{categoryGroups:r?o.filter((e=>e.id!==r.id&&!!e.is_income===f)):o.filter((e=>!!e.is_income===f)).map((e=>({...e,categories:e.categories.filter((e=>e.id!==n.id))}))),value:a,inputProps:{placeholder:"Select category..."},onSelect:e=>l(e)})}),(0,F.jsx)(q.Z,{type:"primary",onClick:()=>{a?(i(a),t.onClose()):c("required-transfer")},children:"Delete"})]})]})})}var bn=n(91669),wn=n(49963);function xn(){const[e,t]=(0,s.useState)(null),[n,r]=(0,s.useState)(!1),o=(0,on.Z)();return(0,s.useEffect)((()=>{"online"===o&&async function(){r(!0);const e=await(0,_.lW)("gocardless-status");t(e.configured||!1),r(!1)}()}),[o]),{configured:e,isLoading:n}}function Sn(e){let{modalProps:t,syncServerStatus:n}=e;const r=(0,u.I0)(),[o,i]=(0,s.useState)(null),a=()=>{o?(0,wn.F)(((e,t)=>r((0,bn.Ll)(e,t)))):l()},l=()=>{r((0,bn.Ll)("gocardless-init",{onSuccess:()=>i(!0)}))},c=()=>{r((0,bn.Ll)("add-local-account"))},{configured:d}=xn();return(0,s.useEffect)((()=>{i(d)}),[d]),(0,F.jsx)(G.C,{title:"Add Account",...t,children:()=>(0,F.jsxs)(B.Z,{style:{maxWidth:500,gap:30},children:[(0,F.jsxs)(B.Z,{style:{gap:10},children:[(0,F.jsx)(q.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600},onClick:c,children:"Create local account"}),(0,F.jsx)(B.Z,{style:{lineHeight:"1.4em",fontSize:15},children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Create a local account"})," if you want to add transactions manually. You can also"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/transactions/importing",linkColor:"muted",children:"import QIF/OFX/QFX files into a local account"}),"."]})})]}),(0,F.jsx)(B.Z,{style:{gap:10},children:"online"===n?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(q.y,{disabled:"online"!==n,style:{padding:"10px 0",fontSize:15,fontWeight:600,flex:1},onClick:a,children:o?"Link bank account with GoCardless":"Set up GoCardless for bank sync"}),(0,F.jsxs)(X.Z,{style:{lineHeight:"1.4em",fontSize:15},children:[(0,F.jsx)("strong",{children:"Link a bank account"})," to automatically download transactions. GoCardless provides reliable, up-to-date information from hundreds of banks."]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(q.Z,{disabled:!0,style:{padding:"10px 0",fontSize:15,fontWeight:600},children:"Set up GoCardless for bank sync"}),(0,F.jsxs)(K.Z,{style:{fontSize:15},children:["Connect to an Actual server to set up"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/advanced/bank-sync",linkColor:"muted",children:"automatic syncing with GoCardless"}),"."]})]})})]})})}var kn=n(76218),Cn=n(74283),jn=n(17904);function En(e){let{modalProps:t,actions:n,options:r={}}=e,[o,i]=(0,s.useState)(""),[a,l]=(0,s.useState)(!1),[u,c]=(0,s.useState)(""),[d,f]=(0,s.useState)(!1),h=r.recreate;return(0,F.jsx)(G.C,{...t,style:{width:600},title:h?"Generate new key":"Enable encryption",onClose:()=>n.popModal(),children:()=>(0,F.jsxs)(F.Fragment,{children:[h?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(K.Z,{style:{marginTop:5},children:["This will generate a new key for encrypting your data."," ",(0,F.jsx)("strong",{children:"This requires a sync reset"})," and all other devices will have to revert to this version of your data. Actual will take you through that process on those devices."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,F.jsx)(K.Z,{children:"Key generation is randomized. The same password will create different keys, so this will change your key regardless of the password being different."})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(K.Z,{style:{marginTop:5},children:["To enable end-to-end encryption, you need to create a key. We will generate a key based on a password and use it to encrypt from now on. ",(0,F.jsx)("strong",{children:"This requires a sync reset"})," and all other devices will have to revert to this version of your data."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,F.jsx)(K.Z,{children:(0,F.jsxs)("ul",{...(0,A.iv)({marginTop:0,"& li":{marginBottom:8}}),children:[(0,F.jsxs)("li",{children:[(0,F.jsx)("strong",{children:"Important:"})," if you forget this password"," ",(0,F.jsx)("em",{children:"and"})," you don\u2019t have any local copies of your data, you will lose access to all your data. The data cannot be decrypted without the password."]}),(0,F.jsx)("li",{children:"This key only applies to this file. You will need to generate a new key for each file you want to encrypt."}),(0,F.jsx)("li",{children:"If you\u2019ve already downloaded your data on other devices, you will need to reset them. Actual will automatically take you through this process."}),(0,F.jsx)("li",{children:"It is recommended for the encryption password to be different than the log-in password in order to better protect your data."})]})})]}),(0,F.jsxs)("form",{onSubmit:e=>{e.preventDefault(),async function(){if(""!==o&&!a){l(!0),c(null);let e=await(0,_.lW)("key-make",{password:o});if(e.error)return l(null),void c((0,kn.zJ)(e.error));n.loadGlobalPrefs(),n.loadAllFiles(),n.sync(),l(!1),n.popModal()}}()},children:[(0,F.jsxs)(B.Z,{style:{alignItems:"center"},children:[(0,F.jsx)(X.Z,{style:{fontWeight:600,marginBottom:3},children:"Password"}),u&&(0,F.jsx)(B.Z,{style:{color:M.O9.r4,textAlign:"center",fontSize:13,marginBottom:3},children:u}),(0,F.jsx)(Cn.Z,{children:(0,F.jsx)(jn.C,{type:d?"text":"password",style:{width:300},onChange:e=>i(e.target.value)})}),(0,F.jsx)(X.Z,{style:{marginTop:5},children:(0,F.jsxs)("label",{style:{userSelect:"none"},children:[(0,F.jsx)("input",{type:"checkbox",onClick:()=>f(!d)})," ","Show password"]})})]}),(0,F.jsx)(G.Z,{style:{marginTop:20},children:(0,F.jsx)(q.y,{loading:a,type:"primary",children:"Enable"})})]})]})})}function Tn(e){let{label:t,labelWidth:n,children:r,width:o,style:i}=e;return(0,F.jsxs)("label",{...(0,A.iv)({display:"flex",flexDirection:"row",alignItems:"center",margin:"7px 0",width:o},i),children:[(0,F.jsxs)("div",{style:{width:n||75,textAlign:"right",paddingRight:10},children:[t,":"]}),r]})}var On=function(e){let{modalProps:t,actions:n}=e,r=(0,Zt.s0)(),[o,i]=(0,s.useState)(""),[a,l]=(0,s.useState)(!1),[u,c]=(0,s.useState)("0"),[d,f]=(0,s.useState)(!1),[h,p]=(0,s.useState)(!1),g=e=>!isNaN(parseFloat(e));return(0,F.jsx)(G.C,{title:"Create Local Account",...t,showBack:!1,children:()=>(0,F.jsx)(B.Z,{children:(0,F.jsxs)("form",{onSubmit:async e=>{e.preventDefault();let t=!o;f(t);let i=!g(u);if(p(i),!t&&!i){n.closeModal();let e=await n.createAccount(o,(0,j.sD)(u),a);r("/accounts/"+e)}},children:[(0,F.jsx)(Tn,{label:"Name",width:"75%",children:(0,F.jsx)(Cn.Z,{children:(0,F.jsx)(jn.C,{name:"name",value:o,onChange:e=>i(e.target.value),onBlur:e=>{let t=e.target.value.trim();i(t),t&&d&&f(!1)},style:{flex:1}})})}),d&&(0,F.jsx)(gn,{style:{marginLeft:75},children:"Name is required"}),(0,F.jsx)(B.Z,{style:{width:"75%",flexDirection:"row",justifyContent:"flex-end"},children:(0,F.jsxs)(B.Z,{style:{flexDirection:"column"},children:[(0,F.jsxs)("label",{style:{userSelect:"none",textAlign:"right",width:"100%",display:"flex",verticalAlign:"center",justifyContent:"flex-end"},htmlFor:"offbudget",children:[(0,F.jsx)("input",{id:"offbudget",name:"offbudget",type:"checkbox",checked:a,onChange:e=>l(e.target.checked)}),"Off-budget"]}),(0,F.jsx)("div",{style:{textAlign:"right",fontSize:"0.7em",color:M.O9.n5,marginTop:3},children:(0,F.jsxs)(X.Z,{children:["This cannot be changed later. ",(0,F.jsx)("br",{})," ","\n","See"," ",(0,F.jsx)(V.Z,{linkColor:"muted",to:"https://actualbudget.org/docs/accounts/#off-budget-accounts",children:"Accounts Overview"})," ","for more information."]})})]})}),(0,F.jsx)(Tn,{label:"Balance",width:"75%",children:(0,F.jsx)(jn.C,{name:"balance",value:u,onChange:e=>c(e.target.value),onBlur:e=>{let t=e.target.value.trim();c(t),g(t)&&h&&p(!1)},style:{flex:1}})}),h&&(0,F.jsx)(gn,{style:{marginLeft:75},children:"Balance must be a number"}),(0,F.jsxs)(G.Z,{children:[(0,F.jsx)(q.Z,{onClick:()=>t.onBack(),children:"Back"}),(0,F.jsx)(q.Z,{type:"primary",style:{marginLeft:10},children:"Create"})]})]})})})},In=n(45249),Dn=n(81785),_n=n(3189),An=n(35946),Zn=n(95547);function Pn(e){let t,n,r,{modalProps:o,name:i,onSubmit:a}=e,l=(0,u.v9)((e=>e.prefs.local.dateFormat||"MM/dd/yyyy")),s=(0,u.v9)((e=>e.queries.categories.grouped)),c=(0,u.v9)((e=>e.queries.accounts)),d=(0,u.v9)((e=>e.queries.payees)),{createPayee:f}=(0,Z.o)();function h(e){null!=e&&("amount"===i&&(e=(0,j.l9)(e)),a(i,e)),o.onClose()}let p={":focus":{boxShadow:0}},g={inputProps:{style:p},containerProps:{style:{height:275}}};switch(i){case"date":{let e=(0,ln.PR)();t="Date",r=350,n=(0,F.jsx)(Zn.Z,{value:(0,In.Z)((0,Dn.Z)(e),l),dateFormat:l,focused:!0,embedded:!0,onUpdate:()=>{},onSelect:e=>{h((0,ln.is)((0,_n.Z)(e,"yyyy-MM-dd",new Date)))}});break}case"account":t="Account",n=(0,F.jsx)(hn.Z,{value:null,accounts:c,focused:!0,embedded:!0,onSelect:e=>{e&&h(e)},...g});break;case"payee":t="Payee",n=(0,F.jsx)(An.Z,{payees:d,accounts:c,value:null,focused:!0,embedded:!0,showManagePayees:!1,onSelect:async e=>{e&&e.startsWith("new:")&&(e=await f(e.slice(4))),h(e)},isCreatable:!0,...g});break;case"notes":t="Notes",n=(0,F.jsx)(jn.C,{focused:!0,onEnter:e=>h(e.target.value),style:p});break;case"category":t="Category",n=(0,F.jsx)(pn.Z,{categoryGroups:s,value:null,focused:!0,embedded:!0,showSplitOption:!1,onUpdate:()=>{},onSelect:e=>{h(e)},...g});break;case"amount":t="Amount",n=(0,F.jsx)(jn.C,{focused:!0,onEnter:e=>h(e.target.value),style:p})}return(0,F.jsx)(G.C,{noAnimation:!0,showHeader:!1,focusAfterClose:!1,...o,padding:0,style:[{flex:0,padding:"15px 10px",backgroundColor:M.O9.n1,color:"white"},r&&{minWidth:r}],children:()=>(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(J.eX,{title:t,style:{alignSelf:"center",color:M.O9.Iy,marginBottom:10}}),(0,F.jsx)(B.Z,{style:{flex:1},children:n})]})})}var Rn=n(97117);function Mn(e){let{modalProps:t,actions:n,options:r={}}=e,{hasExistingKey:o,cloudFileId:i,onSuccess:a}=r,[l,u]=(0,s.useState)(""),[c,d]=(0,s.useState)(""),[f,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(!1);async function m(){if(""!==l&&!f){h(!0),d(null);let{error:e}=await(0,_.lW)("key-test",{password:l,fileId:i});if(e)return d((0,kn.Ez)(e)),void h(!1);n.popModal(),null===a||void 0===a||a()}}return(0,F.jsx)(G.C,{...t,showHeader:!1,style:{width:600},children:()=>(0,F.jsxs)(B.Z,{style:{flex:1},children:[(0,F.jsx)(X.Z,{style:{fontSize:25,fontWeight:700,color:M.O9.n2,margin:"20px 0"},children:o?"Unable to decrypt file":"This file is encrypted"}),o?(0,F.jsxs)(K.Z,{children:["This file was encrypted with a different key than you are currently using. This probably means you changed your password. Enter your current password to update your key."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}):(0,F.jsxs)(K.Z,{children:["We don\u2019t have a key that encrypts or decrypts this file. Enter the password for this file to create the key for encryption."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,F.jsxs)("form",{onSubmit:e=>{e.preventDefault(),m()},children:[(0,F.jsxs)(B.Z,{style:{marginTop:15,flexDirection:"column",alignItems:"center"},children:[(0,F.jsx)(X.Z,{style:{fontWeight:600,marginBottom:5},children:"Password"})," ",c&&(0,F.jsx)(B.Z,{style:{color:M.O9.r4,textAlign:"center",fontSize:13,marginBottom:3},children:c}),(0,F.jsx)(Cn.Z,{children:(0,F.jsx)(jn.C,{type:p?"text":"password",style:{width:"50%"},onChange:e=>u(e.target.value)})}),(0,F.jsx)(X.Z,{style:{marginTop:5},children:(0,F.jsxs)("label",{style:{userSelect:"none"},children:[(0,F.jsx)("input",{type:"checkbox",onClick:()=>g(!p)})," ","Show password"]})})]}),(0,F.jsxs)(G.Z,{style:{marginTop:20},children:[(0,F.jsx)(q.Z,{style:{marginRight:10},onClick:()=>t.onBack(),type:"button",children:"Back"}),(0,F.jsx)(q.y,{type:"primary",loading:f,onClick:m,children:o?"Update key":"Create key"})]})]})]})})}var Nn=n(97800),Ln=n(80239),Bn=n(22101);const Fn=e=>{let{icon:t,color:n,backgroundColor:r,style:o,children:i}=e;return(0,F.jsxs)(B.Z,{style:[{color:n,fontSize:13,...M.W2.shadow,borderRadius:4,backgroundColor:r,padding:10,flexDirection:"row","& a, & a:active, & a:visited":{color:M.O9.b3}},o],children:[(0,F.jsx)(B.Z,{style:{paddingLeft:2,paddingTop:".11em",alignSelf:"stretch",flexShrink:0,marginRight:5},children:(0,F.jsx)(t,{width:13,style:{marginTop:2}})}),(0,F.jsx)(X.Z,{style:{zIndex:1,lineHeight:1.5},children:i})]})},Wn=e=>{let{style:t,children:n}=e;return(0,F.jsx)(Fn,{icon:Bn.Z,color:M.O9.n4,backgroundColor:"transparent",style:[t,{boxShadow:"none",padding:5}],children:n})},Un=e=>{let{style:t,children:n}=e;return(0,F.jsx)(Fn,{icon:Ln.Z,color:M.O9.y2,backgroundColor:M.O9.Zu,style:t,children:n})},zn=e=>{let{style:t,children:n}=e;return(0,F.jsx)(Fn,{icon:Ln.Z,color:M.O9.r2,backgroundColor:M.O9.as,style:t,children:n})};var Hn=n(71588),Vn=n(18999),$n=n(83679);const qn=[{id:"AT",name:"Austria"},{id:"BE",name:"Belgium"},{id:"BG",name:"Bulgaria"},{id:"HR",name:"Croatia"},{id:"CY",name:"Cyprus"},{id:"CZ",name:"Czechia"},{id:"DK",name:"Denmark"},{id:"EE",name:"Estonia"},{id:"FI",name:"Finland"},{id:"FR",name:"France"},{id:"DE",name:"Germany"},{id:"GR",name:"Greece"},{id:"HU",name:"Hungary"},{id:"IS",name:"Iceland"},{id:"IE",name:"Ireland"},{id:"IT",name:"Italy"},{id:"LV",name:"Latvia"},{id:"LI",name:"Liechtenstein"},{id:"LT",name:"Lithuania"},{id:"LU",name:"Luxembourg"},{id:"MT",name:"Malta"},{id:"NL",name:"Netherlands"},{id:"NO",name:"Norway"},{id:"PL",name:"Poland"},{id:"PT",name:"Portugal"},{id:"RO",name:"Romania"},{id:"SK",name:"Slovakia"},{id:"SI",name:"Slovenia"},{id:"ES",name:"Spain"},{id:"SE",name:"Sweden"},{id:"GB",name:"United Kingdom"}];function Yn(e){return(0,F.jsx)(zn,{style:{alignSelf:"center"},children:"timeout"===e?"Timed out. Please try again.":"An error occurred while linking your account, sorry!"})}function Gn(e){let{modalProps:t,onMoveExternal:n,onSuccess:r,onClose:o}=e;const i=(0,u.I0)();let[a,l]=(0,s.useState)(null),[c,d]=(0,s.useState)(!1),[f,h]=(0,s.useState)(),[p,g]=(0,s.useState)(),[m,y]=(0,s.useState)(null),[v,b]=(0,s.useState)(null),[w,x]=(0,s.useState)(!1),S=(0,s.useRef)(null);const{data:k,isLoading:C,isError:j}=function(e){const[t,n]=(0,s.useState)([]),[r,o]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{!async function(){if(a(!1),!e)return n([]),void o(!1);o(!0);const{data:t,error:r}=await(0,_.OK)("gocardless-get-banks",e);r?(a(!0),n([])):n(t),o(!1)}()}),[n,o,e]),{data:t,isLoading:r,isError:i}}(p),{configured:E,isLoading:T}=xn();async function O(){y(null),l("browser");let e=await n({institutionId:f});if(e.error)return y(e.error),void l(null);S.current=e.data,l(null),d(!0)}async function I(){l("accounts"),await r(S.current),l(null)}const D=()=>{i((0,bn.Ll)("gocardless-init",{onSuccess:()=>b(!0)}))};return(0,F.jsx)(G.C,{title:"Link Your Bank",...t,onClose:function(){null===o||void 0===o||o(),t.onClose()},style:{flex:0},children:()=>(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(K.Z,{style:{fontSize:15},children:"To link your bank account, you will be redirected to a new page where GoCardless will ask to connect to your bank. GoCardless will not be able to withdraw funds from your accounts."}),m&&Yn(m),a||T?(0,F.jsxs)(B.Z,{style:{alignItems:"center",marginTop:15},children:[(0,F.jsx)(N.Z,{color:M.O9.n1,style:{width:20,height:20}}),(0,F.jsx)(B.Z,{style:{marginTop:10,color:M.O9.n4},children:T?"Checking GoCardless configuration..":"browser"===a?"Waiting on GoCardless...":"accounts"===a?"Loading accounts...":null}),"browser"===a&&(0,F.jsx)(Y.Z,{onClick:O,style:{marginTop:10},children:"(Account linking not opening in a new tab? Click here)"})]}):c?(0,F.jsx)(q.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10,backgroundColor:M.O9.g4,borderColor:M.O9.g4},onClick:I,children:"Success! Click to continue \u2192"}):E||v?(0,F.jsxs)(B.Z,{style:{gap:10},children:[(0,F.jsxs)(J.Wi,{children:[(0,F.jsx)(J.lX,{title:"Choose your country:",htmlFor:"country-field"}),(0,F.jsx)(Hn.ZP,{strict:!0,highlightFirst:!0,disabled:T,suggestions:qn,onSelect:g,value:p,inputProps:{id:"country-field",placeholder:"(please select)"}})]}),j?(0,F.jsxs)(zn,{children:["Failed loading available banks: GoCardless access credentials might be misconfigured. Please"," ",(0,F.jsx)(Y.Z,{onClick:D,style:{color:M.O9.b3,display:"inline"},children:"set them up"})," ","again."]}):p&&(C?"Loading banks...":(0,F.jsxs)(J.Wi,{children:[(0,F.jsx)(J.lX,{title:"Choose your bank:",htmlFor:"bank-field"}),(0,F.jsx)(Hn.ZP,{focused:!0,strict:!0,highlightFirst:!0,suggestions:k,onSelect:h,value:f,inputProps:{id:"bank-field",placeholder:"(please select)"}})]})),(0,F.jsxs)(Un,{children:["By enabling bank-sync, you will be granting GoCardless (a third party service) read-only access to your entire account\u2019s transaction history. This service is not affiliated with Actual in any way. Make sure you\u2019ve read and understand GoCardless\u2019s"," ",(0,F.jsx)(V.Z,{to:"https://gocardless.com/privacy/",children:"Privacy Policy"})," ","before proceeding."]}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",gap:10,alignItems:"center"},children:[(0,F.jsx)(q.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,flexGrow:1},onClick:O,disabled:!f||!p,children:"Link bank in browser \u2192"}),(0,F.jsxs)(q.Z,{type:"bare",onClick:()=>x(!0),"aria-label":"Menu",children:[(0,F.jsx)(Nn.Z,{width:15,height:15,style:{transform:"rotateZ(90deg)"}}),w&&(0,F.jsx)($n.u,{position:"bottom-right",width:200,style:{padding:0},onClose:()=>x(!1),children:(0,F.jsx)(Vn.Z,{onMenuSelect:e=>{"reconfigure"===e&&D()},items:[{name:"reconfigure",text:"Set new API secrets"}]})})]})]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(K.Z,{style:{color:M.O9.r5},children:"GoCardless integration has not yet been configured."}),(0,F.jsx)(q.Z,{type:"primary",onClick:D,children:"Configure GoCardless integration"})]})]})})}var Kn=e=>{let{modalProps:t,onSuccess:n}=e;const[r,o]=(0,s.useState)(""),[i,a]=(0,s.useState)(""),[l,u]=(0,s.useState)(!0),[c,d]=(0,s.useState)(!1);return(0,F.jsxs)(G.C,{title:"Set-up GoCardless",size:{width:300},...t,children:[(0,F.jsxs)(B.Z,{style:{display:"flex",gap:10},children:[(0,F.jsxs)(X.Z,{children:["In order to enable bank-sync via GoCardless (only for EU banks) you will need to create access credentials. This can be done by creating an account with"," ",(0,F.jsx)(V.Z,{to:"https://gocardless.com/",children:"GoCardless"}),"."]}),(0,F.jsxs)(J.Wi,{children:[(0,F.jsx)(J.lX,{title:"Secret ID:",htmlFor:"secret-id-field"}),(0,F.jsx)(jn.C,{id:"secret-id-field",type:"password",value:r,onUpdate:o,onChange:()=>u(!0)})]}),(0,F.jsxs)(J.Wi,{children:[(0,F.jsx)(J.lX,{title:"Secret Key:",htmlFor:"secret-key-field"}),(0,F.jsx)(jn.C,{id:"secret-key-field",type:"password",value:i,onUpdate:a,onChange:()=>u(!0)})]}),!l&&(0,F.jsx)(zn,{children:"It is required to provide both the secret id and secret key."})]}),(0,F.jsx)(G.Z,{children:(0,F.jsx)(q.y,{type:"primary",loading:c,onClick:async()=>{r&&i?(d(!0),await Promise.all([(0,_.lW)("secret-set",{name:"nordigen_secretId",value:r}),(0,_.lW)("secret-set",{name:"nordigen_secretKey",value:i})]),n(),t.onClose(),d(!1)):u(!1)},children:"Save and continue"})})]})},Qn=n(48664),Xn=n(61947),Jn=n(65695);let er=[{format:"yyyy mm dd",label:"YYYY MM DD"},{format:"yy mm dd",label:"YY MM DD"},{format:"mm dd yyyy",label:"MM DD YYYY"},{format:"mm dd yy",label:"MM DD YY"},{format:"dd mm yyyy",label:"DD MM YYYY"},{format:"dd mm yy",label:"DD MM YY"}];function tr(e,t){if("string"!==typeof e)return null;function n(e){return e&&1===e.length?"0"+e:e}const r=(e,t)=>n=>{const r=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"").split(/[^\d]+/);if(r.length>=3)return r.slice(0,3);const o=n.replace(/[^\d]/g,"");return[o.slice(0,e),o.slice(e,e+t),o.slice(e+t)]},o=r(4,2),i=r(2,2);let a,l,s,u;switch(t){case"dd mm yyyy":a=i(e),l=a[2],s=a[1],u=a[0];break;case"dd mm yy":a=i(e),l=`20${a[2]}`,s=a[1],u=a[0];break;case"yyyy mm dd":a=o(e),l=a[0],s=a[1],u=a[2];break;case"yy mm dd":a=i(e),l=`20${a[0]}`,s=a[1],u=a[2];break;case"mm dd yy":a=i(e),l=`20${a[2]}`,s=a[0],u=a[1];break;default:a=i(e),l=a[2],s=a[0],u=a[1]}let c=`${l}-${n(s)}-${n(u)}`;return Qn.Z(Dn.Z(c))?c:null}function nr(e,t){if(!e)return null;try{return(0,ln.WU)(e,t)}catch(n){}return null}function rr(e){let t=e.match(/\.([^.]*)$/);if(!t)return"ofx";let n=t[1].toLowerCase();return"tsv"===n?"csv":n}function or(e){let{parseDateFormat:t,showParsed:n,dateFormat:r,date:o}=e,i=o&&nr(t?tr(o,t):o,r);return(0,F.jsxs)(X.Z,{children:[(0,F.jsxs)(X.Z,{children:[o||(0,F.jsx)(X.Z,{style:{color:M.O9.n4,fontStyle:"italic"},children:"Empty"})," ","\u2192"," "]}),(0,F.jsx)(X.Z,{style:{color:i?M.O9.g3:M.O9.r4},children:i||"Invalid"})]})}function ir(e,t){if(0===e.length||null==t.date)return"yyyy mm dd";let n=e[0][t.date],r=null==n?null:er.find((e=>null!=tr(n,e.format)));return r?r.format:"mm dd yyyy"}function ar(e){if(0===e.length)return{};let t=e[0],n=Object.entries(t);function r(e){return e?e[0]:null}let o=r(n.find((e=>{let[t,n]=e;return t.toLowerCase().includes("date")}))||n.find((e=>{let[t,n]=e;return n.match(/^\d+[-/]\d+[-/]\d+$/)}))),i=r(n.find((e=>{let[t,n]=e;return t.toLowerCase().includes("amount")}))||n.find((e=>{let[t,n]=e;return n.match(/^-?[.,\d]+$/)}))),a=r(n.find((e=>{let[t,n]=e;return t!==o&&t!==i}))),l=r(n.find((e=>{let[t,n]=e;return t!==o&&t!==i&&t!==a})));return{date:o,amount:i,payee:a,notes:l}}function lr(e,t){let n={};for(let[r,o]of Object.entries(t))"payee"===r&&(r="payee_name"),n[r]=e[o||r];return n}function sr(e,t){if(null==e)return null;return t("string"===typeof e?(0,j.qP)(e):e)}function ur(e,t,n,r){const o=parseFloat(r)||1;if(t){let t=sr(e.outflow,(e=>-Math.abs(e)))*o,n=t?0:sr(e.inflow,(e=>Math.abs(e)))*o;return{amount:t||n,outflow:t,inflow:n}}return{amount:sr(e.amount,(e=>n?-1*e:e))*o,outflow:null,inflow:null}}function cr(e){let{transaction:t,fieldMappings:n,showParsed:r,parseDateFormat:o,dateFormat:i,splitMode:a,flipAmount:l,multiplierAmount:u}=e,c=(0,s.useMemo)((()=>n?lr(t,n):t),[t,n]),{amount:d,outflow:f,inflow:h}=ur(c,a,l,u);return d=(0,j.eY)(d),f=(0,j.eY)(f),h=(0,j.eY)(h),(0,F.jsxs)(Jn.X2,{style:{backgroundColor:"white"},children:[(0,F.jsx)(Jn.gN,{width:200,borderColor:M.O9.Cg,children:r?(0,F.jsx)(or,{parseDateFormat:o,dateFormat:i,date:c.date}):nr(c.date,i)}),(0,F.jsx)(Jn.gN,{width:"flex",borderColor:M.O9.Cg,title:c.imported_payee||c.payee_name,children:c.payee_name}),(0,F.jsx)(Jn.gN,{width:"flex",borderColor:M.O9.Cg,title:c.notes,children:c.notes}),a?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Jn.gN,{width:90,borderColor:M.O9.Cg,contentStyle:[{textAlign:"right"},M.W2.tnum],title:f,children:f}),(0,F.jsx)(Jn.gN,{width:90,borderColor:M.O9.Cg,contentStyle:[{textAlign:"right"},M.W2.tnum],title:h,children:h})]}):(0,F.jsx)(Jn.gN,{width:90,borderColor:M.O9.Cg,contentStyle:[{textAlign:"right"},M.W2.tnum],title:d,children:d})]})}function dr(e){let{title:t}=e;return(0,F.jsx)(X.Z,{style:{fontSize:13,marginBottom:3,color:M.O9.n3},children:t})}function fr(e){let{style:t,options:n,value:r,onChange:o,hasHeaderRow:i,firstTransaction:a}=e;return(0,F.jsx)(Xn.Z,{options:[["choose-field","Choose field..."],...n.map((e=>[e,i?e:`Column ${parseInt(e)+1} (${a[e]})`]))],value:null===r?"choose-field":r,style:{borderWidth:1,width:"100%"},wrapperStyle:t,onChange:e=>o(e)})}function hr(e){let{transactions:t,fieldMappings:n,parseDateFormat:r,onChange:o}=e,i="-";if(t.length>0&&n&&null!=n.date){let e=t[0][n.date],r=e&&e.match(/[/.,-/\\]/);i=r?r[0]:" "}return(0,F.jsxs)(B.Z,{style:{width:120},children:[(0,F.jsx)(J.eX,{title:"Date format"}),(0,F.jsx)(Xn.Z,{options:er.map((e=>[e.format,e.label.replace(/ /g,i)])),value:r||"",onChange:e=>o(e),style:{borderWidth:1,width:"100%"}})]})}function pr(e){let{id:t,checked:n,disabled:r,onChange:o,children:i,style:a}=e;return(0,F.jsxs)(B.Z,{style:[{flex:1,flexDirection:"row",alignItems:"center",userSelect:"none",minHeight:28},a],children:[(0,F.jsx)(J.XZ,{id:t,checked:n,disabled:r,onChange:o}),(0,F.jsx)("label",{htmlFor:t,style:{userSelect:"none",color:r?M.O9.n6:null},children:i})]})}function gr(e){let{multiplierEnabled:t,multiplierAmount:n,onToggle:r,onChangeAmount:o}=e;return(0,F.jsxs)(B.Z,{style:{flexDirection:"row",gap:10,height:28},children:[(0,F.jsx)(pr,{id:"add_multiplier",checked:t,onChange:r,children:"Add multiplier"}),(0,F.jsx)(jn.C,{type:"text",style:{display:t?"inherit":"none"},value:n,placeholder:"Multiplier",onUpdate:o})]})}function mr(e){let{transactions:t,mappings:n,onChange:r,splitMode:o,hasHeaderRow:i}=e;if(0===t.length)return null;let a=Object.keys(t[0]);return n=n||{},(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(J.eX,{title:"CSV FIELDS"}),(0,F.jsxs)(Q.Z,{direction:"row",align:"flex-start",spacing:1,style:{marginTop:5},children:[(0,F.jsxs)(B.Z,{style:{flex:1},children:[(0,F.jsx)(dr,{title:"Date"}),(0,F.jsx)(fr,{options:a,value:n.date,style:{marginRight:5},onChange:e=>r("date",e),hasHeaderRow:i,firstTransaction:t[0]})]}),(0,F.jsxs)(B.Z,{style:{flex:1},children:[(0,F.jsx)(dr,{title:"Payee"}),(0,F.jsx)(fr,{options:a,value:n.payee,style:{marginRight:5},onChange:e=>r("payee",e),hasHeaderRow:i,firstTransaction:t[0]})]}),(0,F.jsxs)(B.Z,{style:{flex:1},children:[(0,F.jsx)(dr,{title:"Notes"}),(0,F.jsx)(fr,{options:a,value:n.notes,style:{marginRight:5},onChange:e=>r("notes",e),hasHeaderRow:i,firstTransaction:t[0]})]}),o?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(B.Z,{style:{flex:.5},children:[(0,F.jsx)(dr,{title:"Outflow"}),(0,F.jsx)(fr,{options:a,value:n.outflow,onChange:e=>r("outflow",e),hasHeaderRow:i,firstTransaction:t[0]})]}),(0,F.jsxs)(B.Z,{style:{flex:.5},children:[(0,F.jsx)(dr,{title:"Inflow"}),(0,F.jsx)(fr,{options:a,value:n.inflow,onChange:e=>r("inflow",e),hasHeaderRow:i,firstTransaction:t[0]})]})]}):(0,F.jsxs)(B.Z,{style:{flex:1},children:[(0,F.jsx)(dr,{title:"Amount"}),(0,F.jsx)(fr,{options:a,value:n.amount,onChange:e=>r("amount",e),hasHeaderRow:i,firstTransaction:t[0]})]})]})]})}function yr(e){var t;let{modalProps:n,options:r}=e,o=(0,u.v9)((e=>e.prefs.local.dateFormat||"MM/dd/yyyy")),i=(0,u.v9)((e=>e.prefs.local)),{parseTransactions:a,importTransactions:l,getPayees:c,savePrefs:d}=(0,Z.o)(),[f,h]=(0,s.useState)(""),[p,g]=(0,s.useState)("parsing"),[m,y]=(0,s.useState)(null),[v,b]=(0,s.useState)(r.filename),[w,x]=(0,s.useState)([]),[S,k]=(0,s.useState)(null),[C,E]=(0,s.useState)(null),[T,O]=(0,s.useState)(!1),[I,D]=(0,s.useState)(!1),[_,A]=(0,s.useState)(!1),{accountId:P,onImported:R}=r,[N,L]=(0,s.useState)(i[`csv-delimiter-${P}`]||(v.endsWith(".tsv")?"\t":",")),[W,U]=(0,s.useState)(null===(t=i[`csv-has-header-${P}`])||void 0===t||t),[z,H]=(0,s.useState)(null);async function V(e,t){g("parsing");let n=rr(e);b(e),k(n);let{errors:r,transactions:o}=await a(e,t);if(g(null),y(null),r.length>0)y({parsed:!0,message:r[0].message||"Internal error"});else{if("csv"!==n&&"qif"!==n||D(i[`flip-amount-${P}-${n}`]||!1),"csv"===n){let e=i[`csv-mappings-${P}`];e=e?JSON.parse(e):ar(o),E(e);let t=!(!e.outflow&&!e.inflow);O(t),H(i[`parse-date-${P}-${n}`]||ir(o,e))}else"qif"===n?H(i[`parse-date-${P}-${n}`]||ir(o,{date:"date"})):(E(null),H(null));x(o.reverse())}}(0,s.useEffect)((()=>{V(r.filename,"csv"===rr(r.filename)?{delimiter:N,hasHeaderRow:W}:null)}),[a,r.filename]);let $=[{name:"Date",width:200},{name:"Payee",width:"flex"},{name:"Notes",width:"flex"}];return T?($.push({name:"Outflow",width:90,style:{textAlign:"right"}}),$.push({name:"Inflow",width:90,style:{textAlign:"right"}})):$.push({name:"Amount",width:90,style:{textAlign:"right"}}),(0,F.jsxs)(G.C,{title:"Import transactions"+(S?` (${S.toUpperCase()})`:""),...n,loading:"parsing"===p,style:{width:800},children:[m&&!m.parsed&&(0,F.jsx)(B.Z,{style:{alignItems:"center",marginBottom:15},children:(0,F.jsxs)(X.Z,{style:{marginRight:10,color:M.O9.r4},children:[(0,F.jsx)("strong",{children:"Error:"})," ",m.message]})}),(!m||!m.parsed)&&(0,F.jsxs)(B.Z,{style:{flex:"unset",height:300,border:"1px solid "+M.O9.Cg},children:[(0,F.jsx)(Jn.xD,{headers:$}),(0,F.jsx)(Jn.pX,{items:w,fields:["payee","amount"],style:{backgroundColor:M.O9.S0},getItemKey:e=>e,renderEmpty:()=>(0,F.jsx)(B.Z,{style:{textAlign:"center",marginTop:25,color:M.O9.n4,fontStyle:"italic"},children:"No transactions found"}),renderItem:e=>{let{key:t,style:n,item:r,editing:i,focusedField:a}=e;return(0,F.jsx)(B.Z,{style:n,children:(0,F.jsx)(cr,{transaction:r,showParsed:"csv"===S||"qif"===S,parseDateFormat:z,dateFormat:o,fieldMappings:C,splitMode:T,flipAmount:I,multiplierAmount:f})},t)}})]}),m&&m.parsed&&(0,F.jsxs)(B.Z,{style:{color:M.O9.r4,alignItems:"center",marginTop:10},children:[(0,F.jsxs)(X.Z,{style:{maxWidth:450,marginBottom:15},children:[(0,F.jsx)("strong",{children:"Error:"})," ",m.message]}),m.parsed&&(0,F.jsx)(q.Z,{onClick:()=>async function(){const e=await window.Actual.openFileDialog({filters:[{name:"Financial Files",extensions:["qif","ofx","qfx","csv","tsv"]}]});V(e[0],"csv"===rr(e[0])?{delimiter:N}:null)}(),children:"Select new file..."})]}),"csv"===S&&(0,F.jsx)(B.Z,{style:{marginTop:25},children:(0,F.jsx)(mr,{transactions:w,onChange:function(e,t){E({...C,[e]:""===t?null:t})},mappings:C,splitMode:T,hasHeaderRow:W})}),("qif"===S||"csv"===S)&&(0,F.jsx)(B.Z,{style:{marginTop:25},children:(0,F.jsxs)(Q.Z,{direction:"row",align:"flex-start",spacing:1,style:{marginTop:5},children:[(0,F.jsx)(B.Z,{children:("qif"===S||"csv"===S)&&(0,F.jsx)(hr,{transactions:w,fieldMappings:C,parseDateFormat:z,onChange:H})}),"csv"===S&&(0,F.jsxs)(B.Z,{style:{marginLeft:25,gap:5},children:[(0,F.jsx)(J.eX,{title:"CSV OPTIONS"}),(0,F.jsxs)("label",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"baseline"},children:["Delimiter:",(0,F.jsx)(Xn.Z,{options:[[",",","],[";",";"],["\t","tab"]],value:N,onChange:e=>{L(e),V(v,{delimiter:e,hasHeaderRow:W})},style:{borderWidth:1,width:50}})]}),(0,F.jsx)(pr,{id:"form_has_header",checked:W,onChange:()=>{U(!W),V(v,{delimiter:N,hasHeaderRow:!W})},children:"File has header row"})]}),(0,F.jsx)(B.Z,{style:{flex:1}}),(0,F.jsxs)(B.Z,{style:{marginRight:25,gap:5},children:[(0,F.jsx)(J.eX,{title:"AMOUNT OPTIONS"}),(0,F.jsx)(pr,{id:"form_flip",checked:I,disabled:T,onChange:()=>D(!I),children:"Flip amount"}),"csv"===S&&(0,F.jsx)(pr,{id:"form_split",checked:T,onChange:function(){if(null==C)return;!0===I&&D(!I);let e=!T;O(e);let t=ar(w),n=e?{amount:null,outflow:t.amount,inflow:null}:{amount:t.amount,outflow:null,inflow:null};E({...C,...n})},children:"Split amount into separate inflow/outflow columns"}),(0,F.jsx)(gr,{multiplierEnabled:_,multiplierAmount:f,onToggle:()=>{A(!_),h("")},onChangeAmount:function(e){const t=e;t&&!t.match(/^\d{1,}(\.\d{0,4})?$/)||h(t)}})]})]})}),(0,F.jsx)(B.Z,{style:{flexDirection:"row",marginTop:5},children:(0,F.jsx)(B.Z,{style:{alignSelf:"flex-end",flexDirection:"row",alignItems:"center"},children:(0,F.jsxs)(q.y,{type:"primary",disabled:0===w.length,loading:"importing"===p,onClick:async function(){g("importing");let e,t=[];for(let n of w){n=C?lr(n,C):n;let r="qfx"===S||"ofx"===S?n.date:tr(n.date,z);if(null==r){e=`Unable to parse date ${n.date||"(empty)"} with given date format`;break}let{amount:o}=ur(n,T,I,f);if(null==o){e=`Transaction on ${n.date} has no amount`;break}let{inflow:i,outflow:a,...l}=n;t.push({...l,date:r,amount:(0,j.l9)(o)})}if(e)return g(null),void y({parsed:!1,message:e});if("ofx"!==S&&"qfx"!==S){d({[`parse-date-${P}-${S}`]:z})}"csv"===S&&(d({[`csv-mappings-${P}`]:JSON.stringify(C)}),d({[`csv-delimiter-${P}`]:N})),"csv"!==S&&"qif"!==S||d({[`flip-amount-${P}-${S}`]:I});let r=await l(P,t);r&&await c(),R&&R(r),n.onClose()},children:["Import ",w.length," transactions"]})})})]})}class vr extends s.Component{constructor(){super(...arguments),this.state={hoveredBackup:null},this.onHover=e=>{this.setState({hoveredBackup:e})}}render(){const{backups:e,onSelect:t}=this.props,{hoveredBackup:n}=this.state;return(0,F.jsx)(B.Z,{style:{flex:1,maxHeight:200,overflow:"auto"},onMouseLeave:()=>this.onHover(null),children:e.map(((e,r)=>(0,F.jsx)(Jn.X2,{collapsed:0!==r,focused:n===e.id,onMouseEnter:()=>this.onHover(e.id),onClick:()=>t(e.id),style:{cursor:"pointer"},children:(0,F.jsx)(Jn.bL,{width:"flex",value:e.date?e.date:"Revert to Latest",valueStyle:{paddingLeft:20}})},e.id)))})}}var br=function(e){let{budgetId:t,watchUpdates:n,backupDisabled:r,actions:o,modalProps:i}=e,[a,l]=(0,s.useState)([]);(0,s.useEffect)((()=>{(0,_.lW)("backups-get",{id:t}).then(l)}),[t]),(0,s.useEffect)((()=>{if(n)return(0,_.oL)("backups-updated",l),()=>(0,_.Ev)("backups-updated",l)}),[n]);const u=a.find((e=>e.isLatest)),c=a.filter((e=>!e.isLatest));return(0,F.jsx)(G.C,{title:"Load Backup",padding:0,...i,style:{flex:0},children:()=>(0,F.jsxs)(B.Z,{style:{marginBottom:30},children:[(0,F.jsx)(B.Z,{style:{margin:20,marginTop:0,marginBottom:15,lineHeight:1.5},children:u?(0,F.jsxs)(L.Z,{children:[(0,F.jsxs)(L.Z,{style:{marginBottom:10},children:[(0,F.jsx)(X.Z,{style:{fontWeight:600},children:"You are currently working from a backup."})," ","You can load a different backup or revert to the original version below."]}),(0,F.jsx)(q.Z,{type:"primary",onClick:()=>o.loadBackup(t,u.id),children:"Revert to original version"})]}):(0,F.jsxs)(B.Z,{style:{alignItems:"flex-start"},children:[(0,F.jsxs)(L.Z,{style:{marginBottom:10},children:["Select a backup to load. After loading a backup, you will have a chance to revert to the current version in this screen."," ",(0,F.jsx)(X.Z,{style:{fontWeight:600},children:"If you use a backup, you will have to setup all your devices to sync from the new budget."})]}),(0,F.jsx)(q.Z,{type:"primary",disabled:r,onClick:()=>o.makeBackup(),children:"Backup Now"})]})}),0===c.length?(0,F.jsx)(L.Z,{style:{color:M.O9.n6,marginLeft:20},children:"No backups available"}):(0,F.jsx)(vr,{backups:c,onSelect:e=>o.loadBackup(t,e)})]})})},wr=n(14812);function xr(e){let{modalProps:t,payeeId:n}=e,[r,o]=(0,s.useState)(!0),i=(0,Zt.TH)();if((0,wr.Ry)()&&"/payees"!==i.pathname)throw new Error(`Possibly invalid use of ManageRulesModal, add the current url \`${i.pathname}\` to the allowlist if you\u2019re confident the modal can never appear on top of the \`/rules\` page.`);return(0,F.jsx)(G.C,{title:"Rules",padding:0,loading:r,...t,style:[t.style,{flex:1,maxWidth:"90%",maxHeight:"90%"}],children:()=>(0,F.jsx)(tn.Z,{isModal:!0,payeeId:n,setLoading:o})})}let Sr={color:M.O9.p5};function kr(e){let{modalProps:t,payeeIds:n,targetPayeeId:r}=e,{payees:o,modalStack:i}=(0,u.v9)((e=>({payees:e.queries.payees,modalStack:e.modals.modalStack}))),a=!!i.find((e=>"edit-rule"===e.name)),l=(0,u.I0)(),[c,d]=(0,s.useState)(!0),f=(0,s.useRef)(null);(0,s.useEffect)((()=>{if(f.current){let e=f.current,t=e.scrollTop;e.scrollTop=t+1,e.scrollTop=t}}),[f.current,!0]);let[h]=(0,s.useState)((()=>n.map((e=>o.find((t=>t.id===e)))))),p=o.find((e=>e.id===r));if(!p)return null;async function g(){let e;if(await(0,_.lW)("payees-merge",{targetId:p.id,mergeIds:h.map((e=>e.id))}),c&&!a){e=await(0,_.lW)("rule-add-payee-rename",{fromNames:h.map((e=>e.name)),to:p.id})}return t.onClose(),e}async function m(){let e=await g();if(e){let t=await(0,_.lW)("rule-get",{id:e});l((0,bn.OB)("edit-rule",{rule:t}))}}return(0,F.jsx)(G.C,{title:"Merge payee?",padding:0,showHeader:!1,...t,style:t.style,children:()=>(0,F.jsx)(B.Z,{style:{padding:20,maxWidth:500},children:(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(K.Z,{style:{marginBottom:10,fontWeight:500},children:1===h.length?(0,F.jsxs)(F.Fragment,{children:["The payee ",(0,F.jsx)(X.Z,{style:Sr,children:h[0].name})," ","is not used by transactions any more. Would like to merge it with ",(0,F.jsx)(X.Z,{style:Sr,children:p.name}),"?"]}):(0,F.jsxs)(F.Fragment,{children:["The following payees are not used by transactions any more. Would like to merge them with"," ",(0,F.jsx)(X.Z,{style:Sr,children:p.name}),"?",(0,F.jsx)("ul",{ref:f,style:{margin:0,marginTop:10,maxHeight:140,overflow:"auto"},children:h.map((e=>(0,F.jsx)("li",{children:(0,F.jsx)(X.Z,{style:Sr,children:e.name})},e.id)))})]})}),(0,F.jsxs)(Wn,{children:["Merging will remove the payee and transfer any existing rules to the new payee.",!a&&(0,F.jsxs)(F.Fragment,{children:[" ","If checked below, a rule will be created to do this rename while importing transactions."]})]}),!a&&(0,F.jsxs)("label",{style:{fontSize:13,marginTop:10,color:M.O9.n4,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,F.jsx)("input",{type:"checkbox",checked:c,onChange:e=>d(e.target.checked)}),(0,F.jsxs)(X.Z,{style:{marginLeft:3},children:["Automatically rename"," ",1===h.length?"this payee":"these payees"," in the future"]})]}),(0,F.jsxs)(G.Z,{style:{marginTop:20},focusButton:!0,children:[(0,F.jsx)(q.Z,{type:"primary",isSubmit:!1,style:{marginRight:10},onClick:g,children:"Merge"}),!a&&(0,F.jsx)(q.Z,{style:{marginRight:10},onClick:m,children:"Merge and edit rule"}),(0,F.jsx)(q.Z,{style:{marginRight:10},onClick:()=>t.onBack(),children:"Do nothing"})]})]})})})}function Cr(e){return(0,F.jsx)(zn,{style:{alignSelf:"center"},children:"timeout"===e?"Timed out. Please try again.":"An error occurred while linking your account, sorry!"})}function jr(e){let{modalProps:t,onMoveExternal:n,onSuccess:r,onClose:o}=e,[i,a]=(0,s.useState)(null),[l,u]=(0,s.useState)(!1),[c,d]=(0,s.useState)(null),f=(0,s.useRef)(null);async function h(){d(null),a("browser");let e=await n();if(e.error)return d(e.error),void a(null);f.current=e.data,a(null),u(!0)}async function p(){a("accounts"),await r(f.current),a(null)}return(0,F.jsx)(G.C,{title:"Link Your Bank",...t,onClose:function(){null===o||void 0===o||o(),t.onClose()},style:{flex:0},children:()=>(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(K.Z,{style:{fontSize:15},children:"To link your bank account, you will be moved to your browser for enhanced security. Click below and Actual will automatically resume when you have given your bank\u2019s credentials."}),c&&Cr(c),i?(0,F.jsxs)(B.Z,{style:{alignItems:"center",marginTop:15},children:[(0,F.jsx)(N.Z,{color:M.O9.n1,style:{width:20,height:20}}),(0,F.jsx)(B.Z,{style:{marginTop:10,color:M.O9.n4},children:"browser"===i?"Waiting on browser...":"accounts"===i?"Loading accounts...":null})]}):l?(0,F.jsx)(q.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10,backgroundColor:M.O9.g4,borderColor:M.O9.g4},onClick:p,children:"Success! Click to continue \u2192"}):(0,F.jsx)(q.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10},onClick:h,children:"Link bank in browser \u2192"}),(0,F.jsx)("div",{style:{marginTop:i?30:35},children:(0,F.jsx)(X.Z,{style:{color:M.O9.n5,fontWeight:600},children:"Why not link it in the app?"})}),(0,F.jsx)(X.Z,{style:{marginTop:10,color:M.O9.n5,fontSize:13,"& a, & a:visited":{color:M.O9.n5}},children:"Typing your bank\u2019s username and password is one of the most security-sensitive things you can do, and the browser is the most secure app in the world. Why not use it to make sure your information is safe? [TODO: Link to docs article]"}),(0,F.jsx)(G.Z,{style:{marginTop:10},children:(0,F.jsx)(q.Z,{onClick:()=>t.onBack(),children:"Back"})})]})})}const Er={id:"new",name:"Create new account"};function Tr(e){let{modalProps:t,requisitionId:n,externalAccounts:r,localAccounts:o,actions:i}=e;const[a,l]=(0,s.useState)((()=>Object.fromEntries(o.filter((e=>e.account_id)).map((e=>[e.account_id,e.id])))));async function u(){const e=Object.values(a);o.filter((e=>e.account_id)).filter((t=>!e.includes(t.id))).forEach((e=>i.unlinkAccount(e.id))),Object.entries(a).forEach((e=>{let[t,o]=e;const a=r.find((e=>e.account_id===t));a&&i.linkAccount(n,a,o!==Er.id?o:void 0)})),i.closeModal()}const c=o.filter((e=>!Object.values(a).includes(e.id)));function d(e,t){l((n=>{const r={...n};return t?r[e.account_id]=t:delete r[e.account_id],r}))}return(0,F.jsx)(G.C,{title:"Link Accounts",...t,style:{width:800},children:()=>(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(X.Z,{style:{marginBottom:10},children:"We found the following accounts. Select which ones you want to add:"}),(0,F.jsxs)(B.Z,{style:{flex:"unset",height:300,border:"1px solid "+M.O9.Cg},children:[(0,F.jsx)(Jn.xD,{headers:[{name:"Bank Account To Sync",width:200},{name:"Account in Actual",width:"flex"},{name:"Actions",width:"flex"}]}),(0,F.jsx)(Jn.iA,{items:r,style:{backgroundColor:M.O9.S0},getItemKey:e=>e,renderItem:e=>{let{key:t,item:n}=e;return(0,F.jsx)(B.Z,{children:(0,F.jsx)(Or,{externalAccount:n,chosenAccount:a[n.account_id]===Er.id?Er:o.find((e=>a[n.account_id]===e.id)),unlinkedAccounts:c,onSetLinkedAccount:d})},t)}})]}),(0,F.jsx)(B.Z,{style:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},children:(0,F.jsx)(q.Z,{type:"primary",onClick:u,disabled:!Object.keys(a).length,children:"Link accounts"})})]})})}function Or(e){let{externalAccount:t,chosenAccount:n,unlinkedAccounts:r,onSetLinkedAccount:o}=e;const[i,a]=(0,s.useState)(null),l=[...r,(null===n||void 0===n?void 0:n.id)!==Er.id&&n,Er].filter(Boolean);return(0,F.jsxs)(Jn.X2,{style:{backgroundColor:"white"},children:[(0,F.jsx)(Jn.gN,{width:200,children:t.name}),(0,F.jsx)(Jn.gN,{width:"flex",truncate:"account"!==i,onClick:()=>a("account"),children:"account"===i?(0,F.jsx)(Hn.ZP,{focused:!0,strict:!0,highlightFirst:!0,suggestions:l,onSelect:e=>{o(t,e)},inputProps:{onBlur:()=>a(null)},value:null===n||void 0===n?void 0:n.id}):null===n||void 0===n?void 0:n.name}),(0,F.jsx)(Jn.gN,{width:"flex",children:n?(0,F.jsx)(q.Z,{onClick:()=>{o(t,null)},style:{float:"right"},children:"Remove bank-sync"}):(0,F.jsx)(q.Z,{type:"primary",onClick:()=>{a("account")},style:{float:"right"},children:"Setup bank-sync"})})]})}function Ir(){const e=(0,u.v9)((e=>e.modals.modalStack)),t=(0,u.v9)((e=>e.modals.isHidden)),n=(0,u.v9)((e=>e.queries.accounts)),r=(0,u.v9)((e=>e.queries.categories.grouped)),o=(0,u.v9)((e=>e.queries.categories.list)),i=(0,u.v9)((e=>e.prefs.local&&e.prefs.local.id)),a=(0,Z.o)(),l=(0,on.Z)();let c=e.map(((s,u)=>{let{name:c,options:d}=s;const f={onClose:a.popModal,onBack:a.popModal,showBack:u>0,isCurrent:u===e.length-1,isHidden:t,stackIndex:u};switch(c){case"import-transactions":return(0,F.jsx)(yr,{modalProps:f,options:d});case"add-account":return(0,F.jsx)(Sn,{modalProps:f,syncServerStatus:l});case"add-local-account":return(0,F.jsx)(On,{modalProps:f,actions:a});case"close-account":return(0,F.jsx)(yn,{modalProps:f,account:d.account,balance:d.balance,canDelete:d.canDelete,accounts:n.filter((e=>0===e.closed)),categoryGroups:r,actions:a});case"select-linked-accounts":return(0,F.jsx)(Tr,{modalProps:f,externalAccounts:d.accounts,requisitionId:d.requisitionId,localAccounts:n.filter((e=>0===e.closed)),actions:a});case"confirm-category-delete":return(0,F.jsx)(vn,{modalProps:f,category:"category"in d&&o.find((e=>e.id===d.category)),group:"group"in d&&r.find((e=>e.id===d.group)),categoryGroups:r,onDelete:d.onDelete});case"load-backup":return(0,F.jsx)(br,{watchUpdates:!0,budgetId:i,modalProps:f,actions:a,backupDisabled:!1});case"manage-rules":return(0,F.jsx)(xr,{modalProps:f,payeeId:d.payeeId});case"edit-rule":return(0,F.jsx)(Rn.ZP,{modalProps:f,defaultRule:d.rule,onSave:d.onSave});case"merge-unused-payees":return(0,F.jsx)(kr,{modalProps:f,payeeIds:d.payeeIds,targetPayeeId:d.targetPayeeId});case"plaid-external-msg":return(0,F.jsx)(jr,{modalProps:f,onMoveExternal:d.onMoveExternal,onClose:()=>{var e;null===(e=d.onClose)||void 0===e||e.call(d),(0,_.lW)("poll-web-token-stop")},onSuccess:d.onSuccess});case"gocardless-init":return(0,F.jsx)(Kn,{modalProps:f,onSuccess:d.onSuccess});case"gocardless-external-msg":return(0,F.jsx)(Gn,{modalProps:f,onMoveExternal:d.onMoveExternal,onClose:()=>{var e;null===(e=d.onClose)||void 0===e||e.call(d),(0,_.lW)("gocardless-poll-web-token-stop")},onSuccess:d.onSuccess});case"create-encryption-key":return(0,F.jsx)(En,{modalProps:f,actions:a,options:d},c);case"fix-encryption-key":return(0,F.jsx)(Mn,{modalProps:f,actions:a,options:d},c);case"edit-field":return(0,F.jsx)(Pn,{modalProps:f,name:d.name,onSubmit:d.onSubmit},c);case"budget-summary":return(0,F.jsx)(fn,{modalProps:f,month:d.month},c);default:return console.error("Unknown modal:",c),null}})).map(((t,n)=>(0,F.jsx)(s.Fragment,{children:t},e[n].name)));return(0,F.jsx)(F.Fragment,{children:c})}var Dr=n(28091);function _r(e){let{notification:t,onRemove:n}=e,{type:r,title:o,message:i,pre:a,messageActions:l,sticky:u,internal:c,button:d}=t,[f,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(!1);(0,s.useEffect)((()=>{"error"===r&&c&&console.error("Internal error:",c),u||setTimeout(n,6500)}),[]);let m="message"===r,y="error"===r,v=(0,s.useMemo)((()=>function(e,t,n,r){return(0,F.jsx)(Q.Z,{spacing:2,children:e.split(/\n\n/).map(((e,o)=>{let i=e.split(/(\[[^\]]*\]\([^)]*\))/g);return(0,F.jsx)(X.Z,{style:{lineHeight:"1.4em"},children:i.map(((e,o)=>{let i=e.match(/\[([^\]]*)\]\(([^)]*)\)/);if(i){let[e,a,l]=i;if("#"===l[0]){let e=l.slice(1);return(0,F.jsx)(Y.Z,{onClick:async o=>{o.preventDefault(),t[e]&&(n(!0),await t[e](),r())},children:a})}return(0,F.jsx)(V.Z,{to:i[2],children:i[1]},o)}return(0,F.jsx)(X.Z,{children:e},o)}))},o)}))})}(i,l,g,n)),[i,l]);return(0,F.jsxs)(B.Z,{style:{marginTop:10,color:m?M.O9.g3:y?M.O9.r3:M.O9.y2},children:[(0,F.jsxs)(Q.Z,{align:"center",direction:"row",style:{padding:"14px 14px",fontSize:14,backgroundColor:m?M.O9.yv:y?M.O9.Ln:M.O9.Zu,borderTop:`3px solid ${m?M.O9.g5:y?M.O9.r5:M.O9.y4}`,...M.W2.shadowLarge,maxWidth:550,"& a":{color:"currentColor"}},children:[(0,F.jsxs)(Q.Z,{align:"flex-start",children:[o&&(0,F.jsx)(B.Z,{style:{fontWeight:700,marginBottom:10},children:o}),(0,F.jsx)(B.Z,{children:v}),a?a.split("\n\n").map(((e,t)=>(0,F.jsx)(B.Z,{style:{whiteSpace:"pre-wrap",fontFamily:"monospace",fontSize:12,backgroundColor:"rgba(0, 0, 0, .05)",padding:10,borderRadius:4},children:e},t))):null,d&&(0,F.jsx)(q.y,{type:"bare",loading:f,onClick:async()=>{h(!0),await d.action(),n(),h(!1)},style:{backgroundColor:"transparent",border:`1px solid ${m?M.O9.g5:y?M.O9.r4:M.O9.y3}`,color:"currentColor",fontSize:14,flexShrink:0,"&:hover, &:active":{backgroundColor:m?M.O9.g9:y?M.O9.as:M.O9.y9}},children:d.title})]}),u&&(0,F.jsx)(q.Z,{type:"bare",style:{flexShrink:0,color:"currentColor"},onClick:n,children:(0,F.jsx)(Dr.Z,{style:{width:9,height:9,color:"currentColor"}})})]}),p&&(0,F.jsx)(B.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(250, 250, 250, .75)",alignItems:"center",justifyContent:"center"},children:(0,F.jsx)(N.Z,{style:{width:20,height:20,color:"currentColor"}})})]})}function Ar(e){let{style:t}=e,{removeNotification:n}=(0,Z.o)(),r=(0,u.v9)((e=>e.notifications.notifications));return(0,F.jsx)(B.Z,{style:[{position:"fixed",bottom:20,right:13,zIndex:1e4},t],children:r.map((e=>(0,F.jsx)(_r,{notification:e,onRemove:()=>{e.onClose&&e.onClose(),n(e.id)}},e.id)))})}var Zr=n(51678),Pr=n(95058);var Rr=n(89220);var Mr=e=>(0,F.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",style:{color:"inherit",...e.style},children:(0,F.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:3.5,d:"M24 29h5.333M8 29H2.667M16 21l-8 8M16 21l8 8M16 2.667v18.666M16 2.667 8 9.333M16 2.667l8 6.666"})}),Nr=n(62506),Lr=n(38102);let Br=(0,Zr.Z)((e=>(0,j.ZZ)(e)));function Fr(e,t,n){return 1===e?t:n}function Wr(e){let{ruleCount:t,focused:n,onEdit:r,onClick:o}=e;return(0,F.jsx)(Jn.bL,{name:"rule-count",width:"auto",focused:n,style:{padding:"0 10px"},plain:!0,children:(0,F.jsxs)(Jn.Sx,{style:{borderRadius:4,padding:"3px 6px",backgroundColor:M.O9.g9,border:"1px solid "+M.O9.g9,color:M.O9.g1,fontSize:12},onEdit:r,onSelect:o,onFocus:r,children:[(0,F.jsx)(X.Z,{style:{paddingRight:5},children:t>0?(0,F.jsxs)(F.Fragment,{children:[t," associated ",Fr(t,"rule","rules")]}):(0,F.jsx)(F.Fragment,{children:"Create rule"})}),(0,F.jsx)(Nr.Z,{style:{width:8,height:8}})]})})}let Ur=(0,s.memo)((e=>{let{style:t,payee:n,ruleCount:r,categoryGroups:o,selected:i,highlighted:a,hovered:l,editing:s,focusedField:u,onViewRules:c,onCreateRule:d,onHover:f,onEdit:h,onUpdate:p,ruleActions:g}=e,{id:m}=n,y=(0,Pr.YP)(),v=i?M.O9.b8:M.O9.Cg,b=l||"select"===u;return(0,F.jsxs)(Jn.X2,{borderColor:v,backgroundColor:i?M.O9.b9:b?M.O9.Mr:"white",highlighted:a,style:[{alignItems:"stretch"},t,{backgroundColor:l?M.O9.Mr:null},i&&{backgroundColor:M.O9.b9,zIndex:100}],"data-focus-key":n.id,onMouseEnter:()=>f&&f(n.id),children:[(0,F.jsx)(Jn._7,{exposed:null==n.transfer_acct&&(l||i||s),focused:"select"===u,selected:i,onSelect:e=>{y({type:"select",id:n.id,event:e})}}),(0,F.jsx)(Jn.F3,{value:(n.transfer_acct?"Transfer: ":"")+n.name,valueStyle:!i&&n.transfer_acct&&{color:M.O9.n7},exposed:"name"===u,width:"flex",onUpdate:e=>!n.transfer_acct&&p(m,"name",e),onExpose:()=>h(m,"name"),inputProps:{readOnly:!!n.transfer_acct}}),(0,F.jsx)(Wr,{ruleCount:r,focused:"rule-count"===u,onEdit:()=>h(m,"rule-count"),onClick:()=>r>0?c(n.id):d(n.id)})]})}));const zr=(0,s.forwardRef)(((e,t)=>{let{payees:n,ruleCounts:r,navigator:o,categoryGroups:i,highlightedRows:a,ruleActions:l,onUpdate:u,onViewRules:c,onCreateRule:d}=e,[f,h]=(0,s.useState)(null),p=(0,Pr.D9)();(0,s.useLayoutEffect)((()=>{let e=[...p][0];t.current.scrollTo(e,"center"),o.onEdit(e,"select")}),[]);let g=(0,s.useCallback)((e=>{h(e)}),[]);return(0,F.jsx)(B.Z,{style:[{flex:1}],onMouseLeave:()=>h(null),children:(0,F.jsx)(Jn.iA,{ref:t,items:n,navigator:o,renderItem:e=>{let{item:t,editing:n,focusedField:o,onEdit:l}=e;return(0,F.jsx)(Ur,{payee:t,ruleCount:r.get(t.id)||0,categoryGroups:i,selected:p.has(t.id),highlighted:a&&a.has(t.id),editing:n,focusedField:o,hovered:f===t.id,onHover:g,onEdit:l,onUpdate:u,onViewRules:c,onCreateRule:d})}})})}));function Hr(){let e=M.O9.Cg,t=(0,Pr.YP)(),n=(0,Pr.D9)();return(0,F.jsx)(B.Z,{children:(0,F.jsxs)(Jn.xD,{borderColor:e,style:{backgroundColor:"white",color:M.O9.n4,zIndex:200,userSelect:"none"},collapsed:!0,version:"v2",children:[(0,F.jsx)(Jn._7,{exposed:!0,focused:!1,selected:n.size>0,onSelect:e=>t({type:"select-all",event:e})}),(0,F.jsx)(Jn.bL,{value:"Name",width:"flex"})]})})}function Vr(e){let{text:t,style:n}=e;return(0,F.jsx)(B.Z,{style:[{textAlign:"center",color:M.O9.n7,fontStyle:"italic",fontSize:13,marginTop:5},n],children:t})}function $r(e){let{payeesById:t,selectedPayees:n,onDelete:r,onMerge:o,onClose:i}=e,a=[...n].some((e=>null==t[e]||t[e].transfer_acct));return(0,F.jsx)($n.u,{position:"bottom",width:250,style:{padding:0},onClose:i,children:(0,F.jsx)(Vn.Z,{onMenuSelect:e=>{switch(i(),e){case"delete":r();break;case"merge":o()}},footer:(0,F.jsx)(B.Z,{style:{padding:3,fontSize:11,fontStyle:"italic",color:M.O9.n7},children:[...n].slice(0,4).map((e=>t[e].name)).join(", ")+(n.size>4?", and more":"")}),items:[{icon:Dr.Z,name:"delete",text:"Delete",disabled:a},{icon:Mr,iconSize:9,name:"merge",text:"Merge",disabled:a||n.size<2},Vn.Z.line]})})}const qr=(0,s.forwardRef)(((e,t)=>{let{payees:n,ruleCounts:r,orphanedPayees:o,categoryGroups:i,initialSelectedIds:a,ruleActions:l,onBatchChange:u,onViewRules:c,onCreateRule:d,...f}=e,[h,p]=(0,s.useState)(null),[g,m]=(0,s.useState)(""),y=(0,s.useRef)(null),v=(0,s.useRef)(null),b=(0,s.useRef)(!1);const[w,x]=(0,s.useState)(!1);let S=(0,s.useMemo)((()=>{let e=n;return g&&(e=e.filter((e=>e.name.toLowerCase().includes(g.toLowerCase())))),w&&(e=e.filter((e=>o.map((e=>e.id)).includes(e.id)))),e}),[n,g,w]),k=(0,Pr.ZP)("payees",S,a);function C(e){var t;g!==e&&(null===(t=y.current)||void 0===t||t.setRowAnimation(!1),m(e),b.current=!0)}function j(e){C(""),v.current=e}(0,s.useEffect)((()=>{b.current&&(setTimeout((()=>{var e;null===(e=y.current)||void 0===e||e.setRowAnimation(!0)}),0),b.current=!1)})),(0,s.useImperativeHandle)(t,(()=>({selectRows:(e,t)=>{I.onEdit(null),k.dispatch({type:"select-all",ids:e}),p(null),t&&e.length>0&&j(e[0])},highlightRow:e=>{I.onEdit(null),p(new Set([e])),j(e)}}))),(0,s.useEffect)((()=>{h&&p(null)}),[h]),(0,s.useLayoutEffect)((()=>{v.current&&(y.current.scrollTo(v.current),v.current=null)}));let E=function(e){const t=(0,s.useRef)(),n=(0,s.useCallback)((function(){return t.current&&t.current(...arguments)}),[]);return(0,s.useLayoutEffect)((()=>{t.current=e})),n}(((e,t,r)=>{n.find((t=>t.id===e))[t]!==r&&u({updated:[{id:e,[t]:r}]})})),T=(0,s.useCallback)((()=>S.filter((e=>null==e.transfer_acct)).map((e=>e.id))),[S]);let O=0===k.items.size,I=(0,Jn.wz)(S,(e=>["select","name","rule-count"].filter((t=>"select"!==t||null==e.transfer_acct)))),D=Br(n),[_,A]=(0,s.useState)(!1);return(0,F.jsxs)(B.Z,{style:{height:"100%"},children:[(0,F.jsxs)(B.Z,{style:{flexDirection:"row",alignItems:"center",padding:"0 0 15px"},children:[(0,F.jsxs)(B.Z,{style:{flexShrink:0},children:[(0,F.jsxs)(q.Z,{type:"bare",style:{marginRight:10},disabled:O,onClick:()=>A(!0),children:[O?"No payees selected":k.items.size+" "+Fr(k.items.size,"payee","payees"),(0,F.jsx)(Rr.Z,{width:8,height:8,style:{marginLeft:5}})]}),_&&(0,F.jsx)($r,{payeesById:D,selectedPayees:k.items,onClose:()=>A(!1),onDelete:function(){u({deleted:[...k.items].map((e=>({id:e})))}),k.dispatch({type:"select-none"})},onMerge:async function(){let e=[...k.items];await f.onMerge(e),I.onEdit(e[0],"name"),k.dispatch({type:"select-none"}),j(e[0])}})]}),(0,F.jsx)(B.Z,{style:{flexShrink:0},children:(w||o&&o.length>0)&&(0,F.jsx)(q.Z,{type:"bare",style:{marginRight:10},onClick:()=>{x(!w),C(g),I.onEdit(null)},children:w?"Show all payees":"Show "+(1===o.length?"1 unused payee":`${o.length} unused payees`)})}),(0,F.jsx)(B.Z,{style:{flex:1}}),(0,F.jsx)(Lr.Z,{placeholder:"Filter payees...",value:g,onChange:C})]}),(0,F.jsx)(Pr.i5,{instance:k,fetchAllIds:T,children:(0,F.jsxs)(B.Z,{style:{flex:1,border:"1px solid "+M.O9.Cg,borderTopLeftRadius:4,borderTopRightRadius:4,overflow:"hidden"},children:[(0,F.jsx)(Hr,{}),0===S.length?(0,F.jsx)(Vr,{text:"No payees",style:{marginTop:15}}):(0,F.jsx)(zr,{ref:y,payees:S,ruleCounts:r,categoryGroups:i,highlightedRows:h,navigator:I,onUpdate:E,onViewRules:c,onCreateRule:d})]})})]})}));function Yr(e){let{initialSelectedIds:t}=e,n=(0,u.v9)((e=>e.queries.payees)),r=(0,u.v9)((e=>e.app.lastUndoState)),o=(0,u.v9)((e=>e.queries.categories.grouped)),{initiallyLoadPayees:i,getPayees:a,setLastUndoState:l,pushModal:c}=(0,Z.o)(),[d,f]=(0,s.useState)(n),[h,p]=(0,s.useState)({value:new Map}),[g,m]=(0,s.useState)({value:new Map}),y=(0,s.useRef)();async function v(){let e=await(0,_.lW)("payees-get-orphaned");m(e)}async function b(){let e=await(0,_.lW)("payees-get-rule-counts");e=new Map(Object.entries(e)),p({value:e})}async function w(e){let{tables:t,messages:n,meta:r,url:o}=e;(t.includes("payees")||t.includes("payee_mapping"))&&(f(await a()),v(),(r&&r.targetId||n.find((e=>"rules"===e.dataset)))&&b(),l(null))}return(0,s.useEffect)((()=>{!async function(){let e=await i();await new Promise((e=>setTimeout(e,100))),e&&f(e),b(),v()}();let e=(0,_.oL)("sync-event",(async e=>{let{type:t,tables:n}=e;"applied"===t&&n.includes("rules")&&b()}));return()=>{e()}}),[]),(0,s.useEffect)((()=>(r.current&&w(r.current,!0),(0,_.oL)("undo-event",w))),[]),(0,F.jsx)(qr,{ref:y,payees:d,ruleCounts:h.value,orphanedPayees:g,categoryGroups:o,initialSelectedIds:t,lastUndoState:r,onBatchChange:e=>{(0,_.lW)("payees-batch-change",e),f((0,j.zb)(e,d)),m((0,j.zb)(e,g))},onMerge:async e=>{let[t,...n]=e;await(0,_.lW)("payees-merge",{targetId:t,mergeIds:n});let r=g.map((e=>e.id)).includes(t),o=n.filter((e=>g.map((e=>e.id)).includes(e)));r&&o.length!==n.length&&(g=g.filter((e=>e.id!==t))),g=g.filter((e=>!n.includes(e.id)));let i=d.filter((e=>!n.includes(e.id)));n.forEach((e=>{let n=h.value.get(e)||0;h.value.set(t,(h.value.get(t)||0)+n)})),f(i),m(g),p({value:h.value})},onViewRules:function(e){c("manage-rules",{payeeId:e})},onCreateRule:function(e){c("edit-rule",{rule:{stage:null,conditionsOp:"and",conditions:[{field:"payee",op:"is",value:e,type:"id"}],actions:[{op:"set",field:"category",value:null,type:"id"}]}})}})}function Gr(){let e=(0,Zt.TH)();return(0,F.jsx)(nn.T3,{title:"Payees",children:(0,F.jsx)(Yr,{initialSelectedIds:e.state&&e.state.selectedPayee?[e.state.selectedPayee]:null})})}function Kr(){return(0,F.jsx)(B.Z,{style:{flex:1},"data-testid":"reports-page",children:(0,F.jsx)(W,{name:"ReportRouter",message:"Loading reports...",importer:()=>Promise.all([n.e(876),n.e(457),n.e(992)]).then(n.bind(n,48063))})})}let Qr=()=>Promise.all([n.e(876),n.e(281),n.e(447)]).then(n.bind(n,29214)),Xr=()=>Promise.all([n.e(876),n.e(162)]).then(n.bind(n,8821));function Jr(e){let{name:t}=e;return(0,F.jsx)(W,{name:t,importer:Xr})}function eo(e){let{name:t}=e;const{isNarrowWidth:n}=(0,R.F)();return(0,F.jsx)(W,{name:t,importer:n?Qr:Xr})}var to=n(64652);function no(){let e=(0,Zt.TH)(),t=(0,Zt.s0)(),n=e.state&&e.state.payees||[],r=n.length>1;return(0,F.jsxs)(nn.T3,{title:"Post transactions?",modalSize:"small",children:[(0,F.jsxs)(K.Z,{children:[n.length>0?(0,F.jsxs)(X.Z,{children:["The ",r?"payees ":"payee ",n.map(((e,t)=>(0,F.jsxs)(X.Z,{children:[(0,F.jsx)(X.Z,{style:{color:M.O9.p4},children:(0,F.jsx)(to.Z,{id:e,type:"payees"},e)}),t===n.length-1?" ":t===n.length-2?", and ":", "]})))]}):(0,F.jsxs)(X.Z,{children:["There ",r?"are payees ":"is a payee "," that "]}),(0,F.jsxs)(X.Z,{children:[r?"have ":"has "," schedules that are due today. Usually we automatically post transactions for these, but you are offline or syncing failed. In order to avoid duplicate transactions, we let you choose whether or not to create transactions for these schedules."]})]}),(0,F.jsx)(K.Z,{children:"Be aware that other devices may have already created these transactions. If you have multiple devices, make sure you only do this on one device or you will have duplicate transactions."}),(0,F.jsx)(K.Z,{children:"You can always manually post a transaction later for a due schedule by selecting the schedule and clicking \u201cPost transaction\u201d in the action menu."}),(0,F.jsxs)(Q.Z,{direction:"row",justify:"flex-end",style:{marginTop:20},spacing:2,children:[(0,F.jsx)(q.Z,{onClick:function(){t(-1)},children:"Decide later"}),(0,F.jsx)(q.Z,{type:"primary",onClick:async function(){await(0,_.lW)("schedule/force-run-service"),t(-1)},children:"Post transactions"})]})]})}var ro=n(59831);function oo(){let[e,t]=(0,s.useState)("");return(0,s.useEffect)((()=>{(async()=>{t(await $t())})()}),[]),e}var io=oo,ao=n(48099),lo=n(85761),so=n(4340);const uo=e=>{let{primaryAction:t,style:n,children:r}=e;return(0,F.jsxs)(B.Z,{...(0,A.iv)([{backgroundColor:M.O9.n9,alignSelf:"flex-start",alignItems:"flex-start",padding:15,borderRadius:4,border:"1px solid "+M.O9.n8,width:"100%"},n]),children:[(0,F.jsx)(B.Z,{style:{marginBottom:t?10:0,maxWidth:500,lineHeight:1.5,gap:10},children:r}),t||null]})},co=e=>{let{children:t}=e,n=(0,Zt.TH)(),[r,o]=(0,s.useState)("#advanced"===n.hash);return r?(0,F.jsxs)(B.Z,{id:"advanced",style:[{gap:20,alignItems:"flex-start",marginBottom:25,width:"100%"},(0,A.BC)(`(min-width: ${lo.Z.breakpoint_small})`,{width:"auto"})],innerRef:e=>{e&&"#advanced"===n.hash&&e.scrollIntoView(!0)},children:[(0,F.jsx)(B.Z,{style:{fontSize:20,fontWeight:500,flexShrink:0},children:"Advanced Settings"}),t]}):(0,F.jsx)(Y.Z,{id:"advanced",onClick:()=>o(!0),style:{flexShrink:0,alignSelf:"flex-start",color:M.O9.p4,marginBottom:25},children:"Show advanced settings"})};function fo(){const{pushModal:e}=(0,Z.o)(),t=(0,so.o1)(),n=(0,u.v9)((e=>e.prefs.local.encryptKeyId)),r=!(window.crypto&&crypto.subtle);return n?(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.Z,{onClick:function(){e("create-encryption-key",{recreate:!0})},children:"Generate new key"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)(X.Z,{style:{color:M.O9.g4,fontWeight:600},children:"End-to-end Encryption is turned on."})," ","Your data is encrypted with a key that only you have before sending it it out to the cloud. Local data remains unencrypted so if you forget your password you can re-encrypt it."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more\u2026"})]})}):r?(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.Z,{disabled:!0,children:"Enable encryption\u2026"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"End-to-end encryption"})," is not available when making an unencrypted connection to a remote server. You\u2019ll need to enable HTTPS on your server to use end-to-end encryption. This problem may also occur if your browser is too old to work with Actual."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/config/https",children:"Learn more\u2026"})]})}):t?(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.Z,{onClick:()=>e("create-encryption-key"),children:"Enable encryption\u2026"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"End-to-end encryption"})," is not enabled. Any data on the server is still protected by the server password, but it\u2019s not end-to-end encrypted which means the server owners have the ability to read it. If you want, you can use an additional password to encrypt your data on the server."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more\u2026"})]})}):(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.Z,{disabled:!0,children:"Enable encryption\u2026"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"End-to-end encryption"})," is not available when running without a server. Budget files are always kept unencrypted locally, and encryption is only applied when sending data to a server."," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more\u2026"})]})})}function ho(e){let{flag:t,disableToggle:n=!1,error:r,children:o}=e,{savePrefs:i}=(0,Z.o)(),a=(0,ro.Z)(t);return(0,F.jsxs)("label",{style:{display:"flex"},children:[(0,F.jsx)(J.XZ,{checked:a,onChange:()=>{i({[`flags.${t}`]:!a})},disabled:n}),(0,F.jsxs)(B.Z,{style:{color:n?M.O9.n5:"inherit"},children:[o,n&&(0,F.jsx)(X.Z,{style:{color:M.O9.r3,fontWeight:500},children:r})]})]})}function po(){let e=(0,u.v9)((e=>{var t;return null===(t=e.prefs.local)||void 0===t?void 0:t.budgetType})),t=(0,ro.Z)("reportBudget"),n="report"===e&&t;return(0,F.jsx)(ho,{flag:"reportBudget",disableToggle:n,error:"Switch to a rollover budget before turning off this feature",children:"Budget mode toggle"})}function go(){let e=(0,M.Fg)(),t=(0,ro.Z)("themes"),n="light"!==e&&t;return(0,F.jsx)(ho,{flag:"themes",disableToggle:n,error:"Switch to the light theme before turning off this feature",children:"Dark mode"})}function mo(){let[e,t]=(0,s.useState)(!1);return(0,F.jsx)(uo,{primaryAction:e?(0,F.jsxs)(B.Z,{style:{gap:"1em"},children:[(0,F.jsx)(po,{}),(0,F.jsx)(ho,{flag:"goalTemplatesEnabled",children:"Goal templates"}),(0,F.jsx)(ho,{flag:"privacyMode",children:"Privacy mode"}),(0,F.jsx)(go,{})]}):(0,F.jsx)(Y.Z,{onClick:()=>t(!0),style:{flexShrink:0,alignSelf:"flex-start",color:M.O9.p4},children:"I understand the risks, show experimental features"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Experimental features."})," These features are not fully tested and may not work as expected. THEY MAY CAUSE IRRECOVERABLE DATA LOSS. They may do nothing at all. Only enable them if you know what you are doing."]})})}function yo(){let e=(0,u.v9)((e=>e.prefs.local.id)),t=(0,u.v9)((e=>e.prefs.local.encryptKeyId));return(0,F.jsxs)(uo,{primaryAction:(0,F.jsx)(q.Z,{onClick:async function(){let t=await(0,_.lW)("export-budget");window.Actual.saveFile(t,`${(0,In.Z)(new Date,"yyyy-MM-dd")}-${e}.zip`,"Export budget")},children:"Export data"}),children:[(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Export"})," your data as a zip file containing"," ",(0,F.jsx)("code",{children:"db.sqlite"})," and ",(0,F.jsx)("code",{children:"metadata.json"})," files. It can be imported into another Actual instance by closing an open file (if any), then clicking the \u201cImport file\u201d button, then choosing \u201cActual.\u201d"]}),t?(0,F.jsx)(X.Z,{children:"Even though encryption is enabled, the exported zip file will not have any encryption."}):null]})}function vo(e){let{numBlankPayees:t,numCleared:n,numDeleted:r}=e,o="";return 0===t&&0===n&&0===r?o="No split transactions found needing repair.":(t>0&&(o+=`Fixed ${t} splits with a blank payee.`),n>0&&(""!==o&&(o+="\n"),o+=`Fixed ${n} splits with the wrong cleared flag.`),r>0&&(""!==o&&(o+="\n"),o+=`Fixed ${r} splits that weren\u2019t properly deleted.`)),(0,F.jsx)(K.Z,{style:{color:M.O9.g3,marginBottom:0,marginLeft:"1em",textAlign:"right",whiteSpace:"pre-wrap"},children:o})}function bo(){let[e,t]=(0,s.useState)(!1),[n,r]=(0,s.useState)(null);return(0,F.jsxs)(uo,{primaryAction:(0,F.jsxs)(B.Z,{style:{flexDirection:"row",justifyContent:"space-between",maxWidth:500,width:"100%",alignItems:"center"},children:[(0,F.jsx)(q.y,{loading:e,onClick:async function(){t(!0);let e=await(0,_.lW)("tools/fix-split-transactions");r(e),t(!1)},children:"Repair split transactions"}),n&&vo(n)]}),children:[(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Repair split transactions"})," if you are experiencing bugs relating to split transactions and the \u201cReset budget cache\u201d button above does not help, this tool may fix them. Some examples of bugs include seeing blank payees on splits or incorrect account balances. This tool does two things:"]}),(0,F.jsxs)("ul",{style:{margin:0,paddingLeft:"1.5em"},children:[(0,F.jsx)("li",{style:{marginBottom:"0.5em"},children:"Ensures that deleted split transactions are fully deleted. In previous versions of the app, certain split transactions may appear deleted but not all of them are actually deleted. This causes the transactions list to look correct, but certain balances may be incorrect when filtering."}),(0,F.jsx)("li",{children:"Sync the payee and cleared flag of a split transaction to the main or \u201cparent\u201d transaction, if appropriate. The payee will only be set if it currently doesn\u2019t have one."})]})]})}let wo=[{value:"0",label:"Sunday"},{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"}],xo=[{value:"MM/dd/yyyy",label:"MM/DD/YYYY"},{value:"dd/MM/yyyy",label:"DD/MM/YYYY"},{value:"yyyy-MM-dd",label:"YYYY-MM-DD"},{value:"MM.dd.yyyy",label:"MM.DD.YYYY"},{value:"dd.MM.yyyy",label:"DD.MM.YYYY"}];function So(e){let{title:t,children:n}=e;return(0,F.jsxs)(B.Z,{style:{alignItems:"flex-start",flexGrow:1,gap:"0.5em",width:"100%"},children:[(0,F.jsx)(X.Z,{style:{fontWeight:500},children:t}),(0,F.jsx)(B.Z,{style:{alignItems:"flex-start",gap:"1em"},children:n})]})}function ko(){let{savePrefs:e}=(0,Z.o)(),t=(0,Xt.Ap)(),n=(0,u.v9)((e=>e.prefs.local.firstDayOfWeekIdx||"0")),r=(0,u.v9)((e=>e.prefs.local.dateFormat||"MM/dd/yyyy")),o=(0,u.v9)((e=>e.prefs.local.numberFormat||"comma-dot")),i=(0,u.v9)((e=>e.prefs.local.hideFraction));return(0,F.jsx)(uo,{primaryAction:(0,F.jsxs)(B.Z,{style:{flexDirection:"column",gap:"1em",width:"100%",[`@media (min-width: ${t.floating?lo.Z.breakpoint_small:lo.Z.breakpoint_medium})`]:{flexDirection:"row"}},children:[(0,F.jsxs)(So,{title:"Numbers",children:[(0,F.jsx)(q.Z,{bounce:!1,style:{padding:0},children:(0,F.jsx)(Xn.Z,{value:o,onChange:t=>e({numberFormat:t}),options:j.id.map((e=>[e.value,i?e.labelNoFraction:e.label])),style:{padding:"2px 10px",fontSize:15}},String(i))}),(0,F.jsxs)(X.Z,{style:{display:"flex"},children:[(0,F.jsx)(J.XZ,{id:"settings-textDecimal",checked:!!i,onChange:t=>e({hideFraction:t.currentTarget.checked})}),(0,F.jsx)("label",{htmlFor:"settings-textDecimal",children:"Hide decimal places"})]})]}),(0,F.jsx)(So,{title:"Dates",children:(0,F.jsx)(q.Z,{bounce:!1,style:{padding:0},children:(0,F.jsx)(Xn.Z,{value:r,onChange:t=>e({dateFormat:t}),options:xo.map((e=>[e.value,e.label])),style:{padding:"2px 10px",fontSize:15}})})}),(0,F.jsx)(So,{title:"First day of the week",children:(0,F.jsx)(q.Z,{bounce:!1,style:{padding:0},children:(0,F.jsx)(Xn.Z,{value:n,onChange:t=>e({firstDayOfWeekIdx:t}),options:wo.map((e=>[e.value,e.label])),style:{padding:"2px 10px",fontSize:15}})})})]}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Formatting"})," does not affect how budget data is stored, and can be changed at any time."]})})}function Co(){let e=(0,u.v9)((e=>e.prefs.global.documentDir)),{saveGlobalPrefs:t}=(0,Z.o)(),[n,r]=(0,s.useState)(!1),o=(0,s.useRef)(null);return(0,s.useEffect)((()=>{o.current&&o.current.scrollTo(1e4,0)}),[]),(0,F.jsxs)(uo,{primaryAction:(0,F.jsxs)(B.Z,{style:{flexDirection:"row"},children:[(0,F.jsx)(q.Z,{onClick:async function(){let e=await window.Actual.openFileDialog({properties:["openDirectory"]});e&&(t({documentDir:e[0]}),r(!0))},children:"Change location"}),n&&(0,F.jsx)(Wn,{children:"A restart is required for this change to take effect"})]}),children:[(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Actual\u2019s files"})," are stored in a folder on your computer. Currently, that\u2019s:"]}),(0,F.jsx)(X.Z,{innerRef:o,style:{backgroundColor:M.O9.pK,padding:"7px 10px",borderRadius:4,overflow:"auto",whiteSpace:"nowrap","::-webkit-scrollbar":{display:"none"}},children:e})]})}function jo(){let[e,t]=(0,s.useState)(!1);return(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.y,{loading:e,onClick:async function(){t(!0),await(0,_.lW)("reset-budget-cache"),t(!1)},children:"Reset budget cache"}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Reset budget cache"})," will clear all cached values for the budget and recalculate the entire budget. All values in the budget are cached for performance reasons, and if there is a bug in the cache you won\u2019t see correct values. There is no danger in resetting the cache. Hopefully you never have to do this."]})})}function Eo(){let e=(0,u.v9)((e=>!!e.prefs.local.groupId)),{resetSync:t}=(0,Z.o)(),[n,r]=(0,s.useState)(!1);return(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.y,{loading:n,disabled:!e,onClick:async function(){r(!0),await t(),r(!1)},children:"Reset sync"}),children:e?(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Reset sync"})," will remove all local data used to track changes for syncing, and create a fresh sync ID on the server. This file on other devices will have to be re-downloaded to use the new sync ID. Use this if there is a problem with syncing and you want to start fresh."]}):(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Reset sync"})," is only available when syncing is enabled."]})})}function To(){let e=(0,M.Fg)(),{saveGlobalPrefs:t}=(0,Z.o)();return(0,F.jsx)(uo,{primaryAction:(0,F.jsx)(q.Z,{bounce:!1,style:{padding:0},children:(0,F.jsx)(Xn.Z,{onChange:e=>{t({theme:e})},value:e,options:M.Or.map((e=>[e,e]))})}),children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Themes"})," change the user interface colors."]})})}function Oo(){const e=(0,so.Mx)(),t=io(),n=function(){let[e,t]=(0,s.useState)(!1);const n=oo();return(0,s.useEffect)((()=>{(async()=>{t(await qt(n))})()}),[n]),e}();return(0,F.jsxs)(uo,{children:[(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"Actual"})," is a super fast privacy-focused app for managing your finances."]}),(0,F.jsxs)(B.Z,{style:[{flexDirection:"column",gap:10},(0,A.BC)(`(min-width: ${lo.Z.breakpoint_small})`,{display:"grid",gridTemplateRows:"1fr 1fr",gridTemplateColumns:"50% 50%",columnGap:"2em",gridAutoFlow:"column"})],children:[(0,F.jsxs)(X.Z,{children:["Client version: v",window.Actual.ACTUAL_VERSION]}),(0,F.jsxs)(X.Z,{children:["Server version: ",e]}),n?(0,F.jsxs)(V.Z,{to:"https://actualbudget.org/docs/releases",linkColor:"purple",children:["New version available: ",t]}):(0,F.jsx)(X.Z,{style:{color:M.O9.g2,fontWeight:600},children:"You\u2019re up to date!"}),(0,F.jsx)(X.Z,{children:(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/releases",children:"Release Notes"})})]})]})}function Io(e){let{children:t}=e;return(0,F.jsx)(X.Z,{style:{fontWeight:500},children:t})}function Do(){let e=(0,u.v9)((e=>e.prefs.local.id)),t=(0,u.v9)((e=>e.prefs.local.groupId));return(0,F.jsxs)(uo,{children:[(0,F.jsxs)(X.Z,{children:[(0,F.jsx)("strong",{children:"IDs"})," are the names Actual uses to identify your budget internally. There are several different IDs associated with your budget. The Budget ID is used to identify your budget file. The Sync ID is used to access the budget on the server."]}),(0,F.jsxs)(X.Z,{children:[(0,F.jsx)(Io,{children:"Budget ID:"})," ",e]}),(0,F.jsxs)(X.Z,{style:{color:M.O9.n5},children:[(0,F.jsx)(Io,{children:"Sync ID:"})," ",t||"(none)"]})]})}function _o(){let e=(0,u.v9)((e=>e.prefs.global.floatingSidebar)),t=(0,u.v9)((e=>e.prefs.local.budgetName)),{loadPrefs:n,closeBudget:r}=(0,Z.o)();(0,s.useEffect)((()=>{let e=(0,_.oL)("prefs-updated",(()=>{n()}));return n(),()=>e()}),[n]);const{isNarrowWidth:o}=(0,R.F)(),i=(0,ro.Z)("themes");return(0,ao.j)(M.O9.S0),(0,F.jsx)(B.Z,{style:{marginInline:e&&!o?"auto":0},children:(0,F.jsx)(nn.T3,{title:"Settings",titleStyle:o?{backgroundColor:M.O9.S0,color:M.O9.n1}:void 0,children:(0,F.jsxs)(B.Z,{style:{flexShrink:0,gap:30},children:[o&&(0,F.jsxs)(B.Z,{style:{gap:10,flexDirection:"row",alignItems:"flex-end"},children:[(0,F.jsxs)(J.Wi,{children:[(0,F.jsx)(J.lX,{title:"Budget Name"}),(0,F.jsx)(jn.C,{value:t,disabled:!0,style:{color:"#999"}})]}),(0,F.jsx)(q.Z,{onClick:r,children:"Close Budget"})]}),(0,F.jsx)(Oo,{}),!Jt.jU&&(0,F.jsx)(Co,{}),i&&(0,F.jsx)(To,{}),(0,F.jsx)(ko,{}),(0,F.jsx)(fo,{}),(0,F.jsx)(yo,{}),(0,F.jsxs)(co,{children:[(0,F.jsx)(Do,{}),(0,F.jsx)(jo,{}),(0,F.jsx)(Eo,{}),(0,F.jsx)(bo,{}),(0,F.jsx)(mo,{})]})]})})})}var Ao=n(79291);function Zo(e){let{redirectTo:t="/budget",children:n}=e;const{isNarrowWidth:r}=(0,R.F)(),o=(0,Zt.s0)();return(0,s.useEffect)((()=>{r&&o(t)}),[r,o,t]),r?null:n}function Po(e){let{location:t}=e;return(0,F.jsxs)(Zt.Z5,{location:t,children:[(0,F.jsx)(Zt.AW,{path:"/",element:(0,F.jsx)(Zt.Fg,{to:"/budget",replace:!0})}),(0,F.jsx)(Zt.AW,{path:"/reports/*",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Kr,{})})}),(0,F.jsx)(Zt.AW,{path:"/budget",element:(0,F.jsx)(eo,{name:"Budget"})}),(0,F.jsx)(Zt.AW,{path:"/schedules",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"Schedules"})})}),(0,F.jsx)(Zt.AW,{path:"/schedule/edit",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"EditSchedule"})})}),(0,F.jsx)(Zt.AW,{path:"/schedule/edit/:id",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"EditSchedule"})})}),(0,F.jsx)(Zt.AW,{path:"/schedule/link",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"LinkSchedule"})})}),(0,F.jsx)(Zt.AW,{path:"/schedule/discover",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"DiscoverSchedules"})})}),(0,F.jsx)(Zt.AW,{path:"/schedule/posts-offline-notification",element:(0,F.jsx)(no,{})}),(0,F.jsx)(Zt.AW,{path:"/payees",element:(0,F.jsx)(Gr,{})}),(0,F.jsx)(Zt.AW,{path:"/rules",element:(0,F.jsx)(rn,{})}),(0,F.jsx)(Zt.AW,{path:"/settings",element:(0,F.jsx)(_o,{})}),(0,F.jsx)(Zt.AW,{path:"/nordigen/link",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"GoCardlessLink"})})}),(0,F.jsx)(Zt.AW,{path:"/gocardless/link",element:(0,F.jsx)(Zo,{children:(0,F.jsx)(Jr,{name:"GoCardlessLink"})})}),(0,F.jsx)(Zt.AW,{path:"/accounts/:id",element:(0,F.jsx)(eo,{name:"Account"})}),(0,F.jsx)(Zt.AW,{path:"/accounts",element:(0,F.jsx)(eo,{name:"Accounts"})})]})}function Ro(e){let{icon:t,name:n,path:r}=e;return(0,F.jsxs)(Pt.OL,{to:r,style:e=>{let{isActive:t}=e;return{alignItems:"center",color:t?M.rS.sidebarItemAccentSelected:M.rS.sidebarItemText,display:"flex",flexDirection:"column",textDecoration:"none"}},children:[(0,F.jsx)(t,{width:22,height:22,style:{marginBottom:"5px"}}),n]})}function Mo(){const{isNarrowWidth:e}=(0,R.F)();return(0,F.jsxs)("div",{style:{backgroundColor:M.rS.sidebarBackground,borderTop:`1px solid ${M.rS.menuBorder}`,bottom:0,...M.W2.shadow,display:e?"flex":"none",height:"80px",justifyContent:"space-around",paddingTop:10,width:"100%"},children:[(0,F.jsx)(Ro,{name:"Budget",path:"/budget",icon:Ut.Z}),(0,F.jsx)(Ro,{name:"Accounts",path:"/accounts",icon:Wt}),(0,F.jsx)(Ro,{name:"Settings",path:"/settings",icon:Ft.Z})]})}function No(e){let{getAccounts:t}=e,n=(0,Zt.s0)();(0,s.useEffect)((()=>{t().then((e=>{0===e.length&&n("/accounts")}))}),[]);let r=(0,Zt.TH)(),o=(0,Zt.oQ)(r);return(0,s.useEffect)((()=>{Bt.kp("url",o)}),[o]),null}function Lo(){let e=(0,Z.o)();return(0,s.useEffect)((()=>{Rt.Z.setScope("app"),setTimeout((async()=>{await e.sync(),await async function(e,t,n,r,o){let i=await n();await t(i)&&(await r())["flags.updateNotificationShownForVersion"]!==i&&e({type:"message",title:"A new version of Actual is available!",message:`Version ${i} of Actual was recently released.`,sticky:!0,id:"update-notification",button:{title:"Open changelog",action:()=>{window.open("https://actualbudget.org/docs/releases")}},onClose:async()=>{await o({"flags.updateNotificationShownForVersion":i})}})}(e.addNotification,qt,$t,e.loadPrefs,e.savePrefs)}),100)}),[]),(0,F.jsxs)(Pt.VK,{children:[(0,F.jsx)(No,{getAccounts:e.getAccounts}),(0,F.jsx)(zt.Jb,{}),(0,F.jsxs)(B.Z,{style:{height:"100%"},children:[(0,F.jsx)(en,{}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",flex:1},children:[(0,F.jsx)(Xt.ZP,{}),(0,F.jsxs)(B.Z,{style:{color:M.rS.pageText,backgroundColor:M.rS.pageBackground,flex:1,overflow:"hidden",width:"100%"},children:[(0,F.jsx)(Ao.ZP,{style:{WebkitAppRegion:"drag",position:"absolute",top:0,left:0,right:0,zIndex:1e3}}),(0,F.jsxs)("div",{style:{flex:1,display:"flex",overflow:"auto",position:"relative"},children:[(0,F.jsx)(Ar,{}),(0,F.jsx)(Kt,{}),(0,F.jsx)(zt.d7,{render:e=>(0,F.jsx)(Po,{location:e})}),(0,F.jsx)(Ir,{})]}),(0,F.jsxs)(Zt.Z5,{children:[(0,F.jsx)(Zt.AW,{path:"/budget",element:(0,F.jsx)(Mo,{})}),(0,F.jsx)(Zt.AW,{path:"/accounts",element:(0,F.jsx)(Mo,{})}),(0,F.jsx)(Zt.AW,{path:"/settings",element:(0,F.jsx)(Mo,{})}),(0,F.jsx)(Zt.AW,{path:"*",element:null})]})]})]})]})]})}function Bo(){let e=(0,s.useMemo)((()=>(0,F.jsx)(Lo,{})),[]);return(0,F.jsx)(Lt.Y,{children:(0,F.jsx)(Ao.TE,{children:(0,F.jsx)(Xt.Hn,{children:(0,F.jsx)(Qt.j,{children:(0,F.jsx)(Nt.Zr,{children:(0,F.jsx)(Mt.BB,{children:(0,F.jsx)(ut,{backend:At,children:e})})})})})})})}var Fo=n(20356);var Wo=e=>(0,F.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,F.jsx)("path",{d:"M24 11.113a5.765 5.765 0 0 0-5.216-5.952.249.249 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.251.251 0 0 1-.227.2A4.643 4.643 0 0 0 .624 9.774 4.47 4.47 0 0 0 0 12.223a4.293 4.293 0 0 0 1.235 3.1 4.624 4.624 0 0 0 1.78 1.062.963.963 0 0 0 1.243-.86v-.026a.985.985 0 0 0-.658-1.033 2.58 2.58 0 0 1-.96-.572A2.374 2.374 0 0 1 2 12.109a2.588 2.588 0 0 1 2.586-2.588 2.7 2.7 0 0 1 .535.054.989.989 0 0 0 .811-.184 1 1 0 0 0 .392-.779c.085-5.736 8.293-7.372 10.818-2.044a.974.974 0 0 0 .941.57 3.733 3.733 0 0 1 3 1.309 3.888 3.888 0 0 1 .9 2.812 3.428 3.428 0 0 1-1.473 2.667.973.973 0 0 0-.4.964l.01.059a.968.968 0 0 0 1.525.608A5.4 5.4 0 0 0 24 11.113Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M12.231 9.7a6.5 6.5 0 1 0 6.5 6.5 6.508 6.508 0 0 0-6.5-6.5Zm3.124 4.155a.75.75 0 0 1 .15 1.05l-2.905 3.87a1.493 1.493 0 0 1-1.1.6h-.111a1.485 1.485 0 0 1-1.055-.443l-1.5-1.5a.75.75 0 0 1 1.066-1.06l1.3 1.3a.249.249 0 0 0 .376-.026L14.305 14a.751.751 0 0 1 1.05-.149Z",fill:"currentColor"})]});var Uo=e=>(0,F.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,F.jsx)("path",{d:"M24 10.663A5.817 5.817 0 0 0 22.228 6.5a5.711 5.711 0 0 0-3.447-1.585.249.249 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.251.251 0 0 1-.227.2A4.59 4.59 0 0 0 0 11.859a4.324 4.324 0 0 0 1.236 3.21 5.529 5.529 0 0 0 3.605 1.377 1 1 0 0 0 .985-1.015 1.023 1.023 0 0 0-1.015-.985 3.3 3.3 0 0 1-2.172-.8A2.374 2.374 0 0 1 2 11.859a2.576 2.576 0 0 1 .954-2.007 2.6 2.6 0 0 1 2.167-.527 1 1 0 0 0 1.2-.919 5.686 5.686 0 0 1 10.82-2.088.959.959 0 0 0 .941.57 3.687 3.687 0 0 1 2.758 1.049A3.752 3.752 0 0 1 22 10.663a3.835 3.835 0 0 1-3.438 3.791 1 1 0 0 0 .132 1.992.961.961 0 0 0 .131-.009A5.807 5.807 0 0 0 24 10.663Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M15.5 17.446h-1.75a.25.25 0 0 1-.25-.25v-7.25a1.5 1.5 0 1 0-3 0V17.2a.25.25 0 0 1-.25.25H8.5a1 1 0 0 0-.707 1.707l3.5 3.5a1 1 0 0 0 1.414 0l3.5-3.5a1 1 0 0 0-.707-1.707Z",fill:"currentColor"})]});var zo=e=>(0,F.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,F.jsx)("path",{d:"M21.941 3.607 18.87.554A1.912 1.912 0 0 0 17.527 0H8.9A1.9 1.9 0 0 0 7 1.9V5H3.4a1.9 1.9 0 0 0-1.9 1.9v15.21A1.9 1.9 0 0 0 3.4 24h11.7a1.9 1.9 0 0 0 1.9-1.895V19h3.6a1.9 1.9 0 0 0 1.9-1.895V4.949a1.882 1.882 0 0 0-.559-1.342ZM14.5 22H4a.5.5 0 0 1-.5-.5v-14A.5.5 0 0 1 4 7h7.784a.5.5 0 0 1 .35.143L14.85 9.8a.5.5 0 0 1 .15.357V21.5a.5.5 0 0 1-.5.5Zm5.5-5h-2.75a.25.25 0 0 1-.25-.25v-6.8a1.892 1.892 0 0 0-.558-1.341L13.37 5.554A1.9 1.9 0 0 0 12.028 5H9.25A.25.25 0 0 1 9 4.75V2.5a.5.5 0 0 1 .5-.5l7.756-.026a.5.5 0 0 1 .351.143L20.35 4.8a.5.5 0 0 1 .15.357V16.5a.5.5 0 0 1-.5.5Z",fill:"currentColor"})});var Ho=e=>(0,F.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,F.jsx)("path",{d:"M3.566 15.457a1 1 0 0 0-.5-.844 2.248 2.248 0 0 1-.431-.329A2.371 2.371 0 0 1 2 12.5a2.588 2.588 0 0 1 2.585-2.588 2.645 2.645 0 0 1 .536.056A1 1 0 0 0 6.324 9c.081-5.754 8.3-7.363 10.818-2.045a.97.97 0 0 0 .941.571 3.7 3.7 0 0 1 3 1.3 3.874 3.874 0 0 1 .908 2.811 3.428 3.428 0 0 1-1.1 2.375 1.316 1.316 0 0 0-.42 1.089.912.912 0 0 0 1.476.628A5.408 5.408 0 0 0 24 11.418a5.763 5.763 0 0 0-5.22-5.866.25.25 0 0 1-.19-.12 7.685 7.685 0 0 0-14.1 2.3.251.251 0 0 1-.227.2 4.642 4.642 0 0 0-3.643 2.24A4.471 4.471 0 0 0 0 12.619a4.287 4.287 0 0 0 1.235 3.09 4.177 4.177 0 0 0 .852.645 1 1 0 0 0 1.478-.9Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M18.5 15.8a6.5 6.5 0 1 0-6.5 6.5 6.508 6.508 0 0 0 6.5-6.5Zm-7.25 1.25v-.55a1.257 1.257 0 0 1 .986-1.221 1.125 1.125 0 1 0-1.361-1.1.75.75 0 1 1-1.5 0 2.625 2.625 0 1 1 3.538 2.461.25.25 0 0 0-.163.234v.18a.75.75 0 0 1-1.5 0ZM12 18.8a1 1 0 1 1-1 1 1 1 0 0 1 1-1Z",fill:"currentColor"})]});var Vo=e=>(0,F.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,F.jsx)("path",{d:"M23.113 5.954 21.849 4.69l.881-.88a1.914 1.914 0 1 0-2.707-2.71L9.04 12.085a6.014 6.014 0 1 0 2.707 2.707l3.739-3.737.762.762a1.75 1.75 0 1 0 2.475-2.475l-.763-.762 1.416-1.417 1.264 1.263a1.788 1.788 0 0 0 2.473 0 1.751 1.751 0 0 0 0-2.472Zm-16.737 8.5a3 3 0 1 1-3 3 3 3 0 0 1 3-2.998Z",fill:"currentColor"})});var $o=e=>(0,F.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,F.jsx)("path",{d:"M10.664 20.073a1.249 1.249 0 1 0-.507 2.447A10.739 10.739 0 1 0 2.4 16.1a.25.25 0 0 1-.084.3l-1 .726a1 1 0 0 0 .377 1.787l3.946.849a1.062 1.062 0 0 0 .21.022 1 1 0 0 0 .978-.79l.945-4.4a1 1 0 0 0-1.565-1.02l-1.361.989a.25.25 0 0 1-.386-.128 8.255 8.255 0 1 1 6.205 5.643Z",fill:"currentColor"})});function qo(e){return"unknown"===e.state?"This is a cloud-based file but its state is unknown because you are offline.":e.encryptKeyId?e.hasKey?"This file is encrypted and you have key to access it.":"This file is encrypted and you do not have the key for it.":null}function Yo(e){let{onDelete:t,onClose:n}=e;return(0,F.jsx)(Vn.Z,{onMenuSelect:function(e){if(n(),"delete"===e)t()},items:[{name:"delete",text:"Delete"}]})}function Go(e){let{state:t,onDelete:n}=e,[r,o]=(0,s.useState)(!1);return(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(q.Z,{type:"bare",onClick:e=>{e.stopPropagation(),o(!0)},children:(0,F.jsx)(Nn.Z,{style:{width:16,height:16}})}),r&&(0,F.jsx)($n.u,{position:"bottom-right",style:{padding:0},onClose:()=>o(!1),children:(0,F.jsx)(Yo,{state:t,onDelete:n,onClose:()=>o(!1)})})]})}function Ko(e){let t,n,r,{file:o}=e;switch(o.state){case"unknown":t=Ho,n="Network unavailable",r=M.O9.n7;break;case"remote":t=Uo,n="Available for download";break;case"local":case"broken":t=zo,n="Local";break;default:t=Wo,n="Syncing"}return(0,F.jsxs)(B.Z,{style:{color:r,alignItems:"center",flexDirection:"row",marginTop:8},children:[(0,F.jsx)(t,{style:{width:18,height:18,color:"currentColor"}}),(0,F.jsx)(X.Z,{style:{marginLeft:5},children:n})]})}function Qo(e){let{file:t,onSelect:n,onDelete:r}=e,o=(0,s.useRef)(!1);return(0,F.jsxs)(B.Z,{onClick:()=>async function(e){o.current||(o.current=!0,await n(e),o.current=!1)}(t),title:qo(t),style:[{flexDirection:"row",justifyContent:"space-between",alignItems:"center",...M.W2.shadow,margin:10,padding:"12px 15px",backgroundColor:"white",borderRadius:6,flexShrink:0,cursor:"pointer",":hover":{backgroundColor:M.O9.Mr}}],children:[(0,F.jsxs)(B.Z,{style:{alignItems:"flex-start"},children:[(0,F.jsx)(X.Z,{style:[{fontSize:16,fontWeight:700}],children:t.name}),(0,F.jsx)(Ko,{file:t})]}),(0,F.jsxs)(B.Z,{style:{flex:"0 0 auto",flexDirection:"row",alignItems:"center"},children:[t.encryptKeyId&&(0,F.jsx)(Vo,{style:{width:13,height:13,marginRight:8,color:t.hasKey?M.O9.b5:M.O9.n8}}),(0,F.jsx)(Go,{state:t.state,onDelete:()=>r(t)})]})]})}function Xo(e){let{files:t,onSelect:n,onDelete:r}=e;return(0,F.jsx)(B.Z,{style:{flexGrow:1,[`@media (min-width: ${lo.Z.breakpoint_small})`]:{flexGrow:0,maxHeight:310},overflow:"auto","& *":{userSelect:"none"}},children:t.map((e=>(0,F.jsx)(Qo,{file:e,onSelect:n,onDelete:r},e.id||e.cloudFileId)))})}function Jo(e){let{onRefresh:t}=e,[n,r]=(0,s.useState)(!1);let o=n?N.Z:$o;return(0,F.jsx)(q.Z,{type:"bare",style:{padding:10,marginRight:5},onClick:async function(){r(!0),await t(),r(!1)},children:(0,F.jsx)(o,{style:{width:18,height:18}})})}function ei(){let e=(0,u.v9)((e=>e.budgets.allFiles||[])),{getUserData:t,loadAllFiles:n,pushModal:r,loadBudget:o,createBudget:i,downloadBudget:a}=(0,Z.o)();const[l,c]=(0,s.useState)(!1),d=function(){let{testMode:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l||(c(!0),i({testMode:e}))};return(0,F.jsxs)(B.Z,{style:{flex:1,justifyContent:"center",marginInline:-20,marginTop:20,width:"100vw",[`@media (min-width: ${lo.Z.breakpoint_small})`]:{maxWidth:lo.Z.breakpoint_small,width:"100%"}},children:[(0,F.jsxs)(B.Z,{children:[(0,F.jsx)(X.Z,{style:[M.W2.veryLargeText,{margin:20}],children:"Files"}),(0,F.jsx)(B.Z,{style:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",marginRight:5},children:(0,F.jsx)(Jo,{onRefresh:()=>{t(),n()}})})]}),(0,F.jsx)(Xo,{files:e,actions:g,onSelect:e=>{"remote"===e.state?a(e.cloudFileId):o(e.id)},onDelete:e=>r("delete-budget",{file:e})}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",justifyContent:"flex-end",padding:25,paddingLeft:5},children:[(0,F.jsx)(q.Z,{type:"bare",style:{marginLeft:10,color:M.O9.n4},onClick:e=>{e.preventDefault(),r("import")},children:"Import file"}),(0,F.jsx)(q.Z,{type:"primary",onClick:d,style:{marginLeft:15},children:"Create new file"}),(0,wr.Ry)()&&(0,F.jsx)(q.Z,{type:"primary",isSubmit:!1,onClick:()=>d({testMode:!0}),style:{marginLeft:15},children:"Create test file"})]})]})}var ti=n(56740),ni=n(9169);function ri(){let[e,t]=(0,s.useState)(!1),n=(0,Zt.s0)(),r=(0,Zt.TH)(),o=(0,so.q3)();return(0,s.useEffect)((()=>{!async function(){let e=e=>{r.pathname!==e?n(e):t(!0)},i=await(0,_.lW)("get-server-url"),a=await(0,_.lW)("get-did-bootstrap");if(null!=i||a){let t=await(0,_.lW)("subscribe-needs-bootstrap");"error"in t?n("/error",{state:{error:t.error}}):t.bootstrapped?e("/login"):e("/bootstrap")}else{let t=window.location.origin,r=await(0,_.lW)("subscribe-needs-bootstrap",{url:t});if("error"in r||!r.hasServer)return console.log("error"in r&&r.error),void n("/config-server");await o(t,{validate:!1}),r.bootstrapped?e("/login"):e("/bootstrap")}}()}),[r]),{checked:e}}function oi(e){let{text:t}=e;return(0,F.jsx)("h1",{style:{fontSize:40,fontWeight:700,color:M.O9.p3,marginBottom:20},children:t})}const ii=(0,s.forwardRef)(((e,t)=>(0,F.jsx)(jn.C,{...e,style:[{padding:10,fontSize:15,border:"none",...M.W2.shadow,":focus":{border:"none",...M.W2.shadow}},e.style]})));function ai(){(0,ao.j)(M.O9.p5);let e=(0,u.I0)(),t=(0,Zt.s0)(),[n,r]=(0,s.useState)(""),o=(0,so.o1)(),i=(0,so.q3)();(0,s.useEffect)((()=>{r(o)}),[o]);let[a,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(null);async function f(){await i(null),await e((0,ni.Pl)()),t("/")}return(0,F.jsxs)(B.Z,{style:{maxWidth:500,marginTop:-30},children:[(0,F.jsx)(oi,{text:"Where\u2019s the server?"}),(0,F.jsx)(X.Z,{style:{fontSize:16,color:M.O9.n2,lineHeight:1.5},children:o?(0,F.jsx)(F.Fragment,{children:"Existing sessions will be logged out and you will log in to this server. We will validate that Actual is running at this URL."}):(0,F.jsx)(F.Fragment,{children:"There is no server configured. After running the server, specify the URL here to use the app. You can always change this later. We will validate that Actual is running at this URL."})}),c&&(0,F.jsx)(X.Z,{style:{marginTop:20,color:M.O9.r4,borderRadius:4,fontSize:15},children:function(e){return"network-failure"===e?"Server is not running at this URL. Make sure you have HTTPS set up properly.":"Server does not look like an Actual server. Is it set up correctly?"}(c)}),(0,F.jsxs)("form",{style:{display:"flex",flexDirection:"row",marginTop:30},onSubmit:o=>{o.preventDefault(),async function(){if(""===n||a)return;d(null),l(!0);let{error:o}=await i(n);if("network-failure"!==o||n.startsWith("http://")||n.startsWith("https://"))o?(l(!1),d(o)):(l(!1),await e((0,ni.w7)()),t("/"));else{let{error:o}=await i("https://"+n);o?(r("https://"+n),d(o)):(await e((0,ni.w7)()),t("/")),l(!1)}}()},children:[(0,F.jsx)(ii,{autoFocus:!0,placeholder:"https://example.com",value:n||"",onChange:e=>r(e.target.value),style:{flex:1,marginRight:10}}),(0,F.jsx)(q.y,{type:"primary",loading:a,style:{fontSize:15},children:"OK"}),o&&(0,F.jsx)(q.Z,{type:"bare",style:{fontSize:15,marginLeft:10},onClick:()=>t(-1),children:"Cancel"})]}),(0,F.jsx)(B.Z,{style:{flexDirection:"row",flexFlow:"row wrap",justifyContent:"center",marginTop:15},children:o?(0,F.jsx)(q.Z,{type:"bare",style:{color:M.O9.n4},onClick:f,children:"Stop using a server"}):(0,F.jsxs)(F.Fragment,{children:[!(0,wr.d)()&&(0,F.jsxs)(q.Z,{type:"bare",style:{color:M.O9.n4,margin:5,marginRight:15},onClick:function(){r(window.location.origin)},children:["Use ",window.location.origin.replace(/https?:\/\//,"")]}),(0,F.jsx)(q.Z,{type:"bare",style:{color:M.O9.n4,margin:5},onClick:f,children:"Don\u2019t use a server"}),(0,wr.Ry)()&&(0,F.jsx)(q.Z,{type:"primary",style:{marginLeft:15},onClick:async function(){await i(null),await e((0,ti.xp)({testMode:!0})),window.__navigate("/")},children:"Create test file"})]})})]})}function li(e){let{modalProps:t,actions:n,file:r}=e,[o,i]=(0,s.useState)(null);async function a(){i("cloud"),await n.deleteBudget(r.id,r.cloudFileId),i(null),t.onBack()}async function l(){i("local"),await n.deleteBudget(r.id),i(null),t.onBack()}let u=r.cloudFileId&&"broken"!==r.state;return(0,F.jsx)(G.C,{...t,title:"Delete "+r.name,padding:0,showOverlay:!1,onClose:t.onBack,children:()=>(0,F.jsxs)(B.Z,{style:{padding:15,gap:15,paddingTop:0,paddingBottom:25,maxWidth:512,lineHeight:"1.5em"},children:[u&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(X.Z,{children:["This is a ",(0,F.jsx)("strong",{children:"hosted file"})," which means it is stored on your server to make it available for download on any device. You can delete it from the server, which will also remove it from all of your devices."]}),(0,F.jsx)(q.y,{type:"primary",loading:"cloud"===o,style:{backgroundColor:M.O9.r4,alignSelf:"center",border:0,padding:"10px 30px",fontSize:14},onClick:a,children:"Delete file from all devices"})]}),r.id&&(0,F.jsxs)(F.Fragment,{children:[u?(0,F.jsx)(X.Z,{children:"You can also delete just the local copy. This will remove all local data and the file will be listed as available for download."}):(0,F.jsxs)(X.Z,{children:["broken"===r.state?(0,F.jsxs)(F.Fragment,{children:["This is a ",(0,F.jsx)("strong",{children:"hosted file"})," but it was created by another user. You can only delete the local copy."]}):(0,F.jsxs)(F.Fragment,{children:["This a ",(0,F.jsx)("strong",{children:"local file"})," which is not stored on a server."]})," ","Deleting it will remove it and all of its backups permanently."]}),(0,F.jsx)(q.y,{type:u?"normal":"primary",loading:"local"===o,style:[{alignSelf:"center",marginTop:10,padding:"10px 30px",fontSize:14},u?{color:M.O9.r4,borderColor:M.O9.r4}:{border:0,backgroundColor:M.O9.r4}],onClick:l,children:"Delete file locally"})]})]})})}function si(e){return"not-ynab4"===e?"This file is not valid. Please select a .ynab4 file":"An unknown error occurred while importing. Please report this as a new issue on Github."}var ui=function(e){let{modalProps:t,actions:n}=e;const[r]=(0,s.useState)(!1);function o(e){switch(e){case"ynab4":n.pushModal("import-ynab4");break;case"ynab5":n.pushModal("import-ynab5");break;case"actual":n.pushModal("import-actual")}}let i={padding:10,border:"1px solid "+M.O9.Cg,borderRadius:6,marginBottom:10,display:"block"};return(0,F.jsx)(G.C,{...t,title:"Import From",style:{width:400},children:()=>(0,F.jsxs)(B.Z,{style:[M.W2.smallText,{lineHeight:1.5}],children:[r&&(0,F.jsx)(L.Z,{style:{color:M.O9.r4,marginBottom:15},children:si(r)}),(0,F.jsx)(X.Z,{style:{marginBottom:15},children:"Select an app to import from, and we\u2019ll guide you through the process."}),(0,F.jsxs)(q.Z,{style:i,onClick:()=>o("ynab4"),children:[(0,F.jsx)("span",{style:{fontWeight:700},children:"YNAB4"}),(0,F.jsx)(B.Z,{style:{color:M.O9.n5},children:"The old unsupported desktop app"})]}),(0,F.jsxs)(q.Z,{style:i,onClick:()=>o("ynab5"),children:[(0,F.jsx)("span",{style:{fontWeight:700},children:"nYNAB"}),(0,F.jsx)(B.Z,{style:{color:M.O9.n5},children:(0,F.jsx)("div",{children:"The newer web app"})})]}),(0,F.jsxs)(q.Z,{style:i,onClick:()=>o("actual"),children:[(0,F.jsx)("span",{style:{fontWeight:700},children:"Actual"}),(0,F.jsx)(B.Z,{style:{color:M.O9.n5},children:(0,F.jsx)("div",{children:"Import a file exported from Actual"})})]})]})})};function ci(e){switch(e){case"parse-error":return"Unable to parse file. Please select a JSON file exported from nYNAB.";case"not-ynab5":return"This file is not valid. Please select a JSON file exported from nYNAB.";case"not-zip-file":return"This file is not valid. Please select an unencrypted archive of Actual data.";case"invalid-zip-file":return"This archive is not a valid Actual export file.";case"invalid-metadata-file":return"The metadata file in the given archive is corrupted.";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}var di=function(e){let{modalProps:t}=e;const n=(0,u.I0)(),[r,o]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"actual",extensions:["zip","blob"]}]});if(e){a(!0),o(!1);try{await n((0,ti.ef)(e[0],"actual"))}catch(t){o(t.message)}finally{a(!1)}}}return(0,F.jsx)(G.C,{...t,title:"Import from Actual export",style:{width:400},children:()=>(0,F.jsxs)(B.Z,{style:[M.W2.smallText,{lineHeight:1.5,marginTop:20}],children:[r&&(0,F.jsx)(L.Z,{style:{color:M.O9.r4,marginBottom:15},children:ci(r)}),(0,F.jsxs)(B.Z,{style:{"& > div":{lineHeight:"1.7em"}},children:[(0,F.jsxs)(K.Z,{children:["You can import data from another Actual account or instance. First export your data from a different account, and it will give you a compressed file. This file is a simple zip file that contains the"," ",(0,F.jsx)("code",{children:"db.sqlite"})," and ",(0,F.jsx)("code",{children:"metadata.json"})," files."]}),(0,F.jsx)(K.Z,{children:"Select one of these compressed files and import it here."}),(0,F.jsx)(B.Z,{style:{alignSelf:"center"},children:(0,F.jsx)(q.y,{type:"primary",loading:i,onClick:l,children:"Select file..."})})]})]})})};function fi(e){return"not-ynab4"===e?"This file is not valid. Please select a compressed ynab4 zip file.":"An unknown error occurred while importing. Please report this as a new issue on Github."}var hi=function(e){let{modalProps:t}=e;const n=(0,u.I0)(),[r,o]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"ynab",extensions:["zip"]}]});if(e){a(!0),o(!1);try{await n((0,ti.ef)(e[0],"ynab4"))}catch(t){o(t.message)}finally{a(!1)}}}return(0,F.jsx)(G.C,{...t,title:"Import from YNAB4",style:{width:400},children:()=>(0,F.jsxs)(B.Z,{style:[M.W2.smallText,{lineHeight:1.5,marginTop:20}],children:[r&&(0,F.jsx)(L.Z,{style:{color:M.O9.r4,marginBottom:15},children:fi(r)}),(0,F.jsxs)(B.Z,{style:{alignItems:"center"},children:[(0,F.jsxs)(K.Z,{children:["To import data from YNAB4, locate where your YNAB4 data is stored. It is usually in your Documents folder under YNAB. Your data is a directory inside that with the ",(0,F.jsx)("code",{children:".ynab4"})," suffix."]}),(0,F.jsxs)(K.Z,{children:["When you\u2019ve located your data,"," ",(0,F.jsx)("strong",{children:"compress it into a zip file"}),". On macOS, right-click the folder and select \u201cCompress\u201d. On Windows, right-click and select \u201cSend to \u2192 Compressed (zipped) folder\u201d. Upload the zipped folder for importing."]}),(0,F.jsx)(B.Z,{children:(0,F.jsx)(q.y,{type:"primary",loading:i,onClick:l,children:"Select zip file..."})})]})]})})};function pi(e){switch(e){case"parse-error":return"Unable to parse file. Please select a JSON file exported from nYNAB.";case"not-ynab5":return"This file is not valid. Please select a JSON file exported from nYNAB.";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}var gi=function(e){let{modalProps:t}=e;const n=(0,u.I0)(),[r,o]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"ynab",extensions:["json"]}]});if(e){a(!0),o(!1);try{await n((0,ti.ef)(e[0],"ynab5"))}catch(t){o(t.message)}finally{a(!1)}}}return(0,F.jsx)(G.C,{...t,title:"Import from nYNAB",style:{width:400},children:()=>(0,F.jsxs)(B.Z,{style:[M.W2.smallText,{lineHeight:1.5,marginTop:20}],children:[r&&(0,F.jsx)(L.Z,{style:{color:M.O9.r4,marginBottom:15},children:pi(r)}),(0,F.jsxs)(B.Z,{style:{alignItems:"center","& > div":{lineHeight:"1.7em"}},children:[(0,F.jsxs)(K.Z,{children:[(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/migration/nynab",children:"Read here"})," ","for instructions on how to migrate your data from YNAB. You need to export your data as JSON, and that page explains how to do that."]}),(0,F.jsx)(K.Z,{children:"Once you have exported your data, select the file and Actual will import it. Budgets may not match up exactly because things work slightly differently, but you should be able to fix up any problems."}),(0,F.jsx)(B.Z,{children:(0,F.jsx)(q.y,{type:"primary",loading:i,onClick:l,children:"Select file..."})})]})]})})};function mi(){let e=(0,u.v9)((e=>e.modals.modalStack)),t=(0,u.v9)((e=>e.modals.isHidden)),n=(0,Z.o)(),r=e.map(((r,o)=>{let{name:i,options:a}=r;const l={onClose:n.popModal,onPush:n.pushModal,onBack:n.popModal,isCurrent:o===e.length-1,isHidden:t,stackIndex:o};switch(i){case"delete-budget":return(0,F.jsx)(li,{modalProps:l,actions:n,file:a.file},i);case"import":return(0,F.jsx)(ui,{modalProps:l,actions:n},i);case"import-ynab4":return(0,F.jsx)(hi,{modalProps:l,actions:n},i);case"import-ynab5":return(0,F.jsx)(gi,{modalProps:l,actions:n},i);case"import-actual":return(0,F.jsx)(di,{modalProps:l,actions:n},i);case"load-backup":return(0,F.jsx)(br,{budgetId:a.budgetId,modalProps:{...l,onClose:n.popModal},backupDisabled:!0,actions:n});case"create-encryption-key":return(0,F.jsx)(En,{modalProps:l,actions:n,options:a},i);case"fix-encryption-key":return(0,F.jsx)(Mn,{modalProps:l,actions:n,options:a},i);default:throw new Error("Unknown modal: "+i)}}));return(0,F.jsx)(B.Z,{style:{flex:1,padding:50},children:r})}var yi=n(51045);function vi(){const e=(0,so.o1)();return(0,F.jsxs)(B.Z,{style:{position:"absolute",bottom:0,left:0,right:0,justifyContent:"center",flexDirection:"row",marginBottom:15,zIndex:5e3},children:[(0,F.jsx)(X.Z,{children:e?(0,F.jsxs)(F.Fragment,{children:["Using server: ",(0,F.jsx)("strong",{children:e})]}):(0,F.jsx)("strong",{children:"No server configured"})}),(0,F.jsx)(yi.Z,{bare:!0,to:"/config-server",style:{marginLeft:15},children:"Change"})]})}function bi(e){let{buttons:t,onSetPassword:n,onError:r}=e,[o,i]=(0,s.useState)(""),[a,l]=(0,s.useState)(""),[u,c]=(0,s.useState)(!1),[d,f]=(0,s.useState)(!1);async function h(e){e.preventDefault(),d||(o===a?(f(!0),await n(o),f(!1)):r("password-match"))}return(0,F.jsxs)("form",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",marginTop:30},onSubmit:h,children:[(0,F.jsx)(ii,{autoFocus:!0,placeholder:"Password",type:u?"text":"password",value:o,onChange:e=>i(e.target.value),onEnter:h}),(0,F.jsx)(ii,{placeholder:"Confirm password",type:u?"text":"password",value:a,onChange:e=>l(e.target.value),style:{marginTop:10},onEnter:h}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",alignItems:"center",fontSize:15,marginTop:20},children:[(0,F.jsxs)("label",{style:{userSelect:"none"},children:[(0,F.jsx)("input",{type:"checkbox",onChange:function(e){c(e.target.checked)}})," Show password"]}),(0,F.jsx)(B.Z,{style:{flex:1}}),t,(0,F.jsx)(q.y,{type:"primary",loading:d,children:"OK"})]})]})}function wi(){let e=(0,u.I0)(),[t,n]=(0,s.useState)(null),{checked:r}=ri();return r?(0,F.jsxs)(B.Z,{style:{maxWidth:450,marginTop:-30},children:[(0,F.jsx)(oi,{text:"Welcome to Actual!"}),(0,F.jsx)(K.Z,{style:{fontSize:16,color:M.O9.n2},children:"Actual is a super fast privacy-focused app for managing your finances. To secure your data, you\u2019ll need to set a password for your server."}),(0,F.jsxs)(K.Z,{isLast:!0,style:{fontSize:16,color:M.O9.n2},children:["Consider opening"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/tour/",children:"our tour"})," ","in a new tab for some guidance on what to do when you\u2019ve set your password."]}),t&&(0,F.jsx)(X.Z,{style:{marginTop:20,color:M.O9.r4,borderRadius:4,fontSize:15},children:function(e){switch(e){case"invalid-password":return"Password cannot be empty";case"password-match":return"Passwords do not match";case"network-failure":return"Unable to contact the server";default:return`An unknown error occurred: ${e}`}}(t)}),(0,F.jsx)(bi,{buttons:(0,F.jsx)(q.Z,{type:"bare",style:{fontSize:15,color:M.O9.b4,marginRight:15},onClick:async function(){await e((0,ti.xp)({demoMode:!0}))},children:"Try Demo"}),onSetPassword:async function(t){n(null);let{error:r}=await(0,_.lW)("subscribe-bootstrap",{password:t});r?n(r):e((0,ni.Pl)())},onError:n})]}):null}function xi(){let e=(0,Zt.s0)(),[t,n]=(0,s.useState)(null),[r,o]=(0,s.useState)(null);return(0,F.jsxs)(B.Z,{style:{maxWidth:500,marginTop:-30},children:[(0,F.jsx)(oi,{text:"Change server password"}),(0,F.jsx)(X.Z,{style:{fontSize:16,color:M.O9.n2,lineHeight:1.4},children:"This will change the password for this server instance. All existing sessions will stay logged in."}),t&&(0,F.jsx)(X.Z,{style:{marginTop:20,color:M.O9.r4,borderRadius:4,fontSize:15},children:function(e){switch(e){case"invalid-password":return"Password cannot be empty";case"password-match":return"Passwords do not match";case"network-failure":return"Unable to contact the server";default:return"Internal server error"}}(t)}),r&&(0,F.jsx)(X.Z,{style:{marginTop:20,color:M.O9.g4,borderRadius:4,fontSize:15},children:r}),(0,F.jsx)(bi,{buttons:(0,F.jsx)(q.Z,{type:"bare",style:{fontSize:15,marginRight:10},onClick:()=>e("/"),children:"Cancel"}),onSetPassword:async function(t){n(null);let{error:r}=await(0,_.lW)("subscribe-change-password",{password:t});r?n(r):(o("Password successfully changed"),await(0,_.lW)("subscribe-sign-in",{password:t}),e("/"))},onError:n})]})}function Si(){let e=(0,Zt.s0)(),t=(0,Zt.TH)(),{error:n}=t.state||{};return(0,F.jsxs)(B.Z,{style:{alignItems:"center"},children:[(0,F.jsx)(X.Z,{style:{fontSize:16,color:M.O9.n2,lineHeight:1.4},children:(r=n,"network-failure"===r?"Unable to access server. Make sure the configured URL for the server is accessible.":"Server returned an error while checking its status.")}),(0,F.jsx)(q.Z,{onClick:function(){e("/")},style:{marginTop:20},children:"Try again"})]});var r}function ki(){let e=(0,u.I0)(),[t,n]=(0,s.useState)(""),[r,o]=(0,s.useState)(!1),[i,a]=(0,s.useState)(null),{checked:l}=ri();return l?(0,F.jsxs)(B.Z,{style:{maxWidth:450,marginTop:-30},children:[(0,F.jsx)(oi,{text:"Sign in to this Actual instance"}),(0,F.jsx)(X.Z,{style:{fontSize:16,color:M.O9.n2,lineHeight:1.4},children:"If you lost your password, you likely still have access to your server to manually reset it."}),i&&(0,F.jsx)(X.Z,{style:{marginTop:20,color:M.O9.r4,borderRadius:4,fontSize:15},children:function(e){switch(e){case"invalid-password":return"Invalid password";case"network-failure":return"Unable to contact the server";default:return`An unknown error occurred: ${e}`}}(i)}),(0,F.jsxs)("form",{style:{display:"flex",flexDirection:"row",marginTop:30},onSubmit:async function(n){if(n.preventDefault(),""===t||r)return;a(null),o(!0);let{error:i}=await(0,_.lW)("subscribe-sign-in",{password:t});o(!1),i?a(i):e((0,ni.Pl)())},children:[(0,F.jsx)(ii,{autoFocus:!0,placeholder:"Password",type:"password",onChange:e=>n(e.target.value),style:{flex:1,marginRight:10}}),(0,F.jsx)(q.y,{type:"primary",loading:r,style:{fontSize:15},children:"Sign in"})]}),(0,F.jsx)(B.Z,{style:{flexDirection:"row",justifyContent:"center",marginTop:15},children:(0,F.jsx)(q.Z,{type:"bare",style:{fontSize:15,color:M.O9.b4,marginLeft:10},onClick:async function(){await e((0,ti.xp)({demoMode:!0}))},children:"Try Demo \u2192"})})]}):null}function Ci(){let{createBudget:e,pushModal:t}=(0,Z.o)();return(0,F.jsxs)(B.Z,{style:{gap:10,maxWidth:500,fontSize:15,maxHeight:"100vh",marginBlock:20},children:[(0,F.jsx)(X.Z,{style:M.W2.veryLargeText,children:"Let\u2019s get started!"}),(0,F.jsxs)(B.Z,{style:{overflowY:"auto"},children:[(0,F.jsxs)(K.Z,{children:["Actual is a personal finance tool that focuses on beautiful design and a slick user experience."," ",(0,F.jsx)("strong",{children:"Editing your data should be as fast as possible."})," On top of that, we want to provide powerful tools to allow you to do whatever you want with your data."]}),(0,F.jsxs)(K.Z,{children:["Currently, Actual implements budgeting based on a"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/budgeting/",linkColor:"purple",children:"monthly envelope system"}),". Consider taking our"," ",(0,F.jsx)(V.Z,{to:"https://actualbudget.org/docs/tour/",linkColor:"purple",children:"guided tour"})," ","to help you get your bearings, and check out the rest of the documentation while you\u2019re there to learn more about advanced topics."]}),(0,F.jsx)(K.Z,{style:{color:M.O9.n5},children:"Get started by importing an existing budget file from Actual or another budgeting app, or start fresh with an empty budget. You can always create or import another budget later."})]}),(0,F.jsxs)(B.Z,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end",flexShrink:0},children:[(0,F.jsx)(q.Z,{onClick:()=>t("import"),children:"Import my budget"}),(0,F.jsx)(q.Z,{type:"primary",onClick:e,children:"Start fresh"})]})]})}function ji(){const e=(0,so.Mx)();return(0,F.jsx)(X.Z,{style:{color:M.rS.pageTextSubdued,":hover":{color:M.rS.pageText},margin:15,marginLeft:17,[`@media (min-width: ${lo.Z.breakpoint_small})`]:{position:"absolute",bottom:0,right:0,marginLeft:15,marginRight:17,zIndex:5001}},children:`App: v${window.Actual.ACTUAL_VERSION} | Server: ${e}`})}function Ei(e){let{isLoading:t}=e,n=(0,u.v9)((e=>e.budgets.allFiles)),r=(0,u.v9)((e=>e.user.data)),o=(0,u.v9)((e=>e.app.managerHasInitialized)),{setAppState:i,getUserData:a,loadAllFiles:l}=(0,Z.o)();return(0,s.useEffect)((()=>{o||t||i({loadingText:""}),async function(){await a()&&await l(),i({managerHasInitialized:!0,...t?null:{loadingText:null}})}()}),[]),o?t?null:(0,F.jsxs)(Pt.VK,{children:[(0,F.jsx)(zt.Jb,{}),(0,F.jsxs)(B.Z,{style:{height:"100%",color:M.rS.pageText},children:[(0,F.jsx)(B.Z,{style:{position:"absolute",top:0,left:0,right:0,height:40,WebkitAppRegion:"drag"}}),(0,F.jsx)(B.Z,{style:{position:"absolute",bottom:40,right:15},children:(0,F.jsx)(Ar,{style:{position:"relative",left:"initial",right:"initial"}})}),o&&(0,F.jsx)(B.Z,{style:{alignItems:"center",bottom:0,justifyContent:"center",left:0,padding:20,position:"absolute",right:0,top:0},children:r&&n?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Zt.Z5,{children:[(0,F.jsx)(Zt.AW,{path:"/config-server",element:(0,F.jsx)(ai,{})}),(0,F.jsx)(Zt.AW,{path:"/change-password",element:(0,F.jsx)(xi,{})}),n&&n.length>0?(0,F.jsx)(Zt.AW,{path:"/",element:(0,F.jsx)(ei,{})}):(0,F.jsx)(Zt.AW,{path:"/",element:(0,F.jsx)(Ci,{})}),(0,F.jsx)(Zt.AW,{path:"/*",element:(0,F.jsx)(Zt.Fg,{to:"/"})})]}),(0,F.jsx)(B.Z,{style:{position:"absolute",top:0,right:0,padding:"6px 10px",zIndex:4e3},children:(0,F.jsxs)(Zt.Z5,{children:[(0,F.jsx)(Zt.AW,{path:"/config-server",element:null}),(0,F.jsx)(Zt.AW,{path:"/*",element:(0,F.jsx)(Fo.Z,{hideIfNoServer:!0,style:{padding:"4px 7px"}})})]})})]}):(0,F.jsxs)(Zt.Z5,{children:[(0,F.jsx)(Zt.AW,{path:"/login",element:(0,F.jsx)(ki,{})}),(0,F.jsx)(Zt.AW,{path:"/error",element:(0,F.jsx)(Si,{})}),(0,F.jsx)(Zt.AW,{path:"/config-server",element:(0,F.jsx)(ai,{})}),(0,F.jsx)(Zt.AW,{path:"/bootstrap",element:(0,F.jsx)(wi,{})}),(0,F.jsx)(Zt.AW,{path:"/*",element:(0,F.jsx)(Zt.Fg,{to:"/bootstrap",replace:!0})})]})}),(0,F.jsxs)(Zt.Z5,{children:[(0,F.jsx)(Zt.AW,{path:"/config-server",element:null}),(0,F.jsx)(Zt.AW,{path:"/*",element:(0,F.jsx)(vi,{})})]}),(0,F.jsx)(ji,{})]}),(0,F.jsx)(mi,{})]}):null}let Ti={border:0,fontSize:15,padding:"10px 13px"};function Oi(){const e=(0,u.v9)((e=>e.prefs.local&&e.prefs.local.hideMobileMessage||!0)),{isNarrowWidth:t}=(0,R.F)();let[n,r]=(0,s.useState)(t&&!e&&!document.cookie.match(/hideMobileMessage=true/)),[o,i]=(0,s.useState)(!1),a=(0,u.I0)();return n?(0,F.jsxs)(B.Z,{style:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:M.O9.n1,color:"white",padding:10,margin:10,borderRadius:6,zIndex:1e4,fontSize:15,...M.W2.shadowLarge},children:[(0,F.jsxs)(X.Z,{style:{lineHeight:"1.5em"},children:[(0,F.jsx)("strong",{children:"Actual features are limited on small screens."}),(0,F.jsx)("br",{}),(0,F.jsx)("span",{children:"While we work to improve this experience, you may find the full Actual feature set on devices with larger screens."})]}),(0,F.jsxs)(B.Z,{style:{gap:16,marginTop:20,justifyContent:"center"},children:[(0,F.jsx)(q.Z,{style:Ti,onClick:function(){if(r(!1),o)a((0,g.savePrefs)({hideMobileMessage:!0}));else{let e=new Date;e.setTime(e.getTime()+3e5),document.cookie="hideMobileMessage=true;path=/;expires="+e.toGMTString()}},children:"Try it anyway"}),(0,F.jsxs)(B.Z,{style:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},children:[(0,F.jsx)(J.XZ,{id:"dont_remind_me",checked:o,onChange:()=>{i(!o)}}),(0,F.jsx)("label",{htmlFor:"dont_remind_me",style:{userSelect:"none"},children:"Don\u2019t remind me again"})]})]})]}):null}var Ii=e=>(0,F.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,F.jsx)("path",{d:"M10 8.586 2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z",fill:"currentColor"})});function Di(){let e=(0,u.v9)((e=>e.app.updateInfo)),t=(0,u.v9)((e=>e.app.showUpdateNotification)),{updateApp:n,setAppState:r}=(0,Z.o)();if(e&&t){let t=e.releaseNotes;return(0,F.jsxs)(B.Z,{style:{position:"absolute",bottom:0,right:0,margin:"15px 17px",backgroundColor:M.O9.p6,color:"white",padding:"7px 10px",borderRadius:4,zIndex:1e4,maxWidth:450},children:[(0,F.jsxs)(B.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,F.jsx)(B.Z,{style:{marginRight:10,fontWeight:700},children:(0,F.jsxs)(X.Z,{children:["App updated to ",e.version]})}),(0,F.jsx)(B.Z,{style:{flex:1}}),(0,F.jsx)(B.Z,{style:{marginTop:-1},children:(0,F.jsxs)(X.Z,{children:[(0,F.jsx)(Y.Z,{onClick:n,style:{color:"white",textDecoration:"underline"},children:"Restart"})," ","(",(0,F.jsx)(Y.Z,{style:{color:"white",textDecoration:"underline"},onClick:()=>window.Actual.openURLInBrowser("https://actualbudget.org/docs/releases"),children:"notes"}),")",(0,F.jsx)(q.Z,{type:"bare",style:{display:"inline",padding:"1px 7px 2px 7px"},onClick:()=>function(e){e({updateInfo:null,showUpdateNotification:!1})}(r),children:(0,F.jsx)(Ii,{width:9,style:{color:"white"}})})]})})]}),t&&(0,F.jsx)(B.Z,{style:{marginTop:10,fontWeight:500},children:t})]})}return null}class _i extends s.Component{constructor(){super(...arguments),this.state={fatalError:null,initializing:!0,hiddenScrollbars:(0,M.bA)()}}async init(){const e=await n.g.Actual.getServerSocket();try{await(0,_.S1)(e)}catch(r){if("app-init-failure"===r.type)return void this.setState({initializing:!1,fatalError:r});throw r}await this.props.loadGlobalPrefs();const t=await(0,_.lW)("get-last-opened-backup");t&&(await this.props.loadBudget(t),(0,_.lW)("get-remote-files").then((e=>{if(e){let t=e.find((e=>e.fileId===this.props.cloudFileId));t&&t.deleted&&this.props.closeBudget()}})))}async componentDidMount(){await Promise.all([P(),this.init()]),this.setState({initializing:!1});let e=()=>{this.state.hiddenScrollbars!==(0,M.bA)()&&this.setState({hiddenScrollbars:(0,M.bA)()})};window.addEventListener("focus",e),this.cleanup=()=>window.removeEventListener("focus",e)}componentDidCatch(e){this.setState({fatalError:e})}componentDidUpdate(e){this.props.budgetId!==e.budgetId&&n.g.Actual.updateAppMenu(!!this.props.budgetId)}render(){const{budgetId:e,loadingText:t}=this.props,{fatalError:n,initializing:r,hiddenScrollbars:o}=this.state;return(0,F.jsxs)(R.$,{children:[(0,F.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BACKEND_WORKER_HASH:"73a03b9f0217ad62df42"}.REACT_APP_REVIEW_ID&&(0,F.jsx)($,{}),(0,F.jsxs)("div",{...(0,A.iv)([{flexGrow:1,overflow:"hidden"},M.W2.lightScrollbar]),children:[n?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{}),(0,F.jsx)(te,{error:n,buttonText:"Restart app"})]}):r?(0,F.jsx)(H,{initializing:r,loadingText:t}):e?(0,F.jsx)(Bo,{}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{initializing:r,loadingText:t}),(0,F.jsx)(Ei,{isLoading:null!=t})]}),(0,F.jsx)(Di,{}),(0,F.jsx)(Oi,{})]},o?"hidden-scrollbars":"scrollbars")]}),(0,F.jsx)(M.jy,{})]})}}function Ai(){let e=(0,u.v9)((e=>e.prefs.local&&e.prefs.local.id)),t=(0,u.v9)((e=>e.prefs.local&&e.prefs.local.cloudFileId)),n=(0,u.v9)((e=>e.app.loadingText)),{loadBudget:r,closeBudget:o,loadGlobalPrefs:i}=(0,Z.o)();return(0,F.jsx)(_i,{budgetId:e,cloudFileId:t,loadingText:n,loadBudget:r,closeBudget:o,loadGlobalPrefs:i})}n(51503);const Zi=(0,d.UY)(D);const Pi=(0,d.MT)((function(e,t){return t.type===m.DC&&(e={budgets:e.budgets,user:e.user,prefs:{local:null,global:e.prefs.global},app:{...b,updateInfo:e.updateInfo,showUpdateNotification:e.showUpdateNotification,managerHasInitialized:e.app.managerHasInitialized,loadingText:e.app.loadingText}}),Zi(e,t)}),void 0,(0,d.md)(p)),Ri=(0,d.DE)(g,Pi.dispatch);!function(e,t){n.g.Actual.onEventFromMain("update-downloaded",((t,n)=>{e.setAppState({updateInfo:n})})),n.g.Actual.onEventFromMain("update-error",(e=>{})),(0,_.oL)("server-error",(t=>{e.addGenericErrorNotification()})),(0,_.oL)("update-loading-status",(t=>{if("updating"===t)e.updateStatusText("Updating...")})),(0,_.oL)("orphaned-payees",(t=>{let{orphanedIds:n,updatedPayeeIds:r}=t;e.pushModal("merge-unused-payees",{payeeIds:n,targetPayeeId:r[0]})})),(0,_.oL)("schedules-offline",(e=>{let{payees:t}=e,n=window.__pushModal;n&&n("/schedule/posts-offline-notification",{payees:t})})),(0,_.oL)("sync-event",(async n=>{let{type:r,tables:o}=n,i=t.getState().prefs.local;i&&i.id&&"applied"===r&&(o.includes("payees")||o.includes("payee_mapping"))&&e.getPayees()})),(0,_.oL)("sync-event",(async t=>{let{type:n}=t;"unauthorized"===n&&e.addNotification({type:"warning",message:"Unable to authenticate with server",sticky:!0,id:"auth-issue"})})),function(e,t){let n=!1;(0,_.oL)("sync-event",(r=>{let{type:o,subtype:i,meta:a,tables:l}=r,s=t.getState().prefs.local;if(s&&s.id)if("success"===o)n&&(n=!1,e.addNotification({title:"Syncing has been fixed!",message:"Happy budgeting!",type:"message"})),l.includes("prefs")&&e.loadPrefs(),(l.includes("categories")||l.includes("category_groups")||l.includes("category_mapping"))&&e.getCategories(),(l.includes("payees")||l.includes("payee_mapping"))&&e.getPayees(),l.includes("accounts")&&e.getAccounts();else if("error"===o){let o=null,l="[Learn more](https://actualbudget.org/docs/getting-started/sync/#debugging-sync-issues)";const s="https://github.com/actualbudget/actual/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBug%5D%3A+";switch(i){case"out-of-sync":o=n?{title:"Your data is still out of sync",message:"We were unable to repair your sync state, sorry! You need to reset your sync state. "+l,sticky:!0,id:"reset-sync",button:{title:"Reset sync",action:e.resetSync}}:{title:"Your data is out of sync",message:"There was a problem syncing your data. We can try to repair your sync state to fix it. "+l,type:"warning",sticky:!0,id:"repair-sync",button:{title:"Repair",action:async()=>{n=!0,await(0,_.lW)("sync-repair"),e.sync()}}};break;case"file-old-version":o={title:"Actual has updated the syncing format",message:"This happens rarely (if ever again). The internal syncing format has changed and you need to reset sync. This will upload data from this device and revert all other devices. [Learn more about what this means](https://actualbudget.org/docs/getting-started/sync/#what-does-resetting-sync-mean).\n\nOld encryption keys are not migrated. If using encryption, [reset encryption here](#makeKey).",messageActions:{makeKey:()=>e.pushModal("create-encryption-key")},sticky:!0,id:"old-file",button:{title:"Reset sync",action:e.resetSync}};break;case"file-key-mismatch":o={title:"Your encryption key need to be reset",message:"Something went wrong when registering your encryption key id. You need to recreate your key. "+l,sticky:!0,id:"invalid-key-state",button:{title:"Reset key",action:()=>e.pushModal("create-encryption-key")}};break;case"file-not-found":o={title:"This file is not a cloud file",message:"You need to register it to take advantage of syncing which allows you to use it across devices and never worry about losing your data. "+l,type:"warning",sticky:!0,id:"register-file",button:{title:"Register",action:async()=>{await e.uploadBudget(),e.sync(),e.loadPrefs()}}};break;case"file-needs-upload":o={title:"File needs upload",message:"Something went wrong when creating this cloud file. You need to upload this file to fix it. "+l,sticky:!0,id:"upload-file",button:{title:"Upload",action:e.resetSync}};break;case"file-has-reset":case"file-has-new-key":let{cloudFileId:i}=t.getState().prefs.local;o={title:"Syncing has been reset on this cloud file",message:"You need to revert it to continue syncing. Any unsynced data will be lost. If you like, you can instead [upload this file](#upload) to be the latest version. "+l,messageActions:{upload:e.resetSync},sticky:!0,id:"needs-revert",button:{title:"Revert",action:()=>e.closeAndDownloadBudget(i)}};break;case"encrypt-failure":case"decrypt-failure":o=a.isMissingKey?{title:"Missing encryption key",message:"Unable to encrypt your data because you are missing the key. Create your key to sync your data.",sticky:!0,id:"encrypt-failure-missing",button:{title:"Create key",action:()=>e.pushModal("fix-encryption-key",{onSuccess:()=>e.sync()})}}:{message:"Unable to encrypt your data. You have the correct key so this is likely an internal failure. To fix this, reset your sync data with a new key.",sticky:!0,id:"encrypt-failure",button:{title:"Reset key",action:()=>e.pushModal("create-encryption-key",{onSuccess:()=>e.sync()})}};break;case"invalid-schema":console.trace("invalid-schema",a),o={title:"Update required",message:"We couldn\u2019t apply changes from the server. This probably means you need to update the app to support the latest database.",type:"warning"};break;case"apply-failure":console.trace("apply-failure",a),o={message:`We couldn\u2019t apply that change to the database. Please report this as a bug by [opening a Github issue](${s}).`};break;case"network":break;default:console.trace("unkown error",r),o={message:`We had problems syncing your changes. Please report this as a bug by [opening a Github issue](${s}).`}}o&&e.addNotification({type:"error",...o})}}))}(e,t),(0,_.oL)("undo-event",(n=>{let{tables:r,undoTag:o}=n,i=[];(r.includes("categories")||r.includes("category_groups")||r.includes("category_mapping"))&&i.push(e.getCategories()),r.includes("accounts")&&i.push(e.getAccounts());let a=Bt.r8(o);a&&Promise.all(i).then((()=>{if(e.setLastUndoState(n),a.openModal){let{modalStack:n}=t.getState().modals;0!==n.length&&n[n.length-1].name===a.openModal||e.replaceModal(a.openModal)}else if(e.closeModal(),window.location.href.replace(window.location.origin,"")!==a.url)return window.__navigate(a.url),!0}))})),(0,_.oL)("fallback-write-error",(()=>{e.addNotification({type:"error",title:"Unable to save changes",sticky:!0,message:"This browser only supports using the app in one tab at a time, and another tab has opened the app. No changes will be saved from this tab; please close it and continue working in the other one."})})),(0,_.oL)("start-load",(()=>{e.closeBudgetUI(),e.setAppState({loadingText:""})})),(0,_.oL)("finish-load",(()=>{e.closeModal(),e.setAppState({loadingText:null}),e.loadPrefs()})),(0,_.oL)("start-import",(()=>{e.closeBudgetUI(),e.setAppState({loadingText:"Importing..."})})),(0,_.oL)("finish-import",(()=>{e.closeModal(),e.setAppState({loadingText:null}),e.loadPrefs()})),(0,_.oL)("show-budgets",(()=>{e.closeBudgetUI(),e.setAppState({loadingText:null})}))}(Ri,Pi),window.__actionsForMenu=Ri,window.$send=_.lW,window.$query=y.Vn,window.$q=y.ZP;const Mi=document.getElementById("root");(0,c.s)(Mi).render((0,F.jsx)(u.zt,{store:Pi,children:(0,F.jsx)(so.qc,{children:(0,F.jsx)(Ai,{})})}))}()}();
|
|
3
|
+
//# sourceMappingURL=main.f758b66a.js.map
|