dns-worker 1.0.2-3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +662 -0
  2. package/README.md +294 -0
  3. package/dist/serverfull.mjs +11777 -0
  4. package/migrations/0000_init.sql +80 -0
  5. package/migrations/0001_move_lists_to_d1.sql +12 -0
  6. package/migrations/0002_activity_tracking.sql +7 -0
  7. package/migrations/0003_fix_profiles_cascade.sql +21 -0
  8. package/migrations/0004_system_settings.sql +12 -0
  9. package/migrations/0005_add_bloom_storage.sql +3 -0
  10. package/migrations/0006_cleanup_profiles_table.sql +18 -0
  11. package/migrations/0007_user_activity_and_totp.sql +37 -0
  12. package/migrations/0008_add_profile_key.sql +8 -0
  13. package/migrations/0009_add_profile_blooms.sql +5 -0
  14. package/migrations/0010_session_device_info.sql +3 -0
  15. package/migrations/0011_session_created_at.sql +2 -0
  16. package/migrations/0012_profile_bloom_chunks.sql +9 -0
  17. package/migrations/0013_add_session_revoked_to_activity_log.sql +29 -0
  18. package/migrations/0014_add_session_geo.sql +3 -0
  19. package/migrations/0015_add_signup_to_activity_log.sql +30 -0
  20. package/migrations/0016_add_session_rotation_counter.sql +2 -0
  21. package/migrations/0017_add_access_points.sql +31 -0
  22. package/migrations/0018_add_list_updated_at.sql +2 -0
  23. package/migrations/0019_add_list_sync_error.sql +2 -0
  24. package/migrations/0020_add_session_last_active.sql +5 -0
  25. package/migrations/0021_add_user_timezone.sql +2 -0
  26. package/migrations/0022_add_user_locale.sql +2 -0
  27. package/migrations/0023_add_user_password_version.sql +2 -0
  28. package/migrations/0024_session_pin_and_pause.sql +37 -0
  29. package/migrations/0025_add_secret_table.sql +10 -0
  30. package/migrations/0026_session_lock_config.sql +2 -0
  31. package/migrations/0027_add_session_id_to_activity_log.sql +2 -0
  32. package/migrations/0028_rename_session_id_to_session_id_hash.sql +2 -0
  33. package/migrations/0029_profile_blooms_staging.sql +12 -0
  34. package/migrations/0030_add_list_blooms.sql +7 -0
  35. package/migrations/0031_list_blooms_chunks.sql +13 -0
  36. package/migrations/0032_profile_blooms_cascade.sql +40 -0
  37. package/migrations/0033_remove_system_secrets.sql +2 -0
  38. package/migrations/0034_remove_list_entries.sql +2 -0
  39. package/migrations/0035_add_envelope_encryption_columns.sql +5 -0
  40. package/migrations/0036_add_cf_proxy_cidrs_setting.sql +7 -0
  41. package/migrations/0037_optimize_logs_composite_indexes.sql +25 -0
  42. package/migrations/0038_optimize_logs_table_and_indexes.sql +49 -0
  43. package/migrations/0039_add_lists_profile_id_index.sql +5 -0
  44. package/migrations/0040_reduce_logs_indexes_write_cost.sql +9 -0
  45. package/migrations/0041_create_log_hourly_rollups.sql +21 -0
  46. package/migrations/0042_add_rule_created_at.sql +3 -0
  47. package/migrations/0043_create_client_hourly_rollups.sql +26 -0
  48. package/migrations/0044_create_destination_hourly_rollups.sql +29 -0
  49. package/migrations/0045_transform_logs_without_rowid.sql +38 -0
  50. package/migrations/0046_add_passkeys.sql +19 -0
  51. package/migrations/0047_add_passkey_actions_to_activity_log.sql +35 -0
  52. package/migrations/0048_add_recovery_key_rotated_to_activity_log.sql +35 -0
  53. package/migrations/0049_optimize_rollups_and_add_domain_rollups.sql +26 -0
  54. package/migrations/0050_add_dest_columns_to_logs.sql +6 -0
  55. package/migrations/0051_add_registration_enabled_setting.sql +2 -0
  56. package/package.json +71 -0
  57. package/static/assets/AccountView-BvRvODjN.js +4 -0
  58. package/static/assets/AnalyticsView-DQ7hDChh.js +2 -0
  59. package/static/assets/AuthView-Bwv6hbdi.js +2 -0
  60. package/static/assets/DestinationMap-BEQNbcb-.js +1 -0
  61. package/static/assets/FilteringView-BWD3e-DS.js +1 -0
  62. package/static/assets/LogsView-kQy7qTGd.js +5 -0
  63. package/static/assets/QRCodeCanvas-X07w5x_G.js +2 -0
  64. package/static/assets/RulesView-3d5hga0L.js +1 -0
  65. package/static/assets/SettingsView-B9D0kPUF.js +1 -0
  66. package/static/assets/SetupView-D7d-Gsdr.js +1 -0
  67. package/static/assets/SwipeableDrawer-B-MfxTWM.js +1 -0
  68. package/static/assets/TrendChart-B20w7SzD.js +53 -0
  69. package/static/assets/allPaths-BEI3QvIM.js +1 -0
  70. package/static/assets/allPathsLoader-DM2JAMeC.js +1 -0
  71. package/static/assets/browser-icErLjuM.js +1 -0
  72. package/static/assets/date-C4b8kvr-.js +1 -0
  73. package/static/assets/de-DE-CXKS_pep.js +10 -0
  74. package/static/assets/es-ES-B2e3ea35.js +10 -0
  75. package/static/assets/formatCountryName-CSBD8pP8.js +1 -0
  76. package/static/assets/fr-FR-1qQHEpoW.js +10 -0
  77. package/static/assets/getFlagEmoji-_Wxhq0lT.js +1 -0
  78. package/static/assets/index-7FKlsF79.js +16 -0
  79. package/static/assets/index-DdQuGqR5.css +2 -0
  80. package/static/assets/ja-JP-CCVeJXwX.js +10 -0
  81. package/static/assets/ko-KR-bQ1okpC2.js +10 -0
  82. package/static/assets/obex_cat_eye_logo-256-CgYNvUIC.webp +0 -0
  83. package/static/assets/paths-CfqdBnl8.js +1 -0
  84. package/static/assets/paths-cc-gUzxh.js +1 -0
  85. package/static/assets/rolldown-runtime-C4Xdq4VV.js +1 -0
  86. package/static/assets/ru-RU-DeRsms_o.js +10 -0
  87. package/static/assets/services-fIMx5oSx.js +1 -0
  88. package/static/assets/splitPathsBySizeLoader-BgBwSA38.js +1 -0
  89. package/static/assets/vendor-i18next-cO7FDf_e.js +1 -0
  90. package/static/assets/vendor-icons-16-BgwRBCeU.js +1 -0
  91. package/static/assets/vendor-icons-20-X5NPN60g.js +1 -0
  92. package/static/assets/vendor-icons-other-Bme3ywH9.js +2 -0
  93. package/static/assets/vendor-react-Kt98jRfM.js +11 -0
  94. package/static/assets/vendor-ui-core-BpucEp_q.js +1 -0
  95. package/static/assets/vendor-utils-CfYGGC23.js +9 -0
  96. package/static/assets/vi-VN-BcXfqmzH.js +10 -0
  97. package/static/assets/zh-CN-D8YK7j27.js +12 -0
  98. package/static/assets/zh-TW-C2_-uaZk.js +12 -0
  99. package/static/favicon.webp +0 -0
  100. package/static/index.html +27 -0
  101. package/static/manifest.webmanifest +1 -0
  102. package/static/registerSW.js +1 -0
  103. package/static/sw.js +1 -0
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-C4Xdq4VV.js";import{$t as t,Bt as n,Ft as r,Gt as i,Ht as a,It as o,Jt as s,Kt as c,Lt as l,Pt as u,Rt as d,Ut as f,Vt as p,Wt as m,Yt as h,en as g,qt as _,zt as v}from"./vendor-react-Kt98jRfM.js";import{S as y,a as b,b as x,c as ee,d as S,f as C,g as w,h as T,i as E,l as D,m as O,o as te,p as ne,r as k,s as re,u as ie,v as A,y as j}from"./vendor-icons-other-Bme3ywH9.js";const M={CENTER:`center`,END:`end`,LEFT:`left`,RIGHT:`right`,START:`start`},N={ZERO:0,ONE:1,TWO:2,THREE:3,FOUR:4},P={NONE:`none`,PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,DANGER:`danger`},F={BOTTOM:`bottom`,BOTTOM_LEFT:`bottom-left`,BOTTOM_RIGHT:`bottom-right`,LEFT:`left`,LEFT_BOTTOM:`left-bottom`,LEFT_TOP:`left-top`,RIGHT:`right`,RIGHT_BOTTOM:`right-bottom`,RIGHT_TOP:`right-top`,TOP:`top`,TOP_LEFT:`top-left`,TOP_RIGHT:`top-right`};function I(e){return e===F.TOP||e===F.TOP_LEFT||e===F.TOP_RIGHT||e===F.BOTTOM||e===F.BOTTOM_LEFT||e===F.BOTTOM_RIGHT}function L(e){return e===F.TOP||e===F.TOP_LEFT||e===F.TOP_RIGHT?F.TOP:e===F.BOTTOM||e===F.BOTTOM_LEFT||e===F.BOTTOM_RIGHT?F.BOTTOM:e===F.LEFT||e===F.LEFT_TOP||e===F.LEFT_BOTTOM?F.LEFT:F.RIGHT}var R=`bp6`;typeof BLUEPRINT_NAMESPACE<`u`?R=BLUEPRINT_NAMESPACE:typeof REACT_APP_BLUEPRINT_NAMESPACE<`u`&&(R=REACT_APP_BLUEPRINT_NAMESPACE);const z=`${R}-active`,ae=`${R}-align-left`,oe=`${R}-align-right`,B=`${R}-compact`,se=`${R}-dark`,V=`${R}-disabled`,H=`${R}-fill`;`${R}`;const ce=`${R}-fixed-top`,le=`${R}-inline`,ue=`${R}-interactive`,U=`${R}-large`,de=`${R}-loading`,fe=`${R}-minimal`,pe=`${R}-outlined`,me=`${R}-padded`;`${R}`;const he=`${R}-read-only`,ge=`${R}-round`,_e=`${R}-selected`,ve=`${R}-small`,ye=`${R}-vertical`;ar(F.TOP),ar(F.BOTTOM),ar(F.LEFT),ar(F.RIGHT),rr(N.ZERO),rr(N.ONE),rr(N.TWO),rr(N.THREE),rr(N.FOUR),G(P.PRIMARY),G(P.SUCCESS),G(P.WARNING),G(P.DANGER);const be=`${R}-focus-disabled`;`${R}`,`${R}`,`${R}`,`${R}`,`${R}`,`${R}`;const xe=`${R}-text-muted`;`${R}`;const Se=`${R}-text-overflow-ellipsis`,Ce=`${R}-blockquote`,we=`${R}-code`,Te=`${R}-code-block`,Ee=`${R}-heading`,De=`${R}-list`;`${R}`,`${R}`;const Oe=`${R}-alert`,ke=`${Oe}-body`,Ae=`${Oe}-contents`,je=`${Oe}-footer`,Me=`${R}-breadcrumb`;`${Me}`,`${Me}`,`${Me}`;const Ne=`${R}-button`,Pe=`${Ne}-group`,Fe=`${Ne}-spinner`,Ie=`${Ne}-text`,Le=`${R}-callout`,Re=`${Le}-has-body-content`,ze=`${Le}-icon`,Be=`${R}-card`;`${R}`,`${R}`,`${R}`,`${R}`,`${R}`;const Ve=`${R}-collapse`,He=`${Ve}-body`,Ue=`${R}-context-menu`;`${Ue}`,`${Ue}`,`${Ue}`,`${R}`;const We=`${R}-dialog`,Ge=`${We}-container`,Ke=`${We}-header`,qe=`${We}-body`,Je=`${We}-body-scroll-container`,Ye=`${We}-close-button`,Xe=`${We}-footer`,Ze=`${We}-footer-fixed`,Qe=`${We}-footer-main-section`,$e=`${We}-footer-actions`,et=`${R}-dialog-step`;`${et}`,`${et}`,`${et}`,`${et}`;const tt=`${R}-divider`,nt=`${R}-drawer`;`${nt}`,`${nt}`;const rt=`${nt}-header`,it=`${R}-editable-text`;`${it}`,`${it}`,`${it}`,`${it}`;const at=`${R}-entity-title`;`${R}`,`${at}`,`${at}`,`${at}`,`${at}`,`${at}`,`${at}`,`${at}`,`${R}`;const ot=`${R}-html-select`,st=`${R}-html-table`,ct=`${st}-bordered`,lt=`${st}-striped`,ut=`${R}-input`;`${ut}`;const dt=`${ut}-group`,ft=`${ut}-left-container`,pt=`${ut}-action`;`${R}`,`${R}`;const mt=`${R}-control`,ht=`${mt}-input`,gt=`${mt}-indicator`,_t=`${gt}-child`,vt=`${R}-checkbox`,yt=`${R}-radio`;`${R}`;const bt=`${R}-switch`,xt=`${bt}-inner-text`;`${R}`,`${R}`,`${R}`,`${R}`,`${R}`,`${R}`;const St=`${R}-hotkey`;`${St}`,`${St}`,`${St}`;const Ct=`${R}-label`,wt=`${R}-form-group`,Tt=`${R}-form-content`,Et=`${R}-form-helper-text`,Dt=`${R}-form-group-sub-label`,Ot=`${R}-link`;`${Ot}`,`${Ot}`,`${Ot}`,`${Ot}`;const kt=`${R}-menu`,At=`${kt}-item`,jt=`${At}-is-selectable`,Mt=`${At}-selected-icon`,Nt=`${At}-icon`,Pt=`${At}-label`,Ft=`${R}-submenu`,It=`${Ft}-icon`,Lt=`${kt}-divider`,Rt=`${kt}-header`,zt=`${R}-multistep-dialog`;`${zt}`,`${zt}`,`${zt}`,`${zt}`,`${zt}`;const Bt=`${R}-section`,Vt=`${Bt}-collapsed`,Ht=`${Bt}-header`,Ut=`${Ht}-left`,Wt=`${Ht}-title`,Gt=`${Ht}-sub-title`;`${Ht}`,`${Ht}`;const Kt=`${Ht}-right`,qt=`${Ht}-collapse-caret`,Jt=`${Bt}-card`,Yt=`${R}-navbar`,Xt=`${Yt}-group`,Zt=`${Yt}-heading`,Qt=`${Yt}-divider`,$t=`${R}-non-ideal-state`,en=`${$t}-visual`,tn=`${$t}-text`;`${R}`,`${R}`;const nn=`${R}-overlay`,rn=`${nn}-backdrop`,an=`${nn}-container`,on=`${nn}-content`,sn=`${nn}-inline`,cn=`${nn}-open`,ln=`${nn}-scroll-container`,un=`${nn}-start-focus-trap`,dn=`${nn}-end-focus-trap`,fn=`${R}-panel-stack2`;`${fn}`,`${fn}`,`${fn}`;const W=`${R}-popover`,pn=`${W}-arrow`,mn=`${W}-backdrop`,hn=`${W}-capturing-dismiss`,gn=`${W}-content`,_n=`${W}-placement`;`${gn}`;const vn=`${W}-dismiss`,yn=`${vn}-override`,bn=`${W}-match-target-width`,xn=`${W}-open`,Sn=`${W}-popper-escaped`,Cn=`${W}-reference-hidden`,wn=`${W}-target`,Tn=`${W}-transition-container`,En=`${W}-minimal-animation`;`${W}`,`${R}`,`${R}`,`${R}`,`${R}`;const Dn=`${R}-portal`;`${R}`;const On=`${R}-slider`;`${On}`,`${On}`,`${On}`,`${On}`,`${On}`,`${R}`,`${R}`;const kn=`${R}-spinner`,An=`${kn}-animation`,jn=`${kn}-head`,Mn=`${R}-no-spin`,Nn=`${kn}-track`;`${R}`;const Pn=`${R}-tab`,Fn=`${Pn}-icon`,In=`${Pn}-tag`,Ln=`${Pn}-indicator`,Rn=`${Ln}-wrapper`,zn=`${Pn}-list`,Bn=`${Pn}-panel`,Vn=`${Pn}s`,Hn=`${R}-tag`,Un=`${Hn}-remove`,Wn=`${R}-compound-tag`;`${Wn}`,`${Wn}`,`${Wn}`,`${Wn}`;const Gn=`${R}-tag-input`;`${Gn}`,`${Gn}`;const Kn=`${R}-toast`,qn=`${Kn}-container`,Jn=`${Kn}-message`,Yn=`${R}-tooltip`;`${Yn}`,`${R}`;const Xn=`${R}-tree-node`,Zn=`${Xn}-caret`;`${Zn}`,`${Zn}`,`${Zn}`,`${Xn}`,`${Xn}`,`${Xn}`,`${Xn}`,`${Xn}`,`${Xn}`,`${Xn}`,`${R}`;const Qn=`${R}-icon`,$n=`${Qn}-standard`,er=`${Qn}-large`,tr=`${Qn}-muted`;function nr(e){switch(e){case M.LEFT:case M.START:return ae;case M.RIGHT:case M.END:return oe;default:return}}function rr(e){if(e!==void 0)return`${R}-elevation-${e}`}function ir(e){if(e!=null)return e.indexOf(`${R}-icon-`)===0?e:`${R}-icon-${e}`}function G(e){if(!(e==null||e===P.NONE))return`${R}-intent-${e.toLowerCase()}`}function ar(e){if(e!==void 0)return`${R}-position-${e}`}function or(e,t){if(e===`small`)return ve;if(e===`large`)return U;let{large:n=!1,small:r=!1}=t;return{[U]:n,[ve]:r}}function sr(e,t){if(e===`outlined`)return pe;if(e===`minimal`)return fe;let{minimal:n=!1,outlined:r=!1}=t;return{[fe]:n,[pe]:r}}var cr=class{container;className;isRunning=!1;constructor(e,t){this.container=e,this.className=t}isActive(){return this.isRunning}start(){this.container.addEventListener(`mousedown`,this.handleMouseDown),this.isRunning=!0}stop(){this.reset(),this.isRunning=!1}reset(){this.container.classList.remove(this.className),this.container.removeEventListener(`keydown`,this.handleKeyDown),this.container.removeEventListener(`mousedown`,this.handleMouseDown)}handleKeyDown=e=>{e.key===`Tab`&&(this.reset(),this.container.addEventListener(`mousedown`,this.handleMouseDown))};handleMouseDown=()=>{this.reset(),this.container.classList.add(this.className),this.container.addEventListener(`keydown`,this.handleKeyDown)}},lr=typeof document<`u`?new cr(document.documentElement,be):{isActive:()=>!0,start:()=>!0,stop:()=>!0};const ur={alwaysShowFocus:()=>lr.stop(),isActive:()=>lr.isActive(),onlyShowFocusOnTabs:()=>lr.start()};function dr(e,t,n=(e,t)=>e===t){return e==null&&t==null?!0:e==null||t==null||e.length!==t.length?!1:e.every((e,r)=>n(e,t[r]))}function fr(e,t,n){if(e==null&&t==null)return!0;if(e==null||t==null||Array.isArray(e)||Array.isArray(t))return!1;if(n!=null)return pr(e,t,n);{let n=Object.keys(e),r=Object.keys(t);return pr(e,t,{include:n})&&pr(e,t,{include:r})}}function pr(e,t,n){return mr(e,t,n).every(n=>e.hasOwnProperty(n)===t.hasOwnProperty(n)&&e[n]===t[n])}function mr(e,t,n){if(hr(n))return n.include;if(gr(n)){let r=Object.keys(e),i=Object.keys(t),a=_r(r.concat(i));return n.exclude.forEach(e=>delete a[e]),Object.keys(a)}return[]}function hr(e){return e!=null&&e.include!=null}function gr(e){return e!=null&&e.exclude!=null}function _r(e){return e.reduce((e,t)=>(e[t]=!0,e),{})}function vr(){return typeof window<`u`&&window.document!=null}function yr(e,t){return e===t||e.contains(t)}function br(e){if(e==null||e.closest==null)return!1;let t=e.closest(`input, textarea, [contenteditable=true]`);if(t==null)return!1;if(t.tagName.toLowerCase()===`input`){let e=t.type;if(e===`checkbox`||e===`radio`)return!1}return!t.readOnly}function xr(e,t){let n=(e?.getRootNode(t)??document).activeElement;return n instanceof HTMLElement?n:null}function Sr(e){return t=>{e.some(e=>t.key===e)&&(br(t.target)||t.preventDefault(),t.target.dispatchEvent(new MouseEvent(`click`,{...t,view:void 0})))}}var Cr=[`a[href]:not([tabindex="-1"])`,`button:not([disabled]):not([tabindex="-1"])`,`details:not([tabindex="-1"])`,`input:not([disabled]):not([tabindex="-1"])`,`select:not([disabled]):not([tabindex="-1"])`,`textarea:not([disabled]):not([tabindex="-1"])`,`[tabindex]:not([tabindex="-1"])`].join(`,`);function wr(e){return Array.from(e.querySelectorAll(Cr))}function Tr(e){return typeof e==`function`}var Er=`[Blueprint]`;const Dr=`${Er} <Popover> requires renderTarget prop or a child element.`,Or=`${Er} <Popover hasBackdrop={true}> requires interactionKind="click".`,kr=`${Er} <Popover> supports only one child which is rendered as its target; additional children are ignored.`,Ar=`[Blueprint] <Dialog> iconName is ignored if title is omitted.`,jr=`[Blueprint] <Dialog> isCloseButtonShown prop is ignored if title is omitted.`;var K=e(y());function Mr(e){return typeof NODE_ENV<`u`&&NODE_ENV===e}function Nr(e,t,n){if(e==null)return e;if(n<t)throw Error(`[Blueprint] clamp: max cannot be less than min`);return Math.min(Math.max(e,t),n)}var Pr=new Map;function Fr(e){let t=Pr.get(e)??0;return Pr.set(e,t+1),`${e}-${t}`}function Ir(e){return typeof e==`string`&&e.trim().length===0}const q=`Blueprint6`;var Lr=`active.alignText.asyncControl.containerRef.current.elementRef.ellipsizeText.endIcon.fill.icon.iconSize.inputClassName.inputRef.intent.inline.large.loading.leftElement.leftIcon.minimal.onRemove.outlined.panel.panelClassName.popoverProps.rightElement.rightIcon.round.selectedValue.size.small.tagName.text.textClassName.variant`.split(`.`);function Rr(e,t=Lr,n=!1){return n&&(t=t.concat(Lr)),t.reduce((e,t)=>(t.indexOf(`-`)===-1&&e.hasOwnProperty(t)&&delete e[t],e),{...e})}function zr(e,t=!1){return e==null||e===``||e===!1||!t&&Array.isArray(e)&&(e.length===0||e.every(e=>zr(e,!0)))}function Br(e,t=`span`,n={}){if(!(e==null||typeof e==`boolean`||Ir(e)))return typeof e==`string`||typeof e==`number`||Hr(e)||Ur(e)?(0,K.createElement)(t,n,e):Vr(e)?Object.keys(n).length>0?(0,K.cloneElement)(e,n):e:void 0}function Vr(e){return typeof e==`object`&&e.type!==void 0&&e.props!==void 0}function Hr(e){return typeof e.type==`symbol`}function Ur(e){return Array.isArray(e)}function Wr(e,t){return e!=null&&e.type!=null&&e.type.displayName!=null&&e.type.displayName===t.displayName}var Gr=`${q}.Icon.`;function Kr(e){if(!(0,K.isValidElement)(e))return!1;let{type:t}=e;if(typeof t==`string`)return!1;let{displayName:n}=t;return typeof n==`string`&&n.startsWith(Gr)}function qr(e){return e.key===`Enter`||e.key===` `}function Jr(e,t,n){if(t.includes(e.key))return-1;if(n.includes(e.key))return 1}function Yr(e){return e!=null&&typeof e!=`function`}function Xr(e){return typeof e==`function`}function Zr(e,t){Yr(e)?e.current=t:Xr(e)&&e(t)}function Qr(...e){return t=>{e.forEach(e=>{Zr(e,t)})}}function J(e){return e===null?null:e.current===void 0?e:e.current}var $r=class extends K.PureComponent{componentWillUpdate;componentWillReceiveProps;componentWillMount;getDerivedStateFromProps;displayName;timeoutIds=[];requestIds=[];constructor(e){super(e),Mr(`production`)||this.validateProps(this.props)}componentDidUpdate(e,t,n){Mr(`production`)||this.validateProps(this.props)}componentWillUnmount(){this.clearTimeouts(),this.cancelAnimationFrames()}requestAnimationFrame(e){let t=window.requestAnimationFrame(e);return this.requestIds.push(t),()=>window.cancelAnimationFrame(t)}setTimeout(e,t){let n=window.setTimeout(e,t);return this.timeoutIds.push(n),()=>window.clearTimeout(n)}clearTimeouts=()=>{if(this.timeoutIds.length>0){for(let e of this.timeoutIds)window.clearTimeout(e);this.timeoutIds=[]}};cancelAnimationFrames=()=>{if(this.requestIds.length>0){for(let e of this.requestIds)window.cancelAnimationFrame(e);this.requestIds=[]}};validateProps(e){}};function ei(e,t=[]){(0,K.useEffect)(()=>{Mr(`production`)||e()},t)}var ti={defaultTabIndex:void 0,disabledTabIndex:-1};function ni(e,t,n,r=ti){let{defaultTabIndex:i,disabledTabIndex:a}=r,{active:o,onClick:s,onFocus:c,onKeyDown:l,onKeyUp:u,onBlur:d,tabIndex:f=i}=t,[p,m]=(0,K.useState)(),[h,g]=(0,K.useState)(!1),_=(0,K.useRef)(null),v=(0,K.useCallback)(e=>{h&&g(!1),d?.(e)},[h,d]),y=(0,K.useCallback)(e=>{qr(e)&&(e.preventDefault(),e.key!==p&&g(!0)),m(e.key),l?.(e)},[p,l]),b=(0,K.useCallback)(e=>{qr(e)&&(g(!1),_.current?.click()),m(void 0),u?.(e)},[u,_]);return[e&&(o||h),{onBlur:v,onClick:e?s:void 0,onFocus:e?c:void 0,onKeyDown:y,onKeyUp:b,ref:Qr(_,n),tabIndex:e?f:a}]}var Y=e(x()),ri=e(j());const X=(0,K.forwardRef)((e,t)=>{let{autoLoad:n=!0,className:r,color:i,icon:a,intent:o,tagName:s=`span`,svgProps:c,title:l,htmlTitle:u,...d}=e,f=e.size??A.STANDARD,[p,m]=(0,K.useState)(()=>typeof a==`string`?w.getPaths(a,f):void 0);if((0,K.useEffect)(()=>{let e=!1;if(typeof a==`string`){let t=w.getPaths(a,f);t===void 0?n?w.load(a,f).then(()=>{e||m(w.getPaths(a,f))}).catch(e=>{console.error(`[Blueprint] Icon '${a}' (${f}px) could not be loaded.`,e)}):console.error(`[Blueprint] Icon '${a}' (${f}px) is not loaded yet and autoLoad={false}, did you call Icons.load('${a}', ${f})?`):m(t)}return()=>{e=!0}},[n,a,f]),a==null||typeof a==`boolean`)return null;if(typeof a!=`string`){if((0,K.isValidElement)(a)){let t=(0,ri.default)(a.props.className,r,G(o));if(Kr(a)){let n={...Rr(d),className:t},r=a.props.size??e.size;r!=null&&(n.size=r);let o=a.props.color??i;return o!=null&&(n.color=o),(0,K.cloneElement)(a,n)}return(0,K.cloneElement)(a,{className:t})}return a}if(p==null){let e=f===A.STANDARD?$n:f===A.LARGE?er:void 0;return(0,K.createElement)(s||`span`,{"aria-hidden":l?void 0:!0,...Rr(d),className:(0,ri.default)(Qn,e,ir(a),G(o),r),"data-icon":a,ref:t,title:u})}else return(0,Y.jsx)(T,{children:p.map((e,t)=>(0,Y.jsx)(`path`,{d:e,fillRule:`evenodd`},t)),className:(0,ri.default)(G(o),r),color:i,htmlTitle:u,iconName:a,ref:t,size:f,svgProps:c,tagName:s,title:l,...Rr(d)})});X.displayName=`${q}.Icon`;var ii=e(j()),ai;(function(e){e[e.SMALL=20]=`SMALL`,e[e.STANDARD=50]=`STANDARD`,e[e.LARGE=100]=`LARGE`})(ai||={});var oi=45,si=`M 50,50 m 0,-${oi} a ${oi},${oi} 0 1 1 0,${oi*2} a ${oi},${oi} 0 1 1 0,-${oi*2}`,ci=280,li=10,ui=4,di=16;const fi=e=>{let{className:t=``,intent:n,value:r,tagName:i=`div`,size:a,...o}=e;ei(()=>{let e=a!=null,n=t.indexOf(ve)>=0||t.indexOf(U)>=0;e&&n&&console.warn(`[Blueprint] <Spinner> Classes.SMALL/LARGE are ignored if size prop is set.`)},[t,a]);let s=pi(a,t),c=Math.min(di,ui*ai.LARGE/s),l=ci-ci*(r==null?.25:Nr(r,0,1)),u=(0,ii.default)(kn,G(n),{[Mn]:r!=null},t);return(0,K.createElement)(i,{"aria-label":`loading`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r===void 0?void 0:r*100,className:u,role:`progressbar`,...o},(0,K.createElement)(i,{className:An},(0,Y.jsxs)(`svg`,{width:s,height:s,strokeWidth:c.toFixed(2),viewBox:mi(c),children:[(0,Y.jsx)(`path`,{className:Nn,d:si}),(0,Y.jsx)(`path`,{className:jn,d:si,pathLength:ci,strokeDasharray:`${ci} ${ci}`,strokeDashoffset:l})]})))};fi.displayName=`${q}.Spinner`;var pi=(e,t)=>e==null?t.indexOf(ve)>=0?ai.SMALL:t.indexOf(U)>=0?ai.LARGE:ai.STANDARD:Math.max(li,e),mi=e=>{let t=oi+e/2,n=(50-t).toFixed(2),r=(t*2).toFixed(2);return`${n} ${n} ${r} ${r}`};const hi=vr()?K.useLayoutEffect:K.useEffect;var gi=e(j());const _i=(0,K.forwardRef)(({children:e,tagName:t=`div`,title:n,className:r,ellipsize:i=!1,...a},o)=>{let s=(0,K.useRef)(),c=(0,K.useMemo)(()=>Qr(s,o),[o]),[l,u]=(0,K.useState)(``),[d,f]=(0,K.useState)();return hi(()=>{s.current?.textContent!=null&&(f(i&&s.current.scrollWidth>s.current.clientWidth),u(s.current.textContent))},[s,e,i]),(0,K.createElement)(t,{...a,className:(0,gi.default)({[Se]:i},r),ref:c,title:n??(d?l:void 0)},e)});_i.displayName=`${q}.Text`;var vi=e(j());const yi=(0,K.forwardRef)((e,t)=>{let n=xi(e,t);return(0,Y.jsx)(`button`,{type:`button`,...Rr(e),...n,children:Si(e)})});yi.displayName=`${q}.Button`;const bi=(0,K.forwardRef)((e,t)=>{let{href:n}=e,r=xi(e,t,{defaultTabIndex:0,disabledTabIndex:-1});return(0,Y.jsx)(`a`,{role:`button`,...Rr(e),...r,"aria-disabled":r.disabled,href:r.disabled?void 0:n,children:Si(e)})});bi.displayName=`${q}.AnchorButton`;function xi(e,t,n){let{alignText:r,fill:i,large:a,loading:o=!1,minimal:s,outlined:c,size:l=`medium`,small:u,variant:d=`solid`}=e,f=e.disabled||o,[p,m]=ni(!f,e,t,n),h=(0,vi.default)(Ne,{[z]:p,[V]:f,[H]:i,[de]:o},nr(r),G(e.intent),or(l,{large:a,small:u}),sr(d,{minimal:s,outlined:c}),e.className);return{...m,className:h,disabled:f}}function Si(e){let{children:t,ellipsizeText:n,endIcon:r,icon:i,loading:a,rightIcon:o,text:s,textClassName:c}=e,l=!zr(s)||!zr(t);return(0,Y.jsxs)(Y.Fragment,{children:[a&&(0,Y.jsx)(fi,{className:Fe,size:ai.SMALL}),(0,Y.jsx)(X,{icon:i}),l&&(0,Y.jsxs)(_i,{className:(0,vi.default)(Ie,c),ellipsize:n,tagName:`span`,children:[s,t]}),(0,Y.jsx)(X,{icon:r??o})]})}var Ci=e(j());function Z(e,t){return(0,K.forwardRef)((n,r)=>{let{className:i,children:a,...o}=n;return(0,K.createElement)(e,{...o,className:(0,Ci.default)(t,i),ref:r},a)})}Z(`h1`,Ee);const wi=Z(`h2`,Ee),Ti=Z(`h3`,Ee),Ei=Z(`h4`,Ee),Di=Z(`h5`,Ee),Oi=Z(`h6`,Ee);Z(`blockquote`,Ce),Z(`code`,we),Z(`pre`,Te),Z(`label`,Ct),Z(`ol`,De),Z(`ul`,De);const ki=(0,K.createContext)({hasProvider:!1,stack:{current:[]}}),Ai=({children:e})=>{let t=(0,K.useRef)([]),n=(0,K.useMemo)(()=>({hasProvider:!0,stack:t}),[t]);return(0,Y.jsx)(ki.Provider,{value:n,children:e})};var ji=[],Mi=[];const Ni=e=>{e(ji),Mi.forEach(e=>e())};var Pi={getSnapshot:()=>ji,subscribe:e=>(Mi.push(e),()=>{let t=Mi.indexOf(e);Mi.splice(t,1)})};function Fi(){let e=(0,K.useSyncExternalStore)(Pi.subscribe,Pi.getSnapshot,Pi.getSnapshot),t=(0,K.useCallback)(()=>e[e.length-1],[e]),n=(0,K.useCallback)(t=>{let n=e.findIndex(e=>e.id===t);return e.slice(n)},[e]),r=(0,K.useCallback)(()=>{Ni(e=>e.splice(0,e.length))},[]),i=(0,K.useCallback)(e=>{ji.push(e),e.props.usePortal&&e.props.hasBackdrop&&document.body.classList.add(cn)},[]);return{closeOverlay:(0,K.useCallback)(t=>{let n=e.filter(e=>e.props.usePortal&&e.props.hasBackdrop&&e.id!==t),r=ji.findIndex(e=>e.id===t);r>-1&&ji.splice(r,1),n.length===0&&document.body.classList.remove(cn)},[e]),getLastOpened:t,getThisOverlayAndDescendants:n,openOverlay:i,resetStack:r}}function Ii(){let{stack:e,hasProvider:t}=(0,K.useContext)(ki),n=Fi(),r=(0,K.useCallback)(()=>e.current[e.current.length-1],[e]),i=(0,K.useCallback)(t=>{let n=e.current.findIndex(e=>e.id===t);return n===-1?[]:e.current.slice(n)},[e]),a=(0,K.useCallback)(()=>{e.current=[]},[e]),o=(0,K.useCallback)(t=>{e.current.push(t),t.props.usePortal&&t.props.hasBackdrop&&document.body.classList.add(cn)},[e]),s=(0,K.useCallback)(t=>{let n=e.current.filter(e=>e.props.usePortal&&e.props.hasBackdrop&&e.id!==t),r=e.current.findIndex(e=>e.id===t);r>-1&&e.current.splice(r,1),n.length===0&&document.body.classList.remove(cn)},[e]);return t?{closeOverlay:s,getLastOpened:r,getThisOverlayAndDescendants:i,openOverlay:o,resetStack:a}:(Mr(`development`)&&console.error(`[Blueprint] <Overlay2> was used outside of a <OverlaysProvider> context. This will no longer be supported in Blueprint v6. See https://github.com/palantir/blueprint/wiki/Overlay2-migration`),n)}function Li(e){let t=(0,K.useRef)();return(0,K.useEffect)(()=>{t.current=e},[e]),t.current}function Ri(e){let t=J(e);return(t==null?[]:wr(t)).filter(e=>!e.classList.contains(un)&&!e.classList.contains(dn))}const zi=(0,K.createContext)({});var Bi=g();function Vi({className:e,stopPropagationEvents:t,container:n,onChildrenMount:r,children:i}){let a=(0,K.useContext)(zi),o=n??a.portalContainer??(typeof document<`u`?document.body:void 0),[s,c]=(0,K.useState)(),l=(0,K.useCallback)(()=>{let n=document.createElement(`div`);return n.classList.add(Dn),Ui(n.classList,e),Ui(n.classList,a.portalClassName),Wi(n,t),n},[e,a.portalClassName,t]);return(0,K.useEffect)(()=>{if(o==null)return;let e=l();return o.appendChild(e),c(e),()=>{Gi(e,t),e.remove(),c(void 0)}},[o,l,t]),(0,K.useEffect)(()=>{s!=null&&r?.()},[s,r]),(0,K.useEffect)(()=>{if(s!=null)return Ui(s.classList,e),()=>Hi(s.classList,e)},[e,s]),(0,K.useEffect)(()=>{if(s!=null)return Wi(s,t),()=>Gi(s,t)},[s,t]),typeof document>`u`||s==null?null:(0,Bi.createPortal)(i,s)}Vi.displayName=`${q}.Portal`;function Hi(e,t){t!=null&&t!==``&&e.remove(...t.split(` `))}function Ui(e,t){t!=null&&t!==``&&e.add(...t.split(` `))}function Wi(e,t){t?.forEach(t=>e.addEventListener(t,Ki))}function Gi(e,t){t?.forEach(t=>e.removeEventListener(t,Ki))}function Ki(e){e.stopPropagation()}var qi=e(j());const Ji=(0,K.forwardRef)((e,t)=>{let{autoFocus:n=!0,backdropClassName:r,backdropProps:i={},canEscapeKeyClose:a=!0,canOutsideClickClose:o=!0,childRef:c,childRefs:l,children:u,className:d,enforceFocus:f=!0,hasBackdrop:p=!0,isOpen:m=!1,lazy:g=vr(),onClose:_,onClosed:v,onClosing:y,onOpened:b,onOpening:x,portalClassName:ee,portalContainer:S,shouldReturnFocusOnClose:C=!0,transitionDuration:w=300,transitionName:T=nn,usePortal:E=!0}=e;Yi(e);let{closeOverlay:D,getLastOpened:O,getThisOverlayAndDescendants:te,openOverlay:ne}=Ii(),[k,re]=(0,K.useState)(!1),[ie,A]=(0,K.useState)(!1),[j,M]=(0,K.useState)(!1),N=(0,K.useRef)(null),P=(0,K.useRef)(null),F=(0,K.useRef)(null),I=(0,K.useRef)(null),L=(0,K.useRef)(null),R=(0,K.useRef)(null),z=(0,K.useCallback)(e=>requestAnimationFrame(()=>{let t=e??J(P),n=xr(t);t==null||n==null||t.contains(n)||(J(I)?.focus({preventScroll:!0}),re(!1))}),[]),ae=(0,K.useCallback)(e=>{e!=null&&j&&(M(!1),re(!0),z(e))},[z,j]),oe=(0,K.useMemo)(()=>Qr(P,ae),[ae]),B=Xi(),se=(0,K.useRef)(null),V=(0,K.useCallback)(e=>{let t=e.composed?e.composedPath()[0]:e.target,n=J(P);n!=null&&t instanceof Node&&!n.contains(t)&&(e.preventDefault(),e.stopImmediatePropagation(),z())},[z]),H=(0,K.useCallback)(e=>{let t=e.composed?e.composedPath()[0]:e.target;te(B).some(({containerElement:e})=>{let n=J(e);return n?.contains(t)&&!n.isSameNode(t)})||_?.(e)},[te,B,_]),ce=(0,K.useCallback)(e=>{e.key===`Escape`&&a&&O()?.id===B&&(_?.(e),e.stopPropagation(),e.preventDefault())},[a,O,B,_]);(0,K.useImperativeHandle)((0,K.useMemo)(()=>Qr(t,se),[t]),()=>({bringFocusInsideOverlay:z,containerElement:P,handleDocumentFocus:V,handleDocumentMousedown:H,id:B,props:{autoFocus:n,enforceFocus:f,hasBackdrop:p,usePortal:E}}),[n,z,f,V,H,p,B,E]);let le=(0,K.useCallback)(e=>{e.key===`Escape`&&a&&(_?.(e),e.stopPropagation(),e.preventDefault())},[a,_]),ue=(0,K.useCallback)(()=>{if(se.current==null)return;let e=O();e?.handleDocumentFocus!==void 0&&document.removeEventListener(`focus`,e.handleDocumentFocus,!0),ne(se.current),n&&(J(P)==null?M(!0):(re(!0),z())),Zr(N,xr(J(P)))},[n,z,O,ne]),U=(0,K.useCallback)(()=>{document.removeEventListener(`focus`,V,!0),document.removeEventListener(`mousedown`,H),D(B);let e=O();e!==void 0&&e.props.autoFocus&&e.props.enforceFocus&&(e.bringFocusInsideOverlay?.(),e.handleDocumentFocus!==void 0&&document.addEventListener(`focus`,e.handleDocumentFocus,!0))},[D,O,V,H,B]),de=Li(m)??!1;(0,K.useEffect)(()=>{m&&A(!0),!de&&m&&ue(),de&&!m&&U()},[m,ue,U,de]),(0,K.useEffect)(()=>{if(!(!m||!(o&&!p)))return document.addEventListener(`mousedown`,H),()=>{document.removeEventListener(`mousedown`,H)}},[H,m,o,p]),(0,K.useEffect)(()=>{if(!(!m||n!==!1||!a))return document.addEventListener(`keydown`,ce),()=>{document.removeEventListener(`keydown`,ce)}},[ce,m,n,a]),(0,K.useEffect)(()=>{if(!(!m||!f)&&O()?.id===B)return document.addEventListener(`focus`,V,!0),()=>{document.removeEventListener(`focus`,V,!0)}},[V,f,m,O,B]);let fe=(0,K.useRef)(U);fe.current=U,(0,K.useEffect)(()=>()=>{fe.current()},[]);let pe=(0,K.useCallback)(e=>{let t=J(N);C&&t instanceof HTMLElement&&t.focus(),v?.(e)},[v,C]),me=(0,K.useCallback)(()=>{},[]),he=(0,K.useCallback)(e=>{if(c!=null)return c;if(l!=null){let t=e.key;if(t==null){Mr(`production`)||console.error(`[Blueprint] <Overlay2> requires each child element to have a unique key prop when childRefs is used`);return}return l[t]}},[c,l]),ge=(0,K.useCallback)(e=>{if(e==null||Ir(e))return null;let t=he(e),r=Br(e,`span`,{className:(0,qi.default)((Vr(e)?e.props:{}).className,on),ref:t===void 0?R:void 0,tabIndex:f||n?0:void 0}),i=t??R;return(0,Y.jsx)(h,{addEndListener:me,classNames:T,nodeRef:i,onEntered:Zi(b,i),onEntering:Zi(x,i),onExited:Zi(pe,i),onExiting:Zi(y,i),timeout:w,children:r})},[n,f,he,me,pe,y,b,x,w,T]),_e=(0,K.useCallback)(e=>{o&&_?.(e),f&&z(),i?.onMouseDown?.(e)},[i,z,o,f,_]),ve=(0,K.useCallback)((e,t)=>(0,Y.jsx)(h,{addEndListener:me,classNames:T,nodeRef:t.ref,timeout:w,unmountOnExit:!0,children:(0,Y.jsx)(`div`,{tabIndex:0,...t})},e),[me,w,T]),ye=(0,K.useCallback)(e=>{if(!f||k)return;let t=J(P),n=J(L);e.relatedTarget!=null&&t?.contains(e.relatedTarget)&&e.relatedTarget!==n&&n?.focus({preventScroll:!0})},[f,k]),be=(0,K.useCallback)(e=>{if(f&&e.shiftKey&&e.key===`Tab`){let e=Ri(P).pop();e==null?J(L)?.focus({preventScroll:!0}):e.focus()}},[f]),xe=(0,K.useCallback)(e=>{let t=J(I);if(e.relatedTarget!=null&&J(P)?.contains(e.relatedTarget)&&e.relatedTarget!==t){let n=Ri(P).shift();!k&&n!=null&&n!==e.relatedTarget?n.focus():t?.focus({preventScroll:!0})}else{let e=Ri(P).pop();e==null?t?.focus({preventScroll:!0}):e.focus()}},[k]),Se=(0,K.useMemo)(()=>p&&m?(0,Y.jsx)(h,{classNames:T,nodeRef:F,timeout:w,addEndListener:me,children:(0,Y.jsx)(`div`,{...i,className:(0,qi.default)(rn,r,i?.className),onMouseDown:_e,ref:F})},`__backdrop`):null,[r,i,_e,me,p,m,w,T]);if(g&&!ie)return null;let Ce=m?K.Children.map(u,ge)??[]:[];Se!==null&&Ce.unshift(Se),m&&(n||f)&&Ce.length>0&&(Ce.unshift(ve(`__start`,{className:un,onFocus:ye,onKeyDown:be,ref:I})),f&&Ce.push(ve(`__end`,{className:dn,onFocus:xe,ref:L})));let we=(0,Y.jsx)(`div`,{"aria-live":`polite`,className:(0,qi.default)(nn,{[cn]:m,[sn]:!E},d),onKeyDown:le,ref:oe,children:(0,Y.jsx)(s,{appear:!0,component:null,children:Ce})});return E?(0,Y.jsx)(Vi,{className:ee,container:S,children:we}):we});Ji.displayName=`${q}.Overlay2`;function Yi({childRef:e,childRefs:t,children:n}){let r=K.Children.count(n);(0,K.useEffect)(()=>{Mr(`production`)||(e!=null&&t!=null&&console.error(`[Blueprint] <Overlay2> cannot use childRef and childRefs props simultaneously`),r>1&&t==null&&console.error(`[Blueprint] <Overlay2> requires childRefs prop when rendering multiple child elements`))},[e,t,r])}function Xi(){let e=(0,K.useId)();return`${Ji.displayName}-${e}`}function Zi(e,t){return()=>{t?.current!=null&&e?.(t.current)}}var Qi=e(j());const $i=e=>{let{canOutsideClickClose:t=!0,children:n,className:r,containerRef:i,icon:a,isCloseButtonShown:o,isOpen:s=!1,onClose:c,role:l=`dialog`,style:u,title:d,titleTagName:f=wi,...p}=e,m=(0,K.useRef)(null),h=(0,K.useMemo)(()=>`title-${Fr(`bp-dialog`)}`,[]);return ei(()=>{d??(e.icon!=null&&console.warn(Ar),e.isCloseButtonShown!=null&&console.warn(jr))},[d,e.icon,e.isCloseButtonShown]),(0,Y.jsx)(Ji,{...p,isOpen:s,canOutsideClickClose:t,className:ln,childRef:m,hasBackdrop:!0,onClose:c,children:(0,Y.jsx)(`div`,{className:Ge,ref:Qr(i,m),children:(0,Y.jsxs)(`div`,{"aria-describedby":p[`aria-describedby`],"aria-labelledby":p[`aria-labelledby`]||(d==null?void 0:h),"aria-modal":p.enforceFocus??!0,className:(0,Qi.default)(We,r),role:l,style:u,children:[d!=null&&(0,Y.jsxs)(`div`,{className:Ke,children:[(0,Y.jsx)(X,{icon:a,size:A.STANDARD,"aria-hidden":!0,tabIndex:-1}),(0,Y.jsx)(f,{id:h,children:d}),o!==!1&&(0,Y.jsx)(yi,{"aria-label":`Close`,className:Ye,icon:(0,Y.jsx)(te,{size:A.STANDARD}),onClick:c,variant:`minimal`})]}),n]})})})};$i.displayName=`${q}.Dialog`;var ea=e(j());const ta=e=>{let{cancelButtonText:t,canEscapeKeyCancel:n=!1,canOutsideClickCancel:r=!1,children:i,className:a,confirmButtonText:o=`OK`,icon:s,intent:c,isOpen:l=!1,loading:u=!1,onCancel:d,onClose:f,onConfirm:p,...m}=e;ei(()=>{f==null&&t==null!=(d==null)&&console.warn(`[Blueprint] <Alert> cancelButtonText and onCancel should be set together.`);let e=d!=null||f!=null;n&&!e&&console.warn(`[Blueprint] <Alert> canEscapeKeyCancel enabled without onCancel or onClose handler.`),r&&!e&&console.warn(`[Blueprint] <Alert> canOutsideClickCancel enabled without onCancel or onClose handler.`)},[n,r,t,d,f]);let h=(0,K.useCallback)((e,t)=>{(e?p:d)?.(t),f?.(e,t)},[d,f,p]),g=(0,K.useCallback)(e=>h(!1,e),[h]),_=(0,K.useCallback)(e=>h(!0,e),[h]);return(0,Y.jsxs)($i,{...m,role:`alertdialog`,className:(0,ea.default)(Oe,a),canEscapeKeyClose:n,canOutsideClickClose:r,isOpen:l,onClose:g,children:[(0,Y.jsxs)(`div`,{className:ke,children:[(0,Y.jsx)(X,{icon:s,size:40,intent:c}),(0,Y.jsx)(`div`,{className:Ae,children:i})]}),(0,Y.jsxs)(`div`,{className:je,children:[(0,Y.jsx)(yi,{loading:u,intent:c,text:o,onClick:_}),t&&(0,Y.jsx)(yi,{text:t,disabled:u,onClick:g})]})]})};ta.displayName=`${q}.Alert`;var na=e(j());const ra=e=>{let{className:t,children:n,large:r,size:i=`medium`,small:a,ulRef:o,...s}=e;return(0,Y.jsx)(`ul`,{role:`menu`,...s,className:(0,na.default)(t,kt,or(i,{large:r,small:a})),ref:o,children:n})};ra.displayName=`${q}.Menu`;function ia(e){return e.split(`-`)[0]}function aa(e){return[`left`,`right`].indexOf(e)!==-1}function oa(e){switch(e){case`top`:return`bottom`;case`left`:return`right`;case`bottom`:return`top`;default:return`left`}}function sa(e){switch(e.split(`-`)[1]){case`start`:return`left`;case`end`:return`right`;default:return`center`}}function ca(e,t){let n=ia(e);return t===void 0?aa(n)?`${oa(n)} ${sa(n)}`:`${sa(n)} ${oa(n)}`:aa(n)?`${oa(n)} ${parseInt(t.top,10)+15}px`:`${parseInt(t.left,10)+15}px ${oa(n)}`}var la=`M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z`,ua=`M8.787 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z`,da=4;function fa(e){if(e==null)return 0;switch(ia(e)){case`top`:return-90;case`left`:return 180;case`bottom`:return 90;default:return 0}}function pa(e){let t=30/2-da;switch(ia(e)){case`top`:return{bottom:-t};case`left`:return{right:-t};case`bottom`:return{top:-t};default:return{left:-t}}}const ma=({arrowProps:{ref:e,style:t},placement:n})=>(0,Y.jsx)(`div`,{"aria-hidden":!0,className:pn,"data-popper-arrow":!0,ref:e,style:{...t,...pa(n)},children:(0,Y.jsxs)(`svg`,{viewBox:`0 0 30 30`,style:{transform:`rotate(${fa(n)}deg)`},children:[(0,Y.jsx)(`path`,{className:pn+`-border`,d:la}),(0,Y.jsx)(`path`,{className:pn+`-fill`,d:ua})]})});ma.displayName=`${q}.PopoverArrow`;const ha={CLICK:`click`,CLICK_TARGET_ONLY:`click-target`,HOVER:`hover`,HOVER_TARGET_ONLY:`hover-target`},ga={MINIMAL:`minimal`,SCALE:`scale`};function _a(e){let t=[];return e.offset&&t.push(m(e.offset)),e.inline&&t.push(f(e.inline)),e.autoPlacement&&e.flip?(console.warn(`autoPlacement and flip are mutually exclusive. Using autoPlacement and ignoring flip.`),t.push(n(e.autoPlacement))):e.flip?t.push(p(e.flip)):t.push(n(e.autoPlacement)),e.shift&&t.push(i(e.shift)),e.size&&t.push(c(e.size)),e.arrow&&e.arrow.element&&t.push(v({element:e.arrow.element,padding:e.arrow.padding})),e.hide&&t.push(a(e.hide)),t}function va({autoUpdateOptions:e,disabled:t=!1,isControlled:n=!1,isHoverInteractionKind:i=!1,isOpen:a=!1,middleware:s,placement:c,positioningStrategy:d=`absolute`,onOpenChange:f}={}){let[p,m]=(0,K.useState)(a);(0,K.useEffect)(()=>{m(a)},[a]);let h=(0,K.useCallback)((e,t)=>{n||m(e),f&&f(e,t)},[f,n]),g=(0,K.useRef)(e);g.current=e;let v=o({middleware:s,onOpenChange:h,open:p,placement:c,strategy:d,whileElementsMounted:(0,K.useMemo)(()=>e==null?_:(e,t,n)=>_(e,t,n,g.current),[e!=null])}),{context:y}=v,b=l([u(y,{enabled:!t&&!i,keyboardHandlers:!1}),r(y,{escapeKey:!1,outsidePress:!1})]);return(0,K.useMemo)(()=>({isOpen:p,setIsOpen:m,...b,...v}),[v,b,p])}const ya=ga.SCALE;var ba=e(j());function xa(e){let{animation:t=ya,arrow:n=!0,arrowRef:r,autoFocus:i,backdropProps:a,canEscapeKeyClose:o,captureDismiss:s=!1,content:c,enforceFocus:l=!0,floatingData:u,handleMouseEnter:f,handleMouseLeave:p,handleOverlayClose:m,handlePopoverClick:h,hasBackdrop:g=!1,hasDarkParent:_,inheritDarkTheme:v=!0,interactionKind:y=ha.CLICK,isClosingViaEscapeKeypress:b,isHoverInteractionKind:x,lazy:ee=!1,matchTargetWidth:S=!1,onClosed:C,onClosing:w,onOpened:T,onOpening:E,popoverClassName:D,popoverRef:O,portalClassName:te,portalContainer:ne,transitionDuration:k=300,usePortal:re=!0}=e,ie=(0,K.useRef)(null),A={left:u.middlewareData.arrow?.x,position:`absolute`,top:u.middlewareData.arrow?.y},j=u.context.middlewareData.hide?.referenceHidden??!1,M=u.context.middlewareData.hide?.escaped??!1,N=ca(u.placement,n?{left:Sa(A.left),top:Sa(A.top)}:void 0),P={onClick:h,onKeyDown:e=>qr(e)&&h(e)};(y===ha.HOVER||!re&&y===ha.HOVER_TARGET_ONLY)&&(P.onMouseEnter=f,P.onMouseLeave=p);let F=ia(u.placement),I=(0,ba.default)(W,{[se]:v&&_,[En]:t===ga.MINIMAL,[hn]:s,[bn]:S,[Cn]:j,[Sn]:M},`${_n}-${F}`,D),L=x?!1:void 0,R=x?!1:b||e.shouldReturnFocusOnClose,z=d([u.refs.setFloating,ie]);return(0,Y.jsx)(Ji,{autoFocus:i??L,backdropClassName:mn,backdropProps:a,canEscapeKeyClose:o,canOutsideClickClose:y===ha.CLICK,childRef:ie,enforceFocus:l,hasBackdrop:g,isOpen:u.isOpen,lazy:ee,onClose:m,onClosed:C,onClosing:w,onOpened:T,onOpening:E,portalClassName:te,portalContainer:ne,shouldReturnFocusOnClose:R,transitionDuration:k,transitionName:W,usePortal:re,children:(0,Y.jsx)(`div`,{className:Tn,style:u.floatingStyles,ref:z,...P,children:(0,Y.jsxs)(`div`,{className:I,ref:O,style:{transformOrigin:N},children:[n&&(0,Y.jsx)(ma,{arrowProps:{ref:r,style:A},placement:u.placement}),(0,Y.jsx)(`div`,{className:gn,children:c})]})})})}function Sa(e){return e===``?e:e==null||isNaN(Number(e))?``:`${e}px`}var Ca=e(j());const wa=(0,K.forwardRef)((e,t)=>{let{children:n,className:r,floatingData:i,disabled:a=!1,fill:o=!1,handleMouseEnter:s,handleMouseLeave:c,handleTargetBlur:l,handleTargetContextMenu:u,handleTargetFocus:f,interactionKind:p,isContentEmpty:m,isControlled:h,isHoverInteractionKind:g,openOnTargetFocus:_=!0,popupKind:v,renderTarget:y=void 0,targetProps:b,targetTagName:x=`span`}=e,ee=o?`div`:x,{isOpen:S}=i,C=d([i.refs.setReference,t]),w=(0,K.useCallback)(e=>{if(!qr(e)||e.repeat)return;let t=e.target;if(!Ea(t)){if(e.key===` `){if(t.closest(`button`)!=null)return;e.preventDefault()}else if(e.key===`Enter`&&t.closest(`button, a`)!=null)return;e.currentTarget.click()}},[]),T=g?{onBlur:l,onContextMenu:u,onFocus:f,onMouseEnter:s,onMouseLeave:c}:{},E=!m&&!a&&_&&g?0:void 0,D=g?{}:i.getReferenceProps({onKeyDown:w}),O={className:(0,Ca.default)(r,wn,{[xn]:S,[z]:S&&!h&&!g,[H]:o}),ref:C,...T},te={"aria-expanded":g?void 0:S,"aria-haspopup":p===ha.HOVER_TARGET_ONLY?void 0:v??`menu`},ne={[z]:S&&!h&&!g,[H]:o},k;if(y!==void 0)k=y({...O,...te,...D,className:(0,Ca.default)(O.className,ne),isOpen:S,tabIndex:E});else{let e=Br(K.Children.toArray(n)[0]);if(e===void 0)return null;let t=(0,K.cloneElement)(e,{...te,className:(0,Ca.default)(e.props.className,ne),disabled:S&&Ta(e)||e.props.disabled,tabIndex:e.props.tabIndex??E});k=(0,K.createElement)(ee,{...O,...b,...D},t)}return k});wa.displayName=`${q}.PopoverTarget`;function Ta(e){return e?.type!=null&&typeof e.type!=`string`&&typeof e.type==`function`&&`displayName`in e.type&&e.type.displayName===`Blueprint6.Tooltip`}function Ea(e){let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable}const Da=(0,K.forwardRef)((e,t)=>{let{animation:n=ya,autoUpdateOptions:r,arrow:i=!0,boundary:a=`clippingAncestors`,children:o,content:s,defaultIsOpen:c=!1,disabled:l=!1,hasBackdrop:u=!1,hoverCloseDelay:d=300,hoverOpenDelay:f=150,interactionKind:p=ha.CLICK,isOpen:m,matchTargetWidth:h=!1,middleware:g,onClose:_,onInteraction:v,openOnTargetFocus:y=!0,popoverRef:b,placement:x,positioningStrategy:ee=`absolute`,renderTarget:S,rootBoundary:C,shouldReturnFocusOnClose:w=!0,targetProps:T,usePortal:E=!0}=e;ei(()=>{m==null&&v!=null&&console.warn(`[Blueprint] <Popover> onInteraction is ignored when uncontrolled.`),u&&!E&&console.warn(`[Blueprint] <Popover usePortal={false}> ignores hasBackdrop`),u&&p!==ha.CLICK&&console.warn(Or);let e=K.Children.count(o),t=S!==void 0,n=T!==void 0;e===0&&!t&&console.warn(Dr),e>1&&console.warn(kr),e>0&&t&&console.warn(`[Blueprint] <Popover> with children ignores renderTarget prop; use either prop or children.`),t&&n&&console.warn(`[Blueprint] <Popover> targetProps value is ignored when renderTarget API is used.`)},[i,o,u,p,m,v,x,S,T,E]);let[D,O]=(0,K.useState)(!1),[te,ne]=(0,K.useState)(!1),k=(0,K.useRef)(null),re=(0,K.useRef)(void 0),ie=(0,K.useRef)(!1),A=(0,K.useRef)(!0),j=(0,K.useRef)(null),M=(0,K.useRef)([]),N=m!==void 0,P=s==null||Ir(s),F=l?!1:m??c,I=p===ha.HOVER||p===ha.HOVER_TARGET_ONLY,L=va({autoUpdateOptions:r,disabled:l,isControlled:N,isHoverInteractionKind:I,isOpen:F,middleware:(0,K.useMemo)(()=>_a({...x===void 0?{autoPlacement:{boundary:a,rootBoundary:C}}:{flip:{boundary:a,rootBoundary:C}},...i?{arrow:{element:k},offset:{mainAxis:30/2}}:{},shift:{boundary:a,rootBoundary:C},size:h?{apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}:void 0,...g}),[x,a,C,i,k,h,g]),onOpenChange:(e,t)=>{B(e,t)},placement:x,positioningStrategy:ee});(0,K.useImperativeHandle)(t,()=>({reposition:()=>{L.update()}}),[L]);let R=L.refs.floating.current,z=(0,K.useCallback)(()=>R?.querySelector(`.${W}`),[R]),ae=(0,K.useCallback)(e=>z()?.contains(e)??!1,[z]),oe=(0,K.useCallback)((e,t)=>{let n=window.setTimeout(e,t);return M.current.push(n),()=>window.clearTimeout(n)},[]),B=(0,K.useCallback)((e,t,n)=>{re.current?.(),n!==void 0&&n>0?(t?.persist(),re.current=oe(()=>{B(e,t)},n)):(m==null?L.setIsOpen(e):v?.(e,t),e||(_?.(t),ne(Oa(t?.nativeEvent))))},[L,m,v,_,oe]),H=(0,K.useCallback)(e=>{e.defaultPrevented&&B(!1,e)},[B]),ce=(0,K.useCallback)(e=>{ie.current=!1,e.persist(),oe(()=>{ie.current||B(!1,e,d)})},[d,B,oe]),le=(0,K.useCallback)(e=>{ie.current=!0,!E&&ae(e.target)&&p===ha.HOVER_TARGET_ONLY&&!y?ce(e):l||B(!0,e,f)},[l,ce,f,p,ae,y,B,E]),ue=(0,K.useCallback)(e=>{if(y&&I){if(e.relatedTarget==null&&!A.current)return;le(e)}},[le,I,y]),U=(0,K.useCallback)(e=>{y&&I&&(e.relatedTarget==null||e.relatedTarget!==R&&!ae(e.relatedTarget))&&ce(e),A.current=e.relatedTarget!=null},[ce,ae,I,y,R]),de=(0,K.useCallback)(e=>{let t=e.target,n=t.closest(`.${W}`),r=n===z(),i=n?.classList.contains(hn)??!1,a=t.closest(`.${vn}, .${yn}`)?.classList.contains(vn)??!1,o=t.closest(`:disabled, .${V}`)!=null;a&&!o&&(!i||r)&&B(!1,e)},[z,B]),fe=(0,K.useCallback)(e=>{if(j.current==null||e===void 0)return;let t=e.nativeEvent??e,n=t.composed?t.composedPath()[0]:t.target;(!yr(j.current,n)||e.nativeEvent instanceof KeyboardEvent)&&B(!1,e)},[B,j]),pe=(0,K.useCallback)(()=>{E&&L.isOpen&&O(j.current?.closest(`.${se}`)!=null)},[L.isOpen,j,E]);return(0,K.useEffect)(()=>{pe(),m!=null&&F!==L.isOpen?B(F):l&&L.isOpen&&m==null&&B(!1),P&&!l&&F!==!1&&!Mr(`production`)&&console.warn(`[Blueprint] Disabling <Popover> with empty/whitespace content...`)},[F,l,L,P,m,B,pe]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(wa,{floatingData:L,handleMouseEnter:le,handleMouseLeave:ce,handleTargetBlur:U,handleTargetContextMenu:H,handleTargetFocus:ue,isContentEmpty:P,isControlled:N,isHoverInteractionKind:I,openOnTargetFocus:y,ref:j,...e,children:o}),!P&&(0,Y.jsx)(xa,{animation:n,arrowRef:k,floatingData:L,handleMouseEnter:le,handleMouseLeave:ce,handleOverlayClose:fe,handlePopoverClick:de,hasDarkParent:D,isClosingViaEscapeKeypress:te,isHoverInteractionKind:I,popoverRef:b,shouldReturnFocusOnClose:w,...e})]})});Da.displayName=`${q}.PopoverNext`;function Oa(e){return e instanceof KeyboardEvent&&e.key===`Escape`}const Q={...F,AUTO:`auto`,AUTO_END:`auto-end`,AUTO_START:`auto-start`};function ka(e){switch(e){case Q.TOP_LEFT:return`top-start`;case Q.TOP:return`top`;case Q.TOP_RIGHT:return`top-end`;case Q.RIGHT_TOP:return`right-start`;case Q.RIGHT:return`right`;case Q.RIGHT_BOTTOM:return`right-end`;case Q.BOTTOM_RIGHT:return`bottom-end`;case Q.BOTTOM:return`bottom`;case Q.BOTTOM_LEFT:return`bottom-start`;case Q.LEFT_BOTTOM:return`left-end`;case Q.LEFT:return`left`;case Q.LEFT_TOP:return`left-start`;case`auto`:case`auto-start`:case`auto-end`:return e;default:return Aa(e)}}function Aa(e){throw Error(`Unexpected position: `+e)}function ja(e){let t={};if(e.flip&&e.flip.enabled!==!1){let{options:n}=e.flip;t.flip={...n?.boundary==null?{}:{boundary:Na(n.boundary)},...n?.rootBoundary==null?{}:{rootBoundary:n.rootBoundary},...n?.padding==null?{}:{padding:n.padding},...n?.fallbackPlacements==null?{}:{fallbackPlacements:n.fallbackPlacements},...n?.flipVariations==null?{}:{flipAlignment:n.flipVariations},...n?.mainAxis==null?{}:{mainAxis:n.mainAxis},...n?.altAxis==null?{}:{crossAxis:n.altAxis}}}if(e.preventOverflow&&e.preventOverflow.enabled!==!1){let{options:n}=e.preventOverflow;t.shift={...n?.boundary==null?{}:{boundary:Na(n.boundary)},...n?.rootBoundary==null?{}:{rootBoundary:n.rootBoundary},...n?.padding==null?{}:{padding:n.padding},...n?.mainAxis==null?{}:{mainAxis:n.mainAxis},...n?.altAxis==null?{}:{crossAxis:n.altAxis}}}if(e.offset&&e.offset.enabled!==!1){let{options:n}=e.offset;if(n?.offset!=null)if(typeof n.offset==`function`)console.warn("popperModifiersToNextMiddleware: The Popper.js `offset` function cannot be automatically converted to a Floating UI middleware config. Migrate it manually to a `{ mainAxis, crossAxis }` object in the `middleware` prop.");else{let[e,r]=n.offset;t.offset={...e==null?{}:{crossAxis:e},...r==null?{}:{mainAxis:r}}}else t.offset={mainAxis:30/2}}if(e.arrow&&e.arrow.enabled!==!1){let{options:n}=e.arrow;n?.element!=null&&typeof n.element!=`string`&&(t.arrow={element:n.element,...n.padding!=null&&typeof n.padding!=`function`?{padding:n.padding}:{}})}return e.hide&&e.hide.enabled!==!1&&(t.hide={}),t}function Ma(e){let{boundary:t,minimal:n,modifiers:r,modifiersCustom:i,onClose:a,placement:o,popoverRef:s,portalStopPropagationEvents:c,position:l,shouldReturnFocusOnClose:u,...d}=e??{};Mr(`production`)||(i!==void 0&&console.warn("[Blueprint] popoverPropsToNextProps: `modifiersCustom` has no equivalent in PopoverNext and will be dropped. Migrate to the `middleware` prop manually."),c!==void 0&&console.warn("[Blueprint] popoverPropsToNextProps: `portalStopPropagationEvents` has no equivalent in PopoverNext and will be dropped."),o!==void 0&&l!==void 0&&console.warn(`[Blueprint] <Popover> supports either placement or position prop, not both.`));let f={...d};return t!==void 0&&(f.boundary=Na(t)),o===void 0?l!==void 0&&(f.placement=Fa(l)):f.placement=Pa(o),r!==void 0&&(f.middleware=ja(r)),n!=null&&(f.animation??=n?ga.MINIMAL:ya,f.arrow??=!n),a!==void 0&&(f.onClose=e=>{e!==void 0&&a(e)}),s!==void 0&&(f.popoverRef=s),f.shouldReturnFocusOnClose=u??!1,f}function Na(e){return e===`clippingParents`?`clippingAncestors`:e}function Pa(e){switch(e){case`auto`:case`auto-start`:case`auto-end`:return;default:return e}}function Fa(e){return Pa(ka(e))}var Ia=e(j());const La=(0,K.forwardRef)((e,t)=>{let{active:n=!1,className:r,children:i,disabled:a=!1,icon:o,intent:s,labelClassName:c,labelElement:l,multiline:u=!1,popoverProps:d={},roleStructure:f=`menuitem`,selected:p,shouldDismissPopover:m=!0,submenuProps:h,text:g=``,textClassName:_,tagName:v=`a`,htmlTitle:y,...x}=e,[ee,S,C]=f===`listoption`?[`option`,void 0,!!p]:f===`menuitem`?[`none`,`menuitem`,void 0]:f===`none`?[`none`,void 0,void 0]:[void 0,void 0,void 0],w=f===`listoption`,T=w&&p,E=o!=null,D=i!=null,O=G(s),te=(0,Ia.default)(At,O,{[z]:n,[V]:a,[vn]:m&&!a&&!D,[jt]:w,[_e]:T},r),k=e.label==null&&l==null?null:(0,Y.jsxs)(`span`,{className:(0,Ia.default)(Pt,c),children:[e.label,l]}),re=Rr(x),ie=(0,K.createElement)(v,{onKeyDown:Sr([`Enter`,` `]),role:D?`none`:S,...re,tabIndex:D?-1:re.tabIndex==null?0:re.tabIndex,...a?za:{},className:te},T?(0,Y.jsx)(b,{className:Mt}):void 0,E?(0,Y.jsx)(`span`,{className:Nt,"aria-hidden":!0,children:(0,Y.jsx)(X,{icon:o,tabIndex:-1})}):void 0,(0,Y.jsx)(_i,{className:(0,Ia.default)(H,_),ellipsize:!u,title:y,children:g}),k,D?(0,Y.jsx)(ne,{className:It,title:`Open sub menu`}):void 0),A=(0,Ia.default)({[Ft]:D}),j=Ma(d);return(0,Y.jsx)(`li`,{className:A,ref:t,role:ee,"aria-selected":C,children:i==null?ie:(0,Y.jsx)(Da,{autoFocus:!1,captureDismiss:!1,disabled:a,enforceFocus:!1,hoverCloseDelay:0,interactionKind:`hover`,targetProps:{role:S,tabIndex:0},placement:`right-start`,usePortal:!1,...j,middleware:{...Ra,...j.middleware},content:(0,Y.jsx)(ra,{...h,children:i}),animation:`minimal`,arrow:!1,popoverClassName:(0,Ia.default)(Ft,d?.popoverClassName),children:ie})})});La.displayName=`${q}.MenuItem`;var Ra={flip:{padding:20,rootBoundary:`viewport`},offset:{crossAxis:-5},shift:{padding:20,rootBoundary:`viewport`}},za={"aria-disabled":!0,href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1},Ba=e(j());const Va=(0,K.forwardRef)((e,t)=>{let{alignText:n,className:r,fill:i,minimal:a,outlined:o,large:s,size:c=`medium`,variant:l=`solid`,vertical:u,...d}=e,f=(0,Ba.default)(Pe,{[H]:i,[ye]:u},nr(n),or(c,{large:s}),sr(l,{minimal:a,outlined:o}),r);return(0,Y.jsx)(`div`,{...d,ref:t,className:f,children:e.children})});Va.displayName=`${q}.ButtonGroup`;var Ha=e(j());const Ua=e=>{let{className:t,children:n,icon:r,intent:i,title:a,compact:o,minimal:s=!1,...c}=e,l=Wa(r,i);return(0,Y.jsxs)(`div`,{className:(0,Ha.default)(Le,G(i),t,{[Re]:!zr(n),[ze]:l!=null,[B]:o,[fe]:s}),...c,children:[l,a&&(0,Y.jsx)(Di,{children:a}),n]})};Ua.displayName=`${q}.Callout`;var Wa=(e,t)=>{if(e===null||e===!1)return;let n={"aria-hidden":!0,tabIndex:-1};if(e!==void 0)return(0,Y.jsx)(X,{icon:e,...n});switch(t){case P.DANGER:return(0,Y.jsx)(ee,{...n});case P.PRIMARY:return(0,Y.jsx)(re,{...n});case P.WARNING:return(0,Y.jsx)(k,{...n});case P.SUCCESS:return(0,Y.jsx)(E,{...n});default:return}},Ga=e(j());const Ka=(0,K.forwardRef)((e,t)=>{let{className:n,elevation:r=N.ZERO,interactive:i=!1,selected:a,compact:o,...s}=e;return(0,Y.jsx)(`div`,{className:(0,Ga.default)(n,Be,rr(r),{[ue]:i,[B]:o,[_e]:a}),ref:t,...s})});Ka.displayName=`${q}.Card`;var qa=e(j()),$;(function(e){e[e.OPEN_START=0]=`OPEN_START`,e[e.OPENING=1]=`OPENING`,e[e.OPEN=2]=`OPEN`,e[e.CLOSING_START=3]=`CLOSING_START`,e[e.CLOSING=4]=`CLOSING`,e[e.CLOSED=5]=`CLOSED`})($||={});const Ja=({children:e,className:t,component:n=`div`,isOpen:r=!1,keepChildrenMounted:i=!1,transitionDuration:a=200})=>{let[o,s]=(0,K.useState)(r?$.OPEN:$.CLOSED),[c,l]=(0,K.useState)(r?`auto`:`0px`),[u,d]=(0,K.useState)(void 0),[f,p]=(0,K.useState)(r),m=(0,K.useRef)(r);m.current=r;let h=(0,K.useRef)(null),g=(0,K.useRef)(o);g.current=o;let _=(0,K.useRef)(),v=(0,K.useCallback)(()=>{switch(g.current){case $.OPENING:s($.OPEN),l(`auto`);break;case $.CLOSING:s($.CLOSED);break;default:break}},[]);if(r!==f)if(p(r),r)switch(o){case $.OPEN:case $.OPENING:break;default:s($.OPEN_START)}else switch(o){case $.CLOSED:case $.CLOSING:break;default:s($.CLOSING_START),l(`${u}px`)}(0,K.useEffect)(()=>()=>{_.current!=null&&clearTimeout(_.current)},[]),(0,K.useEffect)(()=>{if(h.current)switch(o){case $.OPEN_START:{let e=h.current.clientHeight;s($.OPENING),l(`${e}px`),d(e),clearTimeout(_.current),_.current=setTimeout(v,a);break}case $.CLOSING_START:{let e=h.current.clientHeight,t=setTimeout(()=>{s($.CLOSING),l(`0px`),d(e)});return clearTimeout(_.current),_.current=setTimeout(v,a),()=>clearTimeout(t)}default:break}},[o,a,v]);let y=(0,K.useCallback)(e=>{if(h.current=e,h.current!=null){let e=h.current.clientHeight;s(m.current?$.OPEN:$.CLOSED),l(e===0?void 0:`${e}px`),d(e===0?void 0:e)}},[]),b=o!==$.CLOSED,x=b||i,ee=b&&o!==$.CLOSING,S=o===$.OPEN?`auto`:c,C=S===`auto`,w={height:b?S:void 0,overflowY:C?`visible`:void 0,transition:C?`none`:void 0},T={transform:ee?`translateY(0)`:`translateY(-${u}px)`,transition:C?`none`:void 0};return(0,K.createElement)(n,{className:(0,qa.default)(Ve,t),style:w},(0,Y.jsx)(`div`,{className:He,ref:y,style:T,"aria-hidden":!b,children:x?e:null}))};Ja.displayName=`${q}.Collapse`;const Ya=(0,K.createContext)([{},()=>null]);var Xa=(e,t)=>{switch(t.type){case`FORCE_DISABLED_STATE`:return{forceDisabled:!0};case`RESET_DISABLED_STATE`:return{};default:return e}};const Za=({children:e,forceDisable:t})=>{let[n,r]=(0,K.useReducer)(Xa,{}),i=(0,K.useMemo)(()=>[n,r],[n,r]);return(0,K.useEffect)(()=>{r(t?{type:`FORCE_DISABLED_STATE`}:{type:`RESET_DISABLED_STATE`})},[t]),(0,Y.jsx)(Ya.Provider,{value:i,children:typeof e==`function`?e(n):e})};var Qa=e(j());const $a=(0,K.forwardRef)((e,t)=>{let{children:n,className:r,useOverflowScrollContainer:i=!0,...a}=e;return(0,Y.jsx)(`div`,{...a,className:(0,Qa.default)(qe,r,{[Je]:i}),ref:t,children:n})});$a.displayName=`${q}.DialogBody`;var eo=e(j());const to=(0,K.forwardRef)((e,t)=>{let{actions:n,children:r,className:i,minimal:a=!1,...o}=e;return(0,Y.jsxs)(`div`,{...o,className:(0,eo.default)(Xe,i,{[Ze]:!a}),ref:t,children:[(0,Y.jsx)(`div`,{className:Qe,children:r}),n!=null&&(0,Y.jsx)(`div`,{className:$e,children:n})]})});to.displayName=`${q}.DialogFooter`;var no=e(j()),ro=class extends $r{static displayName=`${q}.Tooltip`;static defaultProps={compact:!1,hoverCloseDelay:0,hoverOpenDelay:100,interactionKind:`hover-target`,minimal:!1,transitionDuration:100};popoverRef=(0,K.createRef)();render(){return(0,Y.jsx)(Ya.Consumer,{children:([e])=>(0,Y.jsx)(Za,{...e,children:this.renderPopover})})}reposition(){this.popoverRef.current?.reposition()}renderPopover=e=>{let{children:t,compact:n,disabled:r,intent:i,popoverClassName:a,...o}=this.props,s=(0,no.default)(Yn,G(i),a,{[B]:n}),c=Ma(o);return(0,Y.jsx)(Da,{...c,middleware:{offset:{mainAxis:22/2},...c.middleware},autoFocus:!1,disabled:e.forceDisabled??r,enforceFocus:!1,lazy:!0,popoverClassName:s,portalContainer:this.props.portalContainer,ref:this.popoverRef,children:t})}},io=e(j());const ao=({className:e,compact:t=!1,tagName:n=`div`,...r})=>{let i=(0,io.default)(tt,{[B]:t},e);return(0,K.createElement)(n,{...r,className:i})};ao.displayName=`${q}.Divider`;var oo=e(j()),so;(function(e){e.SMALL=`360px`,e.STANDARD=`50%`,e.LARGE=`90%`})(so||={});var co=class extends $r{static displayName=`${q}.Drawer`;static defaultProps={canOutsideClickClose:!0,isOpen:!1,position:`right`,style:{}};render(){let{hasBackdrop:e,size:t,style:n,position:r}=this.props,{className:i,children:a,...o}=this.props,s=L(r),c=(0,oo.default)(nt,{[ar(s)??``]:!0},i),l=t==null?n:{...n,[I(s)?`height`:`width`]:t};return(0,Y.jsx)(Ji,{...o,className:(0,oo.default)({[an]:e}),children:(0,Y.jsxs)(`div`,{className:c,style:l,children:[this.maybeRenderHeader(),a]})})}validateProps(e){e.title??(e.icon!=null&&console.warn(Ar),e.isCloseButtonShown!=null&&console.warn(jr)),e.position!=null&&e.position!==L(e.position)&&console.warn(`[Blueprint] <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)`)}maybeRenderCloseButton(){return this.props.isCloseButtonShown===!1?null:(0,Y.jsx)(yi,{"aria-label":`Close`,className:Ye,icon:(0,Y.jsx)(te,{size:A.LARGE}),onClick:this.props.onClose,variant:`minimal`})}maybeRenderHeader(){let{icon:e,title:t}=this.props;return t==null?null:(0,Y.jsxs)(`div`,{className:rt,children:[(0,Y.jsx)(X,{icon:e,size:A.LARGE}),(0,Y.jsx)(Ei,{children:t}),this.maybeRenderCloseButton()]})}},lo=e(j()),uo=(0,K.forwardRef)((e,t)=>{let{alignIndicator:n,children:r,className:i,indicatorChildren:a,inline:o,inputRef:s,label:c,labelElement:l,large:u,size:d=`medium`,style:f,type:p,typeClassName:m,tagName:h=`label`,...g}=e;return(0,K.createElement)(h,{className:(0,lo.default)(mt,m,{[V]:g.disabled,[le]:o},nr(n),or(d,{large:u}),i),ref:t,style:f},(0,Y.jsx)(`input`,{className:ht,...g,ref:s,type:p}),(0,Y.jsx)(`span`,{className:gt,children:a}),c,l,r)});uo.displayName=`${q}.Control`;const fo=(0,K.forwardRef)((e,t)=>{let{innerLabelChecked:n,innerLabel:r,...i}=e,a=r||n?[(0,Y.jsx)(`div`,{className:_t,children:(0,Y.jsx)(`div`,{className:xt,children:n||r})},`checked`),(0,Y.jsx)(`div`,{className:_t,children:(0,Y.jsx)(`div`,{className:xt,children:r})},`unchecked`)]:null;return(0,Y.jsx)(uo,{...i,indicatorChildren:a,ref:t,type:`checkbox`,typeClassName:bt})});fo.displayName=`${q}.Switch`;const po=(0,K.forwardRef)((e,t)=>(0,Y.jsx)(uo,{...e,ref:t,type:`radio`,typeClassName:yt}));po.displayName=`${q}.Radio`;const mo=(0,K.forwardRef)((e,t)=>{let{defaultIndeterminate:n,indeterminate:r,onChange:i,...a}=e,[o,s]=(0,K.useState)(r||n||!1),c=(0,K.useRef)(null),l=Qr(e.inputRef,c),u=(0,K.useCallback)(e=>{r===void 0&&s(e.target.indeterminate),i?.(e)},[r,i]);return(0,K.useEffect)(()=>{r!==void 0&&s(r)},[r]),(0,K.useEffect)(()=>{c.current!=null&&(c.current.indeterminate=o)},[c,o]),(0,Y.jsx)(uo,{...a,inputRef:l,onChange:u,ref:t,type:`checkbox`,typeClassName:vt})});mo.displayName=`${q}.Checkbox`;var ho=e(j());const go=e=>{let{children:t,className:n,contentClassName:r,disabled:i,fill:a,helperText:o,inline:s,intent:c,label:l,labelFor:u,labelInfo:d,style:f,subLabel:p,...m}=e;return(0,Y.jsxs)(`div`,{className:(0,ho.default)(wt,G(c),{[V]:i,[H]:a,[le]:s},n),style:f,...m,children:[l&&(0,Y.jsxs)(`label`,{className:Ct,htmlFor:u,children:[l,` `,(0,Y.jsx)(`span`,{className:xe,children:d})]}),p&&(0,Y.jsx)(`div`,{className:Dt,children:p}),(0,Y.jsxs)(`div`,{className:(0,ho.default)(Tt,r),children:[t,o&&(0,Y.jsx)(`div`,{className:Et,children:o})]})]})};go.displayName=`${q}.FormGroup`;var _o=class e extends $r{static displayName=`${q}.AsyncControllableInput`;static COMPOSITION_END_DELAY=10;state={hasPendingUpdate:!1,isComposing:!1,nextValue:this.props.value,value:this.props.value};cancelPendingCompositionEnd=null;static getDerivedStateFromProps(e,t){return t.isComposing||e.value===void 0?null:t.nextValue===t.value?{hasPendingUpdate:!1,nextValue:e.value,value:e.value}:e.value===t.nextValue?t.hasPendingUpdate?{hasPendingUpdate:!1,value:e.value}:{value:t.nextValue}:e.value===t.value?{hasPendingUpdate:!0}:{hasPendingUpdate:!1,nextValue:e.value,value:e.value}}render(){let{isComposing:e,hasPendingUpdate:t,value:n,nextValue:r}=this.state,{inputRef:i,...a}=this.props;return(0,Y.jsx)(`input`,{...a,ref:i,value:e||t?r:n,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange})}handleCompositionStart=e=>{this.cancelPendingCompositionEnd?.(),this.setState({isComposing:!0}),this.props.onCompositionStart?.(e)};handleCompositionEnd=t=>{this.cancelPendingCompositionEnd=this.setTimeout(()=>this.setState({isComposing:!1}),e.COMPOSITION_END_DELAY),this.props.onCompositionEnd?.(t)};handleChange=e=>{let{value:t}=e.target;this.setState({nextValue:t}),this.props.onChange?.(e)}},vo=e(j()),yo=[`inputSize`,`onValueChange`],bo=class extends $r{static displayName=`${q}.InputGroup`;state={};leftElement=null;rightElement=null;refHandlers={leftElement:e=>this.leftElement=e,rightElement:e=>this.rightElement=e};render(){let{asyncControl:e=!1,className:t,disabled:n,fill:r,inputClassName:i,inputRef:a,inputSize:o,intent:s,large:c,readOnly:l,round:u,size:d=`medium`,small:f,tagName:p=`div`}=this.props,m=(0,vo.default)(dt,G(s),{[V]:n,[he]:l,[H]:r,[ge]:u},or(d,{large:c,small:f}),t),h={...this.props.style,paddingLeft:this.state.leftElementWidth,paddingRight:this.state.rightElementWidth},g={type:`text`,...Rr(this.props,yo,!0),"aria-disabled":n,className:(0,vo.default)(ut,i),onChange:this.handleInputChange,size:o,style:h},_=e?(0,Y.jsx)(_o,{...g,inputRef:a}):(0,Y.jsx)(`input`,{...g,ref:a});return(0,K.createElement)(p,{className:m},this.maybeRenderLeftElement(),_,this.maybeRenderRightElement())}componentDidMount(){this.updateInputWidth()}componentDidUpdate(e){let{leftElement:t,rightElement:n}=this.props;(e.leftElement!==t||e.rightElement!==n)&&this.updateInputWidth()}validateProps(e){e.leftElement!=null&&e.leftIcon!=null&&console.warn(`[Blueprint] <InputGroup> leftElement and leftIcon prop are mutually exclusive, with leftElement taking priority.`)}handleInputChange=e=>{let t=e.target.value;this.props.onChange?.(e),this.props.onValueChange?.(t,e.target)};maybeRenderLeftElement(){let{leftElement:e,leftIcon:t}=this.props;if(e!=null)return(0,Y.jsx)(`span`,{className:ft,ref:this.refHandlers.leftElement,children:e});if(t!=null)return(0,Y.jsx)(X,{icon:t,"aria-hidden":!0,tabIndex:-1})}maybeRenderRightElement(){let{rightElement:e}=this.props;if(e!=null)return(0,Y.jsx)(`span`,{className:pt,ref:this.refHandlers.rightElement,children:e})}updateInputWidth(){let{leftElementWidth:e,rightElementWidth:t}=this.state;if(this.leftElement!=null){let{clientWidth:t}=this.leftElement;(e===void 0||Math.abs(t-e)>2)&&this.setState({leftElementWidth:t})}else this.setState({leftElementWidth:void 0});if(this.rightElement!=null){let{clientWidth:e}=this.rightElement;(t===void 0||Math.abs(e-t)>2)&&this.setState({rightElementWidth:e})}else this.setState({rightElementWidth:void 0})}},xo=e(j());const So=(0,K.forwardRef)((e,t)=>{let{className:n,children:r,disabled:i,fill:a,iconName:o=`double-caret-vertical`,iconProps:s,large:c,minimal:l,options:u=[],value:d,...f}=e,p=(0,xo.default)(ot,{[V]:i,[H]:a,[U]:c,[fe]:l},n),m=`Open dropdown`,h=o===`double-caret-vertical`?(0,Y.jsx)(D,{title:m,...s}):(0,Y.jsx)(O,{title:m,...s}),g=u.map(e=>{let t=typeof e==`object`?e:{value:e};return(0,K.createElement)(`option`,{...t,key:t.value,children:t.label||t.value})});return(0,Y.jsxs)(`div`,{className:p,children:[(0,Y.jsxs)(`select`,{disabled:i,ref:t,value:d,...f,multiple:!1,children:[g,r]}),h]})});So.displayName=`${q}.HTMLSelect`;var Co=e(j());const wo=(0,K.forwardRef)((e,t)=>{let{bordered:n,className:r,compact:i,interactive:a,striped:o,...s}=e,c=(0,Co.default)(st,{[B]:i,[ct]:n,[lt]:o,[ue]:a},r);return(0,Y.jsx)(`table`,{...s,ref:t,className:c})});wo.displayName=`${q}.HTMLTable`;var To=e(j());const Eo=({className:e,title:t,titleId:n})=>(0,Y.jsx)(`li`,{className:(0,To.default)(t?Rt:Lt,e),role:`separator`,children:t&&(0,Y.jsx)(Oi,{id:n,children:t})});Eo.displayName=`${q}.MenuDivider`;var Do=e(j());const Oo=({className:e,...t})=>(0,Y.jsx)(`div`,{className:(0,Do.default)(Qt,e),...t});Oo.displayName=`${q}.NavbarDivider`;var ko=e(j());const Ao=({align:e=M.START,children:t,className:n,...r})=>{let i=(0,ko.default)(Xt,nr(e),n);return ei(()=>{e===M.CENTER&&console.warn(`[Blueprint] <NavbarGroup> does not support align="center". Only "left" or "right" alignment is allowed, and align="center" will be ignored.`)},[e]),(0,Y.jsx)(`div`,{className:i,...r,children:t})};Ao.displayName=`${q}.NavbarGroup`;var jo=e(j());const Mo=({children:e,className:t,...n})=>(0,Y.jsx)(`div`,{className:(0,jo.default)(Zt,t),...n,children:e});Mo.displayName=`${q}.NavbarHeading`;var No=e(j());const Po=e=>{let{children:t,className:n,fixedToTop:r,...i}=e;return(0,Y.jsx)(`div`,{className:(0,No.default)(Yt,{[ce]:r},n),...i,children:t})};Po.displayName=`${q}.Navbar`,Po.Divider=Oo,Po.Group=Ao,Po.Heading=Mo;var Fo=e(j()),Io;(function(e){e[e.STANDARD=48]=`STANDARD`,e[e.SMALL=32]=`SMALL`,e[e.EXTRA_SMALL=20]=`EXTRA_SMALL`})(Io||={});const Lo=e=>{let{action:t,children:n,className:r,description:i,icon:a,iconMuted:o=!0,iconSize:s=Io.STANDARD,layout:c=`vertical`,title:l}=e;return(0,Y.jsxs)(`div`,{className:(0,Fo.default)($t,`${$t}-${c}`,r),children:[a==null?void 0:(0,Y.jsx)(`div`,{className:en,style:{fontSize:`${s}px`,lineHeight:`${s}px`},children:(0,Y.jsx)(X,{className:(0,Fo.default)({[tr]:o}),icon:a,size:s,"aria-hidden":!0,tabIndex:-1})}),l==null&&i==null?void 0:(0,Y.jsxs)(`div`,{className:tn,children:[l&&(0,Y.jsx)(Ei,{children:l}),i&&Br(i,`div`)]}),t,n]})};Lo.displayName=`${q}.NonIdealState`;var Ro=e(j());const zo=(0,K.forwardRef)((e,t)=>{let{children:n,className:r,collapseProps:i,collapsible:a,compact:o=!1,elevation:s=N.ZERO,icon:c,rightElement:l,subtitle:u,title:d,titleRenderer:f=Oi,...p}=e,m=i?.isOpen!=null,[h,g]=(0,K.useState)(!(i?.defaultIsOpen??!0)),_=m?!i?.isOpen:h,v=(0,K.useCallback)(()=>{m?i?.onToggle?.():g(!_)},[i,_,m]),y=l!=null||a,b=Fr(`section`),x=d?Fr(`section-title`):void 0;return(0,Y.jsxs)(Ka,{className:(0,Ro.default)(r,Bt,{[B]:o,[Vt]:a&&_||zr(n)}),elevation:s,ref:t,"aria-labelledby":x,...p,id:b,children:[d&&(0,Y.jsxs)(`div`,{className:(0,Ro.default)(Ht,{[ue]:a}),onClick:a?v:void 0,children:[(0,Y.jsxs)(`div`,{className:Ut,children:[c&&(0,Y.jsx)(X,{icon:c,"aria-hidden":!0,tabIndex:-1,className:xe}),(0,Y.jsxs)(`div`,{children:[(0,K.createElement)(f,{className:Wt,id:x},d),u&&(0,Y.jsx)(`div`,{className:(0,Ro.default)(xe,Gt),children:u})]})]}),y&&(0,Y.jsxs)(`div`,{className:Kt,children:[l,a&&(0,Y.jsx)(`span`,{role:`button`,tabIndex:0,"aria-pressed":_,"aria-expanded":_,"aria-controls":b,"aria-label":_?`expand section`:`collapse section`,onKeyDown:Sr([`Enter`,` `]),className:(0,Ro.default)(xe,qt),children:_?(0,Y.jsx)(C,{}):(0,Y.jsx)(S,{})})]})]}),a?(0,Y.jsx)(Ja,{...i,isOpen:!_,children:n}):n]})});zo.displayName=`${q}.Section`;var Bo=e(j());const Vo=(0,K.forwardRef)((e,t)=>{let{className:n,children:r,padded:i=!0,...a}=e;return(0,Y.jsx)(`div`,{className:(0,Bo.default)(Jt,{[me]:i},n),ref:t,...a,children:r})});Vo.displayName=`${q}.SectionCard`;var Ho=e(j()),Uo=class extends $r{static defaultProps={disabled:!1};static displayName=`${q}.Tab`;render(){let{className:e,panel:t}=this.props;return(0,Y.jsx)(`div`,{className:(0,Ho.default)(Bn,e),role:`tablist`,children:Tr(t)?t({tabPanelId:``,tabTitleId:``}):t})}};const Wo=e=>{let{className:t,large:n,onRemove:r,size:i,tabIndex:a}=e,o=n||i===`large`||t?.includes(U),s=(0,K.useCallback)(t=>{r?.(t,e)},[r,e]);return(0,Y.jsx)(`button`,{"aria-label":`Remove tag`,type:`button`,className:Un,onClick:s,tabIndex:a,children:(0,Y.jsx)(te,{size:o?A.LARGE:A.STANDARD})})};Wo.displayName=`${q}.TagRemoveButton`;var Go=e(j());const Ko=(0,K.forwardRef)((e,t)=>{let{children:n,className:r,endIcon:i,fill:a=!1,icon:o,intent:s,interactive:c,large:l=!1,minimal:u=!1,multiline:d,onRemove:f,rightIcon:p,round:m=!1,size:h=`medium`,tabIndex:g=0,htmlTitle:_,...v}=e,y=Tr(f),b=c??v.onClick!=null,[x,ee]=ni(b,e,t,{defaultTabIndex:0,disabledTabIndex:void 0}),S=(0,Go.default)(Hn,G(s),or(h,{large:l}),{[z]:x,[H]:a,[ue]:b,[fe]:u,[ge]:m},r);return(0,Y.jsxs)(`span`,{...Rr(v),...ee,className:S,role:b?`button`:void 0,children:[(0,Y.jsx)(X,{icon:o}),!zr(n)&&(0,Y.jsx)(_i,{className:H,ellipsize:!d,tagName:`span`,title:_,children:n}),(0,Y.jsx)(X,{icon:i??p}),y&&(0,Y.jsx)(Wo,{...e})]})});Ko.displayName=`${q}.Tag`;var qo=e(j()),Jo=class extends $r{static displayName=`${q}.TabTitle`;render(){let{className:e,children:t,disabled:n,id:r,parentId:i,selected:a,title:o,icon:s,tagContent:c,tagProps:l,...u}=this.props,d=a?P.PRIMARY:P.NONE,{tabPanelId:f,tabTitleId:p}=Yo(i,r);return(0,Y.jsxs)(`div`,{...Rr(u),"aria-controls":f,"aria-disabled":n,"aria-expanded":a,"aria-selected":a,className:(0,qo.default)(Pn,e),"data-tab-id":r,id:p,onClick:n?void 0:this.handleClick,role:`tab`,tabIndex:n?void 0:a?0:-1,children:[s!=null&&(0,Y.jsx)(X,{icon:s,intent:d,className:Fn}),o,t,c!=null&&(0,Y.jsx)(Ko,{minimal:!0,intent:d,...l,className:(0,qo.default)(In,l?.className),children:c})]})}handleClick=e=>this.props.onClick(this.props.id,e)};function Yo(e,t){return{tabPanelId:`${Bn}_${e}_${t}`,tabTitleId:`${Pn}-title_${e}_${t}`}}var Xo=e(j()),Zo=class extends $r{render(){let{className:e,id:t,parentId:n,selectedTabId:r,panel:i,renderActiveTabPanelOnly:a}=this.props,o=t===r;if(i===void 0||a&&!o)return;let{tabTitleId:s,tabPanelId:c}=Yo(n,t);return(0,Y.jsx)(`div`,{"aria-labelledby":s,"aria-hidden":!o,className:(0,Xo.default)(Bn,e),id:c,role:`tabpanel`,children:Tr(i)?i({tabPanelId:c,tabTitleId:s}):i})}},Qo=e(j()),$o=`.${Pn}`,es=class extends $r{static Tab=Uo;static defaultProps={animate:!0,fill:!1,large:!1,renderActiveTabPanelOnly:!1,size:`medium`,vertical:!1};static displayName=`${q}.Tabs`;static getDerivedStateFromProps({selectedTabId:e}){return e===void 0?null:{selectedTabId:e}}tablistElement=null;refHandlers={tablist:e=>this.tablistElement=e};constructor(e){super(e),this.state={selectedTabId:this.getInitialSelectedTabId()}}render(){let{animate:e,children:t,className:n,fill:r,large:i,renderActiveTabPanelOnly:a,size:o=`medium`,vertical:s}=this.props,{indicatorWrapperStyle:c,selectedTabId:l}=this.state,u=K.Children.map(t,this.renderTabTitle),d=this.getTabChildren().filter(a?e=>e.props.id===l:()=>!0).map(this.renderTabPanel),f=e?(0,Y.jsx)(`div`,{className:Rn,style:c,children:(0,Y.jsx)(`div`,{className:Ln})}):null;return(0,Y.jsxs)(`div`,{className:(0,Qo.default)(Vn,n,{[ye]:s,[H]:r}),children:[(0,Y.jsxs)(`div`,{className:(0,Qo.default)(zn,or(o,{large:i})),onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,ref:this.refHandlers.tablist,role:`tablist`,children:[f,u]}),d]})}componentDidMount(){this.moveSelectionIndicator(!1)}componentDidUpdate(e,t){this.state.selectedTabId===t.selectedTabId?t.selectedTabId!=null&&(dr(this.getTabChildrenProps(e),this.getTabChildrenProps(),fr)||this.moveSelectionIndicator()):this.moveSelectionIndicator()}getInitialSelectedTabId(){let{defaultSelectedTabId:e,selectedTabId:t}=this.props;if(t!==void 0)return t;if(e!==void 0)return e;{let e=this.getTabChildren();return e.length===0?void 0:e[0].props.id}}getTabChildrenProps(e=this.props){return this.getTabChildren(e).map(e=>e.props)}getTabChildren(e=this.props){return K.Children.toArray(e.children).filter(ts)}getTabElements(e=``){return this.tablistElement==null?[]:Array.from(this.tablistElement.querySelectorAll($o+e))}handleKeyDown=e=>{let t=Jr(e,[`ArrowLeft`,`ArrowUp`],[`ArrowRight`,`ArrowDown`]);if(t===void 0)return;let n=xr(this.tablistElement)?.closest($o);if(!n)return;let r=this.getTabElements(`[aria-disabled="false"]`),i=r.indexOf(n);if(i<0)return;e.preventDefault();let{length:a}=r;r[(i+t+a)%a].focus()};handleKeyPress=e=>{let t=e.target.closest($o);t!=null&&qr(e)&&(e.preventDefault(),t.click())};handleTabClick=(e,t)=>{this.props.onChange?.(e,this.state.selectedTabId,t),this.props.selectedTabId===void 0&&this.setState({selectedTabId:e})};moveSelectionIndicator(e=!0){if(this.tablistElement==null||!this.props.animate)return;let t=`${$o}[data-tab-id="${this.state.selectedTabId}"]`,n=this.tablistElement.querySelector(t),r={display:`none`};if(n!=null){let{clientHeight:t,clientWidth:i,offsetLeft:a,offsetTop:o}=n;r={height:t,transform:`translateX(${Math.floor(a)}px) translateY(${Math.floor(o)}px)`,width:i},e||(r.transition=`none`)}this.setState({indicatorWrapperStyle:r})}renderTabPanel=e=>{let{className:t,panel:n,id:r,panelClassName:i}=e.props;if(n!==void 0)return(0,K.createElement)(Zo,{...e.props,key:r,className:(0,Qo.default)(t,i),parentId:this.props.id,selectedTabId:this.state.selectedTabId})};renderTabTitle=e=>{if(ts(e)){let{id:t}=e.props;return(0,Y.jsx)(Jo,{...e.props,parentId:this.props.id,onClick:this.handleTabClick,selected:t===this.state.selectedTabId})}return e}};function ts(e){return Wr(e,Uo)}function ns(e,t){let n=(0,K.useRef)(e);hi(()=>{n.current=e},[e]),(0,K.useEffect)(()=>{if(!t&&t!==0)return;let e=setTimeout(()=>n.current(),t);return()=>clearTimeout(e)},[t])}var rs=e(j());const is=(0,K.forwardRef)((e,t)=>{let{action:n,className:r,icon:i,intent:a,isCloseButtonShown:o=!0,message:s,onDismiss:c,timeout:l=5e3}=e,[u,d]=(0,K.useState)(!1),f=(0,K.useCallback)(()=>d(!0),[]),p=(0,K.useCallback)(()=>d(!1),[]),m=l!=null&&l>0;ns(()=>{h(!0)},u&&m?l:null),(0,K.useEffect)(()=>(m?f():p(),p),[p,f,m,l]);let h=(0,K.useCallback)(e=>{p(),c?.(e)},[p,c]),g=(0,K.useCallback)(()=>h(!1),[h]),_=(0,K.useCallback)(e=>{n?.onClick?.(e),h(!1)},[n,h]);return(0,Y.jsxs)(`div`,{className:(0,rs.default)(Kn,G(a),r),onBlur:f,onFocus:p,onMouseEnter:p,onMouseLeave:f,ref:t,tabIndex:0,children:[(0,Y.jsx)(X,{icon:i}),(0,Y.jsx)(`span`,{className:Jn,role:`alert`,children:s}),(0,Y.jsxs)(Va,{variant:`minimal`,children:[n&&(0,Y.jsx)(bi,{...n,intent:void 0,onClick:_}),o&&(0,Y.jsx)(yi,{"aria-label":`Close`,icon:(0,Y.jsx)(ie,{}),onClick:g})]})]})});is.displayName=`${q}.Toast`;var as=e(j()),os=t(),ss=(e,t)=>{(0,os.createRoot)(t).render(e)},cs=class e extends $r{static displayName=`${q}.OverlayToaster`;static defaultProps={autoFocus:!1,canEscapeKeyClear:!0,position:F.TOP,usePortal:!0};static create(t,n={}){t!=null&&t.usePortal!=null&&!Mr(`production`)&&console.warn(`[Blueprint] OverlayToaster.create() ignores inline prop as it always creates a new element.`);let{container:r=document.body,domRenderer:i=ss}=n,a=document.createElement(`div`);return r.appendChild(a),new Promise((n,r)=>{try{i((0,Y.jsx)(e,{...t,ref:o,usePortal:!1}),a)}catch(e){r(e)}function o(e){if(e==null){r(Error(`[Blueprint] OverlayToaster.create() is not supported inside React lifecycle methods in React 16. See usage example on the docs site. https://blueprintjs.com/docs/#core/components/toast.example`));return}n(e)}})}static createAsync(t,n){return e.create(t,n)}state={toastRefs:{},toasts:[]};queue={cancel:void 0,isRunning:!1,toasts:[]};toastId=0;toastRefs={};getToastRefs=e=>e.reduce((e,t)=>(e[t.key]=(0,K.createRef)(),e),{});show(e,t){let n=this.createToastOptions(e,t);return this.maybeUpdateExistingToast(n,t)||(this.queue.isRunning?this.queue.toasts.push(n):(this.immediatelyShowToast(n),this.startQueueTimeout())),n.key}maybeUpdateExistingToast(e,t){return t==null?!1:this.queue.toasts.some(e=>e.key===t)?(this.queue.toasts=this.queue.toasts.map(n=>n.key===t?e:n),!0):this.state.toasts.some(e=>e.key===t)?(this.updateToastsInState(n=>n.map(n=>n.key===t?e:n)),!0):!1}immediatelyShowToast(e){this.props.maxToasts&&this.dismissIfAtLimit(),this.updateToastsInState(t=>[e,...t])}startQueueTimeout(){this.queue.isRunning=!0,this.queue.cancel=this.setTimeout(this.handleQueueTimeout,50)}handleQueueTimeout=()=>{let e=this.queue.toasts.shift();e==null?this.queue.isRunning=!1:(this.immediatelyShowToast(e),this.startQueueTimeout())};updateToastsInState(e){this.setState(t=>{let n=e(t.toasts);return{toastRefs:this.getToastRefs(n),toasts:n}})}dismiss(e,t=!1){this.setState(n=>{let r=n.toasts.filter(n=>{let r=n.key===e;return r&&n.onDismiss?.(t),!r});return{toastRefs:this.getToastRefs(r),toasts:r}})}clear(){this.queue.cancel?.(),this.queue={cancel:void 0,isRunning:!1,toasts:[]},this.state.toasts.forEach(e=>e.onDismiss?.(!1)),this.setState({toastRefs:{},toasts:[]})}getToasts(){return this.state.toasts}render(){let e=(0,as.default)(qn,this.getPositionClasses(),this.props.className);return(0,Y.jsxs)(Ji,{autoFocus:this.props.autoFocus,canEscapeKeyClose:this.props.canEscapeKeyClear,canOutsideClickClose:!1,className:e,childRefs:this.toastRefs,enforceFocus:!1,hasBackdrop:!1,isOpen:this.state.toasts.length>0||K.Children.count(this.props.children)>0,onClose:this.handleClose,shouldReturnFocusOnClose:!1,transitionDuration:350,transitionName:Kn,usePortal:this.props.usePortal,children:[this.state.toasts.map(this.renderToast,this),this.props.children]})}validateProps({maxToasts:e}){if(e!==void 0&&e<1)throw Error(`[Blueprint] <OverlayToaster> maxToasts is set to an invalid number, must be greater than 0`)}dismissIfAtLimit(){this.state.toasts.length===this.props.maxToasts&&this.dismiss(this.state.toasts[this.state.toasts.length-1].key)}renderToast=e=>{let{key:t,...n}=e;return(0,Y.jsx)(is,{...n,onDismiss:this.getDismissHandler(e)},t)};createToastOptions(e,t=`toast-${this.toastId++}`){return{...e,key:t}}getPositionClasses(){return[...this.props.position.split(`-`).map(e=>`${qn}-${e.toLowerCase()}`),`${qn}-${this.props.usePortal?`in-portal`:`inline`}`]}getDismissHandler=e=>t=>{this.dismiss(e.key,t)};handleClose=e=>{e.key===`Escape`&&this.clear()}};export{Ti as A,F as B,Va as C,ta as D,ra as E,X as F,N as H,ur as I,qe as L,Di as M,yi as N,$i as O,fi as P,Xe as R,Ua as S,Da as T,M as U,P as V,ao as _,Vo as a,$a as b,Po as c,So as d,bo as f,co as g,fo as h,Uo as i,Ei as j,Ai as k,Eo as l,mo as m,es as n,zo as o,go as p,Ko as r,Lo as s,cs as t,wo as u,ro as v,La as w,Ka as x,to as y,$e as z};
@@ -0,0 +1,9 @@
1
+ import{i as e,t}from"./rolldown-runtime-C4Xdq4VV.js";import{Zt as n,d as r,f as i,h as a,m as o,p as s,u as c}from"./vendor-react-Kt98jRfM.js";import{S as l}from"./vendor-icons-other-Bme3ywH9.js";function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}var f=d,p=t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),m=t((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),h=t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),g=t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),_=t(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),v=t((e=>{var t=m().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),y=t((e=>{var t=m().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),b=t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),x=t((e=>{var t=h(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),S=t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),C=t((e=>{var t=S();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),w=t(((e,t)=>{var n=C();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),T=t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),E=t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
2
+ ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),D=t((e=>{var t=T(),n=E();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),O=t((e=>{var t=m(),n=x(),r=h(),i=D(),a=T(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),k=t((e=>{var t=m(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),A=t(((e,t)=>{var n=D();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),ee=t(((e,t)=>{var n=D(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),j=t(((e,t)=>{var n=D();function r(e){this.mode=n.BYTE,typeof e==`string`?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),M=t(((e,t)=>{var n=D(),r=m();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
3
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),te=t(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),ne=t((e=>{var t=D(),n=A(),r=ee(),i=j(),a=M(),o=E(),s=m(),c=te();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function h(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function g(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function _(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
4
+ Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(_(t,null)):t.data&&e.push(_(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=g(h(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),re=t((e=>{var t=m(),n=h(),r=g(),i=_(),a=v(),o=y(),s=b(),c=x(),l=w(),u=O(),d=k(),f=D(),p=ne();function S(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function C(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function T(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function E(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function A(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function ee(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function j(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return M(a,e,n)}function M(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function te(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
5
+ The chosen QR Code version cannot contain this amount of data.
6
+ Minimum version required to store current data is: `+c+`.
7
+ `);let l=j(n,r,o),d=new i(t.getSymbolSize(n));return S(d,n),C(d),T(d,n),A(d,r,0),n>=7&&E(d,n),ee(d,l),isNaN(a)&&(a=s.getBestMask(d,A.bind(null,d,r))),s.applyMask(a,d),A(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),te(e,a,i,o)}})),ie=t((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||={};let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[a[t*i+r]?1:0]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),ae=t((e=>{var t=ie();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),oe=t((e=>{var t=ie();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
8
+ `;return typeof a==`function`&&a(null,p),p}})),se=t((e=>{var t=p(),n=re(),r=ae(),i=oe();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}));function N(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function le(e){let t,n,r;e.length===2?(t=e===N||e===ce?e:ue,n=e,r=e):(t=N,n=(t,n)=>N(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function ue(){return 0}function de(e){return e===null?NaN:+e}function*fe(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var pe=le(N);const me=pe.right;pe.left,le(de).center;var he=me,ge=class extends Map{constructor(e,t=be){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(_e(this,e))}has(e){return super.has(_e(this,e))}set(e,t){return super.set(ve(this,e),t)}delete(e){return super.delete(ye(this,e))}};function _e({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function ve({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ye({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function be(e){return typeof e==`object`&&e?e.valueOf():e}function xe(e=N){if(e===N)return Se;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Se(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Ce=Math.sqrt(50),we=Math.sqrt(10),Te=Math.sqrt(2);function Ee(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Ce?10:a>=we?5:a>=Te?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Ee(e,t,n*2):[s,c,l]}function De(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Ee(t,e,n):Ee(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function Oe(e,t,n){return t=+t,e=+e,n=+n,Ee(e,t,n)[2]}function ke(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?Oe(t,e,n):Oe(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Ae(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function je(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Me(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Se:xe(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));Me(e,t,u,d,i)}let a=e[t],o=n,s=r;for(Ne(e,n,t),i(e[r],a)>0&&Ne(e,n,r);o<s;){for(Ne(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?Ne(e,n,s):(++s,Ne(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Ne(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Pe(e,t,n){if(e=Float64Array.from(fe(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return je(e);if(t>=1)return Ae(e);var r,i=(r-1)*t,a=Math.floor(i),o=Ae(Me(e,a).subarray(0,a+1));return o+(je(e.subarray(a+1))-o)*(i-a)}}function Fe(e,t,n=de){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Ie(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Le(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Re(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Ve(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function ze(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Be(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Ve(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function Ve(e,t){var n=typeof t,a;return t==null||n===`boolean`?s(t):(n===`number`?r:n===`string`?(a=o(t))?(t=a,i):c:t instanceof o?i:t instanceof Date?ze:Le(t)?Ie:Array.isArray(t)?Re:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Be:r)(e,t)}function He(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ue(e,t){t===void 0&&(t=e,e=Ve);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function We(e){return e===`__proto__`}var Ge=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function Ke(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:Ge.test(e);default:return!1}}function qe(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Je(e){return typeof e==`symbol`||e instanceof Symbol}function Ye(e){return e==null?``:Xe(e)}function Xe(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Xe).join(`,`);if(Je(e))return e.toString();let t=e+``;return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function Ze(e){if(Array.isArray(e))return e.map(qe);if(typeof e==`symbol`)return[e];e=Ye(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o)if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l;else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function Qe(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(We(t))return n;let r=e[t];return r===void 0?Ke(t)&&!Object.hasOwn(e,t)?Qe(e,Ze(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=qe(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return $e(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),We(t))return n;let r=e[t];return r===void 0?n:r}}}function $e(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||We(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function P(e){return function(){return e}}var et=Math.PI,tt=2*et,nt=1e-6,rt=tt-nt;function it(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function at(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return it;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var ot=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?it:at(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>nt)if(!(Math.abs(u*s-c*l)>nt)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((et-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>nt&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>nt||Math.abs(this._y1-l)>nt)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%tt+tt),d>rt?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>nt&&this._append`A${n},${n},0,${+(d>=et)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function st(){return new ot}st.prototype=ot.prototype;function ct(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ot(t)}Array.prototype.slice;function lt(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ut(e){this._context=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function dt(e){return new ut(e)}function ft(e){return e[0]}function pt(e){return e[1]}function mt(e,t){var n=P(!0),r=null,i=dt,a=null,o=ct(s);e=typeof e==`function`?e:e===void 0?ft:P(e),t=typeof t==`function`?t:t===void 0?pt:P(t);function s(s){var c,l=(s=lt(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:P(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:P(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:P(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ht(e,t,n){var r=null,i=P(!0),a=null,o=dt,s=null,c=ct(l);e=typeof e==`function`?e:e===void 0?ft:P(+e),t=typeof t==`function`?t:P(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?pt:P(+n);function l(l){var u,d,f,p=(l=lt(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return mt().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:P(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:P(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:P(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:P(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:P(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:P(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:P(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var gt=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function _t(e){return new gt(e,!0)}function vt(e){return new gt(e,!1)}function yt(){}function bt(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xt(e){this._context=e}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bt(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function St(e){return new xt(e)}function Ct(e){this._context=e}Ct.prototype={areaStart:yt,areaEnd:yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bt(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wt(e){return new Ct(e)}function Tt(e){this._context=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:bt(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Et(e){return new Tt(e)}function Dt(e){this._context=e}Dt.prototype={areaStart:yt,areaEnd:yt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ot(e){return new Dt(e)}function kt(e){return e<0?-1:1}function At(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kt(a)+kt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Mt(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Nt(e){this._context=e}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mt(this,this._t0,jt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Mt(this,jt(this,n=At(this,e,t)),n);break;default:Mt(this,this._t0,n=At(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pt(e){this._context=new Ft(e)}(Pt.prototype=Object.create(Nt.prototype)).point=function(e,t){Nt.prototype.point.call(this,t,e)};function Ft(e){this._context=e}Ft.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function It(e){return new Nt(e)}function Lt(e){return new Pt(e)}function Rt(e){this._context=e}Rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=zt(e),i=zt(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zt(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bt(e){return new Rt(e)}function Vt(e,t){this._context=e,this._t=t}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function Ht(e){return new Vt(e,.5)}function Ut(e){return new Vt(e,0)}function Wt(e){return new Vt(e,1)}function Gt(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kt(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function qt(e,t){return e[t]}function Jt(e){let t=[];return t.key=e,t}function Yt(){var e=P([]),t=Kt,n=Gt,r=qt;function i(i){var a=Array.from(e.apply(this,arguments),Jt),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=lt(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:P(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:P(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Kt:typeof e==`function`?e:P(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??Gt,i):n},i}function Xt(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Gt(e,t)}}function Zt(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}Gt(e,t)}}function Qt(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,Gt(e,t)}}function $t(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function en(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function tn(e){return e}function nn(e){return Number.isSafeInteger(e)&&e>=0}function rn(e){return e!=null&&typeof e!=`function`&&nn(e.length)}function an(e){return function(t){return Qe(t,e)}}function on(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function sn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cn(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ln(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var un=`[object RegExp]`,dn=`[object String]`,fn=`[object Number]`,pn=`[object Boolean]`,mn=`[object Arguments]`,hn=`[object Symbol]`,gn=`[object Date]`,_n=`[object Map]`,vn=`[object Set]`,yn=`[object Array]`,bn=`[object Function]`,xn=`[object ArrayBuffer]`,Sn=`[object Object]`,Cn=`[object Error]`,wn=`[object DataView]`,Tn=`[object Uint8Array]`,En=`[object Uint8ClampedArray]`,Dn=`[object Uint16Array]`,On=`[object Uint32Array]`,kn=`[object BigUint64Array]`,An=`[object Int8Array]`,jn=`[object Int16Array]`,Mn=`[object Int32Array]`,Nn=`[object BigInt64Array]`,Pn=`[object Float32Array]`,Fn=`[object Float64Array]`,In=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function Ln(e){return In.Buffer!==void 0&&In.Buffer.isBuffer(e)}function Rn(e,t){return zn(e,void 0,e,new Map,t)}function zn(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(on(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=zn(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,zn(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(zn(a,void 0,n,r,i));return t}if(Ln(e))return e.subarray();if(sn(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=zn(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),F(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),F(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,F(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),F(t,e,n,r,i),t}if(typeof e==`object`&&Bn(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),F(t,e,n,r,i),t}return e}function F(e,t,n=e,r,i){let a=[...Object.keys(t),...cn(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=zn(t[s],s,n,r,i))}}function Bn(e){switch(ln(e)){case mn:case yn:case xn:case wn:case pn:case gn:case Pn:case Fn:case An:case jn:case Mn:case _n:case fn:case Sn:case un:case vn:case dn:case hn:case Tn:case En:case Dn:case On:return!0;default:return!1}}function Vn(e){return zn(e,void 0,e,new Map,void 0)}function Hn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Un(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Wn(e,t,n){return typeof n==`function`?Gn(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Gn(t,r,e,s,!1):!!c},new Map,!0):Wn(e,t,()=>void 0)}function Gn(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Kn(e,t,n,r,i);case`function`:return Object.keys(t).length>0?Gn(e,{...t},n,r,i):Hn(e,t);default:return Un(e)&&i?typeof t==`string`?t===``:!0:Hn(e,t)}}function Kn(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return Jn(e,t,n,r);if(t instanceof Map)return qn(e,t,n,r);if(t instanceof Set)return Yn(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)on(e)&&(e=Object(e));else{let t=ln(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function qn(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Jn(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function Yn(e,t,n,r){return t.size===0?!0:e instanceof Set?Jn([...e],[...t],n,r):!1}function Xn(e,t){return Wn(e,t,()=>void 0)}function Zn(e){return e=Vn(e),t=>Xn(t,e)}function Qn(e,t){return Rn(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(ln(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),F(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case fn:case dn:case pn:{let t=new e.constructor(e?.valueOf());return F(t,e),t}case mn:{let t={};return F(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function $n(e){return Qn(e)}var er=/^(?:0|[1-9]\d*)$/;function tr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return er.test(e)}}function nr(e){return typeof e==`object`&&!!e&&ln(e)===`[object Arguments]`}function rr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Ke(t)&&!(t in Object(e))?Ze(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=qe(n[e]);if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||nr(r))&&tr(t)&&Number(t)<r.length))return!1;r=r[t]}return!0}function ir(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=qe(e);break}return t=$n(t),function(n){let r=Qe(n,e);return r===void 0?rr(n,e):t===void 0?r===void 0:Xn(r,t)}}function ar(e){if(e==null)return tn;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?ir(e[0],e[1]):Zn(e);default:return an(e)}}function or(e){return e===0?0:e}function sr(e,t=tn){return rn(e)?$t(Array.from(e),en(ar(t),1)).map(or):[]}var cr=t((e=>{var t=l(),r=n();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,u=t.useMemo,d=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var l=s(null);if(l.current===null){var f={hasValue:!1,value:null};l.current=f}else f=l.current;l=u(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,l[0],l[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),lr=t(((e,t)=>{t.exports=cr()}));function ur(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function dr(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var fr=e=>Array.isArray(e)?e:[e];function pr(e){let t=Array.isArray(e[0])?e[0]:e;return dr(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function mr(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var hr=class{constructor(e){this.value=e}deref(){return this.value}},gr=(()=>typeof WeakRef>`u`?hr:WeakRef)(),_r=0,vr=1;function yr(){return{s:_r,v:void 0,o:null,p:null}}function br(e){return e instanceof gr?e.deref():e}function xr(e,t={}){let n=yr(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=yr(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=yr(),e.set(n,t)):t=r}}let s=t,c;if(t.s===vr)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=br(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new gr(c):c}return s.s=vr,s.v=c,c}return o.clearCache=()=>{n=yr(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Sr(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ur(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=xr,argsMemoizeOptions:u=[]}={...n,...a},d=fr(c),f=fr(u),p=pr(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=mr(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var Cr=Sr(xr);function wr(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function Tr(e,t,n){return Un(n)&&(typeof t==`number`&&rn(n)&&tr(t)&&t<n.length||typeof t==`string`&&t in n)?Hn(n[t],e):!1}function Er(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var Dr=(e,t,n)=>{if(e!==t){let r=Er(e),i=Er(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},Or=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kr=/^\w*$/;function Ar(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||Je(e)?!0:typeof e==`string`&&(kr.test(e)||!Or.test(e))||t!=null&&Object.hasOwn(t,e)}function jr(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=rn(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||Ar(e)?e:{key:e,path:Ze(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=Dr(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function Mr(e,...t){let n=t.length;return n>1&&Tr(e,t[0],t[1])?t=[]:n>2&&Tr(t[0],t[1],t[2])&&(t=[t[0]]),jr(e,wr(t),[`asc`])}function I(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 Nr=(()=>typeof Symbol==`function`&&Symbol.observable||`@@observable`)(),Pr=()=>Math.random().toString(36).substring(7).split(``).join(`.`),Fr={INIT:`@@redux/INIT${Pr()}`,REPLACE:`@@redux/REPLACE${Pr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pr()}`};function Ir(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lr(e,t,n){if(typeof e!=`function`)throw Error(I(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(I(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(I(1));return n(Lr)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(I(3));return i}function d(e){if(typeof e!=`function`)throw Error(I(4));if(c)throw Error(I(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(I(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!Ir(e))throw Error(I(7));if(e.type===void 0)throw Error(I(8));if(typeof e.type!=`string`)throw Error(I(17));if(c)throw Error(I(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(I(10));r=e,f({type:Fr.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(I(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[Nr](){return this}}}return f({type:Fr.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[Nr]:m}}function Rr(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:Fr.INIT})===void 0)throw Error(I(12));if(n(void 0,{type:Fr.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(I(13))})}function zr(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{Rr(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(I(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function Br(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function Vr(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(I(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=Br(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function Hr(e){return Ir(e)&&`type`in e&&typeof e.type==`string`}var Ur=Symbol.for(`immer-nothing`),Wr=Symbol.for(`immer-draftable`),L=Symbol.for(`immer-state`);function R(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var z=Object,Gr=z.getPrototypeOf,Kr=`constructor`,qr=`prototype`,Jr=`configurable`,Yr=`enumerable`,Xr=`writable`,Zr=`value`,B=e=>!!e&&!!e[L];function V(e){return e?ei(e)||si(e)||!!e[Wr]||!!e[Kr]?.[Wr]||ci(e)||li(e):!1}var Qr=z[qr][Kr].toString(),$r=new WeakMap;function ei(e){if(!e||!ui(e))return!1;let t=Gr(e);if(t===null||t===z[qr])return!0;let n=z.hasOwnProperty.call(t,Kr)&&t[Kr];if(n===Object)return!0;if(!di(n))return!1;let r=$r.get(n);return r===void 0&&(r=Function.toString.call(n),$r.set(n,r)),r===Qr}function ti(e,t,n=!0){ni(e)===0?(n?Reflect.ownKeys(e):z.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ni(e){let t=e[L];return t?t.type_:si(e)?1:ci(e)?2:li(e)?3:0}var ri=(e,t,n=ni(e))=>n===2?e.has(t):z[qr].hasOwnProperty.call(e,t),ii=(e,t,n=ni(e))=>n===2?e.get(t):e[t],ai=(e,t,n,r=ni(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function oi(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var si=Array.isArray,ci=e=>e instanceof Map,li=e=>e instanceof Set,ui=e=>typeof e==`object`,di=e=>typeof e==`function`,fi=e=>typeof e==`boolean`;function pi(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var H=e=>e.copy_||e.base_,mi=e=>e.modified_?e.copy_:e.base_;function hi(e,t){if(ci(e))return new Map(e);if(li(e))return new Set(e);if(si(e))return Array[qr].slice.call(e);let n=ei(e);if(t===!0||t===`class_only`&&!n){let t=z.getOwnPropertyDescriptors(e);delete t[L];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Xr]===!1&&(a[Xr]=!0,a[Jr]=!0),(a.get||a.set)&&(t[i]={[Jr]:!0,[Xr]:!0,[Yr]:a[Yr],[Zr]:e[i]})}return z.create(Gr(e),t)}else{let t=Gr(e);if(t!==null&&n)return{...e};let r=z.create(t);return z.assign(r,e)}}function gi(e,t=!1){return yi(e)||B(e)||!V(e)?e:(ni(e)>1&&z.defineProperties(e,{set:vi,add:vi,clear:vi,delete:vi}),z.freeze(e),t&&ti(e,(e,t)=>{gi(t,!0)},!1),e)}function _i(){R(2)}var vi={[Zr]:_i};function yi(e){return e===null||!ui(e)?!0:z.isFrozen(e)}var bi=`MapSet`,xi=`Patches`,Si=`ArrayMethods`,Ci={};function wi(e){let t=Ci[e];return t||R(0,e),t}var Ti=e=>!!Ci[e],Ei,Di=()=>Ei,Oi=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ti(bi)?wi(bi):void 0,arrayMethodsPlugin_:Ti(Si)?wi(Si):void 0});function ki(e,t){t&&(e.patchPlugin_=wi(xi),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ai(e){ji(e),e.drafts_.forEach(Ni),e.drafts_=null}function ji(e){e===Ei&&(Ei=e.parent_)}var Mi=e=>Ei=Oi(Ei,e);function Ni(e){let t=e[L];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Pi(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[L].modified_&&(Ai(t),R(4)),V(e)&&(e=Fi(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[L].base_,e,t)}else e=Fi(t,n);return Ii(t,e,!0),Ai(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Ur?void 0:e}function Fi(e,t){if(yi(t))return t;let n=t[L];if(!n)return Wi(t,e.handledSet_,e);if(!Ri(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Hi(n,e)}return n.copy_}function Ii(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&gi(t,n)}function Li(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ri=(e,t)=>e.scope_===t,zi=[];function Bi(e,t,n,r){let i=H(e),a=e.type_;if(r!==void 0&&ii(i,r,a)===t){ai(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ti(i,(e,n)=>{if(B(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??zi;for(let e of o)ai(i,e,n,a)}function Vi(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Ri(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=mi(i);Bi(e,i.draft_??i,a,n),Hi(i,r)})}function Hi(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Li(e)}}function Ui(e,t,n){let{scope_:r}=e;if(B(n)){let i=n[L];Ri(i,r)&&i.callbacks_.push(function(){$i(e),Bi(e,n,mi(i),t)})}else V(n)&&e.callbacks_.push(function(){let i=H(e);e.type_===3?i.has(n)&&Wi(n,r.handledSet_,r):ii(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Wi(ii(e.copy_,t,e.type_),r.handledSet_,r)})}function Wi(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||B(e)||t.has(e)||!V(e)||yi(e)?e:(t.add(e),ti(e,(r,i)=>{if(B(i)){let t=i[L];Ri(t,n)&&(ai(e,r,mi(t),e.type_),Li(t))}else V(i)&&Wi(i,t,n)}),e)}function Gi(e,t){let n=si(e),r={type_:n?1:0,scope_:t?t.scope_:Di(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Ki;n&&(i=[r],a=qi);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Ki={get(e,t){if(t===L)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=H(e);if(!ri(i,t,e.type_))return Xi(e,i,t);let a=i[t];if(e.finalized_||!V(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&pi(t))return a;if(a===Ji(e.base_,t)||Yi(e,t,a)){$i(e);let n=e.type_===1?+t:t,r=ta(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in H(e)},ownKeys(e){return Reflect.ownKeys(H(e))},set(e,t,n){let r=Zi(H(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Ji(H(e),t),i=r?.[L];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(oi(n,r)&&(n!==void 0||ri(e.base_,t,e.type_)))return!0;$i(e),Qi(e)}return e.copy_[t]===n&&(n!==void 0||ri(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Ui(e,t,n),!0)},deleteProperty(e,t){return $i(e),Ji(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Qi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=H(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Xr]:!0,[Jr]:e.type_!==1||t!==`length`,[Yr]:r[Yr],[Zr]:n[t]}},defineProperty(){R(11)},getPrototypeOf(e){return Gr(e.base_)},setPrototypeOf(){R(12)}},qi={};for(let e in Ki){let t=Ki[e];qi[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}qi.deleteProperty=function(e,t){return qi.set.call(this,e,t,void 0)},qi.set=function(e,t,n){return Ki.set.call(this,e[0],t,n,e[0])};function Ji(e,t){let n=e[L];return(n?H(n):e)[t]}function Yi(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!V(n)||n[L]?!1:e.baseRefs_.has(n)}function Xi(e,t,n){let r=Zi(t,n);return r?Zr in r?r[Zr]:r.get?.call(e.draft_):void 0}function Zi(e,t){if(!(t in e))return;let n=Gr(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Gr(n)}}function Qi(e){e.modified_||(e.modified_=!0,e.parent_&&Qi(e.parent_))}function $i(e){e.copy_||=(e.assigned_=new Map,hi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ea=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(di(e)&&!di(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}di(t)||R(6),n!==void 0&&!di(n)&&R(7);let r;if(V(e)){let i=Mi(this),a=ta(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Ai(i):ji(i)}return ki(i,n),Pi(r,i)}else if(!e||!ui(e)){if(r=t(e),r===void 0&&(r=e),r===Ur&&(r=void 0),this.autoFreeze_&&gi(r,!0),n){let t=[],i=[];wi(xi).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else R(1,e)},this.produceWithPatches=(e,t)=>{if(di(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},fi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),fi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),fi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){V(e)||R(8),B(e)&&(e=na(e));let t=Mi(this),n=ta(t,e,void 0);return n[L].isManual_=!0,ji(t),n}finishDraft(e,t){let n=e&&e[L];(!n||!n.isManual_)&&R(9);let{scope_:r}=n;return ki(r,t),Pi(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=wi(xi).applyPatches_;return B(e)?r(e,t):this.produce(e,e=>r(e,t))}};function ta(e,t,n,r){let[i,a]=ci(t)?wi(bi).proxyMap_(t,n):li(t)?wi(bi).proxySet_(t,n):Gi(t,n);return(n?.scope_??Di()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Vi(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function na(e){return B(e)||R(10,e),ra(e)}function ra(e){if(!V(e)||yi(e))return e;let t=e[L],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hi(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=hi(e,!0);return ti(n,(e,t)=>{ai(n,e,ra(t))},r),t&&(t.finalized_=!1),n}globalThis.Iterator?.from;var ia=new ea().produce,aa=e=>e;function oa(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var sa=oa(),ca=oa,la=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?Br:Br.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function ua(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(U(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Hr(t)&&t.type===e,n}var da=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function fa(e){return V(e)?ia(e,()=>{}):e}function pa(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function ma(e){return typeof e==`boolean`}var ha=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new da;return t&&(ma(t)?a.push(sa):a.push(ca(t.extraArgument))),a},ga=`RTK_autoBatch`,_a=()=>e=>({payload:e,meta:{[ga]:!0}}),va=e=>t=>{setTimeout(t,e)},ya=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},ba=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?ya(window.requestAnimationFrame,100):va(10):e.type===`callback`?e.queueNotification:va(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[ga],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},xa=e=>function(t){let{autoBatch:n=!0}=t??{},r=new da(e);return n&&r.push(ba(typeof n==`object`?n:void 0)),r};function Sa(e){let t=ha(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(Ir(n))c=zr(n);else throw Error(U(1));let l;l=typeof r==`function`?r(t):t();let u=Br;i&&(u=la({trace:!1,...typeof i==`object`&&i}));let d=xa(Vr(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return Lr(c,o,p)}function Ca(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(U(28));if(r in t)throw Error(U(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function wa(e){return typeof e==`function`}function Ta(e,t){let[n,r,i]=Ca(t),a;if(wa(e))a=()=>fa(e());else{let t=fa(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(B(e)){let r=n(e,t);return r===void 0?e:r}else if(V(e))return ia(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var Ea=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,Da=(e=21)=>{let t=``,n=e;for(;n--;)t+=Ea[Math.random()*64|0];return t},Oa=Symbol.for(`rtk-slice-createasyncthunk`);function ka(e,t){return`${e}/${t}`}function Aa({creators:e}={}){let t=e?.asyncThunk?.[Oa];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(U(11));let i=(typeof e.reducers==`function`?e.reducers(Na()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(U(12));if(n in o.sliceCaseReducersByType)throw Error(U(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:ka(n,r),createNotation:typeof e.reducers==`function`};Fa(a)?La(o,a,s,t):Pa(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?Ca(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return Ta(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=pa(d,r,m)),i}function i(t=l){return pa(pa(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ja(a,t,()=>pa(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function ja(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var Ma=Aa();function Na(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function Pa({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!Ia(r))throw Error(U(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?ua(e,o):ua(e))}function Fa(e){return e._reducerDefinitionType===`asyncThunk`}function Ia(e){return e._reducerDefinitionType===`reducerWithPrepare`}function La({type:e,reducerName:t},n,r,i){if(!i)throw Error(U(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||Ra,pending:s||Ra,rejected:c||Ra,settled:l||Ra})}function Ra(){}var za=`task`,Ba=`listener`,Va=`completed`,Ha=`cancelled`,Ua=`task-${Ha}`,Wa=`task-${Va}`,Ga=`${Ba}-${Ha}`,Ka=`${Ba}-${Va}`,qa=class{constructor(e){this.code=e,this.message=`${za} ${Ha} (reason: ${e})`}code;name=`TaskAbortError`;message},Ja=(e,t)=>{if(typeof e!=`function`)throw TypeError(U(32))},Ya=()=>{},Xa=(e,t=Ya)=>(e.catch(t),e),Za=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),Qa=e=>{if(e.aborted)throw new qa(e.reason)};function $a(e,t){let n=Ya;return new Promise((r,i)=>{let a=()=>i(new qa(e.reason));if(e.aborted){a();return}n=Za(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Ya})}var eo=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof qa?`cancelled`:`rejected`,error:e}}finally{t?.()}},to=e=>t=>Xa($a(e,t).then(t=>(Qa(e),t))),no=e=>{let t=to(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:ro}=Object,io={},ao=`listenerMiddleware`,oo=(e,t)=>{let n=t=>Za(e,()=>t.abort(e.reason));return(r,i)=>{Ja(r,`taskExecutor`);let a=new AbortController;n(a);let o=eo(async()=>{Qa(e),Qa(a.signal);let t=await r({pause:to(a.signal),delay:no(a.signal),signal:a.signal});return Qa(a.signal),t},()=>a.abort(Wa));return i?.autoJoin&&t.push(o.catch(Ya)),{result:to(e)(o),cancel(){a.abort(Ua)}}}},so=(e,t)=>{let n=async(n,r)=>{Qa(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await $a(t,Promise.race(a));return Qa(t),e}finally{i()}};return((e,t)=>Xa(n(e,t)))},co=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=ua(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(U(21));return Ja(a,`options.listener`),{predicate:i,type:t,effect:a}},lo=ro(e=>{let{type:t,predicate:n,effect:r}=co(e);return{id:Da(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(U(22))}}},{withTypes:()=>lo}),uo=(e,t)=>{let{type:n,effect:r,predicate:i}=co(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},fo=e=>{e.pending.forEach(e=>{e.abort(Ga)})},po=(e,t)=>()=>{for(let e of t.keys())fo(e);e.clear()},mo=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},ho=ro(ua(`${ao}/add`),{withTypes:()=>ho}),go=ua(`${ao}/removeAll`),_o=ro(ua(`${ao}/remove`),{withTypes:()=>_o}),vo=(...e)=>{console.error(`${ao}/error`,...e)},yo=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=vo}=e;Ja(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&fo(e)}),c=(e=>s(uo(t,e)??lo(e)));ro(c,{withTypes:()=>c});let l=e=>{let n=uo(t,e);return n&&(n.unsubscribe(),e.cancelActive&&fo(n)),!!n};ro(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=so(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,ro({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:no(u.signal),pause:to(u.signal),extra:a,signal:u.signal,fork:oo(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(Ga),n.delete(e))})},cancel:()=>{u.abort(Ga),e.pending.delete(u)},throwIfCancelled:()=>{Qa(u.signal)}})))}catch(e){e instanceof qa||mo(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(Ka),i(e),e.pending.delete(u)}},d=po(t,n);return{middleware:e=>n=>r=>{if(!Hr(r))return n(r);if(ho.match(r))return c(r.payload);if(go.match(r)){d();return}if(_o.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===io)throw Error(U(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,mo(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=io}return s},startListening:c,stopListening:l,clearListeners:d}};function U(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function bo(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function xo(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=bo(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function So(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return xo(e,t,{leading:r,maxWait:t,trailing:i})}function Co(e){return Je(e)?NaN:Number(e)}function wo(e){return e?(e=Co(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function To(e,t,n){n&&typeof n!=`number`&&Tr(e,t,n)&&(t=n=void 0),e=wo(e),t===void 0?(t=e,e=0):t=wo(t),n=n===void 0?e<t?1:-1:wo(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}var Eo=t(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,l){if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}}else if(s<0)throw Error(a+`NaN`);return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,ee=r.s==i.s?1:-1,j=r.d,M=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=M.length,T=j.length,g=new A(ee),_=g.d=[],u=0;M[u]==(j[u]||0);)++u;if(M[u]>(j[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,M=M[0],x++;(u<T||d)&&x--;u++)C=d*f+(j[u]||0),_[u]=C/M|0,d=C%M|0;else{for(d=f/(M[0]+1)|0,d>1&&(M=e(M,d),j=e(j,d),O=M.length,T=j.length),w=O,v=j.slice(0,O),y=v.length;y<O;)v[y++]=0;k=M.slice(),k.unshift(0),E=M[0],M[1]>=f/2&&++E;do d=0,c=t(M,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(M,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:M,h))):(d==0&&(c=d=1),m=M.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(M,v,O,y),c<1&&(d++,n(v,O<y?k:M,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=j[w]||0:(v=[j[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function ee(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=ee,i.config=i.set=j,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function j(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=ee(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}));function W(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function G(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}const Do=Symbol(`implicit`);function Oo(){var e=new ge,t=[],n=[],r=Do;function i(i){let a=e.get(i);if(a===void 0){if(r!==Do)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new ge;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Oo(t,n).unknown(r)},W.apply(i,arguments),i}function ko(){var e=Oo().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,c=!1,l=0,u=0,d=.5;delete e.unknown;function f(){var e=t().length,f=i<r,p=f?i:r,m=f?r:i;o=(m-p)/Math.max(1,e-l+u*2),c&&(o=Math.floor(o)),p+=(m-p-o*(e-l))*d,s=o*(1-l),c&&(p=Math.round(p),s=Math.round(s));var h=a(e).map(function(e){return p+o*e});return n(f?h.reverse():h)}return e.domain=function(e){return arguments.length?(t(e),f()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,c=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(e){return arguments.length?(c=!!e,f()):c},e.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),f()):l},e.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),f()):l},e.paddingOuter=function(e){return arguments.length?(u=+e,f()):u},e.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),f()):d},e.copy=function(){return ko(t(),[r,i]).round(c).paddingInner(l).paddingOuter(u).align(d)},W.apply(f(),arguments)}function Ao(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ao(t())},e}function jo(){return Ao(ko.apply(null,arguments).paddingInner(1))}function Mo(e){return function(){return e}}function No(e){return+e}var Po=[0,1];function K(e){return e}function Fo(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Mo(isNaN(t)?NaN:.5)}function Io(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Lo(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Fo(i,r),a=n(o,a)):(r=Fo(r,i),a=n(a,o)),function(e){return a(r(e))}}function Ro(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Fo(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=he(e,t,1,r)-1;return a[n](i[n](t))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bo(){var e=Po,t=Po,n=Ve,i,a,o,s=K,c,l,u;function d(){var n=Math.min(e.length,t.length);return s!==K&&(s=Io(e[0],e[n-1])),c=n>2?Ro:Lo,l=u=null,f}function f(r){return r==null||isNaN(r=+r)?o:(l||=c(e.map(i),t,n))(i(s(r)))}return f.invert=function(n){return s(a((u||=c(t,e.map(i),r))(n)))},f.domain=function(t){return arguments.length?(e=Array.from(t,No),d()):e.slice()},f.range=function(e){return arguments.length?(t=Array.from(e),d()):t.slice()},f.rangeRound=function(e){return t=Array.from(e),n=He,d()},f.clamp=function(e){return arguments.length?(s=e?!0:K,d()):s!==K},f.interpolate=function(e){return arguments.length?(n=e,d()):n},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function Vo(){return Bo()(K,K)}function Ho(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Uo(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Wo(e){return e=Uo(Math.abs(e)),e?e[1]:NaN}function Go(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ko(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var qo=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jo(e){if(!(t=qo.exec(e)))throw Error(`invalid format: `+e);var t;return new Yo({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Jo.prototype=Yo.prototype;function Yo(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}Yo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Xo(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Zo;function Qo(e,t){var n=Uo(e,t);if(!n)return Zo=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Zo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Uo(e,Math.max(0,t+a-1))[0]}function $o(e,t){var n=Uo(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var es={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Ho,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$o(e*100,t),r:$o,s:Qo,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ts(e){return e}var ns=Array.prototype.map,rs=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function is(e){var t=e.grouping===void 0||e.thousands===void 0?ts:Go(ns.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?ts:Ko(ns.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Jo(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):es[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=es[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Xo(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Zo!==void 0?rs[8+Zo/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(Wo(t)/3)))*3,r=10**-n,i=l((e=Jo(e),e.type=`f`,e),{suffix:rs[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var as,os,ss;cs({thousands:`,`,grouping:[3],currency:[`$`,``]});function cs(e){return as=is(e),os=as.format,ss=as.formatPrefix,as}function ls(e){return Math.max(0,-Wo(Math.abs(e)))}function us(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wo(t)/3)))*3-Wo(Math.abs(e)))}function ds(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wo(t)-Wo(e))+1}function fs(e,t,n,r){var i=ke(e,t,n),a;switch(r=Jo(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=us(i,o))&&(r.precision=a),ss(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=ds(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=ls(i))&&(r.precision=a-(r.type===`%`)*2);break}return os(r)}function ps(e){var t=e.domain;return e.ticks=function(e){var n=t();return De(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return fs(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=Oe(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function ms(){var e=Vo();return e.copy=function(){return zo(e,ms())},W.apply(e,arguments),ps(e)}function hs(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,No),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return hs(e).unknown(t)},e=arguments.length?Array.from(e,No):[0,1],ps(n)}function gs(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function _s(e){return Math.log(e)}function vs(e){return Math.exp(e)}function ys(e){return-Math.log(-e)}function bs(e){return-Math.exp(-e)}function xs(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Ss(e){return e===10?xs:e===Math.E?Math.exp:t=>e**+t}function Cs(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ws(e){return(t,n)=>-e(-t,n)}function Ts(e){let t=e(_s,vs),n=t.domain,r=10,i,a;function o(){return i=Cs(r),a=Ss(r),n()[0]<0?(i=ws(i),a=ws(a),e(ys,bs)):e(_s,vs),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=De(o,s,p))}else m=De(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Jo(n)).precision==null&&(n.trim=!0),n=os(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(gs(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Es(){let e=Ts(Bo()).domain([1,10]);return e.copy=()=>zo(e,Es()).base(e.base()),W.apply(e,arguments),e}function Ds(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Os(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ks(e){var t=1,n=e(Ds(t),Os(t));return n.constant=function(n){return arguments.length?e(Ds(t=+n),Os(t)):t},ps(n)}function As(){var e=ks(Bo());return e.copy=function(){return zo(e,As()).constant(e.constant())},W.apply(e,arguments)}function js(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Ms(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ns(e){return e<0?-e*e:e*e}function Ps(e){var t=e(K,K),n=1;function r(){return n===1?e(K,K):n===.5?e(Ms,Ns):e(js(n),js(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},ps(t)}function Fs(){var e=Ps(Bo());return e.copy=function(){return zo(e,Fs()).exponent(e.exponent())},W.apply(e,arguments),e}function Is(){return Fs.apply(null,arguments).exponent(.5)}function Ls(e){return Math.sign(e)*e*e}function Rs(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zs(){var e=Vo(),t=[0,1],n=!1,r;function i(t){var i=Rs(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Ls(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,No)).map(Ls)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return zs(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},W.apply(i,arguments),ps(i)}function Bs(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Fe(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[he(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(N),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Bs().domain(e).range(t).unknown(r)},W.apply(a,arguments)}function Vs(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[he(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Vs().domain([e,t]).range(i).unknown(a)},W.apply(ps(o),arguments)}function Hs(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[he(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return Hs().domain(e).range(t).unknown(n)},W.apply(i,arguments)}var Us=new Date,Ws=new Date;function q(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>q(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Us.setTime(+t),Ws.setTime(+r),e(Us),e(Ws),Math.floor(n(Us,Ws))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}const Gs=q(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Gs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?q(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Gs),Gs.range;const J=1e3,Y=J*60,X=Y*60,Z=X*24,Ks=Z*7,qs=Z*30,Js=Z*365,Ys=q(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*J)},(e,t)=>(t-e)/J,e=>e.getUTCSeconds());Ys.range;const Xs=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*J)},(e,t)=>{e.setTime(+e+t*Y)},(e,t)=>(t-e)/Y,e=>e.getMinutes());Xs.range;const Zs=q(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Y)},(e,t)=>(t-e)/Y,e=>e.getUTCMinutes());Zs.range;const Qs=q(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*J-e.getMinutes()*Y)},(e,t)=>{e.setTime(+e+t*X)},(e,t)=>(t-e)/X,e=>e.getHours());Qs.range;const $s=q(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*X)},(e,t)=>(t-e)/X,e=>e.getUTCHours());$s.range;const ec=q(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Y)/Z,e=>e.getDate()-1);ec.range;const tc=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Z,e=>e.getUTCDate()-1);tc.range;const nc=q(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Z,e=>Math.floor(e/Z));nc.range;function rc(e){return q(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Y)/Ks)}const ic=rc(0),ac=rc(1),oc=rc(2),sc=rc(3),cc=rc(4),lc=rc(5),uc=rc(6);ic.range,ac.range,oc.range,sc.range,cc.range,lc.range,uc.range;function dc(e){return q(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ks)}const fc=dc(0),pc=dc(1),mc=dc(2),hc=dc(3),gc=dc(4),_c=dc(5),vc=dc(6);fc.range,pc.range,mc.range,hc.range,gc.range,_c.range,vc.range;const yc=q(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());yc.range;const bc=q(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());bc.range;const xc=q(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xc.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),xc.range;const Sc=q(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Sc.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:q(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Sc.range;function Cc(e,t,n,r,i,a){let o=[[Ys,1,J],[Ys,5,5*J],[Ys,15,15*J],[Ys,30,30*J],[a,1,Y],[a,5,5*Y],[a,15,15*Y],[a,30,30*Y],[i,1,X],[i,3,3*X],[i,6,6*X],[i,12,12*X],[r,1,Z],[r,2,2*Z],[n,1,Ks],[t,1,qs],[t,3,3*qs],[e,1,Js]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=le(([,,e])=>e).right(o,i);if(a===o.length)return e.every(ke(t/Js,n/Js,r));if(a===0)return Gs.every(Math.max(ke(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[wc,Tc]=Cc(Sc,bc,fc,nc,$s,Zs),[Ec,Dc]=Cc(xc,yc,ic,ec,Qs,Xs);function Oc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function kc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ac(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function jc(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Ic(i),u=Lc(i),d=Ic(a),f=Lc(a),p=Ic(o),m=Lc(o),h=Ic(s),g=Lc(s),_=Ic(c),v=Lc(c),y={a:M,A:te,b:ne,B:re,c:null,d:il,e:il,f:ll,g:bl,G:Sl,H:al,I:ol,j:sl,L:cl,m:ul,M:dl,p:ie,q:ae,Q:Gl,s:Kl,S:fl,u:pl,U:ml,V:gl,w:_l,W:vl,x:null,X:null,y:yl,Y:xl,Z:Cl,"%":Wl},b={a:oe,A:se,b:N,B:ce,c:null,d:wl,e:wl,f:kl,g:Bl,G:Hl,H:Tl,I:El,j:Dl,L:Ol,m:Al,M:jl,p:le,q:ue,Q:Gl,s:Kl,S:Ml,u:Nl,U:Pl,V:Il,w:Ll,W:Rl,x:null,X:null,y:zl,Y:Vl,Z:Ul,"%":Wl},x={a:E,A:D,b:O,B:k,c:A,d:Jc,e:Jc,f:el,g:Wc,G:Uc,H:Xc,I:Xc,j:Yc,L:$c,m:qc,M:Zc,p:T,q:Kc,Q:nl,s:rl,S:Qc,u:zc,U:Bc,V:Vc,w:Rc,W:Hc,x:ee,X:j,y:Wc,Y:Uc,Z:Gc,"%":tl};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=Mc[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=Ac(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=kc(Ac(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?pc.ceil(a):pc(a),a=tc.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Oc(Ac(r.y,0,1)),o=a.getDay(),a=o>4||o===0?ac.ceil(a):ac(a),a=ec.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:`W`in r?1:0),o=`Z`in r?kc(Ac(r.y,0,1)).getUTCDay():Oc(Ac(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,kc(r)):Oc(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in Mc?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function ee(e,t,r){return w(e,n,t,r)}function j(e,t,n){return w(e,r,t,n)}function M(e){return o[e.getDay()]}function te(e){return a[e.getDay()]}function ne(e){return c[e.getMonth()]}function re(e){return s[e.getMonth()]}function ie(e){return i[+(e.getHours()>=12)]}function ae(e){return 1+~~(e.getMonth()/3)}function oe(e){return o[e.getUTCDay()]}function se(e){return a[e.getUTCDay()]}function N(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function le(e){return i[+(e.getUTCHours()>=12)]}function ue(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var Mc={"-":``,_:` `,0:`0`},Q=/^\s*\d+/,Nc=/^%/,Pc=/[\\^$*+?|[\]().{}]/g;function $(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Fc(e){return e.replace(Pc,`\\$&`)}function Ic(e){return RegExp(`^(?:`+e.map(Fc).join(`|`)+`)`,`i`)}function Lc(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Rc(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function zc(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Bc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Vc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Hc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Uc(e,t,n){var r=Q.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Gc(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Kc(e,t,n){var r=Q.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function qc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Yc(e,t,n){var r=Q.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Zc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Qc(e,t,n){var r=Q.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function $c(e,t,n){var r=Q.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function el(e,t,n){var r=Q.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tl(e,t,n){var r=Nc.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function nl(e,t,n){var r=Q.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function rl(e,t,n){var r=Q.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function il(e,t){return $(e.getDate(),t,2)}function al(e,t){return $(e.getHours(),t,2)}function ol(e,t){return $(e.getHours()%12||12,t,2)}function sl(e,t){return $(1+ec.count(xc(e),e),t,3)}function cl(e,t){return $(e.getMilliseconds(),t,3)}function ll(e,t){return cl(e,t)+`000`}function ul(e,t){return $(e.getMonth()+1,t,2)}function dl(e,t){return $(e.getMinutes(),t,2)}function fl(e,t){return $(e.getSeconds(),t,2)}function pl(e){var t=e.getDay();return t===0?7:t}function ml(e,t){return $(ic.count(xc(e)-1,e),t,2)}function hl(e){var t=e.getDay();return t>=4||t===0?cc(e):cc.ceil(e)}function gl(e,t){return e=hl(e),$(cc.count(xc(e),e)+(xc(e).getDay()===4),t,2)}function _l(e){return e.getDay()}function vl(e,t){return $(ac.count(xc(e)-1,e),t,2)}function yl(e,t){return $(e.getFullYear()%100,t,2)}function bl(e,t){return e=hl(e),$(e.getFullYear()%100,t,2)}function xl(e,t){return $(e.getFullYear()%1e4,t,4)}function Sl(e,t){var n=e.getDay();return e=n>=4||n===0?cc(e):cc.ceil(e),$(e.getFullYear()%1e4,t,4)}function Cl(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+$(t/60|0,`0`,2)+$(t%60,`0`,2)}function wl(e,t){return $(e.getUTCDate(),t,2)}function Tl(e,t){return $(e.getUTCHours(),t,2)}function El(e,t){return $(e.getUTCHours()%12||12,t,2)}function Dl(e,t){return $(1+tc.count(Sc(e),e),t,3)}function Ol(e,t){return $(e.getUTCMilliseconds(),t,3)}function kl(e,t){return Ol(e,t)+`000`}function Al(e,t){return $(e.getUTCMonth()+1,t,2)}function jl(e,t){return $(e.getUTCMinutes(),t,2)}function Ml(e,t){return $(e.getUTCSeconds(),t,2)}function Nl(e){var t=e.getUTCDay();return t===0?7:t}function Pl(e,t){return $(fc.count(Sc(e)-1,e),t,2)}function Fl(e){var t=e.getUTCDay();return t>=4||t===0?gc(e):gc.ceil(e)}function Il(e,t){return e=Fl(e),$(gc.count(Sc(e),e)+(Sc(e).getUTCDay()===4),t,2)}function Ll(e){return e.getUTCDay()}function Rl(e,t){return $(pc.count(Sc(e)-1,e),t,2)}function zl(e,t){return $(e.getUTCFullYear()%100,t,2)}function Bl(e,t){return e=Fl(e),$(e.getUTCFullYear()%100,t,2)}function Vl(e,t){return $(e.getUTCFullYear()%1e4,t,4)}function Hl(e,t){var n=e.getUTCDay();return e=n>=4||n===0?gc(e):gc.ceil(e),$(e.getUTCFullYear()%1e4,t,4)}function Ul(){return`+0000`}function Wl(){return`%`}function Gl(e){return+e}function Kl(e){return Math.floor(e/1e3)}var ql,Jl,Yl;Xl({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Xl(e){return ql=jc(e),Jl=ql.format,ql.parse,Yl=ql.utcFormat,ql.utcParse,ql}function Zl(e){return new Date(e)}function Ql(e){return e instanceof Date?+e:+new Date(+e)}function $l(e,t,n,r,i,a,o,s,c,l){var u=Vo(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Ql)):f().map(Zl)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(gs(n,e)):u},u.copy=function(){return zo(u,$l(e,t,n,r,i,a,o,s,c,l))},u}function eu(){return W.apply($l(Ec,Dc,xc,yc,ic,ec,Qs,Xs,Ys,Jl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tu(){return W.apply($l(wc,Tc,Sc,bc,fc,tc,$s,Zs,Ys,Yl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nu(){var e=0,t=1,n,r,i,a,o=K,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(Ve),l.rangeRound=u(He),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function ru(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function iu(){var e=ps(nu()(K));return e.copy=function(){return ru(e,iu())},G.apply(e,arguments)}function au(){var e=Ts(nu()).domain([1,10]);return e.copy=function(){return ru(e,au()).base(e.base())},G.apply(e,arguments)}function ou(){var e=ks(nu());return e.copy=function(){return ru(e,ou()).constant(e.constant())},G.apply(e,arguments)}function su(){var e=Ps(nu());return e.copy=function(){return ru(e,su()).exponent(e.exponent())},G.apply(e,arguments)}function cu(){return su.apply(null,arguments).exponent(.5)}function lu(){var e=[],t=K;function n(n){if(n!=null&&!isNaN(n=+n))return t((he(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(N),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Pe(e,r/t))},n.copy=function(){return lu(t).domain(e)},G.apply(n,arguments)}function uu(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=K,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=Ue(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(Ve),p.rangeRound=m(He),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function du(){var e=ps(uu()(K));return e.copy=function(){return ru(e,du())},G.apply(e,arguments)}function fu(){var e=Ts(uu()).domain([.1,1,10]);return e.copy=function(){return ru(e,fu()).base(e.base())},G.apply(e,arguments)}function pu(){var e=ks(uu());return e.copy=function(){return ru(e,pu()).constant(e.constant())},G.apply(e,arguments)}function mu(){var e=Ps(uu());return e.copy=function(){return ru(e,mu()).exponent(e.exponent())},G.apply(e,arguments)}function hu(){return mu.apply(null,arguments).exponent(.5)}var gu=e(t(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default;function _u(){}function vu(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function yu(e,t,n){return bu(e,t,void 0,void 0,void 0,void 0,n)}function bu(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return xu(e,t,a,o)}return xu(e,t,a,o)}function xu(e,t,n,r){if(Object.is(e,t))return!0;let i=ln(e),a=ln(t);if(i===`[object Arguments]`&&(i=Sn),a===`[object Arguments]`&&(a=Sn),i!==a)return!1;switch(i){case dn:return e.toString()===t.toString();case fn:return Hn(e.valueOf(),t.valueOf());case pn:case gn:case hn:return Object.is(e.valueOf(),t.valueOf());case un:return e.source===t.source&&e.flags===t.flags;case bn:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case _n:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!bu(a,t.get(i),i,e,t,n,r))return!1;return!0;case vn:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>bu(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case yn:case Tn:case En:case Dn:case On:case kn:case An:case jn:case Mn:case Nn:case Pn:case Fn:if(Ln(e)!==Ln(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!bu(e[i],t[i],i,e,t,n,r))return!1;return!0;case xn:return e.byteLength===t.byteLength?xu(new Uint8Array(e),new Uint8Array(t),n,r):!1;case wn:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:xu(new Uint8Array(e),new Uint8Array(t),n,r);case Cn:return e.name===t.name&&e.message===t.message;case Sn:{if(!(xu(e.constructor,t.constructor,n,r)||vu(e)&&vu(t)))return!1;let i=[...Object.keys(e),...cn(e)],a=[...Object.keys(t),...cn(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!bu(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Su(e,t){return yu(e,t,_u)}function Cu(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var wu=`<?xml version="1.0" encoding="UTF-8"?>`,Tu=`<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">`;function Eu(e,t){let n=!t||t.pretty!==!1,r=t?.indent??` `,i=t?.newline??`
9
+ `,a=[];function o(e,t){n?a.push(r.repeat(e)+t):a.push(t)}function s(e,t){if(e!==void 0)if(Array.isArray(e)){o(t,`<array>`);for(let n=0;n<e.length;n++)s(e[n],t+1);o(t,`</array>`)}else if(e instanceof ArrayBuffer)o(t,`<data>`+Cu(new Uint8Array(e))+`</data>`);else if(ArrayBuffer.isView(e))o(t,`<data>`+Cu(e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength))+`</data>`);else if(typeof e==`object`&&e&&!(e instanceof Date)){for(let n in o(t,`<dict>`),e)if(Object.hasOwn(e,n)){let r=e[n];if(r==null)continue;o(t+1,`<key>`+Du(n)+`</key>`),s(r,t+1)}o(t,`</dict>`)}else if(typeof e==`number`){let n=e%1==0?`integer`:`real`;o(t,`<`+n+`>`+e.toString()+`</`+n+`>`)}else typeof e==`bigint`?o(t,`<integer>`+e.toString()+`</integer>`):e instanceof Date?o(t,`<date>`+new Date(e).toISOString().replace(/\.\d{3}Z$/,`Z`)+`</date>`):typeof e==`boolean`?o(t,e?`<true/>`:`<false/>`):typeof e==`string`&&o(t,`<string>`+Du(e)+`</string>`)}s(e,2);let c=n?i:``;return[wu,Tu,`<plist version="1.0">`,a.join(c),`</plist>`].join(c)}function Du(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}export{Gt as $,Do as A,_a as B,As as C,fs as D,ms as E,ba as F,Cr as G,na as H,Sa as I,Qt as J,lr as K,ua as L,Eo as M,To as N,ko as O,So as P,Kt as Q,yo as R,Is as S,hs as T,zr as U,aa as V,Mr as W,Xt as X,Zt as Y,Yt as Z,Hs as _,d as _t,fu as a,Lt as at,zs as b,pu as c,wt as ct,au as d,vt as dt,Wt as et,su as f,ht as ft,eu as g,se as gt,tu as h,Qe as ht,du as i,It as it,Oo as j,jo as k,lu as l,St as lt,ou as m,dt as mt,Su as n,Ht as nt,mu as o,Ot as ot,cu as p,mt as pt,sr as q,gu as r,Bt as rt,hu as s,Et as st,Eu as t,Ut as tt,iu as u,_t as ut,Vs as v,f as vt,Es as w,Fs as x,Bs as y,Ma as z};